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:
parent
3925344292
commit
b1aa5390a7
@ -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
|
||||
|
@ -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>
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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',
|
||||
}
|
@ -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))
|
@ -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!
|
@ -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
|
@ -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',
|
||||
}
|
Loading…
Reference in New Issue
Block a user