🌴 Sync 2026-04-23 20:39:06

This commit is contained in:
github-actions[bot] 2026-04-23 20:39:06 +08:00
parent 58437b8cc3
commit 2a153048f9
4 changed files with 99 additions and 3 deletions

View File

@ -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 "<table style='border: 0; table-layout: auto;'>" +
"<tr>" +
"<td style='border: 0;'>" + _(description) + "</td>" +
"<td style='border: 0;'>" +
"<table style='border: 0; table-layout: auto;'>" +
"<tr>" +
"<td style='border: 0;'>" +
"<a href='https://github.com/" + username + "/" + project + "' target='_blank' title='" + title + "'>" +
"<img alt='" + project + "' src='https://img.shields.io/badge/" + package_label + "' />" +
"<img alt='" + project + "' src='https://img.shields.io/github/stars/" + username + "/" + project + "?style=social' />" +
"</a>" +
"<a href='https://github.com/" + username + "/" + luci_project + "' target='_blank' title='" + luci_title + "'>" +
"<img alt='" + luci_project + "' src='https://img.shields.io/badge/" + luci_label + "' />" +
"<img alt='" + luci_project + "' src='https://img.shields.io/github/stars/" + username + "/" + luci_project + "?style=social' />" +
"</a>" +
"</td>" +
"</tr>" +
"</table>" +
"</td>" +
"</tr>" +
"</table>";
},
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 "<table style='border: 0; table-layout: auto;'>" +
"<tr>" +
"<td style='border: 0;'>" + _(description) + "</td>" +
"<td style='border: 0;'>" +
"<a href='https://github.com/" + username + "/" + project + "' target='_blank' title='" + luci_title + "'>" +
"<img alt='" + project + "' src='https://img.shields.io/badge/" + luci_label + "' />" +
"<img alt='" + project + "' src='https://img.shields.io/github/stars/" + username + "/" + project + "?style=social' />" +
"</a>" +
"</td>" +
"</tr>" +
"</table>";
}
});

View File

@ -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

View File

@ -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;
}
});

View File

@ -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)?