X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fadmin-full%2Fluasrc%2Fview%2Fadmin_system%2Fpackages.htm;h=b4ece0532170ea87d0e9fe5e1c6a8eefc0f0e336;hp=2794fd824d9bc642ade57eeb8a960c8675ffa3b3;hb=7c765875884d6866c53b63757731b079bace2e9b;hpb=a8c64ef3b09e8d64ae1c0497b9b852a0d98fdf64 diff --git a/modules/admin-full/luasrc/view/admin_system/packages.htm b/modules/admin-full/luasrc/view/admin_system/packages.htm index 2794fd824..b4ece0532 100644 --- a/modules/admin-full/luasrc/view/admin_system/packages.htm +++ b/modules/admin-full/luasrc/view/admin_system/packages.htm @@ -13,31 +13,41 @@ $Id$ -%> <%- +local bit = require "bit" local rowcnt = 1 + function rowstyle() rowcnt = rowcnt + 1 return (rowcnt % 2) + 1 end + +function opkg_error(code) + code = bit.rshift(tonumber(code), 8) + return translate( + 'a_s_packages_code%i' % code, + '%s %i' % { translate('Code'), code } + ) +end -%> <%+header%> -

<%:system%>

-

<%:a_s_packages%>

+

<%:System%>

+

<%:Software%>


<% if install or remove or update or upgrade then %> -
<%:status%>:
+
<%:Status%>:
<% if update then %> - <%:a_s_packages_update%>: <% if update == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=update%>)<% end %>
+ <%:Package lists updated%>: <% if update == 0 then %><%:OK%><% else %><%:Error%> (<%=opkg_error(update)%>)<% end %>
<% end %> <% if upgrade then%> - <%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=upgrade%>)<% end %>
+ <%:Upgrade installed packages%>: <% if upgrade == 0 then %><%:OK%><% else %><%:Error%> (<%=opkg_error(upgrade)%>)<% end %>
<% end %> <% if install then for k,v in pairs(install) do %> - <%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=v%>)<% end %>
+ <%:Install%> '<%=k%>': <% if v == 0 then %><%:OK%><% else %><%:Error%> (<%=opkg_error(v)%>)<% end %>
<% end end %> <% if remove then for k,v in pairs(remove) do %> - <%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=v%>)<% end %>
+ <%:Remove%> '<%=k%>': <% if v == 0 then %><%:OK%><% else %><%:Error%> (<%=opkg_error(v)%>)<% end %>
<% end end %>

@@ -47,42 +57,41 @@ end

- +
- +
- +
- +
- - - - - + + + + + <% for k, pkg in pairs(pkgs) do %> - + <% end %> @@ -91,7 +100,7 @@ end
- +
<%:a_s_packages_name%><%:version%><%:install%><%:delete%><%:descr%><%:Package name%><%:Version%><%:Install%><%:Delete%><%:Description%>
<%=luci.util.pcdata(pkg.Package)%> <%=luci.util.pcdata(pkg.Version)%> <% if not pkg.Status or not pkg.Status.installed then %><% else %><%:installed%><% end %><% if pkg.Status and pkg.Status.installed then %><% else %><%:notinstalled%><% end %><% if pkg.Status and pkg.Status.installed then %><% else %><%:not installed%><% end %> <%=luci.util.pcdata(pkg.Description)%>