@burdenoff/microfe-vibecontrols 2026.528.2 → 2026.528.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/components/audit/AuditLogDetail.js.map +1 -1
- package/dist/components/audit/AuditLogTable.js.map +1 -1
- package/dist/components/settings/WorkspaceDefaultsSection.js.map +1 -1
- package/dist/components/shared/ConfirmDialog.js.map +1 -1
- package/dist/components/shared/EmptyState.js.map +1 -1
- package/dist/components/targets/TargetCard.js +82 -74
- package/dist/components/targets/TargetCard.js.map +1 -1
- package/dist/components/tunnels/TunnelCreateWizard.js.map +1 -1
- package/dist/generated/wspace-operations.js +1 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/pages/OverviewPage.js.map +1 -1
- package/dist/pages/SessionDetailsPage.js +10 -1
- package/dist/pages/SessionDetailsPage.js.map +1 -1
- package/dist/pages/SessionsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +274 -259
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/VibeAuditPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/tunnels/ProvidersTab.js.map +1 -1
- package/package.json +1 -1
|
@@ -55,17 +55,17 @@ var Ye = {
|
|
|
55
55
|
function $e(e) {
|
|
56
56
|
return e.agents.length > 0;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
let { t:
|
|
60
|
-
let n =
|
|
58
|
+
function et() {
|
|
59
|
+
let { t: et } = Oe(), { workspaceId: u } = ue(), d = de(), { hasPermission: tt, isLoading: nt } = Ue(), [rt] = He(), f = rt.get("selectedTargetId"), [p, it] = a(""), [m, at] = a(null), [h, ot] = a("all"), [g, st] = a("all"), [ct, lt] = a("grid"), [ut, _] = a(!1), [v, y] = a(null), [dt, ft] = a(!1), [b, x] = a(/* @__PURE__ */ new Set()), [S, C] = a(null), [pt, w] = a(!1), T = r((e, t) => {
|
|
60
|
+
let n = et(e);
|
|
61
61
|
return n === e ? t : n;
|
|
62
|
-
}, [
|
|
62
|
+
}, [et]), [E, mt] = a(null), [D, ht] = a(null), [gt, _t] = a(null), [O, k] = a(null), [A, vt] = a(!1), [yt, j] = a(null), [M, bt] = a(""), [N, xt] = a(""), [St, Ct] = a(""), [wt, Tt] = a(22), [P, Et] = a(""), [F, Dt] = a("key"), [I, Ot] = a(""), [L, kt] = a(""), [R, At] = a(""), [z, jt] = a("DIRECT"), [B, Mt] = a(""), [V, Nt] = a(""), [H, Pt] = a(""), [U, Ft] = a(""), [It, Lt] = a(22), [W, Rt] = a(""), [G, zt] = a("key"), [Bt, Vt] = a(""), [Ht, Ut] = a(""), [Wt, Gt] = a(""), [K, Kt] = a(""), { data: qt, loading: q, refetch: J } = ae({
|
|
63
63
|
variables: {
|
|
64
|
-
workspaceId:
|
|
64
|
+
workspaceId: u || "",
|
|
65
65
|
limit: 50,
|
|
66
66
|
offset: 0
|
|
67
67
|
},
|
|
68
|
-
skip: !
|
|
68
|
+
skip: !u,
|
|
69
69
|
fetchPolicy: "cache-first"
|
|
70
70
|
}), { agents: Jt, refetch: Yt } = fe(), [Xt] = te({
|
|
71
71
|
refetchQueries: ["VibeControlsInitialData", "ListTargets"],
|
|
@@ -97,39 +97,39 @@ function u() {
|
|
|
97
97
|
agentApiKey: null
|
|
98
98
|
})), [Jt]), Q = i(() => {
|
|
99
99
|
let e = X;
|
|
100
|
-
if (
|
|
101
|
-
let t =
|
|
100
|
+
if (p) {
|
|
101
|
+
let t = p.toLowerCase();
|
|
102
102
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.host?.toLowerCase().includes(t) || e.label?.toLowerCase().includes(t));
|
|
103
103
|
}
|
|
104
|
-
return
|
|
104
|
+
return m && (e = e.filter((e) => e.agents.some((e) => e.id === m))), h !== "all" && (e = e.filter((e) => e.type === h)), g !== "all" && (e = e.filter((e) => e.status === g)), e;
|
|
105
105
|
}, [
|
|
106
106
|
X,
|
|
107
|
+
p,
|
|
107
108
|
m,
|
|
108
109
|
h,
|
|
109
|
-
g
|
|
110
|
-
_
|
|
110
|
+
g
|
|
111
111
|
]);
|
|
112
112
|
De(() => {
|
|
113
|
-
if (!
|
|
113
|
+
if (!f || !Q.find((e) => e.id === f)) return;
|
|
114
114
|
let e = window.setTimeout(() => {
|
|
115
|
-
document.getElementById(`target-row-${
|
|
115
|
+
document.getElementById(`target-row-${f}`)?.scrollIntoView({
|
|
116
116
|
behavior: "smooth",
|
|
117
117
|
block: "center"
|
|
118
118
|
});
|
|
119
119
|
}, 150);
|
|
120
120
|
return () => window.clearTimeout(e);
|
|
121
|
-
}, [Q,
|
|
122
|
-
let on = X.filter((e) => e.status === "connected").length, sn = Q.length > 0 && Q.every((e) =>
|
|
121
|
+
}, [Q, f]);
|
|
122
|
+
let on = X.filter((e) => e.status === "connected").length, sn = Q.length > 0 && Q.every((e) => b.has(e.id)), cn = b.size > 0;
|
|
123
123
|
De(() => {
|
|
124
|
-
if (!
|
|
124
|
+
if (!gt || !E) return;
|
|
125
125
|
let e = !1, t = () => {
|
|
126
126
|
an({ variables: {
|
|
127
|
-
targetId:
|
|
128
|
-
jobId:
|
|
127
|
+
targetId: E.id,
|
|
128
|
+
jobId: gt
|
|
129
129
|
} }).then((t) => {
|
|
130
130
|
if (e) return;
|
|
131
131
|
let n = t.data?.installAgentJobStatus;
|
|
132
|
-
n && (n.steps ||= [],
|
|
132
|
+
n && (n.steps ||= [], ht({
|
|
133
133
|
id: n.jobId,
|
|
134
134
|
status: n.status,
|
|
135
135
|
currentStep: n.currentStep ?? 0,
|
|
@@ -145,15 +145,15 @@ function u() {
|
|
|
145
145
|
e = !0, clearInterval(n);
|
|
146
146
|
};
|
|
147
147
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
gt,
|
|
149
|
+
E,
|
|
150
150
|
an,
|
|
151
151
|
J
|
|
152
152
|
]);
|
|
153
153
|
let ln = r(async () => {
|
|
154
|
-
if (!(!B || !
|
|
154
|
+
if (!(!B || !u) && !(z !== "DIRECT" && (!H || !U || !W))) try {
|
|
155
155
|
let e = await Xt({ variables: {
|
|
156
|
-
workspaceId:
|
|
156
|
+
workspaceId: u,
|
|
157
157
|
input: {
|
|
158
158
|
type: z,
|
|
159
159
|
name: B,
|
|
@@ -170,28 +170,28 @@ function u() {
|
|
|
170
170
|
} });
|
|
171
171
|
if (e.error) {
|
|
172
172
|
if (n(e.error)) {
|
|
173
|
-
|
|
173
|
+
_(!1), w(!0);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
C({
|
|
177
177
|
id: "create",
|
|
178
178
|
success: !1,
|
|
179
179
|
message: e.error.message || "Failed to create target"
|
|
180
|
-
}), setTimeout(() =>
|
|
180
|
+
}), setTimeout(() => C(null), 5e3);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
let t = e.data?.createTarget?.id;
|
|
184
|
-
|
|
184
|
+
_(!1), Mt(""), Ft(""), Rt(""), Vt(""), Ut(""), Gt(""), Kt(""), t && await Qt(t), J(), Yt();
|
|
185
185
|
} catch (e) {
|
|
186
186
|
if (n(e)) {
|
|
187
|
-
|
|
187
|
+
_(!1), ee(), w(!0);
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
C({
|
|
191
191
|
id: "create",
|
|
192
192
|
success: !1,
|
|
193
193
|
message: e instanceof Error ? e.message : "Failed to create target"
|
|
194
|
-
}), setTimeout(() =>
|
|
194
|
+
}), setTimeout(() => C(null), 5e3);
|
|
195
195
|
}
|
|
196
196
|
}, [
|
|
197
197
|
B,
|
|
@@ -206,183 +206,193 @@ function u() {
|
|
|
206
206
|
K,
|
|
207
207
|
V,
|
|
208
208
|
z,
|
|
209
|
-
|
|
209
|
+
u,
|
|
210
210
|
Xt,
|
|
211
211
|
Qt,
|
|
212
212
|
J
|
|
213
213
|
]), un = r(async (e) => {
|
|
214
214
|
let t = (await en({ variables: { id: e } })).data?.testTarget;
|
|
215
|
-
t && (
|
|
215
|
+
t && (C({
|
|
216
216
|
id: e,
|
|
217
217
|
success: t.success,
|
|
218
218
|
message: t.message || ""
|
|
219
|
-
}), setTimeout(() =>
|
|
220
|
-
}, [en, J]), dn = r(async (e) => {
|
|
219
|
+
}), setTimeout(() => C(null), 5e3), J());
|
|
220
|
+
}, [en, J]), [dn, fn] = a(/* @__PURE__ */ new Set()), pn = r(async (e) => {
|
|
221
|
+
fn((t) => {
|
|
222
|
+
let n = new Set(t);
|
|
223
|
+
return n.add(e), n;
|
|
224
|
+
});
|
|
221
225
|
try {
|
|
222
226
|
let t = await tn({ variables: { targetId: e } });
|
|
223
227
|
if (t.error && n(t.error)) {
|
|
224
|
-
ee(),
|
|
228
|
+
ee(), w(!0);
|
|
225
229
|
return;
|
|
226
230
|
}
|
|
227
231
|
let te = t.data?.startTerminal;
|
|
228
|
-
te?.sessionId &&
|
|
232
|
+
te?.sessionId && d(`/sessions/${te.sessionId}`);
|
|
229
233
|
} catch (e) {
|
|
230
234
|
if (n(e)) {
|
|
231
|
-
ee(),
|
|
235
|
+
ee(), w(!0);
|
|
232
236
|
return;
|
|
233
237
|
}
|
|
234
238
|
throw e;
|
|
239
|
+
} finally {
|
|
240
|
+
fn((t) => {
|
|
241
|
+
if (!t.has(e)) return t;
|
|
242
|
+
let n = new Set(t);
|
|
243
|
+
return n.delete(e), n;
|
|
244
|
+
});
|
|
235
245
|
}
|
|
236
|
-
}, [tn,
|
|
237
|
-
if (
|
|
246
|
+
}, [tn, d]), mn = r(async () => {
|
|
247
|
+
if (v) {
|
|
238
248
|
try {
|
|
239
|
-
await Y({ variables: { id:
|
|
249
|
+
await Y({ variables: { id: v } }), ge() && _e("success");
|
|
240
250
|
} catch (e) {
|
|
241
251
|
throw ge() && _e("error"), e;
|
|
242
252
|
}
|
|
243
|
-
|
|
253
|
+
y(null), x((e) => {
|
|
244
254
|
let t = new Set(e);
|
|
245
|
-
return t.delete(
|
|
255
|
+
return t.delete(v), t;
|
|
246
256
|
}), J();
|
|
247
257
|
}
|
|
248
258
|
}, [
|
|
249
|
-
|
|
259
|
+
v,
|
|
250
260
|
Y,
|
|
251
261
|
J
|
|
252
|
-
]),
|
|
253
|
-
let e = Array.from(
|
|
254
|
-
await Promise.all(e.map((e) => Y({ variables: { id: e } }))),
|
|
262
|
+
]), hn = r(async () => {
|
|
263
|
+
let e = Array.from(b);
|
|
264
|
+
await Promise.all(e.map((e) => Y({ variables: { id: e } }))), x(/* @__PURE__ */ new Set()), ft(!1), J();
|
|
255
265
|
}, [
|
|
256
|
-
|
|
266
|
+
b,
|
|
257
267
|
Y,
|
|
258
268
|
J
|
|
259
|
-
]),
|
|
260
|
-
|
|
269
|
+
]), gn = r(async (e) => {
|
|
270
|
+
mt(e), ht(null), _t(null);
|
|
261
271
|
let t = Z.find((e) => e.isActive);
|
|
262
272
|
if (!t) return;
|
|
263
273
|
let n = (await nn({ variables: {
|
|
264
274
|
targetId: e.id,
|
|
265
275
|
sourceAgentId: t.id
|
|
266
276
|
} })).data?.installAgentOnTarget;
|
|
267
|
-
n?.jobId &&
|
|
268
|
-
}, [nn, Z]),
|
|
277
|
+
n?.jobId && _t(n.jobId);
|
|
278
|
+
}, [nn, Z]), _n = r(async (e) => {
|
|
269
279
|
await rn({ variables: { targetId: e.id } }), J();
|
|
270
|
-
}, [rn, J]),
|
|
271
|
-
|
|
272
|
-
}, []),
|
|
273
|
-
if (
|
|
274
|
-
if (!
|
|
275
|
-
|
|
280
|
+
}, [rn, J]), vn = r((e) => {
|
|
281
|
+
k(e), bt(e.name), xt(e.label ?? ""), Ct(e.host ?? ""), Tt(e.port ?? 22), Et(e.username ?? ""), Dt("key"), Ot(""), kt(""), At(e.tags.join(", ")), j(null);
|
|
282
|
+
}, []), yn = r(async () => {
|
|
283
|
+
if (O) {
|
|
284
|
+
if (!M.trim()) {
|
|
285
|
+
j("Name is required");
|
|
276
286
|
return;
|
|
277
287
|
}
|
|
278
|
-
|
|
288
|
+
vt(!0), j(null);
|
|
279
289
|
try {
|
|
280
290
|
let e = await $t({ variables: {
|
|
281
|
-
id:
|
|
291
|
+
id: O.id,
|
|
282
292
|
input: {
|
|
283
|
-
name:
|
|
284
|
-
label:
|
|
285
|
-
host:
|
|
286
|
-
port:
|
|
287
|
-
username:
|
|
288
|
-
password:
|
|
289
|
-
privateKeyPath:
|
|
293
|
+
name: M.trim(),
|
|
294
|
+
label: N.trim() || null,
|
|
295
|
+
host: St.trim() || void 0,
|
|
296
|
+
port: wt || void 0,
|
|
297
|
+
username: P.trim() || void 0,
|
|
298
|
+
password: O.type === "SSH" && F === "password" && I ? I : void 0,
|
|
299
|
+
privateKeyPath: O.type === "SSH" && F === "key" && L ? L : void 0,
|
|
290
300
|
tags: R ? R.split(",").map((e) => e.trim()).filter(Boolean) : []
|
|
291
301
|
}
|
|
292
302
|
} });
|
|
293
303
|
if (e.error) {
|
|
294
|
-
|
|
304
|
+
j(e.error.message || "Failed to update target");
|
|
295
305
|
return;
|
|
296
306
|
}
|
|
297
|
-
|
|
307
|
+
k(null), J();
|
|
298
308
|
} catch (e) {
|
|
299
|
-
|
|
309
|
+
j(e instanceof Error ? e.message : "Failed to update target");
|
|
300
310
|
} finally {
|
|
301
|
-
|
|
311
|
+
vt(!1);
|
|
302
312
|
}
|
|
303
313
|
}
|
|
304
314
|
}, [
|
|
305
|
-
|
|
315
|
+
O,
|
|
316
|
+
M,
|
|
317
|
+
N,
|
|
318
|
+
St,
|
|
319
|
+
wt,
|
|
306
320
|
P,
|
|
307
|
-
yt,
|
|
308
|
-
xt,
|
|
309
|
-
Ct,
|
|
310
|
-
Tt,
|
|
311
321
|
F,
|
|
312
322
|
I,
|
|
313
323
|
L,
|
|
314
324
|
R,
|
|
315
325
|
$t,
|
|
316
326
|
J
|
|
317
|
-
]),
|
|
318
|
-
|
|
319
|
-
}, []),
|
|
320
|
-
|
|
327
|
+
]), bn = r(() => {
|
|
328
|
+
mt(null), ht(null), _t(null);
|
|
329
|
+
}, []), xn = r(() => {
|
|
330
|
+
x(sn ? (e) => {
|
|
321
331
|
let t = new Set(e);
|
|
322
332
|
return Q.forEach((e) => t.delete(e.id)), t;
|
|
323
333
|
} : (e) => {
|
|
324
334
|
let t = new Set(e);
|
|
325
335
|
return Q.forEach((e) => t.add(e.id)), t;
|
|
326
336
|
});
|
|
327
|
-
}, [sn, Q]),
|
|
328
|
-
|
|
337
|
+
}, [sn, Q]), Sn = r((e) => {
|
|
338
|
+
x((t) => {
|
|
329
339
|
let n = new Set(t);
|
|
330
340
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
331
341
|
});
|
|
332
|
-
}, []),
|
|
342
|
+
}, []), Cn = {
|
|
333
343
|
total: X.length,
|
|
334
344
|
connected: on
|
|
335
|
-
},
|
|
345
|
+
}, wn = i(() => [
|
|
336
346
|
{
|
|
337
347
|
value: "all",
|
|
338
|
-
label:
|
|
348
|
+
label: T("targets.filterTypeAll", "All Types")
|
|
339
349
|
},
|
|
340
350
|
{
|
|
341
351
|
value: "DIRECT",
|
|
342
|
-
label:
|
|
352
|
+
label: T("targets.typeDirect", "Direct")
|
|
343
353
|
},
|
|
344
354
|
{
|
|
345
355
|
value: "SSH",
|
|
346
356
|
label: "SSH"
|
|
347
357
|
}
|
|
348
|
-
], [
|
|
358
|
+
], [T]), Tn = i(() => [
|
|
349
359
|
{
|
|
350
360
|
value: "all",
|
|
351
|
-
label:
|
|
361
|
+
label: T("targets.filterStatusAll", "All Statuses")
|
|
352
362
|
},
|
|
353
363
|
{
|
|
354
364
|
value: "connected",
|
|
355
|
-
label:
|
|
365
|
+
label: T("targets.connected", "Connected")
|
|
356
366
|
},
|
|
357
367
|
{
|
|
358
368
|
value: "disconnected",
|
|
359
|
-
label:
|
|
369
|
+
label: T("targets.disconnected", "Disconnected")
|
|
360
370
|
},
|
|
361
371
|
{
|
|
362
372
|
value: "unknown",
|
|
363
|
-
label:
|
|
373
|
+
label: T("targets.unknown", "Unknown")
|
|
364
374
|
}
|
|
365
|
-
], [
|
|
366
|
-
return
|
|
375
|
+
], [T]), $ = p || m || h !== "all" || g !== "all";
|
|
376
|
+
return nt ? /* @__PURE__ */ c("div", {
|
|
367
377
|
className: "flex items-center justify-center min-h-[400px]",
|
|
368
378
|
children: /* @__PURE__ */ c("p", {
|
|
369
379
|
className: "text-text-secondary",
|
|
370
380
|
children: "Loading permissions…"
|
|
371
381
|
})
|
|
372
|
-
}) :
|
|
382
|
+
}) : tt(we.TARGET_LIST) ? /* @__PURE__ */ l(qe, {
|
|
373
383
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
374
384
|
children: [
|
|
375
|
-
|
|
376
|
-
className: `fixed top-4 right-4 z-[10000] rounded-md px-4 py-3 shadow-lg text-sm max-w-md ${
|
|
385
|
+
S && /* @__PURE__ */ l("div", {
|
|
386
|
+
className: `fixed top-4 right-4 z-[10000] rounded-md px-4 py-3 shadow-lg text-sm max-w-md ${S.success ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
|
|
377
387
|
children: [
|
|
378
|
-
|
|
388
|
+
S.success ? T("targets.connectionSuccessful", "Connection successful") : S.id === "create" ? T("targets.createFailed", "Failed to create target") : T("targets.connectionFailed", "Connection failed"),
|
|
379
389
|
": ",
|
|
380
|
-
|
|
390
|
+
S.message
|
|
381
391
|
]
|
|
382
392
|
}),
|
|
383
393
|
/* @__PURE__ */ c(pe, {
|
|
384
|
-
title:
|
|
385
|
-
description: `${
|
|
394
|
+
title: T("nav.targets", "Targets"),
|
|
395
|
+
description: `${Cn.connected} of ${Cn.total} targets online`,
|
|
386
396
|
actions: /* @__PURE__ */ l("div", {
|
|
387
397
|
className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
|
|
388
398
|
children: [/* @__PURE__ */ c("button", {
|
|
@@ -390,13 +400,13 @@ function u() {
|
|
|
390
400
|
onClick: () => void J(),
|
|
391
401
|
disabled: q,
|
|
392
402
|
className: "flex items-center justify-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
393
|
-
title:
|
|
403
|
+
title: T("targets.refreshTitle", "Refresh targets"),
|
|
394
404
|
children: /* @__PURE__ */ c(Le, { className: `size-4 ${q ? "animate-spin" : ""}` })
|
|
395
405
|
}), /* @__PURE__ */ l("button", {
|
|
396
406
|
type: "button",
|
|
397
|
-
onClick: () =>
|
|
407
|
+
onClick: () => _(!0),
|
|
398
408
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
399
|
-
children: [/* @__PURE__ */ c(Ie, { className: "size-4" }),
|
|
409
|
+
children: [/* @__PURE__ */ c(Ie, { className: "size-4" }), T("targets.addTarget", "Add Target")]
|
|
400
410
|
})]
|
|
401
411
|
})
|
|
402
412
|
}),
|
|
@@ -409,23 +419,23 @@ function u() {
|
|
|
409
419
|
children: [/* @__PURE__ */ l("div", {
|
|
410
420
|
className: "flex items-center gap-2",
|
|
411
421
|
children: [/* @__PURE__ */ c(ye, {
|
|
412
|
-
value:
|
|
413
|
-
onChange:
|
|
414
|
-
placeholder:
|
|
422
|
+
value: p,
|
|
423
|
+
onChange: it,
|
|
424
|
+
placeholder: T("targets.searchPlaceholder", "Search targets..."),
|
|
415
425
|
className: "flex-1 sm:w-64 sm:flex-none"
|
|
416
426
|
}), /* @__PURE__ */ l("div", {
|
|
417
427
|
className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
|
|
418
428
|
children: [/* @__PURE__ */ c("button", {
|
|
419
429
|
type: "button",
|
|
420
|
-
onClick: () =>
|
|
421
|
-
className: `p-1.5 sm:p-2 rounded ${
|
|
422
|
-
title:
|
|
430
|
+
onClick: () => lt("grid"),
|
|
431
|
+
className: `p-1.5 sm:p-2 rounded ${ct === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
|
|
432
|
+
title: T("targets.gridViewTitle", "Grid view"),
|
|
423
433
|
children: /* @__PURE__ */ c(Me, { className: "size-4 text-text-secondary" })
|
|
424
434
|
}), /* @__PURE__ */ c("button", {
|
|
425
435
|
type: "button",
|
|
426
|
-
onClick: () =>
|
|
427
|
-
className: `p-1.5 sm:p-2 rounded ${
|
|
428
|
-
title:
|
|
436
|
+
onClick: () => lt("list"),
|
|
437
|
+
className: `p-1.5 sm:p-2 rounded ${ct === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
|
|
438
|
+
title: T("targets.listViewTitle", "List view"),
|
|
429
439
|
children: /* @__PURE__ */ c(Ne, { className: "size-4 text-text-secondary" })
|
|
430
440
|
})]
|
|
431
441
|
})]
|
|
@@ -433,25 +443,25 @@ function u() {
|
|
|
433
443
|
className: "flex items-center gap-2 sm:gap-3 flex-wrap",
|
|
434
444
|
children: [
|
|
435
445
|
/* @__PURE__ */ c(be, {
|
|
436
|
-
label:
|
|
437
|
-
value:
|
|
438
|
-
options:
|
|
439
|
-
onChange:
|
|
446
|
+
label: T("sessions.filterType", "Type"),
|
|
447
|
+
value: h,
|
|
448
|
+
options: wn,
|
|
449
|
+
onChange: ot
|
|
440
450
|
}),
|
|
441
451
|
/* @__PURE__ */ c(be, {
|
|
442
|
-
label:
|
|
443
|
-
value:
|
|
444
|
-
options:
|
|
445
|
-
onChange:
|
|
452
|
+
label: T("sessions.filterStatus", "Status"),
|
|
453
|
+
value: g,
|
|
454
|
+
options: Tn,
|
|
455
|
+
onChange: st
|
|
446
456
|
}),
|
|
447
457
|
/* @__PURE__ */ c(Ce, {
|
|
448
|
-
value:
|
|
449
|
-
onChange: (e) =>
|
|
458
|
+
value: m ?? "",
|
|
459
|
+
onChange: (e) => at(e || null),
|
|
450
460
|
options: Z.map((e) => ({
|
|
451
461
|
value: e.id,
|
|
452
462
|
label: e.name
|
|
453
463
|
})),
|
|
454
|
-
placeholder:
|
|
464
|
+
placeholder: T("targets.allAgents", "All agents"),
|
|
455
465
|
className: "w-full sm:min-w-[180px] sm:w-auto",
|
|
456
466
|
dropdownAlign: "left",
|
|
457
467
|
clearable: !0
|
|
@@ -465,9 +475,9 @@ function u() {
|
|
|
465
475
|
className: "ml-auto flex items-center gap-2",
|
|
466
476
|
children: /* @__PURE__ */ l("button", {
|
|
467
477
|
type: "button",
|
|
468
|
-
onClick:
|
|
478
|
+
onClick: xn,
|
|
469
479
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
470
|
-
children: [/* @__PURE__ */ c(je, { className: "size-3.5" }), sn ?
|
|
480
|
+
children: [/* @__PURE__ */ c(je, { className: "size-3.5" }), sn ? T("targets.deselectAll", "Deselect All") : T("targets.selectAll", "Select All")]
|
|
471
481
|
})
|
|
472
482
|
})
|
|
473
483
|
}),
|
|
@@ -476,43 +486,43 @@ function u() {
|
|
|
476
486
|
children: [/* @__PURE__ */ l("span", {
|
|
477
487
|
className: "text-sm font-medium text-text-primary",
|
|
478
488
|
children: [
|
|
479
|
-
|
|
489
|
+
b.size,
|
|
480
490
|
" ",
|
|
481
|
-
|
|
482
|
-
|
|
491
|
+
T("nav.targets", "target"),
|
|
492
|
+
b.size === 1 ? "" : "s",
|
|
483
493
|
" ",
|
|
484
|
-
|
|
494
|
+
T("sessions.selected", "selected")
|
|
485
495
|
]
|
|
486
496
|
}), /* @__PURE__ */ l("div", {
|
|
487
497
|
className: "flex items-center gap-1.5 sm:ml-auto",
|
|
488
498
|
children: [/* @__PURE__ */ l("button", {
|
|
489
499
|
type: "button",
|
|
490
|
-
onClick: () =>
|
|
500
|
+
onClick: () => ft(!0),
|
|
491
501
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-status-error-text bg-status-error-bg border border-status-error-text/20 rounded-md hover:bg-status-error-bg/80 transition-colors",
|
|
492
502
|
children: [
|
|
493
503
|
/* @__PURE__ */ c(ze, { className: "size-3" }),
|
|
494
504
|
" ",
|
|
495
|
-
|
|
505
|
+
T("common.delete", "Delete")
|
|
496
506
|
]
|
|
497
507
|
}), /* @__PURE__ */ l("button", {
|
|
498
508
|
type: "button",
|
|
499
|
-
onClick: () =>
|
|
509
|
+
onClick: () => x(/* @__PURE__ */ new Set()),
|
|
500
510
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
501
511
|
children: [
|
|
502
512
|
/* @__PURE__ */ c(Ve, { className: "size-3" }),
|
|
503
513
|
" ",
|
|
504
|
-
|
|
514
|
+
T("sessions.deselect", "Deselect")
|
|
505
515
|
]
|
|
506
516
|
})]
|
|
507
517
|
})]
|
|
508
518
|
}),
|
|
509
519
|
$ ? /* @__PURE__ */ l("p", {
|
|
510
520
|
className: "text-sm text-text-secondary",
|
|
511
|
-
children: [
|
|
521
|
+
children: [T("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Q.length)).replace("{{total}}", String(X.length)), q && /* @__PURE__ */ l("span", {
|
|
512
522
|
className: "ml-2 text-text-muted",
|
|
513
523
|
children: [
|
|
514
524
|
"(",
|
|
515
|
-
|
|
525
|
+
T("sessions.refreshing", "refreshing..."),
|
|
516
526
|
")"
|
|
517
527
|
]
|
|
518
528
|
})]
|
|
@@ -522,7 +532,7 @@ function u() {
|
|
|
522
532
|
count: 6
|
|
523
533
|
}) : Q.length > 0 ? /* @__PURE__ */ c(We, {
|
|
524
534
|
mode: "wait",
|
|
525
|
-
children:
|
|
535
|
+
children: ct === "grid" ? /* @__PURE__ */ c(Ke, {
|
|
526
536
|
stagger: .04,
|
|
527
537
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
528
538
|
children: Q.map((e) => /* @__PURE__ */ c(Ge, {
|
|
@@ -530,22 +540,23 @@ function u() {
|
|
|
530
540
|
children: /* @__PURE__ */ c(Ee, {
|
|
531
541
|
target: e,
|
|
532
542
|
onTest: (e) => void un(e),
|
|
533
|
-
onTerminal: (e) => void
|
|
534
|
-
onOpenDetail: (e) =>
|
|
535
|
-
onEdit: (e) =>
|
|
536
|
-
onInstallAgent: (e) => void
|
|
537
|
-
onUninstallAgent: (e) => void
|
|
538
|
-
onDelete: (e) =>
|
|
539
|
-
selected:
|
|
540
|
-
onToggleSelect: () =>
|
|
541
|
-
highlighted:
|
|
543
|
+
onTerminal: (e) => void pn(e),
|
|
544
|
+
onOpenDetail: (e) => d(`/targets/${e}`),
|
|
545
|
+
onEdit: (e) => vn(e),
|
|
546
|
+
onInstallAgent: (e) => void gn(e),
|
|
547
|
+
onUninstallAgent: (e) => void _n(e),
|
|
548
|
+
onDelete: (e) => y(e),
|
|
549
|
+
selected: b.has(e.id),
|
|
550
|
+
onToggleSelect: () => Sn(e.id),
|
|
551
|
+
highlighted: f === e.id,
|
|
552
|
+
isStartingTerminal: dn.has(e.id)
|
|
542
553
|
})
|
|
543
554
|
}, e.id))
|
|
544
555
|
}, "grid-view") : /* @__PURE__ */ c(Ke, {
|
|
545
556
|
stagger: .04,
|
|
546
557
|
className: "space-y-2",
|
|
547
558
|
children: Q.map((e) => {
|
|
548
|
-
let t = $e(e), n =
|
|
559
|
+
let t = $e(e), n = f === e.id;
|
|
549
560
|
return /* @__PURE__ */ c(Ge, {
|
|
550
561
|
variant: "fadeRight",
|
|
551
562
|
children: /* @__PURE__ */ l("div", {
|
|
@@ -556,8 +567,8 @@ function u() {
|
|
|
556
567
|
children: [/* @__PURE__ */ c("input", {
|
|
557
568
|
"aria-label": "control",
|
|
558
569
|
type: "checkbox",
|
|
559
|
-
checked:
|
|
560
|
-
onChange: () =>
|
|
570
|
+
checked: b.has(e.id),
|
|
571
|
+
onChange: () => Sn(e.id),
|
|
561
572
|
className: "rounded border-border-default mt-1"
|
|
562
573
|
}), /* @__PURE__ */ l("div", {
|
|
563
574
|
className: "flex min-w-0 flex-1 flex-wrap items-start gap-2",
|
|
@@ -568,7 +579,7 @@ function u() {
|
|
|
568
579
|
}),
|
|
569
580
|
/* @__PURE__ */ c("span", {
|
|
570
581
|
className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Qe[e.status]}`,
|
|
571
|
-
children:
|
|
582
|
+
children: T(`targets.status.${e.status}`, Xe[e.status].label)
|
|
572
583
|
}),
|
|
573
584
|
/* @__PURE__ */ l("div", {
|
|
574
585
|
className: "min-w-0 basis-full",
|
|
@@ -586,7 +597,7 @@ function u() {
|
|
|
586
597
|
}),
|
|
587
598
|
t && /* @__PURE__ */ l("span", {
|
|
588
599
|
className: "inline-flex items-center gap-1 rounded-full border border-status-success-border px-2 py-0.5 text-xs bg-status-success-bg-subtle text-status-success-text",
|
|
589
|
-
children: [/* @__PURE__ */ c(Ae, { size: 10 }),
|
|
600
|
+
children: [/* @__PURE__ */ c(Ae, { size: 10 }), T("targets.agentInstalled", "Agent Installed")]
|
|
590
601
|
})
|
|
591
602
|
]
|
|
592
603
|
}),
|
|
@@ -602,7 +613,7 @@ function u() {
|
|
|
602
613
|
}), e.agents.length > 0 && /* @__PURE__ */ l("span", {
|
|
603
614
|
className: "text-text-tertiary",
|
|
604
615
|
children: [
|
|
605
|
-
|
|
616
|
+
T("targets.via", "via"),
|
|
606
617
|
" ",
|
|
607
618
|
e.agents[0].name
|
|
608
619
|
]
|
|
@@ -625,45 +636,49 @@ function u() {
|
|
|
625
636
|
/* @__PURE__ */ c("button", {
|
|
626
637
|
type: "button",
|
|
627
638
|
onClick: () => void un(e.id),
|
|
628
|
-
title:
|
|
639
|
+
title: T("targets.testConnectivity", "Test connectivity"),
|
|
629
640
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors",
|
|
630
|
-
children:
|
|
641
|
+
children: T("targets.test", "Test")
|
|
631
642
|
}),
|
|
632
643
|
/* @__PURE__ */ c("button", {
|
|
633
644
|
type: "button",
|
|
634
|
-
onClick: () => void
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
645
|
+
onClick: () => void pn(e.id),
|
|
646
|
+
disabled: dn.has(e.id),
|
|
647
|
+
title: T("targets.openTerminal", "Open terminal"),
|
|
648
|
+
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
|
|
649
|
+
children: dn.has(e.id) ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(Pe, {
|
|
650
|
+
size: 12,
|
|
651
|
+
className: "animate-spin"
|
|
652
|
+
}), T("targets.starting", "Starting…")] }) : T("targets.terminal", "Terminal")
|
|
638
653
|
}),
|
|
639
654
|
/* @__PURE__ */ l("button", {
|
|
640
655
|
type: "button",
|
|
641
|
-
onClick: () =>
|
|
656
|
+
onClick: () => vn(e),
|
|
642
657
|
title: "Edit target configuration",
|
|
643
658
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md border border-border-default bg-bg-surface hover:bg-bg-sunken transition-colors",
|
|
644
659
|
children: [/* @__PURE__ */ c(Fe, { size: 14 }), "Edit"]
|
|
645
660
|
}),
|
|
646
661
|
e.type !== "DIRECT" && !t && /* @__PURE__ */ c("button", {
|
|
647
662
|
type: "button",
|
|
648
|
-
onClick: () => void
|
|
649
|
-
title:
|
|
663
|
+
onClick: () => void gn(e),
|
|
664
|
+
title: T("targets.installAgent", "Install agent"),
|
|
650
665
|
className: "flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
|
|
651
|
-
children:
|
|
666
|
+
children: T("targets.installAgent", "Install Agent")
|
|
652
667
|
}),
|
|
653
668
|
e.type !== "DIRECT" && t && /* @__PURE__ */ c("button", {
|
|
654
669
|
type: "button",
|
|
655
|
-
onClick: () => void
|
|
656
|
-
title:
|
|
670
|
+
onClick: () => void _n(e),
|
|
671
|
+
title: T("targets.uninstallAgent", "Uninstall agent"),
|
|
657
672
|
className: "flex items-center gap-1.5 rounded-md border border-status-error-text/20 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/80 transition-colors",
|
|
658
|
-
children:
|
|
673
|
+
children: T("targets.uninstall", "Uninstall")
|
|
659
674
|
}),
|
|
660
675
|
/* @__PURE__ */ c("div", { className: "hidden flex-1 sm:block" }),
|
|
661
676
|
/* @__PURE__ */ l("button", {
|
|
662
677
|
type: "button",
|
|
663
|
-
onClick: () =>
|
|
664
|
-
title:
|
|
678
|
+
onClick: () => y(e.id),
|
|
679
|
+
title: T("targets.deleteTarget", "Delete target"),
|
|
665
680
|
className: "flex items-center gap-1.5 rounded-md border border-status-error-border px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/80 transition-colors",
|
|
666
|
-
children: [/* @__PURE__ */ c(o, { size: 14 }),
|
|
681
|
+
children: [/* @__PURE__ */ c(o, { size: 14 }), T("common.delete", "Delete")]
|
|
667
682
|
})
|
|
668
683
|
]
|
|
669
684
|
})]
|
|
@@ -673,28 +688,28 @@ function u() {
|
|
|
673
688
|
}, "list-view")
|
|
674
689
|
}) : /* @__PURE__ */ c(ve, {
|
|
675
690
|
icon: /* @__PURE__ */ c(Re, { className: "size-8 text-text-secondary" }),
|
|
676
|
-
title: $ ?
|
|
677
|
-
description: $ ?
|
|
691
|
+
title: $ ? T("targets.emptyNoTargetsFound", "No targets found") : T("targets.emptyNoTargetsConfigured", "No targets configured"),
|
|
692
|
+
description: $ ? T("targets.emptyAdjustSearch", "Try adjusting your search or filters") : T("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
|
|
678
693
|
action: $ ? void 0 : /* @__PURE__ */ l("div", {
|
|
679
694
|
className: "flex items-center gap-2",
|
|
680
695
|
children: [/* @__PURE__ */ l("button", {
|
|
681
696
|
type: "button",
|
|
682
|
-
onClick: () =>
|
|
697
|
+
onClick: () => _(!0),
|
|
683
698
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
684
|
-
children: [/* @__PURE__ */ c(Ie, { className: "size-4" }),
|
|
699
|
+
children: [/* @__PURE__ */ c(Ie, { className: "size-4" }), T("targets.addTarget", "Add Target")]
|
|
685
700
|
}), /* @__PURE__ */ c(Se, { prompt: "What is a Target in VibeControls and how do I create one?" })]
|
|
686
701
|
})
|
|
687
702
|
}),
|
|
688
|
-
|
|
703
|
+
ut && /* @__PURE__ */ l("div", {
|
|
689
704
|
className: "fixed inset-0 z-50 flex items-start justify-center pt-16 overflow-y-auto",
|
|
690
705
|
children: [/* @__PURE__ */ c("div", {
|
|
691
706
|
role: "button",
|
|
692
707
|
tabIndex: 0,
|
|
693
708
|
onKeyDown: (e) => {
|
|
694
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
709
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), _(!1));
|
|
695
710
|
},
|
|
696
711
|
className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm",
|
|
697
|
-
onClick: () =>
|
|
712
|
+
onClick: () => _(!1)
|
|
698
713
|
}), /* @__PURE__ */ l("div", {
|
|
699
714
|
className: "relative bg-bg-elevated rounded-xl shadow-2xl border border-border-default max-w-lg w-full mx-4 p-6 space-y-4 mb-8",
|
|
700
715
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -703,10 +718,10 @@ function u() {
|
|
|
703
718
|
className: "flex items-start justify-between gap-3",
|
|
704
719
|
children: [/* @__PURE__ */ c("h2", {
|
|
705
720
|
className: "text-lg font-semibold",
|
|
706
|
-
children:
|
|
721
|
+
children: T("targets.addTarget", "Add Target")
|
|
707
722
|
}), /* @__PURE__ */ c("button", {
|
|
708
723
|
type: "button",
|
|
709
|
-
onClick: () =>
|
|
724
|
+
onClick: () => _(!1),
|
|
710
725
|
className: "p-1 rounded-lg hover:bg-bg-sunken transition-colors",
|
|
711
726
|
children: /* @__PURE__ */ c(o, { size: 18 })
|
|
712
727
|
})]
|
|
@@ -717,7 +732,7 @@ function u() {
|
|
|
717
732
|
/* @__PURE__ */ l("div", { children: [
|
|
718
733
|
/* @__PURE__ */ c("label", {
|
|
719
734
|
className: "text-sm font-medium block mb-1.5",
|
|
720
|
-
children:
|
|
735
|
+
children: T("targets.targetType", "Target Type")
|
|
721
736
|
}),
|
|
722
737
|
/* @__PURE__ */ c("div", {
|
|
723
738
|
className: "grid grid-cols-2 gap-2",
|
|
@@ -730,34 +745,34 @@ function u() {
|
|
|
730
745
|
}),
|
|
731
746
|
/* @__PURE__ */ c("p", {
|
|
732
747
|
className: "text-xs text-text-tertiary mt-1",
|
|
733
|
-
children: z === "DIRECT" ?
|
|
748
|
+
children: z === "DIRECT" ? T("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : T("targets.targetTypeSshHint", "A remote server accessible via SSH.")
|
|
734
749
|
})
|
|
735
750
|
] }),
|
|
736
751
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
737
752
|
className: "text-sm font-medium",
|
|
738
|
-
children:
|
|
753
|
+
children: T("webhooks.name", "Name")
|
|
739
754
|
}), /* @__PURE__ */ c("input", {
|
|
740
755
|
"aria-label": "control",
|
|
741
756
|
value: B,
|
|
742
757
|
onChange: (e) => Mt(e.target.value),
|
|
743
758
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
744
|
-
placeholder: z === "DIRECT" ?
|
|
759
|
+
placeholder: z === "DIRECT" ? T("targets.namePlaceholderDirect", "My Laptop") : T("targets.namePlaceholderServer", "Production Server")
|
|
745
760
|
})] }),
|
|
746
761
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
747
762
|
className: "text-sm font-medium",
|
|
748
|
-
children:
|
|
763
|
+
children: T("targets.descriptionOptional", "Description (optional)")
|
|
749
764
|
}), /* @__PURE__ */ c("input", {
|
|
750
765
|
"aria-label": "control",
|
|
751
766
|
value: V,
|
|
752
767
|
onChange: (e) => Nt(e.target.value),
|
|
753
768
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
754
|
-
placeholder:
|
|
769
|
+
placeholder: T("targets.descriptionPlaceholder", "Brief description of this target")
|
|
755
770
|
})] }),
|
|
756
771
|
z !== "DIRECT" && /* @__PURE__ */ l(s, { children: [
|
|
757
772
|
/* @__PURE__ */ l("div", { children: [
|
|
758
773
|
/* @__PURE__ */ c("label", {
|
|
759
774
|
className: "text-sm font-medium",
|
|
760
|
-
children:
|
|
775
|
+
children: T("targets.sourceAgent", "Source Agent")
|
|
761
776
|
}),
|
|
762
777
|
/* @__PURE__ */ l("select", {
|
|
763
778
|
value: H,
|
|
@@ -765,7 +780,7 @@ function u() {
|
|
|
765
780
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
766
781
|
children: [/* @__PURE__ */ c("option", {
|
|
767
782
|
value: "",
|
|
768
|
-
children:
|
|
783
|
+
children: T("targets.selectAgentConnectFrom", "Select an agent to connect from")
|
|
769
784
|
}), Z.map((e) => /* @__PURE__ */ c("option", {
|
|
770
785
|
value: e.id,
|
|
771
786
|
children: e.name
|
|
@@ -774,11 +789,11 @@ function u() {
|
|
|
774
789
|
/* @__PURE__ */ l("p", {
|
|
775
790
|
className: "text-xs text-text-tertiary mt-0.5",
|
|
776
791
|
children: [
|
|
777
|
-
|
|
792
|
+
T("targets.agentConnectionHintPrefix", "The agent that will establish the"),
|
|
778
793
|
" ",
|
|
779
794
|
z,
|
|
780
795
|
" ",
|
|
781
|
-
|
|
796
|
+
T("targets.agentConnectionHintSuffix", "connection to this target.")
|
|
782
797
|
]
|
|
783
798
|
})
|
|
784
799
|
] }),
|
|
@@ -786,16 +801,16 @@ function u() {
|
|
|
786
801
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
787
802
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
788
803
|
className: "text-sm font-medium",
|
|
789
|
-
children:
|
|
804
|
+
children: T("targets.host", "Host")
|
|
790
805
|
}), /* @__PURE__ */ c("input", {
|
|
791
806
|
"aria-label": "control",
|
|
792
807
|
value: U,
|
|
793
808
|
onChange: (e) => Ft(e.target.value),
|
|
794
809
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
795
|
-
placeholder:
|
|
810
|
+
placeholder: T("targets.hostPlaceholder", "192.168.1.100")
|
|
796
811
|
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
797
812
|
className: "text-sm font-medium",
|
|
798
|
-
children:
|
|
813
|
+
children: T("tunnels.port", "Port")
|
|
799
814
|
}), /* @__PURE__ */ c("input", {
|
|
800
815
|
"aria-label": "control",
|
|
801
816
|
type: "number",
|
|
@@ -806,17 +821,17 @@ function u() {
|
|
|
806
821
|
}),
|
|
807
822
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
808
823
|
className: "text-sm font-medium",
|
|
809
|
-
children:
|
|
824
|
+
children: T("targets.username", "Username")
|
|
810
825
|
}), /* @__PURE__ */ c("input", {
|
|
811
826
|
"aria-label": "control",
|
|
812
827
|
value: W,
|
|
813
828
|
onChange: (e) => Rt(e.target.value),
|
|
814
829
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
815
|
-
placeholder:
|
|
830
|
+
placeholder: T("targets.usernamePlaceholder", "root")
|
|
816
831
|
})] }),
|
|
817
832
|
z === "SSH" && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
818
833
|
className: "text-sm font-medium",
|
|
819
|
-
children:
|
|
834
|
+
children: T("targets.authentication", "Authentication")
|
|
820
835
|
}), /* @__PURE__ */ l("div", {
|
|
821
836
|
className: "flex gap-4 mt-1",
|
|
822
837
|
children: [/* @__PURE__ */ l("label", {
|
|
@@ -826,7 +841,7 @@ function u() {
|
|
|
826
841
|
type: "radio",
|
|
827
842
|
checked: G === "password",
|
|
828
843
|
onChange: () => zt("password")
|
|
829
|
-
}),
|
|
844
|
+
}), T("targets.password", "Password")]
|
|
830
845
|
}), /* @__PURE__ */ l("label", {
|
|
831
846
|
className: "flex items-center gap-2 cursor-pointer text-sm",
|
|
832
847
|
children: [/* @__PURE__ */ c("input", {
|
|
@@ -834,11 +849,11 @@ function u() {
|
|
|
834
849
|
type: "radio",
|
|
835
850
|
checked: G === "key",
|
|
836
851
|
onChange: () => zt("key")
|
|
837
|
-
}),
|
|
852
|
+
}), T("targets.privateKey", "Private Key")]
|
|
838
853
|
})]
|
|
839
854
|
})] }), G === "password" ? /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
840
855
|
className: "text-sm font-medium",
|
|
841
|
-
children:
|
|
856
|
+
children: T("targets.password", "Password")
|
|
842
857
|
}), /* @__PURE__ */ c("input", {
|
|
843
858
|
"aria-label": "control",
|
|
844
859
|
type: "password",
|
|
@@ -847,34 +862,34 @@ function u() {
|
|
|
847
862
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
|
|
848
863
|
})] }) : /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
849
864
|
className: "text-sm font-medium",
|
|
850
|
-
children:
|
|
865
|
+
children: T("targets.privateKeyPath", "Private Key Path")
|
|
851
866
|
}), /* @__PURE__ */ c("input", {
|
|
852
867
|
"aria-label": "control",
|
|
853
868
|
value: Ht,
|
|
854
869
|
onChange: (e) => Ut(e.target.value),
|
|
855
870
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
856
|
-
placeholder:
|
|
871
|
+
placeholder: T("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
|
|
857
872
|
})] })] })
|
|
858
873
|
] }),
|
|
859
874
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
860
875
|
className: "text-sm font-medium",
|
|
861
|
-
children:
|
|
876
|
+
children: T("targets.labelOptional", "Label (optional)")
|
|
862
877
|
}), /* @__PURE__ */ c("input", {
|
|
863
878
|
"aria-label": "control",
|
|
864
879
|
value: Wt,
|
|
865
880
|
onChange: (e) => Gt(e.target.value),
|
|
866
881
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
867
|
-
placeholder:
|
|
882
|
+
placeholder: T("targets.labelPlaceholder", "web-server-01")
|
|
868
883
|
})] }),
|
|
869
884
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
870
885
|
className: "text-sm font-medium",
|
|
871
|
-
children:
|
|
886
|
+
children: T("targets.tagsCommaSeparated", "Tags (comma-separated)")
|
|
872
887
|
}), /* @__PURE__ */ c("input", {
|
|
873
888
|
"aria-label": "control",
|
|
874
889
|
value: K,
|
|
875
890
|
onChange: (e) => Kt(e.target.value),
|
|
876
891
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
877
|
-
placeholder:
|
|
892
|
+
placeholder: T("targets.tagsPlaceholder", "production, web")
|
|
878
893
|
})] })
|
|
879
894
|
]
|
|
880
895
|
}),
|
|
@@ -882,7 +897,7 @@ function u() {
|
|
|
882
897
|
className: "border-t border-border-default pt-3",
|
|
883
898
|
children: [/* @__PURE__ */ c("h3", {
|
|
884
899
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
885
|
-
children:
|
|
900
|
+
children: T("targets.tags", "Tags")
|
|
886
901
|
}), /* @__PURE__ */ c(me, {
|
|
887
902
|
entityType: "VIBECONTROLS_TARGET",
|
|
888
903
|
onDraftChange: Zt
|
|
@@ -892,29 +907,29 @@ function u() {
|
|
|
892
907
|
className: "flex justify-end gap-2 pt-2 border-t border-border-default",
|
|
893
908
|
children: [/* @__PURE__ */ c("button", {
|
|
894
909
|
type: "button",
|
|
895
|
-
onClick: () =>
|
|
910
|
+
onClick: () => _(!1),
|
|
896
911
|
className: "px-4 py-2 text-sm rounded-md border border-border-default hover:bg-bg-sunken transition-colors",
|
|
897
|
-
children:
|
|
912
|
+
children: T("common.cancel", "Cancel")
|
|
898
913
|
}), /* @__PURE__ */ c("button", {
|
|
899
914
|
type: "button",
|
|
900
915
|
onClick: () => void ln(),
|
|
901
916
|
className: "px-4 py-2 text-sm rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
|
|
902
|
-
children:
|
|
917
|
+
children: T("targets.addTarget", "Add Target")
|
|
903
918
|
})]
|
|
904
919
|
})
|
|
905
920
|
]
|
|
906
921
|
})]
|
|
907
922
|
}),
|
|
908
|
-
|
|
923
|
+
O && /* @__PURE__ */ l("div", {
|
|
909
924
|
className: "fixed inset-0 z-50 flex items-start justify-center pt-16 overflow-y-auto",
|
|
910
925
|
children: [/* @__PURE__ */ c("div", {
|
|
911
926
|
role: "button",
|
|
912
927
|
tabIndex: 0,
|
|
913
928
|
onKeyDown: (e) => {
|
|
914
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), !
|
|
929
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), !A && k(null));
|
|
915
930
|
},
|
|
916
931
|
className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm",
|
|
917
|
-
onClick: () => !
|
|
932
|
+
onClick: () => !A && k(null)
|
|
918
933
|
}), /* @__PURE__ */ l("div", {
|
|
919
934
|
className: "relative bg-bg-elevated rounded-xl shadow-2xl border border-border-default max-w-lg w-full mx-4 p-6 space-y-4 mb-8",
|
|
920
935
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -926,18 +941,18 @@ function u() {
|
|
|
926
941
|
children: "Edit Target"
|
|
927
942
|
}), /* @__PURE__ */ c("p", {
|
|
928
943
|
className: "text-sm text-text-secondary mt-0.5",
|
|
929
|
-
children:
|
|
944
|
+
children: O.name
|
|
930
945
|
})] }), /* @__PURE__ */ c("button", {
|
|
931
946
|
type: "button",
|
|
932
|
-
onClick: () =>
|
|
933
|
-
disabled:
|
|
947
|
+
onClick: () => k(null),
|
|
948
|
+
disabled: A,
|
|
934
949
|
className: "p-1 rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
935
950
|
children: /* @__PURE__ */ c(o, { size: 18 })
|
|
936
951
|
})]
|
|
937
952
|
}),
|
|
938
|
-
|
|
953
|
+
yt && /* @__PURE__ */ c("div", {
|
|
939
954
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
940
|
-
children:
|
|
955
|
+
children: yt
|
|
941
956
|
}),
|
|
942
957
|
/* @__PURE__ */ l("div", {
|
|
943
958
|
className: "space-y-4",
|
|
@@ -949,8 +964,8 @@ function u() {
|
|
|
949
964
|
}), /* @__PURE__ */ c("input", {
|
|
950
965
|
id: "targetspage-67",
|
|
951
966
|
"aria-label": "Production Server",
|
|
952
|
-
value:
|
|
953
|
-
onChange: (e) =>
|
|
967
|
+
value: M,
|
|
968
|
+
onChange: (e) => bt(e.target.value),
|
|
954
969
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
955
970
|
placeholder: "Production Server"
|
|
956
971
|
})] }),
|
|
@@ -961,12 +976,12 @@ function u() {
|
|
|
961
976
|
}), /* @__PURE__ */ c("input", {
|
|
962
977
|
id: "targetspage-66",
|
|
963
978
|
"aria-label": "web-server-01",
|
|
964
|
-
value:
|
|
965
|
-
onChange: (e) =>
|
|
979
|
+
value: N,
|
|
980
|
+
onChange: (e) => xt(e.target.value),
|
|
966
981
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
967
982
|
placeholder: "web-server-01"
|
|
968
983
|
})] }),
|
|
969
|
-
|
|
984
|
+
O.type !== "DIRECT" && /* @__PURE__ */ l(s, { children: [
|
|
970
985
|
/* @__PURE__ */ l("div", {
|
|
971
986
|
className: "grid grid-cols-2 gap-3",
|
|
972
987
|
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
@@ -976,8 +991,8 @@ function u() {
|
|
|
976
991
|
}), /* @__PURE__ */ c("input", {
|
|
977
992
|
id: "targetspage-65",
|
|
978
993
|
"aria-label": "192.168.1.100",
|
|
979
|
-
value:
|
|
980
|
-
onChange: (e) =>
|
|
994
|
+
value: St,
|
|
995
|
+
onChange: (e) => Ct(e.target.value),
|
|
981
996
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
982
997
|
placeholder: "192.168.1.100"
|
|
983
998
|
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
@@ -988,8 +1003,8 @@ function u() {
|
|
|
988
1003
|
id: "targetspage-64",
|
|
989
1004
|
"aria-label": "control",
|
|
990
1005
|
type: "number",
|
|
991
|
-
value:
|
|
992
|
-
onChange: (e) =>
|
|
1006
|
+
value: wt,
|
|
1007
|
+
onChange: (e) => Tt(Number(e.target.value)),
|
|
993
1008
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
|
|
994
1009
|
})] })]
|
|
995
1010
|
}),
|
|
@@ -1000,12 +1015,12 @@ function u() {
|
|
|
1000
1015
|
}), /* @__PURE__ */ c("input", {
|
|
1001
1016
|
id: "targetspage-63",
|
|
1002
1017
|
"aria-label": "root",
|
|
1003
|
-
value:
|
|
1018
|
+
value: P,
|
|
1004
1019
|
onChange: (e) => Et(e.target.value),
|
|
1005
1020
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
1006
1021
|
placeholder: "root"
|
|
1007
1022
|
})] }),
|
|
1008
|
-
|
|
1023
|
+
O.type === "SSH" && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", { children: [
|
|
1009
1024
|
/* @__PURE__ */ c("label", {
|
|
1010
1025
|
htmlFor: "targetspage-62",
|
|
1011
1026
|
className: "text-sm font-medium",
|
|
@@ -1079,40 +1094,40 @@ function u() {
|
|
|
1079
1094
|
className: "flex justify-end gap-2 pt-2 border-t border-border-default",
|
|
1080
1095
|
children: [/* @__PURE__ */ c("button", {
|
|
1081
1096
|
type: "button",
|
|
1082
|
-
onClick: () =>
|
|
1083
|
-
disabled:
|
|
1097
|
+
onClick: () => k(null),
|
|
1098
|
+
disabled: A,
|
|
1084
1099
|
className: "px-4 py-2 text-sm rounded-lg border border-border-default hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
1085
1100
|
children: "Cancel"
|
|
1086
1101
|
}), /* @__PURE__ */ c("button", {
|
|
1087
1102
|
type: "button",
|
|
1088
|
-
onClick: () => void
|
|
1089
|
-
disabled:
|
|
1103
|
+
onClick: () => void yn(),
|
|
1104
|
+
disabled: A,
|
|
1090
1105
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm text-action-primary-text transition-colors hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
1091
|
-
children:
|
|
1106
|
+
children: A ? "Saving..." : "Save Changes"
|
|
1092
1107
|
})]
|
|
1093
1108
|
})
|
|
1094
1109
|
]
|
|
1095
1110
|
})]
|
|
1096
1111
|
}),
|
|
1097
1112
|
/* @__PURE__ */ c(e, {
|
|
1098
|
-
isOpen: !!
|
|
1099
|
-
onClose: () =>
|
|
1100
|
-
onConfirm: () => void
|
|
1101
|
-
title:
|
|
1102
|
-
message:
|
|
1103
|
-
confirmLabel:
|
|
1113
|
+
isOpen: !!v,
|
|
1114
|
+
onClose: () => y(null),
|
|
1115
|
+
onConfirm: () => void mn(),
|
|
1116
|
+
title: T("targets.deleteTarget", "Delete Target"),
|
|
1117
|
+
message: T("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
|
|
1118
|
+
confirmLabel: T("common.delete", "Delete"),
|
|
1104
1119
|
variant: "danger"
|
|
1105
1120
|
}),
|
|
1106
1121
|
/* @__PURE__ */ c(e, {
|
|
1107
|
-
isOpen:
|
|
1108
|
-
onClose: () =>
|
|
1109
|
-
onConfirm: () => void
|
|
1110
|
-
title:
|
|
1111
|
-
message: `${
|
|
1112
|
-
confirmLabel:
|
|
1122
|
+
isOpen: dt,
|
|
1123
|
+
onClose: () => ft(!1),
|
|
1124
|
+
onConfirm: () => void hn(),
|
|
1125
|
+
title: T("targets.deleteSelectedTargets", "Delete Selected Targets"),
|
|
1126
|
+
message: `${T("targets.confirmDeleteSelectedPrefix", "Are you sure you want to delete")} ${b.size} ${T("nav.targets", "target")}${b.size === 1 ? "" : "s"}? ${T("targets.confirmDeleteSelectedSuffix", "This action cannot be undone.")}`,
|
|
1127
|
+
confirmLabel: T("targets.deleteAll", "Delete All"),
|
|
1113
1128
|
variant: "danger"
|
|
1114
1129
|
}),
|
|
1115
|
-
|
|
1130
|
+
E && /* @__PURE__ */ c("div", {
|
|
1116
1131
|
className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50",
|
|
1117
1132
|
children: /* @__PURE__ */ l("div", {
|
|
1118
1133
|
className: "bg-bg-elevated rounded-xl shadow-xl max-w-md w-full mx-4 p-6",
|
|
@@ -1122,20 +1137,20 @@ function u() {
|
|
|
1122
1137
|
children: [/* @__PURE__ */ l("h2", {
|
|
1123
1138
|
className: "text-lg font-semibold break-words",
|
|
1124
1139
|
children: [
|
|
1125
|
-
|
|
1140
|
+
T("targets.installingAgentOn", "Installing Agent on"),
|
|
1126
1141
|
" ",
|
|
1127
|
-
|
|
1142
|
+
E.name
|
|
1128
1143
|
]
|
|
1129
|
-
}),
|
|
1144
|
+
}), D?.status !== "running" && /* @__PURE__ */ c("button", {
|
|
1130
1145
|
type: "button",
|
|
1131
|
-
onClick:
|
|
1146
|
+
onClick: bn,
|
|
1132
1147
|
className: "p-1 rounded hover:bg-bg-sunken",
|
|
1133
1148
|
children: /* @__PURE__ */ c(o, { size: 16 })
|
|
1134
1149
|
})]
|
|
1135
1150
|
}),
|
|
1136
1151
|
/* @__PURE__ */ c("div", {
|
|
1137
1152
|
className: "space-y-2 mt-4",
|
|
1138
|
-
children:
|
|
1153
|
+
children: D && D.steps ? D.steps.map((e, t) => /* @__PURE__ */ l("div", {
|
|
1139
1154
|
className: "flex items-center gap-3",
|
|
1140
1155
|
children: [
|
|
1141
1156
|
e.status === "running" && /* @__PURE__ */ c(Pe, {
|
|
@@ -1157,7 +1172,7 @@ function u() {
|
|
|
1157
1172
|
e.status === "pending" && /* @__PURE__ */ c("div", { className: "size-4 rounded-full border-2 border-border-default" }),
|
|
1158
1173
|
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("div", {
|
|
1159
1174
|
className: "text-sm font-medium",
|
|
1160
|
-
children:
|
|
1175
|
+
children: T(`targets.installStep.${e.name}`, Ye[e.name] ?? e.name)
|
|
1161
1176
|
}), e.message && /* @__PURE__ */ c("div", {
|
|
1162
1177
|
className: "text-xs text-text-tertiary",
|
|
1163
1178
|
children: e.message
|
|
@@ -1170,33 +1185,33 @@ function u() {
|
|
|
1170
1185
|
size: 16
|
|
1171
1186
|
}), /* @__PURE__ */ c("span", {
|
|
1172
1187
|
className: "text-sm",
|
|
1173
|
-
children:
|
|
1188
|
+
children: T("targets.startingInstallJob", "Starting install job...")
|
|
1174
1189
|
})]
|
|
1175
1190
|
})
|
|
1176
1191
|
}),
|
|
1177
|
-
|
|
1192
|
+
D?.status === "completed" && /* @__PURE__ */ c("div", {
|
|
1178
1193
|
className: "mt-4 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1179
|
-
children:
|
|
1194
|
+
children: T("targets.agentInstalledSuccess", "Agent installed successfully!")
|
|
1180
1195
|
}),
|
|
1181
|
-
|
|
1196
|
+
D?.status === "failed" && /* @__PURE__ */ c("div", {
|
|
1182
1197
|
className: "mt-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
1183
|
-
children:
|
|
1198
|
+
children: D.error ?? T("targets.installationFailed", "Installation failed.")
|
|
1184
1199
|
}),
|
|
1185
1200
|
/* @__PURE__ */ c("button", {
|
|
1186
1201
|
type: "button",
|
|
1187
|
-
onClick:
|
|
1188
|
-
disabled:
|
|
1202
|
+
onClick: bn,
|
|
1203
|
+
disabled: D?.status === "running",
|
|
1189
1204
|
className: "mt-4 w-full px-4 py-2 rounded-md border border-border-default hover:bg-bg-sunken transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium",
|
|
1190
|
-
children: !
|
|
1205
|
+
children: !D || D.status === "running" ? T("targets.installing", "Installing...") : T("common.close", "Close")
|
|
1191
1206
|
})
|
|
1192
1207
|
]
|
|
1193
1208
|
})
|
|
1194
1209
|
}),
|
|
1195
1210
|
/* @__PURE__ */ c(e, {
|
|
1196
|
-
isOpen:
|
|
1197
|
-
onClose: () =>
|
|
1211
|
+
isOpen: pt,
|
|
1212
|
+
onClose: () => w(!1),
|
|
1198
1213
|
onConfirm: () => {
|
|
1199
|
-
|
|
1214
|
+
w(!1), d("/billing");
|
|
1200
1215
|
},
|
|
1201
1216
|
title: t("environment").title,
|
|
1202
1217
|
message: t("environment").message,
|
|
@@ -1220,6 +1235,6 @@ function u() {
|
|
|
1220
1235
|
});
|
|
1221
1236
|
}
|
|
1222
1237
|
//#endregion
|
|
1223
|
-
export {
|
|
1238
|
+
export { et as TargetsPage };
|
|
1224
1239
|
|
|
1225
1240
|
//# sourceMappingURL=TargetsPage.js.map
|