-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDashboardSidebar.vue
More file actions
252 lines (238 loc) · 9.09 KB
/
Copy pathDashboardSidebar.vue
File metadata and controls
252 lines (238 loc) · 9.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<script setup lang="ts">
const navItems = [
[
{
label: 'Overview',
icon: 'i-material-symbols-dashboard-outline',
to: '#',
active: true,
},
{
label: 'Jobs',
icon: 'i-material-symbols-work-outline',
to: '#',
badge: { label: '12', color: 'primary' as const, variant: 'soft' as const },
},
{
label: 'Agents',
icon: 'i-material-symbols-smart-toy-outline',
to: '#',
},
{
label: 'Sessions',
icon: 'i-material-symbols-hub-outline',
to: '#',
},
{
label: 'Runtimes',
icon: 'i-material-symbols-memory-outline',
to: '#',
},
{
label: 'Traces',
icon: 'i-material-symbols-timeline-outline',
to: '#',
},
],
[
{
label: 'Leases',
icon: 'i-material-symbols-lock-clock-outline',
to: '#',
},
{
label: 'Events',
icon: 'i-material-symbols-event-note-outline',
to: '#',
badge: { label: '3', color: 'warning' as const, variant: 'soft' as const },
},
],
[
{
label: 'Settings',
icon: 'i-material-symbols-settings-outline',
to: '#',
},
],
]
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Default sidebar (inside DashboardGroup)">
<GalleryFrame height="24rem">
<UDashboardGroup storage="local" storage-key="gallery-sidebar-default" class="h-full w-full">
<UDashboardSidebar :toggle="false" class="relative! hidden! md:flex!">
<template #header>
<div class="flex items-center gap-2 px-4 py-3">
<UIcon name="i-material-symbols-bolt" class="text-primary h-5 w-5" />
<span class="font-semibold text-sm text-[var(--ui-text)]">ARCP Console</span>
</div>
</template>
<UNavigationMenu
:items="navItems"
orientation="vertical"
class="w-full"
/>
<template #footer>
<div class="flex items-center gap-2 px-4 py-3 border-t border-[var(--ui-border)]">
<UAvatar
icon="i-material-symbols-person-outline"
size="xs"
color="neutral"
variant="soft"
/>
<span class="text-xs text-[var(--ui-text-muted)]">agent-runtime@arcp.io</span>
</div>
</template>
</UDashboardSidebar>
<div class="flex flex-1 flex-col p-6 gap-4 overflow-auto">
<p class="text-sm text-[var(--ui-text-muted)]">Main content area</p>
<div class="grid grid-cols-2 gap-3">
<UCard>
<div class="flex items-center gap-2">
<UIcon name="i-material-symbols-work-outline" class="text-primary h-4 w-4" />
<span class="text-sm font-medium">12 Active Jobs</span>
</div>
</UCard>
<UCard>
<div class="flex items-center gap-2">
<UIcon name="i-material-symbols-smart-toy-outline" class="text-success h-4 w-4" />
<span class="text-sm font-medium">4 Agents Online</span>
</div>
</UCard>
</div>
</div>
</UDashboardGroup>
</GalleryFrame>
</GallerySection>
<GallerySection title="Collapsible sidebar">
<GalleryFrame height="24rem">
<UDashboardGroup storage="local" storage-key="gallery-sidebar-collapsible" class="h-full w-full">
<UDashboardSidebar collapsible :toggle="false" class="relative! hidden! md:flex!">
<template #header="{ collapsed, collapse }">
<div class="flex items-center gap-2 px-3 py-3">
<UIcon name="i-material-symbols-bolt" class="text-primary h-5 w-5 shrink-0" />
<span v-if="!collapsed" class="font-semibold text-sm text-[var(--ui-text)] truncate">ARCP Console</span>
<UButton
v-if="!collapsed"
icon="i-material-symbols-chevron-left"
color="neutral"
variant="ghost"
size="xs"
class="ml-auto"
@click="collapse(true)"
/>
<UButton
v-else
icon="i-material-symbols-chevron-right"
color="neutral"
variant="ghost"
size="xs"
@click="collapse(false)"
/>
</div>
</template>
<template #default="{ collapsed }">
<UNavigationMenu
:items="navItems"
orientation="vertical"
:collapsed="collapsed"
:tooltip="collapsed"
class="w-full"
/>
</template>
<template #footer="{ collapsed }">
<div class="flex items-center gap-2 px-3 py-3 border-t border-[var(--ui-border)]">
<UAvatar
icon="i-material-symbols-person-outline"
size="xs"
color="neutral"
variant="soft"
/>
<span v-if="!collapsed" class="text-xs text-[var(--ui-text-muted)] truncate">agent-runtime@arcp.io</span>
</div>
</template>
</UDashboardSidebar>
<div class="flex flex-1 flex-col p-6 gap-4 overflow-auto">
<p class="text-sm text-[var(--ui-text-muted)]">Toggle the sidebar collapse above.</p>
<UBadge color="info" variant="soft" icon="i-material-symbols-info-outline">
Session lease active · 4m 22s remaining
</UBadge>
</div>
</UDashboardGroup>
</GalleryFrame>
</GallerySection>
<GallerySection title="Resizable sidebar">
<GalleryFrame height="24rem">
<UDashboardGroup storage="local" storage-key="gallery-sidebar-resizable" class="h-full w-full">
<UDashboardSidebar
resizable
:min-size="12"
:max-size="30"
:default-size="20"
:toggle="false"
class="relative! hidden! md:flex!"
>
<template #header>
<div class="flex items-center gap-2 px-4 py-3">
<UIcon name="i-material-symbols-bolt" class="text-primary h-5 w-5 shrink-0" />
<span class="font-semibold text-sm text-[var(--ui-text)] truncate">ARCP Console</span>
</div>
</template>
<UNavigationMenu
:items="navItems"
orientation="vertical"
class="w-full"
/>
</UDashboardSidebar>
<div class="flex flex-1 flex-col p-6 overflow-auto">
<p class="text-sm text-[var(--ui-text-muted)]">Drag the resize handle to adjust sidebar width.</p>
</div>
</UDashboardGroup>
</GalleryFrame>
</GallerySection>
<GallerySection title="Right-side sidebar">
<GalleryFrame height="24rem">
<UDashboardGroup storage="local" storage-key="gallery-sidebar-right" class="h-full w-full">
<div class="flex flex-1 flex-col p-6 gap-3 overflow-auto">
<p class="text-sm text-[var(--ui-text-muted)]">Main content area</p>
<UAlert
color="info"
variant="soft"
title="Runtime event"
description="Job j-9f3a submitted to worker pool."
icon="i-material-symbols-notifications-outline"
/>
<UAlert
color="success"
variant="soft"
title="Agent ready"
description="Agent ag-7b2c accepted lease and started session."
icon="i-material-symbols-check-circle-outline"
/>
</div>
<UDashboardSidebar side="right" :toggle="false" class="relative! hidden! md:flex!">
<template #header>
<div class="px-4 py-3 border-b border-[var(--ui-border)]">
<p class="text-xs font-semibold uppercase tracking-wider text-[var(--ui-text-muted)]">Activity</p>
</div>
</template>
<div class="flex flex-col gap-2 p-3">
<div v-for="item in [
{ label: 'Job queued', color: 'info', icon: 'i-material-symbols-pending-outline', time: '2s ago' },
{ label: 'Lease granted', color: 'success', icon: 'i-material-symbols-lock-outline', time: '4s ago' },
{ label: 'Trace started', color: 'primary', icon: 'i-material-symbols-timeline-outline', time: '5s ago' },
]" :key="item.label" class="flex items-start gap-2 text-xs">
<UIcon :name="item.icon" :class="`text-${item.color} h-4 w-4 shrink-0 mt-0.5`" />
<div class="flex-1 min-w-0">
<p class="font-medium text-[var(--ui-text)]">{{ item.label }}</p>
<p class="text-[var(--ui-text-muted)]">{{ item.time }}</p>
</div>
</div>
</div>
</UDashboardSidebar>
</UDashboardGroup>
</GalleryFrame>
</GallerySection>
</div>
</template>