Skip to content

Commit

Permalink
isInitialInstallOrRestore
Browse files Browse the repository at this point in the history
  • Loading branch information
miaawong committed Aug 28, 2024
1 parent 400bb05 commit 1b48567
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions web/src/components/apps/EmbeddedClusterManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ const EmbeddedClusterManagement = ({
</>
);
};

const isInitialInstallOrRestore =
Utilities.isInitialAppInstall(app) || isEmbeddedClusterWaitingForNodes;

return (
<div className="EmbeddedClusterManagement--wrapper container u-overflow--auto u-paddingTop--50 tw-font-sans">
<KotsPageTitle pageName="Cluster Management" />
Expand All @@ -528,30 +532,26 @@ const EmbeddedClusterManagement = ({
Nodes
</p>
<div className="tw-flex tw-gap-6 tw-items-center">
{" "}
{(!Utilities.isInitialAppInstall(app) ||
!isEmbeddedClusterWaitingForNodes) && (
{!isInitialInstallOrRestore && (
<>
<div className="tw-flex tw-gap-6">
<p>
View the nodes in your cluster, generate commands to add nodes
to the cluster, and view workloads running on each node.
</p>
</div>
{Utilities.sessionRolesHasOneOf([rbacRoles.CLUSTER_ADMIN]) &&
!Utilities.isInitialAppInstall(app) && (
<button
className="btn primary tw-ml-auto tw-w-fit tw-h-fit"
onClick={onAddNodeClick}
>
Add node
</button>
)}
{Utilities.sessionRolesHasOneOf([rbacRoles.CLUSTER_ADMIN]) && (
<button
className="btn primary tw-ml-auto tw-w-fit tw-h-fit"
onClick={onAddNodeClick}
>
Add node
</button>
)}
</>
)}
</div>
{(Utilities.isInitialAppInstall(app) ||
isEmbeddedClusterWaitingForNodes) && (
{isInitialInstallOrRestore && (
<div className="tw-mt-4 tw-flex tw-flex-col">
<AddNodeInstructions />
<AddNodeCommands />
Expand Down

0 comments on commit 1b48567

Please sign in to comment.