diff --git a/ui/app/pages/diagnostics.vue b/ui/app/pages/diagnostics.vue index ea04b463..2acfde04 100644 --- a/ui/app/pages/diagnostics.vue +++ b/ui/app/pages/diagnostics.vue @@ -79,19 +79,17 @@ :description="requiredAlertDescription" /> -
-
-
- - Overview -
+
+
+ + Overview
-
+
@@ -113,35 +111,34 @@
-
-
-
- - Runtime -
+
+
+ + Runtime
-
+
-
+
+
+

+ {{ row.label }} +

+

{{ row.description }}

+
+ - -
-

- {{ row.label }} -

-

{{ row.value }}

-

{{ row.description }}

-
+ +

{{ row.value }}

@@ -155,27 +152,19 @@

{{ section.description }}

- -
- - Checks: - {{ section.items.length }} - - - Required fails: - {{ requiredFails(section.items) }} - -
-
+

{{ item.label }}

- {{ statusLabel(item.status) }} @@ -334,7 +323,6 @@ const summaryCards = computed>(() => { const runtimeRows = computed>(() => { const runtime = report.value?.runtime; - const generatedAt = report.value?.generated_at; const python = report.value?.requirements.python; if (!runtime || !python) { @@ -360,24 +348,6 @@ const runtimeRows = computed>(() => { value: python.current, icon: 'i-lucide-square-terminal', }, - { - label: 'Started', - description: 'Process start time.', - value: runtime.started ? moment.unix(runtime.started).fromNow() : 'Unknown', - icon: 'i-lucide-power', - }, - { - label: 'Uptime', - description: 'Current process uptime.', - value: moment.duration(runtime.uptime_seconds, 'seconds').humanize(), - icon: 'i-lucide-timer', - }, - { - label: 'Snapshot', - description: 'Diagnostics timestamp.', - value: generatedAt ? moment.unix(generatedAt).fromNow() : 'Unknown', - icon: 'i-lucide-clock-3', - }, ]; }); @@ -405,8 +375,6 @@ const shareText = computed(() => { ); lines.push(`- Python: ${current.requirements.python.current}`); lines.push(`- Started: ${formatIsoTimestamp(current.runtime.started)}`); - lines.push(`- Uptime: ${formatIsoDuration(current.runtime.uptime_seconds)}`); - lines.push(`- Snapshot: ${formatIsoTimestamp(current.generated_at)}`); for (const section of featureSections.value) { lines.push('', section.label); @@ -414,7 +382,7 @@ const shareText = computed(() => { for (const item of section.items) { const versionSuffix = formatShareVersion(item); lines.push( - `- ${item.label} (${item.required ? 'Required' : 'Optional'}) (${statusLabel(item.status)})${versionSuffix}`, + `- [${statusLabel(item.status)}] ${item.label} (${item.required ? 'Required' : 'Optional'})${versionSuffix}`, ); } } @@ -434,10 +402,6 @@ const copyDiagnostics = (): void => { copyText(shareText.value); }; -const requiredFails = (items: Array): number => { - return items.filter((item) => item.required && item.status === 'fail').length; -}; - const showMessage = (item: DiagnosticCheck): boolean => { if (item.status === 'pass') { return false; @@ -449,30 +413,14 @@ const showMessage = (item: DiagnosticCheck): boolean => { const statusLabel = (status: DiagnosticStatus): string => { switch (status) { case 'pass': - return 'Pass'; + return 'PASS'; case 'fail': - return 'Fail'; + return 'FAIL'; case 'warn': - return 'Warn'; + return 'WARN'; case 'skip': default: - return 'Skip'; - } -}; - -const cardClass = (status: DiagnosticStatus): string => { - const base = 'rounded-md border border-default bg-default px-4 py-4 shadow-sm ring-1 ring-inset'; - - switch (status) { - case 'pass': - return `${base} ring-success/10`; - case 'fail': - return `${base} ring-error/10`; - case 'warn': - return `${base} ring-warning/10`; - case 'skip': - default: - return `${base} ring-default/40`; + return 'SKIP'; } }; @@ -492,22 +440,6 @@ const tagDotClass = (status: DiagnosticStatus): string => { } }; -const badgeClass = (status: DiagnosticStatus): string => { - const base = 'inline-flex items-center rounded-md border px-2 py-1 text-xs font-medium'; - - switch (status) { - case 'pass': - return `${base} border-success/30 bg-success/10 text-success`; - case 'fail': - return `${base} border-error/30 bg-error/10 text-error`; - case 'warn': - return `${base} border-warning/30 bg-warning/10 text-warning`; - case 'skip': - default: - return `${base} border-default bg-muted/40 text-toned`; - } -}; - const formatValue = (value: DiagnosticCheck['details'][string]): string => { if (value === null || value === undefined || value === '') { return 'n/a'; @@ -528,14 +460,6 @@ const formatIsoTimestamp = (value: number | undefined): string => { return moment.unix(value).utc().format('YYYY-MM-DDTHH:mm:ss[Z]'); }; -const formatIsoDuration = (value: number | undefined): string => { - if (typeof value !== 'number' || Number.isNaN(value)) { - return 'Unknown'; - } - - return moment.duration(value, 'seconds').toISOString(); -}; - const formatShareVersion = (item: DiagnosticCheck): string => { const version = item.details?.version; if (version === null || version === undefined || version === '') { diff --git a/ui/app/spa-loading-template.html b/ui/app/spa-loading-template.html index e496fbf7..17918b6c 100644 --- a/ui/app/spa-loading-template.html +++ b/ui/app/spa-loading-template.html @@ -76,6 +76,7 @@ } .loading-card { + min-width: 400px; width: min(100%, 29rem); position: relative; padding: 1.65rem; @@ -199,11 +200,11 @@

YTPTube

-

Loading your dashboard

+

Loading App

-

Getting the interface ready.

+

Getting the UI ready.

Please wait...