mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 07:52:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -139,6 +139,12 @@ function Logs({ worker }: { worker: Worker }) {
|
||||
}
|
||||
|
||||
export const columns: ColumnDef<Worker>[] = [
|
||||
{
|
||||
accessorKey: 'name',
|
||||
header: 'Name',
|
||||
enableColumnFilter: true,
|
||||
enableSorting: true,
|
||||
},
|
||||
{
|
||||
accessorKey: 'command',
|
||||
header: 'Command',
|
||||
@ -154,24 +160,6 @@ export const columns: ColumnDef<Worker>[] = [
|
||||
enableColumnFilter: true,
|
||||
enableSorting: true,
|
||||
},
|
||||
{
|
||||
accessorKey: 'auto_start',
|
||||
header: 'Auto start',
|
||||
enableColumnFilter: true,
|
||||
enableSorting: true,
|
||||
cell: ({ row }) => {
|
||||
return <Badge variant={row.original.auto_start ? 'success' : 'outline'}>{row.original.auto_start ? 'Yes' : 'No'}</Badge>;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'auto_restart',
|
||||
header: 'Auto restart',
|
||||
enableColumnFilter: true,
|
||||
enableSorting: true,
|
||||
cell: ({ row }) => {
|
||||
return <Badge variant={row.original.auto_restart ? 'success' : 'outline'}>{row.original.auto_restart ? 'Yes' : 'No'}</Badge>;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'numprocs',
|
||||
header: 'Numprocs',
|
||||
|
@ -27,12 +27,14 @@ export default function WorkerForm({ serverId, site, worker, children }: { serve
|
||||
const page = usePage<SharedData & { server: Server }>();
|
||||
const [open, setOpen] = useState(false);
|
||||
const form = useForm<{
|
||||
name: string;
|
||||
command: string;
|
||||
user: string;
|
||||
auto_start: boolean;
|
||||
auto_restart: boolean;
|
||||
numprocs: string;
|
||||
}>({
|
||||
name: worker?.name || '',
|
||||
command: worker?.command || '',
|
||||
user: worker?.user || '',
|
||||
auto_start: worker?.auto_start || true,
|
||||
@ -69,6 +71,13 @@ export default function WorkerForm({ serverId, site, worker, children }: { serve
|
||||
</DialogHeader>
|
||||
<Form id="worker-form" onSubmit={submit} className="p-4">
|
||||
<FormFields>
|
||||
{/*name*/}
|
||||
<FormField>
|
||||
<Label htmlFor="name">Name</Label>
|
||||
<Input type="text" id="name" value={form.data.name} onChange={(e) => form.setData('name', e.target.value)} />
|
||||
<InputError message={form.errors.name} />
|
||||
</FormField>
|
||||
|
||||
{/*command*/}
|
||||
<FormField>
|
||||
<Label htmlFor="command">Command</Label>
|
||||
|
Reference in New Issue
Block a user