Unifi widgets show warning with no data
This commit is contained in:
1 parent
aee8ba1e1d
commit
c2983197a0
3 files changed
+20
-1
No files matched your search
@@ -38,6 +38,14 @@ export default function Component({ service }) {
|
||||
|
||||
const uptime = wan["gw_system-stats"] ? `${t("common.number", { value: wan["gw_system-stats"].uptime / 86400, maximumFractionDigits: 1 })} ${t("unifi.days")}` : null;
|
||||
|
||||
if (!(wan.show || lan.show || wlan.show || uptime)) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block value={ t("unifi.empty_data") } />
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Container service={service}>
|
||||
{uptime && <Block label="unifi.uptime" value={ uptime } />}
|
||||
|
||||
Reference in new issue
Block a user