diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index 221916c9f..fdadc679d 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -926,19 +926,9 @@ class DeviceStatusView(View): def get(self, request, pk): device = get_object_or_404(Device, pk=pk) - method = request.GET.get('method', 'get_facts') - - interfaces = Interface.objects.order_naturally( - device.device_type.interface_ordering - ).filter( - device=device - ).select_related( - 'connected_as_a', 'connected_as_b' - ) return render(request, 'dcim/device_status.html', { 'device': device, - 'interfaces': interfaces, }) diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index f725dafa3..573c1c967 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -333,6 +333,31 @@ table.component-list tr.ipaddress:hover td { background-color: #e6f7f7; } +/* AJAX loader */ +.loading { + position: fixed; + display: none; + z-index: 999; + height: 2em; + width: 2em; + overflow: show; + margin: auto; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +.loading:before { + content: ''; + display: block; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.3); +} + /* Misc */ .banner-bottom { margin-bottom: 50px; diff --git a/netbox/project-static/img/ajax-loader.gif b/netbox/project-static/img/ajax-loader.gif new file mode 100644 index 000000000..24f1e8658 Binary files /dev/null and b/netbox/project-static/img/ajax-loader.gif differ diff --git a/netbox/templates/_base.html b/netbox/templates/_base.html index 10879087d..10b4970a8 100644 --- a/netbox/templates/_base.html +++ b/netbox/templates/_base.html @@ -323,13 +323,19 @@ - + {% block javascript %}{% endblock %} diff --git a/netbox/templates/dcim/device_status.html b/netbox/templates/dcim/device_status.html index d5931b550..537d1034b 100644 --- a/netbox/templates/dcim/device_status.html +++ b/netbox/templates/dcim/device_status.html @@ -1,8 +1,10 @@ {% extends '_base.html' %} +{% load staticfiles %} {% block title %}{{ device }} - NAPALM{% endblock %} {% block content %} + {% include 'inc/ajax_loader.html' %} {% include 'dcim/inc/device_header.html' with active_tab='status' %}
@@ -47,7 +49,7 @@