@camunda/ccma-saas-frontend 0.1.0 → 0.3.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/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +3 -0
- package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.js +154 -0
- package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +2 -0
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +14 -3
- package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +18 -0
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +58 -1
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +40 -6
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +6 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +5 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.js +83 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +6 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +79 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +65 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +60 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.js +143 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +6 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.js +51 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +63 -2
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +4 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.js +132 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/applications.js +17 -3
- package/lib/esm/components/c4-cluster-overview/applications.spec.js +27 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +203 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +59 -9
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +38 -3
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +16 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +104 -0
- package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +5 -1
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +10 -3
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +20 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +85 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +93 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +20 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +15 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +50 -0
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +10 -4
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +116 -24
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +120 -0
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +19 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +2 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +186 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +132 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +20 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +22 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.js +6 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +32 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +71 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +1 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +83 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +31 -58
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +64 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +298 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +48 -30
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.js +23 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +2 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.js +15 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +5 -5
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.js +13 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +1 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +77 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +2 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.js +11 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.d.ts +14 -0
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.js +6 -0
- package/lib/esm/components/c4-data-table/c4-data-table.js +117 -34
- package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +1 -0
- package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +151 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +2 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +231 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +56 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +36 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +2 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +102 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +16 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +103 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +4 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.js +63 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +11 -0
- package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +43 -0
- package/lib/esm/components/c4-management-api/c4-management-api.mocks.js +118 -0
- package/lib/esm/components/c4-management-overview/c4-management-overview.js +6 -4
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +1 -1
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +1 -0
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +4 -1
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +58 -36
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +6 -0
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +3 -1
- package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +1 -0
- package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +47 -0
- package/lib/esm/components/shared-charts/ds-line-chart.d.ts +33 -0
- package/lib/esm/components/shared-charts/ds-line-chart.js +55 -0
- package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +22 -0
- package/lib/esm/components/shared-charts/ds-meter-chart.js +48 -0
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -0
- package/lib/esm/components/shared-charts/recharts-tokens.js +51 -0
- package/lib/esm/externalUrls.const.d.ts +2 -0
- package/lib/esm/externalUrls.const.js +7 -0
- package/lib/esm/externalUrls.const.spec.js +2 -0
- package/lib/esm/i18n/en/entities/orgroles.json +0 -16
- package/lib/esm/i18n/en/pages/clusterdetails.json +9 -1
- package/lib/esm/i18n/en/pages/orgmanagement.json +9 -2
- package/lib/esm/index.d.ts +17 -2
- package/lib/esm/index.js +11 -2
- package/lib/esm/runtime/c4-console-authz.d.ts +26 -0
- package/lib/esm/runtime/c4-console-authz.js +58 -28
- package/lib/esm/runtime/c4-console-authz.spec.js +84 -17
- package/lib/esm/runtime/c4-console-data-context.js +40 -0
- package/lib/esm/runtime/c4-console-data-context.types.d.ts +19 -1
- package/lib/esm/runtime/c4-console-data-store.d.ts +25 -1
- package/lib/esm/runtime/c4-console-data-store.js +145 -31
- package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +1 -0
- package/lib/esm/runtime/c4-console-data-store.nav.spec.js +121 -0
- package/lib/esm/runtime/c4-console-data-store.spec.js +35 -6
- package/lib/esm/runtime/c4-console-events-context.d.ts +18 -0
- package/lib/esm/runtime/c4-console-events-context.js +62 -0
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +12 -0
- package/lib/esm/runtime/c4-user-notifications-context.d.ts +19 -0
- package/lib/esm/runtime/c4-user-notifications-context.js +201 -0
- package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +1 -0
- package/lib/esm/runtime/c4-user-notifications-context.spec.js +80 -0
- package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +31 -0
- package/lib/esm/runtime/c4-user-notifications-context.types.js +6 -0
- package/lib/esm/runtime/c4-user-theme.d.ts +27 -0
- package/lib/esm/runtime/c4-user-theme.js +106 -0
- package/lib/esm/runtime/decode-access-token.d.ts +12 -0
- package/lib/esm/runtime/decode-access-token.js +39 -0
- package/lib/esm/runtime/nav/camunda-apps.d.ts +45 -0
- package/lib/esm/runtime/nav/camunda-apps.js +100 -0
- package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +1 -0
- package/lib/esm/runtime/nav/camunda-apps.spec.js +90 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +75 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.js +211 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +1 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +91 -0
- package/lib/esm/runtime/to-api-config.js +4 -0
- package/lib/esm/ui/index.d.ts +1 -0
- package/lib/esm/ui/index.js +3 -2
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +32 -13
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +49 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +8 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +23 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.js +83 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +33 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +17 -84
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +19 -35
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +38 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +38 -14
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +2 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +190 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +60 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +80 -44
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +48 -48
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +2 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +10 -3
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +32 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +4 -3
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +21 -2
- package/lib/esm/widgets/group-details/c4-group-details-page.js +3 -2
- package/lib/esm/widgets/management/c4-management-app.js +80 -24
- package/lib/esm/widgets/management/c4-management-app.spec.js +32 -10
- package/lib/esm/widgets/management/management-tabs.d.ts +22 -0
- package/lib/esm/widgets/management/management-tabs.js +76 -0
- package/lib/esm/widgets/management/management-tabs.spec.d.ts +1 -0
- package/lib/esm/widgets/management/management-tabs.spec.js +28 -0
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +2 -1
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +11 -2
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +0 -10
- package/lib/esm/widgets/user-details/c4-user-details-page.js +0 -10
- package/package.json +9 -7
|
@@ -15,6 +15,7 @@ import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js
|
|
|
15
15
|
import { toApiConfig } from '../../runtime/to-api-config.js';
|
|
16
16
|
import { Modal, Stack, TextInput } from '../../ui/index.js';
|
|
17
17
|
import { C4ClusterDetailsPage } from './c4-cluster-details-page.js';
|
|
18
|
+
import { clusterDetailsTab } from './cluster-details-tabs.js';
|
|
18
19
|
import { C4ClusterDetailsActivityTab } from './tabs/c4-cluster-details-activity-tab.js';
|
|
19
20
|
import { C4ClusterDetailsAlertsTab } from './tabs/c4-cluster-details-alerts-tab.js';
|
|
20
21
|
import { C4ClusterDetailsAuditLogTab } from './tabs/c4-cluster-details-audit-log-tab.js';
|
|
@@ -99,12 +100,22 @@ function isAuditLogCategory(value) {
|
|
|
99
100
|
function isRecord(value) {
|
|
100
101
|
return typeof value === 'object' && value !== null;
|
|
101
102
|
}
|
|
102
|
-
function mergeNestedSnapshot(previous, next) {
|
|
103
|
+
export function mergeNestedSnapshot(previous, next) {
|
|
103
104
|
if (!isRecord(previous) || !isRecord(next)) {
|
|
104
105
|
return next;
|
|
105
106
|
}
|
|
106
107
|
const merged = { ...previous };
|
|
107
108
|
for (const [key, nextValue] of Object.entries(next)) {
|
|
109
|
+
// externalMetadata is a single JSON column with no per-field permission
|
|
110
|
+
// gating (unlike e.g. generation/plan, which can be legitimately absent
|
|
111
|
+
// from a lean SSE payload) — whenever it's present in a snapshot it's the
|
|
112
|
+
// complete, authoritative value. Deep-merging it would resurrect stale
|
|
113
|
+
// sub-fields (e.g. optimizeFiltering) whose cleared value got dropped by
|
|
114
|
+
// JSON.stringify, so take it wholesale instead.
|
|
115
|
+
if (key === 'externalMetadata') {
|
|
116
|
+
merged[key] = nextValue;
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
108
119
|
const previousValue = previous[key];
|
|
109
120
|
if (nextValue === undefined) {
|
|
110
121
|
merged[key] = previousValue;
|
|
@@ -1031,8 +1042,10 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1031
1042
|
identityAuthorization: urls.docs.identityAuthorization,
|
|
1032
1043
|
swagger: urls.docs.swagger,
|
|
1033
1044
|
mcpOverview: urls.docs.mcpOverview,
|
|
1045
|
+
msTeamsIntegration: urls.docs.msTeamsIntegration,
|
|
1034
1046
|
tasklistApiVersions: urls.docs.tasklistApiVersions,
|
|
1035
1047
|
multiTenancy: urls.docs.multiTenancy,
|
|
1048
|
+
byoidp: urls.docs.byoidp,
|
|
1036
1049
|
} }));
|
|
1037
1050
|
}, [
|
|
1038
1051
|
cluster,
|
|
@@ -1146,16 +1159,22 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1146
1159
|
encryptionManual: urls.docs.encryptionManual,
|
|
1147
1160
|
} }));
|
|
1148
1161
|
const tabs = useMemo(() => {
|
|
1162
|
+
// Labels come from the shared cluster-details tab catalog (single source
|
|
1163
|
+
// of the ids / i18n keys / order, also consumed by the docs screenshots).
|
|
1164
|
+
const tabLabel = (id) => {
|
|
1165
|
+
const { titleKey, titleFallback } = clusterDetailsTab(id);
|
|
1166
|
+
return safeTranslate(t, titleKey, titleFallback);
|
|
1167
|
+
};
|
|
1149
1168
|
const base = [
|
|
1150
1169
|
{
|
|
1151
1170
|
id: 'overview',
|
|
1152
|
-
label:
|
|
1171
|
+
label: tabLabel('overview'),
|
|
1153
1172
|
component: overviewComponent,
|
|
1154
1173
|
init: () => { },
|
|
1155
1174
|
},
|
|
1156
1175
|
{
|
|
1157
1176
|
id: 'api',
|
|
1158
|
-
label:
|
|
1177
|
+
label: tabLabel('api'),
|
|
1159
1178
|
component: clientsComponent,
|
|
1160
1179
|
visible: canViewApiClientsTab,
|
|
1161
1180
|
init: () => { },
|
|
@@ -1164,35 +1183,35 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1164
1183
|
id: 'secrets',
|
|
1165
1184
|
label: useClusterSecretsLabel
|
|
1166
1185
|
? safeTranslate(t, 'clusterdetails:clusterSecrets.title', 'Cluster secrets')
|
|
1167
|
-
:
|
|
1186
|
+
: tabLabel('secrets'),
|
|
1168
1187
|
component: connectorSecretsComponent,
|
|
1169
1188
|
visible: canViewConnectorSecretsTab,
|
|
1170
1189
|
init: () => { },
|
|
1171
1190
|
},
|
|
1172
1191
|
{
|
|
1173
1192
|
id: 'alerts',
|
|
1174
|
-
label:
|
|
1193
|
+
label: tabLabel('alerts'),
|
|
1175
1194
|
component: alertsComponent,
|
|
1176
1195
|
visible: canViewAlertsTab,
|
|
1177
1196
|
init: () => { },
|
|
1178
1197
|
},
|
|
1179
1198
|
{
|
|
1180
1199
|
id: 'activity',
|
|
1181
|
-
label:
|
|
1200
|
+
label: tabLabel('activity'),
|
|
1182
1201
|
component: activityComponent,
|
|
1183
1202
|
visible: canViewActivityTab,
|
|
1184
1203
|
init: () => { },
|
|
1185
1204
|
},
|
|
1186
1205
|
{
|
|
1187
1206
|
id: 'monitoring',
|
|
1188
|
-
label:
|
|
1207
|
+
label: tabLabel('monitoring'),
|
|
1189
1208
|
component: byomComponent,
|
|
1190
1209
|
visible: canViewMonitoringTab,
|
|
1191
1210
|
init: () => { },
|
|
1192
1211
|
},
|
|
1193
1212
|
{
|
|
1194
1213
|
id: 'ipWhitelist',
|
|
1195
|
-
label:
|
|
1214
|
+
label: tabLabel('ipWhitelist'),
|
|
1196
1215
|
component: ipWhitelistComponent,
|
|
1197
1216
|
visible: canViewIpWhitelistTab &&
|
|
1198
1217
|
Boolean(orgInfo?.organizationToSalesPlan?.limits?.ipWhiteList),
|
|
@@ -1200,7 +1219,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1200
1219
|
},
|
|
1201
1220
|
{
|
|
1202
1221
|
id: 'privateNetworking',
|
|
1203
|
-
label:
|
|
1222
|
+
label: tabLabel('privateNetworking'),
|
|
1204
1223
|
component: secureConnectivityComponent,
|
|
1205
1224
|
visible: isSecureConnectivityTabVisible &&
|
|
1206
1225
|
canViewSecureConnectivityTab &&
|
|
@@ -1209,14 +1228,14 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1209
1228
|
},
|
|
1210
1229
|
{
|
|
1211
1230
|
id: 'backups',
|
|
1212
|
-
label:
|
|
1231
|
+
label: tabLabel('backups'),
|
|
1213
1232
|
component: hotBackupsComponent,
|
|
1214
1233
|
visible: Boolean(orgInfo?.organizationToSalesPlan?.limits?.hotBackup),
|
|
1215
1234
|
init: () => { },
|
|
1216
1235
|
},
|
|
1217
1236
|
{
|
|
1218
1237
|
id: 'auditLog',
|
|
1219
|
-
label:
|
|
1238
|
+
label: tabLabel('auditLog'),
|
|
1220
1239
|
component: auditLogComponent,
|
|
1221
1240
|
visible: Boolean(cluster?.generation?.versions?.zeebe &&
|
|
1222
1241
|
checkVersion({
|
|
@@ -1230,14 +1249,14 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1230
1249
|
},
|
|
1231
1250
|
{
|
|
1232
1251
|
id: 'settings',
|
|
1233
|
-
label:
|
|
1252
|
+
label: tabLabel('settings'),
|
|
1234
1253
|
component: settingsComponent,
|
|
1235
1254
|
visible: true,
|
|
1236
1255
|
init: () => { },
|
|
1237
1256
|
},
|
|
1238
1257
|
{
|
|
1239
1258
|
id: 'encryption',
|
|
1240
|
-
label:
|
|
1259
|
+
label: tabLabel('encryption'),
|
|
1241
1260
|
component: encryptionComponent,
|
|
1242
1261
|
visible: cluster?.encryption === 'External',
|
|
1243
1262
|
init: () => { },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, expect, it } from 'vitest';
|
|
7
|
+
import { mergeNestedSnapshot } from './c4-cluster-details-app.js';
|
|
8
|
+
describe('mergeNestedSnapshot', () => {
|
|
9
|
+
it('clears externalMetadata.optimizeFiltering instead of preserving the stale value', () => {
|
|
10
|
+
const previous = {
|
|
11
|
+
uuid: 'cluster-1',
|
|
12
|
+
externalMetadata: {
|
|
13
|
+
optimizeFiltering: {
|
|
14
|
+
processDefinition: { inclusion: ['order-process'] },
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
// Disabling drops the `optimizeFiltering` key entirely from the JSON
|
|
19
|
+
// wire payload (the backend persists/serializes it as `undefined`, which
|
|
20
|
+
// JSON.stringify omits) rather than sending an explicit `null`.
|
|
21
|
+
const next = JSON.parse(JSON.stringify({
|
|
22
|
+
uuid: 'cluster-1',
|
|
23
|
+
externalMetadata: { optimizeFiltering: undefined },
|
|
24
|
+
}));
|
|
25
|
+
const merged = mergeNestedSnapshot(previous, next);
|
|
26
|
+
expect(merged.externalMetadata
|
|
27
|
+
.optimizeFiltering).toBeUndefined();
|
|
28
|
+
});
|
|
29
|
+
it('still preserves other nested fields omitted from a lean SSE payload', () => {
|
|
30
|
+
const previous = {
|
|
31
|
+
uuid: 'cluster-1',
|
|
32
|
+
planType: {
|
|
33
|
+
uuid: 'plan-1',
|
|
34
|
+
name: 'Advanced',
|
|
35
|
+
category: 'ADVANCED_OFFERING',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const next = {
|
|
39
|
+
uuid: 'cluster-1',
|
|
40
|
+
planType: { uuid: 'plan-1', name: 'Advanced' },
|
|
41
|
+
};
|
|
42
|
+
const merged = mergeNestedSnapshot(previous, next);
|
|
43
|
+
expect(merged.planType).toEqual({
|
|
44
|
+
uuid: 'plan-1',
|
|
45
|
+
name: 'Advanced',
|
|
46
|
+
category: 'ADVANCED_OFFERING',
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -19,6 +19,10 @@ export type C4ClusterDetailsNavigateEvent = {
|
|
|
19
19
|
kind: 'jobDashboardOverview';
|
|
20
20
|
orgId: string;
|
|
21
21
|
clusterId: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'connectorManagement';
|
|
24
|
+
orgId: string;
|
|
25
|
+
clusterId: string;
|
|
22
26
|
} | {
|
|
23
27
|
kind: 'openHelpCenter';
|
|
24
28
|
tabId: string;
|
|
@@ -53,8 +57,10 @@ export interface C4ClusterDetailsDocsUrls {
|
|
|
53
57
|
identityAuthorization: string;
|
|
54
58
|
resourceAuthorizations: string;
|
|
55
59
|
multiTenancy: string;
|
|
60
|
+
byoidp: string;
|
|
56
61
|
swagger: string;
|
|
57
62
|
mcpOverview: string;
|
|
63
|
+
msTeamsIntegration: string;
|
|
58
64
|
tasklistApiVersions: string;
|
|
59
65
|
springZeebeGettingStarted: string;
|
|
60
66
|
springZeebeConfig: string;
|
|
@@ -83,8 +89,10 @@ export interface C4ClusterDetailsUrls {
|
|
|
83
89
|
identityAuthorization?: string;
|
|
84
90
|
resourceAuthorizations?: string;
|
|
85
91
|
multiTenancy?: string;
|
|
92
|
+
byoidp?: string;
|
|
86
93
|
swagger?: string;
|
|
87
94
|
mcpOverview?: string;
|
|
95
|
+
msTeamsIntegration?: string;
|
|
88
96
|
tasklistApiVersions?: string;
|
|
89
97
|
springZeebeGettingStarted?: string;
|
|
90
98
|
springZeebeConfig?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { C4ClusterDetailsTabId } from './c4-cluster-details-app.types';
|
|
2
|
+
export interface ClusterDetailsTabDescriptor {
|
|
3
|
+
id: C4ClusterDetailsTabId;
|
|
4
|
+
/** i18n key (namespaced, e.g. `clusterdetails:overview.title`). */
|
|
5
|
+
titleKey: string;
|
|
6
|
+
/** English fallback used when the key can't be resolved. */
|
|
7
|
+
titleFallback: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Canonical id + label-key + display order for the cluster-details tabs.
|
|
11
|
+
*
|
|
12
|
+
* Single source of truth: `c4-cluster-details-app.tsx` builds its tab bar from
|
|
13
|
+
* this list (attaching each tab's live component / visibility / init by id), and
|
|
14
|
+
* the docs screenshot shell (screenshot-tooling-storybook) imports it so its tab
|
|
15
|
+
* bar can't drift from the real page. Runtime visibility is NOT encoded here -
|
|
16
|
+
* the app decides which tabs are actually shown for a given cluster.
|
|
17
|
+
*
|
|
18
|
+
* The `secrets` tab's label is context-dependent in the app (cluster vs.
|
|
19
|
+
* connector secrets); the connector-secrets key here is the default.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CLUSTER_DETAILS_TABS: readonly ClusterDetailsTabDescriptor[];
|
|
22
|
+
/** Look up a tab descriptor by id. */
|
|
23
|
+
export declare function clusterDetailsTab(id: C4ClusterDetailsTabId): ClusterDetailsTabDescriptor;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Canonical id + label-key + display order for the cluster-details tabs.
|
|
8
|
+
*
|
|
9
|
+
* Single source of truth: `c4-cluster-details-app.tsx` builds its tab bar from
|
|
10
|
+
* this list (attaching each tab's live component / visibility / init by id), and
|
|
11
|
+
* the docs screenshot shell (screenshot-tooling-storybook) imports it so its tab
|
|
12
|
+
* bar can't drift from the real page. Runtime visibility is NOT encoded here -
|
|
13
|
+
* the app decides which tabs are actually shown for a given cluster.
|
|
14
|
+
*
|
|
15
|
+
* The `secrets` tab's label is context-dependent in the app (cluster vs.
|
|
16
|
+
* connector secrets); the connector-secrets key here is the default.
|
|
17
|
+
*/
|
|
18
|
+
export const CLUSTER_DETAILS_TABS = [
|
|
19
|
+
{
|
|
20
|
+
id: 'overview',
|
|
21
|
+
titleKey: 'clusterdetails:overview.title',
|
|
22
|
+
titleFallback: 'Overview',
|
|
23
|
+
},
|
|
24
|
+
{ id: 'api', titleKey: 'clusterdetails:clients.title', titleFallback: 'API' },
|
|
25
|
+
{
|
|
26
|
+
id: 'secrets',
|
|
27
|
+
titleKey: 'clusterdetails:connectorSecrets.title',
|
|
28
|
+
titleFallback: 'Connector secrets',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 'alerts',
|
|
32
|
+
titleKey: 'clusterdetails:alerts.title',
|
|
33
|
+
titleFallback: 'Alerts',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'activity',
|
|
37
|
+
titleKey: 'clusterdetails:activity.title',
|
|
38
|
+
titleFallback: 'Activity',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'monitoring',
|
|
42
|
+
titleKey: 'clusterdetails:monitoring.title',
|
|
43
|
+
titleFallback: 'Monitoring',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'ipWhitelist',
|
|
47
|
+
titleKey: 'clusterdetails:ipWhitelist.title',
|
|
48
|
+
titleFallback: 'IP allowlist',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'privateNetworking',
|
|
52
|
+
titleKey: 'clusterdetails:secureConnectivity.title',
|
|
53
|
+
titleFallback: 'Private networking',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'backups',
|
|
57
|
+
titleKey: 'clusterdetails:hotbackups.title',
|
|
58
|
+
titleFallback: 'Hot backups',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'auditLog',
|
|
62
|
+
titleKey: 'clusterdetails:auditLog.title',
|
|
63
|
+
titleFallback: 'Audit log',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'settings',
|
|
67
|
+
titleKey: 'clusterdetails:settings.title',
|
|
68
|
+
titleFallback: 'Settings',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'encryption',
|
|
72
|
+
titleKey: 'clusterdetails:encryption.tab',
|
|
73
|
+
titleFallback: 'Encryption',
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
/** Look up a tab descriptor by id. */
|
|
77
|
+
export function clusterDetailsTab(id) {
|
|
78
|
+
const descriptor = CLUSTER_DETAILS_TABS.find((tab) => tab.id === id);
|
|
79
|
+
if (!descriptor) {
|
|
80
|
+
throw new Error(`Unknown cluster-details tab id: ${id}`);
|
|
81
|
+
}
|
|
82
|
+
return descriptor;
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, expect, it } from 'vitest';
|
|
7
|
+
import clusterdetails from '../../i18n/en/pages/clusterdetails.json';
|
|
8
|
+
import { CLUSTER_DETAILS_TABS } from './cluster-details-tabs.js';
|
|
9
|
+
// `monitoring` has no `title` in the bundle; the app intentionally falls back.
|
|
10
|
+
const KNOWN_MISSING_KEYS = new Set(['clusterdetails:monitoring.title']);
|
|
11
|
+
function resolve(json, path) {
|
|
12
|
+
return path
|
|
13
|
+
.split('.')
|
|
14
|
+
.reduce((node, key) => node && typeof node === 'object'
|
|
15
|
+
? node[key]
|
|
16
|
+
: undefined, json);
|
|
17
|
+
}
|
|
18
|
+
describe('CLUSTER_DETAILS_TABS', () => {
|
|
19
|
+
it('has unique ids', () => {
|
|
20
|
+
const ids = CLUSTER_DETAILS_TABS.map((tab) => tab.id);
|
|
21
|
+
expect(new Set(ids).size).toBe(ids.length);
|
|
22
|
+
});
|
|
23
|
+
it('every titleKey targets the clusterdetails bundle and resolves to a string', () => {
|
|
24
|
+
for (const { titleKey } of CLUSTER_DETAILS_TABS) {
|
|
25
|
+
const [namespace, path] = titleKey.split(':');
|
|
26
|
+
expect(namespace).toBe('clusterdetails');
|
|
27
|
+
if (KNOWN_MISSING_KEYS.has(titleKey)) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
expect(typeof resolve(clusterdetails, path)).toBe('string');
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -5,9 +5,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { Form, PasswordInput } from '@carbon/react';
|
|
8
|
-
import { Fragment, useCallback, useState } from 'react';
|
|
8
|
+
import { Fragment, useCallback, useRef, useState } from 'react';
|
|
9
9
|
import { C4ActionableNotification } from '../../../components/c4-actionable-notification/c4-actionable-notification.js';
|
|
10
10
|
import { C4ClusterDetailsAlerts } from '../../../components/c4-cluster-details-alerts/c4-cluster-details-alerts.js';
|
|
11
|
+
import { C4CreateAlertModal } from '../../../components/c4-create-alert-modal/c4-create-alert-modal.js';
|
|
11
12
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
12
13
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
13
14
|
import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
@@ -46,7 +47,7 @@ function renderInlineStrongWithBreaks(value, renderStrong) {
|
|
|
46
47
|
export const C4ClusterDetailsAlertsTab = (props) => {
|
|
47
48
|
const { RadioButton, RadioButtonGroup } = useRadioFamily();
|
|
48
49
|
const runtime = useC4ConsoleRuntime();
|
|
49
|
-
const
|
|
50
|
+
const createAlertModalRef = useRef(null);
|
|
50
51
|
const [updateAlertOpen, setUpdateAlertOpen] = useState(false);
|
|
51
52
|
const [deleteAlertOpen, setDeleteAlertOpen] = useState(false);
|
|
52
53
|
const [alertMutationBusy, setAlertMutationBusy] = useState(false);
|
|
@@ -116,17 +117,7 @@ export const C4ClusterDetailsAlertsTab = (props) => {
|
|
|
116
117
|
canDelete: props.canMutateCluster,
|
|
117
118
|
}, onCreateAlert: () => {
|
|
118
119
|
trackEvent('clusterOverviewAlerts:createModal:open', 'Open Create Alerts Modal');
|
|
119
|
-
|
|
120
|
-
setAlertReportType('Email');
|
|
121
|
-
setAlertWebhookUrl('');
|
|
122
|
-
setAlertWantsHmac(false);
|
|
123
|
-
setAlertHadHmacOnOpen(false);
|
|
124
|
-
setAlertHmacSecret('');
|
|
125
|
-
setAlertUrlInvalid(false);
|
|
126
|
-
setAlertUrlInvalidText('');
|
|
127
|
-
setAlertHmacInvalid(false);
|
|
128
|
-
setAlertHmacInvalidText('');
|
|
129
|
-
setCreateAlertOpen(true);
|
|
120
|
+
createAlertModalRef.current?.open();
|
|
130
121
|
}, onUpdateAlert: (alertId) => {
|
|
131
122
|
trackEvent('clusterOverviewAlerts:updateModal:open', 'Open Update Alerts Modal', { alertId });
|
|
132
123
|
const found = props.alerts.find((a) => a.id === alertId);
|
|
@@ -157,78 +148,20 @@ export const C4ClusterDetailsAlertsTab = (props) => {
|
|
|
157
148
|
kind: 'openUrl',
|
|
158
149
|
url: props.docsAlertsUrl,
|
|
159
150
|
});
|
|
160
|
-
} }), _jsx(
|
|
151
|
+
} }), _jsx(C4CreateAlertModal, { ref: createAlertModalRef, t: props.t, userEmail: props.userEmail, docsAlertsUrl: props.docsAlertsUrl, onNavigate: (action) => {
|
|
152
|
+
trackEvent('docs:open', 'documentation clicked', {
|
|
153
|
+
from: 'console',
|
|
154
|
+
type: 'clusterdetails-alerts-no-alerts',
|
|
155
|
+
to: props.docsAlertsUrl,
|
|
156
|
+
});
|
|
157
|
+
props.onNavigate?.(action);
|
|
158
|
+
}, onCreateAlert: props.onCreateAlert, onCancel: () => {
|
|
161
159
|
trackEvent('clusterOverviewAlerts:createModal:cancel', 'Close Create Alerts Modal');
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
setAlertMutationError('');
|
|
168
|
-
setAlertUrlInvalid(false);
|
|
169
|
-
setAlertUrlInvalidText('');
|
|
170
|
-
setAlertHmacInvalid(false);
|
|
171
|
-
setAlertHmacInvalidText('');
|
|
172
|
-
// Validate webhook inputs
|
|
173
|
-
if (alertReportType === 'Webhook') {
|
|
174
|
-
if (!alertWebhookUrl) {
|
|
175
|
-
setAlertUrlInvalid(true);
|
|
176
|
-
setAlertUrlInvalidText(safeTranslate(props.t, 'alerts:formValidation.urlEmpty', 'You must provide a URL'));
|
|
177
|
-
setAlertMutationBusy(false);
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
if (alertWantsHmac && !alertHadHmacOnOpen && !alertHmacSecret) {
|
|
181
|
-
setAlertHmacInvalid(true);
|
|
182
|
-
setAlertHmacInvalidText(safeTranslate(props.t, 'alerts:formValidation.hmacSecretEmpty', 'You must provide the HMAC secret'));
|
|
183
|
-
setAlertMutationBusy(false);
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
try {
|
|
188
|
-
await props.onCreateAlert({
|
|
189
|
-
reportType: alertReportType,
|
|
190
|
-
webhookUrl: alertReportType === 'Webhook' ? alertWebhookUrl : undefined,
|
|
191
|
-
hmacSecret: alertReportType === 'Webhook' && alertWantsHmac
|
|
192
|
-
? alertHmacSecret
|
|
193
|
-
: undefined,
|
|
194
|
-
});
|
|
195
|
-
setCreateAlertOpen(false);
|
|
196
|
-
}
|
|
197
|
-
catch (error) {
|
|
198
|
-
setAlertMutationError(error instanceof Error ? error.message : 'Failed');
|
|
199
|
-
captureTelemetryError(error, 'clusterOverviewAlerts:createModal:confirm:error', 'Error while creating alert');
|
|
200
|
-
}
|
|
201
|
-
finally {
|
|
202
|
-
setAlertMutationBusy(false);
|
|
203
|
-
}
|
|
204
|
-
})();
|
|
205
|
-
}, children: _jsx(Form, { onSubmit: (e) => {
|
|
206
|
-
e.preventDefault();
|
|
207
|
-
}, children: _jsxs(Stack, { gap: 4, children: [alertMutationError && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(props.t, 'alerts:create.error.generic', "We're having trouble creating the alert"), subtitle: alertMutationError, lowContrast: true, hideCloseButton: true })), _jsxs(RadioButtonGroup, { name: 'alert-create-report-type', legendText: safeTranslate(props.t, 'alerts:create.fields.reportType.label', 'Delivery method'), valueSelected: alertReportType, orientation: 'vertical', onChange: (value) => {
|
|
208
|
-
setAlertReportType(value);
|
|
209
|
-
setAlertUrlInvalid(false);
|
|
210
|
-
setAlertUrlInvalidText('');
|
|
211
|
-
setAlertHmacInvalid(false);
|
|
212
|
-
setAlertHmacInvalidText('');
|
|
213
|
-
}, children: [_jsx(RadioButton, { labelText: `${safeTranslate(props.t, 'alerts:create.fields.reportType.options.email', 'Email')}${alertEmailDestination}`, value: 'Email', id: 'alert-create-email-radio' }), _jsx(RadioButton, { labelText: safeTranslate(props.t, 'alerts:create.fields.reportType.options.webhook', 'Webhook'), value: 'Webhook', id: 'alert-create-webhook-radio' })] }), alertReportType === 'Webhook' && (_jsxs(_Fragment, { children: [_jsx(TextInput, { id: 'alert-create-webhook-url', labelText: safeTranslate(props.t, 'alerts:create.fields.webhookUrl.label', 'Payload URL'), value: alertWebhookUrl, maxLength: 300, invalid: alertUrlInvalid, invalidText: alertUrlInvalidText, onChange: (event) => {
|
|
214
|
-
setAlertWebhookUrl(event.target.value);
|
|
215
|
-
setAlertUrlInvalid(false);
|
|
216
|
-
setAlertUrlInvalidText('');
|
|
217
|
-
} }), _jsxs("div", { children: [_jsx("fieldset", { className: 'cds--fieldset', children: _jsx("legend", { className: 'cds--label', children: safeTranslate(props.t, 'alerts:create.fields.webhookAuth.intro', 'Webhook security options') }) }), _jsx(Checkbox, { id: 'alert-create-hmac-checkbox', labelText: safeTranslate(props.t, 'alerts:create.fields.webhookAuth.label', 'Enable HMAC'), checked: alertWantsHmac, onChange: (event) => setAlertWantsHmac(event.target.checked) })] }), alertWantsHmac && (_jsxs(_Fragment, { children: [_jsx(PasswordInput, { id: 'alert-create-hmac-secret', labelText: safeTranslate(props.t, 'alerts:create.fields.webhookAuth.secret.label', 'Secret'), value: alertHmacSecret, invalid: alertHmacInvalid, invalidText: alertHmacInvalidText, onChange: (event) => {
|
|
218
|
-
setAlertHmacSecret(event.target.value);
|
|
219
|
-
setAlertHmacInvalid(false);
|
|
220
|
-
setAlertHmacInvalidText('');
|
|
221
|
-
} }), _jsx(C4ActionableNotification, { appearance: 'banner', lowContrast: true, kind: 'info', title: '', subtitle: safeTranslate(props.t, 'alerts:create.fields.webhookAuth.infoBannerForHmac.text', 'We will generate the SHA-256 hash of the request body using your HMAC secret and include it in the HTTP header X-Camunda-Signature-256.'), actionButtonLabel: safeTranslate(props.t, 'alerts:create.fields.webhookAuth.infoBannerForHmac.actionButtonLabel', 'Learn more'), onActionButtonClick: () => {
|
|
222
|
-
trackEvent('docs:open', 'documentation clicked', {
|
|
223
|
-
from: 'console',
|
|
224
|
-
type: 'clusterdetails-alerts-no-alerts',
|
|
225
|
-
to: props.docsAlertsUrl,
|
|
226
|
-
});
|
|
227
|
-
props.onNavigate?.({
|
|
228
|
-
kind: 'openUrl',
|
|
229
|
-
url: props.docsAlertsUrl,
|
|
230
|
-
});
|
|
231
|
-
} })] }))] }))] }) }) }), _jsx(Modal, { open: updateAlertOpen, modalHeading: safeTranslate(props.t, 'alerts:update.heading', 'Update process incident alert'), primaryButtonText: safeTranslate(props.t, 'alerts:update.buttons.primary', 'Update alert'), secondaryButtonText: safeTranslate(props.t, 'alerts:update.buttons.secondary', 'Cancel'), primaryButtonDisabled: alertMutationBusy, onRequestClose: () => {
|
|
160
|
+
}, onSubmitStart: () => {
|
|
161
|
+
trackEvent('clusterOverviewAlerts:createModal:confirm', 'Confirm Create Alerts Modal');
|
|
162
|
+
}, onSubmitError: (error) => {
|
|
163
|
+
captureTelemetryError(error, 'clusterOverviewAlerts:createModal:confirm:error', 'Error while creating alert');
|
|
164
|
+
} }), _jsx(Modal, { open: updateAlertOpen, modalHeading: safeTranslate(props.t, 'alerts:update.heading', 'Update process incident alert'), primaryButtonText: safeTranslate(props.t, 'alerts:update.buttons.primary', 'Update alert'), secondaryButtonText: safeTranslate(props.t, 'alerts:update.buttons.secondary', 'Cancel'), primaryButtonDisabled: alertMutationBusy, onRequestClose: () => {
|
|
232
165
|
trackEvent('clusterOverviewAlerts:updateModal:cancel', 'Close Update Alerts Modal', { alertId: selectedAlertId });
|
|
233
166
|
setUpdateAlertOpen(false);
|
|
234
167
|
}, onRequestSubmit: () => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleIpWhitelistService, ConsoleSecureConnectivityService, } from '@camunda/ccma-api';
|
|
3
3
|
import { Form } from '@carbon/react';
|
|
4
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
4
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { C4ClusterDetailsIpWhitelist } from '../../../components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js';
|
|
6
|
+
import { C4CreateIpWhitelistModal } from '../../../components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js';
|
|
6
7
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
7
8
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
8
9
|
import { Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
@@ -81,9 +82,9 @@ function stripI18nComponentPlaceholders(value) {
|
|
|
81
82
|
export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
82
83
|
const { cluster, isClusterLoading, orgId, clusterId, docsUrl, apiConfig, canMutateCluster, t, onNavigate, onReloadCluster, } = props;
|
|
83
84
|
const runtime = useC4ConsoleRuntime();
|
|
85
|
+
const createIpWhitelistModalRef = useRef(null);
|
|
84
86
|
const [ipWhitelistItems, setIpWhitelistItems] = useState([]);
|
|
85
87
|
const [hasPrivateLink, setHasPrivateLink] = useState(false);
|
|
86
|
-
const [createIpOpen, setCreateIpOpen] = useState(false);
|
|
87
88
|
const [updateIpOpen, setUpdateIpOpen] = useState(false);
|
|
88
89
|
const [deleteIpOpen, setDeleteIpOpen] = useState(false);
|
|
89
90
|
const [ipMutationBusy, setIpMutationBusy] = useState(false);
|
|
@@ -179,10 +180,7 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
|
179
180
|
canDelete: canMutateCluster,
|
|
180
181
|
}, onCreateIpWhitelist: () => {
|
|
181
182
|
trackEvent('clusterOverviewIpWhitelists:createModal:open', 'Open Create IP Whitelist Modal');
|
|
182
|
-
|
|
183
|
-
setIpDescription('');
|
|
184
|
-
setIpMutationError('');
|
|
185
|
-
setCreateIpOpen(true);
|
|
183
|
+
createIpWhitelistModalRef.current?.open();
|
|
186
184
|
}, onUpdateIpWhitelist: (ipIndex) => {
|
|
187
185
|
trackEvent('clusterOverviewIpWhitelists:updateModal:open', 'Open Update IP Whitelist Modal', { ipIndex });
|
|
188
186
|
const index = ipWhitelistItems.findIndex((ip) => ip.id === String(ipIndex));
|
|
@@ -207,36 +205,22 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
|
207
205
|
kind: 'openUrl',
|
|
208
206
|
url: docsUrl,
|
|
209
207
|
});
|
|
210
|
-
} }), _jsx(
|
|
208
|
+
} }), _jsx(C4CreateIpWhitelistModal, { ref: createIpWhitelistModalRef, t: t, onCreateIpWhitelist: async ({ ip, description }) => {
|
|
209
|
+
await persistIpWhitelist([
|
|
210
|
+
...ipWhitelistItems,
|
|
211
|
+
{
|
|
212
|
+
id: String(ipWhitelistItems.length),
|
|
213
|
+
ip,
|
|
214
|
+
description,
|
|
215
|
+
},
|
|
216
|
+
]);
|
|
217
|
+
}, onCancel: () => {
|
|
211
218
|
trackEvent('clusterOverviewIpWhitelists:createModal:cancel', 'Close Create IP Whitelist Modal');
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
setIpMutationError('');
|
|
218
|
-
try {
|
|
219
|
-
await persistIpWhitelist([
|
|
220
|
-
...ipWhitelistItems,
|
|
221
|
-
{
|
|
222
|
-
id: String(ipWhitelistItems.length),
|
|
223
|
-
ip: ipValue,
|
|
224
|
-
description: ipDescription,
|
|
225
|
-
},
|
|
226
|
-
]);
|
|
227
|
-
setCreateIpOpen(false);
|
|
228
|
-
}
|
|
229
|
-
catch (error) {
|
|
230
|
-
setIpMutationError(error instanceof Error ? error.message : 'Failed');
|
|
231
|
-
captureTelemetryError(error, 'clusterOverviewIpWhitelists:createModal:confirm', 'Error while creating IP Whitelist');
|
|
232
|
-
}
|
|
233
|
-
finally {
|
|
234
|
-
setIpMutationBusy(false);
|
|
235
|
-
}
|
|
236
|
-
})();
|
|
237
|
-
}, children: _jsx(Form, { onSubmit: (e) => {
|
|
238
|
-
e.preventDefault();
|
|
239
|
-
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'ipwhitelist:create.error.generic', "We're having trouble adding the IP(s)"), subtitle: ipMutationError, lowContrast: true, hideCloseButton: true })), _jsx(TextInput, { id: 'ip-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.ips', 'IP(s)'), helperText: safeTranslate(t, 'ipwhitelist:create.fields.ipsHelper', 'Comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1'), value: ipValue, maxLength: 50, onChange: (event) => setIpValue(event.target.value) }), _jsx(TextInput, { id: 'name-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.description', 'Description (optional)'), value: ipDescription, maxLength: 1024, onChange: (event) => setIpDescription(event.target.value) })] }) }) }), _jsx(Modal, { open: updateIpOpen, modalHeading: `${safeTranslate(t, 'ipwhitelist:update.heading', 'Update IP(s)')}: ${ipWhitelistItems[selectedIpIndex]?.ip ?? ''}`, primaryButtonText: safeTranslate(t, 'ipwhitelist:update.buttons.primary', 'Update'), secondaryButtonText: safeTranslate(t, 'ipwhitelist:update.buttons.secondary', 'Cancel'), primaryButtonDisabled: ipMutationBusy || ipValue.length === 0, onRequestClose: () => {
|
|
219
|
+
}, onSubmitStart: () => {
|
|
220
|
+
trackEvent('clusterOverviewIpWhitelists:createModal:confirm', 'Confirm Create IP Whitelist Modal');
|
|
221
|
+
}, onSubmitError: (error) => {
|
|
222
|
+
captureTelemetryError(error, 'clusterOverviewIpWhitelists:createModal:confirm', 'Error while creating IP Whitelist');
|
|
223
|
+
} }), _jsx(Modal, { open: updateIpOpen, modalHeading: `${safeTranslate(t, 'ipwhitelist:update.heading', 'Update IP(s)')}: ${ipWhitelistItems[selectedIpIndex]?.ip ?? ''}`, primaryButtonText: safeTranslate(t, 'ipwhitelist:update.buttons.primary', 'Update'), secondaryButtonText: safeTranslate(t, 'ipwhitelist:update.buttons.secondary', 'Cancel'), primaryButtonDisabled: ipMutationBusy || ipValue.length === 0, onRequestClose: () => {
|
|
240
224
|
trackEvent('clusterOverviewIpWhitelists:updateModal:cancel', 'Close Update IP Whitelist Modal', { ipIndex: selectedIpIndex });
|
|
241
225
|
setUpdateIpOpen(false);
|
|
242
226
|
}, onRequestSubmit: () => {
|