Fixing Django 4 compatibility, removing auto_updates refs
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
<th class='text-center'>Hostname</th>
|
||||
<th class='text-center'>Updates #</th>
|
||||
<th class='text-center'>Uptime</th>
|
||||
<th class='text-center'>Auto-update</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -56,7 +55,6 @@
|
||||
<td><a href="{% url 'packages-by-host' stat.server.hostname %}">{{ stat.server.hostname }}</b></td>
|
||||
<td class='status-{{ stat.updates_status }} text-center'>{{ stat.updates }}</td>
|
||||
<td class='status-{{ stat.uptime_status }} text-center'>{{ stat.uptime }}</td>
|
||||
<td class='status-{{ stat.auto_updates_status }} text-center'>{{ stat.get_auto_updates_display }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@@ -106,34 +104,10 @@ jQuery.fn.dataTableExt.oSort['num-none-desc'] = function(x,y) {
|
||||
else return ((parseInt(x) < parseInt(y)) ? 1 : ((parseInt(x) > parseInt(y)) ? -1 : 0));
|
||||
};
|
||||
|
||||
// sort auto-updates status: Ok < Unkown < Error < N/A
|
||||
// Error < Unkown < Ok < N/A
|
||||
jQuery.fn.dataTableExt.oSort['auto-updates-asc'] = function(x,y) {
|
||||
if (x == y) return 0;
|
||||
else if (x == 'N/A') return 1;
|
||||
else if (y == 'N/A') return -1;
|
||||
else if (x == 'Ok') return -1;
|
||||
else if (y == 'Ok') return 1;
|
||||
else if (x == 'Error') return 1;
|
||||
else if (y == 'Error') return -1;
|
||||
};
|
||||
jQuery.fn.dataTableExt.oSort['auto-updates-desc'] = function(x,y) {
|
||||
if (x == y) return 0;
|
||||
else if (x == 'N/A') return 1;
|
||||
else if (y == 'N/A') return -1;
|
||||
else if (x == 'Ok') return 1;
|
||||
else if (y == 'Ok') return -1;
|
||||
else if (x == 'Error') return -1;
|
||||
else if (y == 'Error') return 1;
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#server-list').DataTable({
|
||||
"paging": false,
|
||||
"order": [[ 1, "asc" ]],
|
||||
"aoColumns": [
|
||||
null, null, null, null, {"sType": "num-none"}, {"sType": "num-none"}, {"sType": "auto-updates"}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user