Refactor Docker component layout
Refactor component layout and remove redundant Group elements.
This commit is contained in:
1 parent
ddd0f89871
commit
c4d7e2f66c
1 file changed
+10
-10
@@ -123,7 +123,7 @@ const createColumns = (
|
|||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
Cell({ row }) {
|
Cell({ row }) {
|
||||||
const utils = clientApi.useUtils();
|
const utils = clientApi.useUtils();
|
||||||
|
// eslint-disable-next-line no-restricted-syntax
|
||||||
const onSettled = async () => {
|
const onSettled = async () => {
|
||||||
await utils.docker.getContainers.invalidate();
|
await utils.docker.getContainers.invalidate();
|
||||||
};
|
};
|
||||||
@@ -272,22 +272,22 @@ export default function DockerWidget({ options, width, isEditMode }: WidgetCompo
|
|||||||
}}
|
}}
|
||||||
p={4}
|
p={4}
|
||||||
>
|
>
|
||||||
<Group gap="xl">
|
<Group gap={4}>
|
||||||
<Group gap={4}>
|
<IconBrandDocker size={20} />
|
||||||
<IconBrandDocker size={20} />
|
<Text size="sm">{t("table.footer", { count: totalContainers.toString() })}</Text>
|
||||||
<Text size="sm">{t("table.footer", { count: totalContainers.toString() })}</Text>
|
</Group>
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Text size="sm" c="green.5">
|
<Group gap="xl">
|
||||||
|
<Text size="sm" c={cpuUsageColor(totals.cpu, "running")}>
|
||||||
Total CPU: {totals.cpu.toFixed(2)}%
|
Total CPU: {totals.cpu.toFixed(2)}%
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text size="sm" c="orange.5">
|
<Text size="sm" c={memoryUsageColor(totals.memory, "running")}>
|
||||||
Total Mem: {humanFileSize(totals.memory)}
|
Total Mem: {humanFileSize(totals.memory)}
|
||||||
</Text>
|
</Text>
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Text size="sm">{t("table.updated", { when: relativeTime })}</Text>
|
<Text size="sm">{t("table.updated", { when: relativeTime })}</Text>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in new issue
Block a user