fixes from review

This commit is contained in:
Dan Geraghty 2024-01-29 20:10:20 +00:00
parent 7b643a8150
commit 69b4d26107
3 changed files with 6 additions and 12 deletions

View File

@ -13,12 +13,12 @@ widget:
url: http://host.or.ip
username: homepage
password: pass
interfaceName: eth0
interfaceName: eth0 # optional
```
## Interface
Adding an interfaceName (e.g eth0) will display information for that particular device, otherwise it will display general system info.
Setting `interfaceName` (e.g. eth0) will display information for that particular device, otherwise the widget will display general system info.
## Authorization

View File

@ -782,10 +782,9 @@
},
"openwrt": {
"uptime": "Uptime",
"uptimeValue": "{{days}}d {{hours}}h {{minutes}}m {{seconds}}s",
"cpuLoad": "CPU Load Avg (5 mins)",
"up": "UP",
"down": "DOWN",
"cpuLoad": "CPU Load Avg (5m)",
"up": "Up",
"down": "Down",
"bytesTx": "Transmitted",
"bytesRx": "Received"
},

View File

@ -22,12 +22,7 @@ export default function Component({ service }) {
<Container service={service}>
<Block
label="openwrt.uptime"
value={t("openwrt.uptimeValue", {
days: Math.floor(uptime / 86400),
hours: Math.floor((uptime % 86400) / 3600),
minutes: Math.floor((uptime % 3600) / 60),
seconds: uptime % 60,
})}
value={t("common.uptime", { value: uptime })}
/>
<Block label="openwrt.cpuLoad" value={cpuLoad} />
</Container>