refactor: simplify service start and restart workflows

This commit is contained in:
Andras Bacsai
2025-02-04 14:34:34 +01:00
parent 8b8ae17c1a
commit d632eb2be9
4 changed files with 16 additions and 47 deletions

View File

@@ -165,10 +165,12 @@
return;
}
$wire.$dispatch('info', 'Service restart in progress.');
window.dispatchEvent(new CustomEvent('startservice'));
$wire.$call('restart');
});
$wire.$on('pullAndRestartEvent', () => {
$wire.$dispatch('info', 'Pulling new images.');
$wire.$dispatch('info', 'Pulling new images and restarting service.');
window.dispatchEvent(new CustomEvent('startservice'));
$wire.$call('pullAndRestartEvent');
});
$wire.on('imagePulled', () => {