@camunda/ccma-saas-frontend 0.35.15 → 0.36.0
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-clusters-empty-state/c4-clusters-empty-state.d.ts +4 -4
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +12 -23
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +4 -1
- package/lib/esm/i18n/en/pages/clusters.json +2 -3
- package/lib/esm/runtime/c4-console-data-store.js +1 -1
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
- package/lib/esm/runtime/c4-console-runtime-context.js +4 -4
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +1 -1
- package/lib/esm/ui/index.d.ts +1 -1
- package/lib/esm/ui/index.js +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +4 -8
- package/lib/esm/widgets/management/c4-management-app.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4ClustersEmptyStateProps } from './c4-clusters-empty-state.types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Every variant keeps the centered default of
|
|
5
|
-
* `align`. A host page puts this empty state in a wide content pane of its
|
|
6
|
-
* thus a left-aligned block looks unfinished beside the centered empty
|
|
7
|
-
* of the other pages (#10119). Design owns this decision: do not add
|
|
4
|
+
* Every variant keeps the centered default of the DS empty state, and passes
|
|
5
|
+
* no `align`. A host page puts this empty state in a wide content pane of its
|
|
6
|
+
* own, thus a left-aligned block looks unfinished beside the centered empty
|
|
7
|
+
* states of the other pages (#10119). Design owns this decision: do not add
|
|
8
8
|
* `align='start'` again without design.
|
|
9
9
|
*/
|
|
10
10
|
export declare const C4ClustersEmptyState: (props: C4ClustersEmptyStateProps) => JSX.Element;
|
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import { Boxes } from 'lucide-react';
|
|
2
8
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
9
|
+
import { DsButton, DsEmptyState } from '../../ui/index.js';
|
|
3
10
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
4
11
|
/**
|
|
5
|
-
* Every variant keeps the centered default of
|
|
6
|
-
* `align`. A host page puts this empty state in a wide content pane of its
|
|
7
|
-
* thus a left-aligned block looks unfinished beside the centered empty
|
|
8
|
-
* of the other pages (#10119). Design owns this decision: do not add
|
|
12
|
+
* Every variant keeps the centered default of the DS empty state, and passes
|
|
13
|
+
* no `align`. A host page puts this empty state in a wide content pane of its
|
|
14
|
+
* own, thus a left-aligned block looks unfinished beside the centered empty
|
|
15
|
+
* states of the other pages (#10119). Design owns this decision: do not add
|
|
9
16
|
* `align='start'` again without design.
|
|
10
17
|
*/
|
|
11
18
|
export const C4ClustersEmptyState = (props) => {
|
|
12
19
|
const { variant, texts, onCreateCluster, createClusterButtonDisabled, docsHref, onDocsClick, onUpgrade, onExtendTrial, } = props;
|
|
13
20
|
if (variant === 'noClusters') {
|
|
14
|
-
|
|
15
|
-
? {
|
|
16
|
-
onClick: onCreateCluster,
|
|
17
|
-
disabled: createClusterButtonDisabled ?? false,
|
|
18
|
-
label: texts.noClusters.createButtonLabel,
|
|
19
|
-
id: 'createClusterCTA',
|
|
20
|
-
}
|
|
21
|
-
: undefined;
|
|
22
|
-
const link = docsHref
|
|
23
|
-
? {
|
|
24
|
-
href: docsHref,
|
|
25
|
-
label: texts.noClusters.docsLinkLabel,
|
|
26
|
-
onClick: onDocsClick,
|
|
27
|
-
}
|
|
28
|
-
: undefined;
|
|
29
|
-
return (_jsx(C4EmptyState, { icon: {
|
|
30
|
-
path: C4_ASSET_URLS.clusterIcon,
|
|
31
|
-
altText: 'clusterIcon',
|
|
32
|
-
}, heading: texts.noClusters.heading, description: texts.noClusters.description, button: button, link: link }));
|
|
21
|
+
return (_jsx(DsEmptyState, { icon: _jsx(Boxes, { "aria-hidden": 'true' }), heading: texts.noClusters.heading, action: onCreateCluster ? (_jsx(DsButton, { id: 'createClusterCTA', onClick: onCreateCluster, disabled: createClusterButtonDisabled ?? false, children: texts.noClusters.createButtonLabel })) : undefined, secondaryAction: docsHref ? (_jsx(DsButton, { variant: 'link', asChild: true, children: _jsx("a", { href: docsHref, onClick: onDocsClick, children: texts.noClusters.docsLinkLabel }) })) : undefined }));
|
|
33
22
|
}
|
|
34
23
|
if (variant === 'trialExpiredAdmin') {
|
|
35
24
|
const upgradeButton = {
|
|
@@ -3,7 +3,10 @@ export type C4ClustersEmptyStateVariant = 'noClusters' | 'trialExpiredAdmin' | '
|
|
|
3
3
|
export interface C4ClustersEmptyStateTexts {
|
|
4
4
|
noClusters: {
|
|
5
5
|
heading: string;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Not shown. The heading alone tells the user what to do.
|
|
8
|
+
*/
|
|
9
|
+
description?: string | ReactElement;
|
|
7
10
|
createButtonLabel: string;
|
|
8
11
|
docsLinkLabel: string;
|
|
9
12
|
};
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"clusterCapMessage": "We are overwhelmed by the success of Camunda. For this reason, we are currently unable to provision any additional clusters. You can try later, but we will reach out to you as soon as we have free capacity again.",
|
|
16
16
|
"noClustersMessage": {
|
|
17
|
-
"title": "
|
|
18
|
-
"
|
|
19
|
-
"docText": "View The Getting Started Guide"
|
|
17
|
+
"title": "Set up a cluster to get a deployment environment",
|
|
18
|
+
"docText": "View the guide"
|
|
20
19
|
},
|
|
21
20
|
"trialExpired": {
|
|
22
21
|
"title": "Upgrade to use Clusters, Clusters are not available with your current plan.",
|
|
@@ -815,7 +815,7 @@ export const ConsoleDataStore = types
|
|
|
815
815
|
// Fetch capacity for all clusters in a single batched request.
|
|
816
816
|
// The HDP `latest` operation accepts the full `clusterIds` array and
|
|
817
817
|
// returns one data point per cluster, each tagged with its `clusterId`
|
|
818
|
-
// (see accounts-
|
|
818
|
+
// (see accounts-ng getLatestCapacity). This replaces the previous
|
|
819
819
|
// per-cluster serial loop, which issued one HTTP round-trip per cluster.
|
|
820
820
|
const latest = yield HdpService.getClusterCapacity({
|
|
821
821
|
params: {
|
|
@@ -28,7 +28,7 @@ export declare const useC4ConsoleStage: () => ConsoleStage | undefined;
|
|
|
28
28
|
* The value comes from one of two places. A host that gives
|
|
29
29
|
* `config.featureFlags` answers it itself. Every other host gets the flags
|
|
30
30
|
* that `C4ConsoleRuntimeProvider` reads from control-backend, or from
|
|
31
|
-
* accounts-
|
|
31
|
+
* accounts-ng when control-backend fails. That read is a request, thus a
|
|
32
32
|
* flag is off on the first render and the component renders again when the
|
|
33
33
|
* flags arrive. Do not use this hook for a one-time effect that must not run
|
|
34
34
|
* twice.
|
|
@@ -61,7 +61,7 @@ function readFlag(flags, flagKey) {
|
|
|
61
61
|
/**
|
|
62
62
|
* Reads the flags of the caller, one time per organization and user, from
|
|
63
63
|
* `GET /api/feature-flags/evaluate` of control-backend. When that request
|
|
64
|
-
* fails, it reads `GET external/feature-flags` of accounts-
|
|
64
|
+
* fails, it reads `GET external/feature-flags` of accounts-ng. When both
|
|
65
65
|
* fail, every flag reads as off.
|
|
66
66
|
*
|
|
67
67
|
* It fetches nothing when the host gives `config.featureFlags`, thus a host
|
|
@@ -131,7 +131,7 @@ function useFetchedFeatureFlags(config) {
|
|
|
131
131
|
fetched = await ControlFeatureFlagsService.evaluate(request);
|
|
132
132
|
}
|
|
133
133
|
catch (controlError) {
|
|
134
|
-
// Control-backend can be down or limited. accounts-
|
|
134
|
+
// Control-backend can be down or limited. accounts-ng holds the
|
|
135
135
|
// same rows from its own copy in Redis, and it answers with the last
|
|
136
136
|
// rows that it knows. That is better than every flag off for a host
|
|
137
137
|
// that serves customers.
|
|
@@ -163,7 +163,7 @@ function useFetchedFeatureFlags(config) {
|
|
|
163
163
|
return flags;
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* Reads the clickwrap config from accounts-
|
|
166
|
+
* Reads the clickwrap config from accounts-ng. The request runs on mount
|
|
167
167
|
* and runs again when the stage, the user id or the accounts URL changes. The
|
|
168
168
|
* hook keeps nothing between mounts.
|
|
169
169
|
*
|
|
@@ -295,7 +295,7 @@ export const useC4ConsoleStage = () => {
|
|
|
295
295
|
* The value comes from one of two places. A host that gives
|
|
296
296
|
* `config.featureFlags` answers it itself. Every other host gets the flags
|
|
297
297
|
* that `C4ConsoleRuntimeProvider` reads from control-backend, or from
|
|
298
|
-
* accounts-
|
|
298
|
+
* accounts-ng when control-backend fails. That read is a request, thus a
|
|
299
299
|
* flag is off on the first render and the component renders again when the
|
|
300
300
|
* flags arrive. Do not use this hook for a one-time effect that must not run
|
|
301
301
|
* twice.
|
|
@@ -64,7 +64,7 @@ export interface C4ConsoleRuntimeConfig {
|
|
|
64
64
|
*
|
|
65
65
|
* Omit it and `C4ConsoleRuntimeProvider` reads the flags from
|
|
66
66
|
* `GET /api/feature-flags/evaluate` on control-backend. When that request
|
|
67
|
-
* fails, it reads `GET external/feature-flags` on accounts-
|
|
67
|
+
* fails, it reads `GET external/feature-flags` on accounts-ng. Thus the
|
|
68
68
|
* deployed backend owns the values, and the host holds no copy of the
|
|
69
69
|
* rules. This is the path for an external host such as Camunda Hub.
|
|
70
70
|
*
|
package/lib/esm/ui/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare const ClusterTag: typeof C4ClusterTag;
|
|
|
8
8
|
export declare const Modal: typeof C4ModalDialog;
|
|
9
9
|
export declare const PasswordInput: typeof C4PasswordInput;
|
|
10
10
|
export declare const TextArea: typeof C4TextArea;
|
|
11
|
-
export { Badge as DsBadge, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
11
|
+
export { Badge as DsBadge, Button as DsButton, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, EmptyState as DsEmptyState, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
12
12
|
export { DsCompactCodeBlock } from './ds-compact-code-block.js';
|
package/lib/esm/ui/index.js
CHANGED
|
@@ -31,5 +31,5 @@ export const TextArea = C4TextArea;
|
|
|
31
31
|
// DS leaves with no Carbon-API adapter, for components that map a stable c4
|
|
32
32
|
// interface onto the DS. Import them from here, not from the DS package, so
|
|
33
33
|
// feature code keeps one import point for UI.
|
|
34
|
-
export { Badge as DsBadge, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
34
|
+
export { Badge as DsBadge, Button as DsButton, Card as DsCard, CodeBlock as DsCodeBlock, DefinitionTooltip, EmptyState as DsEmptyState, Heading as DsHeading, Popover as DsPopover, PopoverContent as DsPopoverContent, PopoverDescription as DsPopoverDescription, PopoverHeader as DsPopoverHeader, PopoverTitle as DsPopoverTitle, PopoverTrigger as DsPopoverTrigger, Progress as DsProgress, Text as DsText, } from '@camunda/design-system';
|
|
35
35
|
export { DsCompactCodeBlock } from './ds-compact-code-block.js';
|
|
@@ -711,10 +711,9 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
|
|
|
711
711
|
? () => setIsExtendModalOpen(true)
|
|
712
712
|
: undefined, texts: {
|
|
713
713
|
noClusters: {
|
|
714
|
-
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', '
|
|
715
|
-
description: translateCopy('c4console:clusters.emptyState.noClusters.description', 'Create a cluster to get started.'),
|
|
714
|
+
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', 'Set up a cluster to get a deployment environment'),
|
|
716
715
|
createButtonLabel: resolvedTranslations.createButton,
|
|
717
|
-
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View
|
|
716
|
+
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View the guide'),
|
|
718
717
|
},
|
|
719
718
|
trialExpired: {
|
|
720
719
|
heading: translateCopy('c4console:clusters.list.trialExpired.title', 'Your trial has expired'),
|
|
@@ -729,16 +728,13 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
|
|
|
729
728
|
return undefined;
|
|
730
729
|
}
|
|
731
730
|
const createButtonLabel = translateCopy('c4console:clusters.emptyState.noClusters.createButtonLabel', 'Create new cluster');
|
|
732
|
-
const descriptionPrefix = translateCopy('c4console:clusters.emptyState.noClusters.descriptionPrefix', 'Click ');
|
|
733
|
-
const descriptionSuffix = translateCopy('c4console:clusters.emptyState.noClusters.descriptionSuffix', ' to have a place to execute your processes');
|
|
734
731
|
return (_jsx(C4ClustersEmptyState, { variant: 'noClusters', docsHref: resolvedGettingStartedHref, onCreateCluster: derivedPermissions.canCreateCluster
|
|
735
732
|
? () => handleNavigate(urls.createCluster)
|
|
736
733
|
: undefined, createClusterButtonDisabled: derivedPermissions.createClusterButtonDisabled, texts: {
|
|
737
734
|
noClusters: {
|
|
738
|
-
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', '
|
|
739
|
-
description: (_jsxs("span", { children: [descriptionPrefix, _jsx("strong", { children: createButtonLabel }), descriptionSuffix] })),
|
|
735
|
+
heading: translateCopy('c4console:clusters.emptyState.noClusters.heading', 'Set up a cluster to get a deployment environment'),
|
|
740
736
|
createButtonLabel,
|
|
741
|
-
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View
|
|
737
|
+
docsLinkLabel: translateCopy('c4console:clusters.emptyState.noClusters.docsLinkLabel', 'View the guide'),
|
|
742
738
|
},
|
|
743
739
|
trialExpired: {
|
|
744
740
|
heading: translateCopy('c4console:clusters.list.trialExpired.title', 'Your trial has expired'),
|
|
@@ -113,7 +113,7 @@ function getNestedBoolean(record, path) {
|
|
|
113
113
|
// and a safety margin still fit in the chart palette, and every series gets its
|
|
114
114
|
// own color (see `recharts-tokens.ts`).
|
|
115
115
|
const TOP_N_CHART_CLUSTERS = 12;
|
|
116
|
-
// Widest tenant-usage window accounts-
|
|
116
|
+
// Widest tenant-usage window accounts-ng serves (it clamps `days` to 366).
|
|
117
117
|
//
|
|
118
118
|
// Both tabs ask for all of it, on purpose:
|
|
119
119
|
// - the usage tab's table reaches back to the org's first period, so anything
|