Restructure UX and seed a fully simulated organisation
Rework the dashboard, environment topology view, header navigation, and status rendering, and standardise selects on a shadcn-vue component. Replace the thin database seeder with a SimulatedEnvironmentSeeder that builds a fully wired, mostly-running organisation (ACTIVE server fleet, managed + GHCR registries, Gitea source provider, ClipBin app with production/staging environments, services, slices, endpoints, managed variables, build artifacts, and a completed/in-progress/failed operations history) so the new UI renders against realistic data.
This commit is contained in:
@@ -13,7 +13,8 @@ defineProps<{
|
||||
|
||||
const selectedStep = ref<Record<string, any> | null>(null);
|
||||
|
||||
const label = (value?: string | null): string => value?.replaceAll("_", " ").replaceAll("-", " ") ?? "";
|
||||
const label = (value?: string | null): string =>
|
||||
value?.replaceAll("_", " ").replaceAll("-", " ") ?? "";
|
||||
|
||||
const targetLabel = (target?: Record<string, any> | null): string => {
|
||||
if (!target) {
|
||||
@@ -74,9 +75,7 @@ const targetLabel = (target?: Record<string, any> | null): string => {
|
||||
<div class="min-w-0">
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<div class="font-medium">{{ step.name ?? "Unnamed step" }}</div>
|
||||
<Badge
|
||||
:variant="step.status === 'completed' ? 'success' : 'secondary'"
|
||||
>
|
||||
<Badge :variant="step.status === 'completed' ? 'success' : 'secondary'">
|
||||
{{ label(step.status) }}
|
||||
</Badge>
|
||||
</div>
|
||||
@@ -115,9 +114,7 @@ const targetLabel = (target?: Record<string, any> | null): string => {
|
||||
>
|
||||
{{ label(child.kind) }}
|
||||
</Link>
|
||||
<Badge
|
||||
:variant="child.status === 'completed' ? 'success' : 'secondary'"
|
||||
>
|
||||
<Badge :variant="child.status === 'completed' ? 'success' : 'secondary'">
|
||||
{{ label(child.status) }}
|
||||
</Badge>
|
||||
<span class="text-muted-foreground">{{ targetLabel(child.target) }}</span>
|
||||
@@ -126,23 +123,35 @@ const targetLabel = (target?: Record<string, any> | null): string => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="operations.length === 0" class="rounded-md border border-dashed p-6 text-sm text-muted-foreground">
|
||||
<div
|
||||
v-if="operations.length === 0"
|
||||
class="rounded-md border border-dashed p-6 text-sm text-muted-foreground"
|
||||
>
|
||||
No operations recorded yet.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Dialog :open="!!selectedStep" @update:open="($event) => (!$event ? (selectedStep = null) : null)">
|
||||
<Dialog
|
||||
:open="!!selectedStep"
|
||||
@update:open="($event) => (!$event ? (selectedStep = null) : null)"
|
||||
>
|
||||
<DialogContent class="md:max-w-3xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Logs for {{ selectedStep?.name ?? "step" }}</DialogTitle>
|
||||
</DialogHeader>
|
||||
<section v-if="selectedStep?.logs">
|
||||
<h3 class="text-sm font-medium">Logs</h3>
|
||||
<pre class="max-h-80 overflow-auto whitespace-pre-wrap text-xs text-muted-foreground">{{ selectedStep.logs }}</pre>
|
||||
<pre
|
||||
class="max-h-80 overflow-auto whitespace-pre-wrap text-xs text-muted-foreground"
|
||||
>{{ selectedStep.logs }}</pre
|
||||
>
|
||||
</section>
|
||||
<section v-if="selectedStep?.error_logs">
|
||||
<h3 class="text-sm font-medium">Error Logs</h3>
|
||||
<pre class="max-h-80 overflow-auto whitespace-pre-wrap text-xs text-muted-foreground">{{ selectedStep.error_logs }}</pre>
|
||||
<pre
|
||||
class="max-h-80 overflow-auto whitespace-pre-wrap text-xs text-muted-foreground"
|
||||
>{{ selectedStep.error_logs }}</pre
|
||||
>
|
||||
</section>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
Reference in New Issue
Block a user