From: Jo-Philipp Wich Date: Fri, 17 Jun 2011 14:20:08 +0000 (+0000) Subject: modules/admin-full: filter installed packages from installable list X-Git-Tag: 0.11.0~2043 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6b5e711614723e54e2b84f62b52601c16b13e136;p=oweals%2Fluci.git modules/admin-full: filter installed packages from installable list --- diff --git a/modules/admin-full/luasrc/view/admin_system/packages.htm b/modules/admin-full/luasrc/view/admin_system/packages.htm index 854dedfba..51c50500a 100644 --- a/modules/admin-full/luasrc/view/admin_system/packages.htm +++ b/modules/admin-full/luasrc/view/admin_system/packages.htm @@ -37,6 +37,8 @@ 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 = { } + -%> <%+header%>

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

@@ -103,7 +105,7 @@ local free_byte = space_free * fstat.frsize <%:Package name%> <%:Version%> - <% local empty = true; luci.model.ipkg.list_installed(query, function(n, v, d) empty = false %> + <% local empty = true; luci.model.ipkg.list_installed(query, function(n, v, d) empty = false; filter[n] = true %> <%:Remove%> <%=luci.util.pcdata(n)%> @@ -132,7 +134,7 @@ local free_byte = space_free * fstat.frsize <%:Version%> <%:Description%> - <% local empty = true; luci.model.ipkg.list_all(query, function(n, v, d) empty = false %> + <% local empty = true; luci.model.ipkg.list_all(query, function(n, v, d) if filter[n] then return end; empty = false %> <%:Install%> <%=luci.util.pcdata(n)%>