1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/+cluster-settings/cluster-settings.tsx
Alex Andreev 405163adbe
Preferences section restyling (#700)
* Adding 'centering' option to WizardLayout

Signed-off-by: alexfront <alex.andreev.email@gmail.com>

* Using centered layout in Cluster Settings

Signed-off-by: alexfront <alex.andreev.email@gmail.com>

* Restyling Preferences section

Signed-off-by: alexfront <alex.andreev.email@gmail.com>

* Simplifying Helm loading state

Signed-off-by: alexfront <alex.andreev.email@gmail.com>
2020-08-17 13:55:46 +03:00

43 lines
1.3 KiB
TypeScript

import "./cluster-settings.scss";
import React from "react";
import { observer } from "mobx-react";
import { Features } from "./features";
import { Removal } from "./removal";
import { Status } from "./status";
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";
@observer
export class ClusterSettings extends React.Component {
render() {
const cluster = getMatchedCluster();
if (!cluster) return null;
const header = (
<>
<ClusterIcon
cluster={cluster}
showErrors={false}
showTooltip={false}
/>
<h2>{cluster.preferences.clusterName}</h2>
<Icon material="close" onClick={() => navigate("/")} big/>
</>
);
return (
<div className="ClusterSettings">
<WizardLayout header={header} centered>
<Status cluster={cluster}></Status>
<General cluster={cluster}></General>
<Features cluster={cluster}></Features>
<Removal cluster={cluster}></Removal>
</WizardLayout>
</div>
);
}
}