<% local view, viewlibrary, page_info, session = ... require("viewfunctions") %> <% displaycommandresults({"deletedevice", "editdevice", "editdeviceparams", "overridedeviceparams"}, session) %> <% displaycommandresults({"createdevice"}, session, true) %>

Devices

<% if page_info.action == "searchdevices" then %> <% if view.value[1] and view.value[1].group and view.value[1].group ~= "" then %> <% end %> <% end %> <% for k,v in ipairs( view.value ) do %> <% if page_info.action == "searchdevices" then %> <% if v.group and v.group ~= "" then %> <% end %> <% end %> <% end %>
Action Name LabelGroupParam Value
<% if viewlibrary.check_permission("deletedevice") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletedevice?device_id="..v.device_id, label="Delete "} %> <% end %> <% if viewlibrary.check_permission("editdevice") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editdevice?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Edit "} %> <% end %> <% if viewlibrary.check_permission("overridedeviceparams") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/overridedeviceparams?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Params "} %> <% elseif viewlibrary.check_permission("editdeviceparams") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editdeviceparams?device_id="..v.device_id.."&redir="..page_info.orig_action, label="Params "} %> <% end %> <% if viewlibrary.check_permission("getdevicevalues") then %> <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/getdevicevalues?name="..v.name.."&viewtype=templated", label="View "} %> <% end %> <%= html.html_escape(v.name) %> <%= html.html_escape(v.label) %><%= html.html_escape(v.group) %><%= html.html_escape(v.param) %> <%= html.html_escape(v.value) %>
<% if view.errtxt then %>

<%= html.html_escape(view.errtxt) %>

<% end %> <% if #view.value == 0 then %>

No devices found

<% end %>
<% if page_info.action == "listdevices" and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createdevice") then viewlibrary.dispatch_component("createdevice") end %>