Refactor stop button in heading.blade.php to use modal confirmation component
This commit is contained in:
parent
51e22b406c
commit
504524ea56
@ -40,7 +40,7 @@ class Create extends Component
|
|||||||
$database = create_standalone_keydb($environment->id, $destination_uuid);
|
$database = create_standalone_keydb($environment->id, $destination_uuid);
|
||||||
} else if ($type->value() === 'dragonfly') {
|
} else if ($type->value() === 'dragonfly') {
|
||||||
$database = create_standalone_dragonfly($environment->id, $destination_uuid);
|
$database = create_standalone_dragonfly($environment->id, $destination_uuid);
|
||||||
}else if ($type->value() === 'clickhouse') {
|
} else if ($type->value() === 'clickhouse') {
|
||||||
$database = create_standalone_clickhouse($environment->id, $destination_uuid);
|
$database = create_standalone_clickhouse($environment->id, $destination_uuid);
|
||||||
}
|
}
|
||||||
return redirect()->route('project.database.configuration', [
|
return redirect()->route('project.database.configuration', [
|
||||||
@ -60,7 +60,7 @@ class Create extends Component
|
|||||||
}
|
}
|
||||||
if ($oneClickService) {
|
if ($oneClickService) {
|
||||||
$destination = StandaloneDocker::whereUuid($destination_uuid)->first();
|
$destination = StandaloneDocker::whereUuid($destination_uuid)->first();
|
||||||
$service = Service::create([
|
$service_payload = [
|
||||||
'name' => "$oneClickServiceName-" . str()->random(10),
|
'name' => "$oneClickServiceName-" . str()->random(10),
|
||||||
'docker_compose_raw' => base64_decode($oneClickService),
|
'docker_compose_raw' => base64_decode($oneClickService),
|
||||||
'environment_id' => $environment->id,
|
'environment_id' => $environment->id,
|
||||||
@ -68,7 +68,11 @@ class Create extends Component
|
|||||||
'server_id' => (int) $server_id,
|
'server_id' => (int) $server_id,
|
||||||
'destination_id' => $destination->id,
|
'destination_id' => $destination->id,
|
||||||
'destination_type' => $destination->getMorphClass(),
|
'destination_type' => $destination->getMorphClass(),
|
||||||
]);
|
];
|
||||||
|
if ($oneClickServiceName === 'cloudflared') {
|
||||||
|
data_set($service_payload, 'connect_to_docker_network', true);
|
||||||
|
}
|
||||||
|
$service = Service::create($service_payload);
|
||||||
$service->name = "$oneClickServiceName-" . $service->uuid;
|
$service->name = "$oneClickServiceName-" . $service->uuid;
|
||||||
$service->save();
|
$service->save();
|
||||||
if ($oneClickDotEnvs?->count() > 0) {
|
if ($oneClickDotEnvs?->count() > 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user