Implement Networks URLs

This commit is contained in:
Kumi 2019-02-02 13:24:15 +00:00
parent 21014a6894
commit 41d915a90b
3 changed files with 7 additions and 1 deletions

View file

@ -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/<int:device_id>/edit/', views.editdevice, name='editdevice'),
path('devices/<int:device_id>/ping/', views.ping, name="ping"),

View file

@ -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('/'));

View file

@ -50,6 +50,11 @@
<a class="nav-link" href="/users/">Users</a>
</li>
{% endif %}
{% if user.is_superuser %}
<li class="nav-item">
<a class="nav-link" href="/networks/">Networks</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link" href="/accounts/logout">Logout</a>
</li>