root / templates / user_routes.html @ d0777394
History | View | Annotate | Download (11.4 kB)
1 | 064ecc91 | Leonidas Poulopoulos | {% extends "base.html" %} |
---|---|---|---|
2 | 064ecc91 | Leonidas Poulopoulos | {% load i18n %} |
3 | 064ecc91 | Leonidas Poulopoulos | {% block extrahead %} |
4 | bec1a51b | Leonidas Poulopoulos | {% if user.is_authenticated %} |
5 | bec1a51b | Leonidas Poulopoulos | <script type="text/javascript" src="{% url load-js 'poller' %}"></script> |
6 | bec1a51b | Leonidas Poulopoulos | {% endif %} |
7 | 064ecc91 | Leonidas Poulopoulos | <script type="text/javascript" src="/static/js/jquery.dataTables.js"></script> |
8 | c78c4531 | Leonidas Poulopoulos | <link rel="stylesheet" type="text/css" href="/static/css/engage.itoggle.css"/> |
9 | c78c4531 | Leonidas Poulopoulos | <script type="text/javascript" src="/static/js/engage.itoggle-min.js"></script> |
10 | 064ecc91 | Leonidas Poulopoulos | <script type="text/javascript"> |
11 | c78c4531 | Leonidas Poulopoulos | $(document).ready(function(){
|
12 | c78c4531 | Leonidas Poulopoulos | $("#hid_mid").val('');
|
13 | c78c4531 | Leonidas Poulopoulos | $('#dialog').dialog({
|
14 | 2e52e8a5 | Leonidas Poulopoulos | height: 250,
|
15 | 2e52e8a5 | Leonidas Poulopoulos | width: 340,
|
16 | c78c4531 | Leonidas Poulopoulos | modal: true,
|
17 | c78c4531 | Leonidas Poulopoulos | autoOpen: false,
|
18 | c78c4531 | Leonidas Poulopoulos | buttons: {
|
19 | 2e52e8a5 | Leonidas Poulopoulos | 'Suspend': function(){
|
20 | c78c4531 | Leonidas Poulopoulos | route = $('#route_to_delete').text();
|
21 | c78c4531 | Leonidas Poulopoulos | route_url_id = '#del_route_' + route;
|
22 | c78c4531 | Leonidas Poulopoulos | url = $(route_url_id).attr('href');
|
23 | c78c4531 | Leonidas Poulopoulos | $.ajax({
|
24 | c78c4531 | Leonidas Poulopoulos | url: url,
|
25 | c78c4531 | Leonidas Poulopoulos | cache: false,
|
26 | c78c4531 | Leonidas Poulopoulos | success: function(data){
|
27 | c78c4531 | Leonidas Poulopoulos | $('#dialog').dialog('close');
|
28 | c78c4531 | Leonidas Poulopoulos | window.setTimeout('location.reload()', 1000);
|
29 | c78c4531 | Leonidas Poulopoulos | }
|
30 | c78c4531 | Leonidas Poulopoulos | });
|
31 | 9cad4715 | Leonidas Poulopoulos | },
|
32 | c78c4531 | Leonidas Poulopoulos | Cancel: function(){
|
33 | c78c4531 | Leonidas Poulopoulos | $('#dialog').dialog('close');
|
34 | 3e99e2d1 | Leonidas Poulopoulos | },
|
35 | c78c4531 | Leonidas Poulopoulos |
|
36 | c78c4531 | Leonidas Poulopoulos |
|
37 | c78c4531 | Leonidas Poulopoulos | },
|
38 | c78c4531 | Leonidas Poulopoulos | close: function(){
|
39 | c78c4531 | Leonidas Poulopoulos | update_val = $("#hid_mid").val();
|
40 | c78c4531 | Leonidas Poulopoulos | if (update_val == 'UPDATED') {
|
41 | c78c4531 | Leonidas Poulopoulos | $("#hid_mid").val('');
|
42 | c78c4531 | Leonidas Poulopoulos | window.setTimeout('location.reload()', 500);
|
43 | c78c4531 | Leonidas Poulopoulos | }
|
44 | c78c4531 | Leonidas Poulopoulos | }
|
45 | c78c4531 | Leonidas Poulopoulos | });
|
46 | c78c4531 | Leonidas Poulopoulos | $('#console').dialog({
|
47 | c78c4531 | Leonidas Poulopoulos | height: 250,
|
48 | c78c4531 | Leonidas Poulopoulos | width: 800,
|
49 | c78c4531 | Leonidas Poulopoulos | modal: true,
|
50 | c78c4531 | Leonidas Poulopoulos | autoOpen: false,
|
51 | 083c9706 | Leonidas Poulopoulos | overlay: { opacity: 0.5, background: 'black'},
|
52 | c78c4531 | Leonidas Poulopoulos | close: function(){
|
53 | c78c4531 | Leonidas Poulopoulos | update_val = $("#hid_mid").val();
|
54 | c78c4531 | Leonidas Poulopoulos | if (update_val == 'UPDATED') {
|
55 | c78c4531 | Leonidas Poulopoulos | $("#hid_mid").val('');
|
56 | c78c4531 | Leonidas Poulopoulos | window.setTimeout('location.reload()', 500);
|
57 | c78c4531 | Leonidas Poulopoulos | }
|
58 | c78c4531 | Leonidas Poulopoulos | }
|
59 | c78c4531 | Leonidas Poulopoulos | });
|
60 | 083c9706 | Leonidas Poulopoulos | $('#console').parent().css('opacity', 0.9);
|
61 | 083c9706 | Leonidas Poulopoulos | $('#console').parent().css('filter', 'alpha(opacity=90)');
|
62 | c78c4531 | Leonidas Poulopoulos | var oTable = $('#routes_table').dataTable({
|
63 | c78c4531 | Leonidas Poulopoulos | "bJQueryUI": true,
|
64 | c78c4531 | Leonidas Poulopoulos | "aoColumns": [{
|
65 | c78c4531 | Leonidas Poulopoulos | "bVisible": false,
|
66 | c78c4531 | Leonidas Poulopoulos | "bSearchable": false,
|
67 | c78c4531 | Leonidas Poulopoulos | "bSortable": false
|
68 | c78c4531 | Leonidas Poulopoulos | }, {
|
69 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
70 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
71 | c78c4531 | Leonidas Poulopoulos | }, {
|
72 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
73 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
74 | c78c4531 | Leonidas Poulopoulos | }, {
|
75 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
76 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
77 | c78c4531 | Leonidas Poulopoulos | }, {
|
78 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
79 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
80 | c78c4531 | Leonidas Poulopoulos | }, {
|
81 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
82 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
83 | c78c4531 | Leonidas Poulopoulos | }, {
|
84 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
85 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
86 | c78c4531 | Leonidas Poulopoulos | }, {
|
87 | c78c4531 | Leonidas Poulopoulos | "bSearchable": true,
|
88 | c78c4531 | Leonidas Poulopoulos | "bSortable": true
|
89 | c78c4531 | Leonidas Poulopoulos | }, {
|
90 | c78c4531 | Leonidas Poulopoulos | "bVisible": true,
|
91 | c78c4531 | Leonidas Poulopoulos | "bSearchable": false,
|
92 | c78c4531 | Leonidas Poulopoulos | "bSortable": false
|
93 | c78c4531 | Leonidas Poulopoulos | }],
|
94 | c78c4531 | Leonidas Poulopoulos | "aaSorting": [[0, 'desc']],
|
95 | c78c4531 | Leonidas Poulopoulos | "oLanguage": {
|
96 | c78c4531 | Leonidas Poulopoulos | "sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> rules'
|
97 | c78c4531 | Leonidas Poulopoulos | },
|
98 | c78c4531 | Leonidas Poulopoulos | "iDisplayLength": 25,
|
99 | c78c4531 | Leonidas Poulopoulos | });
|
100 | c78c4531 | Leonidas Poulopoulos |
|
101 | c78c4531 | Leonidas Poulopoulos | oTable.fnDraw();
|
102 | c78c4531 | Leonidas Poulopoulos |
|
103 | c78c4531 | Leonidas Poulopoulos | $('input[name="status_filter"]').click(function(){
|
104 | c78c4531 | Leonidas Poulopoulos |
|
105 | c78c4531 | Leonidas Poulopoulos | //slice off the last '|' or it doesn't work
|
106 | c78c4531 | Leonidas Poulopoulos | //also be sure to use the third parameter
|
107 | c78c4531 | Leonidas Poulopoulos | });
|
108 | c78c4531 | Leonidas Poulopoulos |
|
109 | c78c4531 | Leonidas Poulopoulos | $(".button_place #routebutton").button({
|
110 | c78c4531 | Leonidas Poulopoulos | icons: {
|
111 | c78c4531 | Leonidas Poulopoulos | primary: "ui-icon-circle-plus"
|
112 | c78c4531 | Leonidas Poulopoulos | },
|
113 | c78c4531 | Leonidas Poulopoulos | });
|
114 | c78c4531 | Leonidas Poulopoulos | $(".edit_button").button({
|
115 | c78c4531 | Leonidas Poulopoulos | icons: {
|
116 | c78c4531 | Leonidas Poulopoulos | primary: "ui-icon-wrench"
|
117 | c78c4531 | Leonidas Poulopoulos | },
|
118 | c78c4531 | Leonidas Poulopoulos | }).css('width','100px');;
|
119 | c78c4531 | Leonidas Poulopoulos | $(" .del_button").button({
|
120 | c78c4531 | Leonidas Poulopoulos | icons: {
|
121 | c78c4531 | Leonidas Poulopoulos | primary: "ui-icon-circle-close"
|
122 | c78c4531 | Leonidas Poulopoulos | },
|
123 | c78c4531 | Leonidas Poulopoulos | }).click(function(){
|
124 | c78c4531 | Leonidas Poulopoulos | $('#dialog').dialog('open');
|
125 | c78c4531 | Leonidas Poulopoulos | return false;
|
126 | c78c4531 | Leonidas Poulopoulos | }).css('width','100px');
|
127 | c78c4531 | Leonidas Poulopoulos | $("#consolebutton").button({
|
128 | c78c4531 | Leonidas Poulopoulos | icons: {
|
129 | c78c4531 | Leonidas Poulopoulos | primary: "ui-icon-image"
|
130 | c78c4531 | Leonidas Poulopoulos | },
|
131 | c78c4531 | Leonidas Poulopoulos | }).click(function(){
|
132 | c78c4531 | Leonidas Poulopoulos | $("#consolebutton").stop().stop();
|
133 | c78c4531 | Leonidas Poulopoulos | $("#consolebutton").css('color', '#555555');
|
134 | c78c4531 | Leonidas Poulopoulos | $('#console').dialog('open');
|
135 | c78c4531 | Leonidas Poulopoulos | return false;
|
136 | c78c4531 | Leonidas Poulopoulos | });
|
137 | c78c4531 | Leonidas Poulopoulos |
|
138 | 2e52e8a5 | Leonidas Poulopoulos | $(".statustootipclass").tooltip();
|
139 | c78c4531 | Leonidas Poulopoulos | $(".expiresclass").tooltip();
|
140 | c78c4531 | Leonidas Poulopoulos | $(".commentclass").tooltip();
|
141 | c78c4531 | Leonidas Poulopoulos | var reg_exp = '';
|
142 | c78c4531 | Leonidas Poulopoulos | var checkboxs = document.getElementsByName('status_filter');
|
143 | c78c4531 | Leonidas Poulopoulos | for (var i = 0, inp; inp = checkboxs[i]; i++) {
|
144 | c78c4531 | Leonidas Poulopoulos | checkCookie = readCookie("cookie_" + inp.value);
|
145 | c78c4531 | Leonidas Poulopoulos | if (checkCookie) {
|
146 | c78c4531 | Leonidas Poulopoulos | if (checkCookie == 'true') {
|
147 | c78c4531 | Leonidas Poulopoulos | $(inp).attr('checked', true);
|
148 | c78c4531 | Leonidas Poulopoulos | }
|
149 | c78c4531 | Leonidas Poulopoulos | else {
|
150 | c78c4531 | Leonidas Poulopoulos | $(inp).attr('checked', false);
|
151 | c78c4531 | Leonidas Poulopoulos | }
|
152 | c78c4531 | Leonidas Poulopoulos | }
|
153 | c78c4531 | Leonidas Poulopoulos |
|
154 | c78c4531 | Leonidas Poulopoulos | if (inp.type.toLowerCase() == 'checkbox' && inp.checked == true) {
|
155 | c78c4531 | Leonidas Poulopoulos | reg_exp = reg_exp + inp.value + '|';
|
156 | c78c4531 | Leonidas Poulopoulos | }
|
157 | c78c4531 | Leonidas Poulopoulos |
|
158 | c78c4531 | Leonidas Poulopoulos | }
|
159 | c78c4531 | Leonidas Poulopoulos | if (reg_exp == '') {
|
160 | d0f665cc | Leonidas Poulopoulos | reg_exp = 'XXX|'
|
161 | c78c4531 | Leonidas Poulopoulos | }
|
162 | c78c4531 | Leonidas Poulopoulos | oTable.fnFilter(reg_exp.slice(0, -1), 4, true);
|
163 | c78c4531 | Leonidas Poulopoulos |
|
164 | c78c4531 | Leonidas Poulopoulos | $('input[name="status_filter"]').iToggle({
|
165 | c78c4531 | Leonidas Poulopoulos | type: 'checkbox',
|
166 | c78c4531 | Leonidas Poulopoulos | onSlide: function(){
|
167 | c78c4531 | Leonidas Poulopoulos | var reg_exp = '';
|
168 | c78c4531 | Leonidas Poulopoulos | var checkboxs = document.getElementsByName('status_filter');
|
169 | c78c4531 | Leonidas Poulopoulos |
|
170 | c78c4531 | Leonidas Poulopoulos | for (var i = 0, inp; inp = checkboxs[i]; i++) {
|
171 | c78c4531 | Leonidas Poulopoulos | if (inp.type.toLowerCase() == 'checkbox' && inp.checked) {
|
172 | c78c4531 | Leonidas Poulopoulos | reg_exp = reg_exp + inp.value + '|';
|
173 | c78c4531 | Leonidas Poulopoulos | }
|
174 | c78c4531 | Leonidas Poulopoulos | createCookie("cookie_" + inp.value, inp.checked, 30);
|
175 | c78c4531 | Leonidas Poulopoulos | }
|
176 | c78c4531 | Leonidas Poulopoulos | //passing an empty string will result in no filter
|
177 | c78c4531 | Leonidas Poulopoulos | //thus, it must be set to something that will not exist in the column
|
178 | c78c4531 | Leonidas Poulopoulos | if (reg_exp == '') {
|
179 | c78c4531 | Leonidas Poulopoulos | reg_exp = 'X|'
|
180 | c78c4531 | Leonidas Poulopoulos | }
|
181 | c78c4531 | Leonidas Poulopoulos | oTable.fnFilter(reg_exp.slice(0, -1), 4, true);
|
182 | c78c4531 | Leonidas Poulopoulos | },
|
183 | c78c4531 | Leonidas Poulopoulos | });
|
184 | c78c4531 | Leonidas Poulopoulos | });
|
185 | 9cad4715 | Leonidas Poulopoulos |
|
186 | 3e99e2d1 | Leonidas Poulopoulos | function delete_route(route){
|
187 | 3e99e2d1 | Leonidas Poulopoulos | route_name = route;
|
188 | 3e99e2d1 | Leonidas Poulopoulos | $('#route_to_delete').text(route_name);
|
189 | 3e99e2d1 | Leonidas Poulopoulos | return false;
|
190 | 3e99e2d1 | Leonidas Poulopoulos | }
|
191 | 9cad4715 | Leonidas Poulopoulos | |
192 | 9cad4715 | Leonidas Poulopoulos | |
193 | 9cad4715 | Leonidas Poulopoulos | |
194 | 064ecc91 | Leonidas Poulopoulos | </script>
|
195 | 3e99e2d1 | Leonidas Poulopoulos | <style type="text/css"> |
196 | 3e99e2d1 | Leonidas Poulopoulos | #console { |
197 | 3e99e2d1 | Leonidas Poulopoulos | background: none repeat scroll 0 0 #36102a !important; |
198 | 3e99e2d1 | Leonidas Poulopoulos | color: #edeae8 !important; |
199 | 3e99e2d1 | Leonidas Poulopoulos | font-family: monospace !important; |
200 | 3e99e2d1 | Leonidas Poulopoulos | } |
201 | 3e99e2d1 | Leonidas Poulopoulos | .message { |
202 | 3e99e2d1 | Leonidas Poulopoulos | font-family: monospace !important; |
203 | 3e99e2d1 | Leonidas Poulopoulos | } |
204 | fb67376a | Leonidas Poulopoulos | .tooltip { |
205 | fb67376a | Leonidas Poulopoulos | display:none; |
206 | fb67376a | Leonidas Poulopoulos | background:transparent url(/static/black_arrow.png); |
207 | fb67376a | Leonidas Poulopoulos | font-size:12px; |
208 | fb67376a | Leonidas Poulopoulos | height:70px; |
209 | fb67376a | Leonidas Poulopoulos | width:160px; |
210 | fb67376a | Leonidas Poulopoulos | padding:25px; |
211 | fb67376a | Leonidas Poulopoulos | color:#fff; |
212 | fb67376a | Leonidas Poulopoulos | } |
213 | 3e99e2d1 | Leonidas Poulopoulos | |
214 | 3e99e2d1 | Leonidas Poulopoulos | </style>
|
215 | 064ecc91 | Leonidas Poulopoulos | {% endblock %} |
216 | 33e8f0b8 | Leonidas Poulopoulos | {% block title %}{% trans "My rules" %}{% endblock %} |
217 | 064ecc91 | Leonidas Poulopoulos | {% block content %} |
218 | 9cad4715 | Leonidas Poulopoulos | <div style="float:left"> |
219 | 33e8f0b8 | Leonidas Poulopoulos | <h3 style="margin-top: 0px;">{% trans "My rules" %}</h3> |
220 | 9cad4715 | Leonidas Poulopoulos | </div>
|
221 | 9cad4715 | Leonidas Poulopoulos | <div class='button_place' style="float:right"> |
222 | 33e8f0b8 | Leonidas Poulopoulos | <button id="consolebutton">Console</button> <a href="{% url add-route %}" id="routebutton">Add Rule</a> |
223 | 9cad4715 | Leonidas Poulopoulos | </div>
|
224 | cb2bec3d | Leonidas Poulopoulos | <br><br> |
225 | c78c4531 | Leonidas Poulopoulos | |
226 | c78c4531 | Leonidas Poulopoulos | <div id='itoggle'> |
227 | c78c4531 | Leonidas Poulopoulos | <table cellpadding="0" cellspacing="0" border="0" class="display" style='width:200px;'> |
228 | c78c4531 | Leonidas Poulopoulos | <tbody>
|
229 | c78c4531 | Leonidas Poulopoulos | <tr>
|
230 | 62353243 | Leonidas Poulopoulos | <th>ACTIVE</th><th>SUSPENDED</th><th>ERROR</th><th>PENDING</th> |
231 | c78c4531 | Leonidas Poulopoulos | </tr>
|
232 | c78c4531 | Leonidas Poulopoulos | <tr class="on_off"> |
233 | c78c4531 | Leonidas Poulopoulos | <td>
|
234 | c78c4531 | Leonidas Poulopoulos | <input type="checkbox" class="onoff" name="status_filter" value="ACTIVE" checked ="show_active"/> |
235 | c78c4531 | Leonidas Poulopoulos | </td>
|
236 | c78c4531 | Leonidas Poulopoulos | |
237 | c78c4531 | Leonidas Poulopoulos | <td>
|
238 | d0f665cc | Leonidas Poulopoulos | <input type="checkbox" class="onoff" name="status_filter" value="SUSPENDED" id="show_inactive"/> |
239 | 62353243 | Leonidas Poulopoulos | </td>
|
240 | c78c4531 | Leonidas Poulopoulos | <td>
|
241 | c78c4531 | Leonidas Poulopoulos | <input type="checkbox" class="onoff" name="status_filter" value="ERROR" id="show_error"/> |
242 | c78c4531 | Leonidas Poulopoulos | </td>
|
243 | c78c4531 | Leonidas Poulopoulos | |
244 | c78c4531 | Leonidas Poulopoulos | <td>
|
245 | d0f665cc | Leonidas Poulopoulos | <input type="checkbox" class="onoff" name="status_filter" value="PENDING" id="show_pending"/> |
246 | c78c4531 | Leonidas Poulopoulos | </td>
|
247 | c78c4531 | Leonidas Poulopoulos | </tr>
|
248 | c78c4531 | Leonidas Poulopoulos | </tbody>
|
249 | c78c4531 | Leonidas Poulopoulos | </table>
|
250 | c78c4531 | Leonidas Poulopoulos | </div>
|
251 | c78c4531 | Leonidas Poulopoulos | <table class="display" width="100%" id="nodes_table"> |
252 | 064ecc91 | Leonidas Poulopoulos | <table class="display" width="100%" id="routes_table"> |
253 | 064ecc91 | Leonidas Poulopoulos | <thead>
|
254 | 064ecc91 | Leonidas Poulopoulos | <tr>
|
255 | b27537d5 | Leonidas Poulopoulos | <th>Id</th> |
256 | 064ecc91 | Leonidas Poulopoulos | <th>{% trans "Name" %}</th> |
257 | 064ecc91 | Leonidas Poulopoulos | <th>{% trans "Match" %}</th> |
258 | 064ecc91 | Leonidas Poulopoulos | <th style="text-align: center;">{% trans "Then" %}</th> |
259 | 7d408f6f | Leonidas Poulopoulos | <th style="text-align: center; ">{% trans "Status" %}</th> |
260 | 064ecc91 | Leonidas Poulopoulos | {% comment %}<th style="text-align: center;">{% trans "Details" %}</th>{% endcomment %} |
261 | 6ee21ffd | Leonidas Poulopoulos | <th style="text-align: center;">{% trans "Applier" %}</th> |
262 | 064ecc91 | Leonidas Poulopoulos | <th style="text-align: center;">{% trans "Expires" %}</th> |
263 | 9cad4715 | Leonidas Poulopoulos | <th style="text-align: center;">{% trans "Response" %}</th> |
264 | 6b747a1b | Leonidas Poulopoulos | <th style="text-align: center; width:180px;">{% trans "Actions" %}</th> |
265 | 064ecc91 | Leonidas Poulopoulos | </tr>
|
266 | 064ecc91 | Leonidas Poulopoulos | </thead>
|
267 | 064ecc91 | Leonidas Poulopoulos | |
268 | 064ecc91 | Leonidas Poulopoulos | <tbody>
|
269 | 064ecc91 | Leonidas Poulopoulos | {% for route in routes %} |
270 | 064ecc91 | Leonidas Poulopoulos | |
271 | 95450be6 | Leonidas Poulopoulos | <tr class="GradeC" > |
272 | b27537d5 | Leonidas Poulopoulos | <td>{{ route.pk }}</td> |
273 | c78c4531 | Leonidas Poulopoulos | <td><span {% if %} |
274 | c78c4531 | Leonidas Poulopoulos | class="commentclass" |
275 | c78c4531 | Leonidas Poulopoulos | style="border-bottom:1px dotted red;" |
276 | c78c4531 | Leonidas Poulopoulos | title="{{route.comments}}" |
277 | c78c4531 | Leonidas Poulopoulos | {% endif %}>{{ route.name }}</span></td> |
278 | 064ecc91 | Leonidas Poulopoulos | <td>{{ route.get_match|safe|escape }}</td> |
279 | 064ecc91 | Leonidas Poulopoulos | <td style="text-align: center;">{{route.get_then|safe|escape}}</td> |
280 | 2e52e8a5 | Leonidas Poulopoulos | <td style="text-align: center; "><span |
281 | 62353243 | Leonidas Poulopoulos | {% if == 'EXPIRED' or == 'ADMININACTIVE' or == 'INACTIVE' or == 'OUTOFSYNC'%} |
282 | 2e52e8a5 | Leonidas Poulopoulos | class="statustootipclass" |
283 | 2e52e8a5 | Leonidas Poulopoulos | style="border-bottom:1px dotted red;" |
284 | 62353243 | Leonidas Poulopoulos | title = "{% ifequal route.status 'INACTIVE' %}Suspended by user{% else %}{% ifequal route.status 'ADMININACTIVE' %}Suspended by administrator{% else %}{% ifequal route.status 'EXPIRED' %}Suspended due to expiration{% else %}{% ifequal route.status 'OUTOFSYNC' %}Syncronization error. Configuration in device deffers from rule{% endifequal %}{% endifequal %}{% endifequal %}{% endifequal %}"{% endif %}>{% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' %}SUSPENDED{% else %}{% if route.status == 'OUTOFSYNC' %}ERROR{% else %}{{route.status}}{% endif %}{% endif %}</span></td> |
285 | c78c4531 | Leonidas Poulopoulos | {% comment %}<td style="text-align: center;">{{ route.response }}</td>{% endcomment %} |
286 | c78c4531 | Leonidas Poulopoulos | <td style="text-align: center;">{{ route.applier }}</td> |
287 | fdc3d663 | Leonidas Poulopoulos | <td style="text-align: center;"><span {% if == 'EXPIRED' or == 'ADMININACTIVE' or == 'INACTIVE' or == 'OUTOFSYNC'%}{% else %}{% if %} |
288 | fb67376a | Leonidas Poulopoulos | class="expiresclass" |
289 | fb67376a | Leonidas Poulopoulos | style="border-bottom:2px dashed red;" |
290 | 7c4bc8de | Leonidas Poulopoulos | title="Expires {% ifequal route.days_to_expire '0' %}today{% else%}in {{route.days_to_expire}} day{{ route.days_to_expire|pluralize }}{% endifequal %}" |
291 | fdc3d663 | Leonidas Poulopoulos | {% endif %}{% endif %}>{{ route.expires }}</span></td> |
292 | fdc3d663 | Leonidas Poulopoulos | <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> |
293 | 6b747a1b | Leonidas Poulopoulos | <td style="text-align: center; width:180px;"> |
294 | 97e42c7d | Leonidas Poulopoulos | {% ifequal route.status 'ACTIVE' %} |
295 | 3e99e2d1 | Leonidas Poulopoulos | <a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Edit</a> |
296 | c78c4531 | Leonidas Poulopoulos | <button class="del_button" id="{{route.name}}" onclick="javascript:delete_route(this.id)">Suspend</button> |
297 | 3e99e2d1 | Leonidas Poulopoulos | <a href="{% url delete-route route.name %}" style="display:none" id="del_route_{{route.name}}"></a> |
298 | 3e99e2d1 | Leonidas Poulopoulos | {% else %} |
299 | 2e52e8a5 | Leonidas Poulopoulos | {% if route.status == 'EXPIRED' or route.status == 'ADMININACTIVE' or route.status == 'INACTIVE' %} |
300 | 97e42c7d | Leonidas Poulopoulos | <a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">Reactivate</a> |
301 | 97e42c7d | Leonidas Poulopoulos | {% else %} |
302 | 6a946adf | Leonidas Poulopoulos | {% ifequal route.status 'OUTOFSYNC' %} |
303 | 6a946adf | Leonidas Poulopoulos | <a href="{% url edit-route route.name %}" class="edit_button" id="edit_button_{{route.pk}}">ReSync</a> |
304 | 6a946adf | Leonidas Poulopoulos | {% else %} |
305 | 3e99e2d1 | Leonidas Poulopoulos | - |
306 | 97e42c7d | Leonidas Poulopoulos | {% endifequal %} |
307 | 2e52e8a5 | Leonidas Poulopoulos | {% endif %} |
308 | fb67376a | Leonidas Poulopoulos | {% endifequal %} |
309 | fb67376a | Leonidas Poulopoulos | </td>
|
310 | 064ecc91 | Leonidas Poulopoulos | </tr>
|
311 | 064ecc91 | Leonidas Poulopoulos | |
312 | 064ecc91 | Leonidas Poulopoulos | {% endfor %} |
313 | 064ecc91 | Leonidas Poulopoulos | </tbody>
|
314 | 064ecc91 | Leonidas Poulopoulos | </table>
|
315 | 064ecc91 | Leonidas Poulopoulos | |
316 | 2e52e8a5 | Leonidas Poulopoulos | <div id="dialog" title="Suspend Rule"> |
317 | 2e52e8a5 | Leonidas Poulopoulos | <p>You are about to suspend rule <strong><span id="route_to_delete"></span></strong></p> |
318 | 2e52e8a5 | Leonidas Poulopoulos | <p>Suspending the rule will automatically remove the configuration from the network and mark this rule as inactive.</p> |
319 | 3e99e2d1 | Leonidas Poulopoulos | <p>Are you sure you want to proceed?</p> |
320 | 3e99e2d1 | Leonidas Poulopoulos | </div>
|
321 | 3e99e2d1 | Leonidas Poulopoulos | <div id="console" title="Console"> |
322 | 3e99e2d1 | Leonidas Poulopoulos | {% include "poll.html" %} |
323 | 3e99e2d1 | Leonidas Poulopoulos | </div>
|
324 | 064ecc91 | Leonidas Poulopoulos | {% endblock %} |