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,18 @@
|
||||
<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, router } from '@inertiajs/vue3';
|
||||
import { DatabaseIcon, GitBranchIcon, ListChecksIcon, PlusIcon, RocketIcon, ServerIcon, SettingsIcon } 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, router } from "@inertiajs/vue3";
|
||||
import {
|
||||
DatabaseIcon,
|
||||
GitBranchIcon,
|
||||
ListChecksIcon,
|
||||
PlusIcon,
|
||||
RocketIcon,
|
||||
ServerIcon,
|
||||
SettingsIcon,
|
||||
} from "lucide-vue-next";
|
||||
|
||||
const props = defineProps({
|
||||
application: {
|
||||
@@ -23,10 +31,16 @@ const props = defineProps({
|
||||
|
||||
<AppLayout
|
||||
:breadcrumbs="[
|
||||
{ title: 'Applications', href: route('applications.index', { organisation: $page.props.organisation.id }) },
|
||||
{
|
||||
title: 'Applications',
|
||||
href: route('applications.index', { organisation: $page.props.organisation.id }),
|
||||
},
|
||||
{
|
||||
title: application.name,
|
||||
href: route('applications.show', { organisation: $page.props.organisation.id, application: application.id }),
|
||||
href: route('applications.show', {
|
||||
organisation: $page.props.organisation.id,
|
||||
application: application.id,
|
||||
}),
|
||||
},
|
||||
{ title: environment.name },
|
||||
]"
|
||||
@@ -36,9 +50,14 @@ const props = defineProps({
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2 class="text-3xl font-bold tracking-tight">{{ environment.name }}</h2>
|
||||
<Badge :variant="environment.status === 'active' ? 'success' : 'secondary'">{{ environment.status.replace('-', ' ') }}</Badge>
|
||||
<Badge
|
||||
:variant="environment.status === 'active' ? 'success' : 'secondary'"
|
||||
>{{ environment.status.replace("-", " ") }}</Badge
|
||||
>
|
||||
</div>
|
||||
<p class="mt-1 text-sm text-muted-foreground"><GitBranchIcon class="mr-1 inline size-4" />{{ environment.branch }}</p>
|
||||
<p class="mt-1 text-sm text-muted-foreground">
|
||||
<GitBranchIcon class="mr-1 inline size-4" />{{ environment.branch }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<Button
|
||||
@@ -92,10 +111,17 @@ const props = defineProps({
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Services</CardTitle>
|
||||
<CardDescription>{{ environment.services?.length ?? 0 }} runtime and managed services</CardDescription>
|
||||
<CardDescription
|
||||
>{{ environment.services?.length ?? 0 }} runtime and managed
|
||||
services</CardDescription
|
||||
>
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-3">
|
||||
<div v-for="service in environment.services" :key="service.id" class="rounded-md border p-3">
|
||||
<div
|
||||
v-for="service in environment.services"
|
||||
:key="service.id"
|
||||
class="rounded-md border p-3"
|
||||
>
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
@@ -104,8 +130,9 @@ const props = defineProps({
|
||||
<Badge variant="outline">{{ service.type }}</Badge>
|
||||
</div>
|
||||
<p class="mt-1 text-sm text-muted-foreground">
|
||||
{{ service.replicas?.length ?? 0 }} replicas · {{ service.slices?.length ?? 0 }} slices ·
|
||||
{{ service.status?.replace('-', ' ') }}
|
||||
{{ service.replicas?.length ?? 0 }} replicas ·
|
||||
{{ service.slices?.length ?? 0 }} slices ·
|
||||
{{ service.status?.replace("-", " ") }}
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
@@ -134,9 +161,20 @@ const props = defineProps({
|
||||
<CardTitle>Operations</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-2">
|
||||
<div v-for="operation in environment.operations" :key="operation.id" class="flex items-center justify-between rounded-md border p-3">
|
||||
<span class="font-medium">{{ operation.kind.replace('_', ' ') }}</span>
|
||||
<Badge :variant="operation.status === 'completed' ? 'success' : 'secondary'">{{ operation.status.replace('_', ' ') }}</Badge>
|
||||
<div
|
||||
v-for="operation in environment.operations"
|
||||
:key="operation.id"
|
||||
class="flex items-center justify-between rounded-md border p-3"
|
||||
>
|
||||
<span class="font-medium">{{
|
||||
operation.kind.replace("_", " ")
|
||||
}}</span>
|
||||
<Badge
|
||||
:variant="
|
||||
operation.status === 'completed' ? 'success' : 'secondary'
|
||||
"
|
||||
>{{ operation.status.replace("_", " ") }}</Badge
|
||||
>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -148,12 +186,19 @@ const props = defineProps({
|
||||
<CardTitle>Attachments</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-2">
|
||||
<div v-for="attachment in environment.attachments" :key="attachment.id" class="rounded-md border p-3 text-sm">
|
||||
<div
|
||||
v-for="attachment in environment.attachments"
|
||||
:key="attachment.id"
|
||||
class="rounded-md border p-3 text-sm"
|
||||
>
|
||||
<div class="flex items-center gap-2 font-medium">
|
||||
<DatabaseIcon class="size-4" />
|
||||
{{ attachment.role.replace('_', ' ') }}
|
||||
{{ attachment.role.replace("_", " ") }}
|
||||
</div>
|
||||
<p class="mt-1 text-muted-foreground">{{ attachment.service?.name }} · {{ attachment.service_slice?.name ?? 'service level' }}</p>
|
||||
<p class="mt-1 text-muted-foreground">
|
||||
{{ attachment.service?.name }} ·
|
||||
{{ attachment.service_slice?.name ?? "service level" }}
|
||||
</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -168,7 +213,7 @@ const props = defineProps({
|
||||
:key="variable.id"
|
||||
:variant="variable.source === 'user' ? 'secondary' : 'outline'"
|
||||
>
|
||||
{{ variable.key }} · {{ variable.source.replace('_', ' ') }}
|
||||
{{ variable.key }} · {{ variable.source.replace("_", " ") }}
|
||||
<span v-if="!variable.overridable"> · locked</span>
|
||||
</Badge>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user