Commit b17c9716 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Added a moving dot gif to response to indicate ongoing activity

parent d886ccbf
......@@ -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']
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment