fix: migrate to new modal

This commit is contained in:
Andras Bacsai
2024-01-31 16:14:12 +01:00
parent 3b655f8e3f
commit c76e8bb0de
19 changed files with 75 additions and 219 deletions

View File

@@ -67,7 +67,8 @@ class Create extends Component
$this->storage->save();
return redirect()->route('team.storage.show', $this->storage->uuid);
} catch (\Throwable $e) {
return handleError($e, $this);
$this->dispatch('error', 'Failed to create storage.', $e->getMessage());
// return handleError($e, $this);
}
}
}

View File

@@ -33,9 +33,9 @@ class Form extends Component
{
try {
$this->storage->testConnection(shouldSave: true);
return $this->dispatch('success', 'Connection is working. Tested with "ListObjectsV2" action.');
return $this->dispatch('success', 'Connection is working.', 'Tested with "ListObjectsV2" action.');
} catch (\Throwable $e) {
return handleError($e, $this);
$this->dispatch('error', 'Failed to create storage.', $e->getMessage());
}
}

View File

@@ -91,7 +91,7 @@ class EnvironmentVariable extends Model
}
private function get_real_environment_variables(?string $environment_variable = null, $resource = null): string|null
{
if (!$environment_variable) {
if (!$environment_variable || !$resource) {
return null;
}
$environment_variable = trim($environment_variable);