diff options
Diffstat (limited to 'applications/luci-app-advanced-reboot')
8 files changed, 166 insertions, 5 deletions
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.<br /> DO NOT POWER OFF THE DEVICE!<br /> 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.<br /> DO NOT POWER OFF THE DEVICE!<br /> 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.<br /> DO NOT POWER OFF THE DEVICE!<br /> 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 <steven@midlink.org> + Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> + Licensed to the public under the Apache License 2.0. +-%> + +<html> + <head> + <title><%=luci.sys.hostname()%> - <%= title or translate("Rebooting...") %></title> + <link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" /> + <script type="text/javascript" src="<%=resource%>/xhr.js"></script> + <script type="text/javascript">//<![CDATA[ + var interval = window.setInterval(function() { + var img = new Image(); + var target = ('https:' == document.location.protocol ? 'https://' : 'http://') + <%=addr and "'%s'" % addr or "window.location.host"%>; + + img.onload = function() { + window.clearInterval(interval); + window.location.replace(target); + }; + + img.src = target + '<%=resource%>/icons/loading.gif?' + Math.random(); + + }, 5000); + //]]></script> + </head> + <body> + <header> + <div class="fill"> + <div class="container"> + <p class="brand"><%=luci.sys.hostname() or "?"%></p> + </div> + </div> + </header> +   + <div class="main"> + <div id="maincontainer"> + <div id="maincontent" class="container"> + <h2 name="content" id="applyreboot-container" ><%:System%> - <%= title or translate("Rebooting...") %></h2> + <div class="cbi-section" id="applyreboot-section"> + <div> + <%= msg or translate("Changes applied.") %> + </div> + <div> + <img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> + <%:Waiting for changes to be applied...%> + </div> + </div> + </div> + </div> + </div> + </body> +</html>
\ No newline at end of file diff --git a/applications/luci-app-advanced-reboot/po/es/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/es/advanced-reboot.po index 582848fa59..eced5317f4 100644 --- a/applications/luci-app-advanced-reboot/po/es/advanced-reboot.po +++ b/applications/luci-app-advanced-reboot/po/es/advanced-reboot.po @@ -3,11 +3,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2019-09-17 22:29-0300\n" +"PO-Revision-Date: 2019-10-08 15:37-0300\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 2.2.4\n" "Last-Translator: Franco Castillo <castillofrancodamian@gmail.com>\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Language: es\n" @@ -31,6 +31,10 @@ msgstr "Alternativo" msgid "Cancel" msgstr "Cancelar" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:42 +msgid "Changes applied." +msgstr "Cambios aplicados." + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm:10 #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm:10 msgid "Confirm" @@ -49,6 +53,10 @@ msgstr "ERROR:" msgid "Firmware/OS (Kernel)" msgstr "Firmware" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:45 +msgid "Loading" +msgstr "Cargando" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:114 msgid "No access to fw_printenv or fw_printenv!" msgstr "Sin acceso a fw_printenv o fw_printenv!" @@ -90,6 +98,8 @@ msgstr "Reiniciar a la partición actual" #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:93 #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:165 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:9 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 msgid "Rebooting..." msgstr "Reiniciando..." @@ -101,6 +111,10 @@ msgstr "Apagando..." msgid "Status" msgstr "Estado" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 +msgid "System" +msgstr "Sistema" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:94 msgid "" "The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a " @@ -196,6 +210,10 @@ msgstr "" "es compatible con el apagado.<br /><br /> Haga clic en \"Continuar\" a " "continuación para apagar su dispositivo." +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:46 +msgid "Waiting for changes to be applied..." +msgstr "Esperando a que se apliquen los cambios..." + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm:83 msgid "Warning: Device (%s) is unknown or isn't a dual-partition device!" msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po index 5d66917ed1..7cd54f7c04 100644 --- a/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po +++ b/applications/luci-app-advanced-reboot/po/ru/advanced-reboot.po @@ -32,6 +32,10 @@ msgstr "Альтернатива" msgid "Cancel" msgstr "Отменить" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:42 +msgid "Changes applied." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm:10 #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm:10 msgid "Confirm" @@ -50,6 +54,10 @@ msgstr "ОШИБКА:" msgid "Firmware/OS (Kernel)" msgstr "Прошивка/ОС (Ядро)" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:45 +msgid "Loading" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:114 msgid "No access to fw_printenv or fw_printenv!" msgstr "Нет доступа к fw_printenv или fw_printenv!" @@ -91,6 +99,8 @@ msgstr "Перезагрузка к текущему разделу" #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:93 #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:165 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:9 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 msgid "Rebooting..." msgstr "Перезагрузка..." @@ -102,6 +112,10 @@ msgstr "Отключается..." msgid "Status" msgstr "Состояние" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 +msgid "System" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:94 msgid "" "The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a " @@ -193,6 +207,10 @@ msgstr "" "которое не поддерживает выключение питания.<br /><br /> Нажмите \"Продолжить" "\" ниже, чтобы выключить устройство." +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:46 +msgid "Waiting for changes to be applied..." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm:83 msgid "Warning: Device (%s) is unknown or isn't a dual-partition device!" msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po index a793c24e99..394ceae96f 100644 --- a/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po +++ b/applications/luci-app-advanced-reboot/po/sv/advanced-reboot.po @@ -20,6 +20,10 @@ msgstr "Alternativ" msgid "Cancel" msgstr "Avbryt" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:42 +msgid "Changes applied." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm:10 #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm:10 msgid "Confirm" @@ -38,6 +42,10 @@ msgstr "" msgid "Firmware/OS (Kernel)" msgstr "Inre mjukvara/OS (Kärna)" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:45 +msgid "Loading" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:114 msgid "No access to fw_printenv or fw_printenv!" msgstr "" @@ -79,6 +87,8 @@ msgstr "Starta om till nuvarande partition" #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:93 #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:165 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:9 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 msgid "Rebooting..." msgstr "Startar om..." @@ -90,6 +100,10 @@ msgstr "Stänger av..." msgid "Status" msgstr "Status" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 +msgid "System" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:94 msgid "" "The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a " @@ -164,6 +178,10 @@ msgstr "" "stöd för avstängning.<br /><br /> Klicka på \"Fortsätt\" nedanför för att " "stänga av din enhet." +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:46 +msgid "Waiting for changes to be applied..." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm:83 msgid "Warning: Device (%s) is unknown or isn't a dual-partition device!" msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot b/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot index ab1ef12ff2..4766f802c0 100644 --- a/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot +++ b/applications/luci-app-advanced-reboot/po/templates/advanced-reboot.pot @@ -20,6 +20,10 @@ msgstr "" msgid "Cancel" msgstr "" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:42 +msgid "Changes applied." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm:10 #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm:10 msgid "Confirm" @@ -38,6 +42,10 @@ msgstr "" msgid "Firmware/OS (Kernel)" msgstr "" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:45 +msgid "Loading" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:114 msgid "No access to fw_printenv or fw_printenv!" msgstr "" @@ -79,6 +87,8 @@ msgstr "" #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:93 #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:165 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:9 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 msgid "Rebooting..." msgstr "" @@ -90,6 +100,10 @@ msgstr "" msgid "Status" msgstr "" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 +msgid "System" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:94 msgid "" "The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a " @@ -158,6 +172,10 @@ msgid "" "device." msgstr "" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:46 +msgid "Waiting for changes to be applied..." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm:83 msgid "Warning: Device (%s) is unknown or isn't a dual-partition device!" msgstr "" diff --git a/applications/luci-app-advanced-reboot/po/zh-cn/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/zh-cn/advanced-reboot.po index a9a20e4937..909e5607cd 100644 --- a/applications/luci-app-advanced-reboot/po/zh-cn/advanced-reboot.po +++ b/applications/luci-app-advanced-reboot/po/zh-cn/advanced-reboot.po @@ -30,6 +30,10 @@ msgstr "备用" msgid "Cancel" msgstr "取消" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:42 +msgid "Changes applied." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm:10 #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm:10 msgid "Confirm" @@ -48,6 +52,10 @@ msgstr "错误:" msgid "Firmware/OS (Kernel)" msgstr "固件/OS(内核)" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:45 +msgid "Loading" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:114 msgid "No access to fw_printenv or fw_printenv!" msgstr "无法访问 fw_printenv 或 fw_printenv!" @@ -89,6 +97,8 @@ msgstr "重启到当前分区" #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:93 #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:165 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:9 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 msgid "Rebooting..." msgstr "正在重启…" @@ -100,6 +110,10 @@ msgstr "正在关机…" msgid "Status" msgstr "状态" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 +msgid "System" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:94 msgid "" "The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a " @@ -181,6 +195,10 @@ msgstr "" "警告:对于不支持关机的设备,关机可能会导致重新启动。<br /><br />点击下方“继" "续”,使设备关机。" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:46 +msgid "Waiting for changes to be applied..." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm:83 msgid "Warning: Device (%s) is unknown or isn't a dual-partition device!" msgstr "警告:设备(%s)未知或不是双分区设备!" diff --git a/applications/luci-app-advanced-reboot/po/zh-tw/advanced-reboot.po b/applications/luci-app-advanced-reboot/po/zh-tw/advanced-reboot.po index 0ddcec8fd2..b81dfb0903 100644 --- a/applications/luci-app-advanced-reboot/po/zh-tw/advanced-reboot.po +++ b/applications/luci-app-advanced-reboot/po/zh-tw/advanced-reboot.po @@ -30,6 +30,10 @@ msgstr "備用" msgid "Cancel" msgstr "取消" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:42 +msgid "Changes applied." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/alternative_reboot.htm:10 #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/power_off.htm:10 msgid "Confirm" @@ -48,6 +52,10 @@ msgstr "錯誤:" msgid "Firmware/OS (Kernel)" msgstr "韌體/OS(核心)" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:45 +msgid "Loading" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:114 msgid "No access to fw_printenv or fw_printenv!" msgstr "無法訪問 fw_printenv 或 fw_printenv!" @@ -89,6 +97,8 @@ msgstr "重啟到當前分割槽" #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:93 #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:165 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:9 +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 msgid "Rebooting..." msgstr "正在重啟…" @@ -100,6 +110,10 @@ msgstr "正在關機…" msgid "Status" msgstr "狀態" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:39 +msgid "System" +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua:94 msgid "" "The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a " @@ -182,6 +196,10 @@ msgstr "" "警告:對於不支援關機的裝置,關機可能會導致重新啟動。<br /><br />點選下方“繼" "續”,使裝置關機。" +#: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/applyreboot.htm:46 +msgid "Waiting for changes to be applied..." +msgstr "" + #: applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm:83 msgid "Warning: Device (%s) is unknown or isn't a dual-partition device!" msgstr "警告:裝置(%s)未知或不是雙分割槽裝置!" |