From 6245ad6a73090ac3668e8f4b9749614592294a08 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 24 Oct 2011 01:10:34 +0000 Subject: modules/admin-full: rework system menu area --- .../luasrc/view/admin_system/applyreboot.htm | 43 +++++-- .../luasrc/view/admin_system/backupfiles.htm | 19 +++ .../luasrc/view/admin_system/clock_status.htm | 36 ++++++ .../luasrc/view/admin_system/flashops.htm | 94 +++++++++++++++ .../admin-full/luasrc/view/admin_system/ipkg.htm | 7 +- .../luasrc/view/admin_system/packages.htm | 71 +++++++---- .../luasrc/view/admin_system/upgrade.htm | 133 +++++++-------------- 7 files changed, 281 insertions(+), 122 deletions(-) create mode 100644 modules/admin-full/luasrc/view/admin_system/backupfiles.htm create mode 100644 modules/admin-full/luasrc/view/admin_system/clock_status.htm create mode 100644 modules/admin-full/luasrc/view/admin_system/flashops.htm (limited to 'modules/admin-full/luasrc/view/admin_system') diff --git a/modules/admin-full/luasrc/view/admin_system/applyreboot.htm b/modules/admin-full/luasrc/view/admin_system/applyreboot.htm index 8ff7118c7e..4f06b287d2 100644 --- a/modules/admin-full/luasrc/view/admin_system/applyreboot.htm +++ b/modules/admin-full/luasrc/view/admin_system/applyreboot.htm @@ -12,10 +12,39 @@ You may obtain a copy of the License at $Id$ -%> -<%+header%> -

<%:System%>

-
-

<% if msg then %><%=msg%><% else %><%:Changes applied.%><% end %>

-

<%:Please wait: Device rebooting...%>

- -<%+footer%> \ No newline at end of file + + + + <%=luci.sys.hostname()%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %> + + + + + +
+
+

<%:System%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %>

+
+

+ <% if msg then %><%=msg%><% else %><%:Changes applied.%><% end %> +

+

+ <%:Loading%> + <%:Waiting for router...%> +

+
+
+
+ + diff --git a/modules/admin-full/luasrc/view/admin_system/backupfiles.htm b/modules/admin-full/luasrc/view/admin_system/backupfiles.htm new file mode 100644 index 0000000000..38b5f03a14 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/backupfiles.htm @@ -0,0 +1,19 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> + + diff --git a/modules/admin-full/luasrc/view/admin_system/clock_status.htm b/modules/admin-full/luasrc/view/admin_system/clock_status.htm new file mode 100644 index 0000000000..84e151075f --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/clock_status.htm @@ -0,0 +1,36 @@ +<%+cbi/valueheader%> + + + +<%:Collecting data...%> + + +<%+cbi/valuefooter%> diff --git a/modules/admin-full/luasrc/view/admin_system/flashops.htm b/modules/admin-full/luasrc/view/admin_system/flashops.htm new file mode 100644 index 0000000000..628ede7728 --- /dev/null +++ b/modules/admin-full/luasrc/view/admin_system/flashops.htm @@ -0,0 +1,94 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> + +<%+header%> + +

<%:System%> - <%:Flash operations%>

