From 6ec0353201435e0d0d7d32820d8ba600b4ca7b5b Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Thu, 2 Aug 2018 09:39:48 -0400 Subject: modules: Make luci-base sufficient to use luci apps Per the discussion in https://github.com/openwrt/luci/issues/869, make luci-base sufficient to login, logout, and review and apply or revert uci changes. This allows most luci-app-xxx to work without having luci-mod-admin-full installed. It has been tested with some apps and not luci-mod-admin-full, as well as with luci-mod-admin-full (to make sure the usual case doesn't break). Instead of creating a new module namespace (e.g. 'Base') we reduce the opportunities for breakage by having luci-base take over the 'shell' of the 'Administration' (admin/....) namespace. Since admin is assumed by all current building LuCI components (including Freifunk), this doesn't introduce the 'Administration' tab into any situation where it would not already be present (but includes it where it was before). We also add a "Component not installed" page to avoid fatal errors and backtrace when e.g. luci-mod-admin-full is not installed. Signed-off-by: Daniel F. Dickinson --- .../luci-base/luasrc/view/admin_uci/changes.htm | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 modules/luci-base/luasrc/view/admin_uci/changes.htm (limited to 'modules/luci-base/luasrc/view/admin_uci/changes.htm') diff --git a/modules/luci-base/luasrc/view/admin_uci/changes.htm b/modules/luci-base/luasrc/view/admin_uci/changes.htm new file mode 100644 index 0000000000..43bd7c23fb --- /dev/null +++ b/modules/luci-base/luasrc/view/admin_uci/changes.htm @@ -0,0 +1,45 @@ +<%# + Copyright 2008 Steven Barth + Copyright 2008-2018 Jo-Philipp Wich + Licensed to the public under the Apache License 2.0. +-%> + +<%+header%> + +<%- + local node, redir_url = luci.dispatcher.lookup(luci.http.formvalue("redir")) + export("redirect", redir_url or url("admin/uci/changes")) + + include("admin_uci/changelog") +-%> + +

<%:Configuration%> / <%:Changes%>

+ +<% if changes then %> + <%- uci_changelog(changes) -%> +<% else %> +

<%:There are no pending changes!%>

+<% end %> + + + +
+ <% if redir_url then %> +
+ +
+ <% end %> + +
"> + + " /> + +
+
"> + + " /> + +
+
+ +<%+footer%> -- cgit v1.2.3