mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 01:13:56 +08:00
🐤 Sync 2026-09-29 05:35:20
This commit is contained in:
1 parent
049ba49a33
commit
1cb533a32c
4 files changed
+2
-47
No files matched your search
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
LUCI_TITLE:=LuCI Status Pages
|
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
|
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_BUILD_DEPENDS:=iwinfo
|
||||||
PKG_LICENSE:=Apache-2.0
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
@@ -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;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=my-default-settings
|
PKG_NAME:=my-default-settings
|
||||||
PKG_VERSION:=2
|
PKG_VERSION:=2
|
||||||
PKG_RELEASE:=25
|
PKG_RELEASE:=26
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user