Commit 33e8f0b8 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Renamed route to rule in templates

parent 049a5a10
......@@ -64,7 +64,7 @@ def add_route(request):
applier_peer_networks = request.user.get_profile().peer.networks.all()
if not applier_peer_networks:
messages.add_message(request, messages.WARNING,
"Insufficient rights on administrative networks. Cannot add route. Contact your administrator")
"Insufficient rights on administrative networks. Cannot add rule. Contact your administrator")
return HttpResponseRedirect(reverse("group-routes"))
if request.method == "GET":
form = RouteForm()
......@@ -118,7 +118,7 @@ def edit_route(request, route_slug):
route_edit_applier_peer = route_edit.applier.get_profile().peer
if applier_peer != route_edit_applier_peer:
messages.add_message(request, messages.WARNING,
"Insufficient rights to edit route %s" %(route_slug))
"Insufficient rights to edit rule %s" %(route_slug))
return HttpResponseRedirect(reverse("group-routes"))
route_original = deepcopy(route_edit)
if request.POST:
......
......@@ -3,17 +3,17 @@
{% block title %}
{% if edit %}
{% trans "Edit Route" %} {{form.data.name}}
{% trans "Edit Rule" %} {{form.data.name}}
{% else %}
{% trans "Create new Route" %}
{% trans "Create new Rule" %}
{% endif %}
{% endblock %}
{% block breadcrumbs %}::
{% if edit %}
{% trans "Edit route" %} {{form.data.name}}
{% trans "Edit rule" %} {{form.data.name}}
{% else %}
{% trans "Create route" %}
{% trans "Create rule" %}
{% endif %}
{% endblock %}
{% block extrahead %}
......@@ -144,9 +144,9 @@ th {
</style>
<div align="center">
{% if edit %}
<h3>{% trans "Edit route" %}: {{form.data.name}}</h3>
<h3>{% trans "Edit rule" %}: {{form.data.name}}</h3>
{% else %}
<h3>{% trans "Apply for a new route" %}</h3>
<h3>{% trans "Apply for a new rule" %}</h3>
{% endif %}
<form method="POST">
{% csrf_token %}
......@@ -155,7 +155,7 @@ th {
{% endif %}
<fieldset {% if edit %} style="display:none;" {% endif %}>
<legend>{% trans "Route Basic Info" %}</legend>
<legend>{% trans "Rule Basic Info" %}</legend>
<table>
<tr><th>{{ form.name.label_tag }}</th><td>{{ form.name }}<span class="error">{{ form.name.errors|join:", " }}</span></td></tr>
<tr class="help"><td></td><td>A unique identifier will be added as a name_suffix</td></tr>
......@@ -163,7 +163,7 @@ th {
</fieldset>
<fieldset>
<legend>{% trans "Route Match Conditions" %}</legend>
<legend>{% trans "Rule Match Conditions" %}</legend>
<table>
<input type="hidden" id="id_applier" name="applier" value="{{applier}}"/>
<tr><th>{{ form.source.label_tag }}</th><td>{{ form.source }}<span class="error">{{ form.source.errors|join:", " }}</span></td></tr>
......@@ -179,7 +179,7 @@ th {
</table>
</fieldset>
<fieldset>
<legend>{% trans "Route Actions" %}</legend>
<legend>{% trans "Rule Actions" %}</legend>
<table>
<tr><th>{{ form.then.label_tag }}</th><td>{{ form.then }}&nbsp;&nbsp;<button id="new_then_actions">Rate-limit</button><span class="error">{{ form.then.errors|join:", " }}</span></td></tr>
</table>
......@@ -187,7 +187,7 @@ th {
<fieldset>
<legend>{% trans "Use/Comments" %}</legend>
{% blocktrans %}
<p>Give a short description of the intended use of this route, that justifies the parameter selection above. Feel free to include any additional comments.</p>
<p>Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.</p>
{% endblocktrans %}
<p>{{ form.comments }}
{% if form.errors %}<br /><span class="error">{{ form.comments.errors|join:", " }}</span>{% endif %}
......
......@@ -49,7 +49,7 @@
<img class="logoimg" src="/static/grnet_logo.png">
</a>
<div id="title">
<a href="/">Firewall on Demand</a>
<a href="{% url group-routes %}">Firewall on Demand</a>
</div>
<div class="loginform">
<div id="formcontent">
......@@ -82,7 +82,7 @@
</div>
<div id="content">
{% block brcrmb_container %}
<div class="info_content_title">{% if user.is_authenticated %}<a href="{% url group-routes %}">{% trans "My routes" %}</a>{% endif %}
<div class="info_content_title">{% if user.is_authenticated %}<a href="{% url group-routes %}">{% trans "My rules" %}</a>{% endif %}
{% block breadcrumbs %}{% endblock %}
</div>
{% if messages %}
......@@ -97,11 +97,14 @@
{% endblock %}
</div>
<div id="footer">
{% comment %}
{% if user.is_authenticated %}
{% trans "If you have any questions or need help, contact GRNET Helpdesk at <a href='mailto:helpdesk@grnet.gr'>helpdesk@grnet.gr</a> or 800-11-47638." %}<br />
{% endif %}
<a href="http://www.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="/about/info/">{% trans "Info" %}</a> | <a href="/about/terms-of-service">{% trans "Service Terms" %}</a>
{% endcomment %}
</div>
</div>
</body>
......
......@@ -55,7 +55,7 @@
$('#routes_table').dataTable( {
"bJQueryUI": true,
"oLanguage": {
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> routes'
"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> rules'
},
"iDisplayLength": 25,
} );
......@@ -113,13 +113,13 @@ function delete_route(route){
</style>
{% endblock %}
{% block title %}{% trans "My routes" %}{% endblock %}
{% block title %}{% trans "My rules" %}{% endblock %}
{% block content %}
<div style="float:left">
<h3 style="margin-top: 0px;">{% trans "My routes" %}</h3>
<h3 style="margin-top: 0px;">{% trans "My rules" %}</h3>
</div>
<div class='button_place' style="float:right">
<button id="consolebutton">Console</button> <a href="{% url add-route %}" id="routebutton">Add Route</a>
<button id="consolebutton">Console</button> <a href="{% url add-route %}" id="routebutton">Add Rule</a>
</div>
<table class="display" width="100%" id="routes_table">
<thead>
......@@ -171,8 +171,8 @@ function delete_route(route){
</table>
<div id="dialog" title="Delete Route">
<p>You are about to delete route <strong><span id="route_to_delete"></span></strong></p>
<p>Deleting the route will automatically remove the configuration from the network and mark this route as inactive.</p>
<p>You are about to delete rule <strong><span id="route_to_delete"></span></strong></p>
<p>Deleting the rule will automatically remove the configuration from the network and mark this route as inactive.</p>
<p>Are you sure you want to proceed?</p>
</div>
<div id="console" title="Console">
......
......@@ -5,11 +5,10 @@
{% block content %}
<div id="welcome">
<h3>{% trans "Welcome" %}</h3>
{% blocktrans %}
<p>Welcome to GRNET's FoD service.</p>
<p>If you are new to the service, take some time to read the service description <a href="/about/info">here</a>.</p>
{% comment %}<p>If you are new to the service, take some time to read the service description <a href="/about/info">here</a>.</p>{% endcomment %}
<p>For troubleshooting info and remarks do not hesitate to contact GRNET's Helpdesk.</p>
{% endblocktrans %}</p>
</p>
</div>
<div id="loginform">
......
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