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,14 +1,22 @@
|
||||
<script setup>
|
||||
import InputError from '@/components/InputError.vue';
|
||||
import RadioButton from '@/components/RadioButton.vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import ServiceCategory, { DescriptionMap as serviceCategoryDescriptions } from '@/enums/ServiceCategory';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { AppWindowIcon, ArchiveIcon, DatabaseIcon, DatabaseZapIcon, DoorOpenIcon } from 'lucide-vue-next';
|
||||
import { watch } from 'vue';
|
||||
import InputError from "@/components/InputError.vue";
|
||||
import RadioButton from "@/components/RadioButton.vue";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import ServiceCategory, {
|
||||
DescriptionMap as serviceCategoryDescriptions,
|
||||
} from "@/enums/ServiceCategory";
|
||||
import AppLayout from "@/layouts/AppLayout.vue";
|
||||
import { Head, useForm } from "@inertiajs/vue3";
|
||||
import {
|
||||
AppWindowIcon,
|
||||
ArchiveIcon,
|
||||
DatabaseIcon,
|
||||
DatabaseZapIcon,
|
||||
DoorOpenIcon,
|
||||
} from "lucide-vue-next";
|
||||
import { watch } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
services: Object,
|
||||
@@ -39,14 +47,14 @@ function getIcon(category) {
|
||||
}
|
||||
|
||||
function generateServiceName() {
|
||||
let str = '';
|
||||
let str = "";
|
||||
|
||||
if (form.category) {
|
||||
str += form.category.toLowerCase() + '-';
|
||||
str += form.category.toLowerCase() + "-";
|
||||
}
|
||||
|
||||
if (form.type) {
|
||||
str += form.type.toLowerCase() + '-';
|
||||
str += form.type.toLowerCase() + "-";
|
||||
}
|
||||
|
||||
if (form.version) {
|
||||
@@ -91,15 +99,25 @@ watch([() => form.category, () => form.type, () => form.version], () => {
|
||||
>
|
||||
<component :is="getIcon(category)" class="size-5" />
|
||||
<div>
|
||||
<h4 class="mb-1 text-lg font-semibold leading-none tracking-tighter">{{ category }}</h4>
|
||||
<h4 class="mb-1 text-lg font-semibold leading-none tracking-tighter">
|
||||
{{ category }}
|
||||
</h4>
|
||||
<p class="text-sm">{{ serviceCategoryDescriptions[categoryKey] }}</p>
|
||||
</div>
|
||||
</RadioButton>
|
||||
</div>
|
||||
|
||||
<div v-if="form.category" class="grid gap-2 md:grid-cols-2 lg:grid-cols-3">
|
||||
<RadioButton v-for="service in services[form.category]" v-model="form.type" :value="service.name" name="type" class="py-3">
|
||||
<h4 class="mb-1 text-lg font-semibold leading-none tracking-tighter">{{ service.name }}</h4>
|
||||
<RadioButton
|
||||
v-for="service in services[form.category]"
|
||||
v-model="form.type"
|
||||
:value="service.name"
|
||||
name="type"
|
||||
class="py-3"
|
||||
>
|
||||
<h4 class="mb-1 text-lg font-semibold leading-none tracking-tighter">
|
||||
{{ service.name }}
|
||||
</h4>
|
||||
</RadioButton>
|
||||
</div>
|
||||
|
||||
@@ -111,18 +129,36 @@ watch([() => form.category, () => form.type, () => form.version], () => {
|
||||
name="version"
|
||||
class="py-3"
|
||||
>
|
||||
<h4 class="mb-1 text-lg font-semibold leading-none tracking-tighter">{{ version.name }}</h4>
|
||||
<h4 class="mb-1 text-lg font-semibold leading-none tracking-tighter">
|
||||
{{ version.name }}
|
||||
</h4>
|
||||
</RadioButton>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-2">
|
||||
<Label for="name">Name</Label>
|
||||
<Input id="name" type="text" required autofocus :tabindex="1" v-model="form.name" placeholder="postgres-db" />
|
||||
<Input
|
||||
id="name"
|
||||
type="text"
|
||||
required
|
||||
autofocus
|
||||
:tabindex="1"
|
||||
v-model="form.name"
|
||||
placeholder="postgres-db"
|
||||
/>
|
||||
<InputError :message="form.errors.name" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end">
|
||||
<Button @click="form.post(route('services.store', { organisation: $page.props.organisation.id, server: $page.props.server.id }))"
|
||||
<Button
|
||||
@click="
|
||||
form.post(
|
||||
route('services.store', {
|
||||
organisation: $page.props.organisation.id,
|
||||
server: $page.props.server.id,
|
||||
}),
|
||||
)
|
||||
"
|
||||
>Submit</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user