From e8b0e3b87c2f21a5d6bce1157e3442720ecc59a3 Mon Sep 17 00:00:00 2001 From: axolotle Date: Tue, 13 Aug 2024 00:28:06 +0200 Subject: [PATCH] refactor: rework async ServiceInfo --- app/src/types/core/api.ts | 11 ++++ app/src/views/service/ServiceInfo.vue | 89 ++++++++++++--------------- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/app/src/types/core/api.ts b/app/src/types/core/api.ts index f8975091..4e6e0365 100644 --- a/app/src/types/core/api.ts +++ b/app/src/types/core/api.ts @@ -198,6 +198,17 @@ export type BackupList = { }> } +// SERVICES + +export type ServiceInfo = { + status: 'running' | 'stopped' | 'failed' | 'unknown' + start_on_boot: 'enabled' | 'disabled' | 'unknown' + last_state_change: string | 'unknown' + description: string + configuration: 'valid' | 'broken' | 'unknown' +} +export type ServiceLogs = Obj + // DIAGNOSIS export type Diagnosis = { diff --git a/app/src/views/service/ServiceInfo.vue b/app/src/views/service/ServiceInfo.vue index a4c1da95..640bf831 100644 --- a/app/src/views/service/ServiceInfo.vue +++ b/app/src/views/service/ServiceInfo.vue @@ -1,70 +1,61 @@ - +