frontend js enums generation, started service/create

This commit is contained in:
2025-04-01 16:18:46 +00:00
parent 4ff9b05cb4
commit 0cd00c641b
14 changed files with 274 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"PENDING": "pending",
"IN_PROGRESS": "in-progress",
"COMPLETED": "completed",
"CANCELLED": "canceled",
"FAILED": "failed"
}

View File

@@ -0,0 +1,9 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"NOT_APPLIED": "not-applied",
"APPLIED": "applied",
"FAILED": "failed"
}

View File

@@ -0,0 +1,8 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"ADMIN": "admin",
"MEMBER": "member"
}

View File

@@ -0,0 +1,7 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"GIT": "git"
}

View File

@@ -0,0 +1,8 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"HETZNER": "hetzner",
"DIGITAL_OCEAN": "digital-ocean"
}

View File

@@ -0,0 +1,15 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"WAITING_FOR_PROVIDER": "waiting-for-provider",
"PROVIDER_TIMEOUT": "provider-timeout",
"UNPROVISIONED": "unprovisioned",
"PROVISIONING": "provisioning",
"PROVISIONING_FAILED": "provisioning-failed",
"UPDATING": "updating",
"ACTIVE": "active",
"DELETING": "deleting",
"DELETED": "deleted"
}

View File

@@ -0,0 +1,11 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"DATABASE": "database",
"APPLICATION": "application",
"GATEWAY": "gateway",
"STORAGE": "storage",
"CACHE": "cache"
}

View File

@@ -0,0 +1,12 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"NOT_INSTALLED": "not-installed",
"INSTALLING": "installing",
"RUNNING": "running",
"STOPPED": "stopped",
"ERROR": "error",
"UNKNOWN": "unknown"
}

View File

@@ -0,0 +1,14 @@
// This is a generated file.
// Published at 2025-04-01 16:18:32
export default {
"FRANKENPHP": "frankenphp",
"PHP_FPM": "php-fpm",
"POSTGRES": "postgres",
"CADDY": "caddy",
"VALKEY": "valkey",
"MYSQL": "mysql",
"NGINX": "nginx",
"REDIS": "redis"
}

View File

@@ -1,10 +1,11 @@
<script setup lang="ts">
import { Badge } from '@/components/ui/badge';
import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import AppLayout from '@/layouts/AppLayout.vue';
import { Head } from '@inertiajs/vue3';
import { Head, Link } from '@inertiajs/vue3';
import { useCycleList, useInterval } from '@vueuse/core';
import { DatabaseIcon, Layers2Icon, LoaderCircleIcon } from 'lucide-vue-next';
import { DatabaseIcon, Layers2Icon, LoaderCircleIcon, PlusIcon } from 'lucide-vue-next';
import { watch } from 'vue';
const props = defineProps({
@@ -60,7 +61,18 @@ watch(counter, () => {
<template v-if="server.status === 'active'">
<div>
<h3 class="mb-3 text-2xl font-semibold tracking-tight">Services</h3>
<div class="mb-3 flex items-center justify-between">
<h3 class="text-2xl font-semibold tracking-tight">Services</h3>
<div>
<Button :as="Link" :href="route('services.create', {
organisation: $page.props.organisation.id,
server: server.id,
})" size="xs">
<PlusIcon class="size-4" />
Add
</Button>
</div>
</div>
<div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
<Card v-for="service in server.services" :key="service.id">
<CardHeader>

View File

@@ -0,0 +1,50 @@
<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';
const props = defineProps({
});
const form = useForm({
name: null,
category: null,
type: null,
});
</script>
<template>
<Head title="Add Service to Server" />
<AppLayout
:breadcrumbs="[
{
title: 'Servers',
href: route('servers.index', {
organisation: $page.props.organisation.id,
}),
},
{
title: 'Services',
},
{
title: 'Create',
}
]"
>
<div class="flex h-full flex-1 flex-col gap-4 rounded-xl p-4">
<div>
</div>
<div class="flex items-center justify-end">
<Button @click="form.post(route('servers.store', { organisation: $page.props.organisation.id }))">Submit</Button>
</div>
</div>
</AppLayout>
</template>