From 2d27a7f333f3cdf421d3558505f9b54dfa734f54 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 6 Jul 2015 10:00:19 -0400 Subject: Fix searchdevices HTML view when used for getdevicevalues (cherry picked from commit 7eda47ba7e6f00fa24d3da99bb6b82c116d03fbf) --- provisioning-searchdevices-html.lsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/provisioning-searchdevices-html.lsp b/provisioning-searchdevices-html.lsp index 3cecce2..0cdae00 100644 --- a/provisioning-searchdevices-html.lsp +++ b/provisioning-searchdevices-html.lsp @@ -24,6 +24,7 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"deletedevice", "editdevice", "editdeviceparams", "overridedeviceparams"}, session) %> <% +-- This view is also used for getdevicevalues, and this is where the values are displayed if form.value.values then local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Device"}), page_info) htmlviewfunctions.displayinfo(form) @@ -35,8 +36,9 @@ if form.value.values then htmlviewfunctions.displaysectionend(header_level2) htmlviewfunctions.displaysectionend(header_level) form.value.values = nil +-- And here we display the list of devices in the result elseif form.value.result then - local func = haserl.loadfile(page_info.viewfile:gsub("searchdevices", "listdevices")) + local func = haserl.loadfile(page_info.viewfile:gsub(page_info.action, "listdevices")) func(form.value.result, viewlibrary, page_info, session) end %> -- cgit v1.2.3