summaryrefslogtreecommitdiffstats
path: root/provisioning-searchdevices-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2019-05-27 22:11:48 +0000
committerTed Trask <ttrask01@yahoo.com>2019-05-27 22:11:48 +0000
commit8961d795e450e61d38da8ac22e8c3288722edb58 (patch)
tree8f311e611b8143f11eec129715e358b72ed83ba9 /provisioning-searchdevices-html.lsp
parent22ea69305bb4db5274e1852ee41d5651810190a7 (diff)
downloadacf-provisioning-8961d795e450e61d38da8ac22e8c3288722edb58.tar.bz2
acf-provisioning-8961d795e450e61d38da8ac22e8c3288722edb58.tar.xz
Add display param for searchdevices to display additional device values
Diffstat (limited to 'provisioning-searchdevices-html.lsp')
-rw-r--r--provisioning-searchdevices-html.lsp26
1 files changed, 15 insertions, 11 deletions
diff --git a/provisioning-searchdevices-html.lsp b/provisioning-searchdevices-html.lsp
index eb99fd0..2f5ae17 100644
--- a/provisioning-searchdevices-html.lsp
+++ b/provisioning-searchdevices-html.lsp
@@ -46,20 +46,24 @@ if form.value.values then
form.value.values = nil
-- And here we display the list of devices in the result
elseif form.value.result then
- -- Determine all of the columns
- local tmp = {}
- for k,v in ipairs( form.value.result.value ) do
- for g,c in pairs(v) do
- if not tmp[g] then tmp[g] = true end
- end
- end
local display = {}
- for n in pairs(tmp) do
- if n ~= "device_id" then
- display[#display+1] = n
+ if form.value.display then
+ display = form.value.display.value
+ else
+ -- Determine all of the columns
+ local tmp = {}
+ for k,v in ipairs( form.value.result.value ) do
+ for g,c in pairs(v) do
+ if not tmp[g] then tmp[g] = true end
+ end
+ end
+ for n in pairs(tmp) do
+ if n ~= "device_id" then
+ display[#display+1] = n
+ end
end
+ table.sort(display)
end
- table.sort(display)
local header_level = htmlviewfunctions.displaysectionstart(form.value.result, page_info)
%>