@burdenoff/microfe-security 2026.830.1 → 2026.830.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/index.js +2 -1
- package/dist/security/SecurityAdminRoot.js +9 -8
- package/dist/security/SecurityAdminRoot.js.map +1 -1
- package/dist/security/SecurityRoot.js +9 -8
- package/dist/security/SecurityRoot.js.map +1 -1
- package/dist/security/SecurityRootBase.js +35 -33
- package/dist/security/SecurityRootBase.js.map +1 -1
- package/dist/security/SecurityUserRoot.js +9 -8
- package/dist/security/SecurityUserRoot.js.map +1 -1
- package/dist/security/components/ActivityTimeline.js +83 -66
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.js +40 -41
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/ConfirmDialog.js +37 -33
- package/dist/security/components/ConfirmDialog.js.map +1 -1
- package/dist/security/components/CopyButton.js +29 -28
- package/dist/security/components/CopyButton.js.map +1 -1
- package/dist/security/components/ExportDialog.js +81 -80
- package/dist/security/components/ExportDialog.js.map +1 -1
- package/dist/security/components/ImportWizard.js +122 -125
- package/dist/security/components/ImportWizard.js.map +1 -1
- package/dist/security/components/PasswordGenerator.js +71 -66
- package/dist/security/components/PasswordGenerator.js.map +1 -1
- package/dist/security/components/RotationStatusBadge.js +18 -17
- package/dist/security/components/RotationStatusBadge.js.map +1 -1
- package/dist/security/components/SecretFormFields.js +143 -134
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.js +30 -31
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +208 -195
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/SecretValueDisplay.js +45 -44
- package/dist/security/components/SecretValueDisplay.js.map +1 -1
- package/dist/security/components/SecurityPermissionGuard.js +8 -9
- package/dist/security/components/SecurityPermissionGuard.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.js +42 -37
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultCard.js +32 -33
- package/dist/security/components/VaultCard.js.map +1 -1
- package/dist/security/components/VaultFormFields.js +101 -97
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/VaultShareDialog.js +40 -42
- package/dist/security/components/VaultShareDialog.js.map +1 -1
- package/dist/security/config/navigation.js +20 -20
- package/dist/security/config/navigation.js.map +1 -1
- package/dist/security/constants/providers.js +10 -5
- package/dist/security/constants/providers.js.map +1 -1
- package/dist/security/constants/secretTypes.js +16 -8
- package/dist/security/constants/secretTypes.js.map +1 -1
- package/dist/security/hooks/useTr.js +14 -0
- package/dist/security/hooks/useTr.js.map +1 -0
- package/dist/security/index.js +1 -0
- package/dist/security/pages/AccessReviewPage.js +85 -84
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +98 -97
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +21 -22
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.js +164 -155
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +89 -92
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +70 -71
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +250 -251
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.js +53 -54
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.js +27 -28
- package/dist/security/pages/SharedWithMePage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +49 -50
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +130 -131
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultLandingPage.js +39 -38
- package/dist/security/pages/VaultLandingPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +198 -199
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultShareViewer.js +78 -80
- package/dist/security/pages/VaultShareViewer.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +97 -98
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/translations/en.js +756 -0
- package/dist/security/translations/en.js.map +1 -0
- package/package.json +1 -1
- package/dist/security/utils/i18n.js +0 -9
- package/dist/security/utils/i18n.js.map +0 -1
|
@@ -1,258 +1,267 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { useSecurity as t } from "../providers/SecurityProvider.js";
|
|
3
|
+
import { cn as n } from "../utils/cn.js";
|
|
4
|
+
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
|
+
import { Badge as i, Button as a, Card as o } from "../components/ui.js";
|
|
6
|
+
import { ConfirmDialog as s } from "../components/ConfirmDialog.js";
|
|
7
|
+
import { useDeleteIntegration as c, useTriggerSync as l, useVaultIntegrations as u, useVaultSyncLogs as d } from "../hooks/useProviderQueries.js";
|
|
8
|
+
import { getProviderTypeInfo as f } from "../constants/providers.js";
|
|
9
|
+
import { nativeConfirm as p, nativeImpact as m, nativeNotify as h } from "../../utils/nativeBridge.js";
|
|
10
|
+
import { useState as g } from "react";
|
|
11
|
+
import { useNavigate as _, useParams as v } from "react-router";
|
|
12
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
13
|
+
import { AlertTriangle as x, ArrowLeft as S, CheckCircle as C, Clock as w, Cloud as T, Loader2 as E, RefreshCw as D, Trash2 as ee, XCircle as te } from "lucide-react";
|
|
14
|
+
import { CTAOverflowMenu as ne, GlassCard as re, IllustratedEmptyState as ie, NextSteps as ae, PagePurpose as O, ResponsiveTable as k } from "@burdenoff/fe-libs/ui";
|
|
14
15
|
//#region src/security/pages/ProviderDetailPage.tsx
|
|
15
|
-
function
|
|
16
|
-
let { vaultId:
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
if (
|
|
20
|
-
await
|
|
16
|
+
function A() {
|
|
17
|
+
let { vaultId: A, providerId: j } = v(), { basePath: M = "/", navigate: N } = t(), P = _(), F = e(), { data: I, loading: L, error: R } = u(A), z = (I?.getVaultIntegrations?.items ?? []).find((e) => e.id === j), B = z ? f(z.providerType) : null, { data: V, loading: H } = d(j), U = V?.getVaultSyncLogs?.items ?? [], [W, { loading: G }] = c(), [K, { loading: q }] = l(), [oe, J] = g(!1), se = (e) => {
|
|
18
|
+
N ? N(e) : P(e);
|
|
19
|
+
}, Y = () => se(`${M}/providers`), X = async () => {
|
|
20
|
+
if (j) try {
|
|
21
|
+
await K({ variables: { integrationId: j } });
|
|
21
22
|
} catch (e) {
|
|
22
23
|
console.error("Sync failed:", e);
|
|
23
24
|
}
|
|
24
|
-
},
|
|
25
|
-
if (
|
|
26
|
-
await
|
|
25
|
+
}, Z = async () => {
|
|
26
|
+
if (j) try {
|
|
27
|
+
await W({ variables: { id: j } }), h("success"), Y();
|
|
27
28
|
} catch (e) {
|
|
28
|
-
console.error("Delete failed:", e),
|
|
29
|
+
console.error("Delete failed:", e), h("error");
|
|
29
30
|
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
let e = await
|
|
33
|
-
title: "
|
|
34
|
-
message: "
|
|
35
|
-
okButtonTitle: "
|
|
36
|
-
cancelButtonTitle: "Cancel"
|
|
31
|
+
}, ce = async () => {
|
|
32
|
+
m("medium");
|
|
33
|
+
let e = B?.label ?? "", t = await p({
|
|
34
|
+
title: F("security.providerDetail.removeProvider", "Remove Provider"),
|
|
35
|
+
message: F("security.providerDetail.removeProviderDescription", "Are you sure you want to remove this {{provider}} connection? Synced secrets will remain but will no longer auto-update.", { provider: e }),
|
|
36
|
+
okButtonTitle: F("security.providerDetail.remove", "Remove"),
|
|
37
|
+
cancelButtonTitle: F("security.common.actions.cancel", "Cancel")
|
|
37
38
|
});
|
|
38
|
-
if (
|
|
39
|
+
if (t === null) {
|
|
39
40
|
J(!0);
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
t && await Z();
|
|
43
44
|
};
|
|
44
|
-
if (L && !z) return /* @__PURE__ */
|
|
45
|
-
title: "Loading...",
|
|
45
|
+
if (L && !z) return /* @__PURE__ */ y(r, {
|
|
46
|
+
title: F("security.providerDetail.loading", "Loading..."),
|
|
46
47
|
breadcrumbs: [{
|
|
47
|
-
label: "Security",
|
|
48
|
-
path:
|
|
48
|
+
label: F("security.common.breadcrumbs.security", "Security"),
|
|
49
|
+
path: M
|
|
49
50
|
}, {
|
|
50
|
-
label: "Providers",
|
|
51
|
-
path: `${
|
|
51
|
+
label: F("security.providers.title", "Providers"),
|
|
52
|
+
path: `${M}/providers`
|
|
52
53
|
}],
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ y("div", {
|
|
54
55
|
className: "flex items-center justify-center py-16",
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ y(E, { className: "size-8 animate-spin text-primary" })
|
|
56
57
|
})
|
|
57
58
|
});
|
|
58
|
-
if (R || !L && !z) return /* @__PURE__ */
|
|
59
|
-
title: "Error",
|
|
59
|
+
if (R || !L && !z) return /* @__PURE__ */ y(r, {
|
|
60
|
+
title: F("security.providerDetail.error", "Error"),
|
|
60
61
|
breadcrumbs: [{
|
|
61
|
-
label: "Security",
|
|
62
|
-
path:
|
|
62
|
+
label: F("security.common.breadcrumbs.security", "Security"),
|
|
63
|
+
path: M
|
|
63
64
|
}, {
|
|
64
|
-
label: "Providers",
|
|
65
|
-
path: `${
|
|
65
|
+
label: F("security.providers.title", "Providers"),
|
|
66
|
+
path: `${M}/providers`
|
|
66
67
|
}],
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ y(o, {
|
|
68
69
|
className: "p-6",
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ b("div", {
|
|
70
71
|
className: "flex items-start gap-4",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ y(x, { className: "size-6 text-status-error-text" }), /* @__PURE__ */ b("div", { children: [
|
|
73
|
+
/* @__PURE__ */ y("h3", {
|
|
73
74
|
className: "font-semibold text-status-error-text",
|
|
74
|
-
children: "Provider not found"
|
|
75
|
+
children: F("security.providerDetail.providerNotFound", "Provider not found")
|
|
75
76
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ y("p", {
|
|
77
78
|
className: "text-sm text-text-secondary mt-1",
|
|
78
|
-
children: R?.message ?? "The requested provider could not be found."
|
|
79
|
+
children: R?.message ?? F("security.providerDetail.providerNotFoundDescription", "The requested provider could not be found.")
|
|
79
80
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ b(a, {
|
|
81
82
|
variant: "outline",
|
|
82
83
|
size: "sm",
|
|
83
84
|
className: "mt-4",
|
|
84
|
-
onClick:
|
|
85
|
-
children: [/* @__PURE__ */
|
|
85
|
+
onClick: Y,
|
|
86
|
+
children: [/* @__PURE__ */ y(S, { className: "size-4" }), F("security.providerDetail.backToProviders", "Back to Providers")]
|
|
86
87
|
})
|
|
87
88
|
] })]
|
|
88
89
|
})
|
|
89
90
|
})
|
|
90
91
|
});
|
|
91
|
-
let
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
title:
|
|
94
|
-
description:
|
|
92
|
+
let Q = z.displayName || B?.label || "", $ = B?.label ?? "";
|
|
93
|
+
return /* @__PURE__ */ b(r, {
|
|
94
|
+
title: Q,
|
|
95
|
+
description: B?.description,
|
|
95
96
|
breadcrumbs: [
|
|
96
97
|
{
|
|
97
|
-
label: "Security",
|
|
98
|
-
path:
|
|
98
|
+
label: F("security.common.breadcrumbs.security", "Security"),
|
|
99
|
+
path: M
|
|
99
100
|
},
|
|
100
101
|
{
|
|
101
|
-
label: "Providers",
|
|
102
|
-
path: `${
|
|
102
|
+
label: F("security.providers.title", "Providers"),
|
|
103
|
+
path: `${M}/providers`
|
|
103
104
|
},
|
|
104
|
-
{ label:
|
|
105
|
+
{ label: Q }
|
|
105
106
|
],
|
|
106
|
-
actions: /* @__PURE__ */
|
|
107
|
+
actions: /* @__PURE__ */ b("div", {
|
|
107
108
|
className: "flex items-center gap-2",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ b(a, {
|
|
109
110
|
variant: "outline",
|
|
110
111
|
size: "sm",
|
|
111
|
-
onClick:
|
|
112
|
-
children: [/* @__PURE__ */
|
|
112
|
+
onClick: Y,
|
|
113
|
+
children: [/* @__PURE__ */ y(S, { className: "size-4" }), /* @__PURE__ */ y("span", {
|
|
113
114
|
className: "hidden sm:inline",
|
|
114
|
-
children: "Back"
|
|
115
|
+
children: F("security.common.actions.back", "Back")
|
|
115
116
|
})]
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ y(ne, {
|
|
117
118
|
primary: {
|
|
118
|
-
label:
|
|
119
|
-
icon: /* @__PURE__ */
|
|
120
|
-
disabled:
|
|
121
|
-
onSelect: () => void
|
|
119
|
+
label: q ? F("security.providerDetail.syncing", "Syncing...") : F("security.providerDetail.syncNow", "Sync Now"),
|
|
120
|
+
icon: /* @__PURE__ */ y(D, { className: n("size-4", q && "animate-spin") }),
|
|
121
|
+
disabled: q,
|
|
122
|
+
onSelect: () => void X()
|
|
122
123
|
},
|
|
123
124
|
actions: [{
|
|
124
|
-
label: "Remove",
|
|
125
|
-
icon: /* @__PURE__ */
|
|
125
|
+
label: F("security.providerDetail.remove", "Remove"),
|
|
126
|
+
icon: /* @__PURE__ */ y(ee, { className: "size-4" }),
|
|
126
127
|
intent: "destructive",
|
|
127
|
-
disabled:
|
|
128
|
-
onSelect: () => void
|
|
128
|
+
disabled: G,
|
|
129
|
+
onSelect: () => void ce()
|
|
129
130
|
}]
|
|
130
131
|
})]
|
|
131
132
|
}),
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ b("div", {
|
|
133
134
|
className: "space-y-6",
|
|
134
135
|
children: [
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
icon: /* @__PURE__ */
|
|
137
|
-
children: "This is one connected provider. It keeps the secrets in this vault in sync with an external secret manager on a schedule. Use it to trigger a sync on demand, confirm the connection is healthy, review the history of past sync runs (including any errors), or remove the connection."
|
|
136
|
+
/* @__PURE__ */ y(O, {
|
|
137
|
+
icon: /* @__PURE__ */ y(T, { className: "size-4" }),
|
|
138
|
+
children: F("security.providerDetail.purpose", "This is one connected provider. It keeps the secrets in this vault in sync with an external secret manager on a schedule. Use it to trigger a sync on demand, confirm the connection is healthy, review the history of past sync runs (including any errors), or remove the connection.")
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ y(ae, {
|
|
140
141
|
storageKey: "security-provider-detail",
|
|
141
142
|
steps: [{
|
|
142
143
|
id: "sync-now",
|
|
143
|
-
label: "
|
|
144
|
-
description: "Pull the latest values from the provider immediately.",
|
|
145
|
-
icon: /* @__PURE__ */
|
|
146
|
-
onClick:
|
|
144
|
+
label: F("security.providerDetail.syncNow", "Sync Now"),
|
|
145
|
+
description: F("security.providerDetail.syncNowDescription", "Pull the latest values from the provider immediately."),
|
|
146
|
+
icon: /* @__PURE__ */ y(D, { className: "size-4" }),
|
|
147
|
+
onClick: q ? void 0 : () => void X()
|
|
147
148
|
}, {
|
|
148
149
|
id: "review-history",
|
|
149
|
-
label: "Review sync history",
|
|
150
|
-
description: "Check recent runs below for failures or drift.",
|
|
151
|
-
icon: /* @__PURE__ */
|
|
150
|
+
label: F("security.providerDetail.reviewHistory", "Review sync history"),
|
|
151
|
+
description: F("security.providerDetail.reviewHistoryDescription", "Check recent runs below for failures or drift."),
|
|
152
|
+
icon: /* @__PURE__ */ y(w, { className: "size-4" }),
|
|
152
153
|
href: "#sync-history"
|
|
153
154
|
}]
|
|
154
155
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ b(re, {
|
|
156
157
|
treatment: "glass",
|
|
157
158
|
glow: !0,
|
|
158
159
|
className: "p-6",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ b("div", {
|
|
160
161
|
className: "flex items-center gap-2 mb-6",
|
|
161
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ y("div", {
|
|
162
163
|
className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
|
|
163
|
-
children: /* @__PURE__ */
|
|
164
|
-
}), /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ y(T, { className: "size-5" })
|
|
165
|
+
}), /* @__PURE__ */ y("h2", {
|
|
165
166
|
className: "text-lg font-bold text-text-primary",
|
|
166
|
-
children: "Integration Settings"
|
|
167
|
+
children: F("security.providerDetail.integrationSettings", "Integration Settings")
|
|
167
168
|
})]
|
|
168
|
-
}), /* @__PURE__ */
|
|
169
|
+
}), /* @__PURE__ */ b("div", {
|
|
169
170
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm",
|
|
170
171
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
172
173
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
173
|
-
children: "Provider Type"
|
|
174
|
-
}), /* @__PURE__ */
|
|
174
|
+
children: F("security.providerDetail.providerType", "Provider Type")
|
|
175
|
+
}), /* @__PURE__ */ y("p", {
|
|
175
176
|
className: "font-semibold text-text-primary",
|
|
176
|
-
children:
|
|
177
|
+
children: B ? F(`security.${B.translationKey}`, B.label) : $
|
|
177
178
|
})] }),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
179
180
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
180
|
-
children: "Sync Direction"
|
|
181
|
-
}), /* @__PURE__ */
|
|
181
|
+
children: F("security.providerDetail.syncDirection", "Sync Direction")
|
|
182
|
+
}), /* @__PURE__ */ y("p", {
|
|
182
183
|
className: "font-semibold text-text-primary capitalize",
|
|
183
|
-
children: z.syncDirection ?? "bidirectional"
|
|
184
|
+
children: z.syncDirection ?? F("security.providerDetail.bidirectional", "bidirectional")
|
|
184
185
|
})] }),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
186
187
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
187
|
-
children: "Status"
|
|
188
|
-
}), /* @__PURE__ */
|
|
188
|
+
children: F("security.providerDetail.status", "Status")
|
|
189
|
+
}), /* @__PURE__ */ b(i, {
|
|
189
190
|
variant: z.syncEnabled ? "success" : "outline",
|
|
190
|
-
children: [z.syncEnabled && /* @__PURE__ */
|
|
191
|
+
children: [z.syncEnabled && /* @__PURE__ */ y("span", {
|
|
191
192
|
"aria-hidden": "true",
|
|
192
193
|
className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse"
|
|
193
|
-
}), z.syncEnabled ? "Enabled" : "Disabled"]
|
|
194
|
+
}), z.syncEnabled ? F("security.providerDetail.enabled", "Enabled") : F("security.providerDetail.disabled", "Disabled")]
|
|
194
195
|
})] }),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
196
197
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
197
|
-
children: "Sync Interval"
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
children: F("security.providerDetail.syncInterval", "Sync Interval")
|
|
199
|
+
}), /* @__PURE__ */ b("p", {
|
|
199
200
|
className: "font-semibold text-text-primary",
|
|
200
|
-
children: [
|
|
201
|
+
children: [
|
|
202
|
+
z.syncIntervalMinutes ?? 0,
|
|
203
|
+
" ",
|
|
204
|
+
F("security.providerDetail.minutes", "minutes")
|
|
205
|
+
]
|
|
201
206
|
})] }),
|
|
202
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
203
208
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
204
|
-
children: "Added On"
|
|
205
|
-
}), /* @__PURE__ */
|
|
209
|
+
children: F("security.providerDetail.addedOn", "Added On")
|
|
210
|
+
}), /* @__PURE__ */ y("p", {
|
|
206
211
|
className: "font-semibold text-text-primary",
|
|
207
212
|
children: new Date(z.createdAt).toLocaleDateString()
|
|
208
213
|
})] }),
|
|
209
|
-
z.lastSyncAt && /* @__PURE__ */
|
|
214
|
+
z.lastSyncAt && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
210
215
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
211
|
-
children: "Last Successful Sync"
|
|
212
|
-
}), /* @__PURE__ */
|
|
216
|
+
children: F("security.providerDetail.lastSuccessfulSync", "Last Successful Sync")
|
|
217
|
+
}), /* @__PURE__ */ b("div", {
|
|
213
218
|
className: "flex items-center gap-1.5 font-semibold text-text-primary",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
219
|
+
children: [/* @__PURE__ */ y(C, { className: "size-3.5 text-status-success-text" }), new Date(z.lastSyncAt).toLocaleString()]
|
|
215
220
|
})] })
|
|
216
221
|
]
|
|
217
222
|
})]
|
|
218
223
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ b(o, {
|
|
220
225
|
id: "sync-history",
|
|
221
226
|
className: "p-6 shadow-sm border-border-subtle/60",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ b("div", {
|
|
223
228
|
className: "flex items-center justify-between mb-6",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ b("div", {
|
|
225
230
|
className: "flex items-center gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ y(w, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
|
|
227
232
|
className: "text-lg font-bold text-text-primary",
|
|
228
|
-
children: "Sync History"
|
|
233
|
+
children: F("security.providerDetail.syncHistory", "Sync History")
|
|
229
234
|
})]
|
|
230
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ b(i, {
|
|
231
236
|
variant: "outline",
|
|
232
237
|
className: "bg-bg-sunken",
|
|
233
|
-
children: [
|
|
238
|
+
children: [
|
|
239
|
+
U.length,
|
|
240
|
+
" ",
|
|
241
|
+
F("security.providerDetail.runs", "runs")
|
|
242
|
+
]
|
|
234
243
|
})]
|
|
235
|
-
}),
|
|
244
|
+
}), H ? /* @__PURE__ */ y("div", {
|
|
236
245
|
className: "flex justify-center py-12",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
-
}) :
|
|
246
|
+
children: /* @__PURE__ */ y(E, { className: "size-8 animate-spin text-primary/40" })
|
|
247
|
+
}) : U.length > 0 ? /* @__PURE__ */ y(k, {
|
|
239
248
|
className: "border border-border-subtle/60 rounded-lg",
|
|
240
|
-
data:
|
|
249
|
+
data: U,
|
|
241
250
|
rowKey: (e) => e.id,
|
|
242
251
|
columns: [
|
|
243
252
|
{
|
|
244
253
|
key: "time",
|
|
245
|
-
header: "Time",
|
|
254
|
+
header: F("security.providerDetail.time", "Time"),
|
|
246
255
|
priority: "primary",
|
|
247
|
-
cell: (e) => /* @__PURE__ */
|
|
256
|
+
cell: (e) => /* @__PURE__ */ y("span", {
|
|
248
257
|
className: "whitespace-nowrap",
|
|
249
258
|
children: new Date(e.startedAt).toLocaleString()
|
|
250
259
|
})
|
|
251
260
|
},
|
|
252
261
|
{
|
|
253
262
|
key: "status",
|
|
254
|
-
header: "Status",
|
|
255
|
-
cell: (e) => /* @__PURE__ */
|
|
263
|
+
header: F("security.providerDetail.status", "Status"),
|
|
264
|
+
cell: (e) => /* @__PURE__ */ y(i, {
|
|
256
265
|
variant: e.status === "COMPLETED" ? "success" : e.status === "FAILED" ? "destructive" : "warning",
|
|
257
266
|
className: "text-[10px] uppercase",
|
|
258
267
|
children: e.status
|
|
@@ -260,55 +269,55 @@ function j() {
|
|
|
260
269
|
},
|
|
261
270
|
{
|
|
262
271
|
key: "synced",
|
|
263
|
-
header: "Synced",
|
|
264
|
-
cell: (e) => /* @__PURE__ */
|
|
272
|
+
header: F("security.providerDetail.synced", "Synced"),
|
|
273
|
+
cell: (e) => /* @__PURE__ */ y("span", {
|
|
265
274
|
className: "font-medium text-text-primary tabular-nums",
|
|
266
275
|
children: e.secretsSynced
|
|
267
276
|
})
|
|
268
277
|
},
|
|
269
278
|
{
|
|
270
279
|
key: "duration",
|
|
271
|
-
header: "Duration",
|
|
272
|
-
cell: (e) => /* @__PURE__ */
|
|
280
|
+
header: F("security.providerDetail.duration", "Duration"),
|
|
281
|
+
cell: (e) => /* @__PURE__ */ y("span", {
|
|
273
282
|
className: "text-text-secondary tabular-nums",
|
|
274
283
|
children: e.durationMs ? `${e.durationMs}ms` : "-"
|
|
275
284
|
})
|
|
276
285
|
},
|
|
277
286
|
{
|
|
278
287
|
key: "errors",
|
|
279
|
-
header: "Errors",
|
|
280
|
-
cell: (e) => e.errorMessage ? /* @__PURE__ */
|
|
288
|
+
header: F("security.providerDetail.errors", "Errors"),
|
|
289
|
+
cell: (e) => e.errorMessage ? /* @__PURE__ */ b("div", {
|
|
281
290
|
className: "flex items-center gap-1.5 text-status-error-text max-w-xs truncate",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ y(te, { className: "size-3.5" }), /* @__PURE__ */ y("span", {
|
|
283
292
|
className: "truncate",
|
|
284
293
|
title: e.errorMessage,
|
|
285
294
|
children: e.errorMessage
|
|
286
295
|
})]
|
|
287
|
-
}) : /* @__PURE__ */
|
|
296
|
+
}) : /* @__PURE__ */ y("span", {
|
|
288
297
|
className: "text-text-secondary",
|
|
289
298
|
children: "-"
|
|
290
299
|
})
|
|
291
300
|
}
|
|
292
301
|
]
|
|
293
|
-
}) : /* @__PURE__ */
|
|
302
|
+
}) : /* @__PURE__ */ y(ie, {
|
|
294
303
|
illustration: "empty-data",
|
|
295
|
-
title: "No sync logs found",
|
|
296
|
-
description: "Sync history will appear here after the first synchronization run."
|
|
304
|
+
title: F("security.providerDetail.noSyncLogs", "No sync logs found"),
|
|
305
|
+
description: F("security.providerDetail.noSyncLogsDescription", "Sync history will appear here after the first synchronization run.")
|
|
297
306
|
})]
|
|
298
307
|
})
|
|
299
308
|
]
|
|
300
|
-
}), /* @__PURE__ */
|
|
301
|
-
isOpen:
|
|
309
|
+
}), /* @__PURE__ */ y(s, {
|
|
310
|
+
isOpen: oe,
|
|
302
311
|
onClose: () => J(!1),
|
|
303
|
-
onConfirm:
|
|
304
|
-
title: "Remove Provider",
|
|
305
|
-
description:
|
|
306
|
-
confirmLabel:
|
|
312
|
+
onConfirm: Z,
|
|
313
|
+
title: F("security.providerDetail.removeProvider", "Remove Provider"),
|
|
314
|
+
description: F("security.providerDetail.removeProviderDescription", "Are you sure you want to remove this {{provider}} connection? Synced secrets will remain but will no longer auto-update.", { provider: $ }),
|
|
315
|
+
confirmLabel: G ? F("security.providerDetail.removing", "Removing...") : F("security.providerDetail.removeProvider", "Remove Provider"),
|
|
307
316
|
variant: "destructive"
|
|
308
317
|
})]
|
|
309
318
|
});
|
|
310
319
|
}
|
|
311
320
|
//#endregion
|
|
312
|
-
export {
|
|
321
|
+
export { A as ProviderDetailPage };
|
|
313
322
|
|
|
314
323
|
//# sourceMappingURL=ProviderDetailPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderDetailPage.js","names":[],"sources":["../../../src/security/pages/ProviderDetailPage.tsx"],"sourcesContent":["import { useParams, useNavigate } from 'react-router';\nimport {\n ArrowLeft,\n RefreshCw,\n Trash2,\n Cloud,\n Loader2,\n AlertTriangle,\n CheckCircle,\n Clock,\n XCircle,\n} from 'lucide-react';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n GlassCard,\n CTAOverflowMenu,\n IllustratedEmptyState,\n PagePurpose,\n NextSteps,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport {\n useVaultIntegrations,\n useDeleteIntegration,\n useTriggerSync,\n useVaultSyncLogs,\n} from '../hooks/useProviderQueries';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { getProviderTypeInfo } from '../constants/providers';\nimport { useState } from 'react';\nimport { cn } from '../utils/cn';\nimport type { ProviderType } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\nexport function ProviderDetailPage() {\n const { vaultId, providerId } = useParams<{ vaultId: string; providerId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const routerNavigate = useNavigate();\n\n const { data, loading, error } = useVaultIntegrations(vaultId);\n const providers = data?.getVaultIntegrations?.items ?? [];\n const provider = providers.find((p: any) => p.id === providerId);\n\n const { data: logsData, loading: logsLoading } = useVaultSyncLogs(providerId);\n const syncLogs = logsData?.getVaultSyncLogs?.items ?? [];\n\n const [deleteProvider, { loading: deleting }] = useDeleteIntegration();\n const [triggerSync, { loading: syncing }] = useTriggerSync();\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n\n const handleNavigate = (path: string) => {\n if (shellNavigate) {\n shellNavigate(path);\n } else {\n routerNavigate(path);\n }\n };\n\n const handleBack = () => handleNavigate(`${basePath}/providers`);\n\n const handleSync = async () => {\n if (!providerId) return;\n try {\n await triggerSync({ variables: { integrationId: providerId } });\n } catch (err) {\n console.error('Sync failed:', err);\n }\n };\n\n const handleDelete = async () => {\n if (!providerId) return;\n try {\n await deleteProvider({ variables: { id: providerId } });\n void nativeNotify('success');\n handleBack();\n } catch (err) {\n console.error('Delete failed:', err);\n void nativeNotify('error');\n }\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: 'Delete Provider',\n message: 'Delete this provider? This cannot be undone.',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n if (loading && !provider) {\n return (\n <PageLayout\n title=\"Loading...\"\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n ]}\n >\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || (!loading && !provider)) {\n return (\n <PageLayout\n title=\"Error\"\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n ]}\n >\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">Provider not found</h3>\n <p className=\"text-sm text-text-secondary mt-1\">\n {error?.message ?? 'The requested provider could not be found.'}\n </p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-4\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n Back to Providers\n </Button>\n </div>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n const typeInfo = getProviderTypeInfo(provider.providerType as ProviderType);\n\n return (\n <PageLayout\n title={(provider.displayName as string) || typeInfo.label}\n description={typeInfo.description}\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n { label: (provider.displayName as string) || typeInfo.label },\n ]}\n actions={\n // Boff UI 2.0: quiet \"Back\", a single primary CTA (\"Sync Now\"), and the\n // destructive \"Remove\" tucked into the overflow menu.\n <div className=\"flex items-center gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">Back</span>\n </Button>\n <CTAOverflowMenu\n primary={{\n label: syncing ? 'Syncing...' : 'Sync Now',\n icon: <RefreshCw className={cn('size-4', syncing && 'animate-spin')} />,\n disabled: syncing,\n onSelect: () => void handleSync(),\n }}\n actions={[\n {\n label: 'Remove',\n icon: <Trash2 className=\"size-4\" />,\n intent: 'destructive',\n disabled: deleting,\n onSelect: () => void requestDelete(),\n },\n ]}\n />\n </div>\n }\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Cloud className=\"size-4\" />}>\n This is one connected provider. It keeps the secrets in this vault in sync with an\n external secret manager on a schedule. Use it to trigger a sync on demand, confirm the\n connection is healthy, review the history of past sync runs (including any errors), or\n remove the connection.\n </PagePurpose>\n\n <NextSteps\n storageKey=\"security-provider-detail\"\n steps={[\n {\n id: 'sync-now',\n label: 'Run a sync now',\n description: 'Pull the latest values from the provider immediately.',\n icon: <RefreshCw className=\"size-4\" />,\n onClick: syncing ? undefined : () => void handleSync(),\n },\n {\n id: 'review-history',\n label: 'Review sync history',\n description: 'Check recent runs below for failures or drift.',\n icon: <Clock className=\"size-4\" />,\n href: '#sync-history',\n },\n ]}\n />\n\n {/* Configuration — the single emphasis zone on this page */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center gap-2 mb-6\">\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10 text-primary\">\n <Cloud className=\"size-5\" />\n </div>\n <h2 className=\"text-lg font-bold text-text-primary\">Integration Settings</h2>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Provider Type\n </p>\n <p className=\"font-semibold text-text-primary\">{typeInfo.label}</p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Sync Direction\n </p>\n <p className=\"font-semibold text-text-primary capitalize\">\n {(provider.syncDirection as string) ?? 'bidirectional'}\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Status\n </p>\n <Badge variant={provider.syncEnabled ? 'success' : 'outline'}>\n {provider.syncEnabled && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {provider.syncEnabled ? 'Enabled' : 'Disabled'}\n </Badge>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Sync Interval\n </p>\n <p className=\"font-semibold text-text-primary\">\n {(provider.syncIntervalMinutes as number) ?? 0} minutes\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Added On\n </p>\n <p className=\"font-semibold text-text-primary\">\n {new Date(provider.createdAt as string).toLocaleDateString()}\n </p>\n </div>\n {provider.lastSyncAt && (\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Last Successful Sync\n </p>\n <div className=\"flex items-center gap-1.5 font-semibold text-text-primary\">\n <CheckCircle className=\"size-3.5 text-status-success-text\" />\n {new Date(provider.lastSyncAt as string).toLocaleString()}\n </div>\n </div>\n )}\n </div>\n </GlassCard>\n\n {/* Sync History */}\n <Card id=\"sync-history\" className=\"p-6 shadow-sm border-border-subtle/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-2\">\n <Clock className=\"size-5 text-primary\" />\n <h2 className=\"text-lg font-bold text-text-primary\">Sync History</h2>\n </div>\n <Badge variant=\"outline\" className=\"bg-bg-sunken\">\n {syncLogs.length} runs\n </Badge>\n </div>\n\n {logsLoading ? (\n <div className=\"flex justify-center py-12\">\n <Loader2 className=\"size-8 animate-spin text-primary/40\" />\n </div>\n ) : syncLogs.length > 0 ? (\n <ResponsiveTable<any>\n className=\"border border-border-subtle/60 rounded-lg\"\n data={syncLogs}\n rowKey={(log) => log.id}\n columns={\n [\n {\n key: 'time',\n header: 'Time',\n priority: 'primary',\n cell: (log) => (\n <span className=\"whitespace-nowrap\">\n {new Date(log.startedAt).toLocaleString()}\n </span>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n cell: (log) => (\n <Badge\n variant={\n log.status === 'COMPLETED'\n ? 'success'\n : log.status === 'FAILED'\n ? 'destructive'\n : 'warning'\n }\n className=\"text-[10px] uppercase\"\n >\n {log.status}\n </Badge>\n ),\n },\n {\n key: 'synced',\n header: 'Synced',\n cell: (log) => (\n <span className=\"font-medium text-text-primary tabular-nums\">\n {log.secretsSynced}\n </span>\n ),\n },\n {\n key: 'duration',\n header: 'Duration',\n cell: (log) => (\n <span className=\"text-text-secondary tabular-nums\">\n {log.durationMs ? `${log.durationMs}ms` : '-'}\n </span>\n ),\n },\n {\n key: 'errors',\n header: 'Errors',\n cell: (log) =>\n log.errorMessage ? (\n <div className=\"flex items-center gap-1.5 text-status-error-text max-w-xs truncate\">\n <XCircle className=\"size-3.5\" />\n <span className=\"truncate\" title={log.errorMessage}>\n {log.errorMessage}\n </span>\n </div>\n ) : (\n <span className=\"text-text-secondary\">-</span>\n ),\n },\n ] satisfies ResponsiveTableColumn<any>[]\n }\n />\n ) : (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No sync logs found\"\n description=\"Sync history will appear here after the first synchronization run.\"\n />\n )}\n </Card>\n </div>\n\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title=\"Remove Provider\"\n description={`Are you sure you want to remove this ${typeInfo.label} connection? Synced secrets will remain but will no longer auto-update.`}\n confirmLabel={deleting ? 'Removing...' : 'Remove Provider'}\n variant=\"destructive\"\n />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAqCA,SAAgB,IAAqB;CACnC,IAAM,EAAE,YAAS,kBAAe,GAAoD,EAC9E,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,IAAiB,GAAa,EAE9B,EAAE,SAAM,YAAS,aAAU,EAAqB,EAAQ,EAExD,KADY,GAAM,sBAAsB,SAAS,EAAE,EAC9B,MAAM,MAAW,EAAE,OAAO,EAAW,EAE1D,EAAE,MAAM,GAAU,SAAS,MAAgB,EAAiB,EAAW,EACvE,IAAW,GAAU,kBAAkB,SAAS,EAAE,EAElD,CAAC,GAAgB,EAAE,SAAS,OAAc,GAAsB,EAChE,CAAC,GAAa,EAAE,SAAS,OAAa,GAAgB,EACtD,CAAC,GAAmB,KAAwB,EAAS,GAAM,EAE3D,KAAkB,MAAiB;AACvC,EAAI,IACF,EAAc,EAAK,GAEnB,EAAe,EAAK;IAIlB,UAAmB,EAAe,GAAG,EAAS,YAAY,EAE1D,IAAa,YAAY;AACxB,QACL,KAAI;AACF,SAAM,EAAY,EAAE,WAAW,EAAE,eAAe,GAAY,EAAE,CAAC;WACxD,GAAK;AACZ,WAAQ,MAAM,gBAAgB,EAAI;;IAIhC,IAAe,YAAY;AAC1B,QACL,KAAI;AAGF,GAFA,MAAM,EAAe,EAAE,WAAW,EAAE,IAAI,GAAY,EAAE,CAAC,EAClD,EAAa,UAAU,EAC5B,GAAY;WACL,GAAK;AAEP,GADL,QAAQ,MAAM,kBAAkB,EAAI,EAC/B,EAAa,QAAQ;;IAIxB,KAAgB,YAAY;AAC3B,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I;oBACnC,EAAI;UACA,CAAA,CACH;aAEN,kBAAC,QAAD;SAAM,WAAU;mBAAsB;SAAQ,CAAA;QAEnD;OACF;MAEH,CAAA,GAEF,kBAAC,GAAD;MACE,cAAa;MACb,OAAM;MACN,aAAY;MACZ,CAAA,CAEC;;IACH;MAEN,kBAAC,GAAD;GACE,QAAQ;GACR,eAAe,EAAqB,GAAM;GAC1C,WAAW;GACX,OAAM;GACN,aAAa,wCAAwC,EAAS,MAAM;GACpE,cAAc,IAAW,gBAAgB;GACzC,SAAQ;GACR,CAAA,CACS"}
|
|
1
|
+
{"version":3,"file":"ProviderDetailPage.js","names":[],"sources":["../../../src/security/pages/ProviderDetailPage.tsx"],"sourcesContent":["import { useParams, useNavigate } from 'react-router';\nimport {\n ArrowLeft,\n RefreshCw,\n Trash2,\n Cloud,\n Loader2,\n AlertTriangle,\n CheckCircle,\n Clock,\n XCircle,\n} from 'lucide-react';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n GlassCard,\n CTAOverflowMenu,\n IllustratedEmptyState,\n PagePurpose,\n NextSteps,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport {\n useVaultIntegrations,\n useDeleteIntegration,\n useTriggerSync,\n useVaultSyncLogs,\n} from '../hooks/useProviderQueries';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { getProviderTypeInfo } from '../constants/providers';\nimport { useTr } from '../hooks/useTr';\nimport { useState } from 'react';\nimport { cn } from '../utils/cn';\nimport type { ProviderType } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\nexport function ProviderDetailPage() {\n const { vaultId, providerId } = useParams<{ vaultId: string; providerId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const routerNavigate = useNavigate();\n const tr = useTr();\n\n const { data, loading, error } = useVaultIntegrations(vaultId);\n const providers = data?.getVaultIntegrations?.items ?? [];\n const provider = providers.find((p: any) => p.id === providerId);\n const typeInfo = provider ? getProviderTypeInfo(provider.providerType as ProviderType) : null;\n\n const { data: logsData, loading: logsLoading } = useVaultSyncLogs(providerId);\n const syncLogs = logsData?.getVaultSyncLogs?.items ?? [];\n\n const [deleteProvider, { loading: deleting }] = useDeleteIntegration();\n const [triggerSync, { loading: syncing }] = useTriggerSync();\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n\n const handleNavigate = (path: string) => {\n if (shellNavigate) {\n shellNavigate(path);\n } else {\n routerNavigate(path);\n }\n };\n\n const handleBack = () => handleNavigate(`${basePath}/providers`);\n\n const handleSync = async () => {\n if (!providerId) return;\n try {\n await triggerSync({ variables: { integrationId: providerId } });\n } catch (err) {\n console.error('Sync failed:', err);\n }\n };\n\n const handleDelete = async () => {\n if (!providerId) return;\n try {\n await deleteProvider({ variables: { id: providerId } });\n void nativeNotify('success');\n handleBack();\n } catch (err) {\n console.error('Delete failed:', err);\n void nativeNotify('error');\n }\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const providerLabel = typeInfo?.label ?? '';\n const result = await nativeConfirm({\n title: tr('security.providerDetail.removeProvider', 'Remove Provider'),\n message: tr(\n 'security.providerDetail.removeProviderDescription',\n 'Are you sure you want to remove this {{provider}} connection? Synced secrets will remain but will no longer auto-update.',\n { provider: providerLabel }\n ),\n okButtonTitle: tr('security.providerDetail.remove', 'Remove'),\n cancelButtonTitle: tr('security.common.actions.cancel', 'Cancel'),\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n if (loading && !provider) {\n return (\n <PageLayout\n title={tr('security.providerDetail.loading', 'Loading...')}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.providers.title', 'Providers'), path: `${basePath}/providers` },\n ]}\n >\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || (!loading && !provider)) {\n return (\n <PageLayout\n title={tr('security.providerDetail.error', 'Error')}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.providers.title', 'Providers'), path: `${basePath}/providers` },\n ]}\n >\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">\n {tr('security.providerDetail.providerNotFound', 'Provider not found')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-1\">\n {error?.message ??\n tr(\n 'security.providerDetail.providerNotFoundDescription',\n 'The requested provider could not be found.'\n )}\n </p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-4\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n {tr('security.providerDetail.backToProviders', 'Back to Providers')}\n </Button>\n </div>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n const providerLabel = (provider.displayName as string) || typeInfo?.label || '';\n const providerTypeLabel = typeInfo?.label ?? '';\n\n return (\n <PageLayout\n title={providerLabel}\n description={typeInfo?.description}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.providers.title', 'Providers'), path: `${basePath}/providers` },\n { label: providerLabel },\n ]}\n actions={\n // Boff UI 2.0: quiet \"Back\", a single primary CTA (\"Sync Now\"), and the\n // destructive \"Remove\" tucked into the overflow menu.\n <div className=\"flex items-center gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">{tr('security.common.actions.back', 'Back')}</span>\n </Button>\n <CTAOverflowMenu\n primary={{\n label: syncing\n ? tr('security.providerDetail.syncing', 'Syncing...')\n : tr('security.providerDetail.syncNow', 'Sync Now'),\n icon: <RefreshCw className={cn('size-4', syncing && 'animate-spin')} />,\n disabled: syncing,\n onSelect: () => void handleSync(),\n }}\n actions={[\n {\n label: tr('security.providerDetail.remove', 'Remove'),\n icon: <Trash2 className=\"size-4\" />,\n intent: 'destructive',\n disabled: deleting,\n onSelect: () => void requestDelete(),\n },\n ]}\n />\n </div>\n }\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Cloud className=\"size-4\" />}>\n {tr(\n 'security.providerDetail.purpose',\n 'This is one connected provider. It keeps the secrets in this vault in sync with an external secret manager on a schedule. Use it to trigger a sync on demand, confirm the connection is healthy, review the history of past sync runs (including any errors), or remove the connection.'\n )}\n </PagePurpose>\n\n <NextSteps\n storageKey=\"security-provider-detail\"\n steps={[\n {\n id: 'sync-now',\n label: tr('security.providerDetail.syncNow', 'Sync Now'),\n description: tr(\n 'security.providerDetail.syncNowDescription',\n 'Pull the latest values from the provider immediately.'\n ),\n icon: <RefreshCw className=\"size-4\" />,\n onClick: syncing ? undefined : () => void handleSync(),\n },\n {\n id: 'review-history',\n label: tr('security.providerDetail.reviewHistory', 'Review sync history'),\n description: tr(\n 'security.providerDetail.reviewHistoryDescription',\n 'Check recent runs below for failures or drift.'\n ),\n icon: <Clock className=\"size-4\" />,\n href: '#sync-history',\n },\n ]}\n />\n\n {/* Configuration — the single emphasis zone on this page */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center gap-2 mb-6\">\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10 text-primary\">\n <Cloud className=\"size-5\" />\n </div>\n <h2 className=\"text-lg font-bold text-text-primary\">\n {tr('security.providerDetail.integrationSettings', 'Integration Settings')}\n </h2>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n {tr('security.providerDetail.providerType', 'Provider Type')}\n </p>\n <p className=\"font-semibold text-text-primary\">\n {typeInfo\n ? tr(`security.${typeInfo.translationKey}`, typeInfo.label)\n : providerTypeLabel}\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n {tr('security.providerDetail.syncDirection', 'Sync Direction')}\n </p>\n <p className=\"font-semibold text-text-primary capitalize\">\n {(provider.syncDirection as string) ??\n tr('security.providerDetail.bidirectional', 'bidirectional')}\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n {tr('security.providerDetail.status', 'Status')}\n </p>\n <Badge variant={provider.syncEnabled ? 'success' : 'outline'}>\n {provider.syncEnabled && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {provider.syncEnabled\n ? tr('security.providerDetail.enabled', 'Enabled')\n : tr('security.providerDetail.disabled', 'Disabled')}\n </Badge>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n {tr('security.providerDetail.syncInterval', 'Sync Interval')}\n </p>\n <p className=\"font-semibold text-text-primary\">\n {(provider.syncIntervalMinutes as number) ?? 0}{' '}\n {tr('security.providerDetail.minutes', 'minutes')}\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n {tr('security.providerDetail.addedOn', 'Added On')}\n </p>\n <p className=\"font-semibold text-text-primary\">\n {new Date(provider.createdAt as string).toLocaleDateString()}\n </p>\n </div>\n {provider.lastSyncAt && (\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n {tr('security.providerDetail.lastSuccessfulSync', 'Last Successful Sync')}\n </p>\n <div className=\"flex items-center gap-1.5 font-semibold text-text-primary\">\n <CheckCircle className=\"size-3.5 text-status-success-text\" />\n {new Date(provider.lastSyncAt as string).toLocaleString()}\n </div>\n </div>\n )}\n </div>\n </GlassCard>\n\n {/* Sync History */}\n <Card id=\"sync-history\" className=\"p-6 shadow-sm border-border-subtle/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-2\">\n <Clock className=\"size-5 text-primary\" />\n <h2 className=\"text-lg font-bold text-text-primary\">\n {tr('security.providerDetail.syncHistory', 'Sync History')}\n </h2>\n </div>\n <Badge variant=\"outline\" className=\"bg-bg-sunken\">\n {syncLogs.length} {tr('security.providerDetail.runs', 'runs')}\n </Badge>\n </div>\n\n {logsLoading ? (\n <div className=\"flex justify-center py-12\">\n <Loader2 className=\"size-8 animate-spin text-primary/40\" />\n </div>\n ) : syncLogs.length > 0 ? (\n <ResponsiveTable<any>\n className=\"border border-border-subtle/60 rounded-lg\"\n data={syncLogs}\n rowKey={(log) => log.id}\n columns={\n [\n {\n key: 'time',\n header: tr('security.providerDetail.time', 'Time'),\n priority: 'primary',\n cell: (log) => (\n <span className=\"whitespace-nowrap\">\n {new Date(log.startedAt).toLocaleString()}\n </span>\n ),\n },\n {\n key: 'status',\n header: tr('security.providerDetail.status', 'Status'),\n cell: (log) => (\n <Badge\n variant={\n log.status === 'COMPLETED'\n ? 'success'\n : log.status === 'FAILED'\n ? 'destructive'\n : 'warning'\n }\n className=\"text-[10px] uppercase\"\n >\n {log.status}\n </Badge>\n ),\n },\n {\n key: 'synced',\n header: tr('security.providerDetail.synced', 'Synced'),\n cell: (log) => (\n <span className=\"font-medium text-text-primary tabular-nums\">\n {log.secretsSynced}\n </span>\n ),\n },\n {\n key: 'duration',\n header: tr('security.providerDetail.duration', 'Duration'),\n cell: (log) => (\n <span className=\"text-text-secondary tabular-nums\">\n {log.durationMs ? `${log.durationMs}ms` : '-'}\n </span>\n ),\n },\n {\n key: 'errors',\n header: tr('security.providerDetail.errors', 'Errors'),\n cell: (log) =>\n log.errorMessage ? (\n <div className=\"flex items-center gap-1.5 text-status-error-text max-w-xs truncate\">\n <XCircle className=\"size-3.5\" />\n <span className=\"truncate\" title={log.errorMessage}>\n {log.errorMessage}\n </span>\n </div>\n ) : (\n <span className=\"text-text-secondary\">-</span>\n ),\n },\n ] satisfies ResponsiveTableColumn<any>[]\n }\n />\n ) : (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr('security.providerDetail.noSyncLogs', 'No sync logs found')}\n description={tr(\n 'security.providerDetail.noSyncLogsDescription',\n 'Sync history will appear here after the first synchronization run.'\n )}\n />\n )}\n </Card>\n </div>\n\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title={tr('security.providerDetail.removeProvider', 'Remove Provider')}\n description={tr(\n 'security.providerDetail.removeProviderDescription',\n 'Are you sure you want to remove this {{provider}} connection? Synced secrets will remain but will no longer auto-update.',\n { provider: providerTypeLabel }\n )}\n confirmLabel={\n deleting\n ? tr('security.providerDetail.removing', 'Removing...')\n : tr('security.providerDetail.removeProvider', 'Remove Provider')\n }\n variant=\"destructive\"\n />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsCA,SAAgB,IAAqB;CACnC,IAAM,EAAE,YAAS,kBAAe,GAAoD,EAC9E,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,IAAiB,GAAa,EAC9B,IAAK,GAAO,EAEZ,EAAE,SAAM,YAAS,aAAU,EAAqB,EAAQ,EAExD,KADY,GAAM,sBAAsB,SAAS,EAAE,EAC9B,MAAM,MAAW,EAAE,OAAO,EAAW,EAC1D,IAAW,IAAW,EAAoB,EAAS,aAA6B,GAAG,MAEnF,EAAE,MAAM,GAAU,SAAS,MAAgB,EAAiB,EAAW,EACvE,IAAW,GAAU,kBAAkB,SAAS,EAAE,EAElD,CAAC,GAAgB,EAAE,SAAS,OAAc,GAAsB,EAChE,CAAC,GAAa,EAAE,SAAS,OAAa,GAAgB,EACtD,CAAC,IAAmB,KAAwB,EAAS,GAAM,EAE3D,MAAkB,MAAiB;AACvC,EAAI,IACF,EAAc,EAAK,GAEnB,EAAe,EAAK;IAIlB,UAAmB,GAAe,GAAG,EAAS,YAAY,EAE1D,IAAa,YAAY;AACxB,QACL,KAAI;AACF,SAAM,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