From 41d915a90b1af4382f7a181c8a5fabd3ec37d6e0 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Sat, 2 Feb 2019 13:24:15 +0000 Subject: [PATCH] Implement Networks URLs --- manager/urls.py | 1 + static/js/devices.js | 2 +- templates/base.html | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/manager/urls.py b/manager/urls.py index 61e94af..76a6a40 100644 --- a/manager/urls.py +++ b/manager/urls.py @@ -7,6 +7,7 @@ urlpatterns = [ path('devices/', views.devices, name='devices'), path('wifi/', views.devices, name='wifi'), path('users/', views.devices, name='users'), + path('networks/', views.devices, name='networks'), path('hosts', views.hosts, name='hosts'), path('devices//edit/', views.editdevice, name='editdevice'), path('devices//ping/', views.ping, name="ping"), diff --git a/static/js/devices.js b/static/js/devices.js index bedfb18..2ae67d0 100644 --- a/static/js/devices.js +++ b/static/js/devices.js @@ -123,7 +123,7 @@ function shownets() { $("#linkusers").css("font-weight", "normal"); $("#linknets").css("font-weight", "bold"); - window.history.pushState("", "", "/users/"); + window.history.pushState("", "", "/networks/"); }; var page = document.location.pathname.substring(1, document.location.pathname.lastIndexOf('/')); diff --git a/templates/base.html b/templates/base.html index d49c5dd..1071155 100644 --- a/templates/base.html +++ b/templates/base.html @@ -50,6 +50,11 @@ Users {% endif %} + {% if user.is_superuser %} + + {% endif %}