From: Jo-Philipp Wich Date: Mon, 7 Oct 2019 09:41:42 +0000 (+0200) Subject: luci-app-advanced-reboot: import applyreboot template from luci-mod-system X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=90c52a1782ae7727c0a430dcec64d9c1b072e452;p=project%2Fluci.git luci-app-advanced-reboot: import applyreboot template from luci-mod-system Since the advanced-reboot app is the sole remaining user of the applyreboot template, import it into this package to avoid the need for shipping it with the default installation. Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua index 7332424866..6b8cba4c40 100644 --- a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua +++ b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua @@ -89,7 +89,7 @@ end function action_reboot() local uci = require "luci.model.uci".cursor() local ip = uci:get("network", "lan", "ipaddr") - luci.template.render("admin_system/applyreboot", { + luci.template.render("advanced_reboot/applyreboot", { title = luci.i18n.translate("Rebooting..."), msg = luci.i18n.translate("The system is rebooting now.
DO NOT POWER OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."), addr = luci.ip.new(type(ip) == "string" and ip or "192.168.1.1") or "192.168.1.1" @@ -161,7 +161,7 @@ function action_altreboot() end end if not errorMessage then - luci.template.render("admin_system/applyreboot", { + luci.template.render("advanced_reboot/applyreboot", { title = luci.i18n.translate("Rebooting..."), msg = luci.i18n.translate("The system is rebooting to an alternative partition now.
DO NOT POWER OFF THE DEVICE!
Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."), addr = luci.ip.new(uci:get("network", "lan", "ipaddr")) or "192.168.1.1" @@ -195,7 +195,7 @@ function action_poweroff() luci.template.render("advanced_reboot/advanced_reboot",{}) end elseif step == 2 then - luci.template.render("admin_system/applyreboot", { + luci.template.render("advanced_reboot/applyreboot", { title = luci.i18n.translate("Shutting down..."), msg = luci.i18n.translate("The system is shutting down now.
DO NOT POWER OFF THE DEVICE!
It might be necessary to renew the address of your computer to reach the device again, depending on your settings."), addr = luci.ip.new(uci:get("network", "lan", "ipaddr")) or "192.168.1.1" diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm new file mode 100644 index 0000000000..e235bd4679 --- /dev/null +++ b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm @@ -0,0 +1,53 @@ +<%# + Copyright 2008 Steven Barth + Copyright 2008 Jo-Philipp Wich + Licensed to the public under the Apache License 2.0. +-%> + + + + <%=luci.sys.hostname()%> - <%= title or translate("Rebooting...") %> + + + + + +
+
+
+

<%=luci.sys.hostname() or "?"%>

+
+
+
+   +
+
+
+

<%:System%> - <%= title or translate("Rebooting...") %>

+
+
+ <%= msg or translate("Changes applied.") %> +
+
+ <%:Loading%> + <%:Waiting for changes to be applied...%> +
+
+
+
+
+ + \ No newline at end of file diff --git a/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm b/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm deleted file mode 100644 index e235bd4679..0000000000 --- a/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm +++ /dev/null @@ -1,53 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Licensed to the public under the Apache License 2.0. --%> - - - - <%=luci.sys.hostname()%> - <%= title or translate("Rebooting...") %> - - - - - -
-
-
-

<%=luci.sys.hostname() or "?"%>

-
-
-
-   -
-
-
-

<%:System%> - <%= title or translate("Rebooting...") %>

-
-
- <%= msg or translate("Changes applied.") %> -
-
- <%:Loading%> - <%:Waiting for changes to be applied...%> -
-
-
-
-
- - \ No newline at end of file