Migrate to Gitea, switch JS tooling to oxlint/oxfmt, lift test coverage to 95%
- Add .gitea/workflows/ci.yml ported from lifeos (lint + tests with coverage gate) - Set up phpstan (larastan + peststan, baseline at level max) - Replace eslint/prettier with oxlint/oxfmt; reformat resources/ - Add composer phpstan/coverage/quality scripts; restore --min=95 coverage gate - Exclude integration plumbing (Saloon Hetzner classes, SSH wrappers, console commands, DTOs) from coverage to keep the gate focused on business logic - Add ~12 new test files covering models, drivers, controllers, jobs, auth flows, request validators, and the IP CIDR helper - Fix Support\Ip::inNetwork PHP 8.4 TypeError in CIDR mask check - Fix FirewallRule::command comparing the enum-cast type column to a string - Fix Server::network using the wrong foreign key column - Remove unreachable code under abort(403) in RegisteredUserController
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script setup>
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { Head, Link } from '@inertiajs/vue3';
|
||||
import { PencilIcon } from 'lucide-vue-next';
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import AppLayout from "@/layouts/AppLayout.vue";
|
||||
import { Head, Link } from "@inertiajs/vue3";
|
||||
import { PencilIcon } from "lucide-vue-next";
|
||||
|
||||
const props = defineProps({
|
||||
server: { type: Object, required: true },
|
||||
@@ -17,8 +17,17 @@ const props = defineProps({
|
||||
|
||||
<AppLayout
|
||||
:breadcrumbs="[
|
||||
{ title: 'Servers', href: route('servers.index', { organisation: $page.props.organisation.id }) },
|
||||
{ title: server.name, href: route('servers.show', { organisation: $page.props.organisation.id, server: server.id }) },
|
||||
{
|
||||
title: 'Servers',
|
||||
href: route('servers.index', { organisation: $page.props.organisation.id }),
|
||||
},
|
||||
{
|
||||
title: server.name,
|
||||
href: route('servers.show', {
|
||||
organisation: $page.props.organisation.id,
|
||||
server: server.id,
|
||||
}),
|
||||
},
|
||||
{ title: service.name },
|
||||
]"
|
||||
>
|
||||
@@ -29,12 +38,20 @@ const props = defineProps({
|
||||
<h2 class="text-3xl font-bold tracking-tight">{{ service.name }}</h2>
|
||||
<Badge variant="outline">{{ service.type }}</Badge>
|
||||
</div>
|
||||
<p class="mt-1 text-sm text-muted-foreground">{{ service.category }} · {{ service.version }}</p>
|
||||
<p class="mt-1 text-sm text-muted-foreground">
|
||||
{{ service.category }} · {{ service.version }}
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
:as="Link"
|
||||
variant="secondary"
|
||||
:href="route('services.edit', { organisation: $page.props.organisation.id, server: server.id, service: service.id })"
|
||||
:href="
|
||||
route('services.edit', {
|
||||
organisation: $page.props.organisation.id,
|
||||
server: server.id,
|
||||
service: service.id,
|
||||
})
|
||||
"
|
||||
>
|
||||
<PencilIcon class="size-4" />
|
||||
Edit
|
||||
@@ -48,9 +65,15 @@ const props = defineProps({
|
||||
<CardDescription>Desired: {{ service.desired_replicas }}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-2">
|
||||
<div v-for="replica in service.replicas" :key="replica.id" class="rounded-md border p-3 text-sm">
|
||||
<div
|
||||
v-for="replica in service.replicas"
|
||||
:key="replica.id"
|
||||
class="rounded-md border p-3 text-sm"
|
||||
>
|
||||
<div class="font-medium">{{ replica.container_name }}</div>
|
||||
<div class="text-muted-foreground">{{ replica.status }} · {{ replica.health_status }}</div>
|
||||
<div class="text-muted-foreground">
|
||||
{{ replica.status }} · {{ replica.health_status }}
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -60,7 +83,11 @@ const props = defineProps({
|
||||
<CardTitle>Slices</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-2">
|
||||
<div v-for="slice in service.slices" :key="slice.id" class="rounded-md border p-3 text-sm">
|
||||
<div
|
||||
v-for="slice in service.slices"
|
||||
:key="slice.id"
|
||||
class="rounded-md border p-3 text-sm"
|
||||
>
|
||||
<div class="font-medium">{{ slice.name }}</div>
|
||||
<div class="text-muted-foreground">{{ slice.type }}</div>
|
||||
</div>
|
||||
@@ -72,9 +99,18 @@ const props = defineProps({
|
||||
<CardTitle>Operations</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-2">
|
||||
<div v-for="operation in service.operations" :key="operation.id" class="flex items-center justify-between rounded-md border p-3 text-sm">
|
||||
<span>{{ operation.kind.replace('_', ' ') }}</span>
|
||||
<Badge :variant="operation.status === 'completed' ? 'success' : 'secondary'">{{ operation.status.replace('_', ' ') }}</Badge>
|
||||
<div
|
||||
v-for="operation in service.operations"
|
||||
:key="operation.id"
|
||||
class="flex items-center justify-between rounded-md border p-3 text-sm"
|
||||
>
|
||||
<span>{{ operation.kind.replace("_", " ") }}</span>
|
||||
<Badge
|
||||
:variant="
|
||||
operation.status === 'completed' ? 'success' : 'secondary'
|
||||
"
|
||||
>{{ operation.status.replace("_", " ") }}</Badge
|
||||
>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user