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:
@@ -4,6 +4,13 @@ import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import AppLayout from "@/layouts/AppLayout.vue";
|
||||
import { Head, Link, useForm } from "@inertiajs/vue3";
|
||||
|
||||
@@ -60,41 +67,44 @@ const form = useForm({
|
||||
<CardContent class="grid gap-3 text-sm">
|
||||
<div class="grid gap-2">
|
||||
<Label for="repository_type">Repository type</Label>
|
||||
<select
|
||||
id="repository_type"
|
||||
v-model="form.repository_type"
|
||||
class="h-9 rounded-md border border-input bg-transparent px-3 text-sm"
|
||||
required
|
||||
>
|
||||
<option
|
||||
v-for="(type, key) in repositoryTypes"
|
||||
:key="key"
|
||||
:value="type"
|
||||
>
|
||||
{{ type }}
|
||||
</option>
|
||||
</select>
|
||||
<Select v-model="form.repository_type" required>
|
||||
<SelectTrigger id="repository_type">
|
||||
<SelectValue placeholder="Select a type" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem
|
||||
v-for="(type, key) in repositoryTypes"
|
||||
:key="key"
|
||||
:value="type"
|
||||
>
|
||||
{{ type }}
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<InputError :message="form.errors.repository_type" />
|
||||
</div>
|
||||
<div v-if="sourceProviders.length" class="grid gap-2">
|
||||
<Label for="source_provider_id">Source provider</Label>
|
||||
<select
|
||||
id="source_provider_id"
|
||||
v-model="form.source_provider_id"
|
||||
class="h-9 rounded-md border border-input bg-transparent px-3 text-sm"
|
||||
>
|
||||
<option value="">No provider</option>
|
||||
<option
|
||||
v-for="provider in sourceProviders"
|
||||
:key="provider.id"
|
||||
:value="provider.id"
|
||||
>
|
||||
{{ provider.name }} · {{ provider.type }}
|
||||
</option>
|
||||
</select>
|
||||
<Select v-model="form.source_provider_id">
|
||||
<SelectTrigger id="source_provider_id">
|
||||
<SelectValue placeholder="No provider" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem
|
||||
v-for="provider in sourceProviders"
|
||||
:key="provider.id"
|
||||
:value="String(provider.id)"
|
||||
>
|
||||
{{ provider.name }} · {{ provider.type }}
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<InputError :message="form.errors.source_provider_id" />
|
||||
</div>
|
||||
<div v-else class="flex flex-wrap items-center justify-between gap-3 rounded-md border border-dashed p-3">
|
||||
<div
|
||||
v-else
|
||||
class="flex flex-wrap items-center justify-between gap-3 rounded-md border border-dashed p-3"
|
||||
>
|
||||
<span class="text-muted-foreground">
|
||||
No source provider is configured yet. SSH URLs still work, but adding a
|
||||
provider documents which Git host this repository belongs to.
|
||||
@@ -103,7 +113,11 @@ const form = useForm({
|
||||
:as="Link"
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
:href="route('source-providers.create', { organisation: $page.props.organisation.id })"
|
||||
:href="
|
||||
route('source-providers.create', {
|
||||
organisation: $page.props.organisation.id,
|
||||
})
|
||||
"
|
||||
>
|
||||
Add provider
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user