Skip to content

Commit

Permalink
feat: add container specification
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jan 1, 2025
1 parent 3e24e09 commit 9dc10fa
Show file tree
Hide file tree
Showing 12 changed files with 4,731 additions and 101 deletions.
20 changes: 16 additions & 4 deletions apps/dokploy/components/dashboard/monitoring/container/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const DATA_POINTS_OPTIONS = {
"200": "200 points",
"500": "500 points",
"800": "800 points",
"1200": "1200 points",
"1600": "1600 points",
"2000": "2000 points",
all: "All points",
} as const;

Expand Down Expand Up @@ -168,9 +171,12 @@ export const ContainerMonitoring = ({ appName, BASE_URL }: Props) => {
<MemoryStick className="h-4 w-4 text-muted-foreground" />
<h3 className="text-sm font-medium">Memory Usage</h3>
</div>
<p className="mt-2 text-2xl font-bold">{metrics.Memory.percentage}%</p>
<p className="mt-2 text-2xl font-bold">
{metrics.Memory.percentage}%
</p>
<p className="mt-1 text-sm text-muted-foreground">
{metrics.Memory.used} {metrics.Memory.unit} / {metrics.Memory.total} {metrics.Memory.unit}
{metrics.Memory.used} {metrics.Memory.unit} / {metrics.Memory.total}{" "}
{metrics.Memory.unit}
</p>
</Card>

Expand All @@ -179,15 +185,21 @@ export const ContainerMonitoring = ({ appName, BASE_URL }: Props) => {
<Network className="h-4 w-4 text-muted-foreground" />
<h3 className="text-sm font-medium">Network I/O</h3>
</div>
<p className="mt-2 text-2xl font-bold">{metrics.Network.input} {metrics.Network.inputUnit} / {metrics.Network.output} {metrics.Network.outputUnit}</p>
<p className="mt-2 text-2xl font-bold">
{metrics.Network.input} {metrics.Network.inputUnit} /{" "}
{metrics.Network.output} {metrics.Network.outputUnit}
</p>
</Card>

<Card className="p-6 bg-transparent">
<div className="flex items-center gap-2">
<HardDrive className="h-4 w-4 text-muted-foreground" />
<h3 className="text-sm font-medium">Block I/O</h3>
</div>
<p className="mt-2 text-2xl font-bold">{metrics.BlockIO.read} {metrics.BlockIO.readUnit} / {metrics.BlockIO.write} {metrics.BlockIO.writeUnit}</p>
<p className="mt-2 text-2xl font-bold">
{metrics.BlockIO.read} {metrics.BlockIO.readUnit} /{" "}
{metrics.BlockIO.write} {metrics.BlockIO.writeUnit}
</p>
</Card>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const DATA_POINTS_OPTIONS = {
"200": "200 points",
"500": "500 points",
"800": "800 points",
"1200": "1200 points",
"1600": "1600 points",
"2000": "2000 points",
all: "All points",
} as const;

Expand Down
Loading

0 comments on commit 9dc10fa

Please sign in to comment.