diff --git a/admin/frontend/src/index.css b/admin/frontend/src/index.css index b965490..d3aff2c 100644 --- a/admin/frontend/src/index.css +++ b/admin/frontend/src/index.css @@ -6,3 +6,16 @@ html { .dialog-overlay { z-index: 50; } + +/* Reusable pulsing dot — indicates live / in-progress state */ +.pulse-dot { + @apply relative inline-flex h-2 w-2; +} +.pulse-dot::before { + content: ''; + @apply absolute inline-flex h-full w-full animate-ping rounded-full bg-blue-400 opacity-75; +} +.pulse-dot::after { + content: ''; + @apply relative inline-flex h-2 w-2 rounded-full bg-blue-500; +} diff --git a/admin/frontend/src/pages/Processes.vue b/admin/frontend/src/pages/Processes.vue index f5c75b8..b636758 100644 --- a/admin/frontend/src/pages/Processes.vue +++ b/admin/frontend/src/pages/Processes.vue @@ -12,7 +12,7 @@ let countdown = 15 let timer const router = useRouter() -const STATUS_COLOR = { running: 'green', stopped: 'red', error: 'red', unknown: 'gray' } +const STATUS_COLOR = { running: 'blue', stopped: 'red', error: 'red', unknown: 'gray' } function openLog(filename) { router.push(`/logs/${filename}`) @@ -75,7 +75,11 @@ onUnmounted(() => clearInterval(timer)) v-if="column.key === 'status'" :label="item" :theme="STATUS_COLOR[item] || 'gray'" - /> + > + + + + { if (es) { es.close(); es = null } }) + :theme="streaming ? 'blue' : (TASK_COLOR[task.status] || 'gray')" + > + + + + {{ task.command }} ({ label: s.charAt(0).toUpperCase() + s.slice(1), value: s, })) +const TASK_COLOR = { success: 'green', failed: 'red', running: 'blue', killed: 'gray', stopped: 'red' } + const columns = [ { label: 'Command', key: 'command', width: '140px' }, { label: 'Context', key: '_args' }, { label: 'Status', key: 'status', width: '90px', - prefix: ({ row }) => h(Badge, { label: row.status, theme: TASK_COLOR[row.status] || 'gray' }), + prefix: ({ row }) => h(Badge, { + label: row.status, + theme: TASK_COLOR[row.status] || 'gray', + }, row.status === 'running' ? { prefix: () => h('span', { class: 'pulse-dot' }) } : {}), getLabel: () => '', }, { label: 'Started', key: '_started', width: '150px' },