Fix linting issues
This commit is contained in:
parent
3240b7a169
commit
1ca2407256
1 changed files with 17 additions and 4 deletions
|
@ -3,7 +3,6 @@ import { useTranslation } from "next-i18next";
|
|||
import Container from "components/services/widget/container";
|
||||
import Block from "components/services/widget/block";
|
||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
import { sys } from "typescript";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { t } = useTranslation();
|
||||
|
@ -41,7 +40,7 @@ export default function Component({ service }) {
|
|||
const disk = systemData.data.disk_usage
|
||||
|
||||
const wanState = interfaceData.data.filter(l => l.hwif === widget.wan)[0].status
|
||||
const wanStatus = (wanState == "up") ?
|
||||
const wanStatus = (wanState === "up") ?
|
||||
<span className="text-green-500">{t("pfsenseapi.up")}</span>:
|
||||
<span className="text-red-500">{t("pfsenseapi.down")}</span>;
|
||||
const wanIP = interfaceData.data.filter(l => l.hwif === widget.wan)[0].ipaddr
|
||||
|
@ -56,7 +55,14 @@ export default function Component({ service }) {
|
|||
label="pfsenseapi.memory"
|
||||
value={t("common.percent", { value: (memory * 100).toFixed(2) })}
|
||||
/>
|
||||
{showDiskUsage && <Block label="pfsenseapi.disk" value={t("common.percent", { value: (disk * 100).toFixed(2) })} />}
|
||||
{
|
||||
showDiskUsage
|
||||
&&
|
||||
<Block
|
||||
label="pfsenseapi.disk"
|
||||
value={t("common.percent", { value: (disk * 100).toFixed(2) })}
|
||||
/>
|
||||
}
|
||||
<Block
|
||||
label="pfsenseapi.temp"
|
||||
value={`${tempC} °C`}
|
||||
|
@ -65,7 +71,14 @@ export default function Component({ service }) {
|
|||
label="pfsenseapi.wanStatus"
|
||||
value={wanStatus}
|
||||
/>
|
||||
{showWanIP && <Block label="pfsenseapi.wanIP" value={wanIP} />}
|
||||
{
|
||||
showWanIP
|
||||
&&
|
||||
<Block
|
||||
label="pfsenseapi.wanIP"
|
||||
value={wanIP}
|
||||
/>
|
||||
}
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue