Update success messages

This commit is contained in:
Andras Bacsai
2024-02-22 14:53:42 +01:00
parent 592221b4bf
commit c7218f2856
32 changed files with 67 additions and 57 deletions

View File

@@ -64,7 +64,7 @@ class Form extends Component
refresh_server_connection($this->server->privateKey);
$this->validateServer(false);
$this->server->settings->save();
$this->dispatch('success', 'Server updated successfully.');
$this->dispatch('success', 'Server updated.');
} catch (\Throwable $e) {
return handleError($e, $this);
}
@@ -113,6 +113,6 @@ class Form extends Component
$this->server->settings->cleanup_after_percentage = $this->cleanup_after_percentage;
$this->server->settings->save();
$this->server->save();
$this->dispatch('success', 'Server updated successfully.');
$this->dispatch('success', 'Server updated.');
}
}

View File

@@ -60,7 +60,7 @@ class LogDrains extends Component
return;
}
$this->dispatch('serverRefresh');
$this->dispatch('success', 'Log drain service started successfully.');
$this->dispatch('success', 'Log drain service started.');
} catch (\Throwable $e) {
return handleError($e, $this);
}
@@ -126,7 +126,7 @@ class LogDrains extends Component
]);
}
$this->server->settings->save();
$this->dispatch('success', 'Settings saved successfully.');
$this->dispatch('success', 'Settings saved.');
return true;
} catch (\Throwable $e) {
if ($type === 'newrelic') {

View File

@@ -17,7 +17,7 @@ class DynamicConfigurationNavbar extends Component
$proxy_path = get_proxy_path();
$file = str_replace('|', '.', $fileName);
instant_remote_process(["rm -f {$proxy_path}/dynamic/{$file}"], $server);
$this->dispatch('success', 'Success', 'File deleted.');
$this->dispatch('success', 'File deleted.');
$this->dispatch('loadDynamicConfigurations');
$this->dispatch('refresh');
}

View File

@@ -43,7 +43,7 @@ class NewDynamicConfiguration extends Component
$this->fileName = "{$this->fileName}.yaml";
}
if ($this->fileName === 'coolify.yaml') {
$this->dispatch('error', 'Error', 'File name is reserved.');
$this->dispatch('error', 'File name is reserved.');
return;
}
$proxy_path = get_proxy_path();
@@ -51,7 +51,7 @@ class NewDynamicConfiguration extends Component
if ($this->newFile) {
$exists = instant_remote_process(["test -f $file && echo 1 || echo 0"], $this->server);
if ($exists == 1) {
$this->dispatch('error', 'Error', 'File already exists');
$this->dispatch('error', 'File already exists');
return;
}
}
@@ -62,7 +62,7 @@ class NewDynamicConfiguration extends Component
instant_remote_process(["echo '{$base64_value}' | base64 -d > {$file}"], $this->server);
$this->dispatch('loadDynamicConfigurations');
$this->dispatch('dynamic-configuration-added');
$this->dispatch('success', 'Success', 'Dynamic configuration saved.');
$this->dispatch('success', 'Dynamic configuration saved.');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@@ -124,7 +124,7 @@ class ValidateAndInstall extends Component
$this->docker_version = $this->server->validateDockerEngineVersion();
if ($this->docker_version) {
$this->dispatch('serverInstalled');
$this->dispatch('success', 'Server validated successfully.');
$this->dispatch('success', 'Server validated.');
} else {
$this->error = 'Docker Engine version is not 22+. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
return;