-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-stopped-cluster-case'
- Loading branch information
Showing
21 changed files
with
149 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/app/view/dashboard/clusterList/DashboardClusterCellName.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,45 @@ | ||
import { useSelectedClusterName } from "app/view/share/SelectedClusterContext"; | ||
import { Label } from "@patternfly/react-core"; | ||
|
||
import { LauncherActionList } from "app/view/share/toolbar"; | ||
|
||
export const ClusterStoppedInfo = () => { | ||
const clusterName = useSelectedClusterName(); | ||
export const ClusterStoppedInfo = ({ | ||
clusterName, | ||
startButton, | ||
}: { | ||
clusterName: string; | ||
startButton?: "button" | "link"; | ||
}) => { | ||
return ( | ||
<> | ||
<div>Cluster is stopped. You can start cluster on detail tab.</div> | ||
<div> | ||
<LauncherActionList | ||
name="stopped-cluster-actions" | ||
items={[ | ||
{ | ||
name: "start cluster", | ||
confirm: { | ||
title: "Start cluster?", | ||
description: "Start the on all nodes", | ||
action: { | ||
type: "DASHBOARD.CLUSTER.START", | ||
payload: { clusterName }, | ||
{startButton && ( | ||
<div> | ||
<LauncherActionList | ||
name="stopped-cluster-actions" | ||
items={[ | ||
{ | ||
name: "start cluster", | ||
confirm: { | ||
title: "Start the cluster?", | ||
description: ( | ||
<span> | ||
Start the cluster{" "} | ||
<Label color="blue">{clusterName}</Label> on all nodes | ||
</span> | ||
), | ||
action: { | ||
type: "DASHBOARD.CLUSTER.START", | ||
payload: { clusterName }, | ||
}, | ||
}, | ||
button: { | ||
variant: startButton === "button" ? "secondary" : "link", | ||
}, | ||
}, | ||
}, | ||
]} | ||
/> | ||
</div> | ||
]} | ||
/> | ||
</div> | ||
)} | ||
</> | ||
); | ||
}; |
Oops, something went wrong.