From 1bb4822dca6113f73e3bc89e2acf15935e6f8e92 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 3 Dec 2014 15:17:05 +0100 Subject: Rework LuCI build system * Rename subdirectories to their repective OpenWrt package names * Make each LuCI module its own standalone package * Deploy a shared luci.mk which is used by each module Makefile Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/mini/applyreboot.htm | 21 +++++ .../luasrc/view/mini/backup.htm | 40 ++++++++ .../luci-mod-admin-mini/luasrc/view/mini/index.htm | 21 +++++ .../luasrc/view/mini/reboot.htm | 33 +++++++ .../luasrc/view/mini/upgrade.htm | 105 +++++++++++++++++++++ 5 files changed, 220 insertions(+) create mode 100644 modules/luci-mod-admin-mini/luasrc/view/mini/applyreboot.htm create mode 100644 modules/luci-mod-admin-mini/luasrc/view/mini/backup.htm create mode 100644 modules/luci-mod-admin-mini/luasrc/view/mini/index.htm create mode 100644 modules/luci-mod-admin-mini/luasrc/view/mini/reboot.htm create mode 100644 modules/luci-mod-admin-mini/luasrc/view/mini/upgrade.htm (limited to 'modules/luci-mod-admin-mini/luasrc/view') diff --git a/modules/luci-mod-admin-mini/luasrc/view/mini/applyreboot.htm b/modules/luci-mod-admin-mini/luasrc/view/mini/applyreboot.htm new file mode 100644 index 0000000000..8ff7118c7e --- /dev/null +++ b/modules/luci-mod-admin-mini/luasrc/view/mini/applyreboot.htm @@ -0,0 +1,21 @@ +<%# +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%>

+
+

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

+

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

+ +<%+footer%> \ No newline at end of file diff --git a/modules/luci-mod-admin-mini/luasrc/view/mini/backup.htm b/modules/luci-mod-admin-mini/luasrc/view/mini/backup.htm new file mode 100644 index 0000000000..eb9dc46e47 --- /dev/null +++ b/modules/luci-mod-admin-mini/luasrc/view/mini/backup.htm @@ -0,0 +1,40 @@ +<%# +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%>

+

<%:Backup / Restore%>

+

<%:Here you can backup and restore your configuration and - if possible - reset this device to the default settings.%>

+
+
+ +
+ +
+ +
+
<%:Backup Archive%>:
+
+ +
+
+ +
+
+<%+footer%> diff --git a/modules/luci-mod-admin-mini/luasrc/view/mini/index.htm b/modules/luci-mod-admin-mini/luasrc/view/mini/index.htm new file mode 100644 index 0000000000..c14d3b0b23 --- /dev/null +++ b/modules/luci-mod-admin-mini/luasrc/view/mini/index.htm @@ -0,0 +1,21 @@ +<%# +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$ + +-%> +

<%:Hello!%>

+

<%_This is the administration area of LuCI.%>

+

<%_LuCI is a free, flexible, and user friendly graphical interface for configuring OpenWrt.%>
+<%:On the following pages you can adjust all important settings of this device.%>

+

<%:As we always want to improve this interface we are looking forward to your feedback and suggestions.%>

+

<%:And now have fun with your OpenWrt device!%>

+

<%_The LuCI Team%>

diff --git a/modules/luci-mod-admin-mini/luasrc/view/mini/reboot.htm b/modules/luci-mod-admin-mini/luasrc/view/mini/reboot.htm new file mode 100644 index 0000000000..9e57d89f9f --- /dev/null +++ b/modules/luci-mod-admin-mini/luasrc/view/mini/reboot.htm @@ -0,0 +1,33 @@ +<%# +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%>

+

<%: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 be lost while rebooting!%>

+<%- +end +if not reboot then +-%> +

<%:Perform reboot%>

+<%- else -%> +

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

+ +<%- end -%> +<%+footer%> \ No newline at end of file diff --git a/modules/luci-mod-admin-mini/luasrc/view/mini/upgrade.htm b/modules/luci-mod-admin-mini/luasrc/view/mini/upgrade.htm new file mode 100644 index 0000000000..6ff5d84919 --- /dev/null +++ b/modules/luci-mod-admin-mini/luasrc/view/mini/upgrade.htm @@ -0,0 +1,105 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008-2009 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 Firmware%>

+ +<% 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. %>
+ <% 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 are trying 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 + %>
  • +
+

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

<%_ The system is flashing 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. %>

+ + +<% end %> +<%+footer%> + -- cgit v1.2.3