X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_system%2Fpackages.htm;h=00b4be4868afc3cb354ca56992266a8e7f47e77c;hp=e78f1c2ca7200df8e09e02bb45a5144d7f7a191f;hb=74a140e4b4d99fd15239bb0152bdfa0c8a6dccea;hpb=64bc95cb473e348c15add5bd6a36b2be087c2a56 diff --git a/modules/admin-full/luasrc/view/admin_system/packages.htm b/modules/admin-full/luasrc/view/admin_system/packages.htm index e78f1c2ca..00b4be486 100644 --- a/modules/admin-full/luasrc/view/admin_system/packages.htm +++ b/modules/admin-full/luasrc/view/admin_system/packages.htm @@ -9,8 +9,6 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -$Id$ - -%> <%- local bit = require "bit" @@ -35,31 +33,77 @@ 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 + querypat = '*%s*' % query + opkg_list = luci.model.ipkg.find end local letterpat if letter == 35 then - letterpat = "[^a-zA-Z]*" + letterpat = "[^a-z]*" else - letterpat = string.char(91, letter, letter + 32, 93, 42) -- '[' 'A' 'a' ']' '*' + letterpat = string.char(letter, 42) -- 'A' '*' end -%> + <%+header%> -

<%:System%> - <%:Software%>

+ +

<%: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)%>) +
+
 
+
+
+
+
+
+ +
@@ -71,7 +115,6 @@ end
-
@@ -81,31 +124,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 %>
@@ -148,7 +173,7 @@ end - <% local empty = true; luci.model.ipkg.list_all(querypat or letterpat, function(n, v, d) if filter[n] then return end; empty = false %> + <% local empty = true; opkg_list(querypat or letterpat, function(n, v, d) if filter[n] then return end; empty = false %>
<%:Version%> <%:Description%>
<%:Install%> <%=luci.util.pcdata(n)%>