diff --git a/package/gluon-config-mode-core/Makefile b/package/gluon-config-mode-core/Makefile index 45dc996a..dacbce08 100644 --- a/package/gluon-config-mode-core/Makefile +++ b/package/gluon-config-mode-core/Makefile @@ -17,7 +17,7 @@ define Package/gluon-config-mode-core SECTION:=gluon CATEGORY:=Gluon TITLE:=Configuration wizard for user friendly setup of new mesh nodes - DEPENDS:=+gluon-setup-mode +gluon-web-model +gluon-web-theme +uhttpd + DEPENDS:=+gluon-setup-mode +gluon-web-model +gluon-config-mode-theme +uhttpd endef define Build/Prepare diff --git a/package/gluon-config-mode-core/files/lib/gluon/web/view/config-mode/reboot.html b/package/gluon-config-mode-core/files/lib/gluon/config-mode/view/wizard/reboot.html similarity index 100% rename from package/gluon-config-mode-core/files/lib/gluon/web/view/config-mode/reboot.html rename to package/gluon-config-mode-core/files/lib/gluon/config-mode/view/wizard/reboot.html diff --git a/package/gluon-config-mode-core/files/lib/gluon/web/view/config-mode/welcome.html b/package/gluon-config-mode-core/files/lib/gluon/config-mode/view/wizard/welcome.html similarity index 100% rename from package/gluon-config-mode-core/files/lib/gluon/web/view/config-mode/welcome.html rename to package/gluon-config-mode-core/files/lib/gluon/config-mode/view/wizard/welcome.html diff --git a/package/gluon-web/files/lib/gluon/web/www/index.html b/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html similarity index 61% rename from package/gluon-web/files/lib/gluon/web/www/index.html rename to package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html index 326644e8..bda93144 100644 --- a/package/gluon-web/files/lib/gluon/web/www/index.html +++ b/package/gluon-config-mode-core/files/lib/gluon/config-mode/www/index.html @@ -1,7 +1,7 @@ - + diff --git a/package/gluon-config-mode-core/files/lib/gluon/setup-mode/rc.d/S50uhttpd b/package/gluon-config-mode-core/files/lib/gluon/setup-mode/rc.d/S50uhttpd index ffe799c9..efd1d612 100755 --- a/package/gluon-config-mode-core/files/lib/gluon/setup-mode/rc.d/S50uhttpd +++ b/package/gluon-config-mode-core/files/lib/gluon/setup-mode/rc.d/S50uhttpd @@ -9,6 +9,6 @@ UHTTPD_BIN="/usr/sbin/uhttpd" start_service() { procd_open_instance procd_set_param respawn - procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/web/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80 + procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/config-mode/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80 procd_close_instance } diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/controller/gluon-config-mode/index.lua similarity index 100% rename from package/gluon-config-mode-core/luasrc/lib/gluon/web/controller/gluon-config-mode/index.lua rename to package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/controller/gluon-config-mode/index.lua diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua similarity index 95% rename from package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua rename to package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua index 22d661c1..ca400a9e 100644 --- a/package/gluon-config-mode-core/luasrc/lib/gluon/web/model/gluon-config-mode/wizard.lua +++ b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/model/gluon-config-mode/wizard.lua @@ -24,7 +24,7 @@ f.submit = translate('Save & restart') f.reset = false local s = f:section(Section) -s.template = "config-mode/welcome" +s.template = "wizard/welcome" s.package = "gluon-config-mode-core" local commit = {'gluon-setup-mode'} @@ -56,7 +56,7 @@ function f:write() r() end - f.template = "config-mode/reboot" + f.template = "wizard/reboot" f.package = "gluon-config-mode-core" f.hidenav = true diff --git a/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/www/cgi-bin/config b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/www/cgi-bin/config new file mode 100755 index 00000000..7f7ead23 --- /dev/null +++ b/package/gluon-config-mode-core/luasrc/lib/gluon/config-mode/www/cgi-bin/config @@ -0,0 +1,8 @@ +#!/usr/bin/lua + +require 'gluon.web.cgi' { + base_path = '/lib/gluon/config-mode', + + layout_package = 'gluon-config-mode-theme', + layout_template = 'theme/layout', +} diff --git a/package/gluon-web-theme/Makefile b/package/gluon-config-mode-theme/Makefile similarity index 59% rename from package/gluon-web-theme/Makefile rename to package/gluon-config-mode-theme/Makefile index 2dd47ab7..766496e1 100644 --- a/package/gluon-web-theme/Makefile +++ b/package/gluon-config-mode-theme/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=gluon-web-theme +PKG_NAME:=gluon-config-mode-theme PKG_VERSION:=0.1 PKG_RELEASE:=1 @@ -14,10 +14,10 @@ include ../gluon.mk PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG) -define Package/gluon-web-theme +define Package/gluon-config-mode-theme SECTION:=gluon CATEGORY:=Gluon - TITLE:=gluon-web theme + TITLE:=Gluon config mode theme for gluon-web DEPENDS:=+gluon-core +gluon-web endef @@ -26,12 +26,12 @@ define Build/Prepare endef define Build/Compile - $(call GluonBuildI18N,gluon-web-theme,i18n) + $(call GluonBuildI18N,gluon-config-mode-theme,i18n) endef -define Package/gluon-web-theme/install +define Package/gluon-config-mode-theme/install $(CP) ./files/* $(1)/ - $(call GluonInstallI18N,gluon-web-theme,$(1)) + $(call GluonInstallI18N,gluon-config-mode-theme,$(1)) endef -$(eval $(call BuildPackage,gluon-web-theme)) +$(eval $(call BuildPackage,gluon-config-mode-theme)) diff --git a/package/gluon-web-theme/files/lib/gluon/web/view/theme/layout.html b/package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html similarity index 100% rename from package/gluon-web-theme/files/lib/gluon/web/view/theme/layout.html rename to package/gluon-config-mode-theme/files/lib/gluon/config-mode/view/theme/layout.html diff --git a/package/gluon-web-theme/files/lib/gluon/web/www/static/gluon.css b/package/gluon-config-mode-theme/files/lib/gluon/config-mode/www/static/gluon.css similarity index 100% rename from package/gluon-web-theme/files/lib/gluon/web/www/static/gluon.css rename to package/gluon-config-mode-theme/files/lib/gluon/config-mode/www/static/gluon.css diff --git a/package/gluon-web-theme/i18n/de.po b/package/gluon-config-mode-theme/i18n/de.po similarity index 100% rename from package/gluon-web-theme/i18n/de.po rename to package/gluon-config-mode-theme/i18n/de.po diff --git a/package/gluon-web-theme/i18n/fr.po b/package/gluon-config-mode-theme/i18n/fr.po similarity index 100% rename from package/gluon-web-theme/i18n/fr.po rename to package/gluon-config-mode-theme/i18n/fr.po diff --git a/package/gluon-web-theme/i18n/gluon-web-theme.pot b/package/gluon-config-mode-theme/i18n/gluon-config-mode-theme.pot similarity index 100% rename from package/gluon-web-theme/i18n/gluon-web-theme.pot rename to package/gluon-config-mode-theme/i18n/gluon-config-mode-theme.pot diff --git a/package/gluon-web-theme/sass/gluon.scss b/package/gluon-config-mode-theme/sass/gluon.scss similarity index 98% rename from package/gluon-web-theme/sass/gluon.scss rename to package/gluon-config-mode-theme/sass/gluon.scss index be29c990..075c1328 100644 --- a/package/gluon-web-theme/sass/gluon.scss +++ b/package/gluon-config-mode-theme/sass/gluon.scss @@ -1,10 +1,10 @@ /* ATTENTION: This file is not compiled when building gluon. - The compiled version is at ../files/lib/gluon/web/www/static/gluon/cascade.css + The compiled version is at ../files/lib/gluon/config-mode/www/static/gluon.css Use sass like this to update it: - sass --sourcemap=none -C -t compressed sass/gluon.scss files/lib/gluon/web/www/static/gluon.css + sass --sourcemap=none -C -t compressed sass/gluon.scss files/lib/gluon/config-mode/www/static/gluon.css When commiting changes to this file make sure to commit the respective changes to the compilid version within the same commit! diff --git a/package/gluon-web-admin/files/lib/gluon/web/view/admin/info.html b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/info.html similarity index 100% rename from package/gluon-web-admin/files/lib/gluon/web/view/admin/info.html rename to package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/info.html diff --git a/package/gluon-web-admin/files/lib/gluon/web/view/admin/upgrade.html b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade.html similarity index 100% rename from package/gluon-web-admin/files/lib/gluon/web/view/admin/upgrade.html rename to package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade.html diff --git a/package/gluon-web-admin/files/lib/gluon/web/view/admin/upgrade_confirm.html b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_confirm.html similarity index 100% rename from package/gluon-web-admin/files/lib/gluon/web/view/admin/upgrade_confirm.html rename to package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_confirm.html diff --git a/package/gluon-web-admin/files/lib/gluon/web/view/admin/upgrade_reboot.html b/package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_reboot.html similarity index 100% rename from package/gluon-web-admin/files/lib/gluon/web/view/admin/upgrade_reboot.html rename to package/gluon-web-admin/files/lib/gluon/config-mode/view/admin/upgrade_reboot.html diff --git a/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/index.lua b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/index.lua similarity index 100% rename from package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/index.lua rename to package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/index.lua diff --git a/package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/upgrade.lua b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua similarity index 100% rename from package/gluon-web-admin/luasrc/lib/gluon/web/controller/admin/upgrade.lua rename to package/gluon-web-admin/luasrc/lib/gluon/config-mode/controller/admin/upgrade.lua diff --git a/package/gluon-web-admin/luasrc/lib/gluon/web/model/admin/remote.lua b/package/gluon-web-admin/luasrc/lib/gluon/config-mode/model/admin/remote.lua similarity index 100% rename from package/gluon-web-admin/luasrc/lib/gluon/web/model/admin/remote.lua rename to package/gluon-web-admin/luasrc/lib/gluon/config-mode/model/admin/remote.lua diff --git a/package/gluon-web-autoupdater/luasrc/lib/gluon/web/controller/admin/autoupdater.lua b/package/gluon-web-autoupdater/luasrc/lib/gluon/config-mode/controller/admin/autoupdater.lua similarity index 100% rename from package/gluon-web-autoupdater/luasrc/lib/gluon/web/controller/admin/autoupdater.lua rename to package/gluon-web-autoupdater/luasrc/lib/gluon/config-mode/controller/admin/autoupdater.lua diff --git a/package/gluon-web-autoupdater/luasrc/lib/gluon/web/model/admin/autoupdater.lua b/package/gluon-web-autoupdater/luasrc/lib/gluon/config-mode/model/admin/autoupdater.lua similarity index 100% rename from package/gluon-web-autoupdater/luasrc/lib/gluon/web/model/admin/autoupdater.lua rename to package/gluon-web-autoupdater/luasrc/lib/gluon/config-mode/model/admin/autoupdater.lua diff --git a/package/gluon-web-logging/luasrc/lib/gluon/web/controller/admin/logging.lua b/package/gluon-web-logging/luasrc/lib/gluon/config-mode/controller/admin/logging.lua similarity index 100% rename from package/gluon-web-logging/luasrc/lib/gluon/web/controller/admin/logging.lua rename to package/gluon-web-logging/luasrc/lib/gluon/config-mode/controller/admin/logging.lua diff --git a/package/gluon-web-logging/luasrc/lib/gluon/web/model/admin/logging.lua b/package/gluon-web-logging/luasrc/lib/gluon/config-mode/model/admin/logging.lua similarity index 100% rename from package/gluon-web-logging/luasrc/lib/gluon/web/model/admin/logging.lua rename to package/gluon-web-logging/luasrc/lib/gluon/config-mode/model/admin/logging.lua diff --git a/package/gluon-web-mesh-vpn-fastd/files/lib/gluon/web/view/model/mesh-vpn-fastd.html b/package/gluon-web-mesh-vpn-fastd/files/lib/gluon/config-mode/view/mesh-vpn-fastd.html similarity index 100% rename from package/gluon-web-mesh-vpn-fastd/files/lib/gluon/web/view/model/mesh-vpn-fastd.html rename to package/gluon-web-mesh-vpn-fastd/files/lib/gluon/config-mode/view/mesh-vpn-fastd.html diff --git a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/controller/admin/mesh_vpn_fastd.lua b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/controller/admin/mesh_vpn_fastd.lua similarity index 100% rename from package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/controller/admin/mesh_vpn_fastd.lua rename to package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/controller/admin/mesh_vpn_fastd.lua diff --git a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua similarity index 95% rename from package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua rename to package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua index c4fb21de..a41f291e 100644 --- a/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/web/model/admin/mesh_vpn_fastd.lua +++ b/package/gluon-web-mesh-vpn-fastd/luasrc/lib/gluon/config-mode/model/admin/mesh_vpn_fastd.lua @@ -7,7 +7,7 @@ local s = f:section(Section) local mode = s:option(Value, 'mode') mode.package = "gluon-web-mesh-vpn-fastd" -mode.template = "model/mesh-vpn-fastd" +mode.template = "mesh-vpn-fastd" local methods = uci:get('fastd', 'mesh_vpn', 'method') if util.contains(methods, 'null') then diff --git a/package/gluon-web-network/luasrc/lib/gluon/web/controller/admin/network.lua b/package/gluon-web-network/luasrc/lib/gluon/config-mode/controller/admin/network.lua similarity index 100% rename from package/gluon-web-network/luasrc/lib/gluon/web/controller/admin/network.lua rename to package/gluon-web-network/luasrc/lib/gluon/config-mode/controller/admin/network.lua diff --git a/package/gluon-web-network/luasrc/lib/gluon/web/model/admin/network.lua b/package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua similarity index 100% rename from package/gluon-web-network/luasrc/lib/gluon/web/model/admin/network.lua rename to package/gluon-web-network/luasrc/lib/gluon/config-mode/model/admin/network.lua diff --git a/package/gluon-web-node-role/luasrc/lib/gluon/web/controller/admin/noderole.lua b/package/gluon-web-node-role/luasrc/lib/gluon/config-mode/controller/admin/noderole.lua similarity index 100% rename from package/gluon-web-node-role/luasrc/lib/gluon/web/controller/admin/noderole.lua rename to package/gluon-web-node-role/luasrc/lib/gluon/config-mode/controller/admin/noderole.lua diff --git a/package/gluon-web-node-role/luasrc/lib/gluon/web/model/admin/noderole.lua b/package/gluon-web-node-role/luasrc/lib/gluon/config-mode/model/admin/noderole.lua similarity index 100% rename from package/gluon-web-node-role/luasrc/lib/gluon/web/model/admin/noderole.lua rename to package/gluon-web-node-role/luasrc/lib/gluon/config-mode/model/admin/noderole.lua diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/web/controller/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/controller/admin/privatewifi.lua similarity index 100% rename from package/gluon-web-private-wifi/luasrc/lib/gluon/web/controller/admin/privatewifi.lua rename to package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/controller/admin/privatewifi.lua diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/web/model/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua similarity index 100% rename from package/gluon-web-private-wifi/luasrc/lib/gluon/web/model/admin/privatewifi.lua rename to package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua diff --git a/package/gluon-web-wifi-config/luasrc/lib/gluon/web/controller/admin/wifi-config.lua b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/controller/admin/wifi-config.lua similarity index 100% rename from package/gluon-web-wifi-config/luasrc/lib/gluon/web/controller/admin/wifi-config.lua rename to package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/controller/admin/wifi-config.lua diff --git a/package/gluon-web-wifi-config/luasrc/lib/gluon/web/model/admin/wifi-config.lua b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua similarity index 100% rename from package/gluon-web-wifi-config/luasrc/lib/gluon/web/model/admin/wifi-config.lua rename to package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua diff --git a/package/gluon-web/luasrc/lib/gluon/web/www/cgi-bin/gluon b/package/gluon-web/luasrc/lib/gluon/web/www/cgi-bin/gluon deleted file mode 100755 index cceb2a68..00000000 --- a/package/gluon-web/luasrc/lib/gluon/web/www/cgi-bin/gluon +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/lua - -require 'gluon.web.cgi' { - base_path = '/lib/gluon/web', - - layout_package = 'gluon-web-theme', - layout_template = 'theme/layout', -}