feat: wire dashboard v2 to backend data
This commit is contained in:
@@ -160,6 +160,16 @@ const statusColors: Record<string, string> = {
|
||||
<div class="m-think">{{ thinkDisplay }}<span class="caret"></span></div>
|
||||
</div>
|
||||
|
||||
<div v-if="agent.activity.length" class="m-sec">
|
||||
<h4>Agent Activity</h4>
|
||||
<div class="m-activity">
|
||||
<div v-for="(entry, index) in agent.activity" :key="index" class="m-activity-row">
|
||||
<span class="m-activity-time">{{ entry.time }}</span>
|
||||
<span class="m-activity-text">{{ entry.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modell wählen -->
|
||||
<div class="m-sec">
|
||||
<h4>Modell wählen</h4>
|
||||
@@ -519,6 +529,35 @@ const statusColors: Record<string, string> = {
|
||||
|
||||
@keyframes blink { 50% { opacity: 0; } }
|
||||
|
||||
.m-activity {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.m-activity-row {
|
||||
display: grid;
|
||||
grid-template-columns: 72px 1fr;
|
||||
gap: 10px;
|
||||
align-items: start;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
background: rgba(124,108,255,.06);
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.m-activity-time {
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 10px;
|
||||
color: var(--tx-3);
|
||||
}
|
||||
|
||||
.m-activity-text {
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
color: var(--tx-2);
|
||||
}
|
||||
|
||||
/* ── Models ──────────────────────────────────── */
|
||||
.m-models {
|
||||
display: flex;
|
||||
|
||||
@@ -19,6 +19,7 @@ defineProps<{
|
||||
blockerCount: number
|
||||
todayCost: string
|
||||
todayTokens: string
|
||||
blockerLabel?: string
|
||||
}>()
|
||||
|
||||
defineEmits<{
|
||||
@@ -62,7 +63,7 @@ defineEmits<{
|
||||
@click="$emit('blockerClick')"
|
||||
>
|
||||
<span class="dot block"></span>
|
||||
{{ blockerCount }} Blocker
|
||||
{{ blockerLabel || `${blockerCount} Blocker` }}
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -16,6 +16,8 @@ export interface TaskItem {
|
||||
priority: 'high' | 'medium' | 'low'
|
||||
status: 'active' | 'pending' | 'blocked'
|
||||
progress: number // 0–100
|
||||
detail?: string | null
|
||||
source?: string
|
||||
}
|
||||
|
||||
/* ── Agent Detail Modal Types ─────────────────── */
|
||||
@@ -26,6 +28,11 @@ export interface ThinkingItem {
|
||||
ts: string
|
||||
}
|
||||
|
||||
export interface AgentActivityItem {
|
||||
time: string
|
||||
text: string
|
||||
}
|
||||
|
||||
/** Dashboard view-model for an agent detail modal */
|
||||
export interface AgentDetailData {
|
||||
id: string
|
||||
@@ -51,5 +58,6 @@ export interface AgentDetailData {
|
||||
lastActive: string
|
||||
activeTaskCount: number
|
||||
thinking: ThinkingItem[]
|
||||
activity: AgentActivityItem[]
|
||||
availableModels: { id: string; alias: string }[]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { icons } from '../../composables/icons'
|
||||
|
||||
defineProps<{
|
||||
connected?: boolean
|
||||
statusLabel?: string
|
||||
}>()
|
||||
|
||||
defineEmits<{
|
||||
@@ -27,7 +28,7 @@ defineEmits<{
|
||||
<!-- Status Pill -->
|
||||
<span :class="['pill', connected ? 'live' : 'preview']">
|
||||
<span class="status-dot" :class="connected ? 'on' : 'off'"></span>
|
||||
{{ connected ? 'OpenClaw verbunden' : 'Preview' }}
|
||||
{{ connected ? (statusLabel || 'OpenClaw verbunden') : 'Preview' }}
|
||||
</span>
|
||||
|
||||
<!-- Ask Iris Button -->
|
||||
|
||||
Reference in New Issue
Block a user