mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-18 19:39:22 +08:00
fix: 修复在线状态显示和负载单位
This commit is contained in:
@@ -181,14 +181,16 @@ export const NodeCard = ({ node, enableSwap }: NodeCardProps) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex justify-between text-xs">
|
<div className="flex justify-between text-xs">
|
||||||
<div className="flex justify-start w-full">
|
<div className="flex justify-start w-full">
|
||||||
<span className="text-secondary-foreground">到期:</span>
|
<span className="text-secondary-foreground">
|
||||||
<div className="flex items-center gap-1">{expired_at}</div>
|
到期:{expired_at}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="border-l border-border/60 mx-2"></div>
|
<div className="border-l border-border/60 mx-2"></div>
|
||||||
<div className="flex justify-end w-full">
|
<div className="flex justify-end w-full">
|
||||||
<span className="text-secondary-foreground">在线:</span>
|
<span className="text-secondary-foreground">
|
||||||
<span>
|
{isOnline && stats
|
||||||
{isOnline && stats ? formatUptime(stats.uptime) : "离线"}
|
? `在线:${formatUptime(stats.uptime)}`
|
||||||
|
: "离线"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -42,13 +42,15 @@ export const NodeListItem = ({ node, enableSwap }: NodeListItemProps) => {
|
|||||||
<div className="text-base font-bold">{node.name}</div>
|
<div className="text-base font-bold">{node.name}</div>
|
||||||
<Tag className="text-xs" tags={tagList} />
|
<Tag className="text-xs" tags={tagList} />
|
||||||
<div className="flex text-xs">
|
<div className="flex text-xs">
|
||||||
<span className="text-secondary-foreground">到期:</span>
|
<span className="text-secondary-foreground">
|
||||||
<div className="flex items-center gap-1">{expired_at}</div>
|
到期:{expired_at}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex text-xs">
|
<div className="flex text-xs">
|
||||||
<span className="text-secondary-foreground">在线:</span>
|
<span className="text-secondary-foreground">
|
||||||
<span>
|
{isOnline && stats
|
||||||
{isOnline && stats ? formatUptime(stats.uptime) : "离线"}
|
? `在线:${formatUptime(stats.uptime)}`
|
||||||
|
: "离线"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -48,7 +48,7 @@ export const CustomTooltip = ({
|
|||||||
if (series?.tooltipFormatter) {
|
if (series?.tooltipFormatter) {
|
||||||
value = series.tooltipFormatter(value, item.payload);
|
value = series.tooltipFormatter(value, item.payload);
|
||||||
} else if (typeof value === "number") {
|
} else if (typeof value === "number") {
|
||||||
value = `${value.toFixed(0)}ms`;
|
value = `${value.toFixed(0)}`;
|
||||||
} else {
|
} else {
|
||||||
value = value?.toString() || "-";
|
value = value?.toString() || "-";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user