style: auto-fix lint and format
This commit is contained in:
1 parent
df66cf25c7
commit
3d93ae1246
2 files changed
+9
-6
No files matched your search
@@ -39,13 +39,13 @@ export const WidgetBeszelSystemInput = ({ property, kind }: CommonWidgetInputPro
|
|||||||
<Select
|
<Select
|
||||||
label={tInput("label")}
|
label={tInput("label")}
|
||||||
description={tInput("description")}
|
description={tInput("description")}
|
||||||
placeholder={isPending && t("loading") || t("placeholder")}
|
placeholder={(isPending && t("loading")) || t("placeholder")}
|
||||||
clearable
|
clearable
|
||||||
searchable
|
searchable
|
||||||
nothingFoundMessage={t("noSystems")}
|
nothingFoundMessage={t("noSystems")}
|
||||||
data={systems}
|
data={systems}
|
||||||
disabled={isError}
|
disabled={isError}
|
||||||
error={isError && t("loadError") || undefined}
|
error={(isError && t("loadError")) || undefined}
|
||||||
{...form.getInputProps(`options.${property}`)}
|
{...form.getInputProps(`options.${property}`)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -80,7 +80,10 @@ export default function BeszelSystemStatsWidget({
|
|||||||
|
|
||||||
const { data: liveData, error: liveError } = useLiveStats(integrationIds, selectedSystem, isLive && systemReady);
|
const { data: liveData, error: liveError } = useLiveStats(integrationIds, selectedSystem, isLive && systemReady);
|
||||||
|
|
||||||
let activeStats: { systemStats: BeszelSystemStatsRecord[]; containerStats: BeszelContainerStatsRecord[] } | null | undefined = statsResult;
|
let activeStats:
|
||||||
|
| { systemStats: BeszelSystemStatsRecord[]; containerStats: BeszelContainerStatsRecord[] }
|
||||||
|
| null
|
||||||
|
| undefined = statsResult;
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
activeStats = liveData;
|
activeStats = liveData;
|
||||||
}
|
}
|
||||||
@@ -208,7 +211,7 @@ export default function BeszelSystemStatsWidget({
|
|||||||
<ScrollArea
|
<ScrollArea
|
||||||
h="100%"
|
h="100%"
|
||||||
className={classes.beszelStatsWrapper}
|
className={classes.beszelStatsWrapper}
|
||||||
style={{ pointerEvents: isEditMode && "none" || undefined }}
|
style={{ pointerEvents: (isEditMode && "none") || undefined }}
|
||||||
>
|
>
|
||||||
<Stack gap="md" p="sm">
|
<Stack gap="md" p="sm">
|
||||||
{!isEditMode && systems.length > 1 && (
|
{!isEditMode && systems.length > 1 && (
|
||||||
@@ -237,8 +240,8 @@ export default function BeszelSystemStatsWidget({
|
|||||||
<Menu.Item
|
<Menu.Item
|
||||||
key={s.value}
|
key={s.value}
|
||||||
fz="xs"
|
fz="xs"
|
||||||
fw={s.value === selectedSystem && 600 || 400}
|
fw={(s.value === selectedSystem && 600) || 400}
|
||||||
c={s.value !== selectedSystem && "dimmed" || undefined}
|
c={(s.value !== selectedSystem && "dimmed") || undefined}
|
||||||
onClick={() => handleSelectSystem(s.value)}
|
onClick={() => handleSelectSystem(s.value)}
|
||||||
>
|
>
|
||||||
{s.label}
|
{s.label}
|
||||||
|
|||||||
Reference in new issue
Block a user