Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flowspy
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
flowspy
Commits
b17c9716
Commit
b17c9716
authored
13 years ago
by
Leonidas Poulopoulos
Browse files
Options
Downloads
Patches
Plain Diff
Added a moving dot gif to response to indicate ongoing activity
parent
d886ccbf
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
flowspec/views.py
+3
-3
3 additions, 3 deletions
flowspec/views.py
static/dots.gif
+0
-0
0 additions, 0 deletions
static/dots.gif
templates/user_routes.html
+1
-1
1 addition, 1 deletion
templates/user_routes.html
with
4 additions
and
4 deletions
flowspec/views.py
+
3
−
3
View file @
b17c9716
...
...
@@ -111,7 +111,7 @@ def add_route(request):
if
not
request
.
user
.
is_superuser
:
route
.
applier
=
request
.
user
route
.
status
=
"
PENDING
"
route
.
response
=
"
Applying
...
"
route
.
response
=
"
Applying
"
route
.
source
=
IPNetwork
(
"
%s/%s
"
%
(
IPNetwork
(
route
.
source
).
network
.
compressed
,
IPNetwork
(
route
.
source
).
prefixlen
)).
compressed
route
.
destination
=
IPNetwork
(
"
%s/%s
"
%
(
IPNetwork
(
route
.
destination
).
network
.
compressed
,
IPNetwork
(
route
.
destination
).
prefixlen
)).
compressed
route
.
save
()
...
...
@@ -181,7 +181,7 @@ def edit_route(request, route_slug):
route
.
applier
=
request
.
user
if
bool
(
set
(
changed_data
)
&
set
(
critical_changed_values
))
or
(
not
route_original
.
status
==
'
ACTIVE
'
):
route
.
status
=
"
PENDING
"
route
.
response
=
"
Applying
...
"
route
.
response
=
"
Applying
"
route
.
source
=
IPNetwork
(
"
%s/%s
"
%
(
IPNetwork
(
route
.
source
).
network
.
compressed
,
IPNetwork
(
route
.
source
).
prefixlen
)).
compressed
route
.
destination
=
IPNetwork
(
"
%s/%s
"
%
(
IPNetwork
(
route
.
destination
).
network
.
compressed
,
IPNetwork
(
route
.
destination
).
prefixlen
)).
compressed
route
.
save
()
...
...
@@ -235,7 +235,7 @@ def delete_route(request, route_slug):
route
.
expires
=
datetime
.
date
.
today
()
if
not
request
.
user
.
is_superuser
:
route
.
applier
=
request
.
user
route
.
response
=
"
Suspending
...
"
route
.
response
=
"
Suspending
"
route
.
save
()
route
.
commit_delete
()
requesters_address
=
request
.
META
[
'
HTTP_X_FORWARDED_FOR
'
]
...
...
This diff is collapsed.
Click to expand it.
static/dots.gif
0 → 100644
+
0
−
0
View file @
b17c9716
134 B
This diff is collapsed.
Click to expand it.
templates/user_routes.html
+
1
−
1
View file @
b17c9716
...
...
@@ -277,7 +277,7 @@ function delete_route(route){
style=
"border-bottom:2px dashed red;"
title=
"Expires {% ifequal route.days_to_expire '0' %}today{% else%}in {{route.days_to_expire}} day{{ route.days_to_expire|pluralize }}{% endifequal %}"
{%
endif
%}{%
endif
%}
>
{{ route.expires }}
</span></td>
<td
style=
"text-align: center;"
>
{% if route.status == 'EXPIRED' %}Rule expired{% else %}{% if route.status == 'ADMININACTIVE' %}Suspended by administrator{% else %}{% if route.status == 'INACTIVE' %}Suspended by user{% else %}{{ route.response }}{% endif %}{% endif %}{% endif %}
</td>
<td
style=
"text-align: center;"
>
{% if route.status == 'EXPIRED' %}Rule expired{% else %}{% if route.status == 'ADMININACTIVE' %}Suspended by administrator{% else %}{% if route.status == 'INACTIVE' %}Suspended by user{% else %}{{ route.response }}{%
if route.status == 'PENDING' %}
<img
src=
"/static/dots.gif"
>
{% endif %}{%
endif %}{% endif %}{% endif %}
</td>
<td
style=
"text-align: center; width:180px;"
>
{% ifequal route.status 'ACTIVE' %}
<a
href=
"{% url edit-route route.name %}"
class=
"edit_button"
id=
"edit_button_{{route.pk}}"
>
Edit
</a>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment