diff --git a/luci-base/htdocs/luci-static/resources/tools/github.js b/luci-base/htdocs/luci-static/resources/tools/github.js new file mode 100644 index 00000000..490b62c2 --- /dev/null +++ b/luci-base/htdocs/luci-static/resources/tools/github.js @@ -0,0 +1,51 @@ +'use strict'; + +return L.Class.extend({ + desc: function(description, username, project) { + var luci_project = 'luci-app-' + project; + var title = _('if you have any problem, please click to view the project on GitHub : ') + project; + var luci_title = _('if you have any problem, please click to view the luci ui project on GitHub : ') + luci_project; + var package_label = 'package-' + project.replace(/-/g, '_') + '-default'; + var luci_label = 'luci-' + project.replace(/-/g, '_') + '-default'; + + return "" + + "" + + "" + + "" + + "" + + "
" + _(description) + "" + + "" + + "" + + "" + + "" + + "
" + + "" + + "" + project + "" + + "" + project + "" + + "" + + "" + + "" + luci_project + "" + + "" + luci_project + "" + + "" + + "
" + + "
"; + }, + + luci_desc: function(description, username, project) { + var luci_label = 'luci-' + project.replace(/-/g, '_') + '-default'; + project = 'luci-app-' + project; + var luci_title = _('if you have any problem, please click to view the luci ui project on GitHub : ') + project; + + return "" + + "" + + "" + + "" + + "" + + "
" + _(description) + "" + + "" + + "" + project + "" + + "" + project + "" + + "" + + "
"; + } +}); \ No newline at end of file diff --git a/luci-mod-status/Makefile b/luci-mod-status/Makefile index f0de8021..34ca5e2d 100644 --- a/luci-mod-status/Makefile +++ b/luci-mod-status/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Status Pages LUCI_DEPENDS:=+luci-base +libiwinfo +rpcd-mod-iwinfo -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DEPENDS:=iwinfo PKG_LICENSE:=Apache-2.0 diff --git a/luci-mod-status/htdocs/luci-static/resources/view/status/include/19_cpu.js b/luci-mod-status/htdocs/luci-static/resources/view/status/include/19_cpu.js new file mode 100644 index 00000000..1f036c22 --- /dev/null +++ b/luci-mod-status/htdocs/luci-static/resources/view/status/include/19_cpu.js @@ -0,0 +1,45 @@ +'use strict'; +'require rpc'; + +var callCPUFreeInfo = rpc.declare({ + object: 'luci', + method: 'getCPUUsage' +}); + +function progressbar(value, max) { + var vn = parseInt(value) || 0, + mn = parseInt(max) || 100, + pc = Math.floor((100 / mn) * vn); + + return E('div', { + 'class': 'cbi-progressbar', + 'title': '%s%% / %s%%'.format(vn, mn, pc) + }, E('div', { 'style': 'width:%.2f%%'.format(pc) })); +} + +return L.Class.extend({ + title: _('CPU'), + + load: function() { + return L.resolveDefault(callCPUFreeInfo(), {}); + }, + + render: function(info) { + var fields = [ + _('Used'), (info.cpuusage) ? info.cpuusage : 0, 100 + ]; + + var table = E('table', { 'class': 'table cpu' }); + + for (var i = 0; i < fields.length; i += 3) { + table.appendChild(E('tr', { 'class': 'tr' }, [ + E('td', { 'class': 'td left', 'width': '33%' }, [ fields[i] ]), + E('td', { 'class': 'td left' }, [ + (fields[i + 1] != null) ? progressbar(fields[i + 1], fields[i + 2], true) : '?' + ]) + ])); + } + + return table; + } +}); diff --git a/openwrt-fastfetch/Makefile b/openwrt-fastfetch/Makefile index 7569eaef..98de57e0 100644 --- a/openwrt-fastfetch/Makefile +++ b/openwrt-fastfetch/Makefile @@ -5,8 +5,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fastfetch -PKG_VERSION:=2.62.0 -PKG_RELEASE:=4 +PKG_VERSION:=2.62.1 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/fastfetch-cli/fastfetch/tar.gz/$(PKG_VERSION)?