1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

Adds health status by parsing the label from status (#2099)

* Adds healthcheck to status in menu

* Fixes bug with crated

* Moves colors to vars

* Updates icons
This commit is contained in:
Amir Raminfar
2023-03-29 08:58:12 -07:00
committed by GitHub
parent 0521f343e3
commit 9ba1a0f76a
11 changed files with 101 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
import type { ContainerStat, ContainerState } from "@/types/Container";
import type { ContainerHealth, ContainerStat, ContainerState } from "@/types/Container";
import type { UseThrottledRefHistoryReturn } from "@vueuse/core";
import { Ref } from "vue";
@@ -10,12 +10,13 @@ export class Container {
constructor(
public readonly id: string,
public readonly created: number,
public readonly created: Date,
public readonly image: string,
public readonly name: string,
public readonly command: string,
public status: string,
public state: ContainerState
public state: ContainerState,
public health?: ContainerHealth
) {
this.stat = ref({ cpu: 0, memory: 0, memoryUsage: 0 });
this.throttledStatHistory = useThrottledRefHistory(this.stat, { capacity: 300, deep: true, throttle: 1000 });