diff options
Diffstat (limited to 'openvpn-listconfigs-html.lsp')
-rw-r--r-- | openvpn-listconfigs-html.lsp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/openvpn-listconfigs-html.lsp b/openvpn-listconfigs-html.lsp deleted file mode 100644 index 358bdc3..0000000 --- a/openvpn-listconfigs-html.lsp +++ /dev/null @@ -1,57 +0,0 @@ -<% local view, viewlibrary, page_info, session = ... %> -<% require("viewfunctions") %> - -<% displaycommandresults({"editconfig", "deleteconfig"}, session) %> -<% displaycommandresults({"createconfig"}, session, true) %> - -<% if viewlibrary.dispatch_component then - viewlibrary.dispatch_component("status") -end %> - -<H2>Available configs</H2> -<TABLE> - <TR style="background:#eee;font-weight:bold;vertical-align:top;"> - <TD class="header">Actions</TD> - <TD class="header">Config</TD> - <TD class="header">Type</TD> - <TD class="header">Status</TD> - <TD class="header">Connected<BR>Clients</TD> - </TR> - -<% for i,config in ipairs(view.value) do %> - <TR > - <TD> - <%= html.link{value = page_info.script .. page_info.prefix .. page_info.controller .. "/viewconfig?name=" .. config.name, label="View " } %> - <% if session.permissions.openvpn.editconfig then %> - <%= html.link{value = page_info.script .. page_info.prefix .. page_info.controller .. "/editconfig?name=" .. config.name.."&redir="..page_info.orig_action, label="Expert " } %> - <% end %> - <% if session.permissions.openvpn.deleteconfig then %> - <%= html.link{value = page_info.script .. page_info.prefix .. page_info.controller .. "/deleteconfig?name=" .. config.name.."&redir="..page_info.orig_action, label="Delete " } %> - <% end %> - </TD> - <TD><%= html.html_escape(string.gsub(config.name, "^.*/", "")) %></TD> - <TD <% if config.errtxt then io.write('class="error"') end %>><%= html.html_escape(config.type) %></TD> - <TD><%= html.link{value = page_info.script .. page_info.prefix .. page_info.controller .. "/startstop?service=" .. string.match(html.html_escape(string.gsub(config.name, "^.*/", "")), "^(.+)\.conf") .."&redir="..page_info.orig_action, label=html.html_escape(config.status) } %></TD> - <TD><% if ( config.type == "server" ) then %> - <% if ( config.clients > 0 ) then %> - <%= html.link{value = page_info.script .. page_info.prefix .. page_info.controller .. "/statusinfo?name=" .. config.name, label = config.clients } %> - <% else %> - <%= html.html_escape(config.clients) %> - <% end %> - <% end %> </TD> - </TR> - <% if config.errtxt then %> - <TR class="error"><TD colspan=5><%= html.html_escape(config.errtxt) %></TD></TR> - <% end %> -<% end %> - -<% if (#view.value == 0) then %> - <TR> - <TD colspan=5>(No existing config-files)</TD> - </TR> -<% end %> -</TABLE> - -<% if viewlibrary.dispatch_component and session.permissions.openvpn.createconfig then - viewlibrary.dispatch_component("createconfig") -end %> |