Deployment name

This commit is contained in:
2026-02-14 14:17:15 +01:00
parent 32be7ee586
commit b088f19b18
4 changed files with 15 additions and 22 deletions
+6 -4
View File
@@ -70,9 +70,6 @@ export default function DeploymentsPage() {
<div className="divide-y divide-border"> <div className="divide-y divide-border">
{deployments.map((dep) => { {deployments.map((dep) => {
const appName =
appNameByContainer.get(dep.container) ?? "Unknown app";
return ( return (
<Card key={`${dep.image}-${dep.container ?? "latest"}`}> <Card key={`${dep.image}-${dep.container ?? "latest"}`}>
<CardContent> <CardContent>
@@ -85,7 +82,12 @@ export default function DeploymentsPage() {
statusDot.stopped, statusDot.stopped,
)} )}
/> />
<CardTitle>{appName}</CardTitle> <CardTitle>
{dep.name} @{" "}
<span className="text-primary-foreground">
{appNameByContainer.get(dep.container) ?? "Unknown app"}
</span>
</CardTitle>
<CardDescription className="flex gap-3"> <CardDescription className="flex gap-3">
{dep.ports.map(([to, from]) => ( {dep.ports.map(([to, from]) => (
<span key={`${from}-${to}`}> <span key={`${from}-${to}`}>
+7 -18
View File
@@ -5,26 +5,11 @@ import { StatCard } from "@/components/dashboard/StatCard";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { import { Box, Server, Container, ArrowRight, Rocket } from "lucide-react";
Box,
Server,
Container,
Activity,
ArrowRight,
Clock,
Rocket,
} from "lucide-react";
import { Progress } from "@/components/ui/progress"; import { Progress } from "@/components/ui/progress";
import Link from "next/link"; import Link from "next/link";
import { getLiveNodes } from "@/lib/dockship/node"; import { getLiveNodes } from "@/lib/dockship/node";
import { useEffect, useMemo, useState } from "react"; import { useMemo } from "react";
import {
Application,
Deployment,
Docker,
Node,
NodeLiveData,
} from "@/lib/types";
import { getDocker } from "@/lib/dockship/docker"; import { getDocker } from "@/lib/dockship/docker";
import { getApps } from "@/lib/dockship/application"; import { getApps } from "@/lib/dockship/application";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
@@ -169,7 +154,11 @@ export default function OverviewPage() {
/> />
<div> <div>
<div className="font-mono text-sm"> <div className="font-mono text-sm">
{appNameByContainer.get(dep.container)} {dep.name} @{" "}
<span className="text-primary-foreground">
{appNameByContainer.get(dep.container) ??
"Unknown app"}
</span>
</div> </div>
<div className="text-xs text-muted-foreground"> <div className="text-xs text-muted-foreground">
{dep.image.slice(7, 19)} {dep.image.slice(7, 19)}
+1
View File
@@ -84,6 +84,7 @@ export async function getDeployments(
} }
return { return {
name: containerInfo.Name.replace(/^\//, ""),
image: containerInfo.Image, image: containerInfo.Image,
container: containerInfo.Id, container: containerInfo.Id,
cpu, cpu,
+1
View File
@@ -58,6 +58,7 @@ export interface Application {
} }
export interface Deployment { export interface Deployment {
name: string;
image: string; image: string;
container: string; container: string;
cpu: number; cpu: number;