Deployment data
This commit is contained in:
@@ -40,7 +40,7 @@ export default function OverviewPage() {
|
|||||||
const { value: deployments } = useAsyncInterval(
|
const { value: deployments } = useAsyncInterval(
|
||||||
[],
|
[],
|
||||||
async () => (await getDeployments()).filter((d) => d !== null),
|
async () => (await getDeployments()).filter((d) => d !== null),
|
||||||
3000
|
3000,
|
||||||
);
|
);
|
||||||
|
|
||||||
const appNameByContainer = useMemo(() => {
|
const appNameByContainer = useMemo(() => {
|
||||||
@@ -67,8 +67,8 @@ export default function OverviewPage() {
|
|||||||
/>
|
/>
|
||||||
<StatCard
|
<StatCard
|
||||||
title="Deployments"
|
title="Deployments"
|
||||||
value="0"
|
value={deployments.length}
|
||||||
subtitle="0 running"
|
subtitle={`${deployments.filter((d) => d.status === "running").length} running`}
|
||||||
icon={<Rocket className="w-4 h-4" />}
|
icon={<Rocket className="w-4 h-4" />}
|
||||||
/>
|
/>
|
||||||
<StatCard
|
<StatCard
|
||||||
@@ -82,7 +82,7 @@ export default function OverviewPage() {
|
|||||||
value={dockerNodes.reduce(
|
value={dockerNodes.reduce(
|
||||||
(sum, n) =>
|
(sum, n) =>
|
||||||
sum + n.containers.filter((c) => c.State === "running").length,
|
sum + n.containers.filter((c) => c.State === "running").length,
|
||||||
0
|
0,
|
||||||
)}
|
)}
|
||||||
subtitle="running"
|
subtitle="running"
|
||||||
icon={<Container className="w-4 h-4" />}
|
icon={<Container className="w-4 h-4" />}
|
||||||
@@ -164,7 +164,7 @@ export default function OverviewPage() {
|
|||||||
"size-2 rounded-full",
|
"size-2 rounded-full",
|
||||||
(dep.status === "running" && "bg-chart-2") ||
|
(dep.status === "running" && "bg-chart-2") ||
|
||||||
(dep.status === "pending" && "bg-chart-1") ||
|
(dep.status === "pending" && "bg-chart-1") ||
|
||||||
"bg-slate-400 dark:bg-slate-600"
|
"bg-slate-400 dark:bg-slate-600",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user