@camunda/ccma-saas-frontend 0.0.36 → 0.0.37
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-cluster-list/c4-cluster-list.js +39 -28
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +2 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +87 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +5 -1
- package/lib/esm/components/c4-cluster-overview/applications.js +52 -3
- package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-overview/applications.spec.js +26 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +26 -7
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -1
- package/lib/esm/externalUrls.const.d.ts +2 -1
- package/lib/esm/externalUrls.const.js +2 -1
- package/lib/esm/i18n/c4-console-i18n.js +0 -5
- package/lib/esm/i18n/en/pages/clusterdetails.json +13 -1
- package/lib/esm/i18n/en/pages/createcluster.json +1 -1
- package/lib/esm/runtime/build-cluster-swagger-url.d.ts +17 -0
- package/lib/esm/runtime/build-cluster-swagger-url.js +44 -0
- package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
- package/lib/esm/runtime/c4-console-authz.js +4 -3
- package/lib/esm/runtime/c4-console-authz.spec.js +6 -2
- package/lib/esm/runtime/to-api-domain.d.ts +25 -0
- package/lib/esm/runtime/to-api-domain.js +46 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +4 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +0 -11
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +18 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +50 -20
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +142 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +34 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +74 -1
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +3 -14
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.js +35 -26
- package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +0 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +42 -67
- package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +0 -1
- package/package.json +16 -16
|
@@ -60,6 +60,7 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
60
60
|
expect(result.orgPermissions?.org.clusters.read).toBe(true);
|
|
61
61
|
expect(result.visibilities.clusters?.canSeeClusterLoad).toBe(true);
|
|
62
62
|
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
63
|
+
expect(result.visibilities.clusters?.canSleep).toBe(false);
|
|
63
64
|
});
|
|
64
65
|
it('derives cluster mutation visibilities from org roles', () => {
|
|
65
66
|
const token = makeFakeJwt({
|
|
@@ -77,8 +78,9 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
77
78
|
expect(result.visibilities.clusters?.canEdit).toBe(true);
|
|
78
79
|
expect(result.visibilities.clusters?.canUpdateTag).toBe(true);
|
|
79
80
|
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
81
|
+
expect(result.visibilities.clusters?.canSleep).toBe(false);
|
|
80
82
|
});
|
|
81
|
-
it('
|
|
83
|
+
it('keeps manual suspend tied to the internal token permission', () => {
|
|
82
84
|
const token = makeFakeJwt({
|
|
83
85
|
permissions: [
|
|
84
86
|
ConsolePermissions.CLUSTERS_DELETE_CLUSTER,
|
|
@@ -97,7 +99,8 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
97
99
|
expect(result.visibilities.clusters?.canDelete).toBe(false);
|
|
98
100
|
expect(result.visibilities.clusters?.canEdit).toBe(false);
|
|
99
101
|
expect(result.visibilities.clusters?.canUpdateTag).toBe(false);
|
|
100
|
-
expect(result.visibilities.clusters?.canWake).toBe(
|
|
102
|
+
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
103
|
+
expect(result.visibilities.clusters?.canSleep).toBe(true);
|
|
101
104
|
expect(result.visibilities.clusters?.canSeeClusterLoad).toBe(true);
|
|
102
105
|
});
|
|
103
106
|
it('falls back to global token permissions when org permissions are unavailable', () => {
|
|
@@ -118,6 +121,7 @@ describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
|
118
121
|
expect(result.visibilities.clusters?.canEdit).toBe(true);
|
|
119
122
|
expect(result.visibilities.clusters?.canUpdateTag).toBe(true);
|
|
120
123
|
expect(result.visibilities.clusters?.canWake).toBe(true);
|
|
124
|
+
expect(result.visibilities.clusters?.canSleep).toBe(true);
|
|
121
125
|
});
|
|
122
126
|
it('is safe on invalid tokens', () => {
|
|
123
127
|
const result = deriveConsoleAuthzFromAccessToken({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ConsoleStage } from './c4-console-runtime.types';
|
|
2
|
+
export type ServicePrefix = 'api' | 'operate';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the stage-appropriate domain for the given service prefix, used to
|
|
5
|
+
* construct cluster REST API URLs.
|
|
6
|
+
*
|
|
7
|
+
* api prefix:
|
|
8
|
+
* - prod → api.camunda.io
|
|
9
|
+
* - int → api.ultrawombat.com
|
|
10
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
11
|
+
*
|
|
12
|
+
* operate prefix (used for Camunda 8.8.x clusters):
|
|
13
|
+
* - prod → operate.camunda.io
|
|
14
|
+
* - int → operate.ultrawombat.com
|
|
15
|
+
* - dev / devAws / local* → operate.dev.ultrawombat.com
|
|
16
|
+
*/
|
|
17
|
+
export declare function toServiceDomain(stage: ConsoleStage, prefix: ServicePrefix): string;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the stage-appropriate API domain used to construct cluster REST API URLs.
|
|
20
|
+
*
|
|
21
|
+
* - prod → api.camunda.io
|
|
22
|
+
* - int → api.ultrawombat.com
|
|
23
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
24
|
+
*/
|
|
25
|
+
export declare function toApiDomain(stage: ConsoleStage): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
* Returns the stage-appropriate domain for the given service prefix, used to
|
|
8
|
+
* construct cluster REST API URLs.
|
|
9
|
+
*
|
|
10
|
+
* api prefix:
|
|
11
|
+
* - prod → api.camunda.io
|
|
12
|
+
* - int → api.ultrawombat.com
|
|
13
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
14
|
+
*
|
|
15
|
+
* operate prefix (used for Camunda 8.8.x clusters):
|
|
16
|
+
* - prod → operate.camunda.io
|
|
17
|
+
* - int → operate.ultrawombat.com
|
|
18
|
+
* - dev / devAws / local* → operate.dev.ultrawombat.com
|
|
19
|
+
*/
|
|
20
|
+
export function toServiceDomain(stage, prefix) {
|
|
21
|
+
switch (stage) {
|
|
22
|
+
case 'prod':
|
|
23
|
+
return `${prefix}.camunda.io`;
|
|
24
|
+
case 'int':
|
|
25
|
+
return `${prefix}.ultrawombat.com`;
|
|
26
|
+
case 'dev':
|
|
27
|
+
case 'devAws':
|
|
28
|
+
case 'local':
|
|
29
|
+
case 'localaccounts':
|
|
30
|
+
case 'localconsole':
|
|
31
|
+
return `${prefix}.dev.ultrawombat.com`;
|
|
32
|
+
default:
|
|
33
|
+
// For unknown/custom stages, keep the production default.
|
|
34
|
+
return `${prefix}.camunda.io`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns the stage-appropriate API domain used to construct cluster REST API URLs.
|
|
39
|
+
*
|
|
40
|
+
* - prod → api.camunda.io
|
|
41
|
+
* - int → api.ultrawombat.com
|
|
42
|
+
* - dev / devAws / local* → api.dev.ultrawombat.com
|
|
43
|
+
*/
|
|
44
|
+
export function toApiDomain(stage) {
|
|
45
|
+
return toServiceDomain(stage, 'api');
|
|
46
|
+
}
|
|
@@ -430,11 +430,9 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
430
430
|
},
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
if (hasIdentityIntegration) {
|
|
433
|
+
if (hasIdentityIntegration && !cluster.identityBackendChecksEnabled) {
|
|
434
434
|
return {
|
|
435
|
-
kind:
|
|
436
|
-
? 'authorizationsEnabled'
|
|
437
|
-
: 'authorizationsDisabled',
|
|
435
|
+
kind: 'authorizationsDisabled',
|
|
438
436
|
onLearnMore: () => {
|
|
439
437
|
props.onNavigate?.({
|
|
440
438
|
kind: 'openUrl',
|
|
@@ -862,10 +860,11 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
862
860
|
}
|
|
863
861
|
return _jsx(_Fragment, {});
|
|
864
862
|
}
|
|
865
|
-
return (_jsx(C4ClusterDetailsOverviewTab, { cluster: cluster, clusterError: clusterError, creationParameters: creationParameters, clustersOfOrg: clustersOfOrg, clusterPlanTypeReservations: clusterPlanTypeReservations, clusterLoadLatest: clusterLoadLatest, clusterLoadPerDay: clusterLoadPerDay, clusterLoad24h: clusterLoad24h, clusterLoadLoading: clusterLoadLoading, canSeeClusterLoad: canSeeClusterLoad, canEditCluster: Boolean(authz.visibilities.clusters?.canEdit), canWakeCluster: Boolean(authz.visibilities.clusters?.canWake), canManageUsers: canManageUsers, canViewConnectorsLink: Boolean(orgPermissions?.cluster.connectors.read), hasIdentityIntegration: hasIdentityIntegration, orgId: props.orgId, clusterId: props.clusterId, jobDashboardEnabled: jobDashboardEnabled, jobDashboardDocsUrls: urls.docs.jobDashboard, upgradeDocsUrls: urls.docs.upgrade, statisticsConfig: statisticsConfig, apiConfig: apiConfig, t: t ?? ((key) => key), onReloadCluster: reloadCluster, onReloadClusterLoad: reloadClusterLoad, onNavigate: props.onNavigate, ignoreGracePeriod: ignoreGracePeriod, clusterLoadDocsUrl: urls.docs.clusterLoad }));
|
|
863
|
+
return (_jsx(C4ClusterDetailsOverviewTab, { cluster: cluster, clusterError: clusterError, creationParameters: creationParameters, clustersOfOrg: clustersOfOrg, clusterPlanTypeReservations: clusterPlanTypeReservations, clusterLoadLatest: clusterLoadLatest, clusterLoadPerDay: clusterLoadPerDay, clusterLoad24h: clusterLoad24h, clusterLoadLoading: clusterLoadLoading, canSeeClusterLoad: canSeeClusterLoad, canEditCluster: Boolean(authz.visibilities.clusters?.canEdit), canWakeCluster: Boolean(authz.visibilities.clusters?.canWake), canSleepCluster: Boolean(authz.visibilities.clusters?.canSleep), canManageUsers: canManageUsers, canViewConnectorsLink: Boolean(orgPermissions?.cluster.connectors.read), hasIdentityIntegration: hasIdentityIntegration, orgId: props.orgId, clusterId: props.clusterId, jobDashboardEnabled: jobDashboardEnabled, jobDashboardDocsUrls: urls.docs.jobDashboard, upgradeDocsUrls: urls.docs.upgrade, statisticsConfig: statisticsConfig, apiConfig: apiConfig, t: t ?? ((key) => key), onReloadCluster: reloadCluster, onReloadClusterLoad: reloadClusterLoad, onNavigate: props.onNavigate, ignoreGracePeriod: ignoreGracePeriod, clusterLoadDocsUrl: urls.docs.clusterLoad }));
|
|
866
864
|
}, [
|
|
867
865
|
apiConfig,
|
|
868
866
|
authz.visibilities.clusters?.canEdit,
|
|
867
|
+
authz.visibilities.clusters?.canSleep,
|
|
869
868
|
authz.visibilities.clusters?.canWake,
|
|
870
869
|
canManageUsers,
|
|
871
870
|
cluster,
|
|
@@ -64,17 +64,6 @@ function buildBanner(opts) {
|
|
|
64
64
|
},
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
if (banner.kind === 'authorizationsEnabled') {
|
|
68
|
-
return {
|
|
69
|
-
kind: 'info',
|
|
70
|
-
title: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsEnabled.title', 'Authorizations enabled'),
|
|
71
|
-
subtitle: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsEnabled.subtitle', 'Access to this cluster’s resources is restricted based on permissions set in the Admin component.'),
|
|
72
|
-
action: {
|
|
73
|
-
label: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsEnabled.actionLabel', 'Learn more about managing authorizations'),
|
|
74
|
-
onClick: banner.onLearnMore,
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
67
|
return {
|
|
79
68
|
kind: 'warning',
|
|
80
69
|
title: safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.title', 'Authorizations disabled'),
|
|
@@ -4,7 +4,7 @@ export type C4ClusterDetailsPageBanner = {
|
|
|
4
4
|
isAlphaGeneration: boolean;
|
|
5
5
|
onLearnMore: () => void;
|
|
6
6
|
} | {
|
|
7
|
-
kind: '
|
|
7
|
+
kind: 'authorizationsDisabled';
|
|
8
8
|
onLearnMore: () => void;
|
|
9
9
|
};
|
|
10
10
|
export type C4ClusterDetailsTab = C4TabProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleClusterClientsService, ConsoleConnectorSecretsService, } from '@camunda/ccma-api';
|
|
3
|
-
import { checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
3
|
+
import { checkVersion, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
4
4
|
import { Checkbox, Form, InlineNotification, Link, Modal, Stack, TextInput, } from '@carbon/react';
|
|
5
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import { C4ClusterClientCredentialsModal } from '../../../components/c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
@@ -465,7 +465,15 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
465
465
|
const saveAsConnectorSecretLabel = safeTranslate(t, 'clusterclients:create.connectorSecret.buttonText', 'Save as connector secret');
|
|
466
466
|
const saveConnectorSecret = async () => {
|
|
467
467
|
trackEvent('apiClients:createConnectorSecret', 'Save credentials as connector secret', { clientId });
|
|
468
|
-
const
|
|
468
|
+
const SECRET_NAME_MAX_LENGTH = 50;
|
|
469
|
+
const prefix = 'CLUSTER_CLIENT_';
|
|
470
|
+
const suffix = '_SECRET';
|
|
471
|
+
const maxMiddleLength = SECRET_NAME_MAX_LENGTH - prefix.length - suffix.length;
|
|
472
|
+
const nameOrId = clientCreatedName || clientId;
|
|
473
|
+
const middle = nameOrId.length > maxMiddleLength
|
|
474
|
+
? nameOrId.slice(0, maxMiddleLength)
|
|
475
|
+
: nameOrId;
|
|
476
|
+
const secretName = `${prefix}${middle}${suffix}`;
|
|
469
477
|
const secretValue = clientSecret;
|
|
470
478
|
try {
|
|
471
479
|
const existing = await ConsoleConnectorSecretsService.getAll({
|
|
@@ -487,6 +495,14 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
487
495
|
body: { secretName, secretValue },
|
|
488
496
|
});
|
|
489
497
|
}
|
|
498
|
+
window.dispatchEvent(new CustomEvent('clusterchange', {
|
|
499
|
+
detail: {
|
|
500
|
+
org: orgId,
|
|
501
|
+
entity: SseEntity.CONNECTOR_SECRETS,
|
|
502
|
+
type: exists ? 'updated' : 'created',
|
|
503
|
+
clusterId,
|
|
504
|
+
},
|
|
505
|
+
}));
|
|
490
506
|
trackEvent('apiClients:createConnectorSecret:success', 'Saved credentials as connector secret', { clientId, secretName });
|
|
491
507
|
}
|
|
492
508
|
catch (error) {
|
|
@@ -29,6 +29,7 @@ interface C4ClusterDetailsOverviewTabProps {
|
|
|
29
29
|
canSeeClusterLoad: boolean;
|
|
30
30
|
canEditCluster: boolean;
|
|
31
31
|
canWakeCluster: boolean;
|
|
32
|
+
canSleepCluster: boolean;
|
|
32
33
|
canManageUsers: boolean;
|
|
33
34
|
/** Legacy/backport visibility: orgPermissions.cluster.connectors.read */
|
|
34
35
|
canViewConnectorsLink: boolean;
|
|
@@ -10,9 +10,11 @@ import { ClusterPlanTypeAvailabilityClass, ClusterPlanTypeCategory, checkVersion
|
|
|
10
10
|
import { Checkbox, InlineNotification, Link, Modal, RadioButton, RadioButtonGroup, Stack, Tag, } from '@carbon/react';
|
|
11
11
|
import { Api_1, ApiKey, CheckmarkFilled, Renew, Security, UserAccessLocked, } from '@carbon/react/icons/index.esm.js';
|
|
12
12
|
import { Fragment, useCallback, useEffect, useMemo, useState, } from 'react';
|
|
13
|
+
import { normalizeClusterStatus } from '../../../components/c4-cluster-overview/applications.js';
|
|
13
14
|
import { C4ClusterOverview } from '../../../components/c4-cluster-overview/c4-cluster-overview.js';
|
|
14
15
|
import { C4Divider } from '../../../components/c4-divider/c4-divider.js';
|
|
15
16
|
import { C4MultiStepUglyModal } from '../../../components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js';
|
|
17
|
+
import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
|
|
16
18
|
import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
|
|
17
19
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
18
20
|
// Helper function to ensure translations work
|
|
@@ -44,7 +46,7 @@ function isUuidLike(value) {
|
|
|
44
46
|
export const C4ClusterDetailsOverviewTab = (props) => {
|
|
45
47
|
const c3Profile = useC3Profile();
|
|
46
48
|
const runtime = useC4ConsoleRuntime();
|
|
47
|
-
const { cluster, clusterError, creationParameters, clustersOfOrg, clusterPlanTypeReservations, clusterLoadLatest, clusterLoadPerDay, clusterLoad24h, clusterLoadLoading, canSeeClusterLoad, canEditCluster, canWakeCluster, canManageUsers, canViewConnectorsLink, hasIdentityIntegration, orgId, clusterId, jobDashboardEnabled, jobDashboardDocsUrls, upgradeDocsUrls, statisticsConfig, apiConfig, t, onReloadCluster, onReloadClusterLoad, onNavigate, ignoreGracePeriod, clusterLoadDocsUrl, } = props;
|
|
49
|
+
const { cluster, clusterError, creationParameters, clustersOfOrg, clusterPlanTypeReservations, clusterLoadLatest, clusterLoadPerDay, clusterLoad24h, clusterLoadLoading, canSeeClusterLoad, canEditCluster, canWakeCluster, canSleepCluster, canManageUsers, canViewConnectorsLink, hasIdentityIntegration, orgId, clusterId, jobDashboardEnabled, jobDashboardDocsUrls, upgradeDocsUrls, statisticsConfig, apiConfig, t, onReloadCluster, onReloadClusterLoad, onNavigate, ignoreGracePeriod, clusterLoadDocsUrl, } = props;
|
|
48
50
|
const data = useC4ConsoleData();
|
|
49
51
|
const [tagModalOpen, setTagModalOpen] = useState(false);
|
|
50
52
|
const [selectedTag, setSelectedTag] = useState('');
|
|
@@ -937,24 +939,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
937
939
|
return extractVersionFromPossiblyDockerImage(version);
|
|
938
940
|
};
|
|
939
941
|
const toAppTileProps = (app) => {
|
|
940
|
-
const normalizedStatus = (
|
|
941
|
-
if (!app.status)
|
|
942
|
-
return 'unhealthy';
|
|
943
|
-
const lower = app.status.toLowerCase();
|
|
944
|
-
if (lower === 'healthy')
|
|
945
|
-
return 'healthy';
|
|
946
|
-
if (lower === 'unhealthy')
|
|
947
|
-
return 'unhealthy';
|
|
948
|
-
if (lower === 'creating')
|
|
949
|
-
return 'creating';
|
|
950
|
-
if (lower === 'updating')
|
|
951
|
-
return 'updating';
|
|
952
|
-
if (lower === 'suspended')
|
|
953
|
-
return 'suspended';
|
|
954
|
-
if (lower === 'resuming')
|
|
955
|
-
return 'resuming';
|
|
956
|
-
return 'unhealthy';
|
|
957
|
-
})();
|
|
942
|
+
const normalizedStatus = normalizeClusterStatus(app.status) ?? 'unhealthy';
|
|
958
943
|
return {
|
|
959
944
|
name: app.name,
|
|
960
945
|
status: normalizedStatus,
|
|
@@ -966,6 +951,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
966
951
|
};
|
|
967
952
|
};
|
|
968
953
|
const statusValue = cluster.status?.ready ?? '';
|
|
954
|
+
const normalizedReadyStatus = normalizeClusterStatus(statusValue);
|
|
969
955
|
const generationName = cluster.generation?.name ?? '-';
|
|
970
956
|
const clusterUpdateType = (() => {
|
|
971
957
|
const zeebeStatus = cluster.status?.zeebeStatus;
|
|
@@ -1043,6 +1029,13 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1043
1029
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
1044
1030
|
});
|
|
1045
1031
|
const identityName = isAdminVersion ? 'Admin' : 'Identity';
|
|
1032
|
+
const supportsSwagger = checkVersion({
|
|
1033
|
+
possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
|
|
1034
|
+
trueForSnapshot: true,
|
|
1035
|
+
trueOnInvalidVersion: false,
|
|
1036
|
+
versionToCompareTo: '8.8.0-alpha8',
|
|
1037
|
+
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
1038
|
+
});
|
|
1046
1039
|
const apps = {
|
|
1047
1040
|
zeebe: toAppTileProps({
|
|
1048
1041
|
name: 'Zeebe',
|
|
@@ -1276,6 +1269,19 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1276
1269
|
status: {
|
|
1277
1270
|
label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.status.label', 'Status'),
|
|
1278
1271
|
value: statusValue,
|
|
1272
|
+
infoTooltip: normalizedReadyStatus === 'waitingForInput'
|
|
1273
|
+
? safeTranslate(t, 'clusterdetails:overview.clusterDetails.status.waitingForInputTooltip', 'Waiting for external encryption to be configured')
|
|
1274
|
+
: undefined,
|
|
1275
|
+
onInfoClick: normalizedReadyStatus === 'waitingForInput'
|
|
1276
|
+
? () => {
|
|
1277
|
+
props.onNavigate?.({
|
|
1278
|
+
kind: 'tabChange',
|
|
1279
|
+
orgId,
|
|
1280
|
+
clusterId,
|
|
1281
|
+
tabId: 'encryption',
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
: undefined,
|
|
1279
1285
|
wakeAction: async () => {
|
|
1280
1286
|
const { ConsoleClusterService } = await import('@camunda/ccma-api');
|
|
1281
1287
|
await ConsoleClusterService.wakeCluster({
|
|
@@ -1286,7 +1292,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1286
1292
|
},
|
|
1287
1293
|
wakeLabel: safeTranslate(t, 'clusterdetails:overview.clusterDetails.status.wakeLabel', 'Resume cluster'),
|
|
1288
1294
|
wakeVisibility: canWakeCluster,
|
|
1289
|
-
sleepAction:
|
|
1295
|
+
sleepAction: canSleepCluster
|
|
1290
1296
|
? async () => {
|
|
1291
1297
|
const { ConsoleClusterService } = await import('@camunda/ccma-api');
|
|
1292
1298
|
await ConsoleClusterService.suspendCluster({
|
|
@@ -1307,6 +1313,30 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1307
1313
|
label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.createdAt', 'Created at'),
|
|
1308
1314
|
value: formatDate(cluster.created),
|
|
1309
1315
|
},
|
|
1316
|
+
...(() => {
|
|
1317
|
+
if (!supportsSwagger)
|
|
1318
|
+
return {};
|
|
1319
|
+
const url = buildClusterSwaggerUrl({
|
|
1320
|
+
cluster,
|
|
1321
|
+
clusterId,
|
|
1322
|
+
stage: runtime.stage,
|
|
1323
|
+
});
|
|
1324
|
+
if (!url)
|
|
1325
|
+
return {};
|
|
1326
|
+
const isClusterPaused = normalizedReadyStatus === 'suspended';
|
|
1327
|
+
return {
|
|
1328
|
+
swaggerUrl: {
|
|
1329
|
+
label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.swaggerUrl', 'Swagger UI'),
|
|
1330
|
+
linkLabel: safeTranslate(t, 'clusterdetails:overview.clusterDetails.openSwaggerUi', 'Open Swagger UI'),
|
|
1331
|
+
url,
|
|
1332
|
+
...(isClusterPaused
|
|
1333
|
+
? {
|
|
1334
|
+
pausedWarning: safeTranslate(t, 'clusterdetails:overview.clusterDetails.swaggerUiPausedWarning', 'Not accessible while the cluster is paused'),
|
|
1335
|
+
}
|
|
1336
|
+
: {}),
|
|
1337
|
+
},
|
|
1338
|
+
};
|
|
1339
|
+
})(),
|
|
1310
1340
|
};
|
|
1311
1341
|
return (_jsxs(Stack, { gap: 6, children: [_jsx(C4MultiStepUglyModal, { open: upgradeModalOpen, onClose: () => setUpgradeModalOpen(false), steps: upgradeSteps }, upgradeModalOpen ? 'upgrade-open' : 'upgrade-closed'), _jsx(Modal, { open: hardwareModalOpen, modalHeading: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.heading', 'Adjust cluster size'), primaryButtonText: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.primary', 'Confirm'), secondaryButtonText: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.secondary', 'Cancel'), primaryButtonDisabled: hardwareBusy ||
|
|
1312
1342
|
!canModifyHardwarePackages ||
|
|
@@ -116,6 +116,7 @@ const defaultProps = {
|
|
|
116
116
|
canSeeClusterLoad: false,
|
|
117
117
|
canEditCluster: false,
|
|
118
118
|
canWakeCluster: false,
|
|
119
|
+
canSleepCluster: false,
|
|
119
120
|
canManageUsers: false,
|
|
120
121
|
canViewConnectorsLink: true,
|
|
121
122
|
hasIdentityIntegration: false,
|
|
@@ -175,6 +176,16 @@ describe('C4ClusterDetailsOverviewTab job statistics fetching', () => {
|
|
|
175
176
|
expect(SaaSJobsService.getJobStatisticsGlobal).toHaveBeenCalledTimes(1);
|
|
176
177
|
});
|
|
177
178
|
});
|
|
179
|
+
it('allows waking suspended clusters without exposing manual suspend', async () => {
|
|
180
|
+
renderTab({
|
|
181
|
+
cluster: buildCluster('Suspended'),
|
|
182
|
+
canWakeCluster: true,
|
|
183
|
+
canSleepCluster: false,
|
|
184
|
+
});
|
|
185
|
+
await screen.findByTestId('cluster-overview');
|
|
186
|
+
expect(lastOverviewProps?.details.status?.wakeVisibility).toBe(true);
|
|
187
|
+
expect(lastOverviewProps?.details.status?.sleepAction).toBeUndefined();
|
|
188
|
+
});
|
|
178
189
|
it('does not re-fetch when the cluster prop receives a new object reference with the same status.ready', async () => {
|
|
179
190
|
const { rerender } = renderTab({ cluster: buildCluster('Healthy') });
|
|
180
191
|
await waitFor(() => {
|
|
@@ -196,6 +207,24 @@ describe('C4ClusterDetailsOverviewTab job statistics fetching', () => {
|
|
|
196
207
|
expect(SaaSJobsService.getJobStatisticsGlobal).toHaveBeenCalledTimes(1);
|
|
197
208
|
}, { timeout: 200 });
|
|
198
209
|
});
|
|
210
|
+
it('wires waiting for input status info to the encryption tab', async () => {
|
|
211
|
+
const onNavigate = vi.fn();
|
|
212
|
+
renderTab({
|
|
213
|
+
cluster: buildCluster('WaitingForInput'),
|
|
214
|
+
onNavigate,
|
|
215
|
+
});
|
|
216
|
+
await screen.findByTestId('cluster-overview');
|
|
217
|
+
expect(lastOverviewProps?.details.status?.infoTooltip).toBe('Waiting for external encryption to be configured');
|
|
218
|
+
act(() => {
|
|
219
|
+
lastOverviewProps?.details.status?.onInfoClick?.();
|
|
220
|
+
});
|
|
221
|
+
expect(onNavigate).toHaveBeenCalledWith({
|
|
222
|
+
kind: 'tabChange',
|
|
223
|
+
orgId: 'org-1',
|
|
224
|
+
clusterId: 'cluster-1',
|
|
225
|
+
tabId: 'encryption',
|
|
226
|
+
});
|
|
227
|
+
});
|
|
199
228
|
it('re-fetches when the cluster transitions from unhealthy to healthy', async () => {
|
|
200
229
|
const { rerender } = renderTab({ cluster: buildCluster('Creating') });
|
|
201
230
|
// Wait for the component to render; the API should not be called for a non-healthy cluster
|
|
@@ -586,3 +615,116 @@ describe('C4ClusterDetailsOverviewTab hardware packages', () => {
|
|
|
586
615
|
expect(document.getElementById('allocatedHardwarePackages-4')).toHaveAttribute('disabled');
|
|
587
616
|
});
|
|
588
617
|
});
|
|
618
|
+
describe('C4ClusterDetailsOverviewTab swagger URL', () => {
|
|
619
|
+
beforeEach(() => {
|
|
620
|
+
lastOverviewProps = undefined;
|
|
621
|
+
vi.mocked(SaaSJobsService.getJobStatisticsGlobal).mockResolvedValue(undefined);
|
|
622
|
+
});
|
|
623
|
+
afterEach(() => {
|
|
624
|
+
cleanup();
|
|
625
|
+
});
|
|
626
|
+
it('populates swaggerUrl with api.* URL for 8.9+ clusters', async () => {
|
|
627
|
+
renderTab({
|
|
628
|
+
cluster: {
|
|
629
|
+
...buildCluster('Healthy'),
|
|
630
|
+
status: {
|
|
631
|
+
...buildCluster('Healthy').status,
|
|
632
|
+
operateUrl: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1',
|
|
633
|
+
},
|
|
634
|
+
externalMetadata: { swagger: true },
|
|
635
|
+
},
|
|
636
|
+
});
|
|
637
|
+
await screen.findByTestId('cluster-overview');
|
|
638
|
+
// default zeebeVersion is 8.9.0 → api.dev.ultrawombat.com; path /swagger
|
|
639
|
+
expect(lastOverviewProps?.details?.swaggerUrl).toEqual({
|
|
640
|
+
label: 'Swagger UI',
|
|
641
|
+
linkLabel: 'Open Swagger UI',
|
|
642
|
+
url: 'https://lpp-1.api.dev.ultrawombat.com/cluster-1/swagger',
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
it('populates swaggerUrl with operate.* URL for 8.8.x clusters', async () => {
|
|
646
|
+
renderTab({
|
|
647
|
+
cluster: {
|
|
648
|
+
...buildCluster('Healthy', { zeebeVersion: 'zeebe:8.8.0-alpha8' }),
|
|
649
|
+
status: {
|
|
650
|
+
...buildCluster('Healthy').status,
|
|
651
|
+
operateUrl: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1',
|
|
652
|
+
},
|
|
653
|
+
externalMetadata: { swagger: true },
|
|
654
|
+
},
|
|
655
|
+
});
|
|
656
|
+
await screen.findByTestId('cluster-overview');
|
|
657
|
+
// 8.8.0-alpha8 < 8.9.0 → operate.dev.ultrawombat.com; path /swagger-ui/index.html
|
|
658
|
+
expect(lastOverviewProps?.details?.swaggerUrl).toEqual({
|
|
659
|
+
label: 'Swagger UI',
|
|
660
|
+
linkLabel: 'Open Swagger UI',
|
|
661
|
+
url: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1/swagger-ui/index.html',
|
|
662
|
+
});
|
|
663
|
+
});
|
|
664
|
+
it('omits swaggerUrl when swagger is disabled in externalMetadata', async () => {
|
|
665
|
+
renderTab({
|
|
666
|
+
cluster: {
|
|
667
|
+
...buildCluster('Healthy'),
|
|
668
|
+
status: {
|
|
669
|
+
...buildCluster('Healthy').status,
|
|
670
|
+
operateUrl: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1',
|
|
671
|
+
},
|
|
672
|
+
externalMetadata: { swagger: false },
|
|
673
|
+
},
|
|
674
|
+
});
|
|
675
|
+
await screen.findByTestId('cluster-overview');
|
|
676
|
+
expect(lastOverviewProps?.details?.swaggerUrl).toBeUndefined();
|
|
677
|
+
});
|
|
678
|
+
it('omits swaggerUrl when cluster version is below 8.8.0-alpha8', async () => {
|
|
679
|
+
renderTab({
|
|
680
|
+
cluster: {
|
|
681
|
+
...buildCluster('Healthy', { zeebeVersion: 'zeebe:8.7.0' }),
|
|
682
|
+
status: {
|
|
683
|
+
...buildCluster('Healthy').status,
|
|
684
|
+
operateUrl: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1',
|
|
685
|
+
},
|
|
686
|
+
externalMetadata: { swagger: true },
|
|
687
|
+
},
|
|
688
|
+
});
|
|
689
|
+
await screen.findByTestId('cluster-overview');
|
|
690
|
+
expect(lastOverviewProps?.details?.swaggerUrl).toBeUndefined();
|
|
691
|
+
});
|
|
692
|
+
it('omits swaggerUrl when operateUrl is absent', async () => {
|
|
693
|
+
renderTab({
|
|
694
|
+
cluster: {
|
|
695
|
+
...buildCluster('Healthy'),
|
|
696
|
+
externalMetadata: { swagger: true },
|
|
697
|
+
},
|
|
698
|
+
});
|
|
699
|
+
await screen.findByTestId('cluster-overview');
|
|
700
|
+
expect(lastOverviewProps?.details?.swaggerUrl).toBeUndefined();
|
|
701
|
+
});
|
|
702
|
+
it('includes pausedWarning in swaggerUrl when cluster is suspended', async () => {
|
|
703
|
+
renderTab({
|
|
704
|
+
cluster: {
|
|
705
|
+
...buildCluster('Suspended'),
|
|
706
|
+
status: {
|
|
707
|
+
...buildCluster('Suspended').status,
|
|
708
|
+
operateUrl: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1',
|
|
709
|
+
},
|
|
710
|
+
externalMetadata: { swagger: true },
|
|
711
|
+
},
|
|
712
|
+
});
|
|
713
|
+
await screen.findByTestId('cluster-overview');
|
|
714
|
+
expect(lastOverviewProps?.details?.swaggerUrl?.pausedWarning).toBe('Not accessible while the cluster is paused');
|
|
715
|
+
});
|
|
716
|
+
it('does not include pausedWarning when cluster is healthy', async () => {
|
|
717
|
+
renderTab({
|
|
718
|
+
cluster: {
|
|
719
|
+
...buildCluster('Healthy'),
|
|
720
|
+
status: {
|
|
721
|
+
...buildCluster('Healthy').status,
|
|
722
|
+
operateUrl: 'https://lpp-1.operate.dev.ultrawombat.com/cluster-1',
|
|
723
|
+
},
|
|
724
|
+
externalMetadata: { swagger: true },
|
|
725
|
+
},
|
|
726
|
+
});
|
|
727
|
+
await screen.findByTestId('cluster-overview');
|
|
728
|
+
expect(lastOverviewProps?.details?.swaggerUrl?.pausedWarning).toBeUndefined();
|
|
729
|
+
});
|
|
730
|
+
});
|
|
@@ -4,6 +4,7 @@ import { checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types'
|
|
|
4
4
|
import { InlineNotification, Link, Modal } from '@carbon/react';
|
|
5
5
|
import { Fragment, useCallback, useMemo, useState, } from 'react';
|
|
6
6
|
import { C4ClusterSettings } from '../../../components/c4-cluster-settings/c4-cluster-settings.js';
|
|
7
|
+
import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
|
|
7
8
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
8
9
|
// Helper to translate with fallback
|
|
9
10
|
function safeTranslate(translateFn, key, fallback, options) {
|
|
@@ -44,6 +45,8 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
44
45
|
const [isUpdatingMcp, setIsUpdatingMcp] = useState(false);
|
|
45
46
|
const [isUpdatingBusinessIdUniqueness, setIsUpdatingBusinessIdUniqueness] = useState(false);
|
|
46
47
|
const [isUpdatingTasklistV2, setIsUpdatingTasklistV2] = useState(false);
|
|
48
|
+
const [showTasklistV2ConfirmModal, setShowTasklistV2ConfirmModal] = useState(false);
|
|
49
|
+
const [tasklistV2UpgradeError, setTasklistV2UpgradeError] = useState(undefined);
|
|
47
50
|
const [isUpdatingRba, setIsUpdatingRba] = useState(false);
|
|
48
51
|
const [isUpdatingIdentityAuthorizations, setIsUpdatingIdentityAuthorizations,] = useState(false);
|
|
49
52
|
const [rbaError, setRbaError] = useState(false);
|
|
@@ -296,6 +299,18 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
296
299
|
setIsUpdatingTasklistV2(false);
|
|
297
300
|
}
|
|
298
301
|
}, [props, runtime.telemetry]);
|
|
302
|
+
const submitTasklistV2Upgrade = useCallback(async () => {
|
|
303
|
+
setTasklistV2UpgradeError(undefined);
|
|
304
|
+
try {
|
|
305
|
+
await toggleTasklistV2();
|
|
306
|
+
setShowTasklistV2ConfirmModal(false);
|
|
307
|
+
}
|
|
308
|
+
catch (error) {
|
|
309
|
+
setTasklistV2UpgradeError(error instanceof Error
|
|
310
|
+
? error.message
|
|
311
|
+
: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.error', "We're having trouble upgrading to Tasklist v2. Please try again later."));
|
|
312
|
+
}
|
|
313
|
+
}, [toggleTasklistV2, props.t]);
|
|
299
314
|
const updateResourceBasedAuthorizations = useCallback(async (nextState) => {
|
|
300
315
|
runtime.telemetry?.track?.(`resourceBasedAuthorizations:${nextState}:confirm`, {
|
|
301
316
|
message: `Confirm ${nextState} resource-based authorizations`,
|
|
@@ -551,7 +566,16 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
551
566
|
...(isSwaggerToggleVisible && {
|
|
552
567
|
swaggerToggle: {
|
|
553
568
|
enabled: props.cluster.externalMetadata?.swagger ?? true,
|
|
554
|
-
description: (_jsxs(_Fragment, { children: [safeTranslate(props.t, 'clusterdetails:settings.swagger.description', 'The Orchestration Cluster REST API is documented using the'), ' ', _jsx(Link, { href: 'https://github.com/camunda/camunda/blob/main/zeebe/gateway-protocol/src/main/proto/rest-api.yaml', target: '_blank', children: safeTranslate(props.t, 'clusterdetails:settings.swagger.spec', 'OpenAPI specification') }), safeTranslate(props.t, 'clusterdetails:settings.swagger.description2', '. When enabled, it is accessible via Swagger UI.'), _jsx("br", {}), _jsx("br", {}),
|
|
569
|
+
description: (_jsxs(_Fragment, { children: [safeTranslate(props.t, 'clusterdetails:settings.swagger.description', 'The Orchestration Cluster REST API is documented using the'), ' ', _jsx(Link, { href: 'https://github.com/camunda/camunda/blob/main/zeebe/gateway-protocol/src/main/proto/rest-api.yaml', target: '_blank', children: safeTranslate(props.t, 'clusterdetails:settings.swagger.spec', 'OpenAPI specification') }), safeTranslate(props.t, 'clusterdetails:settings.swagger.description2', '. When enabled, it is accessible via Swagger UI.'), _jsx("br", {}), _jsx("br", {}), (() => {
|
|
570
|
+
const swaggerUrl = buildClusterSwaggerUrl({
|
|
571
|
+
cluster: props.cluster,
|
|
572
|
+
clusterId: props.clusterId,
|
|
573
|
+
stage: runtime.stage,
|
|
574
|
+
});
|
|
575
|
+
if (!swaggerUrl)
|
|
576
|
+
return null;
|
|
577
|
+
return (_jsxs(_Fragment, { children: [safeTranslate(props.t, 'clusterdetails:settings.swagger.accessSwagger', 'Access your cluster Swagger UI:'), ' ', _jsx(Link, { href: swaggerUrl, target: '_blank', rel: 'noopener noreferrer', children: swaggerUrl }), _jsx("br", {}), _jsx("br", {})] }));
|
|
578
|
+
})(), safeTranslate(props.t, 'clusterdetails:settings.swagger.description3', 'Learn more about'), ' ', _jsx(Link, { href: props.docsUrls.swagger, target: '_blank', children: safeTranslate(props.t, 'clusterdetails:settings.swagger.description4', 'accessing API endpoints via Swagger UI.') })] })),
|
|
555
579
|
permissions: {
|
|
556
580
|
mayChange: props.canEditCluster,
|
|
557
581
|
},
|
|
@@ -601,7 +625,7 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
601
625
|
},
|
|
602
626
|
action: {
|
|
603
627
|
label: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.action.label', 'Upgrade to Tasklist v2'),
|
|
604
|
-
onClick:
|
|
628
|
+
onClick: () => setShowTasklistV2ConfirmModal(true),
|
|
605
629
|
disabled: !props.canEditCluster ||
|
|
606
630
|
isUpdatingTasklistV2 ||
|
|
607
631
|
(props.cluster.externalMetadata?.tasklistV2Enabled ??
|
|
@@ -621,7 +645,14 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
621
645
|
permissions: {
|
|
622
646
|
mayDeleteCluster: props.canDeleteCluster,
|
|
623
647
|
},
|
|
624
|
-
} }),
|
|
648
|
+
} }), showTasklistV2ConfirmModal && (_jsxs(Modal, { open: true, modalHeading: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.heading', 'Upgrade to Tasklist v2'), primaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.confirm', 'Upgrade to Tasklist v2'), secondaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.cancel', 'Cancel'), primaryButtonDisabled: isUpdatingTasklistV2, onRequestClose: () => {
|
|
649
|
+
if (isUpdatingTasklistV2)
|
|
650
|
+
return;
|
|
651
|
+
setShowTasklistV2ConfirmModal(false);
|
|
652
|
+
setTasklistV2UpgradeError(undefined);
|
|
653
|
+
}, onRequestSubmit: () => {
|
|
654
|
+
void submitTasklistV2Upgrade();
|
|
655
|
+
}, size: 'sm', children: [_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.description', 'This action cannot be undone. Once upgraded to Tasklist v2, downgrading back to v1 will not be possible.') }), tasklistV2UpgradeError && (_jsx(InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: tasklistV2UpgradeError }))] })), authorizationsConfirm && (_jsxs(Modal, { open: true, modalHeading: authorizationsConfirmTitle, primaryButtonText: authorizationsConfirmPrimaryText, secondaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.authorizations.modal.buttons.cancel', 'Cancel'), primaryButtonDisabled: isUpdatingRba || isUpdatingIdentityAuthorizations, onRequestClose: () => {
|
|
625
656
|
if (isUpdatingRba || isUpdatingIdentityAuthorizations) {
|
|
626
657
|
return;
|
|
627
658
|
}
|