summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-06-17 14:20:08 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-06-17 14:20:08 +0000
commit6b5e711614723e54e2b84f62b52601c16b13e136 (patch)
tree19f480bf6bf6b5dc14a4d72531e6510a5d3647dc /modules/admin-full/luasrc/view
parent70e5124557fc642e1e5fec681524f481e64c358a (diff)
modules/admin-full: filter installed packages from installable list
Diffstat (limited to 'modules/admin-full/luasrc/view')
-rw-r--r--modules/admin-full/luasrc/view/admin_system/packages.htm6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/view/admin_system/packages.htm b/modules/admin-full/luasrc/view/admin_system/packages.htm
index 854dedfba4..51c50500a8 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%>
<h2><a id="content" name="content"><%:System%> - <%:Software%></a></h2>
@@ -103,7 +105,7 @@ local free_byte = space_free * fstat.frsize
<th class="cbi-section-table-cell" style="text-align:left"><%:Package name%></th>
<th class="cbi-section-table-cell" style="text-align:left"><%:Version%></th>
</tr>
- <% 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 %>
<tr class="cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>">
<td style="text-align:left; width:10%"><a onclick="return window.confirm('<%:Remove%> &quot;<%=luci.util.pcdata(n)%>&quot; ?')" href="<%=REQUEST_URI%>?submit=1&amp;remove=<%=luci.util.pcdata(n)%>"><%:Remove%></a></td>
<td style="text-align:left"><%=luci.util.pcdata(n)%></td>
@@ -132,7 +134,7 @@ local free_byte = space_free * fstat.frsize
<th class="cbi-section-table-cell" style="text-align:left"><%:Version%></th>
<th class="cbi-section-table-cell" style="text-align:left"><%:Description%></th>
</tr>
- <% 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 %>
<tr class="cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>">
<td style="text-align:left; width:10%"><a onclick="return window.confirm('<%:Install%> &quot;<%=luci.util.pcdata(n)%>&quot; ?')" href="<%=REQUEST_URI%>?submit=1&amp;install=<%=luci.util.pcdata(n)%>"><%:Install%></a></td>
<td style="text-align:left"><%=luci.util.pcdata(n)%></td>