+ + + +
+ +
+ <%:Backup / Restore%> +
+
<%:Click "Generate archive" to download a tar archive of the current configuration files. To reset the firmware to its initial state, click "Perform reset" (only possible with squashfs images).%>
+
+
+ +
+ +
+
+ <% if reset_avail then %> +
+ +
+ +
+
+ <% end %> +
+
+
<%:To restore configuration files, you can upload a previously generated backup archive here.%>
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+ <%:Flash new firmware image%> + <% if upgrade_avail then %> +
+
<%:Upload a sysupgrade-compatible image here to replace the running firmware. Check "Keep settings" to retain the current configuration (requires an OpenWrt compatible firmware image).%>
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ <% if image_invalid then %> +
<%:The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform. %>
+ <% end %> +
+ <% else %> +
<%:Sorry, there is no sysupgrade support present, a new firmware image must be flashed manually. Please refer to the OpenWrt wiki for device specific install instructions.%>
+ <% end %> +
+ +
+ +<%+footer%> diff --git a/modules/admin-full/luasrc/view/admin_system/ipkg.htm b/modules/admin-full/luasrc/view/admin_system/ipkg.htm index c14e4546fc..7f0956cfde 100644 --- a/modules/admin-full/luasrc/view/admin_system/ipkg.htm +++ b/modules/admin-full/luasrc/view/admin_system/ipkg.htm @@ -12,7 +12,8 @@ You may obtain a copy of the License at $Id$ -%> -
    -
  • <%:Package lists%>: src Name URL
  • -
  • <%:Installation targets%>: dest Name Pfad
  • + + diff --git a/modules/admin-full/luasrc/view/admin_system/packages.htm b/modules/admin-full/luasrc/view/admin_system/packages.htm index e78f1c2ca7..aff582e7f9 100644 --- a/modules/admin-full/luasrc/view/admin_system/packages.htm +++ b/modules/admin-full/luasrc/view/admin_system/packages.htm @@ -53,13 +53,55 @@ end
    + + +
    - + + +
    + <% if (install and next(install)) or (remove and next(remove)) or update or upgrade then %> +
    + <% if #stdout > 0 then %>
    <%=pcdata(stdout)%>
    <% end %> + <% if #stderr > 0 then %>
    <%=pcdata(stderr)%>
    <% end %> +
    + <% end %> + + <% if querypat then %> +
    + <%:Displaying only packages containing%> "<%=pcdata(query)%>" + +
    +
    + <% end %> + + <% if no_lists or old_lists then %> +
    + <% if old_lists then %> + <%:Package lists are older than 24 hours%> + <% else %> + <%:No package lists available%> + <% end %> + +
    + <% end %> + +
    + <%:Free space%>: <%=(100-used_perc)%>% (<%=wa.byte_format(free_byte)%>) +
    +
     
    +
    +
    +
    +
    +
    + +
    @@ -71,7 +113,6 @@ end
    -
    @@ -81,31 +122,13 @@ end

    <%:Status%>

    -
    - <%:Free space%>: <%=(100-used_perc)%>% (<%=wa.byte_format(free_byte)%>) -
    -
     
    -
    - - <% if querypat then %> -


    - <%:Displaying only packages containing%> "<%=pcdata(query)%>" - - <% end %> - <% if (install and next(install)) or (remove and next(remove)) or update or upgrade then %> -


    - <% if #stdout > 0 then %>
    <%=pcdata(stdout)%>
    <% end %> - <% if #stderr > 0 then %>
    <%=pcdata(stderr)%>
    <% end %> - <% end %> -
    -
    - + <% if display ~= "available" then %>
    diff --git a/modules/admin-full/luasrc/view/admin_system/upgrade.htm b/modules/admin-full/luasrc/view/admin_system/upgrade.htm index 372fa5971d..950eba8e75 100644 --- a/modules/admin-full/luasrc/view/admin_system/upgrade.htm +++ b/modules/admin-full/luasrc/view/admin_system/upgrade.htm @@ -15,96 +15,53 @@ $Id$ <%+header%> -

    <%:System%>

    -

    <%:Flash Firmware%>

    +

    <%:System%> - <%: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 step == 1 then %> - <% if supported then %> - -

    - <%:Upload an OpenWrt image file to reflash the device.%> - <% if bad_image then %> -

    -

    <%:The uploaded image file does not - contain a supported format. Make sure that you choose the generic - image format for your platform. %>
    - <% end %> -

    -
    - <%:Firmware image%>:
    - - -
    -
    - <% if keepavail then -%> - - <%:Keep configuration files%> - <% end -%> - -
    - -
    - - <% else %> -
    <%_ Sorry. - OpenWrt does not support a system upgrade on this platform.
    - You need to manually flash your device. %>
    + <% if storage > 0 and size > storage then %> +

    +
    <%:It appears that you try to + flash an image that does not fit into the flash memory, please verify + the image file! %>
    <% end %> -<% elseif step == 2 then %> -

    - <%_ 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 flashsize > 0 and filesize > flashsize then %> -

    -

    <%:It appears that you try to - flash an image that does not fit into the flash memory, please verify - the image file! %>
    - <% end %> +

    -
    -
      -
    • <%:Checksum%>: <%=checksum%>
    • -
    • <%:Size%>: <% - local w = require "luci.tools.webadmin" - write(w.byte_format(filesize)) - - if flashsize > 0 then - write(luci.i18n.translatef( - " (%s available)", - w.byte_format(flashsize) - )) - end - %>
    • -
    • <% if keepconfig then %> - <%:Configuration files will be kept.%> - <% else %> - <%:Note: Configuration files will be erased.%> - <% end %>
    • -
    -

    -
    -
    - - " /> - - -
    - - " /> - - -
    -<% elseif step == 3 then %> -

    <%_ The system is flashing now.
    - DO NOT POWER OFF THE DEVICE!
    - Wait a few minutes until you try to reconnect. - It might be necessary to renew the address of your computer to reach the device - again, depending on your settings. %>

    - - -<% end %> -<%+footer%> +
    +
      +
    • <%:Checksum%>: <%=checksum%>
    • +
    • <%:Size%>: <% + local w = require "luci.tools.webadmin" + write(w.byte_format(size)) + + if storage > 0 then + write(luci.i18n.translatef( + " (%s available)", + w.byte_format(storage) + )) + end + %>
    • +
    • <% if keep then %> + <%:Configuration files will be kept.%> + <% else %> + <%:Note: Configuration files will be erased.%> + <% end %>
    • +
    +
    +
    +
    + + " /> + + +
    + + +
    + +<%+footer%> -- cgit v1.2.3