summaryrefslogtreecommitdiffstats
path: root/provisioning-searchdevices-html.lsp
diff options
context:
space:
mode:
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)
%>