Skip to content

Commit 0e43624

Browse files
committed
show join command during restore
1 parent fcb8fda commit 0e43624

File tree

3 files changed

+34
-18
lines changed

3 files changed

+34
-18
lines changed

web/src/Root.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ const Root = () => {
501501
isEmbeddedClusterEnabled={Boolean(
502502
state.adminConsoleMetadata?.isEmbeddedCluster
503503
)}
504+
isEmbeddedClusterNodeWaiting={
505+
state.isEmbeddedClusterWaitingForNodes
506+
}
504507
isGitOpsSupported={isGitOpsSupported()}
505508
isIdentityServiceSupported={isIdentityServiceSupported()}
506509
appsList={state.appsList}
@@ -636,7 +639,11 @@ const Root = () => {
636639
state.adminConsoleMetadata?.isKurl ? (
637640
<KurlClusterManagement />
638641
) : (
639-
<EmbeddedClusterManagement />
642+
<EmbeddedClusterManagement
643+
isEmbeddedClusterNodeWaiting={
644+
state.isEmbeddedClusterWaitingForNodes
645+
}
646+
/>
640647
)
641648
}
642649
/>

web/src/components/apps/EmbeddedClusterManagement.tsx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ type State = {
3131

3232
const EmbeddedClusterManagement = ({
3333
fromLicenseFlow = false,
34+
isEmbeddedClusterNodeWaiting = false,
3435
}: {
3536
fromLicenseFlow?: boolean;
37+
isEmbeddedClusterNodeWaiting?: boolean;
3638
}) => {
3739
const [state, setState] = useReducer(
3840
(prevState: State, newState: Partial<State>) => ({
@@ -415,11 +417,13 @@ const EmbeddedClusterManagement = ({
415417
const AddNodeInstructions = () => {
416418
return (
417419
<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+
)}
423427
<p>
424428
{rolesData?.roles &&
425429
rolesData.roles.length > 1 &&
@@ -526,16 +530,18 @@ const EmbeddedClusterManagement = ({
526530
</p>
527531
<div className="tw-flex tw-gap-6 tw-items-center">
528532
{" "}
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>
536-
)}
533+
{!Utilities.isInitialAppInstall(app) &&
534+
!isEmbeddedClusterNodeWaiting && (
535+
<div className="tw-flex tw-gap-6">
536+
<p>
537+
View the nodes in your cluster, generate commands to add nodes
538+
to the cluster, and view workloads running on each node.
539+
</p>
540+
</div>
541+
)}
537542
{Utilities.sessionRolesHasOneOf([rbacRoles.CLUSTER_ADMIN]) &&
538-
!Utilities.isInitialAppInstall(app) && (
543+
!Utilities.isInitialAppInstall(app) &&
544+
!isEmbeddedClusterNodeWaiting && (
539545
<button
540546
className="btn primary tw-ml-auto tw-w-fit tw-h-fit"
541547
onClick={onAddNodeClick}
@@ -544,7 +550,7 @@ const EmbeddedClusterManagement = ({
544550
</button>
545551
)}
546552
</div>
547-
{Utilities.isInitialAppInstall(app) && (
553+
{Utilities.isInitialAppInstall(app) && !isEmbeddedClusterNodeWaiting && (
548554
<div className="tw-mt-4 tw-flex tw-flex-col">
549555
<AddNodeInstructions />
550556
<AddNodeCommands />

web/src/components/shared/NavBar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type Props = {
1919
isIdentityServiceSupported: boolean;
2020
isKurlEnabled: boolean;
2121
isEmbeddedClusterEnabled: boolean;
22+
isEmbeddedClusterNodeWaiting: boolean;
2223
isSnapshotsSupported: boolean;
2324
logo: string | null;
2425
onLogoutError: (message: string) => void;
@@ -144,6 +145,7 @@ export class NavBar extends PureComponent<Props, State> {
144145
fetchingMetadata,
145146
isKurlEnabled,
146147
isEmbeddedClusterEnabled,
148+
isEmbeddedClusterNodeWaiting,
147149
isGitOpsSupported,
148150
isIdentityServiceSupported,
149151
appsList,
@@ -206,7 +208,8 @@ export class NavBar extends PureComponent<Props, State> {
206208
</div>
207209
{Utilities.isLoggedIn() &&
208210
appsList?.length > 0 &&
209-
!isInitialEmbeddedInstall && (
211+
!isInitialEmbeddedInstall &&
212+
!isEmbeddedClusterNodeWaiting && (
210213
<div className="flex flex-auto left-items">
211214
<div
212215
className={classNames("NavItem u-position--relative flex", {
@@ -286,7 +289,7 @@ export class NavBar extends PureComponent<Props, State> {
286289
</div>
287290
)}
288291
</div>
289-
{Utilities.isLoggedIn() && (
292+
{Utilities.isLoggedIn() && !isEmbeddedClusterNodeWaiting && (
290293
<>
291294
<NavBarDropdown
292295
handleLogOut={this.handleLogOut}

0 commit comments

Comments
 (0)