diff --git a/luci-mod-status/Makefile b/luci-mod-status/Makefile index 3bfe84e71..db0433232 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 +luci-app-oui +luci-mod-dashboard +libiwinfo +rpcd-mod-iwinfo +rpcd-mod-rrdns +ucode +ucode-mod-fs +ucode-mod-ubus +ucode-mod-socket -PKG_RELEASE:=18 +PKG_RELEASE:=19 PKG_BUILD_DEPENDS:=iwinfo PKG_LICENSE:=Apache-2.0 diff --git a/my-default-settings/files/www/luci-static/resources/view/status/include/11_cpu.js b/luci-mod-status/htdocs/luci-static/resources/view/status/include/11_cpu.js similarity index 100% rename from my-default-settings/files/www/luci-static/resources/view/status/include/11_cpu.js rename to luci-mod-status/htdocs/luci-static/resources/view/status/include/11_cpu.js 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 deleted file mode 100644 index 1f036c22e..000000000 --- a/luci-mod-status/htdocs/luci-static/resources/view/status/include/19_cpu.js +++ /dev/null @@ -1,45 +0,0 @@ -'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/my-default-settings/Makefile b/my-default-settings/Makefile index 1b24e3697..a2605a6c5 100644 --- a/my-default-settings/Makefile +++ b/my-default-settings/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=my-default-settings PKG_VERSION:=2 -PKG_RELEASE:=25 +PKG_RELEASE:=26 include $(INCLUDE_DIR)/package.mk