Skip to content

Commit

Permalink
The plugin actually shows things now
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamgilbert committed Aug 11, 2015
1 parent 067c7fa commit 567b1f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions server/plugins/salscriptsversion/salscriptsversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand All @@ -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

4 changes: 2 additions & 2 deletions server/plugins/salscriptsversion/templates/front.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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;
});
});
Expand Down
4 changes: 2 additions & 2 deletions server/plugins/salscriptsversion/templates/id.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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;
});
});
Expand Down

0 comments on commit 567b1f7

Please sign in to comment.