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,9 +1,9 @@
|
||||
<script setup>
|
||||
import RadioButton from '@/components/RadioButton.vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { Head, router, useForm } from '@inertiajs/vue3';
|
||||
import { watch } from 'vue';
|
||||
import RadioButton from "@/components/RadioButton.vue";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import AppLayout from "@/layouts/AppLayout.vue";
|
||||
import { Head, router, useForm } from "@inertiajs/vue3";
|
||||
import { watch } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
providers: Array,
|
||||
@@ -42,7 +42,7 @@ loadServerTypes();
|
||||
function loadLocations() {
|
||||
if (form.provider && !props.locations) {
|
||||
router.reload({
|
||||
only: ['locations'],
|
||||
only: ["locations"],
|
||||
data: {
|
||||
provider: form.provider,
|
||||
},
|
||||
@@ -54,7 +54,7 @@ function loadLocations() {
|
||||
function loadServerTypes() {
|
||||
if (form.location && !props.serverTypes) {
|
||||
router.reload({
|
||||
only: ['serverTypes', 'images'],
|
||||
only: ["serverTypes", "images"],
|
||||
data: {
|
||||
provider: form.provider,
|
||||
location: form.location,
|
||||
@@ -94,11 +94,20 @@ function loadServerTypes() {
|
||||
</RadioButton>
|
||||
</div>
|
||||
<div v-if="form.provider" class="flex flex-wrap gap-2">
|
||||
<RadioButton v-for="location in locations" v-model="form.location" :value="location.id" :disabled="location.disabled" name="location">
|
||||
<RadioButton
|
||||
v-for="location in locations"
|
||||
v-model="form.location"
|
||||
:value="location.id"
|
||||
:disabled="location.disabled"
|
||||
name="location"
|
||||
>
|
||||
{{ location.city }}
|
||||
</RadioButton>
|
||||
</div>
|
||||
<div v-if="form.location" class="grid gap-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
|
||||
<div
|
||||
v-if="form.location"
|
||||
class="grid gap-2 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
|
||||
>
|
||||
<RadioButton
|
||||
v-for="serverType in serverTypes?.sort((a, b) => a.cores - b.cores) ?? []"
|
||||
v-model="form.server_type"
|
||||
@@ -106,19 +115,35 @@ function loadServerTypes() {
|
||||
:disabled="serverType.disabled"
|
||||
name="server-type"
|
||||
>
|
||||
<h5 class="text-lg font-semibold uppercase tracking-tight">{{ serverType.name }}</h5>
|
||||
<h5 class="text-lg font-semibold uppercase tracking-tight">
|
||||
{{ serverType.name }}
|
||||
</h5>
|
||||
<p class="text-sm opacity-60">
|
||||
{{ serverType.cores }} cores • {{ serverType.memory }} GB RAM • {{ serverType.disk }} GB disk
|
||||
{{ serverType.cores }} cores • {{ serverType.memory }} GB RAM •
|
||||
{{ serverType.disk }} GB disk
|
||||
</p>
|
||||
</RadioButton>
|
||||
</div>
|
||||
<div v-if="form.server_type" class="flex flex-wrap gap-2">
|
||||
<RadioButton v-for="image in images" v-model="form.image" :value="image.id" :disabled="image.disabled" name="image">
|
||||
<RadioButton
|
||||
v-for="image in images"
|
||||
v-model="form.image"
|
||||
:value="image.id"
|
||||
:disabled="image.disabled"
|
||||
name="image"
|
||||
>
|
||||
<h5 class="text-lg font-semibold tracking-tight">{{ image.name }}</h5>
|
||||
</RadioButton>
|
||||
</div>
|
||||
<div class="flex items-center justify-end">
|
||||
<Button @click="form.post(route('servers.store', { organisation: $page.props.organisation.id }))">Submit</Button>
|
||||
<Button
|
||||
@click="
|
||||
form.post(
|
||||
route('servers.store', { organisation: $page.props.organisation.id }),
|
||||
)
|
||||
"
|
||||
>Submit</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</AppLayout>
|
||||
|
||||
Reference in New Issue
Block a user