-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormField.vue
More file actions
147 lines (130 loc) · 5.27 KB
/
Copy pathFormField.vue
File metadata and controls
147 lines (130 loc) · 5.27 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
<script setup lang="ts">
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const
const agentName = ref('orchestrator-7')
const sessionId = ref('')
const leaseTimeout = ref('')
const runtimeUrl = ref('')
const traceLevel = ref('')
const tagsValue = ref('')
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Basic usage">
<div class="flex w-full max-w-sm flex-col gap-4">
<UFormField label="Agent name" name="agent-name" description="Unique identifier for this runtime agent.">
<UInput v-model="agentName" placeholder="e.g. orchestrator-7" class="w-full" />
</UFormField>
<UFormField label="Session ID" name="session-id" hint="Optional">
<UInput v-model="sessionId" placeholder="sess_01JXYZ…" class="w-full" />
</UFormField>
</div>
</GallerySection>
<GallerySection title="Required">
<div class="flex w-full max-w-sm flex-col gap-4">
<UFormField label="Runtime URL" name="runtime-url" required description="WebSocket endpoint for the ARCP runtime.">
<UInput v-model="runtimeUrl" placeholder="wss://runtime.example.com" class="w-full" />
</UFormField>
<UFormField label="Lease timeout (s)" name="lease-timeout" required>
<UInput v-model="leaseTimeout" type="number" placeholder="30" class="w-full" />
</UFormField>
</div>
</GallerySection>
<GallerySection title="With error">
<div class="flex w-full max-w-sm flex-col gap-4">
<UFormField
label="Trace level"
name="trace-level"
error="Trace level must be one of: debug, info, warn, error."
>
<UInput v-model="traceLevel" placeholder="verbose" class="w-full" />
</UFormField>
<UFormField
label="Event tags"
name="event-tags"
error="Maximum 5 tags per event."
description="Comma-separated labels attached to emitted events."
>
<UInput v-model="tagsValue" placeholder="job, runtime, trace" class="w-full" />
</UFormField>
</div>
</GallerySection>
<GallerySection title="With help text">
<div class="flex w-full max-w-sm flex-col gap-4">
<UFormField
label="Job concurrency"
name="job-concurrency"
description="Number of jobs the agent may run in parallel."
help="Increasing this value may exhaust available lease slots."
>
<UInput placeholder="4" type="number" class="w-full" />
</UFormField>
</div>
</GallerySection>
<GallerySection title="Sizes">
<div class="flex w-full max-w-sm flex-col gap-4">
<UFormField
v-for="s in sizes"
:key="s"
:label="`Size ${s}`"
:size="s"
:name="`size-${s}`"
:hint="s"
>
<UInput :size="s" :placeholder="`Agent ID (${s})`" class="w-full" />
</UFormField>
</div>
</GallerySection>
<GallerySection title="Orientation: horizontal">
<div class="flex w-full max-w-md flex-col gap-4">
<UFormField
label="Enable tracing"
name="enable-tracing"
orientation="horizontal"
description="Emit structured trace events for every job step."
>
<USwitch />
</UFormField>
<UFormField
label="Auto-renew leases"
name="auto-renew"
orientation="horizontal"
description="Automatically renew job leases before they expire."
>
<USwitch default-value />
</UFormField>
</div>
</GallerySection>
<GallerySection title="Realistic — New runtime form">
<div class="flex w-full max-w-sm flex-col gap-5">
<UFormField label="Runtime name" name="rt-name" required description="Human-readable label shown in the dashboard.">
<UInput placeholder="prod-us-east-1" icon="i-material-symbols-memory-outline" class="w-full" />
</UFormField>
<UFormField label="Endpoint URL" name="rt-endpoint" required description="WebSocket base URL the agent will connect to.">
<UInput placeholder="wss://runtime.acme.io" icon="i-material-symbols-link" class="w-full" />
</UFormField>
<UFormField
label="Max concurrent jobs"
name="rt-concurrency"
hint="1 – 256"
help="Higher values require a Business or Enterprise plan."
>
<UInput type="number" placeholder="8" icon="i-material-symbols-layers-outline" class="w-full" />
</UFormField>
<UFormField label="Environment" name="rt-env" description="Target environment tag attached to every dispatched job.">
<USelect
:items="['production', 'staging', 'development']"
placeholder="Select environment"
class="w-full"
/>
</UFormField>
<UFormField label="Verbose tracing" name="rt-tracing" orientation="horizontal" description="Stream trace events to the session log.">
<USwitch />
</UFormField>
<div class="flex justify-end gap-2 pt-2">
<UButton variant="ghost" color="neutral">Cancel</UButton>
<UButton icon="i-material-symbols-rocket-launch-outline">Register runtime</UButton>
</div>
</div>
</GallerySection>
</div>
</template>