mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
App reload in cluster settings (#858)
* Passing extra routes where to find clusterId Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Cluster settings refactorings Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Clean up Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
cc973bb9ef
commit
c6b3738a75
3 files changed
+37
-30
No files matched your search
@@ -9,11 +9,16 @@ import { General } from "./general";
|
||||
import { WizardLayout } from "../layout/wizard-layout";
|
||||
import { ClusterIcon } from "../cluster-icon";
|
||||
import { Icon } from "../icon";
|
||||
import { getMatchedCluster } from "../cluster-manager/cluster-view.route";
|
||||
import { navigate } from "../../navigation";
|
||||
import { IClusterSettingsRouteParams } from "./cluster-settings.route";
|
||||
import { clusterStore } from "../../../common/cluster-store";
|
||||
import { RouteComponentProps } from "react-router";
|
||||
|
||||
interface Props extends RouteComponentProps<IClusterSettingsRouteParams> {
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterSettings extends React.Component {
|
||||
export class ClusterSettings extends React.Component<Props> {
|
||||
async componentDidMount() {
|
||||
window.addEventListener('keydown', this.onEscapeKey);
|
||||
}
|
||||
@@ -34,7 +39,7 @@ export class ClusterSettings extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const cluster = getMatchedCluster();
|
||||
const cluster = clusterStore.getById(this.props.match.params.clusterId);
|
||||
if (!cluster) return null;
|
||||
const header = (
|
||||
<>
|
||||
|
||||
Reference in new issue
Block a user