From 391e82d6a3f62ac721aa385e58f90b9ac803874e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 14 Nov 2018 14:07:41 +0100 Subject: luci-mod-system: replace builtin opkg support with luci-app-opkg Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/admin_system/ipkg.htm | 10 - .../luasrc/view/admin_system/packages.htm | 213 --------------------- 2 files changed, 223 deletions(-) delete mode 100644 modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm delete mode 100644 modules/luci-mod-system/luasrc/view/admin_system/packages.htm (limited to 'modules/luci-mod-system/luasrc/view') diff --git a/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm b/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm deleted file mode 100644 index a7ff4e50bd..0000000000 --- a/modules/luci-mod-system/luasrc/view/admin_system/ipkg.htm +++ /dev/null @@ -1,10 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - Licensed to the public under the Apache License 2.0. --%> - - diff --git a/modules/luci-mod-system/luasrc/view/admin_system/packages.htm b/modules/luci-mod-system/luasrc/view/admin_system/packages.htm deleted file mode 100644 index 9e364d69ae..0000000000 --- a/modules/luci-mod-system/luasrc/view/admin_system/packages.htm +++ /dev/null @@ -1,213 +0,0 @@ -<%# - Copyright 2008 Steven Barth - Copyright 2008-2010 Jo-Philipp Wich - Licensed to the public under the Apache License 2.0. --%> - -<%- -local opkg = require "luci.model.ipkg" -local fs = require "nixio.fs" -local wa = require "luci.tools.webadmin" -local rowcnt = 1 - -function rowstyle() - rowcnt = rowcnt + 1 - return (rowcnt % 2) + 1 -end - -local fstat = fs.statvfs(opkg.overlay_root()) -local space_total = fstat and fstat.blocks or 0 -local space_free = fstat and fstat.bfree or 0 -local space_used = space_total - space_free - -local used_perc = math.floor(0.5 + ((space_total > 0) and ((100 / space_total) * space_used) or 100)) -local free_byte = space_free * fstat.frsize - -local filter = { } - - -local opkg_list = luci.model.ipkg.list_all -local querypat -if query and #query > 0 then - querypat = '*%s*' % query - opkg_list = luci.model.ipkg.find -end - -local letterpat -if letter == 35 then - letterpat = "[^a-z]*" -else - letterpat = string.char(letter, 42) -- 'A' '*' -end - --%> - -<%+header%> - - -

<%:Software%>

- -
- - - -
- - - -
-
- <% 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)%>) -
-
 
-
-
-
- -
- -
- - -
- -
- disabled="disabled" placeholder="<%:Please update package lists first%>"<% end %> value="" /> - disabled="disabled"<% end %> value="<%:OK%>" /> -
-
- -
- -
- disabled="disabled" placeholder="<%:Please update package lists first%>"<% else %>value="<%=pcdata(query)%>"<% end %> /> - disabled="disabled"<% end %> value="<%:Find package%>" /> -
-
-
-
-
- - -

<%:Status%>

- - - - - <% if display ~= "available" then %> -
-
-
-
-
<%:Package name%>
-
<%:Version%>
-
 
-
- <% local empty = true; luci.model.ipkg.list_installed(querypat, function(n, v, s, d) empty = false; filter[n] = true %> -
-
<%=luci.util.pcdata(n)%>
-
<%=luci.util.pcdata(v)%>
-
-
- - - - -
-
-
- <% end) %> - <% if empty then %> -
-
 
-
<%:none%>
-
<%:none%>
-
- <% end %> -
-
-
- <% else %> -
- <% if not querypat then %> - - <% end %> -
-
-
-
<%:Package name%>
-
<%:Version%>
-
<%:Size (.ipk)%>
-
<%:Description%>
-
 
-
- <% 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%> -- cgit v1.2.3