Only allow extensions to use non-lens specific cluster phases (#4036)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-10-14 10:25:48 -04:00
1 parent a01eecdc79
commit 9d5689ce69
5 files changed
+50 -16

No files matched your search

@@ -31,6 +31,7 @@ import { cssNames, IClassName } from "../../utils";
import { Icon } from "../icon";
import { HotbarIcon } from "./hotbar-icon";
import { HotbarStore } from "../../../common/hotbar-store";
import { LensKubernetesClusterStatus } from "../../../common/catalog-entities/kubernetes-cluster";
interface Props extends DOMAttributes<HTMLElement> {
entity: CatalogEntity;
@@ -78,7 +79,7 @@ export class HotbarEntityIcon extends React.Component<Props> {
return null;
}
const className = cssNames("led", { online: this.props.entity.status.phase == "connected"}); // TODO: make it more generic
const className = cssNames("led", { online: this.props.entity.status.phase === LensKubernetesClusterStatus.CONNECTED}); // TODO: make it more generic
return <div className={className} />;
}