This commit is contained in:
Saeed Vaziry 2024-10-10 23:51:06 +02:00
parent 7086e84c3c
commit 386d8e73a7
2 changed files with 4 additions and 1 deletions

View File

@ -12,10 +12,12 @@ class Install
{
public function install(Server $server, array $input): Service
{
$input['type'] = config('core.service_types')[$input['name']];
$service = new Service([
'server_id' => $server->id,
'name' => $input['name'],
'type' => config('core.service_types')[$input['name']],
'type' => $input['type'],
'version' => $input['version'],
'status' => ServiceStatus::INSTALLING,
]);

View File

@ -44,6 +44,7 @@ protected function getHeaderActions(): array
->icon('heroicon-o-archive-box-arrow-down')
->modalWidth(MaxWidth::Large)
->authorize(fn () => auth()->user()?->can('create', [Service::class, $this->server]))
->modalSubmitActionLabel('Install')
->form([
Select::make('name')
->searchable()