diff --git a/app/Actions/Service/Install.php b/app/Actions/Service/Install.php index d5a3659..2da9dcb 100644 --- a/app/Actions/Service/Install.php +++ b/app/Actions/Service/Install.php @@ -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, ]); diff --git a/app/Web/Pages/Servers/Services/Index.php b/app/Web/Pages/Servers/Services/Index.php index 8d126dc..4a6d9b7 100644 --- a/app/Web/Pages/Servers/Services/Index.php +++ b/app/Web/Pages/Servers/Services/Index.php @@ -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()