gluon-config-mode-core: move gluon-web base path to /lib/gluon/config-mode

- CGI script and index.html are moved from gluon-web to
  gluon-config-mode-core, the script is renamed to 'config'
- gluon-web and gluon-web-model base views and i18n files are symlinked
  into the new path
- gluon-web-theme is renamed to gluon-config-mode-theme and installs
  directly into the new path
- all gluon-web-* models, controllers and views are moved into the new
  path
This commit is contained in:
Matthias Schiffer 2018-02-25 23:17:22 +01:00
parent 3925344292
commit b1aa5390a7
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
38 changed files with 23 additions and 23 deletions

View File

@ -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

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="0; URL=/cgi-bin/gluon" />
<meta http-equiv="refresh" content="0; URL=/cgi-bin/config" />
</head>
<body>
</body>

View File

@ -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
}

View File

@ -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

View File

@ -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',
}

View File

@ -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))

View File

@ -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!

View File

@ -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

View File

@ -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',
}