@camunda/ccma-saas-frontend 0.33.1 → 0.34.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.
@@ -1,5 +1,6 @@
1
1
  import type React from 'react';
2
2
  import { type JSX } from 'react';
3
+ import type { C4TwoPhaseUpgradeMockupProps } from '../c4-two-phase-upgrade-mockup/c4-two-phase-upgrade-mockup.types.js';
3
4
  export interface ClusterDetailsProps {
4
5
  title: string;
5
6
  copyValueLabel?: string;
@@ -44,6 +45,8 @@ export interface ClusterDetailsProps {
44
45
  label: string;
45
46
  value: string;
46
47
  update: ClusterDetailsGenerationUpdateProps;
48
+ /** twoPhaseUpgradeMockup: shown under the generation name. */
49
+ twoPhaseUpgradeMockup?: C4TwoPhaseUpgradeMockupProps;
47
50
  };
48
51
  type?: {
49
52
  label: string;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ExternalLink, Info, Pause, Play, Plus, RefreshCw, TriangleAlert, } from 'lucide-react';
3
3
  import { useEffect, useRef, useState } from 'react';
4
- import { Button, ClusterTag, DsCompactCodeBlock, Link, TextArea, Tooltip, } from '../../ui/index.js';
4
+ import { Button, ClusterTag, DsCompactCodeBlock, Link, Stack, TextArea, Tooltip, } from '../../ui/index.js';
5
5
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
6
6
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
7
7
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
8
8
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
9
+ import { C4TwoPhaseUpgradeMockup } from '../c4-two-phase-upgrade-mockup/c4-two-phase-upgrade-mockup.js';
9
10
  import { ClusterStatusElement, normalizeClusterStatus, } from './applications.js';
10
11
  import { DsSection } from './ds-section.js';
11
12
  const ClusterDetailsIdValue = (props) => {
@@ -115,12 +116,16 @@ export const ClusterDetails = (props) => {
115
116
  gridAutoFlow: 'column',
116
117
  gap: '1.5rem',
117
118
  alignItems: 'center',
118
- }, children: [normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: props.status.infoTooltip, onInfoClick: props.status.onInfoClick })) : (props.status.value), renderStatusButton()] }) })] })), _jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.generation.label }), _jsx(C4StructuredListCell, { children: _jsxs("div", { style: {
119
- display: 'grid',
120
- gridTemplateColumns: 'auto 1fr',
121
- gap: '0.5rem',
122
- alignItems: 'center',
123
- }, children: [_jsx("p", { children: props.generation.value }), props.status?.value.toLowerCase() === 'healthy' && (_jsx(ClusterDetailsGenerationUpdate, { ...props.generation.update }))] }) })] }), props.type && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.type.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("div", { style: {
119
+ }, children: [normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: props.status.infoTooltip, onInfoClick: props.status.onInfoClick })) : (props.status.value), renderStatusButton()] }) })] })), _jsxs(C4StructuredListRow, { style: props.generation.twoPhaseUpgradeMockup
120
+ ? { minHeight: 'auto' }
121
+ : rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.generation.label }), _jsx(C4StructuredListCell, { style: props.generation.twoPhaseUpgradeMockup
122
+ ? { paddingBlock: '0.75rem' }
123
+ : undefined, children: _jsxs(Stack, { orientation: 'vertical', gap: 3, children: [_jsxs("div", { style: {
124
+ display: 'grid',
125
+ gridTemplateColumns: 'auto 1fr',
126
+ gap: '0.5rem',
127
+ alignItems: 'center',
128
+ }, children: [_jsx("p", { children: props.generation.value }), props.status?.value.toLowerCase() === 'healthy' && (_jsx(ClusterDetailsGenerationUpdate, { ...props.generation.update }))] }), props.generation.twoPhaseUpgradeMockup ? (_jsx(C4TwoPhaseUpgradeMockup, { ...props.generation.twoPhaseUpgradeMockup })) : undefined] }) })] }), props.type && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.type.label }), _jsx(C4StructuredListCell, { noWrap: true, children: _jsxs("div", { style: {
124
129
  display: 'inline-grid',
125
130
  gridAutoFlow: 'column',
126
131
  gap: '1.5rem',
@@ -11,7 +11,6 @@ import { C4Divider } from '../../../components/c4-divider/c4-divider.js';
11
11
  import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
12
12
  import { C4MultiStepUglyModal } from '../../../components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js';
13
13
  import { C4OptimizeActivationModal } from '../../../components/c4-optimize-activation-modal/c4-optimize-activation-modal.js';
14
- import { C4TwoPhaseUpgradeMockup } from '../../../components/c4-two-phase-upgrade-mockup/c4-two-phase-upgrade-mockup.js';
15
14
  import { addC4ConsoleNotification } from '../../../notifications/c4-console-notifications-handle.js';
16
15
  import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
17
16
  import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
@@ -1572,6 +1571,20 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1572
1571
  label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.generation', 'Generation'),
1573
1572
  value: generationName,
1574
1573
  update: generationUpdate,
1574
+ twoPhaseUpgradeMockup: twoPhaseMockupOn && twoPhase.state
1575
+ ? {
1576
+ binaryVersionLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.binaryVersion', 'Binary version'),
1577
+ behaviorVersionLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.behaviorVersion', 'Behavior version'),
1578
+ binaryVersion: twoPhase.state.binaryVersion,
1579
+ behaviorVersion: twoPhase.state.behaviorVersion,
1580
+ state: twoPhase.state.state,
1581
+ canCommit: canEditCluster && twoPhase.state.mode === 'manual',
1582
+ commitDisabled: normalizedReadyStatus === 'updating',
1583
+ commitLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.commit', 'Commit'),
1584
+ committingLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.committing', 'Committing…'),
1585
+ onCommit: () => void twoPhase.commit(),
1586
+ }
1587
+ : undefined,
1575
1588
  },
1576
1589
  created: {
1577
1590
  label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.createdAt', 'Created at'),
@@ -1623,7 +1636,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1623
1636
  setTagModalOpen(false);
1624
1637
  }, onRequestSubmit: submitTagChange, children: _jsxs(Stack, { gap: 5, children: [tagError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate(t, 'clusterdetails:tags.modal.error', 'Error updating tag'), subtitle: tagError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate(t, 'clusterdetails:tags.modal.description', 'Assign a tag to make it easier for team members to clearly distinguish between different stages of the software development lifecycle. Tags have no impact on performance and can be changed later.') }), _jsx(C4ClusterTagSelector, { boxes: tagSelectorBoxes, isDevCluster: false, currentStage: selectedTag === '' ? undefined : selectedTag, onChange: setSelectedTag, save: {
1625
1638
  allowed: !tagBusy && canEditCluster && !restoreInProgress,
1626
- } })] }) }), twoPhaseMockupOn && twoPhase.state ? (_jsx(C4TwoPhaseUpgradeMockup, { binaryVersionLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.binaryVersion', 'Binary version'), behaviorVersionLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.behaviorVersion', 'Behavior version'), binaryVersion: twoPhase.state.binaryVersion, behaviorVersion: twoPhase.state.behaviorVersion, state: twoPhase.state.state, canCommit: canEditCluster && twoPhase.state.mode === 'manual', commitDisabled: normalizedReadyStatus === 'updating', commitLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.commit', 'Commit'), committingLabel: safeTranslate(t, 'clusterdetails:overview.twoPhaseUpgrade.committing', 'Committing…'), onCommit: () => void twoPhase.commit() })) : null, _jsx(C4ClusterOverview, { applications: {
1639
+ } })] }) }), _jsx(C4ClusterOverview, { applications: {
1627
1640
  title: safeTranslate(t, 'clusterdetails:overview.applications.title', 'Components'),
1628
1641
  variant: sectionVariant,
1629
1642
  applications: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.33.1",
3
+ "version": "0.34.0",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"