% local view, viewlibrary, page_info, session = ... require("viewfunctions") %> <% displaycommandresults({"deletedevice", "editdevice", "editdeviceparams", "overridedeviceparams"}, session) %> <% displaycommandresults({"createdevice"}, session, true) %>
Action | Name | Label | <% if page_info.action == "searchdevices" then %> <% if view.value[1] and view.value[1].group and view.value[1].group ~= "" then %>Group | <% end %>Param | Value | <% end %>
---|---|---|---|---|---|
<% 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) %> | <% if page_info.action == "searchdevices" then %> <% if v.group and v.group ~= "" then %><%= html.html_escape(v.group) %> | <% end %><%= html.html_escape(v.param) %> | <%= html.html_escape(v.value) %> | <% end %>
<%= html.html_escape(view.errtxt) %>
<% end %> <% if #view.value == 0 then %>No devices found
<% end %>