diff --git a/app/src/api/self_check.ts b/app/src/api/self_check.ts index e4305417..2ac93d05 100644 --- a/app/src/api/self_check.ts +++ b/app/src/api/self_check.ts @@ -1,14 +1,27 @@ +import type { Container } from '@/language' import type { CosyError } from '@/lib/http' import http from '@/lib/http' import ws from '@/lib/websocket' -export interface Report { - name: string +export const ReportStatus = { + Success: 'success', + Warning: 'warning', + Error: 'error', +} as const + +export type ReportStatusType = typeof ReportStatus[keyof typeof ReportStatus] + +export interface TaskReport { + key: string + name: Container + description: Container + fixable?: boolean err?: CosyError + status: ReportStatusType } const selfCheck = { - run(): Promise { + run(): Promise { return http.get('/self_check') }, fix(taskName: string) { diff --git a/app/src/components/SelfCheck/SelfCheck.vue b/app/src/components/SelfCheck/SelfCheck.vue index 234dee58..d3a58212 100644 --- a/app/src/components/SelfCheck/SelfCheck.vue +++ b/app/src/components/SelfCheck/SelfCheck.vue @@ -1,7 +1,6 @@