diff --git a/server/plugins/salscriptsversion/salscriptsversion.py b/server/plugins/salscriptsversion/salscriptsversion.py index 9aff02f6..539d0ad6 100644 --- a/server/plugins/salscriptsversion/salscriptsversion.py +++ b/server/plugins/salscriptsversion/salscriptsversion.py @@ -28,7 +28,7 @@ def show_widget(self, page, machines=None, theid=None): machines = Machine.objects.filter(machine_group=machine_group) if machines: - sal_info = machines.values('sal_version').annotate(count=Count('sal_version')).order_by() + sal_info = machines.values('sal_version').exclude(sal_version__isnull=True).annotate(count=Count('sal_version')).order_by() else: sal_info = [] @@ -45,6 +45,6 @@ def filter_machines(self, machines, data): machines = machines.filter(sal_version__exact=data) - title = 'Machines running version '+data+' of Sa;' + title = 'Machines running version '+data+' of Sal' return machines, title \ No newline at end of file diff --git a/server/plugins/salscriptsversion/templates/front.html b/server/plugins/salscriptsversion/templates/front.html index 99ab8817..876ca4ff 100644 --- a/server/plugins/salscriptsversion/templates/front.html +++ b/server/plugins/salscriptsversion/templates/front.html @@ -19,7 +19,7 @@ element: 'salversiongraph', data: [ {% for item in data|dictsort:'sal_version' %} -{% if item.munki_version %} +{% if item.sal_version %} { label: "{{ item.sal_version }}", value: {{ item.count }} @@ -31,7 +31,7 @@ resize: true }).on('click', function(i, row){ console.log(row['label']); - var url_mask = "{% url 'machine_list_front' 'SalVersion' 'abc123' %}".replace(/abc123/, row['label'].toString()); + var url_mask = "{% url 'machine_list_front' 'SalScriptsVersion' 'abc123' %}".replace(/abc123/, row['label'].toString()); window.location=url_mask; }); }); diff --git a/server/plugins/salscriptsversion/templates/id.html b/server/plugins/salscriptsversion/templates/id.html index 8a6de950..34176837 100644 --- a/server/plugins/salscriptsversion/templates/id.html +++ b/server/plugins/salscriptsversion/templates/id.html @@ -19,7 +19,7 @@ element: 'salversiongraph', data: [ {% for item in data|dictsort:'sal_version' %} -{% if item.munki_version %} +{% if item.sal_version %} { label: "{{ item.sal_version }}", value: {{ item.count }} @@ -31,7 +31,7 @@ resize: true }).on('click', function(i, row){ console.log(row['label']); - var url_mask = "{% url 'machine_list_id' 'MunkiVersion' 'abc123' page theid %}".replace(/abc123/, row['label'].toString()); + var url_mask = "{% url 'machine_list_id' 'SalScriptsVersion' 'abc123' page theid %}".replace(/abc123/, row['label'].toString()); window.location=url_mask; }); });