Fix PostgreSQL version selection in global search (#7664)
This commit is contained in:
commit
78b4e43910
5 changed files with 55 additions and 5 deletions
|
|
@ -1314,11 +1314,6 @@ private function completeResourceCreation()
|
||||||
'server_id' => $this->selectedServerId,
|
'server_id' => $this->selectedServerId,
|
||||||
];
|
];
|
||||||
|
|
||||||
// PostgreSQL requires a database_image parameter
|
|
||||||
if ($this->selectedResourceType === 'postgresql') {
|
|
||||||
$queryParams['database_image'] = 'postgres:16-alpine';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->redirect(route('project.resource.create', [
|
$this->redirect(route('project.resource.create', [
|
||||||
'project_uuid' => $this->selectedProjectUuid,
|
'project_uuid' => $this->selectedProjectUuid,
|
||||||
'environment_uuid' => $this->selectedEnvironmentUuid,
|
'environment_uuid' => $this->selectedEnvironmentUuid,
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ class Select extends Component
|
||||||
|
|
||||||
protected $queryString = [
|
protected $queryString = [
|
||||||
'server_id',
|
'server_id',
|
||||||
|
'type' => ['except' => ''],
|
||||||
|
'destination_uuid' => ['except' => '', 'as' => 'destination'],
|
||||||
];
|
];
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
|
|
@ -66,6 +68,20 @@ public function mount()
|
||||||
$project = Project::whereUuid($projectUuid)->firstOrFail();
|
$project = Project::whereUuid($projectUuid)->firstOrFail();
|
||||||
$this->environments = $project->environments;
|
$this->environments = $project->environments;
|
||||||
$this->selectedEnvironment = $this->environments->where('uuid', data_get($this->parameters, 'environment_uuid'))->firstOrFail()->name;
|
$this->selectedEnvironment = $this->environments->where('uuid', data_get($this->parameters, 'environment_uuid'))->firstOrFail()->name;
|
||||||
|
|
||||||
|
// Check if we have all required params for PostgreSQL type selection
|
||||||
|
// This handles navigation from global search
|
||||||
|
$queryType = request()->query('type');
|
||||||
|
$queryServerId = request()->query('server_id');
|
||||||
|
$queryDestination = request()->query('destination');
|
||||||
|
|
||||||
|
if ($queryType === 'postgresql' && $queryServerId !== null && $queryDestination) {
|
||||||
|
$this->type = $queryType;
|
||||||
|
$this->server_id = $queryServerId;
|
||||||
|
$this->destination_uuid = $queryDestination;
|
||||||
|
$this->server = Server::find($queryServerId);
|
||||||
|
$this->current_step = 'select-postgresql-type';
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,13 @@ public function mount()
|
||||||
|
|
||||||
if (in_array($type, DATABASE_TYPES)) {
|
if (in_array($type, DATABASE_TYPES)) {
|
||||||
if ($type->value() === 'postgresql') {
|
if ($type->value() === 'postgresql') {
|
||||||
|
// PostgreSQL requires database_image to be explicitly set
|
||||||
|
// If not provided, fall through to Select component for version selection
|
||||||
|
if (! $database_image) {
|
||||||
|
$this->type = $type->value();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
$database = create_standalone_postgresql(
|
$database = create_standalone_postgresql(
|
||||||
environmentId: $environment->id,
|
environmentId: $environment->id,
|
||||||
destinationUuid: $destination_uuid,
|
destinationUuid: $destination_uuid,
|
||||||
|
|
|
||||||
|
|
@ -3953,6 +3953,22 @@
|
||||||
"logo": "svgs/default.webp",
|
"logo": "svgs/default.webp",
|
||||||
"minversion": "0.0.0"
|
"minversion": "0.0.0"
|
||||||
},
|
},
|
||||||
|
"soju": {
|
||||||
|
"documentation": "https://soju.im/?utm_source=coolify.io",
|
||||||
|
"slogan": "A user-friendly IRC bouncer with a modern web interface",
|
||||||
|
"compose": "c2VydmljZXM6CiAgc29qdToKICAgIGltYWdlOiAnY29kZWJlcmcub3JnL2VtZXJzaW9uL3NvanU6bGF0ZXN0JwogICAgdm9sdW1lczoKICAgICAgLSAnc29qdS1kYjovZGInCiAgICAgIC0gJ3NvanUtdXBsb2FkczovdXBsb2FkcycKICAgICAgLSAnc29qdS1ydW46L3J1bi9zb2p1JwogICAgICAtCiAgICAgICAgdHlwZTogYmluZAogICAgICAgIHNvdXJjZTogLi9zb2p1L2NvbmZpZwogICAgICAgIHRhcmdldDogL3NvanUtY29uZmlnCiAgICAgICAgY29udGVudDogImRiIHNxbGl0ZTMgL2RiL21haW4uZGJcbm1lc3NhZ2Utc3RvcmUgZGJcbmZpbGUtdXBsb2FkIGZzIC91cGxvYWRzL1xubGlzdGVuIGlyYytpbnNlY3VyZTovLzAuMC4wLjA6NjY2N1xubGlzdGVuIHdzK2luc2VjdXJlOi8vMC4wLjAuMDo4MFxubGlzdGVuIHVuaXgrYWRtaW46Ly8vcnVuL3NvanUvYWRtaW5cbiIKICAgIG5ldHdvcmtzOgogICAgICBkZWZhdWx0OgogICAgICAgIGFsaWFzZXM6CiAgICAgICAgICAtIGdhbWphLWJhY2tlbmQKICBnYW1qYToKICAgIGltYWdlOiAnY29kZWJlcmcub3JnL2VtZXJzaW9uL2dhbWphOmxhdGVzdCcKICAgIGVudmlyb25tZW50OgogICAgICAtIFNFUlZJQ0VfRlFETl9HQU1KQV84MAogICAgZGVwZW5kc19vbjoKICAgICAgLSBzb2p1CnZvbHVtZXM6CiAgc29qdS1kYjogbnVsbAogIHNvanUtdXBsb2FkczogbnVsbAogIHNvanUtcnVuOiBudWxsCg==",
|
||||||
|
"tags": [
|
||||||
|
"irc",
|
||||||
|
"bouncer",
|
||||||
|
"chat",
|
||||||
|
"messaging",
|
||||||
|
"relay"
|
||||||
|
],
|
||||||
|
"category": "communication",
|
||||||
|
"logo": "svgs/soju.svg",
|
||||||
|
"minversion": "0.0.0",
|
||||||
|
"port": "80"
|
||||||
|
},
|
||||||
"soketi": {
|
"soketi": {
|
||||||
"documentation": "https://docs.soketi.app?utm_source=coolify.io",
|
"documentation": "https://docs.soketi.app?utm_source=coolify.io",
|
||||||
"slogan": "Soketi is your simple, fast, and resilient open-source WebSockets server.",
|
"slogan": "Soketi is your simple, fast, and resilient open-source WebSockets server.",
|
||||||
|
|
|
||||||
|
|
@ -3953,6 +3953,22 @@
|
||||||
"logo": "svgs/default.webp",
|
"logo": "svgs/default.webp",
|
||||||
"minversion": "0.0.0"
|
"minversion": "0.0.0"
|
||||||
},
|
},
|
||||||
|
"soju": {
|
||||||
|
"documentation": "https://soju.im/?utm_source=coolify.io",
|
||||||
|
"slogan": "A user-friendly IRC bouncer with a modern web interface",
|
||||||
|
"compose": "c2VydmljZXM6CiAgc29qdToKICAgIGltYWdlOiAnY29kZWJlcmcub3JnL2VtZXJzaW9uL3NvanU6bGF0ZXN0JwogICAgdm9sdW1lczoKICAgICAgLSAnc29qdS1kYjovZGInCiAgICAgIC0gJ3NvanUtdXBsb2FkczovdXBsb2FkcycKICAgICAgLSAnc29qdS1ydW46L3J1bi9zb2p1JwogICAgICAtCiAgICAgICAgdHlwZTogYmluZAogICAgICAgIHNvdXJjZTogLi9zb2p1L2NvbmZpZwogICAgICAgIHRhcmdldDogL3NvanUtY29uZmlnCiAgICAgICAgY29udGVudDogImRiIHNxbGl0ZTMgL2RiL21haW4uZGJcbm1lc3NhZ2Utc3RvcmUgZGJcbmZpbGUtdXBsb2FkIGZzIC91cGxvYWRzL1xubGlzdGVuIGlyYytpbnNlY3VyZTovLzAuMC4wLjA6NjY2N1xubGlzdGVuIHdzK2luc2VjdXJlOi8vMC4wLjAuMDo4MFxubGlzdGVuIHVuaXgrYWRtaW46Ly8vcnVuL3NvanUvYWRtaW5cbiIKICAgIG5ldHdvcmtzOgogICAgICBkZWZhdWx0OgogICAgICAgIGFsaWFzZXM6CiAgICAgICAgICAtIGdhbWphLWJhY2tlbmQKICBnYW1qYToKICAgIGltYWdlOiAnY29kZWJlcmcub3JnL2VtZXJzaW9uL2dhbWphOmxhdGVzdCcKICAgIGVudmlyb25tZW50OgogICAgICAtIFNFUlZJQ0VfRlFETl9HQU1KQV84MAogICAgZGVwZW5kc19vbjoKICAgICAgLSBzb2p1CnZvbHVtZXM6CiAgc29qdS1kYjogbnVsbAogIHNvanUtdXBsb2FkczogbnVsbAogIHNvanUtcnVuOiBudWxsCg==",
|
||||||
|
"tags": [
|
||||||
|
"irc",
|
||||||
|
"bouncer",
|
||||||
|
"chat",
|
||||||
|
"messaging",
|
||||||
|
"relay"
|
||||||
|
],
|
||||||
|
"category": "communication",
|
||||||
|
"logo": "svgs/soju.svg",
|
||||||
|
"minversion": "0.0.0",
|
||||||
|
"port": "80"
|
||||||
|
},
|
||||||
"soketi": {
|
"soketi": {
|
||||||
"documentation": "https://docs.soketi.app?utm_source=coolify.io",
|
"documentation": "https://docs.soketi.app?utm_source=coolify.io",
|
||||||
"slogan": "Soketi is your simple, fast, and resilient open-source WebSockets server.",
|
"slogan": "Soketi is your simple, fast, and resilient open-source WebSockets server.",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue