Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions admin/frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 6 additions & 2 deletions admin/frontend/src/pages/Processes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down Expand Up @@ -75,7 +75,11 @@ onUnmounted(() => clearInterval(timer))
v-if="column.key === 'status'"
:label="item"
:theme="STATUS_COLOR[item] || 'gray'"
/>
>
<template v-if="item === 'running'" #prefix>
<span class="pulse-dot" />
</template>
</Badge>
<button
v-else-if="column.key === 'log_filename' && item"
class="text-ink-blue-2 hover:underline"
Expand Down
10 changes: 7 additions & 3 deletions admin/frontend/src/pages/TaskDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const actionError = ref('')
let es = null
const terminal = ref(null)

const TASK_COLOR = { success: 'green', failed: 'red', running: 'blue', killed: 'gray' }
const TASK_COLOR = { success: 'green', failed: 'red', running: 'blue', killed: 'gray', stopped: 'red' }

function fmtDate(iso) {
if (!iso) return '—'
Expand Down Expand Up @@ -116,8 +116,12 @@ onUnmounted(() => { if (es) { es.close(); es = null } })
<div class="flex flex-wrap items-center gap-3">
<Badge
:label="streaming ? 'running…' : task.status"
:theme="TASK_COLOR[task.status] || 'gray'"
/>
:theme="streaming ? 'blue' : (TASK_COLOR[task.status] || 'gray')"
>
<template v-if="streaming" #prefix>
<span class="pulse-dot" />
</template>
</Badge>
<span class="font-mono text-sm font-medium">{{ task.command }}</span>
<span
v-if="Object.keys(task.args).length"
Expand Down
9 changes: 6 additions & 3 deletions admin/frontend/src/pages/TaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ const loading = ref(true)
const error = ref('')
const statusFilter = ref('all')

const TASK_COLOR = { success: 'green', failed: 'red', running: 'blue', killed: 'gray' }

const filterButtons = ['all', 'running', 'success', 'failed', 'killed'].map(s => ({
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' },
Expand Down
Loading