@burdenoff/microfe-vibecontrols 2026.527.1 → 2026.527.2
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/dist/pages/TargetsPage.js +456 -434
- package/dist/pages/TargetsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { ConfirmDialog as e } from "../components/shared/ConfirmDialog.js";
|
|
2
|
-
import { getQuotaDialogContent as t, isQuotaExhaustedError as n, markQuotaHandledLocally as
|
|
3
|
-
import { useCreateTargetMutation as
|
|
4
|
-
import { useVibeControls as
|
|
5
|
-
import
|
|
6
|
-
import { PageHeader as
|
|
7
|
-
import { EntityTagPicker as
|
|
8
|
-
import { useDraftEntityTags as
|
|
9
|
-
import { isNative as
|
|
10
|
-
import { EmptyState as
|
|
11
|
-
import { SearchInput as
|
|
12
|
-
import { FilterDropdown as
|
|
13
|
-
import { AgentSetupBanner as
|
|
14
|
-
import { GetHelpButton as
|
|
15
|
-
import { SearchableSelect as
|
|
2
|
+
import { getQuotaDialogContent as t, isQuotaExhaustedError as n, markQuotaHandledLocally as ee } from "../utils/quotaUtils.js";
|
|
3
|
+
import { useCreateTargetMutation as te, useDeleteTargetMutation as ne, useGetInstallAgentJobStatusLazyQuery as re, useInstallAgentOnTargetMutation as ie, useListTargetsQuery as ae, useStartTerminalMutation as oe, useTestTargetMutation as se, useUninstallAgentFromTargetMutation as ce, useUpdateTargetMutation as le } from "../generated/wspace-operations.js";
|
|
4
|
+
import { useVibeControls as ue, useVibeNavigate as de } from "../providers/VibeControlsProvider.js";
|
|
5
|
+
import fe from "../hooks/useCachedInitialData.js";
|
|
6
|
+
import { PageHeader as pe } from "../components/shared/PageHeader.js";
|
|
7
|
+
import { EntityTagPicker as me } from "../components/shared/EntityTagPicker.js";
|
|
8
|
+
import { useDraftEntityTags as he } from "../hooks/useDraftEntityTags.js";
|
|
9
|
+
import { isNative as ge, nativeNotify as _e } from "../utils/nativeBridge.js";
|
|
10
|
+
import { EmptyState as ve } from "../components/shared/EmptyState.js";
|
|
11
|
+
import { SearchInput as ye } from "../components/shared/SearchInput.js";
|
|
12
|
+
import { FilterDropdown as be } from "../components/shared/FilterDropdown.js";
|
|
13
|
+
import { AgentSetupBanner as xe } from "../components/shared/AgentSetupBanner.js";
|
|
14
|
+
import { GetHelpButton as Se } from "../components/shared/GetHelpButton.js";
|
|
15
|
+
import { SearchableSelect as Ce } from "../components/shared/SearchableSelect.js";
|
|
16
16
|
import "../components/shared/index.js";
|
|
17
|
-
import { VIBE_PERMISSIONS as
|
|
18
|
-
import { PageSkeleton as
|
|
19
|
-
import { TargetCard as
|
|
17
|
+
import { VIBE_PERMISSIONS as we } from "../constants/permissions.js";
|
|
18
|
+
import { PageSkeleton as Te } from "../components/shared/PageSkeleton.js";
|
|
19
|
+
import { TargetCard as Ee } from "../components/targets/TargetCard.js";
|
|
20
20
|
import "../components/targets/index.js";
|
|
21
|
-
import { useCallback as
|
|
22
|
-
import { useI18n as
|
|
23
|
-
import { Check as
|
|
24
|
-
import { useSearchParams as
|
|
25
|
-
import { usePermissions as
|
|
26
|
-
import { AnimatePresence as
|
|
27
|
-
import { Fragment as
|
|
28
|
-
import { MotionItem as
|
|
21
|
+
import { useCallback as r, useEffect as De, useMemo as i, useState as a } from "react";
|
|
22
|
+
import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
|
+
import { Check as ke, CheckCircle as Ae, CheckSquare as je, Grid as Me, List as Ne, Loader2 as Pe, Pencil as Fe, Plus as Ie, RefreshCw as Le, Server as Re, Trash2 as ze, X as o, XCircle as Be, XSquare as Ve } from "lucide-react";
|
|
24
|
+
import { useSearchParams as He } from "react-router-dom";
|
|
25
|
+
import { usePermissions as Ue } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
26
|
+
import { AnimatePresence as We } from "framer-motion";
|
|
27
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
28
|
+
import { MotionItem as Ge, MotionList as Ke, MotionPage as qe } from "@burdenoff/fe-libs/shared/motion";
|
|
29
29
|
//#region src/pages/TargetsPage.tsx
|
|
30
|
-
function
|
|
30
|
+
function Je(e) {
|
|
31
31
|
return e === "connected" ? "connected" : e === "disconnected" ? "disconnected" : "unknown";
|
|
32
32
|
}
|
|
33
|
-
var
|
|
33
|
+
var Ye = {
|
|
34
34
|
connect: "Connecting to server",
|
|
35
35
|
detect_os: "Detecting OS",
|
|
36
36
|
install_bun: "Installing Bun runtime",
|
|
@@ -40,26 +40,26 @@ var Je = {
|
|
|
40
40
|
verify: "Verifying health",
|
|
41
41
|
retrieve: "Retrieving agent details",
|
|
42
42
|
register: "Registering with backend"
|
|
43
|
-
},
|
|
43
|
+
}, Xe = {
|
|
44
44
|
connected: { label: "Connected" },
|
|
45
45
|
disconnected: { label: "Disconnected" },
|
|
46
46
|
unknown: { label: "Unknown" }
|
|
47
|
-
},
|
|
47
|
+
}, Ze = {
|
|
48
48
|
DIRECT: "bg-action-primary-bg/10 text-action-primary-bg",
|
|
49
49
|
SSH: "bg-status-success-bg-subtle text-status-success-text"
|
|
50
|
-
},
|
|
50
|
+
}, Qe = {
|
|
51
51
|
connected: "bg-status-success-bg-subtle text-status-success-text",
|
|
52
52
|
disconnected: "bg-status-error-bg-subtle text-status-error-text",
|
|
53
53
|
unknown: "bg-bg-sunken text-text-secondary"
|
|
54
54
|
};
|
|
55
|
-
function
|
|
55
|
+
function $e(e) {
|
|
56
56
|
return e.agents.length > 0;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
let { t:
|
|
60
|
-
let n =
|
|
58
|
+
function u() {
|
|
59
|
+
let { t: u } = Oe(), { workspaceId: d } = ue(), f = de(), { hasPermission: et, isLoading: tt } = Ue(), [nt] = He(), p = nt.get("selectedTargetId"), [m, rt] = a(""), [h, it] = a(null), [g, at] = a("all"), [_, ot] = a("all"), [st, ct] = a("grid"), [lt, v] = a(!1), [y, b] = a(null), [ut, dt] = a(!1), [x, S] = a(/* @__PURE__ */ new Set()), [C, w] = a(null), [ft, T] = a(!1), E = r((e, t) => {
|
|
60
|
+
let n = u(e);
|
|
61
61
|
return n === e ? t : n;
|
|
62
|
-
}, [
|
|
62
|
+
}, [u]), [D, pt] = a(null), [O, mt] = a(null), [ht, k] = a(null), [A, j] = a(null), [M, gt] = a(!1), [_t, N] = a(null), [P, vt] = a(""), [yt, bt] = a(""), [xt, St] = a(""), [Ct, wt] = a(22), [Tt, 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
64
|
workspaceId: d || "",
|
|
65
65
|
limit: 50,
|
|
@@ -67,10 +67,10 @@ function $e() {
|
|
|
67
67
|
},
|
|
68
68
|
skip: !d,
|
|
69
69
|
fetchPolicy: "cache-first"
|
|
70
|
-
}), { agents: Jt, refetch: Yt } =
|
|
70
|
+
}), { agents: Jt, refetch: Yt } = fe(), [Xt] = te({
|
|
71
71
|
refetchQueries: ["VibeControlsInitialData", "ListTargets"],
|
|
72
72
|
awaitRefetchQueries: !0
|
|
73
|
-
}), { setDraftTagIds: Zt, flushTags: Qt } =
|
|
73
|
+
}), { setDraftTagIds: Zt, flushTags: Qt } = he("VIBECONTROLS_TARGET"), [$t] = le(), [en] = se(), [tn] = oe(), [Y] = ne(), [nn] = ie(), [rn] = ce(), [an] = re({ fetchPolicy: "network-only" }), X = i(() => (qt?.targets?.items ?? []).map((e) => ({
|
|
74
74
|
id: e.id,
|
|
75
75
|
type: e.type || "DIRECT",
|
|
76
76
|
name: e.name,
|
|
@@ -78,7 +78,7 @@ function $e() {
|
|
|
78
78
|
host: e.host || null,
|
|
79
79
|
port: e.port || null,
|
|
80
80
|
username: e.username || null,
|
|
81
|
-
status:
|
|
81
|
+
status: Je(e.status),
|
|
82
82
|
connectionId: e.connectionId || null,
|
|
83
83
|
tags: e.tags,
|
|
84
84
|
metadata: e.metadata ?? null,
|
|
@@ -89,13 +89,13 @@ function $e() {
|
|
|
89
89
|
version: e.version,
|
|
90
90
|
isActive: e.isActive
|
|
91
91
|
}))
|
|
92
|
-
})), [qt]), Z =
|
|
92
|
+
})), [qt]), Z = i(() => Jt.map((e) => ({
|
|
93
93
|
id: e.id,
|
|
94
94
|
name: e.name,
|
|
95
95
|
isActive: e.isActive,
|
|
96
96
|
tunnelUrl: e.tunnelUrl ?? null,
|
|
97
97
|
agentApiKey: null
|
|
98
|
-
})), [Jt]), Q =
|
|
98
|
+
})), [Jt]), Q = i(() => {
|
|
99
99
|
let e = X;
|
|
100
100
|
if (m) {
|
|
101
101
|
let t = m.toLowerCase();
|
|
@@ -109,7 +109,7 @@ function $e() {
|
|
|
109
109
|
g,
|
|
110
110
|
_
|
|
111
111
|
]);
|
|
112
|
-
|
|
112
|
+
De(() => {
|
|
113
113
|
if (!p || !Q.find((e) => e.id === p)) return;
|
|
114
114
|
let e = window.setTimeout(() => {
|
|
115
115
|
document.getElementById(`target-row-${p}`)?.scrollIntoView({
|
|
@@ -120,16 +120,16 @@ function $e() {
|
|
|
120
120
|
return () => window.clearTimeout(e);
|
|
121
121
|
}, [Q, p]);
|
|
122
122
|
let on = X.filter((e) => e.status === "connected").length, sn = Q.length > 0 && Q.every((e) => x.has(e.id)), cn = x.size > 0;
|
|
123
|
-
|
|
124
|
-
if (!
|
|
123
|
+
De(() => {
|
|
124
|
+
if (!ht || !D) return;
|
|
125
125
|
let e = !1, t = () => {
|
|
126
126
|
an({ variables: {
|
|
127
|
-
targetId:
|
|
128
|
-
jobId:
|
|
127
|
+
targetId: D.id,
|
|
128
|
+
jobId: ht
|
|
129
129
|
} }).then((t) => {
|
|
130
130
|
if (e) return;
|
|
131
131
|
let n = t.data?.installAgentJobStatus;
|
|
132
|
-
n && (n.steps ||= [],
|
|
132
|
+
n && (n.steps ||= [], mt({
|
|
133
133
|
id: n.jobId,
|
|
134
134
|
status: n.status,
|
|
135
135
|
currentStep: n.currentStep ?? 0,
|
|
@@ -145,83 +145,100 @@ function $e() {
|
|
|
145
145
|
e = !0, clearInterval(n);
|
|
146
146
|
};
|
|
147
147
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
ht,
|
|
149
|
+
D,
|
|
150
150
|
an,
|
|
151
151
|
J
|
|
152
152
|
]);
|
|
153
|
-
let ln =
|
|
154
|
-
if (!(!
|
|
155
|
-
let e =
|
|
153
|
+
let ln = r(async () => {
|
|
154
|
+
if (!(!B || !d) && !(z !== "DIRECT" && (!H || !U || !W))) try {
|
|
155
|
+
let e = await Xt({ variables: {
|
|
156
156
|
workspaceId: d,
|
|
157
157
|
input: {
|
|
158
|
-
type:
|
|
159
|
-
name:
|
|
160
|
-
sourceAgentId:
|
|
161
|
-
host:
|
|
162
|
-
port:
|
|
163
|
-
username:
|
|
164
|
-
password:
|
|
165
|
-
privateKeyPath:
|
|
158
|
+
type: z,
|
|
159
|
+
name: B,
|
|
160
|
+
sourceAgentId: z === "DIRECT" ? void 0 : H,
|
|
161
|
+
host: z === "DIRECT" ? void 0 : U,
|
|
162
|
+
port: z === "DIRECT" ? void 0 : It,
|
|
163
|
+
username: z === "DIRECT" ? void 0 : W,
|
|
164
|
+
password: z === "SSH" && G === "password" ? Bt : void 0,
|
|
165
|
+
privateKeyPath: z === "SSH" && G === "key" ? Ht : void 0,
|
|
166
166
|
label: Wt || void 0,
|
|
167
167
|
tags: K ? K.split(",").map((e) => e.trim()) : void 0,
|
|
168
|
-
metadata:
|
|
168
|
+
metadata: V ? { description: V } : void 0
|
|
169
|
+
}
|
|
170
|
+
} });
|
|
171
|
+
if (e.error) {
|
|
172
|
+
if (n(e.error)) {
|
|
173
|
+
v(!1), T(!0);
|
|
174
|
+
return;
|
|
169
175
|
}
|
|
170
|
-
|
|
171
|
-
|
|
176
|
+
w({
|
|
177
|
+
id: "create",
|
|
178
|
+
success: !1,
|
|
179
|
+
message: e.error.message || "Failed to create target"
|
|
180
|
+
}), setTimeout(() => w(null), 5e3);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
let t = e.data?.createTarget?.id;
|
|
184
|
+
v(!1), Mt(""), Ft(""), Rt(""), Vt(""), Ut(""), Gt(""), Kt(""), t && await Qt(t), J(), Yt();
|
|
172
185
|
} catch (e) {
|
|
173
186
|
if (n(e)) {
|
|
174
|
-
v(!1),
|
|
187
|
+
v(!1), ee(), T(!0);
|
|
175
188
|
return;
|
|
176
189
|
}
|
|
177
|
-
|
|
190
|
+
w({
|
|
191
|
+
id: "create",
|
|
192
|
+
success: !1,
|
|
193
|
+
message: e instanceof Error ? e.message : "Failed to create target"
|
|
194
|
+
}), setTimeout(() => w(null), 5e3);
|
|
178
195
|
}
|
|
179
196
|
}, [
|
|
180
|
-
|
|
181
|
-
V,
|
|
197
|
+
B,
|
|
182
198
|
H,
|
|
183
199
|
U,
|
|
200
|
+
It,
|
|
184
201
|
W,
|
|
185
202
|
G,
|
|
186
203
|
Bt,
|
|
187
204
|
Ht,
|
|
188
205
|
Wt,
|
|
189
206
|
K,
|
|
190
|
-
|
|
191
|
-
|
|
207
|
+
V,
|
|
208
|
+
z,
|
|
192
209
|
d,
|
|
193
210
|
Xt,
|
|
194
211
|
Qt,
|
|
195
212
|
J
|
|
196
|
-
]), un =
|
|
213
|
+
]), un = r(async (e) => {
|
|
197
214
|
let t = (await en({ variables: { id: e } })).data?.testTarget;
|
|
198
|
-
t && (
|
|
215
|
+
t && (w({
|
|
199
216
|
id: e,
|
|
200
217
|
success: t.success,
|
|
201
218
|
message: t.message || ""
|
|
202
|
-
}), setTimeout(() =>
|
|
203
|
-
}, [en, J]), dn =
|
|
219
|
+
}), setTimeout(() => w(null), 5e3), J());
|
|
220
|
+
}, [en, J]), dn = r(async (e) => {
|
|
204
221
|
try {
|
|
205
222
|
let t = await tn({ variables: { targetId: e } });
|
|
206
223
|
if (t.error && n(t.error)) {
|
|
207
|
-
|
|
224
|
+
ee(), T(!0);
|
|
208
225
|
return;
|
|
209
226
|
}
|
|
210
|
-
let
|
|
211
|
-
|
|
227
|
+
let te = t.data?.startTerminal;
|
|
228
|
+
te?.sessionId && f(`/sessions/${te.sessionId}`);
|
|
212
229
|
} catch (e) {
|
|
213
230
|
if (n(e)) {
|
|
214
|
-
|
|
231
|
+
ee(), T(!0);
|
|
215
232
|
return;
|
|
216
233
|
}
|
|
217
234
|
throw e;
|
|
218
235
|
}
|
|
219
|
-
}, [tn, f]), fn =
|
|
236
|
+
}, [tn, f]), fn = r(async () => {
|
|
220
237
|
if (y) {
|
|
221
238
|
try {
|
|
222
|
-
await Y({ variables: { id: y } }),
|
|
239
|
+
await Y({ variables: { id: y } }), ge() && _e("success");
|
|
223
240
|
} catch (e) {
|
|
224
|
-
throw
|
|
241
|
+
throw ge() && _e("error"), e;
|
|
225
242
|
}
|
|
226
243
|
b(null), S((e) => {
|
|
227
244
|
let t = new Set(e);
|
|
@@ -232,69 +249,74 @@ function $e() {
|
|
|
232
249
|
y,
|
|
233
250
|
Y,
|
|
234
251
|
J
|
|
235
|
-
]), pn =
|
|
252
|
+
]), pn = r(async () => {
|
|
236
253
|
let e = Array.from(x);
|
|
237
254
|
await Promise.all(e.map((e) => Y({ variables: { id: e } }))), S(/* @__PURE__ */ new Set()), dt(!1), J();
|
|
238
255
|
}, [
|
|
239
256
|
x,
|
|
240
257
|
Y,
|
|
241
258
|
J
|
|
242
|
-
]), mn =
|
|
243
|
-
|
|
259
|
+
]), mn = r(async (e) => {
|
|
260
|
+
pt(e), mt(null), k(null);
|
|
244
261
|
let t = Z.find((e) => e.isActive);
|
|
245
262
|
if (!t) return;
|
|
246
263
|
let n = (await nn({ variables: {
|
|
247
264
|
targetId: e.id,
|
|
248
265
|
sourceAgentId: t.id
|
|
249
266
|
} })).data?.installAgentOnTarget;
|
|
250
|
-
n?.jobId &&
|
|
251
|
-
}, [nn, Z]), hn =
|
|
267
|
+
n?.jobId && k(n.jobId);
|
|
268
|
+
}, [nn, Z]), hn = r(async (e) => {
|
|
252
269
|
await rn({ variables: { targetId: e.id } }), J();
|
|
253
|
-
}, [rn, J]), gn =
|
|
254
|
-
|
|
255
|
-
}, []), _n =
|
|
256
|
-
if (
|
|
257
|
-
if (!
|
|
258
|
-
|
|
270
|
+
}, [rn, J]), gn = r((e) => {
|
|
271
|
+
j(e), vt(e.name), bt(e.label ?? ""), St(e.host ?? ""), wt(e.port ?? 22), Et(e.username ?? ""), Dt("key"), Ot(""), kt(""), At(e.tags.join(", ")), N(null);
|
|
272
|
+
}, []), _n = r(async () => {
|
|
273
|
+
if (A) {
|
|
274
|
+
if (!P.trim()) {
|
|
275
|
+
N("Name is required");
|
|
259
276
|
return;
|
|
260
277
|
}
|
|
261
|
-
|
|
278
|
+
gt(!0), N(null);
|
|
262
279
|
try {
|
|
263
|
-
await $t({ variables: {
|
|
264
|
-
id:
|
|
280
|
+
let e = await $t({ variables: {
|
|
281
|
+
id: A.id,
|
|
265
282
|
input: {
|
|
266
|
-
name:
|
|
267
|
-
label:
|
|
268
|
-
host:
|
|
269
|
-
port:
|
|
270
|
-
username:
|
|
271
|
-
password:
|
|
272
|
-
privateKeyPath:
|
|
273
|
-
tags:
|
|
283
|
+
name: P.trim(),
|
|
284
|
+
label: yt.trim() || null,
|
|
285
|
+
host: xt.trim() || void 0,
|
|
286
|
+
port: Ct || void 0,
|
|
287
|
+
username: Tt.trim() || void 0,
|
|
288
|
+
password: A.type === "SSH" && F === "password" && I ? I : void 0,
|
|
289
|
+
privateKeyPath: A.type === "SSH" && F === "key" && L ? L : void 0,
|
|
290
|
+
tags: R ? R.split(",").map((e) => e.trim()).filter(Boolean) : []
|
|
274
291
|
}
|
|
275
|
-
} })
|
|
292
|
+
} });
|
|
293
|
+
if (e.error) {
|
|
294
|
+
N(e.error.message || "Failed to update target");
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
j(null), J();
|
|
276
298
|
} catch (e) {
|
|
277
|
-
|
|
299
|
+
N(e instanceof Error ? e.message : "Failed to update target");
|
|
278
300
|
} finally {
|
|
279
|
-
|
|
301
|
+
gt(!1);
|
|
280
302
|
}
|
|
281
303
|
}
|
|
282
304
|
}, [
|
|
283
|
-
|
|
284
|
-
|
|
305
|
+
A,
|
|
306
|
+
P,
|
|
307
|
+
yt,
|
|
285
308
|
xt,
|
|
286
309
|
Ct,
|
|
287
310
|
Tt,
|
|
288
|
-
Dt,
|
|
289
|
-
N,
|
|
290
311
|
F,
|
|
291
312
|
I,
|
|
292
313
|
L,
|
|
314
|
+
R,
|
|
293
315
|
$t,
|
|
294
316
|
J
|
|
295
|
-
]), vn =
|
|
296
|
-
|
|
297
|
-
}, []), yn =
|
|
317
|
+
]), vn = r(() => {
|
|
318
|
+
pt(null), mt(null), k(null);
|
|
319
|
+
}, []), yn = r(() => {
|
|
298
320
|
S(sn ? (e) => {
|
|
299
321
|
let t = new Set(e);
|
|
300
322
|
return Q.forEach((e) => t.delete(e.id)), t;
|
|
@@ -302,7 +324,7 @@ function $e() {
|
|
|
302
324
|
let t = new Set(e);
|
|
303
325
|
return Q.forEach((e) => t.add(e.id)), t;
|
|
304
326
|
});
|
|
305
|
-
}, [sn, Q]), bn =
|
|
327
|
+
}, [sn, Q]), bn = r((e) => {
|
|
306
328
|
S((t) => {
|
|
307
329
|
let n = new Set(t);
|
|
308
330
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
@@ -310,122 +332,122 @@ function $e() {
|
|
|
310
332
|
}, []), xn = {
|
|
311
333
|
total: X.length,
|
|
312
334
|
connected: on
|
|
313
|
-
}, Sn =
|
|
335
|
+
}, Sn = i(() => [
|
|
314
336
|
{
|
|
315
337
|
value: "all",
|
|
316
|
-
label:
|
|
338
|
+
label: E("targets.filterTypeAll", "All Types")
|
|
317
339
|
},
|
|
318
340
|
{
|
|
319
341
|
value: "DIRECT",
|
|
320
|
-
label:
|
|
342
|
+
label: E("targets.typeDirect", "Direct")
|
|
321
343
|
},
|
|
322
344
|
{
|
|
323
345
|
value: "SSH",
|
|
324
346
|
label: "SSH"
|
|
325
347
|
}
|
|
326
|
-
], [
|
|
348
|
+
], [E]), Cn = i(() => [
|
|
327
349
|
{
|
|
328
350
|
value: "all",
|
|
329
|
-
label:
|
|
351
|
+
label: E("targets.filterStatusAll", "All Statuses")
|
|
330
352
|
},
|
|
331
353
|
{
|
|
332
354
|
value: "connected",
|
|
333
|
-
label:
|
|
355
|
+
label: E("targets.connected", "Connected")
|
|
334
356
|
},
|
|
335
357
|
{
|
|
336
358
|
value: "disconnected",
|
|
337
|
-
label:
|
|
359
|
+
label: E("targets.disconnected", "Disconnected")
|
|
338
360
|
},
|
|
339
361
|
{
|
|
340
362
|
value: "unknown",
|
|
341
|
-
label:
|
|
363
|
+
label: E("targets.unknown", "Unknown")
|
|
342
364
|
}
|
|
343
|
-
], [
|
|
344
|
-
return tt ? /* @__PURE__ */
|
|
365
|
+
], [E]), $ = m || h || g !== "all" || _ !== "all";
|
|
366
|
+
return tt ? /* @__PURE__ */ c("div", {
|
|
345
367
|
className: "flex items-center justify-center min-h-[400px]",
|
|
346
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ c("p", {
|
|
347
369
|
className: "text-text-secondary",
|
|
348
370
|
children: "Loading permissions..."
|
|
349
371
|
})
|
|
350
|
-
}) : et(
|
|
372
|
+
}) : et(we.TARGET_LIST) ? /* @__PURE__ */ l(qe, {
|
|
351
373
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
352
374
|
children: [
|
|
353
|
-
C && /* @__PURE__ */
|
|
354
|
-
className: `fixed top-4 right-4 z-[10000] rounded-md px-4 py-3 shadow-lg text-sm ${C.success ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
|
|
375
|
+
C && /* @__PURE__ */ l("div", {
|
|
376
|
+
className: `fixed top-4 right-4 z-[10000] rounded-md px-4 py-3 shadow-lg text-sm max-w-md ${C.success ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
|
|
355
377
|
children: [
|
|
356
|
-
C.success ?
|
|
378
|
+
C.success ? E("targets.connectionSuccessful", "Connection successful") : C.id === "create" ? E("targets.createFailed", "Failed to create target") : E("targets.connectionFailed", "Connection failed"),
|
|
357
379
|
": ",
|
|
358
380
|
C.message
|
|
359
381
|
]
|
|
360
382
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
title:
|
|
383
|
+
/* @__PURE__ */ c(pe, {
|
|
384
|
+
title: E("nav.targets", "Targets"),
|
|
363
385
|
description: `${xn.connected} of ${xn.total} targets online`,
|
|
364
|
-
actions: /* @__PURE__ */
|
|
386
|
+
actions: /* @__PURE__ */ l("div", {
|
|
365
387
|
className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-2",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ c("button", {
|
|
367
389
|
onClick: () => void J(),
|
|
368
390
|
disabled: q,
|
|
369
391
|
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",
|
|
370
|
-
title:
|
|
371
|
-
children: /* @__PURE__ */
|
|
372
|
-
}), /* @__PURE__ */
|
|
392
|
+
title: E("targets.refreshTitle", "Refresh targets"),
|
|
393
|
+
children: /* @__PURE__ */ c(Le, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
|
|
394
|
+
}), /* @__PURE__ */ l("button", {
|
|
373
395
|
onClick: () => v(!0),
|
|
374
396
|
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",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ c(Ie, { className: "w-4 h-4" }), E("targets.addTarget", "Add Target")]
|
|
376
398
|
})]
|
|
377
399
|
})
|
|
378
400
|
}),
|
|
379
|
-
Z.length === 0 && !q && /* @__PURE__ */
|
|
401
|
+
Z.length === 0 && !q && /* @__PURE__ */ c(xe, {
|
|
380
402
|
variant: "full",
|
|
381
403
|
dismissKey: "vibecontrols-targets-setup-banner"
|
|
382
404
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ l("div", {
|
|
384
406
|
className: "space-y-3",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ l("div", {
|
|
386
408
|
className: "flex items-center gap-2",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ c(ye, {
|
|
388
410
|
value: m,
|
|
389
411
|
onChange: rt,
|
|
390
|
-
placeholder:
|
|
412
|
+
placeholder: E("targets.searchPlaceholder", "Search targets..."),
|
|
391
413
|
className: "flex-1 sm:w-64 sm:flex-none"
|
|
392
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ l("div", {
|
|
393
415
|
className: "flex items-center gap-1 bg-bg-sunken rounded-md p-1 flex-shrink-0",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ c("button", {
|
|
395
417
|
onClick: () => ct("grid"),
|
|
396
418
|
className: `p-1.5 sm:p-2 rounded ${st === "grid" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
|
|
397
|
-
title:
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
}), /* @__PURE__ */
|
|
419
|
+
title: E("targets.gridViewTitle", "Grid view"),
|
|
420
|
+
children: /* @__PURE__ */ c(Me, { className: "w-4 h-4 text-text-secondary" })
|
|
421
|
+
}), /* @__PURE__ */ c("button", {
|
|
400
422
|
onClick: () => ct("list"),
|
|
401
423
|
className: `p-1.5 sm:p-2 rounded ${st === "list" ? "bg-bg-surface shadow-sm" : "hover:bg-bg-surface/50"}`,
|
|
402
|
-
title:
|
|
403
|
-
children: /* @__PURE__ */
|
|
424
|
+
title: E("targets.listViewTitle", "List view"),
|
|
425
|
+
children: /* @__PURE__ */ c(Ne, { className: "w-4 h-4 text-text-secondary" })
|
|
404
426
|
})]
|
|
405
427
|
})]
|
|
406
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ l("div", {
|
|
407
429
|
className: "flex items-center gap-2 sm:gap-3 flex-wrap",
|
|
408
430
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
label:
|
|
431
|
+
/* @__PURE__ */ c(be, {
|
|
432
|
+
label: E("sessions.filterType", "Type"),
|
|
411
433
|
value: g,
|
|
412
434
|
options: Sn,
|
|
413
435
|
onChange: at
|
|
414
436
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
label:
|
|
437
|
+
/* @__PURE__ */ c(be, {
|
|
438
|
+
label: E("sessions.filterStatus", "Status"),
|
|
417
439
|
value: _,
|
|
418
440
|
options: Cn,
|
|
419
441
|
onChange: ot
|
|
420
442
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ c(Ce, {
|
|
422
444
|
value: h ?? "",
|
|
423
445
|
onChange: (e) => it(e || null),
|
|
424
446
|
options: Z.map((e) => ({
|
|
425
447
|
value: e.id,
|
|
426
448
|
label: e.name
|
|
427
449
|
})),
|
|
428
|
-
placeholder:
|
|
450
|
+
placeholder: E("targets.allAgents", "All agents"),
|
|
429
451
|
className: "w-full sm:min-w-[180px] sm:w-auto",
|
|
430
452
|
dropdownAlign: "left",
|
|
431
453
|
clearable: !0
|
|
@@ -433,72 +455,72 @@ function $e() {
|
|
|
433
455
|
]
|
|
434
456
|
})]
|
|
435
457
|
}),
|
|
436
|
-
Q.length > 0 && /* @__PURE__ */
|
|
458
|
+
Q.length > 0 && /* @__PURE__ */ c("div", {
|
|
437
459
|
className: "flex items-center gap-2 flex-wrap",
|
|
438
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ c("div", {
|
|
439
461
|
className: "ml-auto flex items-center gap-2",
|
|
440
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ l("button", {
|
|
441
463
|
onClick: yn,
|
|
442
464
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ c(je, { className: "w-3.5 h-3.5" }), sn ? E("targets.deselectAll", "Deselect All") : E("targets.selectAll", "Select All")]
|
|
444
466
|
})
|
|
445
467
|
})
|
|
446
468
|
}),
|
|
447
|
-
cn && /* @__PURE__ */
|
|
469
|
+
cn && /* @__PURE__ */ l("div", {
|
|
448
470
|
className: "flex flex-col sm:flex-row items-start sm:items-center gap-3 px-4 py-2 bg-action-primary-bg/10 border border-action-primary-bg/20 rounded-lg",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ l("span", {
|
|
450
472
|
className: "text-sm font-medium text-text-primary",
|
|
451
473
|
children: [
|
|
452
474
|
x.size,
|
|
453
475
|
" ",
|
|
454
|
-
|
|
476
|
+
E("nav.targets", "target"),
|
|
455
477
|
x.size === 1 ? "" : "s",
|
|
456
478
|
" ",
|
|
457
|
-
|
|
479
|
+
E("sessions.selected", "selected")
|
|
458
480
|
]
|
|
459
|
-
}), /* @__PURE__ */
|
|
481
|
+
}), /* @__PURE__ */ l("div", {
|
|
460
482
|
className: "flex items-center gap-1.5 sm:ml-auto",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
483
|
+
children: [/* @__PURE__ */ l("button", {
|
|
462
484
|
onClick: () => dt(!0),
|
|
463
485
|
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",
|
|
464
486
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ c(ze, { className: "w-3 h-3" }),
|
|
466
488
|
" ",
|
|
467
|
-
|
|
489
|
+
E("common.delete", "Delete")
|
|
468
490
|
]
|
|
469
|
-
}), /* @__PURE__ */
|
|
491
|
+
}), /* @__PURE__ */ l("button", {
|
|
470
492
|
onClick: () => S(/* @__PURE__ */ new Set()),
|
|
471
493
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-secondary hover:text-text-primary transition-colors",
|
|
472
494
|
children: [
|
|
473
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ c(Ve, { className: "w-3 h-3" }),
|
|
474
496
|
" ",
|
|
475
|
-
|
|
497
|
+
E("sessions.deselect", "Deselect")
|
|
476
498
|
]
|
|
477
499
|
})]
|
|
478
500
|
})]
|
|
479
501
|
}),
|
|
480
|
-
$ ? /* @__PURE__ */
|
|
502
|
+
$ ? /* @__PURE__ */ l("p", {
|
|
481
503
|
className: "text-sm text-text-secondary",
|
|
482
|
-
children: [
|
|
504
|
+
children: [E("targets.showingResults", "Showing {{filtered}} of {{total}} targets").replace("{{filtered}}", String(Q.length)).replace("{{total}}", String(X.length)), q && /* @__PURE__ */ l("span", {
|
|
483
505
|
className: "ml-2 text-text-muted",
|
|
484
506
|
children: [
|
|
485
507
|
"(",
|
|
486
|
-
|
|
508
|
+
E("sessions.refreshing", "refreshing..."),
|
|
487
509
|
")"
|
|
488
510
|
]
|
|
489
511
|
})]
|
|
490
512
|
}) : null,
|
|
491
|
-
q && X.length === 0 ? /* @__PURE__ */
|
|
513
|
+
q && X.length === 0 ? /* @__PURE__ */ c(Te, {
|
|
492
514
|
variant: "rows",
|
|
493
515
|
count: 6
|
|
494
|
-
}) : Q.length > 0 ? /* @__PURE__ */
|
|
516
|
+
}) : Q.length > 0 ? /* @__PURE__ */ c(We, {
|
|
495
517
|
mode: "wait",
|
|
496
|
-
children: st === "grid" ? /* @__PURE__ */
|
|
518
|
+
children: st === "grid" ? /* @__PURE__ */ c(Ke, {
|
|
497
519
|
stagger: .04,
|
|
498
520
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
499
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
521
|
+
children: Q.map((e) => /* @__PURE__ */ c(Ge, {
|
|
500
522
|
className: "h-full",
|
|
501
|
-
children: /* @__PURE__ */
|
|
523
|
+
children: /* @__PURE__ */ c(Ee, {
|
|
502
524
|
target: e,
|
|
503
525
|
onTest: (e) => void un(e),
|
|
504
526
|
onTerminal: (e) => void dn(e),
|
|
@@ -512,75 +534,75 @@ function $e() {
|
|
|
512
534
|
highlighted: p === e.id
|
|
513
535
|
})
|
|
514
536
|
}, e.id))
|
|
515
|
-
}, "grid-view") : /* @__PURE__ */
|
|
537
|
+
}, "grid-view") : /* @__PURE__ */ c(Ke, {
|
|
516
538
|
stagger: .04,
|
|
517
539
|
className: "space-y-2",
|
|
518
540
|
children: Q.map((e) => {
|
|
519
|
-
let t =
|
|
520
|
-
return /* @__PURE__ */
|
|
541
|
+
let t = $e(e), n = p === e.id;
|
|
542
|
+
return /* @__PURE__ */ c(Ge, {
|
|
521
543
|
variant: "fadeRight",
|
|
522
|
-
children: /* @__PURE__ */
|
|
544
|
+
children: /* @__PURE__ */ l("div", {
|
|
523
545
|
id: `target-row-${e.id}`,
|
|
524
546
|
className: `p-4 rounded-lg border transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/5 shadow-sm" : "border-border-default hover:bg-bg-sunken/30"}`,
|
|
525
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ l("div", {
|
|
526
548
|
className: "flex items-start gap-3",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ c("input", {
|
|
528
550
|
type: "checkbox",
|
|
529
551
|
checked: x.has(e.id),
|
|
530
552
|
onChange: () => bn(e.id),
|
|
531
553
|
className: "rounded border-border-default mt-1"
|
|
532
|
-
}), /* @__PURE__ */
|
|
554
|
+
}), /* @__PURE__ */ l("div", {
|
|
533
555
|
className: "flex min-w-0 flex-1 flex-wrap items-start gap-2",
|
|
534
556
|
children: [
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${
|
|
557
|
+
/* @__PURE__ */ c("span", {
|
|
558
|
+
className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Ze[e.type]}`,
|
|
537
559
|
children: e.type
|
|
538
560
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${
|
|
541
|
-
children:
|
|
561
|
+
/* @__PURE__ */ c("span", {
|
|
562
|
+
className: `inline-flex items-center px-2 py-0.5 text-xs font-semibold rounded ${Qe[e.status]}`,
|
|
563
|
+
children: E(`targets.status.${e.status}`, Xe[e.status].label)
|
|
542
564
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ l("div", {
|
|
544
566
|
className: "min-w-0 basis-full",
|
|
545
567
|
children: [
|
|
546
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ l("div", {
|
|
547
569
|
className: "flex items-center gap-2 flex-wrap",
|
|
548
570
|
children: [
|
|
549
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ c("span", {
|
|
550
572
|
className: "font-medium",
|
|
551
573
|
children: e.name
|
|
552
574
|
}),
|
|
553
|
-
e.label && /* @__PURE__ */
|
|
575
|
+
e.label && /* @__PURE__ */ c("span", {
|
|
554
576
|
className: "text-text-secondary text-sm",
|
|
555
577
|
children: e.label
|
|
556
578
|
}),
|
|
557
|
-
t && /* @__PURE__ */
|
|
579
|
+
t && /* @__PURE__ */ l("span", {
|
|
558
580
|
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",
|
|
559
|
-
children: [/* @__PURE__ */
|
|
581
|
+
children: [/* @__PURE__ */ c(Ae, { size: 10 }), E("targets.agentInstalled", "Agent Installed")]
|
|
560
582
|
})
|
|
561
583
|
]
|
|
562
584
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ l("div", {
|
|
564
586
|
className: "mt-1 flex flex-wrap items-center gap-2 text-sm text-text-secondary sm:gap-3",
|
|
565
|
-
children: [e.host && /* @__PURE__ */
|
|
587
|
+
children: [e.host && /* @__PURE__ */ l("code", {
|
|
566
588
|
className: "text-xs",
|
|
567
589
|
children: [
|
|
568
590
|
e.username ? `${e.username}@` : "",
|
|
569
591
|
e.host,
|
|
570
592
|
e.port ? `:${e.port}` : ""
|
|
571
593
|
]
|
|
572
|
-
}), e.agents.length > 0 && /* @__PURE__ */
|
|
594
|
+
}), e.agents.length > 0 && /* @__PURE__ */ l("span", {
|
|
573
595
|
className: "text-text-tertiary",
|
|
574
596
|
children: [
|
|
575
|
-
|
|
597
|
+
E("targets.via", "via"),
|
|
576
598
|
" ",
|
|
577
599
|
e.agents[0].name
|
|
578
600
|
]
|
|
579
601
|
})]
|
|
580
602
|
}),
|
|
581
|
-
e.tags.length > 0 && /* @__PURE__ */
|
|
603
|
+
e.tags.length > 0 && /* @__PURE__ */ c("div", {
|
|
582
604
|
className: "mt-1.5 flex flex-wrap gap-1",
|
|
583
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
605
|
+
children: e.tags.map((e) => /* @__PURE__ */ c("span", {
|
|
584
606
|
className: "px-1.5 py-0.5 text-xs bg-bg-sunken text-text-secondary rounded",
|
|
585
607
|
children: e
|
|
586
608
|
}, e))
|
|
@@ -589,45 +611,45 @@ function $e() {
|
|
|
589
611
|
})
|
|
590
612
|
]
|
|
591
613
|
})]
|
|
592
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ l("div", {
|
|
593
615
|
className: "mt-3 flex flex-wrap items-center gap-2 pl-0 sm:pl-7",
|
|
594
616
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ c("button", {
|
|
596
618
|
onClick: () => void un(e.id),
|
|
597
|
-
title:
|
|
619
|
+
title: E("targets.testConnectivity", "Test connectivity"),
|
|
598
620
|
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",
|
|
599
|
-
children:
|
|
621
|
+
children: E("targets.test", "Test")
|
|
600
622
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ c("button", {
|
|
602
624
|
onClick: () => void dn(e.id),
|
|
603
|
-
title:
|
|
625
|
+
title: E("targets.openTerminal", "Open terminal"),
|
|
604
626
|
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",
|
|
605
|
-
children:
|
|
627
|
+
children: E("targets.terminal", "Terminal")
|
|
606
628
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ l("button", {
|
|
608
630
|
onClick: () => gn(e),
|
|
609
631
|
title: "Edit target configuration",
|
|
610
632
|
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",
|
|
611
|
-
children: [/* @__PURE__ */
|
|
633
|
+
children: [/* @__PURE__ */ c(Fe, { size: 14 }), "Edit"]
|
|
612
634
|
}),
|
|
613
|
-
e.type !== "DIRECT" && !t && /* @__PURE__ */
|
|
635
|
+
e.type !== "DIRECT" && !t && /* @__PURE__ */ c("button", {
|
|
614
636
|
onClick: () => void mn(e),
|
|
615
|
-
title:
|
|
637
|
+
title: E("targets.installAgent", "Install agent"),
|
|
616
638
|
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",
|
|
617
|
-
children:
|
|
639
|
+
children: E("targets.installAgent", "Install Agent")
|
|
618
640
|
}),
|
|
619
|
-
e.type !== "DIRECT" && t && /* @__PURE__ */
|
|
641
|
+
e.type !== "DIRECT" && t && /* @__PURE__ */ c("button", {
|
|
620
642
|
onClick: () => void hn(e),
|
|
621
|
-
title:
|
|
643
|
+
title: E("targets.uninstallAgent", "Uninstall agent"),
|
|
622
644
|
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",
|
|
623
|
-
children:
|
|
645
|
+
children: E("targets.uninstall", "Uninstall")
|
|
624
646
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ c("div", { className: "hidden flex-1 sm:block" }),
|
|
648
|
+
/* @__PURE__ */ l("button", {
|
|
627
649
|
onClick: () => b(e.id),
|
|
628
|
-
title:
|
|
650
|
+
title: E("targets.deleteTarget", "Delete target"),
|
|
629
651
|
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",
|
|
630
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ c(o, { size: 14 }), E("common.delete", "Delete")]
|
|
631
653
|
})
|
|
632
654
|
]
|
|
633
655
|
})]
|
|
@@ -635,473 +657,473 @@ function $e() {
|
|
|
635
657
|
}, e.id);
|
|
636
658
|
})
|
|
637
659
|
}, "list-view")
|
|
638
|
-
}) : /* @__PURE__ */
|
|
639
|
-
icon: /* @__PURE__ */
|
|
640
|
-
title: $ ?
|
|
641
|
-
description: $ ?
|
|
642
|
-
action: $ ? void 0 : /* @__PURE__ */
|
|
660
|
+
}) : /* @__PURE__ */ c(ve, {
|
|
661
|
+
icon: /* @__PURE__ */ c(Re, { className: "w-8 h-8 text-text-secondary" }),
|
|
662
|
+
title: $ ? E("targets.emptyNoTargetsFound", "No targets found") : E("targets.emptyNoTargetsConfigured", "No targets configured"),
|
|
663
|
+
description: $ ? E("targets.emptyAdjustSearch", "Try adjusting your search or filters") : E("targets.emptyDescription", "Add a target to start managing servers, workstations, and environments."),
|
|
664
|
+
action: $ ? void 0 : /* @__PURE__ */ l("div", {
|
|
643
665
|
className: "flex items-center gap-2",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
666
|
+
children: [/* @__PURE__ */ l("button", {
|
|
645
667
|
onClick: () => v(!0),
|
|
646
668
|
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",
|
|
647
|
-
children: [/* @__PURE__ */
|
|
648
|
-
}), /* @__PURE__ */
|
|
669
|
+
children: [/* @__PURE__ */ c(Ie, { className: "w-4 h-4" }), E("targets.addTarget", "Add Target")]
|
|
670
|
+
}), /* @__PURE__ */ c(Se, { prompt: "What is a Target in VibeControls and how do I create one?" })]
|
|
649
671
|
})
|
|
650
672
|
}),
|
|
651
|
-
lt && /* @__PURE__ */
|
|
673
|
+
lt && /* @__PURE__ */ l("div", {
|
|
652
674
|
className: "fixed inset-0 z-50 flex items-start justify-center pt-16 overflow-y-auto",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
675
|
+
children: [/* @__PURE__ */ c("div", {
|
|
654
676
|
className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm",
|
|
655
677
|
onClick: () => v(!1)
|
|
656
|
-
}), /* @__PURE__ */
|
|
678
|
+
}), /* @__PURE__ */ l("div", {
|
|
657
679
|
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",
|
|
658
680
|
onClick: (e) => e.stopPropagation(),
|
|
659
681
|
children: [
|
|
660
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ l("div", {
|
|
661
683
|
className: "flex items-start justify-between gap-3",
|
|
662
|
-
children: [/* @__PURE__ */
|
|
684
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
663
685
|
className: "text-lg font-semibold",
|
|
664
|
-
children:
|
|
665
|
-
}), /* @__PURE__ */
|
|
686
|
+
children: E("targets.addTarget", "Add Target")
|
|
687
|
+
}), /* @__PURE__ */ c("button", {
|
|
666
688
|
onClick: () => v(!1),
|
|
667
689
|
className: "p-1 rounded-lg hover:bg-bg-sunken transition-colors",
|
|
668
|
-
children: /* @__PURE__ */
|
|
690
|
+
children: /* @__PURE__ */ c(o, { size: 18 })
|
|
669
691
|
})]
|
|
670
692
|
}),
|
|
671
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ l("div", {
|
|
672
694
|
className: "space-y-4",
|
|
673
695
|
children: [
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ l("div", { children: [
|
|
697
|
+
/* @__PURE__ */ c("label", {
|
|
676
698
|
className: "text-sm font-medium block mb-1.5",
|
|
677
|
-
children:
|
|
699
|
+
children: E("targets.targetType", "Target Type")
|
|
678
700
|
}),
|
|
679
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ c("div", {
|
|
680
702
|
className: "grid grid-cols-2 gap-2",
|
|
681
|
-
children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */
|
|
682
|
-
onClick: () =>
|
|
683
|
-
className: `px-3 py-2 text-sm font-medium rounded-lg border transition-colors ${
|
|
703
|
+
children: ["DIRECT", "SSH"].map((e) => /* @__PURE__ */ c("button", {
|
|
704
|
+
onClick: () => jt(e),
|
|
705
|
+
className: `px-3 py-2 text-sm font-medium rounded-lg border transition-colors ${z === e ? "border-action-primary-bg bg-action-primary-bg/10 text-action-primary-bg" : "border-border-default hover:bg-bg-sunken text-text-secondary"}`,
|
|
684
706
|
children: e
|
|
685
707
|
}, e))
|
|
686
708
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ c("p", {
|
|
688
710
|
className: "text-xs text-text-tertiary mt-1",
|
|
689
|
-
children:
|
|
711
|
+
children: z === "DIRECT" ? E("targets.targetTypeDirectHint", "A local machine where you will install the agent manually.") : E("targets.targetTypeSshHint", "A remote server accessible via SSH.")
|
|
690
712
|
})
|
|
691
713
|
] }),
|
|
692
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
693
715
|
className: "text-sm font-medium",
|
|
694
|
-
children:
|
|
695
|
-
}), /* @__PURE__ */
|
|
696
|
-
value:
|
|
697
|
-
onChange: (e) =>
|
|
716
|
+
children: E("webhooks.name", "Name")
|
|
717
|
+
}), /* @__PURE__ */ c("input", {
|
|
718
|
+
value: B,
|
|
719
|
+
onChange: (e) => Mt(e.target.value),
|
|
698
720
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
699
|
-
placeholder:
|
|
721
|
+
placeholder: z === "DIRECT" ? E("targets.namePlaceholderDirect", "My Laptop") : E("targets.namePlaceholderServer", "Production Server")
|
|
700
722
|
})] }),
|
|
701
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
702
724
|
className: "text-sm font-medium",
|
|
703
|
-
children:
|
|
704
|
-
}), /* @__PURE__ */
|
|
705
|
-
value:
|
|
706
|
-
onChange: (e) =>
|
|
725
|
+
children: E("targets.descriptionOptional", "Description (optional)")
|
|
726
|
+
}), /* @__PURE__ */ c("input", {
|
|
727
|
+
value: V,
|
|
728
|
+
onChange: (e) => Nt(e.target.value),
|
|
707
729
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
708
|
-
placeholder:
|
|
730
|
+
placeholder: E("targets.descriptionPlaceholder", "Brief description of this target")
|
|
709
731
|
})] }),
|
|
710
|
-
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
732
|
+
z !== "DIRECT" && /* @__PURE__ */ l(s, { children: [
|
|
733
|
+
/* @__PURE__ */ l("div", { children: [
|
|
734
|
+
/* @__PURE__ */ c("label", {
|
|
713
735
|
className: "text-sm font-medium",
|
|
714
|
-
children:
|
|
736
|
+
children: E("targets.sourceAgent", "Source Agent")
|
|
715
737
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
value:
|
|
718
|
-
onChange: (e) =>
|
|
738
|
+
/* @__PURE__ */ l("select", {
|
|
739
|
+
value: H,
|
|
740
|
+
onChange: (e) => Pt(e.target.value),
|
|
719
741
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
720
|
-
children: [/* @__PURE__ */
|
|
742
|
+
children: [/* @__PURE__ */ c("option", {
|
|
721
743
|
value: "",
|
|
722
|
-
children:
|
|
723
|
-
}), Z.map((e) => /* @__PURE__ */
|
|
744
|
+
children: E("targets.selectAgentConnectFrom", "Select an agent to connect from")
|
|
745
|
+
}), Z.map((e) => /* @__PURE__ */ c("option", {
|
|
724
746
|
value: e.id,
|
|
725
747
|
children: e.name
|
|
726
748
|
}, e.id))]
|
|
727
749
|
}),
|
|
728
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ l("p", {
|
|
729
751
|
className: "text-xs text-text-tertiary mt-0.5",
|
|
730
752
|
children: [
|
|
731
|
-
|
|
753
|
+
E("targets.agentConnectionHintPrefix", "The agent that will establish the"),
|
|
732
754
|
" ",
|
|
733
|
-
|
|
755
|
+
z,
|
|
734
756
|
" ",
|
|
735
|
-
|
|
757
|
+
E("targets.agentConnectionHintSuffix", "connection to this target.")
|
|
736
758
|
]
|
|
737
759
|
})
|
|
738
760
|
] }),
|
|
739
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ l("div", {
|
|
740
762
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
763
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
742
764
|
className: "text-sm font-medium",
|
|
743
|
-
children:
|
|
744
|
-
}), /* @__PURE__ */
|
|
745
|
-
value:
|
|
746
|
-
onChange: (e) =>
|
|
765
|
+
children: E("targets.host", "Host")
|
|
766
|
+
}), /* @__PURE__ */ c("input", {
|
|
767
|
+
value: U,
|
|
768
|
+
onChange: (e) => Ft(e.target.value),
|
|
747
769
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
748
|
-
placeholder:
|
|
749
|
-
})] }), /* @__PURE__ */
|
|
770
|
+
placeholder: E("targets.hostPlaceholder", "192.168.1.100")
|
|
771
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
750
772
|
className: "text-sm font-medium",
|
|
751
|
-
children:
|
|
752
|
-
}), /* @__PURE__ */
|
|
773
|
+
children: E("tunnels.port", "Port")
|
|
774
|
+
}), /* @__PURE__ */ c("input", {
|
|
753
775
|
type: "number",
|
|
754
|
-
value:
|
|
776
|
+
value: It,
|
|
755
777
|
onChange: (e) => Lt(Number(e.target.value)),
|
|
756
778
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
|
|
757
779
|
})] })]
|
|
758
780
|
}),
|
|
759
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
760
782
|
className: "text-sm font-medium",
|
|
761
|
-
children:
|
|
762
|
-
}), /* @__PURE__ */
|
|
783
|
+
children: E("targets.username", "Username")
|
|
784
|
+
}), /* @__PURE__ */ c("input", {
|
|
763
785
|
value: W,
|
|
764
786
|
onChange: (e) => Rt(e.target.value),
|
|
765
787
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
766
|
-
placeholder:
|
|
788
|
+
placeholder: E("targets.usernamePlaceholder", "root")
|
|
767
789
|
})] }),
|
|
768
|
-
|
|
790
|
+
z === "SSH" && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
769
791
|
className: "text-sm font-medium",
|
|
770
|
-
children:
|
|
771
|
-
}), /* @__PURE__ */
|
|
792
|
+
children: E("targets.authentication", "Authentication")
|
|
793
|
+
}), /* @__PURE__ */ l("div", {
|
|
772
794
|
className: "flex gap-4 mt-1",
|
|
773
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ l("label", {
|
|
774
796
|
className: "flex items-center gap-2 cursor-pointer text-sm",
|
|
775
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ c("input", {
|
|
776
798
|
type: "radio",
|
|
777
799
|
checked: G === "password",
|
|
778
800
|
onChange: () => zt("password")
|
|
779
|
-
}),
|
|
780
|
-
}), /* @__PURE__ */
|
|
801
|
+
}), E("targets.password", "Password")]
|
|
802
|
+
}), /* @__PURE__ */ l("label", {
|
|
781
803
|
className: "flex items-center gap-2 cursor-pointer text-sm",
|
|
782
|
-
children: [/* @__PURE__ */
|
|
804
|
+
children: [/* @__PURE__ */ c("input", {
|
|
783
805
|
type: "radio",
|
|
784
806
|
checked: G === "key",
|
|
785
807
|
onChange: () => zt("key")
|
|
786
|
-
}),
|
|
808
|
+
}), E("targets.privateKey", "Private Key")]
|
|
787
809
|
})]
|
|
788
|
-
})] }), G === "password" ? /* @__PURE__ */
|
|
810
|
+
})] }), G === "password" ? /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
789
811
|
className: "text-sm font-medium",
|
|
790
|
-
children:
|
|
791
|
-
}), /* @__PURE__ */
|
|
812
|
+
children: E("targets.password", "Password")
|
|
813
|
+
}), /* @__PURE__ */ c("input", {
|
|
792
814
|
type: "password",
|
|
793
815
|
value: Bt,
|
|
794
816
|
onChange: (e) => Vt(e.target.value),
|
|
795
817
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
|
|
796
|
-
})] }) : /* @__PURE__ */
|
|
818
|
+
})] }) : /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
797
819
|
className: "text-sm font-medium",
|
|
798
|
-
children:
|
|
799
|
-
}), /* @__PURE__ */
|
|
820
|
+
children: E("targets.privateKeyPath", "Private Key Path")
|
|
821
|
+
}), /* @__PURE__ */ c("input", {
|
|
800
822
|
value: Ht,
|
|
801
823
|
onChange: (e) => Ut(e.target.value),
|
|
802
824
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
803
|
-
placeholder:
|
|
825
|
+
placeholder: E("targets.privateKeyPathPlaceholder", "~/.ssh/id_rsa")
|
|
804
826
|
})] })] })
|
|
805
827
|
] }),
|
|
806
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
807
829
|
className: "text-sm font-medium",
|
|
808
|
-
children:
|
|
809
|
-
}), /* @__PURE__ */
|
|
830
|
+
children: E("targets.labelOptional", "Label (optional)")
|
|
831
|
+
}), /* @__PURE__ */ c("input", {
|
|
810
832
|
value: Wt,
|
|
811
833
|
onChange: (e) => Gt(e.target.value),
|
|
812
834
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
813
|
-
placeholder:
|
|
835
|
+
placeholder: E("targets.labelPlaceholder", "web-server-01")
|
|
814
836
|
})] }),
|
|
815
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
816
838
|
className: "text-sm font-medium",
|
|
817
|
-
children:
|
|
818
|
-
}), /* @__PURE__ */
|
|
839
|
+
children: E("targets.tagsCommaSeparated", "Tags (comma-separated)")
|
|
840
|
+
}), /* @__PURE__ */ c("input", {
|
|
819
841
|
value: K,
|
|
820
842
|
onChange: (e) => Kt(e.target.value),
|
|
821
843
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
822
|
-
placeholder:
|
|
844
|
+
placeholder: E("targets.tagsPlaceholder", "production, web")
|
|
823
845
|
})] })
|
|
824
846
|
]
|
|
825
847
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ l("div", {
|
|
827
849
|
className: "border-t border-border-default pt-3",
|
|
828
|
-
children: [/* @__PURE__ */
|
|
850
|
+
children: [/* @__PURE__ */ c("h3", {
|
|
829
851
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
830
|
-
children:
|
|
831
|
-
}), /* @__PURE__ */
|
|
852
|
+
children: E("targets.tags", "Tags")
|
|
853
|
+
}), /* @__PURE__ */ c(me, {
|
|
832
854
|
entityType: "VIBECONTROLS_TARGET",
|
|
833
855
|
onDraftChange: Zt
|
|
834
856
|
})]
|
|
835
857
|
}),
|
|
836
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ l("div", {
|
|
837
859
|
className: "flex justify-end gap-2 pt-2 border-t border-border-default",
|
|
838
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ c("button", {
|
|
839
861
|
onClick: () => v(!1),
|
|
840
862
|
className: "px-4 py-2 text-sm rounded-md border border-border-default hover:bg-bg-sunken transition-colors",
|
|
841
|
-
children:
|
|
842
|
-
}), /* @__PURE__ */
|
|
863
|
+
children: E("common.cancel", "Cancel")
|
|
864
|
+
}), /* @__PURE__ */ c("button", {
|
|
843
865
|
onClick: () => void ln(),
|
|
844
866
|
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",
|
|
845
|
-
children:
|
|
867
|
+
children: E("targets.addTarget", "Add Target")
|
|
846
868
|
})]
|
|
847
869
|
})
|
|
848
870
|
]
|
|
849
871
|
})]
|
|
850
872
|
}),
|
|
851
|
-
|
|
873
|
+
A && /* @__PURE__ */ l("div", {
|
|
852
874
|
className: "fixed inset-0 z-50 flex items-start justify-center pt-16 overflow-y-auto",
|
|
853
|
-
children: [/* @__PURE__ */
|
|
875
|
+
children: [/* @__PURE__ */ c("div", {
|
|
854
876
|
className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm",
|
|
855
|
-
onClick: () => !
|
|
856
|
-
}), /* @__PURE__ */
|
|
877
|
+
onClick: () => !M && j(null)
|
|
878
|
+
}), /* @__PURE__ */ l("div", {
|
|
857
879
|
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",
|
|
858
880
|
onClick: (e) => e.stopPropagation(),
|
|
859
881
|
children: [
|
|
860
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ l("div", {
|
|
861
883
|
className: "flex items-start justify-between gap-3",
|
|
862
|
-
children: [/* @__PURE__ */
|
|
884
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h2", {
|
|
863
885
|
className: "text-lg font-semibold",
|
|
864
886
|
children: "Edit Target"
|
|
865
|
-
}), /* @__PURE__ */
|
|
887
|
+
}), /* @__PURE__ */ c("p", {
|
|
866
888
|
className: "text-sm text-text-secondary mt-0.5",
|
|
867
|
-
children:
|
|
868
|
-
})] }), /* @__PURE__ */
|
|
869
|
-
onClick: () =>
|
|
870
|
-
disabled:
|
|
889
|
+
children: A.name
|
|
890
|
+
})] }), /* @__PURE__ */ c("button", {
|
|
891
|
+
onClick: () => j(null),
|
|
892
|
+
disabled: M,
|
|
871
893
|
className: "p-1 rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
872
|
-
children: /* @__PURE__ */
|
|
894
|
+
children: /* @__PURE__ */ c(o, { size: 18 })
|
|
873
895
|
})]
|
|
874
896
|
}),
|
|
875
|
-
|
|
897
|
+
_t && /* @__PURE__ */ c("div", {
|
|
876
898
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
877
|
-
children:
|
|
899
|
+
children: _t
|
|
878
900
|
}),
|
|
879
|
-
/* @__PURE__ */
|
|
901
|
+
/* @__PURE__ */ l("div", {
|
|
880
902
|
className: "space-y-4",
|
|
881
903
|
children: [
|
|
882
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
883
905
|
className: "text-sm font-medium",
|
|
884
906
|
children: "Name"
|
|
885
|
-
}), /* @__PURE__ */
|
|
886
|
-
value:
|
|
887
|
-
onChange: (e) =>
|
|
907
|
+
}), /* @__PURE__ */ c("input", {
|
|
908
|
+
value: P,
|
|
909
|
+
onChange: (e) => vt(e.target.value),
|
|
888
910
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
889
911
|
placeholder: "Production Server"
|
|
890
912
|
})] }),
|
|
891
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
892
914
|
className: "text-sm font-medium",
|
|
893
915
|
children: "Label (optional)"
|
|
894
|
-
}), /* @__PURE__ */
|
|
895
|
-
value:
|
|
896
|
-
onChange: (e) =>
|
|
916
|
+
}), /* @__PURE__ */ c("input", {
|
|
917
|
+
value: yt,
|
|
918
|
+
onChange: (e) => bt(e.target.value),
|
|
897
919
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
898
920
|
placeholder: "web-server-01"
|
|
899
921
|
})] }),
|
|
900
|
-
|
|
901
|
-
/* @__PURE__ */
|
|
922
|
+
A.type !== "DIRECT" && /* @__PURE__ */ l(s, { children: [
|
|
923
|
+
/* @__PURE__ */ l("div", {
|
|
902
924
|
className: "grid grid-cols-2 gap-3",
|
|
903
|
-
children: [/* @__PURE__ */
|
|
925
|
+
children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
904
926
|
className: "text-sm font-medium",
|
|
905
927
|
children: "Host"
|
|
906
|
-
}), /* @__PURE__ */
|
|
907
|
-
value:
|
|
908
|
-
onChange: (e) =>
|
|
928
|
+
}), /* @__PURE__ */ c("input", {
|
|
929
|
+
value: xt,
|
|
930
|
+
onChange: (e) => St(e.target.value),
|
|
909
931
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
910
932
|
placeholder: "192.168.1.100"
|
|
911
|
-
})] }), /* @__PURE__ */
|
|
933
|
+
})] }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
912
934
|
className: "text-sm font-medium",
|
|
913
935
|
children: "Port"
|
|
914
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ c("input", {
|
|
915
937
|
type: "number",
|
|
916
|
-
value:
|
|
917
|
-
onChange: (e) =>
|
|
938
|
+
value: Ct,
|
|
939
|
+
onChange: (e) => wt(Number(e.target.value)),
|
|
918
940
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm"
|
|
919
941
|
})] })]
|
|
920
942
|
}),
|
|
921
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
922
944
|
className: "text-sm font-medium",
|
|
923
945
|
children: "Username"
|
|
924
|
-
}), /* @__PURE__ */
|
|
925
|
-
value:
|
|
926
|
-
onChange: (e) =>
|
|
946
|
+
}), /* @__PURE__ */ c("input", {
|
|
947
|
+
value: Tt,
|
|
948
|
+
onChange: (e) => Et(e.target.value),
|
|
927
949
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
928
950
|
placeholder: "root"
|
|
929
951
|
})] }),
|
|
930
|
-
|
|
931
|
-
/* @__PURE__ */
|
|
952
|
+
A.type === "SSH" && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", { children: [
|
|
953
|
+
/* @__PURE__ */ c("label", {
|
|
932
954
|
className: "text-sm font-medium",
|
|
933
955
|
children: "Update credentials (optional)"
|
|
934
956
|
}),
|
|
935
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ l("div", {
|
|
936
958
|
className: "flex gap-4 mt-1",
|
|
937
|
-
children: [/* @__PURE__ */
|
|
959
|
+
children: [/* @__PURE__ */ l("label", {
|
|
938
960
|
className: "flex items-center gap-2 cursor-pointer text-sm",
|
|
939
|
-
children: [/* @__PURE__ */
|
|
961
|
+
children: [/* @__PURE__ */ c("input", {
|
|
940
962
|
type: "radio",
|
|
941
|
-
checked:
|
|
942
|
-
onChange: () =>
|
|
963
|
+
checked: F === "password",
|
|
964
|
+
onChange: () => Dt("password")
|
|
943
965
|
}), "Password"]
|
|
944
|
-
}), /* @__PURE__ */
|
|
966
|
+
}), /* @__PURE__ */ l("label", {
|
|
945
967
|
className: "flex items-center gap-2 cursor-pointer text-sm",
|
|
946
|
-
children: [/* @__PURE__ */
|
|
968
|
+
children: [/* @__PURE__ */ c("input", {
|
|
947
969
|
type: "radio",
|
|
948
|
-
checked:
|
|
949
|
-
onChange: () =>
|
|
970
|
+
checked: F === "key",
|
|
971
|
+
onChange: () => Dt("key")
|
|
950
972
|
}), "Private Key"]
|
|
951
973
|
})]
|
|
952
974
|
}),
|
|
953
|
-
/* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ c("p", {
|
|
954
976
|
className: "text-xs text-text-tertiary mt-0.5",
|
|
955
977
|
children: "Leave blank to keep existing credentials."
|
|
956
978
|
})
|
|
957
|
-
] }),
|
|
979
|
+
] }), F === "password" ? /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
958
980
|
className: "text-sm font-medium",
|
|
959
981
|
children: "New Password"
|
|
960
|
-
}), /* @__PURE__ */
|
|
982
|
+
}), /* @__PURE__ */ c("input", {
|
|
961
983
|
type: "password",
|
|
962
|
-
value:
|
|
963
|
-
onChange: (e) =>
|
|
984
|
+
value: I,
|
|
985
|
+
onChange: (e) => Ot(e.target.value),
|
|
964
986
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
965
987
|
placeholder: "Leave blank to keep current"
|
|
966
|
-
})] }) : /* @__PURE__ */
|
|
988
|
+
})] }) : /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
967
989
|
className: "text-sm font-medium",
|
|
968
990
|
children: "New Private Key Path"
|
|
969
|
-
}), /* @__PURE__ */
|
|
970
|
-
value:
|
|
971
|
-
onChange: (e) =>
|
|
991
|
+
}), /* @__PURE__ */ c("input", {
|
|
992
|
+
value: L,
|
|
993
|
+
onChange: (e) => kt(e.target.value),
|
|
972
994
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
973
995
|
placeholder: "Leave blank to keep current (~/.ssh/id_rsa)"
|
|
974
996
|
})] })] })
|
|
975
997
|
] }),
|
|
976
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
|
|
977
999
|
className: "text-sm font-medium",
|
|
978
1000
|
children: "Tags (comma-separated)"
|
|
979
|
-
}), /* @__PURE__ */
|
|
980
|
-
value:
|
|
981
|
-
onChange: (e) =>
|
|
1001
|
+
}), /* @__PURE__ */ c("input", {
|
|
1002
|
+
value: R,
|
|
1003
|
+
onChange: (e) => At(e.target.value),
|
|
982
1004
|
className: "w-full mt-1 px-3 py-2 rounded-lg border border-border-default bg-bg-elevated text-sm",
|
|
983
1005
|
placeholder: "production, web"
|
|
984
1006
|
})] })
|
|
985
1007
|
]
|
|
986
1008
|
}),
|
|
987
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ l("div", {
|
|
988
1010
|
className: "flex justify-end gap-2 pt-2 border-t border-border-default",
|
|
989
|
-
children: [/* @__PURE__ */
|
|
990
|
-
onClick: () =>
|
|
991
|
-
disabled:
|
|
1011
|
+
children: [/* @__PURE__ */ c("button", {
|
|
1012
|
+
onClick: () => j(null),
|
|
1013
|
+
disabled: M,
|
|
992
1014
|
className: "px-4 py-2 text-sm rounded-lg border border-border-default hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
993
1015
|
children: "Cancel"
|
|
994
|
-
}), /* @__PURE__ */
|
|
1016
|
+
}), /* @__PURE__ */ c("button", {
|
|
995
1017
|
onClick: () => void _n(),
|
|
996
|
-
disabled:
|
|
1018
|
+
disabled: M,
|
|
997
1019
|
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",
|
|
998
|
-
children:
|
|
1020
|
+
children: M ? "Saving..." : "Save Changes"
|
|
999
1021
|
})]
|
|
1000
1022
|
})
|
|
1001
1023
|
]
|
|
1002
1024
|
})]
|
|
1003
1025
|
}),
|
|
1004
|
-
/* @__PURE__ */
|
|
1026
|
+
/* @__PURE__ */ c(e, {
|
|
1005
1027
|
isOpen: !!y,
|
|
1006
1028
|
onClose: () => b(null),
|
|
1007
1029
|
onConfirm: () => void fn(),
|
|
1008
|
-
title:
|
|
1009
|
-
message:
|
|
1010
|
-
confirmLabel:
|
|
1030
|
+
title: E("targets.deleteTarget", "Delete Target"),
|
|
1031
|
+
message: E("targets.deleteTargetMessage", "This will remove the target and its connection from the agent. Active terminals will be disconnected."),
|
|
1032
|
+
confirmLabel: E("common.delete", "Delete"),
|
|
1011
1033
|
variant: "danger"
|
|
1012
1034
|
}),
|
|
1013
|
-
/* @__PURE__ */
|
|
1035
|
+
/* @__PURE__ */ c(e, {
|
|
1014
1036
|
isOpen: ut,
|
|
1015
1037
|
onClose: () => dt(!1),
|
|
1016
1038
|
onConfirm: () => void pn(),
|
|
1017
|
-
title:
|
|
1018
|
-
message: `${
|
|
1019
|
-
confirmLabel:
|
|
1039
|
+
title: E("targets.deleteSelectedTargets", "Delete Selected Targets"),
|
|
1040
|
+
message: `${E("targets.confirmDeleteSelectedPrefix", "Are you sure you want to delete")} ${x.size} ${E("nav.targets", "target")}${x.size === 1 ? "" : "s"}? ${E("targets.confirmDeleteSelectedSuffix", "This action cannot be undone.")}`,
|
|
1041
|
+
confirmLabel: E("targets.deleteAll", "Delete All"),
|
|
1020
1042
|
variant: "danger"
|
|
1021
1043
|
}),
|
|
1022
|
-
|
|
1044
|
+
D && /* @__PURE__ */ c("div", {
|
|
1023
1045
|
className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50",
|
|
1024
|
-
children: /* @__PURE__ */
|
|
1046
|
+
children: /* @__PURE__ */ l("div", {
|
|
1025
1047
|
className: "bg-bg-elevated rounded-xl shadow-xl max-w-md w-full mx-4 p-6",
|
|
1026
1048
|
children: [
|
|
1027
|
-
/* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ l("div", {
|
|
1028
1050
|
className: "flex items-start justify-between gap-3",
|
|
1029
|
-
children: [/* @__PURE__ */
|
|
1051
|
+
children: [/* @__PURE__ */ l("h2", {
|
|
1030
1052
|
className: "text-lg font-semibold break-words",
|
|
1031
1053
|
children: [
|
|
1032
|
-
|
|
1054
|
+
E("targets.installingAgentOn", "Installing Agent on"),
|
|
1033
1055
|
" ",
|
|
1034
|
-
|
|
1056
|
+
D.name
|
|
1035
1057
|
]
|
|
1036
|
-
}),
|
|
1058
|
+
}), O?.status !== "running" && /* @__PURE__ */ c("button", {
|
|
1037
1059
|
onClick: vn,
|
|
1038
1060
|
className: "p-1 rounded hover:bg-bg-sunken",
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1061
|
+
children: /* @__PURE__ */ c(o, { size: 16 })
|
|
1040
1062
|
})]
|
|
1041
1063
|
}),
|
|
1042
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ c("div", {
|
|
1043
1065
|
className: "space-y-2 mt-4",
|
|
1044
|
-
children:
|
|
1066
|
+
children: O && O.steps ? O.steps.map((e, t) => /* @__PURE__ */ l("div", {
|
|
1045
1067
|
className: "flex items-center gap-3",
|
|
1046
1068
|
children: [
|
|
1047
|
-
e.status === "running" && /* @__PURE__ */
|
|
1069
|
+
e.status === "running" && /* @__PURE__ */ c(Pe, {
|
|
1048
1070
|
className: "animate-spin text-action-primary-bg",
|
|
1049
1071
|
size: 16
|
|
1050
1072
|
}),
|
|
1051
|
-
e.status === "completed" && /* @__PURE__ */
|
|
1073
|
+
e.status === "completed" && /* @__PURE__ */ c(Ae, {
|
|
1052
1074
|
className: "text-status-success-text",
|
|
1053
1075
|
size: 16
|
|
1054
1076
|
}),
|
|
1055
|
-
e.status === "failed" && /* @__PURE__ */
|
|
1077
|
+
e.status === "failed" && /* @__PURE__ */ c(Be, {
|
|
1056
1078
|
className: "text-status-error-text",
|
|
1057
1079
|
size: 16
|
|
1058
1080
|
}),
|
|
1059
|
-
e.status === "skipped" && /* @__PURE__ */
|
|
1081
|
+
e.status === "skipped" && /* @__PURE__ */ c(ke, {
|
|
1060
1082
|
className: "text-text-tertiary",
|
|
1061
1083
|
size: 16
|
|
1062
1084
|
}),
|
|
1063
|
-
e.status === "pending" && /* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */
|
|
1085
|
+
e.status === "pending" && /* @__PURE__ */ c("div", { className: "w-4 h-4 rounded-full border-2 border-border-default" }),
|
|
1086
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("div", {
|
|
1065
1087
|
className: "text-sm font-medium",
|
|
1066
|
-
children:
|
|
1067
|
-
}), e.message && /* @__PURE__ */
|
|
1088
|
+
children: E(`targets.installStep.${e.name}`, Ye[e.name] ?? e.name)
|
|
1089
|
+
}), e.message && /* @__PURE__ */ c("div", {
|
|
1068
1090
|
className: "text-xs text-text-tertiary",
|
|
1069
1091
|
children: e.message
|
|
1070
1092
|
})] })
|
|
1071
1093
|
]
|
|
1072
|
-
}, t)) : /* @__PURE__ */
|
|
1094
|
+
}, t)) : /* @__PURE__ */ l("div", {
|
|
1073
1095
|
className: "flex items-center gap-3",
|
|
1074
|
-
children: [/* @__PURE__ */
|
|
1096
|
+
children: [/* @__PURE__ */ c(Pe, {
|
|
1075
1097
|
className: "animate-spin text-action-primary-bg",
|
|
1076
1098
|
size: 16
|
|
1077
|
-
}), /* @__PURE__ */
|
|
1099
|
+
}), /* @__PURE__ */ c("span", {
|
|
1078
1100
|
className: "text-sm",
|
|
1079
|
-
children:
|
|
1101
|
+
children: E("targets.startingInstallJob", "Starting install job...")
|
|
1080
1102
|
})]
|
|
1081
1103
|
})
|
|
1082
1104
|
}),
|
|
1083
|
-
|
|
1105
|
+
O?.status === "completed" && /* @__PURE__ */ c("div", {
|
|
1084
1106
|
className: "mt-4 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1085
|
-
children:
|
|
1107
|
+
children: E("targets.agentInstalledSuccess", "Agent installed successfully!")
|
|
1086
1108
|
}),
|
|
1087
|
-
|
|
1109
|
+
O?.status === "failed" && /* @__PURE__ */ c("div", {
|
|
1088
1110
|
className: "mt-4 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
1089
|
-
children:
|
|
1111
|
+
children: O.error ?? E("targets.installationFailed", "Installation failed.")
|
|
1090
1112
|
}),
|
|
1091
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ c("button", {
|
|
1092
1114
|
onClick: vn,
|
|
1093
|
-
disabled:
|
|
1115
|
+
disabled: O?.status === "running",
|
|
1094
1116
|
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",
|
|
1095
|
-
children: !
|
|
1117
|
+
children: !O || O.status === "running" ? E("targets.installing", "Installing...") : E("common.close", "Close")
|
|
1096
1118
|
})
|
|
1097
1119
|
]
|
|
1098
1120
|
})
|
|
1099
1121
|
}),
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
isOpen:
|
|
1102
|
-
onClose: () =>
|
|
1122
|
+
/* @__PURE__ */ c(e, {
|
|
1123
|
+
isOpen: ft,
|
|
1124
|
+
onClose: () => T(!1),
|
|
1103
1125
|
onConfirm: () => {
|
|
1104
|
-
|
|
1126
|
+
T(!1), f("/billing");
|
|
1105
1127
|
},
|
|
1106
1128
|
title: t("environment").title,
|
|
1107
1129
|
message: t("environment").message,
|
|
@@ -1110,14 +1132,14 @@ function $e() {
|
|
|
1110
1132
|
variant: "warning"
|
|
1111
1133
|
})
|
|
1112
1134
|
]
|
|
1113
|
-
}) : /* @__PURE__ */
|
|
1135
|
+
}) : /* @__PURE__ */ c("div", {
|
|
1114
1136
|
className: "flex items-center justify-center min-h-[400px]",
|
|
1115
|
-
children: /* @__PURE__ */
|
|
1137
|
+
children: /* @__PURE__ */ l("div", {
|
|
1116
1138
|
className: "text-center space-y-2",
|
|
1117
|
-
children: [/* @__PURE__ */
|
|
1139
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
1118
1140
|
className: "text-lg font-semibold text-foreground",
|
|
1119
1141
|
children: "Access Denied"
|
|
1120
|
-
}), /* @__PURE__ */
|
|
1142
|
+
}), /* @__PURE__ */ c("p", {
|
|
1121
1143
|
className: "text-sm text-text-secondary",
|
|
1122
1144
|
children: "You don't have permission to access this page."
|
|
1123
1145
|
})]
|
|
@@ -1125,6 +1147,6 @@ function $e() {
|
|
|
1125
1147
|
});
|
|
1126
1148
|
}
|
|
1127
1149
|
//#endregion
|
|
1128
|
-
export {
|
|
1150
|
+
export { u as TargetsPage };
|
|
1129
1151
|
|
|
1130
1152
|
//# sourceMappingURL=TargetsPage.js.map
|