From 58d97b5e271bc0d7507eab5b9bd2902181864e02 Mon Sep 17 00:00:00 2001
From: "Daniel F. Dickinson"
Date: Fri, 3 Aug 2018 12:36:51 -0400
Subject: modules: Split luci-mod-full
Move some common elements to luci-base, and otherwise make three
packages out of status, system, and network. They were mostly
separated already, but there were some shared elements between
status and network that are now in luci-base.
Signed-off-by: Daniel F. Dickinson
---
.../luasrc/view/admin_system/applyreboot.htm | 53 +++++
.../luasrc/view/admin_system/backupfiles.htm | 10 +
.../luasrc/view/admin_system/clock_status.htm | 36 ++++
.../luasrc/view/admin_system/flashops.htm | 137 +++++++++++++
.../luasrc/view/admin_system/ipkg.htm | 10 +
.../luasrc/view/admin_system/packages.htm | 213 +++++++++++++++++++++
.../luasrc/view/admin_system/reboot.htm | 62 ++++++
.../luasrc/view/admin_system/upgrade.htm | 65 +++++++
8 files changed, 586 insertions(+)
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/flashops.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/packages.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/reboot.htm
create mode 100644 modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm
(limited to 'modules/luci-mod-system/luasrc/view')
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm b/modules/luci-mod-system/luasrc/view/admin_system/applyreboot.htm
new file mode 100644
index 000000000..e235bd467
--- /dev/null
+++ b/modules/luci-mod-system/luasrc/view/admin_system/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.") %>
+
+
+
+ <%:Waiting for changes to be applied...%>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm b/modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm
new file mode 100644
index 000000000..c1f3361ae
--- /dev/null
+++ b/modules/luci-mod-system/luasrc/view/admin_system/backupfiles.htm
@@ -0,0 +1,10 @@
+<%#
+ Copyright 2008 Steven Barth
+ Copyright 2008 Jo-Philipp Wich
+ Licensed to the public under the Apache License 2.0.
+-%>
+
+
<%:Click "Generate archive" to download a tar archive of the current configuration files.%>
+
+
+
+
+
<%:Restore%>
+
<%:To restore configuration files, you can upload a previously generated backup archive here. To reset the firmware to its initial state, click "Perform reset" (only possible with squashfs images).%>
+
+ <% if reset_avail then %>
+
+ <% end %>
+
+ <% if backup_invalid then %>
+
<%:The backup archive does not appear to be a valid gzip file.%>
+ <% end %>
+
+
+ <% local mtds = require("luci.sys").mtds(); if #mtds > 0 then -%>
+
<%:Save mtdblock contents%>
+
<%:Click "Save mtdblock" to download specified mtdblock file. (NOTE: THIS FEATURE IS FOR PROFESSIONALS! )%>
+
+
+
+ <% end %>
+
+
+
+
+
<%:Flash new firmware image%>
+ <% if upgrade_avail then %>
+
+ <% else %>
+
<%:Sorry, there is no sysupgrade support present; a new firmware image must be flashed manually. Please refer to the wiki for device specific install instructions.%>
+ <% end %>
+
+
+<%+footer%>
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm b/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm
new file mode 100644
index 000000000..a7ff4e50b
--- /dev/null
+++ b/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm
@@ -0,0 +1,10 @@
+<%#
+ Copyright 2008 Steven Barth
+ Copyright 2008 Jo-Philipp Wich
+ Licensed to the public under the Apache License 2.0.
+-%>
+
+
+ <% local empty = true; opkg_list(querypat or letterpat, function(n, v, s, d) if filter[n] then return end; empty = false %>
+
+
<%=luci.util.pcdata(n)%>
+
<%=luci.util.pcdata(v)%>
+
<%=luci.util.pcdata(s)%>
+
<%=luci.util.pcdata(d)%>
+
+
+
+
+ <% end) %>
+ <% if empty then %>
+
+
+
<%:none%>
+
<%:none%>
+
<%:none%>
+
<%:none%>
+
+ <% end %>
+
+
+
+ <% end %>
+
+
+<%+footer%>
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/reboot.htm b/modules/luci-mod-system/luasrc/view/admin_system/reboot.htm
new file mode 100644
index 000000000..d23664ada
--- /dev/null
+++ b/modules/luci-mod-system/luasrc/view/admin_system/reboot.htm
@@ -0,0 +1,62 @@
+<%#
+ Copyright 2008 Steven Barth
+ Copyright 2008-2015 Jo-Philipp Wich
+ Licensed to the public under the Apache License 2.0.
+-%>
+
+<%+header%>
+
+
<%:Reboot%>
+
+
<%:Reboots the operating system of your device%>
+
+<%- local c = require("luci.model.uci").cursor():changes(); if c and next(c) then -%>
+
<%:Warning: There are unsaved changes that will get lost on reboot!%>
+<%- end -%>
+
+
+
+
+
+
+
+ <%:Device is rebooting...%>
+
+
+
+
+<%+footer%>
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm b/modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm
new file mode 100644
index 000000000..597ddfd6b
--- /dev/null
+++ b/modules/luci-mod-system/luasrc/view/admin_system/upgrade.htm
@@ -0,0 +1,65 @@
+<%#
+ Copyright 2008 Steven Barth
+ Copyright 2008-2009 Jo-Philipp Wich
+ Licensed to the public under the Apache License 2.0.
+-%>
+
+<%+header%>
+
+
<%:Flash Firmware%> - <%:Verify%>
+
+ <%_ The flash image was uploaded.
+ Below is the checksum and file size listed,
+ compare them with the original file to ensure data integrity.
+ Click "Proceed" below to start the flash procedure. %>
+
+ <% if storage > 0 and size > storage then %>
+
+
<%:It appears that you are trying to
+ flash an image that does not fit into the flash memory, please verify
+ the image file! %>