@burdenoff/microfe-integrations 2026.1113.2 → 2026.1113.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.
|
@@ -23,16 +23,15 @@ import { usePermissions as De } from "@burdenoff/fe-libs/shared/providers/shell"
|
|
|
23
23
|
import { Fragment as Oe, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
24
24
|
import { useFeatureFlag as ke } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
25
25
|
import { ProviderIcon as Ae, canManageSharing as je } from "@burdenoff/fe-libs/connections";
|
|
26
|
-
import { AlertDialog as Me, AlertDialogAction as Ne, AlertDialogCancel as Pe, AlertDialogContent as Fe, AlertDialogDescription as Ie, AlertDialogFooter as Le, AlertDialogHeader as Re, AlertDialogTitle as ze, Button as y, CTAOverflowMenu as
|
|
27
|
-
import { suggestAnchorProps as
|
|
26
|
+
import { AlertDialog as Me, AlertDialogAction as Ne, AlertDialogCancel as Pe, AlertDialogContent as Fe, AlertDialogDescription as Ie, AlertDialogFooter as Le, AlertDialogHeader as Re, AlertDialogTitle as ze, Button as y, CTAOverflowMenu as Be, EmphasisPanel as Ve, GlassCard as b, NextSteps as x, OptionalFields as He, PagePurpose as Ue, ShowMore as S, ShowTechnicalDetails as We } from "@burdenoff/fe-libs/ui";
|
|
27
|
+
import { suggestAnchorProps as C } from "@burdenoff/fe-libs/shared/proactive";
|
|
28
28
|
// src/integrations/pages/ConnectionDetail.tsx
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
W({
|
|
29
|
+
function w() {
|
|
30
|
+
let { connectionId: w } = Ee(), { basePath: T = "/", navigate: E, navigationV2: D = !1 } = ie(), O = ee(), Ge = te(), Ke = ne(), k = re(), { connection: A, loading: qe, error: j, refetch: M } = oe(w ?? ""), { testConnection: Je, loading: N } = ue(), { refreshToken: Ye, loading: Xe } = ce(), { revokeConnection: Ze, loading: P } = le(), { deleteConnection: Qe, loading: F } = se(), I = ke(ae.OAUTH_REFRESH, !0), { hasPermission: L, isLoading: $e } = De(), R = L(t.CONNECTION_UPDATE), z = L(t.CONNECTION_DELETE), et = L(t.CONNECTION_SHARE), tt = L(t.CONNECTION_CREATE), [nt, B] = a(!1), [V, rt] = a(null), [H, U] = a(null), [it, W] = a(!1), [G, K] = a(!1), [at, q] = a(!1), [ot, st] = a(!1), ct = ge(A?.vaultId), J = (e, ee) => {
|
|
31
|
+
U({
|
|
33
32
|
type: e,
|
|
34
33
|
message: ee
|
|
35
|
-
}), setTimeout(() =>
|
|
34
|
+
}), setTimeout(() => U(null), 5e3);
|
|
36
35
|
};
|
|
37
36
|
if (qe || $e) return /* @__PURE__ */ v("div", {
|
|
38
37
|
className: "flex flex-col items-center justify-center py-20",
|
|
@@ -41,10 +40,10 @@ function E() {
|
|
|
41
40
|
className: "animate-spin text-primary"
|
|
42
41
|
}), /* @__PURE__ */ _("span", {
|
|
43
42
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
44
|
-
children:
|
|
43
|
+
children: O("integrations.connectionDetail.loading", "Loading connection details...")
|
|
45
44
|
})]
|
|
46
45
|
});
|
|
47
|
-
if (
|
|
46
|
+
if (j || !A) return /* @__PURE__ */ _("div", {
|
|
48
47
|
className: "p-6 max-w-4xl mx-auto",
|
|
49
48
|
children: /* @__PURE__ */ v("div", {
|
|
50
49
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
|
|
@@ -56,31 +55,31 @@ function E() {
|
|
|
56
55
|
children: [
|
|
57
56
|
/* @__PURE__ */ _("h3", {
|
|
58
57
|
className: "font-semibold text-status-error-text mb-1",
|
|
59
|
-
children:
|
|
58
|
+
children: O("integrations.connectionDetail.error.title", "Connection not found")
|
|
60
59
|
}),
|
|
61
60
|
/* @__PURE__ */ _("p", {
|
|
62
61
|
className: "text-sm text-status-error-text mb-3",
|
|
63
|
-
children:
|
|
62
|
+
children: j?.message || O("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
|
|
64
63
|
}),
|
|
65
64
|
/* @__PURE__ */ v("div", {
|
|
66
65
|
className: "flex gap-2",
|
|
67
66
|
children: [/* @__PURE__ */ v("button", {
|
|
68
67
|
type: "button",
|
|
69
|
-
onClick: () =>
|
|
68
|
+
onClick: () => M(),
|
|
70
69
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
|
|
71
70
|
children: [
|
|
72
71
|
/* @__PURE__ */ _(Ce, { size: 14 }),
|
|
73
72
|
" ",
|
|
74
|
-
|
|
73
|
+
O("integrations.connectionDetail.error.retry", "Try Again")
|
|
75
74
|
]
|
|
76
75
|
}), /* @__PURE__ */ v("button", {
|
|
77
76
|
type: "button",
|
|
78
|
-
onClick: () =>
|
|
77
|
+
onClick: () => E?.(n(T, "connections")),
|
|
79
78
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
80
79
|
children: [
|
|
81
80
|
/* @__PURE__ */ _(c, { size: 14 }),
|
|
82
81
|
" ",
|
|
83
|
-
|
|
82
|
+
O("integrations.connectionDetail.error.back", "Back to Connections")
|
|
84
83
|
]
|
|
85
84
|
})]
|
|
86
85
|
})
|
|
@@ -89,51 +88,51 @@ function E() {
|
|
|
89
88
|
})
|
|
90
89
|
});
|
|
91
90
|
let Y = async () => {
|
|
92
|
-
let e = await Je(
|
|
91
|
+
let e = await Je(A.id);
|
|
93
92
|
e && (rt(e), J(e.success ? "success" : "error", e.message));
|
|
94
93
|
}, X = async () => {
|
|
95
94
|
try {
|
|
96
|
-
let e = await Ye(
|
|
97
|
-
be(e) ? J("success",
|
|
95
|
+
let e = await Ye(A.id);
|
|
96
|
+
be(e) ? J("success", O("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")) : J("error", O("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
|
|
98
97
|
} catch (e) {
|
|
99
|
-
J("error", e instanceof Error ? e.message :
|
|
98
|
+
J("error", e instanceof Error ? e.message : O("integrations.connectionDetail.notifications.refreshFailed", "The token could not be refreshed. Reconnect to sign in again."));
|
|
100
99
|
} finally {
|
|
101
|
-
|
|
100
|
+
M();
|
|
102
101
|
}
|
|
103
|
-
},
|
|
102
|
+
}, lt = async () => {
|
|
104
103
|
q(!0);
|
|
104
|
+
}, ut = async () => {
|
|
105
|
+
await Ze(A.id), J("success", O("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), q(!1), M();
|
|
105
106
|
}, dt = async () => {
|
|
106
|
-
await Ze(j.id), J("success", k("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), q(!1), N();
|
|
107
|
-
}, ft = async () => {
|
|
108
107
|
r("medium");
|
|
109
108
|
let e = await he({
|
|
110
|
-
title:
|
|
111
|
-
message:
|
|
112
|
-
okButtonTitle:
|
|
113
|
-
cancelButtonTitle:
|
|
109
|
+
title: O("integrations.connectionDetail.deleteDialog.title", "Delete Connection"),
|
|
110
|
+
message: O("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."),
|
|
111
|
+
okButtonTitle: O("integrations.connectionDetail.deleteDialog.confirm", "Delete"),
|
|
112
|
+
cancelButtonTitle: O("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
|
|
114
113
|
});
|
|
115
|
-
e === null ?
|
|
116
|
-
},
|
|
114
|
+
e === null ? W(!0) : e && await ft();
|
|
115
|
+
}, ft = async () => {
|
|
117
116
|
try {
|
|
118
|
-
await Qe(
|
|
117
|
+
await Qe(A.id, G), J("success", O("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), i("success"), W(!1), K(!1), E?.(n(T, "connections"));
|
|
119
118
|
} catch (e) {
|
|
120
119
|
J("error", e instanceof Error ? e.message : "Failed to delete connection"), i("error");
|
|
121
120
|
}
|
|
122
|
-
}, Z =
|
|
121
|
+
}, Z = N || Xe || P || F, Q = et && je(A.myAccess ?? null), $ = !!(A.vaultId || A.credentialSecretId), pt = [
|
|
123
122
|
{
|
|
124
123
|
id: "test",
|
|
125
|
-
label:
|
|
126
|
-
description:
|
|
124
|
+
label: O("integrations.connectionDetail.nextSteps.test.label", "Test the connection"),
|
|
125
|
+
description: O("integrations.connectionDetail.nextSteps.test.description", "Run a live check to confirm credentials still work before relying on it."),
|
|
127
126
|
icon: /* @__PURE__ */ _(g, { size: 16 }),
|
|
128
127
|
onClick: () => {
|
|
129
128
|
Y();
|
|
130
129
|
},
|
|
131
|
-
done:
|
|
130
|
+
done: A.status === "active" && !!V?.success
|
|
132
131
|
},
|
|
133
|
-
...
|
|
132
|
+
...R && A.provider.authType === "oauth2" && I ? [{
|
|
134
133
|
id: "refresh",
|
|
135
|
-
label:
|
|
136
|
-
description:
|
|
134
|
+
label: O("integrations.connectionDetail.nextSteps.refresh.label", "Refresh the access token"),
|
|
135
|
+
description: O("integrations.connectionDetail.nextSteps.refresh.description", "Renew OAuth credentials if requests start failing with an auth error."),
|
|
137
136
|
icon: /* @__PURE__ */ _(f, { size: 16 }),
|
|
138
137
|
onClick: () => {
|
|
139
138
|
X();
|
|
@@ -141,109 +140,109 @@ function E() {
|
|
|
141
140
|
}] : [],
|
|
142
141
|
{
|
|
143
142
|
id: "logs",
|
|
144
|
-
label:
|
|
145
|
-
description:
|
|
143
|
+
label: O("integrations.connectionDetail.nextSteps.logs.label", "Review activity logs"),
|
|
144
|
+
description: O("integrations.connectionDetail.nextSteps.logs.description", "See recent requests and errors for this connection to debug issues."),
|
|
146
145
|
icon: /* @__PURE__ */ _(o, { size: 16 }),
|
|
147
|
-
onClick: () =>
|
|
146
|
+
onClick: () => E?.(n(T, "logs"))
|
|
148
147
|
}
|
|
149
|
-
],
|
|
150
|
-
|
|
151
|
-
className: e("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200",
|
|
152
|
-
children: [
|
|
148
|
+
], mt = /* @__PURE__ */ v(Oe, { children: [
|
|
149
|
+
H && /* @__PURE__ */ v("div", {
|
|
150
|
+
className: e("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", H.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"),
|
|
151
|
+
children: [H.type === "success" ? /* @__PURE__ */ _(l, { size: 20 }) : /* @__PURE__ */ _(h, { size: 20 }), /* @__PURE__ */ _("span", {
|
|
153
152
|
className: "font-medium",
|
|
154
|
-
children:
|
|
153
|
+
children: H.message
|
|
155
154
|
})]
|
|
156
155
|
}),
|
|
157
156
|
/* @__PURE__ */ _(Me, {
|
|
158
157
|
open: it,
|
|
159
158
|
onOpenChange: (e) => {
|
|
160
|
-
e || (
|
|
159
|
+
e || (W(!1), K(!1));
|
|
161
160
|
},
|
|
162
161
|
children: /* @__PURE__ */ v(Fe, {
|
|
163
162
|
className: "max-w-md",
|
|
164
163
|
children: [
|
|
165
|
-
/* @__PURE__ */ v(Re, { children: [/* @__PURE__ */ _(ze, { children:
|
|
166
|
-
name:
|
|
167
|
-
provider:
|
|
168
|
-
}) :
|
|
164
|
+
/* @__PURE__ */ v(Re, { children: [/* @__PURE__ */ _(ze, { children: O("integrations.connectionDetail.deleteDialog.title", "Delete Connection") }), /* @__PURE__ */ v(Ie, { children: [D ? O("integrations.connectedApps.removeMessage", "Remove {{name}}? Workflows that use it stop working until you connect {{provider}} again.", {
|
|
165
|
+
name: A.name,
|
|
166
|
+
provider: A.provider.name
|
|
167
|
+
}) : O("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."), $ && ` ${O("integrations.connectionDetail.deleteDialog.vaultHint", "You can also remove the mapped vault secret if you no longer need it.")}`] })] }),
|
|
169
168
|
$ && /* @__PURE__ */ v("label", {
|
|
170
169
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer",
|
|
171
170
|
children: [/* @__PURE__ */ _("input", {
|
|
172
171
|
type: "checkbox",
|
|
173
|
-
checked:
|
|
172
|
+
checked: G,
|
|
174
173
|
onChange: (e) => K(e.target.checked),
|
|
175
174
|
className: "mt-0.5",
|
|
176
|
-
"aria-label":
|
|
175
|
+
"aria-label": O("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
|
|
177
176
|
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
178
177
|
className: "text-sm font-medium text-text-primary",
|
|
179
|
-
children:
|
|
178
|
+
children: O("integrations.connectionDetail.deleteDialog.removeVaultSecret", "Also remove mapped vault secret")
|
|
180
179
|
}), /* @__PURE__ */ _("p", {
|
|
181
180
|
className: "text-xs text-text-secondary mt-1",
|
|
182
|
-
children:
|
|
181
|
+
children: O("integrations.connectionDetail.deleteDialog.removeVaultSecretHint", "Use this only if no other connections rely on the same secret.")
|
|
183
182
|
})] })]
|
|
184
183
|
}),
|
|
185
184
|
/* @__PURE__ */ v(Le, { children: [/* @__PURE__ */ _(Pe, {
|
|
186
185
|
onClick: () => {
|
|
187
|
-
|
|
186
|
+
W(!1), K(!1);
|
|
188
187
|
},
|
|
189
|
-
children:
|
|
188
|
+
children: O("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
|
|
190
189
|
}), /* @__PURE__ */ v(Ne, {
|
|
191
|
-
disabled:
|
|
190
|
+
disabled: F,
|
|
192
191
|
onClick: (e) => {
|
|
193
|
-
e.preventDefault(),
|
|
192
|
+
e.preventDefault(), ft();
|
|
194
193
|
},
|
|
195
194
|
className: "inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50",
|
|
196
|
-
children: [
|
|
195
|
+
children: [F ? /* @__PURE__ */ _(d, {
|
|
197
196
|
size: 14,
|
|
198
197
|
className: "animate-spin"
|
|
199
|
-
}) : /* @__PURE__ */ _(m, { size: 14 }),
|
|
198
|
+
}) : /* @__PURE__ */ _(m, { size: 14 }), O("integrations.connectionDetail.deleteDialog.deleteConnection", "Delete connection")]
|
|
200
199
|
})] })
|
|
201
200
|
]
|
|
202
201
|
})
|
|
203
202
|
}),
|
|
204
203
|
/* @__PURE__ */ _(me, {
|
|
205
|
-
open:
|
|
206
|
-
title:
|
|
207
|
-
description:
|
|
208
|
-
confirmLabel:
|
|
209
|
-
cancelLabel:
|
|
210
|
-
loading:
|
|
204
|
+
open: at,
|
|
205
|
+
title: O("integrations.connectionDetail.confirm.revokeTitle", "Revoke connection"),
|
|
206
|
+
description: O("integrations.connectionDetail.confirm.revoke", "Are you sure you want to revoke this connection? This will disconnect the external service."),
|
|
207
|
+
confirmLabel: O("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
208
|
+
cancelLabel: O("integrations.connectionDetail.actions.cancel", "Cancel"),
|
|
209
|
+
loading: P,
|
|
211
210
|
destructive: !0,
|
|
212
211
|
icon: /* @__PURE__ */ _(p, { size: 20 }),
|
|
213
|
-
onConfirm:
|
|
212
|
+
onConfirm: ut,
|
|
214
213
|
onCancel: () => q(!1)
|
|
215
214
|
}),
|
|
216
215
|
Q && /* @__PURE__ */ _(fe, {
|
|
217
|
-
connection:
|
|
216
|
+
connection: A,
|
|
218
217
|
open: nt,
|
|
219
|
-
onClose: () =>
|
|
218
|
+
onClose: () => B(!1),
|
|
220
219
|
onShared: () => {
|
|
221
|
-
J("success",
|
|
220
|
+
J("success", O("integrations.connectionDetail.notifications.shareSuccess", "Sharing updated")), M();
|
|
222
221
|
}
|
|
223
222
|
})
|
|
224
|
-
] }),
|
|
225
|
-
onClick: () =>
|
|
223
|
+
] }), ht = tt && ye(A.status), gt = A.externalAccountEmail || A.externalAccountName, _t = ht ? /* @__PURE__ */ v(y, {
|
|
224
|
+
onClick: () => st(!0),
|
|
226
225
|
"data-testid": "connection-detail-reconnect",
|
|
227
226
|
children: [/* @__PURE__ */ _(f, {
|
|
228
227
|
size: 14,
|
|
229
228
|
"aria-hidden": "true"
|
|
230
|
-
}),
|
|
229
|
+
}), O("integrations.connectedApps.reconnect", "Reconnect")]
|
|
231
230
|
}) : null;
|
|
232
|
-
return
|
|
231
|
+
return D ? /* @__PURE__ */ v("div", {
|
|
233
232
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
234
233
|
children: [
|
|
235
|
-
|
|
234
|
+
mt,
|
|
236
235
|
/* @__PURE__ */ _(_e, {
|
|
237
|
-
open:
|
|
238
|
-
onClose: () =>
|
|
239
|
-
reconnect:
|
|
240
|
-
connectionId:
|
|
241
|
-
name:
|
|
242
|
-
providerId:
|
|
243
|
-
authMethodKey:
|
|
236
|
+
open: ot,
|
|
237
|
+
onClose: () => st(!1),
|
|
238
|
+
reconnect: ot ? {
|
|
239
|
+
connectionId: A.id,
|
|
240
|
+
name: A.name,
|
|
241
|
+
providerId: A.provider.id,
|
|
242
|
+
authMethodKey: A.authMethodKey ?? null
|
|
244
243
|
} : null,
|
|
245
244
|
onConnectionCreated: () => {
|
|
246
|
-
|
|
245
|
+
M();
|
|
247
246
|
}
|
|
248
247
|
}),
|
|
249
248
|
/* @__PURE__ */ _("div", {
|
|
@@ -257,84 +256,84 @@ function E() {
|
|
|
257
256
|
variant: "ghost",
|
|
258
257
|
size: "icon",
|
|
259
258
|
className: "shrink-0",
|
|
260
|
-
onClick: () =>
|
|
261
|
-
"aria-label":
|
|
259
|
+
onClick: () => E?.(T),
|
|
260
|
+
"aria-label": O("integrations.connectionDetail.actions.backAriaLabel", "Back"),
|
|
262
261
|
children: /* @__PURE__ */ _(c, { size: 20 })
|
|
263
262
|
}),
|
|
264
263
|
/* @__PURE__ */ _(Ae, {
|
|
265
|
-
provider:
|
|
264
|
+
provider: A.provider,
|
|
266
265
|
size: 56
|
|
267
266
|
}),
|
|
268
267
|
/* @__PURE__ */ v("div", {
|
|
269
268
|
className: "min-w-0 flex-1",
|
|
270
269
|
children: [/* @__PURE__ */ v("div", {
|
|
271
270
|
className: "flex flex-wrap items-center gap-3",
|
|
272
|
-
...
|
|
271
|
+
...C({
|
|
273
272
|
entityType: "connection",
|
|
274
|
-
entityId:
|
|
273
|
+
entityId: A.id
|
|
275
274
|
}),
|
|
276
275
|
children: [
|
|
277
276
|
/* @__PURE__ */ _("h1", {
|
|
278
277
|
className: "text-2xl sm:text-3xl font-bold text-text-primary break-words",
|
|
279
|
-
children:
|
|
278
|
+
children: A.name
|
|
280
279
|
}),
|
|
281
280
|
/* @__PURE__ */ _(de, {
|
|
282
|
-
status:
|
|
281
|
+
status: A.status,
|
|
283
282
|
size: "md"
|
|
284
283
|
}),
|
|
285
|
-
/* @__PURE__ */ _(pe, { connection:
|
|
284
|
+
/* @__PURE__ */ _(pe, { connection: A })
|
|
286
285
|
]
|
|
287
286
|
}), /* @__PURE__ */ v("p", {
|
|
288
287
|
className: "text-sm text-text-secondary mt-0.5",
|
|
289
288
|
children: [
|
|
290
|
-
|
|
289
|
+
gt ? O("integrations.connectedApps.signedInAs", "Signed in as {{account}}", { account: gt }) : A.provider.name,
|
|
291
290
|
" · ",
|
|
292
|
-
|
|
291
|
+
O("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: Ke(A.lastUsedAt) })
|
|
293
292
|
]
|
|
294
293
|
})]
|
|
295
294
|
})
|
|
296
295
|
]
|
|
297
296
|
}), /* @__PURE__ */ v("div", {
|
|
298
297
|
className: "flex shrink-0 flex-wrap items-center gap-2",
|
|
299
|
-
children: [
|
|
298
|
+
children: [_t, /* @__PURE__ */ _(Be, {
|
|
300
299
|
align: "end",
|
|
301
300
|
primary: {
|
|
302
|
-
label:
|
|
301
|
+
label: O("integrations.connectedApps.test", "Test"),
|
|
303
302
|
onSelect: () => {
|
|
304
303
|
Y();
|
|
305
304
|
},
|
|
306
305
|
disabled: Z,
|
|
307
|
-
icon:
|
|
306
|
+
icon: N ? /* @__PURE__ */ _(d, {
|
|
308
307
|
size: 14,
|
|
309
308
|
className: "animate-spin"
|
|
310
309
|
}) : /* @__PURE__ */ _(g, { size: 14 })
|
|
311
310
|
},
|
|
312
311
|
actions: [
|
|
313
312
|
...Q ? [{
|
|
314
|
-
label:
|
|
315
|
-
onSelect: () =>
|
|
313
|
+
label: O("integrations.connectionDetail.actions.share", "Share"),
|
|
314
|
+
onSelect: () => B(!0),
|
|
316
315
|
disabled: Z,
|
|
317
316
|
icon: /* @__PURE__ */ _(we, { size: 14 })
|
|
318
317
|
}] : [],
|
|
319
|
-
...
|
|
320
|
-
label:
|
|
318
|
+
...R && A.provider.authType === "oauth2" && I ? [{
|
|
319
|
+
label: O("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
|
|
321
320
|
onSelect: () => {
|
|
322
321
|
X();
|
|
323
322
|
},
|
|
324
323
|
disabled: Z,
|
|
325
324
|
icon: /* @__PURE__ */ _(f, { size: 14 })
|
|
326
325
|
}] : [],
|
|
327
|
-
...
|
|
328
|
-
label:
|
|
326
|
+
...z ? [{
|
|
327
|
+
label: O("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
329
328
|
onSelect: () => {
|
|
330
|
-
|
|
329
|
+
lt();
|
|
331
330
|
},
|
|
332
331
|
disabled: Z,
|
|
333
332
|
icon: /* @__PURE__ */ _(p, { size: 14 })
|
|
334
333
|
}, {
|
|
335
|
-
label:
|
|
334
|
+
label: O("integrations.connectedApps.remove", "Remove"),
|
|
336
335
|
onSelect: () => {
|
|
337
|
-
r("medium"),
|
|
336
|
+
r("medium"), W(!0);
|
|
338
337
|
},
|
|
339
338
|
intent: "destructive",
|
|
340
339
|
disabled: Z,
|
|
@@ -345,7 +344,7 @@ function E() {
|
|
|
345
344
|
})]
|
|
346
345
|
})
|
|
347
346
|
}),
|
|
348
|
-
|
|
347
|
+
A.errorMessage && /* @__PURE__ */ v("div", {
|
|
349
348
|
role: "alert",
|
|
350
349
|
className: "flex flex-col gap-3 rounded-xl border border-border-default bg-status-error-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
351
350
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -357,72 +356,72 @@ function E() {
|
|
|
357
356
|
className: "min-w-0",
|
|
358
357
|
children: [/* @__PURE__ */ _("p", {
|
|
359
358
|
className: "font-semibold text-status-error-text",
|
|
360
|
-
children:
|
|
359
|
+
children: O("integrations.connectedApps.brokenTitle", "{{provider}} stopped working", { provider: A.provider.name })
|
|
361
360
|
}), /* @__PURE__ */ _("p", {
|
|
362
361
|
className: "text-sm text-status-error-text break-words",
|
|
363
|
-
children:
|
|
362
|
+
children: A.errorMessage
|
|
364
363
|
})]
|
|
365
364
|
})]
|
|
366
|
-
}),
|
|
365
|
+
}), _t]
|
|
367
366
|
}),
|
|
368
|
-
|
|
367
|
+
V && /* @__PURE__ */ v("div", {
|
|
369
368
|
role: "status",
|
|
370
|
-
className: e("rounded-xl border p-4",
|
|
369
|
+
className: e("rounded-xl border p-4", V.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
|
|
371
370
|
children: [/* @__PURE__ */ v("p", {
|
|
372
|
-
className: e("font-semibold flex items-center gap-2",
|
|
373
|
-
children: [
|
|
371
|
+
className: e("font-semibold flex items-center gap-2", V.success ? "text-status-success-text" : "text-status-error-text"),
|
|
372
|
+
children: [V.success ? /* @__PURE__ */ _(l, { size: 18 }) : /* @__PURE__ */ _(h, { size: 18 }), V.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
|
|
374
373
|
}), /* @__PURE__ */ _("p", {
|
|
375
|
-
className: e("text-sm mt-1",
|
|
376
|
-
children:
|
|
374
|
+
className: e("text-sm mt-1", V.success ? "text-status-success-text" : "text-status-error-text"),
|
|
375
|
+
children: V.message
|
|
377
376
|
})]
|
|
378
377
|
}),
|
|
379
|
-
/* @__PURE__ */ _(
|
|
378
|
+
/* @__PURE__ */ _(He, {
|
|
380
379
|
storageKey: "integrations.connection-detail.more-details",
|
|
381
|
-
label:
|
|
380
|
+
label: O("integrations.connectedApps.moreDetails", "More details"),
|
|
382
381
|
children: /* @__PURE__ */ v("div", {
|
|
383
382
|
className: "space-y-4",
|
|
384
383
|
children: [
|
|
385
384
|
/* @__PURE__ */ v("div", {
|
|
386
385
|
className: "space-y-3 text-sm",
|
|
387
|
-
children: [
|
|
386
|
+
children: [A.description && /* @__PURE__ */ v("div", {
|
|
388
387
|
className: "py-2 border-b border-border-seam",
|
|
389
388
|
children: [/* @__PURE__ */ _("span", {
|
|
390
389
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
391
|
-
children:
|
|
390
|
+
children: O("integrations.connectionDetail.fields.description", "Description")
|
|
392
391
|
}), /* @__PURE__ */ _("p", {
|
|
393
392
|
className: "text-text-primary mt-0.5",
|
|
394
|
-
children:
|
|
393
|
+
children: A.description
|
|
395
394
|
})]
|
|
396
395
|
}), [
|
|
397
396
|
{
|
|
398
397
|
id: "app",
|
|
399
|
-
label:
|
|
400
|
-
value: `${
|
|
398
|
+
label: O("integrations.connectionDetail.fields.provider", "Provider"),
|
|
399
|
+
value: `${A.provider.name} · ${Ge(A.provider.authType)}`
|
|
401
400
|
},
|
|
402
|
-
...
|
|
401
|
+
...A.externalAccountName && A.externalAccountEmail ? [{
|
|
403
402
|
id: "name",
|
|
404
|
-
label:
|
|
405
|
-
value:
|
|
403
|
+
label: O("integrations.connectionDetail.fields.name", "Name"),
|
|
404
|
+
value: A.externalAccountName
|
|
406
405
|
}] : [],
|
|
407
406
|
{
|
|
408
407
|
id: "health",
|
|
409
|
-
label:
|
|
410
|
-
value: A
|
|
408
|
+
label: O("integrations.connectionDetail.fields.healthCheck", "Health Check"),
|
|
409
|
+
value: k(A.lastHealthCheck)
|
|
411
410
|
},
|
|
412
411
|
{
|
|
413
412
|
id: "created",
|
|
414
|
-
label:
|
|
415
|
-
value: A
|
|
413
|
+
label: O("integrations.connectionDetail.fields.created", "Created"),
|
|
414
|
+
value: k(A.createdAt)
|
|
416
415
|
},
|
|
417
|
-
...
|
|
416
|
+
...V ? [{
|
|
418
417
|
id: "latency",
|
|
419
|
-
label:
|
|
420
|
-
value:
|
|
418
|
+
label: O("integrations.connectedApps.testLatency", "Test latency"),
|
|
419
|
+
value: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: V.latencyMs })
|
|
421
420
|
}] : [],
|
|
422
421
|
...$ ? [{
|
|
423
422
|
id: "storage",
|
|
424
|
-
label:
|
|
425
|
-
value: [
|
|
423
|
+
label: O("integrations.connectionDetail.sections.credentialStorage", "Credential Storage"),
|
|
424
|
+
value: [ct ?? A.vaultId, A.credentialSecretName].filter(Boolean).join(" · ")
|
|
426
425
|
}] : []
|
|
427
426
|
].map((e) => /* @__PURE__ */ v("div", {
|
|
428
427
|
className: "flex items-center justify-between gap-3 py-2 border-b border-border-seam",
|
|
@@ -441,47 +440,47 @@ function E() {
|
|
|
441
440
|
size: 16,
|
|
442
441
|
className: "text-primary",
|
|
443
442
|
"aria-hidden": "true"
|
|
444
|
-
}),
|
|
445
|
-
}),
|
|
443
|
+
}), O("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
|
|
444
|
+
}), A.grantedScopes.length > 0 ? /* @__PURE__ */ _(S, {
|
|
446
445
|
collapsedHeight: 88,
|
|
447
446
|
label: "Show all scopes",
|
|
448
447
|
children: /* @__PURE__ */ _("div", {
|
|
449
448
|
className: "flex flex-wrap gap-2",
|
|
450
|
-
children:
|
|
449
|
+
children: A.grantedScopes.map((e) => /* @__PURE__ */ _("span", {
|
|
451
450
|
className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
|
|
452
451
|
children: e
|
|
453
452
|
}, e))
|
|
454
453
|
})
|
|
455
454
|
}) : /* @__PURE__ */ _("p", {
|
|
456
455
|
className: "text-sm text-text-secondary",
|
|
457
|
-
children:
|
|
456
|
+
children: O("integrations.connectionDetail.scopes.empty", "No scopes granted.")
|
|
458
457
|
})] }),
|
|
459
|
-
(
|
|
458
|
+
(R || z) && /* @__PURE__ */ _(x, {
|
|
460
459
|
storageKey: "integrations-connection-detail",
|
|
461
|
-
steps:
|
|
460
|
+
steps: pt
|
|
462
461
|
}),
|
|
463
|
-
/* @__PURE__ */ _(
|
|
462
|
+
/* @__PURE__ */ _(We, {
|
|
464
463
|
copyable: !0,
|
|
465
464
|
children: [
|
|
466
|
-
`connectionId: ${
|
|
467
|
-
`providerKey: ${
|
|
468
|
-
`status: ${
|
|
469
|
-
...
|
|
470
|
-
...
|
|
465
|
+
`connectionId: ${A.id}`,
|
|
466
|
+
`providerKey: ${A.provider.key}`,
|
|
467
|
+
`status: ${A.status}`,
|
|
468
|
+
...A.vaultId ? [`vaultId: ${A.vaultId}`] : [],
|
|
469
|
+
...A.credentialSecretId ? [`secretId: ${A.credentialSecretId}`] : []
|
|
471
470
|
].join("\n")
|
|
472
471
|
})
|
|
473
472
|
]
|
|
474
473
|
})
|
|
475
474
|
}),
|
|
476
475
|
/* @__PURE__ */ _(ve, {
|
|
477
|
-
connectionId:
|
|
478
|
-
onShowAll: () =>
|
|
476
|
+
connectionId: A.id,
|
|
477
|
+
onShowAll: () => E?.(n(T, `logs?connectionId=${encodeURIComponent(A.id)}`))
|
|
479
478
|
})
|
|
480
479
|
]
|
|
481
480
|
}) : /* @__PURE__ */ v("div", {
|
|
482
481
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
483
482
|
children: [
|
|
484
|
-
|
|
483
|
+
mt,
|
|
485
484
|
/* @__PURE__ */ _("div", {
|
|
486
485
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
487
486
|
children: /* @__PURE__ */ v("div", {
|
|
@@ -490,122 +489,122 @@ function E() {
|
|
|
490
489
|
/* @__PURE__ */ _(y, {
|
|
491
490
|
variant: "ghost",
|
|
492
491
|
size: "icon",
|
|
493
|
-
onClick: () =>
|
|
494
|
-
"aria-label":
|
|
492
|
+
onClick: () => E?.(n(T, "connections")),
|
|
493
|
+
"aria-label": O("integrations.connectionDetail.actions.backAriaLabel", "Back"),
|
|
495
494
|
children: /* @__PURE__ */ _(c, { size: 20 })
|
|
496
495
|
}),
|
|
497
496
|
/* @__PURE__ */ _(Ae, {
|
|
498
|
-
provider:
|
|
497
|
+
provider: A.provider,
|
|
499
498
|
size: 56
|
|
500
499
|
}),
|
|
501
500
|
/* @__PURE__ */ v("div", {
|
|
502
501
|
className: "flex-1",
|
|
503
502
|
children: [/* @__PURE__ */ v("div", {
|
|
504
503
|
className: "flex items-center gap-3",
|
|
505
|
-
...
|
|
504
|
+
...C({
|
|
506
505
|
entityType: "connection",
|
|
507
|
-
entityId:
|
|
506
|
+
entityId: A.id
|
|
508
507
|
}),
|
|
509
508
|
children: [
|
|
510
509
|
/* @__PURE__ */ _("h1", {
|
|
511
510
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
512
|
-
children:
|
|
511
|
+
children: A.name
|
|
513
512
|
}),
|
|
514
513
|
/* @__PURE__ */ _(de, {
|
|
515
|
-
status:
|
|
514
|
+
status: A.status,
|
|
516
515
|
size: "md"
|
|
517
516
|
}),
|
|
518
|
-
/* @__PURE__ */ _(pe, { connection:
|
|
517
|
+
/* @__PURE__ */ _(pe, { connection: A })
|
|
519
518
|
]
|
|
520
519
|
}), /* @__PURE__ */ v("p", {
|
|
521
520
|
className: "text-sm text-text-secondary mt-0.5",
|
|
522
521
|
children: [
|
|
523
|
-
|
|
522
|
+
A.provider.name,
|
|
524
523
|
" · ",
|
|
525
|
-
Ge(
|
|
524
|
+
Ge(A.provider.authType)
|
|
526
525
|
]
|
|
527
526
|
})]
|
|
528
527
|
})
|
|
529
528
|
]
|
|
530
529
|
})
|
|
531
530
|
}),
|
|
532
|
-
/* @__PURE__ */ _(
|
|
531
|
+
/* @__PURE__ */ _(Ue, {
|
|
533
532
|
icon: /* @__PURE__ */ _(o, { size: 16 }),
|
|
534
|
-
children:
|
|
533
|
+
children: O("integrations.connectionDetail.purpose", "This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: A.provider.name })
|
|
535
534
|
}),
|
|
536
|
-
(
|
|
535
|
+
(R || z) && /* @__PURE__ */ _(x, {
|
|
537
536
|
storageKey: "integrations-connection-detail",
|
|
538
|
-
steps:
|
|
537
|
+
steps: pt
|
|
539
538
|
}),
|
|
540
539
|
/* @__PURE__ */ v("div", {
|
|
541
540
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
542
|
-
children: [/* @__PURE__ */ v(
|
|
541
|
+
children: [/* @__PURE__ */ v(Ve, {
|
|
543
542
|
className: "p-5 space-y-4",
|
|
544
543
|
children: [/* @__PURE__ */ v("h2", {
|
|
545
544
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
546
545
|
children: [/* @__PURE__ */ _(o, {
|
|
547
546
|
size: 18,
|
|
548
547
|
className: "text-primary"
|
|
549
|
-
}),
|
|
548
|
+
}), O("integrations.connectionDetail.sections.info", "Connection Info")]
|
|
550
549
|
}), /* @__PURE__ */ v("div", {
|
|
551
550
|
className: "space-y-3",
|
|
552
551
|
children: [
|
|
553
|
-
|
|
552
|
+
A.description && /* @__PURE__ */ v("div", {
|
|
554
553
|
className: "py-2 border-b border-border-seam",
|
|
555
554
|
children: [/* @__PURE__ */ _("span", {
|
|
556
555
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
557
|
-
children:
|
|
556
|
+
children: O("integrations.connectionDetail.fields.description", "Description")
|
|
558
557
|
}), /* @__PURE__ */ _("p", {
|
|
559
558
|
className: "text-sm text-text-primary mt-0.5",
|
|
560
|
-
children:
|
|
559
|
+
children: A.description
|
|
561
560
|
})]
|
|
562
561
|
}),
|
|
563
562
|
/* @__PURE__ */ v("div", {
|
|
564
563
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
565
564
|
children: [/* @__PURE__ */ _("span", {
|
|
566
565
|
className: "text-sm text-text-secondary",
|
|
567
|
-
children:
|
|
566
|
+
children: O("integrations.connectionDetail.fields.provider", "Provider")
|
|
568
567
|
}), /* @__PURE__ */ _("span", {
|
|
569
568
|
className: "text-sm font-medium text-text-primary",
|
|
570
|
-
children:
|
|
569
|
+
children: A.provider.name
|
|
571
570
|
})]
|
|
572
571
|
}),
|
|
573
|
-
|
|
572
|
+
A.externalAccountEmail && /* @__PURE__ */ v("div", {
|
|
574
573
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
575
574
|
children: [/* @__PURE__ */ v("span", {
|
|
576
575
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
577
576
|
children: [
|
|
578
577
|
/* @__PURE__ */ _(Se, { size: 14 }),
|
|
579
578
|
" ",
|
|
580
|
-
|
|
579
|
+
O("integrations.connectionDetail.fields.account", "Account")
|
|
581
580
|
]
|
|
582
581
|
}), /* @__PURE__ */ _("span", {
|
|
583
582
|
className: "text-sm font-medium text-text-primary",
|
|
584
|
-
children:
|
|
583
|
+
children: A.externalAccountEmail
|
|
585
584
|
})]
|
|
586
585
|
}),
|
|
587
|
-
|
|
586
|
+
A.externalAccountName && /* @__PURE__ */ v("div", {
|
|
588
587
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
589
588
|
children: [/* @__PURE__ */ v("span", {
|
|
590
589
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
591
590
|
children: [
|
|
592
591
|
/* @__PURE__ */ _(Te, { size: 14 }),
|
|
593
592
|
" ",
|
|
594
|
-
|
|
593
|
+
O("integrations.connectionDetail.fields.name", "Name")
|
|
595
594
|
]
|
|
596
595
|
}), /* @__PURE__ */ _("span", {
|
|
597
596
|
className: "text-sm font-medium text-text-primary",
|
|
598
|
-
children:
|
|
597
|
+
children: A.externalAccountName
|
|
599
598
|
})]
|
|
600
599
|
}),
|
|
601
|
-
|
|
600
|
+
A.errorMessage && /* @__PURE__ */ v("div", {
|
|
602
601
|
className: "py-2 border-b border-border-seam",
|
|
603
602
|
children: [/* @__PURE__ */ _("span", {
|
|
604
603
|
className: "text-xs text-status-error-text uppercase tracking-wide",
|
|
605
|
-
children:
|
|
604
|
+
children: O("integrations.connectionDetail.fields.error", "Error")
|
|
606
605
|
}), /* @__PURE__ */ _("p", {
|
|
607
606
|
className: "text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2",
|
|
608
|
-
children:
|
|
607
|
+
children: A.errorMessage
|
|
609
608
|
})]
|
|
610
609
|
}),
|
|
611
610
|
/* @__PURE__ */ v("div", {
|
|
@@ -615,31 +614,31 @@ function E() {
|
|
|
615
614
|
children: [
|
|
616
615
|
/* @__PURE__ */ _(xe, { size: 14 }),
|
|
617
616
|
" ",
|
|
618
|
-
|
|
617
|
+
O("integrations.connectionDetail.fields.lastUsed", "Last Used")
|
|
619
618
|
]
|
|
620
619
|
}), /* @__PURE__ */ _("span", {
|
|
621
620
|
className: "text-sm text-text-primary",
|
|
622
|
-
children: Ke(
|
|
621
|
+
children: Ke(A.lastUsedAt)
|
|
623
622
|
})]
|
|
624
623
|
}),
|
|
625
624
|
/* @__PURE__ */ v("div", {
|
|
626
625
|
className: "flex items-center justify-between py-2 border-b border-border-seam",
|
|
627
626
|
children: [/* @__PURE__ */ _("span", {
|
|
628
627
|
className: "text-sm text-text-secondary",
|
|
629
|
-
children:
|
|
628
|
+
children: O("integrations.connectionDetail.fields.healthCheck", "Health Check")
|
|
630
629
|
}), /* @__PURE__ */ _("span", {
|
|
631
630
|
className: "text-sm text-text-primary",
|
|
632
|
-
children: A
|
|
631
|
+
children: k(A.lastHealthCheck)
|
|
633
632
|
})]
|
|
634
633
|
}),
|
|
635
634
|
/* @__PURE__ */ v("div", {
|
|
636
635
|
className: "flex items-center justify-between py-2",
|
|
637
636
|
children: [/* @__PURE__ */ _("span", {
|
|
638
637
|
className: "text-sm text-text-secondary",
|
|
639
|
-
children:
|
|
638
|
+
children: O("integrations.connectionDetail.fields.created", "Created")
|
|
640
639
|
}), /* @__PURE__ */ _("span", {
|
|
641
640
|
className: "text-sm text-text-primary",
|
|
642
|
-
children: A
|
|
641
|
+
children: k(A.createdAt)
|
|
643
642
|
})]
|
|
644
643
|
})
|
|
645
644
|
]
|
|
@@ -647,137 +646,137 @@ function E() {
|
|
|
647
646
|
}), /* @__PURE__ */ v("div", {
|
|
648
647
|
className: "space-y-4",
|
|
649
648
|
children: [
|
|
650
|
-
/* @__PURE__ */ v(
|
|
649
|
+
/* @__PURE__ */ v(b, {
|
|
651
650
|
className: "border-border-seam p-5",
|
|
652
651
|
children: [/* @__PURE__ */ v("h2", {
|
|
653
652
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
654
653
|
children: [/* @__PURE__ */ _(p, {
|
|
655
654
|
size: 18,
|
|
656
655
|
className: "text-primary"
|
|
657
|
-
}),
|
|
658
|
-
}),
|
|
656
|
+
}), O("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
|
|
657
|
+
}), A.grantedScopes.length > 0 ? /* @__PURE__ */ _(S, {
|
|
659
658
|
collapsedHeight: 88,
|
|
660
659
|
label: "Show all scopes",
|
|
661
660
|
children: /* @__PURE__ */ _("div", {
|
|
662
661
|
className: "flex flex-wrap gap-2",
|
|
663
|
-
children:
|
|
662
|
+
children: A.grantedScopes.map((e) => /* @__PURE__ */ _("span", {
|
|
664
663
|
className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
|
|
665
664
|
children: e
|
|
666
665
|
}, e))
|
|
667
666
|
})
|
|
668
667
|
}) : /* @__PURE__ */ _("p", {
|
|
669
668
|
className: "text-sm text-text-secondary",
|
|
670
|
-
children:
|
|
669
|
+
children: O("integrations.connectionDetail.scopes.empty", "No scopes granted.")
|
|
671
670
|
})]
|
|
672
671
|
}),
|
|
673
|
-
|
|
674
|
-
className: e("rounded-xl border p-5",
|
|
672
|
+
V && /* @__PURE__ */ v("div", {
|
|
673
|
+
className: e("rounded-xl border p-5", V.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
|
|
675
674
|
children: [
|
|
676
675
|
/* @__PURE__ */ v("h2", {
|
|
677
|
-
className: e("font-semibold flex items-center gap-2 mb-2",
|
|
678
|
-
children: [
|
|
676
|
+
className: e("font-semibold flex items-center gap-2 mb-2", V.success ? "text-status-success-text" : "text-status-error-text"),
|
|
677
|
+
children: [V.success ? /* @__PURE__ */ _(l, { size: 18 }) : /* @__PURE__ */ _(h, { size: 18 }), V.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
|
|
679
678
|
}),
|
|
680
679
|
/* @__PURE__ */ _("p", {
|
|
681
|
-
className: e("text-sm",
|
|
682
|
-
children:
|
|
680
|
+
className: e("text-sm", V.success ? "text-status-success-text" : "text-status-error-text"),
|
|
681
|
+
children: V.message
|
|
683
682
|
}),
|
|
684
683
|
/* @__PURE__ */ _("p", {
|
|
685
684
|
className: "text-xs text-text-secondary mt-1",
|
|
686
|
-
children:
|
|
685
|
+
children: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: V.latencyMs })
|
|
687
686
|
})
|
|
688
687
|
]
|
|
689
688
|
}),
|
|
690
|
-
$ && /* @__PURE__ */ v(
|
|
689
|
+
$ && /* @__PURE__ */ v(b, {
|
|
691
690
|
className: "border-border-seam p-5",
|
|
692
691
|
children: [/* @__PURE__ */ v("h2", {
|
|
693
692
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
694
693
|
children: [/* @__PURE__ */ _(u, {
|
|
695
694
|
size: 18,
|
|
696
695
|
className: "text-primary"
|
|
697
|
-
}),
|
|
696
|
+
}), O("integrations.connectionDetail.sections.credentialStorage", "Credential Storage")]
|
|
698
697
|
}), /* @__PURE__ */ v("div", {
|
|
699
698
|
className: "space-y-2 text-sm",
|
|
700
699
|
children: [
|
|
701
|
-
|
|
700
|
+
A.vaultId && /* @__PURE__ */ v("div", {
|
|
702
701
|
className: "flex items-center justify-between gap-3",
|
|
703
702
|
children: [/* @__PURE__ */ _("span", {
|
|
704
703
|
className: "text-text-secondary",
|
|
705
|
-
children:
|
|
704
|
+
children: O("integrations.connectionDetail.fields.vault", "Vault")
|
|
706
705
|
}), /* @__PURE__ */ _("span", {
|
|
707
706
|
className: "font-medium text-text-primary break-all",
|
|
708
|
-
children:
|
|
707
|
+
children: ct ?? A.vaultId
|
|
709
708
|
})]
|
|
710
709
|
}),
|
|
711
|
-
|
|
710
|
+
A.credentialSecretName && /* @__PURE__ */ v("div", {
|
|
712
711
|
className: "flex items-center justify-between gap-3",
|
|
713
712
|
children: [/* @__PURE__ */ _("span", {
|
|
714
713
|
className: "text-text-secondary",
|
|
715
|
-
children:
|
|
714
|
+
children: O("integrations.connectionDetail.fields.secret", "Secret")
|
|
716
715
|
}), /* @__PURE__ */ _("span", {
|
|
717
716
|
className: "font-medium text-text-primary break-all",
|
|
718
|
-
children:
|
|
717
|
+
children: A.credentialSecretName
|
|
719
718
|
})]
|
|
720
719
|
}),
|
|
721
|
-
|
|
720
|
+
A.credentialSecretId && /* @__PURE__ */ v("div", {
|
|
722
721
|
className: "flex items-center justify-between gap-3",
|
|
723
722
|
children: [/* @__PURE__ */ _("span", {
|
|
724
723
|
className: "text-text-secondary",
|
|
725
|
-
children:
|
|
724
|
+
children: O("integrations.connectionDetail.fields.secretId", "Secret ID")
|
|
726
725
|
}), /* @__PURE__ */ _("span", {
|
|
727
726
|
className: "font-mono text-xs text-text-primary break-all",
|
|
728
|
-
children:
|
|
727
|
+
children: A.credentialSecretId
|
|
729
728
|
})]
|
|
730
729
|
})
|
|
731
730
|
]
|
|
732
731
|
})]
|
|
733
732
|
}),
|
|
734
|
-
(
|
|
733
|
+
(R || z || Q) && /* @__PURE__ */ v(b, {
|
|
735
734
|
className: "border-border-seam p-5",
|
|
736
735
|
children: [/* @__PURE__ */ v("h2", {
|
|
737
736
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
738
737
|
children: [/* @__PURE__ */ _(u, {
|
|
739
738
|
size: 18,
|
|
740
739
|
className: "text-primary"
|
|
741
|
-
}),
|
|
742
|
-
}), /* @__PURE__ */ _(
|
|
740
|
+
}), O("integrations.connectionDetail.sections.actions", "Actions")]
|
|
741
|
+
}), /* @__PURE__ */ _(Be, {
|
|
743
742
|
align: "start",
|
|
744
743
|
primary: {
|
|
745
|
-
label:
|
|
744
|
+
label: O("integrations.connectionDetail.actions.test", "Test Connection"),
|
|
746
745
|
onSelect: () => {
|
|
747
746
|
Y();
|
|
748
747
|
},
|
|
749
748
|
disabled: Z,
|
|
750
|
-
icon:
|
|
749
|
+
icon: N ? /* @__PURE__ */ _(d, {
|
|
751
750
|
size: 14,
|
|
752
751
|
className: "animate-spin"
|
|
753
752
|
}) : /* @__PURE__ */ _(g, { size: 14 })
|
|
754
753
|
},
|
|
755
754
|
actions: [
|
|
756
755
|
...Q ? [{
|
|
757
|
-
label:
|
|
758
|
-
onSelect: () =>
|
|
756
|
+
label: O("integrations.connectionDetail.actions.share", "Share"),
|
|
757
|
+
onSelect: () => B(!0),
|
|
759
758
|
disabled: Z,
|
|
760
759
|
icon: /* @__PURE__ */ _(we, { size: 14 })
|
|
761
760
|
}] : [],
|
|
762
|
-
...
|
|
763
|
-
label:
|
|
761
|
+
...R && A.provider.authType === "oauth2" && I ? [{
|
|
762
|
+
label: O("integrations.connectionDetail.actions.refreshToken", "Refresh Token"),
|
|
764
763
|
onSelect: () => {
|
|
765
764
|
X();
|
|
766
765
|
},
|
|
767
766
|
disabled: Z,
|
|
768
767
|
icon: /* @__PURE__ */ _(f, { size: 14 })
|
|
769
768
|
}] : [],
|
|
770
|
-
...
|
|
771
|
-
label:
|
|
769
|
+
...z ? [{
|
|
770
|
+
label: O("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
772
771
|
onSelect: () => {
|
|
773
|
-
|
|
772
|
+
lt();
|
|
774
773
|
},
|
|
775
774
|
disabled: Z,
|
|
776
775
|
icon: /* @__PURE__ */ _(p, { size: 14 })
|
|
777
776
|
}, {
|
|
778
|
-
label:
|
|
777
|
+
label: O("integrations.connectionDetail.actions.delete", "Delete"),
|
|
779
778
|
onSelect: () => {
|
|
780
|
-
|
|
779
|
+
dt();
|
|
781
780
|
},
|
|
782
781
|
intent: "destructive",
|
|
783
782
|
disabled: Z,
|
|
@@ -792,6 +791,6 @@ function E() {
|
|
|
792
791
|
]
|
|
793
792
|
});
|
|
794
793
|
}
|
|
795
|
-
export {
|
|
794
|
+
export { w as ConnectionDetail };
|
|
796
795
|
|
|
797
796
|
//# sourceMappingURL=ConnectionDetail.js.map
|