@burdenoff/microfe-security 2026.1105.2 → 2026.1109.1
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/dev/Dashboard.d.ts +4 -0
- package/dist/dev/SecurityApp.d.ts +10 -0
- package/dist/dev/main.d.ts +0 -0
- package/dist/dev/useDarkMode.d.ts +7 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-types.d.ts +27686 -0
- package/dist/generated/wspace-operations.d.ts +1948 -0
- package/dist/generated/wspace-operations.js +102 -103
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +147604 -0
- package/dist/generated/wspace-types.js +1 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/security/SecurityAdminRoot.d.ts +17 -0
- package/dist/security/SecurityAdminRoot.js +10 -8
- package/dist/security/SecurityAdminRoot.js.map +1 -1
- package/dist/security/SecurityRoot.d.ts +16 -0
- package/dist/security/SecurityRoot.js +10 -8
- package/dist/security/SecurityRoot.js.map +1 -1
- package/dist/security/SecurityRootBase.d.ts +17 -0
- package/dist/security/SecurityRootBase.js +9 -10
- package/dist/security/SecurityRootBase.js.map +1 -1
- package/dist/security/SecurityUserRoot.d.ts +16 -0
- package/dist/security/SecurityUserRoot.js +10 -8
- package/dist/security/SecurityUserRoot.js.map +1 -1
- package/dist/security/components/ActivityTimeline.d.ts +10 -0
- package/dist/security/components/ActivityTimeline.js +14 -15
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.d.ts +7 -0
- package/dist/security/components/BulkActionBar.js +18 -19
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/ConfirmDialog.d.ts +17 -0
- package/dist/security/components/ConfirmDialog.js +5 -6
- package/dist/security/components/ConfirmDialog.js.map +1 -1
- package/dist/security/components/CopyButton.d.ts +18 -0
- package/dist/security/components/CopyButton.js +30 -29
- package/dist/security/components/CopyButton.js.map +1 -1
- package/dist/security/components/ExportDialog.d.ts +5 -0
- package/dist/security/components/ExportDialog.js +22 -22
- package/dist/security/components/ExportDialog.js.map +1 -1
- package/dist/security/components/ExternalSecretProviders.d.ts +16 -0
- package/dist/security/components/ExternalSecretProviders.js +72 -73
- package/dist/security/components/ExternalSecretProviders.js.map +1 -1
- package/dist/security/components/ImportWizard.d.ts +5 -0
- package/dist/security/components/ImportWizard.js +28 -29
- package/dist/security/components/ImportWizard.js.map +1 -1
- package/dist/security/components/PageLayout.d.ts +32 -0
- package/dist/security/components/PageLayout.js +1 -2
- package/dist/security/components/PageLayout.js.map +1 -1
- package/dist/security/components/PasswordGenerator.d.ts +15 -0
- package/dist/security/components/PasswordGenerator.js +14 -15
- package/dist/security/components/PasswordGenerator.js.map +1 -1
- package/dist/security/components/RotationStatusBadge.d.ts +11 -0
- package/dist/security/components/RotationStatusBadge.js +5 -6
- package/dist/security/components/RotationStatusBadge.js.map +1 -1
- package/dist/security/components/SecretFormFields.d.ts +21 -0
- package/dist/security/components/SecretFormFields.js +40 -41
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.d.ts +11 -0
- package/dist/security/components/SecretRow.js +14 -15
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.d.ts +19 -0
- package/dist/security/components/SecretShareDialog.js +106 -107
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/SecretTypeBadge.d.ts +11 -0
- package/dist/security/components/SecretTypeBadge.js +7 -8
- package/dist/security/components/SecretTypeBadge.js.map +1 -1
- package/dist/security/components/SecretTypeIcon.d.ts +12 -0
- package/dist/security/components/SecretTypeIcon.js +6 -7
- package/dist/security/components/SecretTypeIcon.js.map +1 -1
- package/dist/security/components/SecretValueDisplay.d.ts +24 -0
- package/dist/security/components/SecretValueDisplay.js +9 -10
- package/dist/security/components/SecretValueDisplay.js.map +1 -1
- package/dist/security/components/SecurityPermissionGuard.d.ts +14 -0
- package/dist/security/components/SecurityPermissionGuard.js +1 -2
- package/dist/security/components/SecurityPermissionGuard.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.d.ts +12 -0
- package/dist/security/components/SecurityScoreCard.js +14 -15
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultCard.d.ts +11 -0
- package/dist/security/components/VaultCard.js +8 -9
- package/dist/security/components/VaultCard.js.map +1 -1
- package/dist/security/components/VaultFormFields.d.ts +15 -0
- package/dist/security/components/VaultFormFields.js +8 -9
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/VaultShareDialog.d.ts +14 -0
- package/dist/security/components/VaultShareDialog.js +12 -13
- package/dist/security/components/VaultShareDialog.js.map +1 -1
- package/dist/security/components/ui.d.ts +53 -0
- package/dist/security/components/ui.js +1 -2
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/config/navigation.d.ts +12 -0
- package/dist/security/config/navigation.js +1 -2
- package/dist/security/config/navigation.js.map +1 -1
- package/dist/security/constants/externalSecretProviders.d.ts +41 -0
- package/dist/security/constants/externalSecretProviders.js +1 -2
- package/dist/security/constants/externalSecretProviders.js.map +1 -1
- package/dist/security/constants/featureFlags.d.ts +39 -0
- package/dist/security/constants/featureFlags.js +1 -2
- package/dist/security/constants/featureFlags.js.map +1 -1
- package/dist/security/constants/permissions.d.ts +9 -0
- package/dist/security/constants/permissions.js +1 -2
- package/dist/security/constants/permissions.js.map +1 -1
- package/dist/security/constants/providers.d.ts +11 -0
- package/dist/security/constants/providers.js +1 -2
- package/dist/security/constants/providers.js.map +1 -1
- package/dist/security/constants/secretTypes.d.ts +16 -0
- package/dist/security/constants/secretTypes.js +1 -2
- package/dist/security/constants/secretTypes.js.map +1 -1
- package/dist/security/hooks/useAuditLog.d.ts +16 -0
- package/dist/security/hooks/useAuditLog.js +1 -2
- package/dist/security/hooks/useAuditLog.js.map +1 -1
- package/dist/security/hooks/useBulkSecretOperations.d.ts +6 -0
- package/dist/security/hooks/useBulkSecretOperations.js +1 -2
- package/dist/security/hooks/useBulkSecretOperations.js.map +1 -1
- package/dist/security/hooks/useImportExport.d.ts +53 -0
- package/dist/security/hooks/useImportExport.js +3 -4
- package/dist/security/hooks/useImportExport.js.map +1 -1
- package/dist/security/hooks/useProviderQueries.d.ts +9 -0
- package/dist/security/hooks/useProviderQueries.js +1 -2
- package/dist/security/hooks/useProviderQueries.js.map +1 -1
- package/dist/security/hooks/useSecretQueries.d.ts +7 -0
- package/dist/security/hooks/useSecretQueries.js +1 -2
- package/dist/security/hooks/useSecretQueries.js.map +1 -1
- package/dist/security/hooks/useSecretValue.d.ts +11 -0
- package/dist/security/hooks/useSecretValue.js +1 -2
- package/dist/security/hooks/useSecretValue.js.map +1 -1
- package/dist/security/hooks/useSecurityCacheInvalidation.d.ts +1 -0
- package/dist/security/hooks/useSecurityCacheInvalidation.js +1 -2
- package/dist/security/hooks/useSecurityCacheInvalidation.js.map +1 -1
- package/dist/security/hooks/useSecurityDashboard.d.ts +20 -0
- package/dist/security/hooks/useSecurityDashboard.js +1 -2
- package/dist/security/hooks/useSecurityDashboard.js.map +1 -1
- package/dist/security/hooks/useSecurityEventEmitter.d.ts +13 -0
- package/dist/security/hooks/useSecurityEventEmitter.js +1 -2
- package/dist/security/hooks/useSecurityEventEmitter.js.map +1 -1
- package/dist/security/hooks/useSecuritySubscriptions.d.ts +5 -0
- package/dist/security/hooks/useSecuritySubscriptions.js +1 -2
- package/dist/security/hooks/useSecuritySubscriptions.js.map +1 -1
- package/dist/security/hooks/useShareQueries.d.ts +13 -0
- package/dist/security/hooks/useShareQueries.js +1 -2
- package/dist/security/hooks/useShareQueries.js.map +1 -1
- package/dist/security/hooks/useTr.d.ts +16 -0
- package/dist/security/hooks/useTr.js +1 -2
- package/dist/security/hooks/useTr.js.map +1 -1
- package/dist/security/hooks/useVaultQueries.d.ts +12 -0
- package/dist/security/hooks/useVaultQueries.js +1 -2
- package/dist/security/hooks/useVaultQueries.js.map +1 -1
- package/dist/security/index.d.ts +32 -0
- package/dist/security/index.js +8 -7
- package/dist/security/pages/AccessReviewPage.d.ts +1 -0
- package/dist/security/pages/AccessReviewPage.js +31 -29
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.d.ts +1 -0
- package/dist/security/pages/AuditLogPage.js +16 -17
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.d.ts +1 -0
- package/dist/security/pages/ImportExportPage.js +10 -11
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.d.ts +1 -0
- package/dist/security/pages/ProviderDetailPage.js +82 -87
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.d.ts +1 -0
- package/dist/security/pages/ProvidersPage.js +20 -21
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.d.ts +1 -0
- package/dist/security/pages/SecretCreatePage.js +45 -50
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.d.ts +1 -0
- package/dist/security/pages/SecretDetailPage.js +52 -57
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.d.ts +1 -0
- package/dist/security/pages/SecurityDashboardPage.js +13 -14
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.d.ts +1 -0
- package/dist/security/pages/SharedWithMePage.js +32 -33
- package/dist/security/pages/SharedWithMePage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.d.ts +1 -0
- package/dist/security/pages/VaultCreatePage.js +36 -38
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.d.ts +1 -0
- package/dist/security/pages/VaultDetailPage.js +81 -86
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultLandingPage.d.ts +9 -0
- package/dist/security/pages/VaultLandingPage.js +4 -5
- package/dist/security/pages/VaultLandingPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.d.ts +1 -0
- package/dist/security/pages/VaultSettingsPage.js +37 -42
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultShareViewer.d.ts +18 -0
- package/dist/security/pages/VaultShareViewer.js +17 -18
- package/dist/security/pages/VaultShareViewer.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.d.ts +1 -0
- package/dist/security/pages/VaultsDashboardPage.js +147 -148
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/providers/SecurityProvider.d.ts +11 -0
- package/dist/security/providers/SecurityProvider.js +26 -29
- package/dist/security/providers/SecurityProvider.js.map +1 -1
- package/dist/security/routes/SecurityAdminRoutes.d.ts +6 -0
- package/dist/security/routes/SecurityAdminRoutes.js +1 -2
- package/dist/security/routes/SecurityAdminRoutes.js.map +1 -1
- package/dist/security/routes/SecurityRoutes.d.ts +18 -0
- package/dist/security/routes/SecurityRoutes.js +1 -2
- package/dist/security/routes/SecurityRoutes.js.map +1 -1
- package/dist/security/routes/SecurityUserRoutes.d.ts +10 -0
- package/dist/security/routes/SecurityUserRoutes.js +10 -11
- package/dist/security/routes/SecurityUserRoutes.js.map +1 -1
- package/dist/security/routes/routeUtils.d.ts +26 -0
- package/dist/security/routes/routeUtils.js +1 -2
- package/dist/security/routes/routeUtils.js.map +1 -1
- package/dist/security/store/securityStore.d.ts +33 -0
- package/dist/security/store/securityStore.js +1 -2
- package/dist/security/store/securityStore.js.map +1 -1
- package/dist/security/translations/en.d.ts +842 -0
- package/dist/security/translations/en.js +1 -2
- package/dist/security/translations/en.js.map +1 -1
- package/dist/security/translations/index.d.ts +1 -0
- package/dist/security/types/index.d.ts +282 -0
- package/dist/security/utils/clipboard.d.ts +11 -0
- package/dist/security/utils/clipboard.js +1 -2
- package/dist/security/utils/clipboard.js.map +1 -1
- package/dist/security/utils/cn.d.ts +5 -0
- package/dist/security/utils/cn.js +2 -3
- package/dist/security/utils/cn.js.map +1 -1
- package/dist/security/utils/fileParser.d.ts +17 -0
- package/dist/security/utils/fileParser.js +2 -11
- package/dist/security/utils/fileParser.js.map +1 -1
- package/dist/security/utils/i18n.d.ts +11 -0
- package/dist/security/utils/passwordGenerator.d.ts +21 -0
- package/dist/security/utils/passwordGenerator.js +1 -2
- package/dist/security/utils/passwordGenerator.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +2 -0
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +62 -46
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditLogPage.js","names":[],"sources":["../../../src/security/pages/AuditLogPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Loader2, AlertTriangle, RefreshCw, Activity } from 'lucide-react';\nimport { IllustratedEmptyState, GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ActivityTimeline } from '../components/ActivityTimeline';\nimport { Button, Card, Select } from '../components/ui';\nimport { useVaultAuditLogs } from '../hooks/useAuditLog';\nimport { useSecurityStore } from '../store/securityStore';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useTr } from '../hooks/useTr';\nimport type { AuditAction } from '../types';\n\nconst useActionOptions = (tr: ReturnType<typeof useTr>) =>\n [\n { value: 'all', label: tr('security.auditLog.actions.all', 'All Actions') },\n {\n value: 'vault.created',\n label: tr('security.auditLog.actions.vaultCreated', 'Vault Created'),\n },\n {\n value: 'vault.updated',\n label: tr('security.auditLog.actions.vaultUpdated', 'Vault Updated'),\n },\n {\n value: 'vault.deleted',\n label: tr('security.auditLog.actions.vaultDeleted', 'Vault Deleted'),\n },\n { value: 'vault.locked', label: tr('security.auditLog.actions.vaultLocked', 'Vault Locked') },\n {\n value: 'vault.unlocked',\n label: tr('security.auditLog.actions.vaultUnlocked', 'Vault Unlocked'),\n },\n {\n value: 'secret.created',\n label: tr('security.auditLog.actions.secretCreated', 'Secret Created'),\n },\n {\n value: 'secret.updated',\n label: tr('security.auditLog.actions.secretUpdated', 'Secret Updated'),\n },\n {\n value: 'secret.deleted',\n label: tr('security.auditLog.actions.secretDeleted', 'Secret Deleted'),\n },\n {\n value: 'secret.accessed',\n label: tr('security.auditLog.actions.secretAccessed', 'Secret Accessed'),\n },\n {\n value: 'secret.rotated',\n label: tr('security.auditLog.actions.secretRotated', 'Secret Rotated'),\n },\n { value: 'member.added', label: tr('security.auditLog.actions.memberAdded', 'Member Added') },\n {\n value: 'member.removed',\n label: tr('security.auditLog.actions.memberRemoved', 'Member Removed'),\n },\n {\n value: 'provider.synced',\n label: tr('security.auditLog.actions.providerSynced', 'Provider Synced'),\n },\n {\n value: 'import.completed',\n label: tr('security.auditLog.actions.importCompleted', 'Import Completed'),\n },\n {\n value: 'export.completed',\n label: tr('security.auditLog.actions.exportCompleted', 'Export Completed'),\n },\n ] satisfies Array<{ value: string; label: string }>;\n\nexport function AuditLogPage() {\n const { basePath = '/' } = useSecurity();\n const tr = useTr();\n const auditFilter = useSecurityStore((s) => s.auditFilter);\n const updateAuditFilter = useSecurityStore((s) => s.updateAuditFilter);\n\n const [actionFilter, setActionFilter] = useState<string>('all');\n const [dateFrom, setDateFrom] = useState('');\n const [dateTo, setDateTo] = useState('');\n\n const ACTION_OPTIONS = useActionOptions(tr);\n\n const filter: Record<string, unknown> = {};\n if (actionFilter !== 'all') filter.action = actionFilter;\n if (dateFrom) filter.dateFrom = dateFrom;\n if (dateTo) filter.dateTo = dateTo;\n\n const { data, loading, error, refetch } = useVaultAuditLogs(\n undefined,\n Object.keys(filter).length > 0 ? filter : undefined,\n { limit: 50 }\n );\n\n const auditLogs = data?.getVaultAuditLogs?.items ?? [];\n\n return (\n <PageLayout\n title={tr('security.auditLog.title', 'Audit Log')}\n description={tr(\n 'security.auditLog.description',\n 'Track all security-related actions across vaults and secrets.'\n )}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.auditLog.title', 'Audit Log') },\n ]}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Activity className=\"size-4\" />}>\n {tr(\n 'security.auditLog.purpose',\n 'The audit log is a tamper-evident record of every security action in your workspace — who created, viewed, rotated or deleted a secret, who locked a vault, who was added or removed. Use it for compliance reviews and to investigate suspicious activity; filter by action type or date range to narrow things down.'\n )}\n </PagePurpose>\n\n {/* Filters */}\n <Card className=\"p-4\">\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <Select\n label={tr('security.auditLog.action', 'Action')}\n value={actionFilter}\n onChange={setActionFilter}\n options={ACTION_OPTIONS}\n className=\"w-full sm:w-[200px]\"\n />\n <div className=\"space-y-1.5 w-full sm:w-auto\">\n <label htmlFor=\"audit-date-from\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.auditLog.from', 'From')}\n </label>\n <input\n id=\"audit-date-from\"\n aria-label={tr('security.auditLog.from', 'From')}\n type=\"date\"\n value={dateFrom}\n onChange={(e) => setDateFrom(e.target.value)}\n className=\"flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n />\n </div>\n <div className=\"space-y-1.5 w-full sm:w-auto\">\n <label htmlFor=\"audit-date-to\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.auditLog.to', 'To')}\n </label>\n <input\n id=\"audit-date-to\"\n aria-label={tr('security.auditLog.to', 'To')}\n type=\"date\"\n value={dateTo}\n onChange={(e) => setDateTo(e.target.value)}\n className=\"flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n </Card>\n\n {/* Error */}\n {error &&\n (() => {\n const apolloErrors =\n 'graphQLErrors' in error &&\n Array.isArray((error as { graphQLErrors?: unknown }).graphQLErrors)\n ? (error as { graphQLErrors: Array<{ extensions?: { code?: string } }> })\n .graphQLErrors\n : [];\n const isForbidden =\n apolloErrors.some(\n (e) => e.extensions?.code === 'FORBIDDEN' || e.extensions?.code === 'UNAUTHORIZED'\n ) || /forbidden|unauthor/i.test(error.message);\n\n if (isForbidden) {\n return (\n <Card className=\"p-6 border-warning/20 bg-warning/5\">\n <div className=\"flex items-start gap-4\">\n <div className=\"p-2 rounded-lg bg-warning/10\">\n <AlertTriangle className=\"size-6 text-warning\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary mb-1\">\n {tr('security.auditLog.accessRestricted', 'Audit log access restricted')}\n </h3>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'security.auditLog.accessRestrictedDescription',\n \"Your role doesn't include permission to view security audit logs. Contact your workspace owner or security administrator if you need access for compliance review.\"\n )}\n </p>\n </div>\n </div>\n </Card>\n );\n }\n\n return (\n <Card className=\"p-6 border-status-error-border/20 bg-status-error-bg/5\">\n <div className=\"flex items-start gap-4\">\n <div className=\"p-2 rounded-lg bg-status-error-bg/10\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('security.auditLog.failed', 'Failed to load audit logs')}\n </h3>\n <p className=\"text-sm text-text-secondary mb-3\">{error.message}</p>\n <Button variant=\"outline\" size=\"sm\" onClick={() => refetch()}>\n <RefreshCw className=\"size-4\" />\n {tr('security.auditLog.retry', 'Retry')}\n </Button>\n </div>\n </div>\n </Card>\n );\n })()}\n\n {/* Loading */}\n {loading && (\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n )}\n\n {/* Audit logs timeline — the single emphasis zone on this page */}\n {!loading && !error && auditLogs.length > 0 && (\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"text-lg font-bold text-text-primary flex items-center gap-2\">\n <Activity className=\"size-5 text-primary\" />\n {tr('security.auditLog.activityTimeline', 'Activity Timeline')}\n </h2>\n </div>\n <ActivityTimeline entries={auditLogs} />\n </GlassCard>\n )}\n\n {/* Empty */}\n {!loading && !error && auditLogs.length === 0 && (\n <IllustratedEmptyState\n illustration={\n actionFilter !== 'all' || dateFrom || dateTo ? 'empty-search' : 'empty-data'\n }\n title={tr('security.auditLog.noLogs', 'No audit logs')}\n description={\n actionFilter !== 'all' || dateFrom || dateTo\n ? tr('security.auditLog.noLogsFiltered', 'No logs match the selected filters.')\n : tr(\n 'security.auditLog.noLogsEmpty',\n 'Audit logs will appear here as actions are performed.'\n )\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,KAAoB,MACxB;CACE;EAAE,OAAO;EAAO,OAAO,EAAG,iCAAiC,cAAc;EAAE;CAC3E;EACE,OAAO;EACP,OAAO,EAAG,0CAA0C,gBAAgB;EACrE;CACD;EACE,OAAO;EACP,OAAO,EAAG,0CAA0C,gBAAgB;EACrE;CACD;EACE,OAAO;EACP,OAAO,EAAG,0CAA0C,gBAAgB;EACrE;CACD;EAAE,OAAO;EAAgB,OAAO,EAAG,yCAAyC,eAAe;EAAE;CAC7F;EACE,OAAO;EACP,OAAO,EAAG,2CAA2C,iBAAiB;EACvE;CACD;EACE,OAAO;EACP,OAAO,EAAG,2CAA2C,iBAAiB;EACvE;CACD;EACE,OAAO;EACP,OAAO,EAAG,2CAA2C,iBAAiB;EACvE;CACD;EACE,OAAO;EACP,OAAO,EAAG,2CAA2C,iBAAiB;EACvE;CACD;EACE,OAAO;EACP,OAAO,EAAG,4CAA4C,kBAAkB;EACzE;CACD;EACE,OAAO;EACP,OAAO,EAAG,2CA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","names":["useActionOptions","tr","AuditLogPage","useSecurity","useTr","useSecurityStore","s","actionFilter","setActionFilter","useState","dateFrom","setDateFrom","dateTo","setDateTo","ACTION_OPTIONS","filter","useVaultAuditLogs","auditLogs","data","PageLayout","basePath","PagePurpose","Activity","Card","Select","error","AlertTriangle","Button","refetch","RefreshCw","loading","Loader2","GlassCard","ActivityTimeline","IllustratedEmptyState"],"sources":["../../../src/security/pages/AuditLogPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Loader2, AlertTriangle, RefreshCw, Activity } from 'lucide-react';\nimport { IllustratedEmptyState, GlassCard, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ActivityTimeline } from '../components/ActivityTimeline';\nimport { Button, Card, Select } from '../components/ui';\nimport { useVaultAuditLogs } from '../hooks/useAuditLog';\nimport { useSecurityStore } from '../store/securityStore';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useTr } from '../hooks/useTr';\nimport type { AuditAction } from '../types';\n\nconst useActionOptions = (tr: ReturnType<typeof useTr>) =>\n [\n { value: 'all', label: tr('security.auditLog.actions.all', 'All Actions') },\n {\n value: 'vault.created',\n label: tr('security.auditLog.actions.vaultCreated', 'Vault Created'),\n },\n {\n value: 'vault.updated',\n label: tr('security.auditLog.actions.vaultUpdated', 'Vault Updated'),\n },\n {\n value: 'vault.deleted',\n label: tr('security.auditLog.actions.vaultDeleted', 'Vault Deleted'),\n },\n { value: 'vault.locked', label: tr('security.auditLog.actions.vaultLocked', 'Vault Locked') },\n {\n value: 'vault.unlocked',\n label: tr('security.auditLog.actions.vaultUnlocked', 'Vault Unlocked'),\n },\n {\n value: 'secret.created',\n label: tr('security.auditLog.actions.secretCreated', 'Secret Created'),\n },\n {\n value: 'secret.updated',\n label: tr('security.auditLog.actions.secretUpdated', 'Secret Updated'),\n },\n {\n value: 'secret.deleted',\n label: tr('security.auditLog.actions.secretDeleted', 'Secret Deleted'),\n },\n {\n value: 'secret.accessed',\n label: tr('security.auditLog.actions.secretAccessed', 'Secret Accessed'),\n },\n {\n value: 'secret.rotated',\n label: tr('security.auditLog.actions.secretRotated', 'Secret Rotated'),\n },\n { value: 'member.added', label: tr('security.auditLog.actions.memberAdded', 'Member Added') },\n {\n value: 'member.removed',\n label: tr('security.auditLog.actions.memberRemoved', 'Member Removed'),\n },\n {\n value: 'provider.synced',\n label: tr('security.auditLog.actions.providerSynced', 'Provider Synced'),\n },\n {\n value: 'import.completed',\n label: tr('security.auditLog.actions.importCompleted', 'Import Completed'),\n },\n {\n value: 'export.completed',\n label: tr('security.auditLog.actions.exportCompleted', 'Export Completed'),\n },\n ] satisfies Array<{ value: string; label: string }>;\n\nexport function AuditLogPage() {\n const { basePath = '/' } = useSecurity();\n const tr = useTr();\n const auditFilter = useSecurityStore((s) => s.auditFilter);\n const updateAuditFilter = useSecurityStore((s) => s.updateAuditFilter);\n\n const [actionFilter, setActionFilter] = useState<string>('all');\n const [dateFrom, setDateFrom] = useState('');\n const [dateTo, setDateTo] = useState('');\n\n const ACTION_OPTIONS = useActionOptions(tr);\n\n const filter: Record<string, unknown> = {};\n if (actionFilter !== 'all') filter.action = actionFilter;\n if (dateFrom) filter.dateFrom = dateFrom;\n if (dateTo) filter.dateTo = dateTo;\n\n const { data, loading, error, refetch } = useVaultAuditLogs(\n undefined,\n Object.keys(filter).length > 0 ? filter : undefined,\n { limit: 50 }\n );\n\n const auditLogs = data?.getVaultAuditLogs?.items ?? [];\n\n return (\n <PageLayout\n title={tr('security.auditLog.title', 'Audit Log')}\n description={tr(\n 'security.auditLog.description',\n 'Track all security-related actions across vaults and secrets.'\n )}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.auditLog.title', 'Audit Log') },\n ]}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Activity className=\"size-4\" />}>\n {tr(\n 'security.auditLog.purpose',\n 'The audit log is a tamper-evident record of every security action in your workspace — who created, viewed, rotated or deleted a secret, who locked a vault, who was added or removed. Use it for compliance reviews and to investigate suspicious activity; filter by action type or date range to narrow things down.'\n )}\n </PagePurpose>\n\n {/* Filters */}\n <Card className=\"p-4\">\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <Select\n label={tr('security.auditLog.action', 'Action')}\n value={actionFilter}\n onChange={setActionFilter}\n options={ACTION_OPTIONS}\n className=\"w-full sm:w-[200px]\"\n />\n <div className=\"space-y-1.5 w-full sm:w-auto\">\n <label htmlFor=\"audit-date-from\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.auditLog.from', 'From')}\n </label>\n <input\n id=\"audit-date-from\"\n aria-label={tr('security.auditLog.from', 'From')}\n type=\"date\"\n value={dateFrom}\n onChange={(e) => setDateFrom(e.target.value)}\n className=\"flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n />\n </div>\n <div className=\"space-y-1.5 w-full sm:w-auto\">\n <label htmlFor=\"audit-date-to\" className=\"text-sm font-medium text-text-primary\">\n {tr('security.auditLog.to', 'To')}\n </label>\n <input\n id=\"audit-date-to\"\n aria-label={tr('security.auditLog.to', 'To')}\n type=\"date\"\n value={dateTo}\n onChange={(e) => setDateTo(e.target.value)}\n className=\"flex h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n </Card>\n\n {/* Error */}\n {error &&\n (() => {\n const apolloErrors =\n 'graphQLErrors' in error &&\n Array.isArray((error as { graphQLErrors?: unknown }).graphQLErrors)\n ? (error as { graphQLErrors: Array<{ extensions?: { code?: string } }> })\n .graphQLErrors\n : [];\n const isForbidden =\n apolloErrors.some(\n (e) => e.extensions?.code === 'FORBIDDEN' || e.extensions?.code === 'UNAUTHORIZED'\n ) || /forbidden|unauthor/i.test(error.message);\n\n if (isForbidden) {\n return (\n <Card className=\"p-6 border-warning/20 bg-warning/5\">\n <div className=\"flex items-start gap-4\">\n <div className=\"p-2 rounded-lg bg-warning/10\">\n <AlertTriangle className=\"size-6 text-warning\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary mb-1\">\n {tr('security.auditLog.accessRestricted', 'Audit log access restricted')}\n </h3>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'security.auditLog.accessRestrictedDescription',\n \"Your role doesn't include permission to view security audit logs. Contact your workspace owner or security administrator if you need access for compliance review.\"\n )}\n </p>\n </div>\n </div>\n </Card>\n );\n }\n\n return (\n <Card className=\"p-6 border-status-error-border/20 bg-status-error-bg/5\">\n <div className=\"flex items-start gap-4\">\n <div className=\"p-2 rounded-lg bg-status-error-bg/10\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('security.auditLog.failed', 'Failed to load audit logs')}\n </h3>\n <p className=\"text-sm text-text-secondary mb-3\">{error.message}</p>\n <Button variant=\"outline\" size=\"sm\" onClick={() => refetch()}>\n <RefreshCw className=\"size-4\" />\n {tr('security.auditLog.retry', 'Retry')}\n </Button>\n </div>\n </div>\n </Card>\n );\n })()}\n\n {/* Loading */}\n {loading && (\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n )}\n\n {/* Audit logs timeline — the single emphasis zone on this page */}\n {!loading && !error && auditLogs.length > 0 && (\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"text-lg font-bold text-text-primary flex items-center gap-2\">\n <Activity className=\"size-5 text-primary\" />\n {tr('security.auditLog.activityTimeline', 'Activity Timeline')}\n </h2>\n </div>\n <ActivityTimeline entries={auditLogs} />\n </GlassCard>\n )}\n\n {/* Empty */}\n {!loading && !error && auditLogs.length === 0 && (\n <IllustratedEmptyState\n illustration={\n actionFilter !== 'all' || dateFrom || dateTo ? 'empty-search' : 'empty-data'\n }\n title={tr('security.auditLog.noLogs', 'No audit logs')}\n description={\n actionFilter !== 'all' || dateFrom || dateTo\n ? tr('security.auditLog.noLogsFiltered', 'No logs match the selected filters.')\n : tr(\n 'security.auditLog.noLogsEmpty',\n 'Audit logs will appear here as actions are performed.'\n )\n }\n />\n )}\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAMA,KAAoB,MACxB;CACE;EAAE,OAAO;EAAO,OAAOC,EAAG,iCAAiC,aAAa;CAAE;CAC1E;EACE,OAAO;EACP,OAAOA,EAAG,0CAA0C,eAAe;CACrE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,0CAA0C,eAAe;CACrE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,0CAA0C,eAAe;CACrE;CACA;EAAE,OAAO;EAAgB,OAAOA,EAAG,yCAAyC,cAAc;CAAE;CAC5F;EACE,OAAO;EACP,OAAOA,EAAG,2CAA2C,gBAAgB;CACvE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,2CAA2C,gBAAgB;CACvE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,2CAA2C,gBAAgB;CACvE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,2CAA2C,gBAAgB;CACvE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,4CAA4C,iBAAiB;CACzE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,2CAA2C,gBAAgB;CACvE;CACA;EAAE,OAAO;EAAgB,OAAOA,EAAG,yCAAyC,cAAc;CAAE;CAC5F;EACE,OAAO;EACP,OAAOA,EAAG,2CAA2C,gBAAgB;CACvE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,4CAA4C,iBAAiB;CACzE;CACA;EACE,OAAO;EACP,OAAOA,EAAG,6CAA6C,kBAAkB;CAC3E;CACA;EACE,OAAO;EACP,OAAOA,EAAG,6CAA6C,kBAAkB;CAC3E;AACF;AAEF,SAAgB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+1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { PageLayout as e } from "../components/PageLayout.js";
|
|
2
|
+
import { ImportWizard as t } from "../components/ImportWizard.js";
|
|
3
|
+
import { ExportDialog as n } from "../components/ExportDialog.js";
|
|
4
|
+
import { useSecurity as r } from "../providers/SecurityProvider.js";
|
|
5
|
+
import { useTr as i } from "../hooks/useTr.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
import { Download as c, Upload as l } from "lucide-react";
|
|
9
9
|
import { PagePurpose as u } from "@burdenoff/fe-libs/ui";
|
|
10
|
-
|
|
10
|
+
// src/security/pages/ImportExportPage.tsx
|
|
11
11
|
function d() {
|
|
12
|
-
let { basePath: d = "/" } =
|
|
13
|
-
return /* @__PURE__ */ s(
|
|
12
|
+
let { basePath: d = "/" } = r(), f = i(), [p, m] = a("import");
|
|
13
|
+
return /* @__PURE__ */ s(e, {
|
|
14
14
|
title: f("security.importExport.title", "Import / Export"),
|
|
15
15
|
description: f("security.importExport.description", "Import secrets from files or export existing secrets."),
|
|
16
16
|
breadcrumbs: [{
|
|
@@ -43,12 +43,11 @@ function d() {
|
|
|
43
43
|
})
|
|
44
44
|
})]
|
|
45
45
|
}),
|
|
46
|
-
p === "import" && /* @__PURE__ */ o(
|
|
47
|
-
p === "export" && /* @__PURE__ */ o(
|
|
46
|
+
p === "import" && /* @__PURE__ */ o(t, {}),
|
|
47
|
+
p === "export" && /* @__PURE__ */ o(n, {})
|
|
48
48
|
]
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { d as ImportExportPage };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=ImportExportPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportExportPage.js","names":[],"sources":["../../../src/security/pages/ImportExportPage.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport {\n Upload,\n Download,\n FileText,\n CheckCircle,\n XCircle,\n AlertTriangle,\n Loader2,\n} from 'lucide-react';\nimport { PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ImportWizard } from '../components/ImportWizard';\nimport { ExportDialog } from '../components/ExportDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport { useImportExport } from '../hooks/useImportExport';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useTr } from '../hooks/useTr';\n\nexport function ImportExportPage() {\n const { basePath = '/' } = useSecurity();\n const tr = useTr();\n const [activeTab, setActiveTab] = useState<'import' | 'export'>('import');\n\n return (\n <PageLayout\n title={tr('security.importExport.title', 'Import / Export')}\n description={tr(\n 'security.importExport.description',\n 'Import secrets from files or export existing secrets.'\n )}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.importExport.breadcrumb', 'Import / Export') },\n ]}\n >\n <PagePurpose icon={<Upload className=\"size-4\" />} className=\"mb-6\">\n {tr(\n 'security.importExport.purpose',\n 'Move secrets in and out in bulk. Import pulls credentials from a .env, JSON or CSV file into a vault so you do not have to add them one by one — useful when onboarding an existing project. Export writes the structure of a vault to a file for backup or migration; the actual secret values are never included in an export.'\n )}\n </PagePurpose>\n\n {/* Tab switcher */}\n <div className=\"flex items-center gap-1 border-b border-border-subtle\">\n <button\n type=\"button\"\n onClick={() => setActiveTab('import')}\n className={`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${\n activeTab === 'import'\n ? 'border-primary text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n <div className=\"flex items-center gap-2\">\n <Upload className=\"size-4\" />\n {tr('security.importExport.tabs.import', 'Import')}\n </div>\n </button>\n <button\n type=\"button\"\n onClick={() => setActiveTab('export')}\n className={`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${\n activeTab === 'export'\n ? 'border-primary text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n <div className=\"flex items-center gap-2\">\n <Download className=\"size-4\" />\n {tr('security.importExport.tabs.export', 'Export')}\n </div>\n </button>\n </div>\n\n {activeTab === 'import' && <ImportWizard />}\n {activeTab === 'export' && <ExportDialog />}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AAmBA,
|
|
1
|
+
{"version":3,"file":"ImportExportPage.js","names":["ImportExportPage","useSecurity","tr","useTr","activeTab","setActiveTab","useState","PageLayout","basePath","PagePurpose","Upload","Download","ImportWizard","ExportDialog"],"sources":["../../../src/security/pages/ImportExportPage.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport {\n Upload,\n Download,\n FileText,\n CheckCircle,\n XCircle,\n AlertTriangle,\n Loader2,\n} from 'lucide-react';\nimport { PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ImportWizard } from '../components/ImportWizard';\nimport { ExportDialog } from '../components/ExportDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport { useImportExport } from '../hooks/useImportExport';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useTr } from '../hooks/useTr';\n\nexport function ImportExportPage() {\n const { basePath = '/' } = useSecurity();\n const tr = useTr();\n const [activeTab, setActiveTab] = useState<'import' | 'export'>('import');\n\n return (\n <PageLayout\n title={tr('security.importExport.title', 'Import / Export')}\n description={tr(\n 'security.importExport.description',\n 'Import secrets from files or export existing secrets.'\n )}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.importExport.breadcrumb', 'Import / Export') },\n ]}\n >\n <PagePurpose icon={<Upload className=\"size-4\" />} className=\"mb-6\">\n {tr(\n 'security.importExport.purpose',\n 'Move secrets in and out in bulk. Import pulls credentials from a .env, JSON or CSV file into a vault so you do not have to add them one by one — useful when onboarding an existing project. Export writes the structure of a vault to a file for backup or migration; the actual secret values are never included in an export.'\n )}\n </PagePurpose>\n\n {/* Tab switcher */}\n <div className=\"flex items-center gap-1 border-b border-border-subtle\">\n <button\n type=\"button\"\n onClick={() => setActiveTab('import')}\n className={`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${\n activeTab === 'import'\n ? 'border-primary text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n <div className=\"flex items-center gap-2\">\n <Upload className=\"size-4\" />\n {tr('security.importExport.tabs.import', 'Import')}\n </div>\n </button>\n <button\n type=\"button\"\n onClick={() => setActiveTab('export')}\n className={`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${\n activeTab === 'export'\n ? 'border-primary text-primary'\n : 'border-transparent text-text-secondary hover:text-text-primary'\n }`}\n >\n <div className=\"flex items-center gap-2\">\n <Download className=\"size-4\" />\n {tr('security.importExport.tabs.export', 'Export')}\n </div>\n </button>\n </div>\n\n {activeTab === 'import' && <ImportWizard />}\n {activeTab === 'export' && <ExportDialog />}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AAmBA,SAAgBA,IAAmB;CACjC,IAAM,EAAE,cAAW,QAAQC,EAAY,GACjCC,IAAKC,EAAM,GACX,CAACC,GAAWC,KAAgBC,EAA8B,QAAQ;CAExE,OACE,kBAACC,GAAD;EACE,OAAOL,EAAG,+BAA+B,iBAAiB;EAC1D,aAAaA,EACX,qCACA,uDACF;EACA,aAAa,CACX;GAAE,OAAOA,EAAG,wCAAwC,UAAU;GAAG,MAAMM;EAAS,GAChF,EAAE,OAAON,EAAG,oCAAoC,iBAAiB,EAAE,CACrE;EATF,UAAA;GAWE,kBAACO,GAAD;IAAa,MAAM,kBAACC,GAAD,EAAQ,WAAU,SAAU,CAAA;IAAG,WAAU;IACzD,UAAAR,EACC,iCACA,kUACF;GACW,CAAA;GAGb,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,UAAD;KACE,MAAK;KACL,eAAeG,EAAa,QAAQ;KACpC,WAAW,gEACTD,MAAc,WACV,gCACA;KAGN,UAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAACM,GAAD,EAAQ,WAAU,SAAU,CAAA,GAC3BR,EAAG,qCAAqC,QAAQ,CAC9C;;IACC,CAAA,GACR,kBAAC,UAAD;KACE,MAAK;KACL,eAAeG,EAAa,QAAQ;KACpC,WAAW,gEACTD,MAAc,WACV,gCACA;KAGN,UAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAACO,GAAD,EAAU,WAAU,SAAU,CAAA,GAC7BT,EAAG,qCAAqC,QAAQ,CAC9C;;IACC,CAAA,CACL;;GAEJE,MAAc,YAAY,kBAACQ,GAAD,CAAe,CAAA;GACzCR,MAAc,YAAY,kBAACS,GAAD,CAAe,CAAA;EAChC;;AAEhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ProviderDetailPage(): import('react').JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { nativeConfirm as
|
|
10
|
-
import { useState as
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { AlertTriangle as
|
|
14
|
-
import { CTAOverflowMenu as
|
|
15
|
-
|
|
1
|
+
import { PageLayout as e } from "../components/PageLayout.js";
|
|
2
|
+
import { ConfirmDialog as t } from "../components/ConfirmDialog.js";
|
|
3
|
+
import { Badge as n, Button as r, Card as i } from "../components/ui.js";
|
|
4
|
+
import { useDeleteIntegration as a, useTriggerSync as o, useVaultIntegrations as s, useVaultSyncLogs as c } from "../hooks/useProviderQueries.js";
|
|
5
|
+
import { useSecurity as l } from "../providers/SecurityProvider.js";
|
|
6
|
+
import { getProviderTypeInfo as u } from "../constants/providers.js";
|
|
7
|
+
import { useTr as d } from "../hooks/useTr.js";
|
|
8
|
+
import { cn as f } from "../utils/cn.js";
|
|
9
|
+
import { nativeConfirm as ee, nativeImpact as p, nativeNotify as m } from "../../utils/nativeBridge.js";
|
|
10
|
+
import { useState as h } from "react";
|
|
11
|
+
import { useNavigate as g, useParams as _ } from "react-router";
|
|
12
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
13
|
+
import { AlertTriangle as b, ArrowLeft as x, CheckCircle as S, Clock as C, Cloud as w, Loader2 as T, RefreshCw as E, Trash2 as te, XCircle as ne } from "lucide-react";
|
|
14
|
+
import { CTAOverflowMenu as re, GlassCard as ie, IllustratedEmptyState as ae, NextSteps as D, PagePurpose as O, ResponsiveTable as k } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
// src/security/pages/ProviderDetailPage.tsx
|
|
16
16
|
function A() {
|
|
17
|
-
let { vaultId: A, providerId: j } =
|
|
17
|
+
let { vaultId: A, providerId: j } = _(), { basePath: M = "/", navigate: N } = l(), P = g(), F = d(), { data: I, loading: L, error: R } = s(A), z = (I?.getVaultIntegrations?.items ?? []).find((e) => e.id === j), B = z ? u(z.providerType) : null, { data: V, loading: H } = c(j), U = V?.getVaultSyncLogs?.items ?? [], [W, { loading: G }] = a(), [K, { loading: q }] = o(), [oe, J] = h(!1), se = (e) => {
|
|
18
18
|
N ? N(e) : P(e);
|
|
19
19
|
}, Y = () => se(`${M}/providers`), X = async () => {
|
|
20
20
|
if (j) try {
|
|
@@ -24,25 +24,21 @@ function A() {
|
|
|
24
24
|
}
|
|
25
25
|
}, Z = async () => {
|
|
26
26
|
if (j) try {
|
|
27
|
-
await W({ variables: { id: j } }),
|
|
27
|
+
await W({ variables: { id: j } }), m("success"), Y();
|
|
28
28
|
} catch (e) {
|
|
29
|
-
console.error("Delete failed:", e),
|
|
29
|
+
console.error("Delete failed:", e), m("error");
|
|
30
30
|
}
|
|
31
31
|
}, ce = async () => {
|
|
32
|
-
|
|
33
|
-
let e = B?.label ?? "", t = await
|
|
32
|
+
p("medium");
|
|
33
|
+
let e = B?.label ?? "", t = await ee({
|
|
34
34
|
title: F("security.providerDetail.removeProvider", "Remove Provider"),
|
|
35
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
36
|
okButtonTitle: F("security.providerDetail.remove", "Remove"),
|
|
37
37
|
cancelButtonTitle: F("security.common.actions.cancel", "Cancel")
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
J(!0);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
t && await Z();
|
|
39
|
+
t === null ? J(!0) : t && await Z();
|
|
44
40
|
};
|
|
45
|
-
if (L && !z) return /* @__PURE__ */
|
|
41
|
+
if (L && !z) return /* @__PURE__ */ v(e, {
|
|
46
42
|
title: F("security.providerDetail.loading", "Loading..."),
|
|
47
43
|
breadcrumbs: [{
|
|
48
44
|
label: F("security.common.breadcrumbs.security", "Security"),
|
|
@@ -51,12 +47,12 @@ function A() {
|
|
|
51
47
|
label: F("security.providers.title", "Providers"),
|
|
52
48
|
path: `${M}/providers`
|
|
53
49
|
}],
|
|
54
|
-
children: /* @__PURE__ */
|
|
50
|
+
children: /* @__PURE__ */ v("div", {
|
|
55
51
|
className: "flex items-center justify-center py-16",
|
|
56
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ v(T, { className: "size-8 animate-spin text-primary" })
|
|
57
53
|
})
|
|
58
54
|
});
|
|
59
|
-
if (R || !L && !z) return /* @__PURE__ */
|
|
55
|
+
if (R || !L && !z) return /* @__PURE__ */ v(e, {
|
|
60
56
|
title: F("security.providerDetail.error", "Error"),
|
|
61
57
|
breadcrumbs: [{
|
|
62
58
|
label: F("security.common.breadcrumbs.security", "Security"),
|
|
@@ -65,32 +61,32 @@ function A() {
|
|
|
65
61
|
label: F("security.providers.title", "Providers"),
|
|
66
62
|
path: `${M}/providers`
|
|
67
63
|
}],
|
|
68
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ v(i, {
|
|
69
65
|
className: "p-6",
|
|
70
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ y("div", {
|
|
71
67
|
className: "flex items-start gap-4",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ v(b, { className: "size-6 text-status-error-text" }), /* @__PURE__ */ y("div", { children: [
|
|
69
|
+
/* @__PURE__ */ v("h3", {
|
|
74
70
|
className: "font-semibold text-status-error-text",
|
|
75
71
|
children: F("security.providerDetail.providerNotFound", "Provider not found")
|
|
76
72
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ v("p", {
|
|
78
74
|
className: "text-sm text-text-secondary mt-1",
|
|
79
75
|
children: R?.message ?? F("security.providerDetail.providerNotFoundDescription", "The requested provider could not be found.")
|
|
80
76
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ y(r, {
|
|
82
78
|
variant: "outline",
|
|
83
79
|
size: "sm",
|
|
84
80
|
className: "mt-4",
|
|
85
81
|
onClick: Y,
|
|
86
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ v(x, { className: "size-4" }), F("security.providerDetail.backToProviders", "Back to Providers")]
|
|
87
83
|
})
|
|
88
84
|
] })]
|
|
89
85
|
})
|
|
90
86
|
})
|
|
91
87
|
});
|
|
92
88
|
let Q = z.displayName || B?.label || "", $ = B?.label ?? "";
|
|
93
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ y(e, {
|
|
94
90
|
title: Q,
|
|
95
91
|
description: B?.description,
|
|
96
92
|
breadcrumbs: [
|
|
@@ -104,99 +100,99 @@ function A() {
|
|
|
104
100
|
},
|
|
105
101
|
{ label: Q }
|
|
106
102
|
],
|
|
107
|
-
actions: /* @__PURE__ */
|
|
103
|
+
actions: /* @__PURE__ */ y("div", {
|
|
108
104
|
className: "flex items-center gap-2",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ y(r, {
|
|
110
106
|
variant: "outline",
|
|
111
107
|
size: "sm",
|
|
112
108
|
onClick: Y,
|
|
113
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ v(x, { className: "size-4" }), /* @__PURE__ */ v("span", {
|
|
114
110
|
className: "hidden sm:inline",
|
|
115
111
|
children: F("security.common.actions.back", "Back")
|
|
116
112
|
})]
|
|
117
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ v(re, {
|
|
118
114
|
primary: {
|
|
119
115
|
label: q ? F("security.providerDetail.syncing", "Syncing...") : F("security.providerDetail.syncNow", "Sync Now"),
|
|
120
|
-
icon: /* @__PURE__ */
|
|
116
|
+
icon: /* @__PURE__ */ v(E, { className: f("size-4", q && "animate-spin") }),
|
|
121
117
|
disabled: q,
|
|
122
118
|
onSelect: () => void X()
|
|
123
119
|
},
|
|
124
120
|
actions: [{
|
|
125
121
|
label: F("security.providerDetail.remove", "Remove"),
|
|
126
|
-
icon: /* @__PURE__ */
|
|
122
|
+
icon: /* @__PURE__ */ v(te, { className: "size-4" }),
|
|
127
123
|
intent: "destructive",
|
|
128
124
|
disabled: G,
|
|
129
125
|
onSelect: () => void ce()
|
|
130
126
|
}]
|
|
131
127
|
})]
|
|
132
128
|
}),
|
|
133
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ y("div", {
|
|
134
130
|
className: "space-y-6",
|
|
135
131
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
icon: /* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ v(O, {
|
|
133
|
+
icon: /* @__PURE__ */ v(w, { className: "size-4" }),
|
|
138
134
|
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.")
|
|
139
135
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ v(D, {
|
|
141
137
|
storageKey: "security-provider-detail",
|
|
142
138
|
steps: [{
|
|
143
139
|
id: "sync-now",
|
|
144
140
|
label: F("security.providerDetail.syncNow", "Sync Now"),
|
|
145
141
|
description: F("security.providerDetail.syncNowDescription", "Pull the latest values from the provider immediately."),
|
|
146
|
-
icon: /* @__PURE__ */
|
|
142
|
+
icon: /* @__PURE__ */ v(E, { className: "size-4" }),
|
|
147
143
|
onClick: q ? void 0 : () => void X()
|
|
148
144
|
}, {
|
|
149
145
|
id: "review-history",
|
|
150
146
|
label: F("security.providerDetail.reviewHistory", "Review sync history"),
|
|
151
147
|
description: F("security.providerDetail.reviewHistoryDescription", "Check recent runs below for failures or drift."),
|
|
152
|
-
icon: /* @__PURE__ */
|
|
148
|
+
icon: /* @__PURE__ */ v(C, { className: "size-4" }),
|
|
153
149
|
href: "#sync-history"
|
|
154
150
|
}]
|
|
155
151
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ y(ie, {
|
|
157
153
|
treatment: "glass",
|
|
158
154
|
glow: !0,
|
|
159
155
|
className: "p-6",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ y("div", {
|
|
161
157
|
className: "flex items-center gap-2 mb-6",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ v("div", {
|
|
163
159
|
className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
}), /* @__PURE__ */
|
|
160
|
+
children: /* @__PURE__ */ v(w, { className: "size-5" })
|
|
161
|
+
}), /* @__PURE__ */ v("h2", {
|
|
166
162
|
className: "text-lg font-bold text-text-primary",
|
|
167
163
|
children: F("security.providerDetail.integrationSettings", "Integration Settings")
|
|
168
164
|
})]
|
|
169
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ y("div", {
|
|
170
166
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm",
|
|
171
167
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
173
169
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
174
170
|
children: F("security.providerDetail.providerType", "Provider Type")
|
|
175
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ v("p", {
|
|
176
172
|
className: "font-semibold text-text-primary",
|
|
177
173
|
children: B ? F(`security.${B.translationKey}`, B.label) : $
|
|
178
174
|
})] }),
|
|
179
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
180
176
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
181
177
|
children: F("security.providerDetail.syncDirection", "Sync Direction")
|
|
182
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ v("p", {
|
|
183
179
|
className: "font-semibold text-text-primary capitalize",
|
|
184
180
|
children: z.syncDirection ?? F("security.providerDetail.bidirectional", "bidirectional")
|
|
185
181
|
})] }),
|
|
186
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
187
183
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
188
184
|
children: F("security.providerDetail.status", "Status")
|
|
189
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ y(n, {
|
|
190
186
|
variant: z.syncEnabled ? "success" : "outline",
|
|
191
|
-
children: [z.syncEnabled && /* @__PURE__ */
|
|
187
|
+
children: [z.syncEnabled && /* @__PURE__ */ v("span", {
|
|
192
188
|
"aria-hidden": "true",
|
|
193
189
|
className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse"
|
|
194
190
|
}), z.syncEnabled ? F("security.providerDetail.enabled", "Enabled") : F("security.providerDetail.disabled", "Disabled")]
|
|
195
191
|
})] }),
|
|
196
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
197
193
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
198
194
|
children: F("security.providerDetail.syncInterval", "Sync Interval")
|
|
199
|
-
}), /* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ y("p", {
|
|
200
196
|
className: "font-semibold text-text-primary",
|
|
201
197
|
children: [
|
|
202
198
|
z.syncIntervalMinutes ?? 0,
|
|
@@ -204,35 +200,35 @@ function A() {
|
|
|
204
200
|
F("security.providerDetail.minutes", "minutes")
|
|
205
201
|
]
|
|
206
202
|
})] }),
|
|
207
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
208
204
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
209
205
|
children: F("security.providerDetail.addedOn", "Added On")
|
|
210
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ v("p", {
|
|
211
207
|
className: "font-semibold text-text-primary",
|
|
212
208
|
children: new Date(z.createdAt).toLocaleDateString()
|
|
213
209
|
})] }),
|
|
214
|
-
z.lastSyncAt && /* @__PURE__ */
|
|
210
|
+
z.lastSyncAt && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
215
211
|
className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
|
|
216
212
|
children: F("security.providerDetail.lastSuccessfulSync", "Last Successful Sync")
|
|
217
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ y("div", {
|
|
218
214
|
className: "flex items-center gap-1.5 font-semibold text-text-primary",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ v(S, { className: "size-3.5 text-status-success-text" }), new Date(z.lastSyncAt).toLocaleString()]
|
|
220
216
|
})] })
|
|
221
217
|
]
|
|
222
218
|
})]
|
|
223
219
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ y(i, {
|
|
225
221
|
id: "sync-history",
|
|
226
222
|
className: "p-6 shadow-sm border-border-subtle/60",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ y("div", {
|
|
228
224
|
className: "flex items-center justify-between mb-6",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ y("div", {
|
|
230
226
|
className: "flex items-center gap-2",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ v(C, { className: "size-5 text-primary" }), /* @__PURE__ */ v("h2", {
|
|
232
228
|
className: "text-lg font-bold text-text-primary",
|
|
233
229
|
children: F("security.providerDetail.syncHistory", "Sync History")
|
|
234
230
|
})]
|
|
235
|
-
}), /* @__PURE__ */
|
|
231
|
+
}), /* @__PURE__ */ y(n, {
|
|
236
232
|
variant: "outline",
|
|
237
233
|
className: "bg-bg-sunken",
|
|
238
234
|
children: [
|
|
@@ -241,10 +237,10 @@ function A() {
|
|
|
241
237
|
F("security.providerDetail.runs", "runs")
|
|
242
238
|
]
|
|
243
239
|
})]
|
|
244
|
-
}), H ? /* @__PURE__ */
|
|
240
|
+
}), H ? /* @__PURE__ */ v("div", {
|
|
245
241
|
className: "flex justify-center py-12",
|
|
246
|
-
children: /* @__PURE__ */
|
|
247
|
-
}) : U.length > 0 ? /* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ v(T, { className: "size-8 animate-spin text-primary/40" })
|
|
243
|
+
}) : U.length > 0 ? /* @__PURE__ */ v(k, {
|
|
248
244
|
className: "border border-border-subtle/60 rounded-lg",
|
|
249
245
|
data: U,
|
|
250
246
|
rowKey: (e) => e.id,
|
|
@@ -253,7 +249,7 @@ function A() {
|
|
|
253
249
|
key: "time",
|
|
254
250
|
header: F("security.providerDetail.time", "Time"),
|
|
255
251
|
priority: "primary",
|
|
256
|
-
cell: (e) => /* @__PURE__ */
|
|
252
|
+
cell: (e) => /* @__PURE__ */ v("span", {
|
|
257
253
|
className: "whitespace-nowrap",
|
|
258
254
|
children: new Date(e.startedAt).toLocaleString()
|
|
259
255
|
})
|
|
@@ -261,7 +257,7 @@ function A() {
|
|
|
261
257
|
{
|
|
262
258
|
key: "status",
|
|
263
259
|
header: F("security.providerDetail.status", "Status"),
|
|
264
|
-
cell: (e) => /* @__PURE__ */
|
|
260
|
+
cell: (e) => /* @__PURE__ */ v(n, {
|
|
265
261
|
variant: e.status === "COMPLETED" ? "success" : e.status === "FAILED" ? "destructive" : "warning",
|
|
266
262
|
className: "text-[10px] uppercase",
|
|
267
263
|
children: e.status
|
|
@@ -270,7 +266,7 @@ function A() {
|
|
|
270
266
|
{
|
|
271
267
|
key: "synced",
|
|
272
268
|
header: F("security.providerDetail.synced", "Synced"),
|
|
273
|
-
cell: (e) => /* @__PURE__ */
|
|
269
|
+
cell: (e) => /* @__PURE__ */ v("span", {
|
|
274
270
|
className: "font-medium text-text-primary tabular-nums",
|
|
275
271
|
children: e.secretsSynced
|
|
276
272
|
})
|
|
@@ -278,7 +274,7 @@ function A() {
|
|
|
278
274
|
{
|
|
279
275
|
key: "duration",
|
|
280
276
|
header: F("security.providerDetail.duration", "Duration"),
|
|
281
|
-
cell: (e) => /* @__PURE__ */
|
|
277
|
+
cell: (e) => /* @__PURE__ */ v("span", {
|
|
282
278
|
className: "text-text-secondary tabular-nums",
|
|
283
279
|
children: e.durationMs ? `${e.durationMs}ms` : "-"
|
|
284
280
|
})
|
|
@@ -286,27 +282,27 @@ function A() {
|
|
|
286
282
|
{
|
|
287
283
|
key: "errors",
|
|
288
284
|
header: F("security.providerDetail.errors", "Errors"),
|
|
289
|
-
cell: (e) => e.errorMessage ? /* @__PURE__ */
|
|
285
|
+
cell: (e) => e.errorMessage ? /* @__PURE__ */ y("div", {
|
|
290
286
|
className: "flex items-center gap-1.5 text-status-error-text max-w-xs truncate",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ v(ne, { className: "size-3.5" }), /* @__PURE__ */ v("span", {
|
|
292
288
|
className: "truncate",
|
|
293
289
|
title: e.errorMessage,
|
|
294
290
|
children: e.errorMessage
|
|
295
291
|
})]
|
|
296
|
-
}) : /* @__PURE__ */
|
|
292
|
+
}) : /* @__PURE__ */ v("span", {
|
|
297
293
|
className: "text-text-secondary",
|
|
298
294
|
children: "-"
|
|
299
295
|
})
|
|
300
296
|
}
|
|
301
297
|
]
|
|
302
|
-
}) : /* @__PURE__ */
|
|
298
|
+
}) : /* @__PURE__ */ v(ae, {
|
|
303
299
|
illustration: "empty-data",
|
|
304
300
|
title: F("security.providerDetail.noSyncLogs", "No sync logs found"),
|
|
305
301
|
description: F("security.providerDetail.noSyncLogsDescription", "Sync history will appear here after the first synchronization run.")
|
|
306
302
|
})]
|
|
307
303
|
})
|
|
308
304
|
]
|
|
309
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ v(t, {
|
|
310
306
|
isOpen: oe,
|
|
311
307
|
onClose: () => J(!1),
|
|
312
308
|
onConfirm: Z,
|
|
@@ -317,7 +313,6 @@ function A() {
|
|
|
317
313
|
})]
|
|
318
314
|
});
|
|
319
315
|
}
|
|
320
|
-
//#endregion
|
|
321
316
|
export { A as ProviderDetailPage };
|
|
322
317
|
|
|
323
318
|
//# sourceMappingURL=ProviderDetailPage.js.map
|