@@ -31,8 +31,10 @@ type State = {
31
31
32
32
const EmbeddedClusterManagement = ( {
33
33
fromLicenseFlow = false ,
34
+ isEmbeddedClusterWaitingForNodes = false ,
34
35
} : {
35
36
fromLicenseFlow ?: boolean ;
37
+ isEmbeddedClusterWaitingForNodes ?: boolean ;
36
38
} ) => {
37
39
const [ state , setState ] = useReducer (
38
40
( prevState : State , newState : Partial < State > ) => ( {
@@ -415,11 +417,13 @@ const EmbeddedClusterManagement = ({
415
417
const AddNodeInstructions = ( ) => {
416
418
return (
417
419
< div className = "tw-mb-2 tw-text-base" >
418
- < p >
419
- Optionally add nodes to the cluster. Click{ " " }
420
- < span className = "tw-font-semibold" > Continue </ span >
421
- to proceed with a single node.
422
- </ p >
420
+ { Utilities . isInitialAppInstall ( app ) && (
421
+ < p >
422
+ Optionally add nodes to the cluster. Click{ " " }
423
+ < span className = "tw-font-semibold" > Continue </ span >
424
+ to proceed with a single node.
425
+ </ p >
426
+ ) }
423
427
< p >
424
428
{ rolesData ?. roles &&
425
429
rolesData . roles . length > 1 &&
@@ -517,6 +521,9 @@ const EmbeddedClusterManagement = ({
517
521
) ;
518
522
} ;
519
523
524
+ const isInitialInstallOrRestore =
525
+ Utilities . isInitialAppInstall ( app ) || isEmbeddedClusterWaitingForNodes ;
526
+
520
527
return (
521
528
< div className = "EmbeddedClusterManagement--wrapper container u-overflow--auto u-paddingTop--50 tw-font-sans" >
522
529
< KotsPageTitle pageName = "Cluster Management" />
@@ -525,26 +532,26 @@ const EmbeddedClusterManagement = ({
525
532
Nodes
526
533
</ p >
527
534
< div className = "tw-flex tw-gap-6 tw-items-center" >
528
- { " " }
529
- { ! Utilities . isInitialAppInstall ( app ) && (
530
- < div className = "tw-flex tw-gap-6" >
531
- < p >
532
- View the nodes in your cluster, generate commands to add nodes
533
- to the cluster, and view workloads running on each node.
534
- </ p >
535
- </ div >
535
+ { ! isInitialInstallOrRestore && (
536
+ < >
537
+ < div className = "tw-flex tw-gap-6" >
538
+ < p >
539
+ View the nodes in your cluster, generate commands to add nodes
540
+ to the cluster, and view workloads running on each node.
541
+ </ p >
542
+ </ div >
543
+ { Utilities . sessionRolesHasOneOf ( [ rbacRoles . CLUSTER_ADMIN ] ) && (
544
+ < button
545
+ className = "btn primary tw-ml-auto tw-w-fit tw-h-fit"
546
+ onClick = { onAddNodeClick }
547
+ >
548
+ Add node
549
+ </ button >
550
+ ) }
551
+ </ >
536
552
) }
537
- { Utilities . sessionRolesHasOneOf ( [ rbacRoles . CLUSTER_ADMIN ] ) &&
538
- ! Utilities . isInitialAppInstall ( app ) && (
539
- < button
540
- className = "btn primary tw-ml-auto tw-w-fit tw-h-fit"
541
- onClick = { onAddNodeClick }
542
- >
543
- Add node
544
- </ button >
545
- ) }
546
553
</ div >
547
- { Utilities . isInitialAppInstall ( app ) && (
554
+ { isInitialInstallOrRestore && (
548
555
< div className = "tw-mt-4 tw-flex tw-flex-col" >
549
556
< AddNodeInstructions />
550
557
< AddNodeCommands />
0 commit comments