mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 16:33:12 +09:00
Add icons for mis-matched version and restart required
This commit is contained in:
10 files changed
+97
-51
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import React from "react";
|
||||
|
||||
import * as lib from "@clusterio/lib";
|
||||
import { Progress } from "antd";
|
||||
import { Progress, Tooltip } from "antd";
|
||||
import { ReloadOutlined } from "@ant-design/icons";
|
||||
|
||||
export function MetricCpuRatio(props: { system?: lib.SystemInfo }) {
|
||||
if (!props.system) {
|
||||
@@ -53,3 +54,12 @@ export function MetricDiskUsed(props: { system?: lib.SystemInfo }) {
|
||||
const capacity = lib.formatBytes(props.system.diskCapacity);
|
||||
return `${used} / ${capacity}`;
|
||||
}
|
||||
|
||||
export function RestartRequired(props: { system?: lib.SystemInfo }) {
|
||||
if (!props.system || !props.system.restartRequired) {
|
||||
return "";
|
||||
}
|
||||
return <Tooltip title="Restart Required">
|
||||
<ReloadOutlined style={{ color: "yellow" }}/>
|
||||
</Tooltip>;
|
||||
}
|
||||
Reference in new issue
Block a user