Skip to content

Commit 1570ac7

Browse files
chore(deps): update patternfly (major) (#833)
* chore(deps): update patternfly * add victory charts peer dependencies * scoped styles * feat(security): split Security into Credentials and Certificates
1 parent e868387 commit 1570ac7

12 files changed

Lines changed: 491 additions & 324 deletions

File tree

console-extensions.json

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,16 @@
9999
"type": "console.page/route",
100100
"properties": {
101101
"exact": true,
102-
"path": "/cryostat/security",
103-
"component": { "$codeRef": "SecurityPage" }
102+
"path": "/cryostat/certificates",
103+
"component": { "$codeRef": "CertificatesPage" }
104+
}
105+
},
106+
{
107+
"type": "console.page/route",
108+
"properties": {
109+
"exact": true,
110+
"path": "/cryostat/credentials",
111+
"component": { "$codeRef": "CredentialsPage" }
104112
}
105113
},
106114
{
@@ -256,9 +264,19 @@
256264
{
257265
"type": "console.navigation/href",
258266
"properties": {
259-
"id": "security",
260-
"name": "%plugin__cryostat-plugin~Navigation.Security%",
261-
"href": "/cryostat/security",
267+
"id": "certificates",
268+
"name": "%plugin__cryostat-plugin~Navigation.Certificates%",
269+
"href": "/cryostat/certificates",
270+
"perspective": "admin",
271+
"section": "cryostat-section"
272+
}
273+
},
274+
{
275+
"type": "console.navigation/href",
276+
"properties": {
277+
"id": "credentials",
278+
"name": "%plugin__cryostat-plugin~Navigation.Credentials%",
279+
"href": "/cryostat/credentials",
262280
"perspective": "admin",
263281
"section": "cryostat-section"
264282
}

locales/en/common.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"Navigation.Diagnostics": "Diagnostics",
1313
"Navigation.HeapDumps": "Analyze Heap Dumps",
1414
"Navigation.ThreadDumps": "Analyze Thread Dumps",
15-
"Navigation.Security": "Security",
15+
"Navigation.Certificates": "Certificates",
16+
"Navigation.Credentials": "Credentials",
1617
"Navigation.About": "About",
1718
"DEPLOYMENT_ACTION_TITLE": "Register with Cryostat",
1819
"DEPLOYMENT_ACTION_ALREADY_REGISTERED": "Deployment is already registered with this option",

package.json

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
"@openshift/dynamic-plugin-sdk": "5.0.1",
5252
"@openshift/dynamic-plugin-sdk-extensions": "1.4.1",
5353
"@openshift/dynamic-plugin-sdk-utils": "5.0.1",
54-
"@patternfly/patternfly": "^5.4.0",
55-
"@patternfly/quickstarts": "5.4.1",
56-
"@patternfly/react-catalog-view-extension": "^5.0.0",
57-
"@patternfly/react-charts": "^7.4.5",
58-
"@patternfly/react-core": "^5.4.2",
59-
"@patternfly/react-icons": "^5.4.0",
60-
"@patternfly/react-styles": "^5.4.1",
61-
"@patternfly/react-table": "^5.4.8",
62-
"@patternfly/react-topology": "^5.4.0",
54+
"@patternfly/patternfly": "^6.0.0",
55+
"@patternfly/quickstarts": "6.4.0",
56+
"@patternfly/react-catalog-view-extension": "^6.0.0",
57+
"@patternfly/react-charts": "^8.0.0",
58+
"@patternfly/react-core": "^6.0.0",
59+
"@patternfly/react-icons": "^6.0.0",
60+
"@patternfly/react-styles": "^6.0.0",
61+
"@patternfly/react-table": "^6.0.0",
62+
"@patternfly/react-topology": "^6.0.0",
6363
"@reduxjs/toolkit": "^1.9.3",
6464
"@stoplight/prism-cli": "^5.14.2",
6565
"@testing-library/jest-dom": "^6.9.1",
@@ -119,7 +119,24 @@
119119
"dependencies": {
120120
"concurrently": "^9.2.1",
121121
"license-check-and-add": "^4.0.5",
122-
"rxjs": "^7.8.2"
122+
"rxjs": "^7.8.2",
123+
"victory-area": "^37.3.6",
124+
"victory-axis": "^37.3.6",
125+
"victory-bar": "^37.3.6",
126+
"victory-box-plot": "^37.3.6",
127+
"victory-chart": "^37.3.6",
128+
"victory-core": "^37.3.6",
129+
"victory-create-container": "^37.3.6",
130+
"victory-cursor-container": "^37.3.6",
131+
"victory-group": "^37.3.6",
132+
"victory-legend": "^37.3.6",
133+
"victory-line": "^37.3.6",
134+
"victory-pie": "^37.3.6",
135+
"victory-scatter": "^37.3.6",
136+
"victory-stack": "^37.3.6",
137+
"victory-tooltip": "^37.3.6",
138+
"victory-voronoi-container": "^37.3.6",
139+
"victory-zoom-container": "^37.3.6"
123140
},
124141
"consolePlugin": {
125142
"name": "cryostat-plugin",
@@ -140,7 +157,8 @@
140157
"DiagnosticsPage": "./openshift/pages/DiagnosticsPage",
141158
"ThreadDumpsPage": "./openshift/pages/ThreadDumpsPage",
142159
"HeapDumpsPage": "./openshift/pages/HeapDumpsPage",
143-
"SecurityPage": "./openshift/pages/SecurityPage",
160+
"CertificatesPage": "./openshift/pages/CertificatesPage",
161+
"CredentialsPage": "./openshift/pages/CredentialsPage",
144162
"DeploymentLabelActionProvider": "./openshift/actions/DeploymentLabelAction/DeploymentLabelActionProvider",
145163
"getDeploymentDecorator": "./openshift/actions/DeploymentLabelAction/getDeploymentDecorator"
146164
},

src/cryostat-web

Submodule cryostat-web updated 237 files

src/openshift/actions/DeploymentLabelAction/DeploymentLabelActionModal.tsx

Lines changed: 118 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@ import {
2424
useAccessReview,
2525
useK8sWatchResource,
2626
} from '@openshift-console/dynamic-plugin-sdk';
27-
import { Modal, ModalVariant, Wizard, WizardStep, ValidatedOptions } from '@patternfly/react-core';
27+
import {
28+
Button,
29+
Modal,
30+
ModalVariant,
31+
Wizard,
32+
WizardStep,
33+
WizardHeader,
34+
WizardFooterWrapper,
35+
useWizardContext,
36+
ValidatedOptions,
37+
} from '@patternfly/react-core';
2838
import * as React from 'react';
2939

3040
import { ContainerSelectionStep } from './ContainerSelectionStep';
@@ -43,7 +53,6 @@ import { InstanceSelectionStep } from './InstanceSelectionStep';
4353
import { JavaOptsConfigStep } from './JavaOptsConfigStep';
4454
import { LogLevelConfigStep } from './LogLevelConfigStep';
4555
import { ReviewStep } from './ReviewStep';
46-
import { WizardCustomFooter } from './WizardCustomFooter';
4756

4857
interface CryostatModalProps {
4958
kind: K8sModel;
@@ -567,105 +576,127 @@ export const DeploymentLabelActionModal: React.FC<CryostatModalProps> = ({ kind,
567576
const selectedInstance = formData.cryostatInstance !== EMPTY_VALUE ? cryostats[formData.cryostatInstance] : null;
568577
const selectedContainer = containers[formData.selectedContainerIndex] || null;
569578

570-
const steps = [
571-
{
572-
id: 'instance-selection',
573-
name: t('DEPLOYMENT_ACTION_WIZARD_STEP_INSTANCE'),
574-
component: (
575-
<InstanceSelectionStep
576-
cryostats={cryostats}
577-
formSelectValue={formSelectValue}
578-
onChange={handleInstanceChange}
579-
validated={validated}
580-
helperText={helperText}
581-
/>
582-
),
583-
},
584-
{
585-
id: 'container-selection',
586-
name: t('DEPLOYMENT_ACTION_WIZARD_STEP_CONTAINER'),
587-
component: (
588-
<ContainerSelectionStep
589-
containers={containers}
590-
selectedContainerIndex={formData.selectedContainerIndex}
591-
onChange={handleContainerChange}
592-
logLevel={formData.logLevel}
593-
javaOptsVar={formData.javaOptsVar}
594-
/>
595-
),
596-
canJumpTo: formSelectValue !== EMPTY_VALUE && !isDisabled,
597-
},
598-
{
599-
id: 'java-opts-config',
600-
name: t('DEPLOYMENT_ACTION_WIZARD_STEP_JAVA_OPTS'),
601-
component: <JavaOptsConfigStep javaOptsVar={formData.javaOptsVar} onChange={handleJavaOptsVarChange} />,
602-
canJumpTo: formSelectValue !== EMPTY_VALUE && !isDisabled,
603-
},
604-
{
605-
id: 'harvester-config',
606-
name: t('DEPLOYMENT_ACTION_WIZARD_STEP_HARVESTER'),
607-
component: (
608-
<HarvesterConfigStep
609-
harvesterTemplate={formData.harvesterTemplate}
610-
harvesterExitMaxAgeMs={formData.harvesterExitMaxAgeMs}
611-
harvesterExitMaxSizeB={formData.harvesterExitMaxSizeB}
612-
onChange={handleHarvesterChange}
613-
/>
614-
),
615-
canJumpTo: formSelectValue !== EMPTY_VALUE && !isDisabled,
616-
},
617-
{
618-
id: 'log-level-config',
619-
name: t('DEPLOYMENT_ACTION_WIZARD_STEP_LOG_LEVEL'),
620-
component: <LogLevelConfigStep logLevel={formData.logLevel} onChange={handleLogLevelChange} />,
621-
canJumpTo: formSelectValue !== EMPTY_VALUE && !isDisabled,
622-
},
623-
{
624-
id: 'review',
625-
name: t('DEPLOYMENT_ACTION_WIZARD_STEP_REVIEW'),
626-
component: (
627-
<ReviewStep
628-
selectedInstance={selectedInstance}
629-
selectedContainer={selectedContainer}
630-
javaOptsVar={formData.javaOptsVar}
631-
harvesterTemplate={formData.harvesterTemplate}
632-
harvesterExitMaxAgeMs={formData.harvesterExitMaxAgeMs}
633-
harvesterExitMaxSizeB={formData.harvesterExitMaxSizeB}
634-
logLevel={formData.logLevel}
635-
/>
636-
),
637-
},
638-
];
579+
const InstanceSelectionFooter = () => {
580+
const { goToNextStep } = useWizardContext();
581+
582+
return (
583+
<WizardFooterWrapper>
584+
<Button
585+
variant="primary"
586+
onClick={handleQuickRegister}
587+
isDisabled={
588+
!(
589+
(formSelectValue === EMPTY_VALUE && initialValue !== EMPTY_VALUE) ||
590+
(formSelectValue !== EMPTY_VALUE && !isDisabled)
591+
)
592+
}
593+
>
594+
{formSelectValue === EMPTY_VALUE && initialValue !== EMPTY_VALUE
595+
? t('DEPLOYMENT_ACTION_DEREGISTER')
596+
: t('DEPLOYMENT_ACTION_QUICK_REGISTER')}
597+
</Button>
598+
<Button variant="secondary" onClick={goToNextStep} isDisabled={formSelectValue === EMPTY_VALUE || isDisabled}>
599+
{t('NEXT')}
600+
</Button>
601+
<Button variant="link" onClick={closeModal}>
602+
{t('CANCEL')}
603+
</Button>
604+
</WizardFooterWrapper>
605+
);
606+
};
639607

640608
return (
641609
<Modal
642610
variant={ModalVariant.large}
643-
title={t('DEPLOYMENT_ACTION_TITLE')}
644611
isOpen={true}
645612
onClose={closeModal}
646-
hasNoBodyWrapper
647613
aria-label={t('DEPLOYMENT_ACTION_TITLE')}
648614
ouiaId="CryostatDeploymentActionWizard"
649615
>
650616
<Wizard
651617
onClose={closeModal}
652618
onSave={handleFormSubmit}
653-
footer={
654-
<WizardCustomFooter
655-
onQuickRegister={handleQuickRegister}
656-
onSubmit={handleFormSubmit}
657-
onCancel={closeModal}
658-
isValid={formSelectValue !== EMPTY_VALUE && !isDisabled}
659-
initialValue={initialValue}
660-
currentValue={formSelectValue}
661-
/>
619+
header={
620+
<WizardHeader title={t('DEPLOYMENT_ACTION_TITLE')} onClose={closeModal} closeButtonAriaLabel={t('CLOSE')} />
662621
}
663622
>
664-
{steps.map((step) => (
665-
<WizardStep key={step.id} id={step.id} name={step.name}>
666-
{step.component}
667-
</WizardStep>
668-
))}
623+
<WizardStep
624+
id="instance-selection"
625+
name={t('DEPLOYMENT_ACTION_WIZARD_STEP_INSTANCE')}
626+
footer={<InstanceSelectionFooter />}
627+
>
628+
<InstanceSelectionStep
629+
cryostats={cryostats}
630+
formSelectValue={formSelectValue}
631+
onChange={handleInstanceChange}
632+
validated={validated}
633+
helperText={helperText}
634+
/>
635+
</WizardStep>
636+
<WizardStep
637+
id="container-selection"
638+
name={t('DEPLOYMENT_ACTION_WIZARD_STEP_CONTAINER')}
639+
footer={{
640+
isNextDisabled: isDisabled,
641+
}}
642+
>
643+
<ContainerSelectionStep
644+
containers={containers}
645+
selectedContainerIndex={formData.selectedContainerIndex}
646+
onChange={handleContainerChange}
647+
logLevel={formData.logLevel}
648+
javaOptsVar={formData.javaOptsVar}
649+
/>
650+
</WizardStep>
651+
<WizardStep
652+
id="java-opts-config"
653+
name={t('DEPLOYMENT_ACTION_WIZARD_STEP_JAVA_OPTS')}
654+
footer={{
655+
isNextDisabled: isDisabled,
656+
}}
657+
>
658+
<JavaOptsConfigStep javaOptsVar={formData.javaOptsVar} onChange={handleJavaOptsVarChange} />
659+
</WizardStep>
660+
<WizardStep
661+
id="harvester-config"
662+
name={t('DEPLOYMENT_ACTION_WIZARD_STEP_HARVESTER')}
663+
footer={{
664+
isNextDisabled: isDisabled,
665+
}}
666+
>
667+
<HarvesterConfigStep
668+
harvesterTemplate={formData.harvesterTemplate}
669+
harvesterExitMaxAgeMs={formData.harvesterExitMaxAgeMs}
670+
harvesterExitMaxSizeB={formData.harvesterExitMaxSizeB}
671+
onChange={handleHarvesterChange}
672+
/>
673+
</WizardStep>
674+
<WizardStep
675+
id="log-level-config"
676+
name={t('DEPLOYMENT_ACTION_WIZARD_STEP_LOG_LEVEL')}
677+
footer={{
678+
isNextDisabled: isDisabled,
679+
}}
680+
>
681+
<LogLevelConfigStep logLevel={formData.logLevel} onChange={handleLogLevelChange} />
682+
</WizardStep>
683+
<WizardStep
684+
id="review"
685+
name={t('DEPLOYMENT_ACTION_WIZARD_STEP_REVIEW')}
686+
footer={{
687+
nextButtonText: t('DEPLOYMENT_ACTION_REGISTER'),
688+
}}
689+
>
690+
<ReviewStep
691+
selectedInstance={selectedInstance}
692+
selectedContainer={selectedContainer}
693+
javaOptsVar={formData.javaOptsVar}
694+
harvesterTemplate={formData.harvesterTemplate}
695+
harvesterExitMaxAgeMs={formData.harvesterExitMaxAgeMs}
696+
harvesterExitMaxSizeB={formData.harvesterExitMaxSizeB}
697+
logLevel={formData.logLevel}
698+
/>
699+
</WizardStep>
669700
</Wizard>
670701
</Modal>
671702
);

0 commit comments

Comments
 (0)