mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* A bit of cleaning in Add Cluster page Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Adding head-col to WizardLayout Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Fixing Cluster Settings general layout bugs Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Cluster Status view refactoring Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Install Metrics component refactoring Using notifications for error, removed picking button icon method, simplified button generation. Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Remove icons / checks from RemoveClusterButton Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Fixing colorError in Input styles Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Preventing Input's spellchecking Signed-off-by: alexfront <alex.andreev.email@gmail.com> * ClusterNameSettings refactoring Signed-off-by: alexfront <alex.andreev.email@gmail.com> * ClusterWorkspaceSettings refactoring/fixing Signed-off-by: alexfront <alex.andreev.email@gmail.com> * ClusterProxySetting refactoring Signed-off-by: alexfront <alex.andreev.email@gmail.com> * ClusterPrometheusSetting refactoring Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Clean up Removal section Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Glued InstallMetrics & InstallUserMode into 1 component Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Removing unused styles in Cluster Settings Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Cluster Settings styling Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Adding close button to settings header Signed-off-by: alexfront <alex.andreev.email@gmail.com> * ClusterHomeDirSetting refactoring Signed-off-by: alexfront <alex.andreev.email@gmail.com> * FilePicker restyling Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Fixing Prometheus selector Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Fixing Hashicon Passing cluster name instead of cluster id to prevent icon changing while typing new cluster name Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Minor ClusterSettings fixes Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Increasing opacity for non-interactive icons Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Keep feature install loading state Waiting for props to change before disabling loading state (gray button width spinner) Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Remove arrays in disposeOnUnmount() Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Fix Cluster select behavior Now clicking cluster icon in sidebar always leads to / dashboard. And 'Settings' submenu switches active cluster at first and only the showing Cluster Settings Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Using structuralComparator in feature installer Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Saving input fields on blur Signed-off-by: alexfront <alex.andreev.email@gmail.com> * Setting Select color same as Input color Signed-off-by: alexfront <alex.andreev.email@gmail.com>
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import React from "react";
|
|
import { Cluster } from "../../../main/cluster";
|
|
import { SubTitle } from "../layout/sub-title";
|
|
import { Table, TableCell, TableRow } from "../table";
|
|
|
|
interface Props {
|
|
cluster: Cluster;
|
|
}
|
|
|
|
export class Status extends React.Component<Props> {
|
|
renderStatusRows() {
|
|
const { cluster } = this.props;
|
|
const rows = [
|
|
["Online Status", cluster.online ? "online" : `offline (${cluster.failureReason || "unknown reason"}`],
|
|
["Distribution", cluster.distribution],
|
|
["Kerbel Version", cluster.version],
|
|
["API Address", cluster.apiUrl],
|
|
["Nodes Count", cluster.nodes || "0"]
|
|
];
|
|
return (
|
|
<Table scrollable={false}>
|
|
{rows.map(([name, value]) => {
|
|
return (
|
|
<TableRow key={name}>
|
|
<TableCell>{name}</TableCell>
|
|
<TableCell className="value">{value}</TableCell>
|
|
</TableRow>
|
|
);
|
|
})}
|
|
</Table>
|
|
);
|
|
}
|
|
|
|
render() {
|
|
return <div>
|
|
<h2>Status</h2>
|
|
<SubTitle title="Cluster Status"/>
|
|
<p>
|
|
Cluster status information including: detected distribution, kernel version, and online status.
|
|
</p>
|
|
<div className="status-table">
|
|
{this.renderStatusRows()}
|
|
</div>
|
|
</div>;
|
|
}
|
|
} |