feat(service): enhance service status handling and UI updates
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user