summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2015-09-16 12:47:48 +0300
committerHannu Nyman <hannu.nyman@iki.fi>2015-09-16 12:47:48 +0300
commit3288fe76ab3d2269abcf902d0df6f847c6200e8e (patch)
treed888be73618f08826021fae9ef74786c34535405 /modules/luci-mod-admin-full
parent7347cf00cb3a39e6b33026ad872beee6e3b0c6e7 (diff)
Luci opkg/packages: Show package size in list of available packages
Add package *.ipk size information to package listing in Luci, as opkg was today extended to support listing also the size information. Visible fields are now: name, version, size, description That will help users considering installation of a certain package to assess its size impact on flash. Note: Opkg data includes the size of the .ipk file, not the expanded size. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'modules/luci-mod-admin-full')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm
index 1ceda4785..fe2fe0436 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm
@@ -132,7 +132,7 @@ end
<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(querypat, function(n, v, d) empty = false; filter[n] = true %>
+ <% local empty = true; luci.model.ipkg.list_installed(querypat, function(n, v, s, 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>
@@ -164,13 +164,15 @@ end
<th class="cbi-section-table-cell" style="text-align:left">&#160;</th>
<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>
+ <th class="cbi-section-table-cell" style="text-align:right"><%:Size (.ipk)%></th>
<th class="cbi-section-table-cell" style="text-align:left"><%:Description%></th>
</tr>
- <% local empty = true; opkg_list(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, s, 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>
<td style="text-align:left"><%=luci.util.pcdata(v)%></td>
+ <td style="text-align:right"><%=luci.util.pcdata(s)%></td>
<td style="text-align:left"><%=luci.util.pcdata(d)%></td>
</tr>
<% end) %>
@@ -179,6 +181,7 @@ end
<td style="text-align:left">&#160;</td>
<td style="text-align:left"><em><%:none%></em></td>
<td style="text-align:left"><em><%:none%></em></td>
+ <td style="text-align:right"><em><%:none%></em></td>
<td style="text-align:left"><em><%:none%></em></td>
</tr>
<% end %>