Skip to content

Commit 1b48567

Browse files
committed
isInitialInstallOrRestore
1 parent 400bb05 commit 1b48567

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

web/src/components/apps/EmbeddedClusterManagement.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ const EmbeddedClusterManagement = ({
520520
</>
521521
);
522522
};
523+
524+
const isInitialInstallOrRestore =
525+
Utilities.isInitialAppInstall(app) || isEmbeddedClusterWaitingForNodes;
526+
523527
return (
524528
<div className="EmbeddedClusterManagement--wrapper container u-overflow--auto u-paddingTop--50 tw-font-sans">
525529
<KotsPageTitle pageName="Cluster Management" />
@@ -528,30 +532,26 @@ const EmbeddedClusterManagement = ({
528532
Nodes
529533
</p>
530534
<div className="tw-flex tw-gap-6 tw-items-center">
531-
{" "}
532-
{(!Utilities.isInitialAppInstall(app) ||
533-
!isEmbeddedClusterWaitingForNodes) && (
535+
{!isInitialInstallOrRestore && (
534536
<>
535537
<div className="tw-flex tw-gap-6">
536538
<p>
537539
View the nodes in your cluster, generate commands to add nodes
538540
to the cluster, and view workloads running on each node.
539541
</p>
540542
</div>
541-
{Utilities.sessionRolesHasOneOf([rbacRoles.CLUSTER_ADMIN]) &&
542-
!Utilities.isInitialAppInstall(app) && (
543-
<button
544-
className="btn primary tw-ml-auto tw-w-fit tw-h-fit"
545-
onClick={onAddNodeClick}
546-
>
547-
Add node
548-
</button>
549-
)}
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+
)}
550551
</>
551552
)}
552553
</div>
553-
{(Utilities.isInitialAppInstall(app) ||
554-
isEmbeddedClusterWaitingForNodes) && (
554+
{isInitialInstallOrRestore && (
555555
<div className="tw-mt-4 tw-flex tw-flex-col">
556556
<AddNodeInstructions />
557557
<AddNodeCommands />

0 commit comments

Comments
 (0)