From 28365aa243bb84d896c2058b33893e8e501f22d3 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 13 Jul 2016 17:55:21 +0200 Subject: [statistics] Add location to filter dropdown list --- .../statistics/templates/clientlist.html | 19 +++++++++++++++---- .../statistics/templates/machine-main.html | 7 ++++--- 2 files changed, 19 insertions(+), 7 deletions(-) (limited to 'modules-available/statistics/templates') diff --git a/modules-available/statistics/templates/clientlist.html b/modules-available/statistics/templates/clientlist.html index 57ec7f64..664d5413 100644 --- a/modules-available/statistics/templates/clientlist.html +++ b/modules-available/statistics/templates/clientlist.html @@ -151,9 +151,12 @@ var slxFilterNames = { kvmstate: '{{lang_kvmSupport}}', badsectors: '{{lang_reallocatedSectors}}', clientip: '{{lang_ip}}', - state: '{{lang_usageState}}' + state: '{{lang_usageState}}', + location: '{{lang_location}}' }; +slxLocations = {{{locations}}}; + var slxFilterDel = '{{delimiter}}'; @@ -188,7 +191,7 @@ document.addEventListener("DOMContentLoaded", function () { })[0].selectize; /* add query */ var str = "{{{query}}}"; - var eExp = /^(\w+)\s*([=>', { value: v, text: v })); + var t = v; + if (col === 'location' && slxLocations['L' + v]) { + t = slxLocations['L' + v].pad + ' ' + slxLocations['L' + v].name; + } + $('#argumentSelect').append($('