From 27f87eeb17a9759f75e9cb6849e34cef44e6985a Mon Sep 17 00:00:00 2001 From: axolotle Date: Tue, 13 Aug 2024 00:30:09 +0200 Subject: [PATCH] refactor: rework async ToolLog --- app/src/types/core/api.ts | 27 ++++++ app/src/views/tool/ToolLog.vue | 164 ++++++++++++++++----------------- 2 files changed, 104 insertions(+), 87 deletions(-) diff --git a/app/src/types/core/api.ts b/app/src/types/core/api.ts index 070984d7..14190b2c 100644 --- a/app/src/types/core/api.ts +++ b/app/src/types/core/api.ts @@ -242,6 +242,33 @@ export type Firewall = { } } +// LOGS + +export type LogInfo = { + description: string + name: string + metadata_path: string + metadata: { + ended_at: string | null + env: Obj + error: string | null + interface: 'cli' | 'api' + operation: string + parent: string | null + related_to: string[][] + started_at: string + success: boolean | '?' + yunohost_version: string + suboperations: { + name: string + description: string + success: boolean | '?' + }[] + } + log_path: string + logs: string[] +} + // DOMAINS export type DNSRecord = { diff --git a/app/src/views/tool/ToolLog.vue b/app/src/views/tool/ToolLog.vue index c286cb6d..82fc71da 100644 --- a/app/src/views/tool/ToolLog.vue +++ b/app/src/views/tool/ToolLog.vue @@ -1,68 +1,61 @@