feat: able to delete configuration from server

This commit is contained in:
Andras Bacsai
2024-04-12 10:54:25 +02:00
parent 8b668cf8b7
commit 9032879e20
16 changed files with 127 additions and 10 deletions

View File

@@ -64,7 +64,7 @@
$wire.$call('start');
});
$wire.$on('stopEvent', () => {
$wire.$dispatch('warning', 'Stopping database.');
$wire.$dispatch('info', 'Stopping database.');
$wire.$call('stop');
});
</script>

View File

@@ -114,7 +114,7 @@
@script
<script>
$wire.$on('stopEvent', () => {
$wire.$dispatch('warning', 'Stopping service.');
$wire.$dispatch('info', 'Stopping service.');
$wire.$call('stop');
});
$wire.$on('startEvent', () => {
@@ -122,12 +122,12 @@
$wire.$call('start');
});
$wire.$on('restartEvent', () => {
$wire.$dispatch('warning', 'Pulling new images.');
$wire.$dispatch('info', 'Pulling new images.');
$wire.$call('restart');
});
$wire.on('imagePulled', () => {
window.dispatchEvent(new CustomEvent('startservice'));
$wire.$dispatch('warning', 'Restarting service.');
$wire.$dispatch('info', 'Restarting service.');
});
</script>
@endscript

View File

@@ -6,6 +6,9 @@
back!
</div>
<x-modal-confirmation isErrorButton buttonTitle="Delete">
This resource will be deleted. It is not reversible. <br>Please think again.
<div class="px-2">This resource will be deleted. It is not reversible. <strong class="text-error">Please think
again.</strong><br><br></div>
<x-forms.checkbox class="px-0" id="delete_configurations"
label="Also delete configuration files from the server (/data/coolify/...)?"></x-forms.checkbox>
</x-modal-confirmation>
</div>

View File

@@ -62,7 +62,7 @@
@script
<script>
$wire.$on('restartEvent', () => {
$wire.$dispatch('warning', 'Restarting proxy.');
$wire.$dispatch('info', 'Restarting proxy.');
$wire.$call('restart');
});
$wire.$on('proxyChecked', () => {
@@ -71,7 +71,7 @@
});
$wire.$on('stopEvent', () => {
$wire.$dispatch('warning', 'Stopping proxy.');
$wire.$dispatch('info', 'Stopping proxy.');
$wire.$call('stop');
});
</script>