feat(service): enhance service status handling and UI updates

This commit is contained in:
Andras Bacsai
2025-06-24 12:52:22 +02:00
parent 3643a388bf
commit 8fc79022f3
6 changed files with 36 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
@if (str($complexStatus)->contains('running'))
<x-status.running :status="$complexStatus" />
@elseif(str($complexStatus)->contains('starting'))
<x-status.restarting :status="$complexStatus" />
@elseif(str($complexStatus)->contains('restarting'))
<x-status.restarting :status="$complexStatus" />
@elseif(str($complexStatus)->contains('degraded'))

View File

@@ -72,6 +72,9 @@
<template x-if="item.status.startsWith('exited')">
<div title="exited" class="bg-error badge-dashboard"></div>
</template>
<template x-if="item.status.startsWith('starting')">
<div title="starting" class="bg-warning badge-dashboard"></div>
</template>
<template x-if="item.status.startsWith('restarting')">
<div title="restarting" class="bg-warning badge-dashboard"></div>
</template>
@@ -118,6 +121,9 @@
<template x-if="item.status.startsWith('exited')">
<div title="exited" class="bg-error badge-dashboard"></div>
</template>
<template x-if="item.status.startsWith('starting')">
<div title="starting" class="bg-warning badge-dashboard"></div>
</template>
<template x-if="item.status.startsWith('restarting')">
<div title="restarting" class="bg-warning badge-dashboard"></div>
</template>
@@ -164,6 +170,9 @@
<template x-if="item.status.startsWith('exited')">
<div title="exited" class="bg-error badge-dashboard"></div>
</template>
<template x-if="item.status.startsWith('starting')">
<div title="starting" class="bg-warning badge-dashboard"></div>
</template>
<template x-if="item.status.startsWith('restarting')">
<div title="restarting" class="bg-warning badge-dashboard"></div>
</template>

View File

@@ -136,7 +136,7 @@
<script>
$wire.$on('stopEvent', () => {
$wire.$dispatch('info',
'Gracefully stopping service.<br/>It could take a while depending on the service.');
'Gracefully stopping service.<br/><br/>It could take a while depending on the service.');
$wire.$call('stop');
});
$wire.$on('startEvent', async () => {
@@ -163,7 +163,7 @@
return;
}
$wire.$dispatch('info',
'Gracefully stopping service.<br/>It could take a while depending on the service.');
'Gracefully stopping service.<br/><br/>It could take a while depending on the service.');
window.dispatchEvent(new CustomEvent('startservice'));
$wire.$call('restart');
});