modules: Make luci-base sufficient to use luci apps
authorDaniel F. Dickinson <cshored@thecshore.com>
Thu, 2 Aug 2018 13:39:48 +0000 (09:39 -0400)
committerJo-Philipp Wich <jo@mein.io>
Wed, 19 Sep 2018 18:08:19 +0000 (20:08 +0200)
commit6ec0353201435e0d0d7d32820d8ba600b4ca7b5b
tree8f37ae726c257f81fe105cb85e7c6aebe09c0095
parent1a0316bbbaad3f6befce34014d7e204cb1c76ec0
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 <cshored@thecshore.com>
18 files changed:
modules/luci-base/luasrc/controller/admin/index.lua [new file with mode: 0644]
modules/luci-base/luasrc/controller/admin/uci.lua [new file with mode: 0644]
modules/luci-base/luasrc/dispatcher.lua
modules/luci-base/luasrc/view/admin_uci/changelog.htm [new file with mode: 0644]
modules/luci-base/luasrc/view/admin_uci/changes.htm [new file with mode: 0644]
modules/luci-base/luasrc/view/admin_uci/revert.htm [new file with mode: 0644]
modules/luci-base/luasrc/view/empty_node_placeholder.htm [new file with mode: 0644]
modules/luci-mod-admin-full/luasrc/controller/admin/index.lua [deleted file]
modules/luci-mod-admin-full/luasrc/controller/admin/network.lua
modules/luci-mod-admin-full/luasrc/controller/admin/status.lua
modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
modules/luci-mod-admin-full/luasrc/controller/admin/uci.lua [deleted file]
modules/luci-mod-admin-full/luasrc/view/admin_uci/changelog.htm [deleted file]
modules/luci-mod-admin-full/luasrc/view/admin_uci/changes.htm [deleted file]
modules/luci-mod-admin-full/luasrc/view/admin_uci/revert.htm [deleted file]
themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm
themes/luci-theme-material/luasrc/view/themes/material/header.htm
themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm