diff --git a/src/renderer/components/+cluster/cluster-no-metrics.tsx b/src/renderer/components/+cluster/cluster-no-metrics.tsx index c8638c2602..230733a5c3 100644 --- a/src/renderer/components/+cluster/cluster-no-metrics.tsx +++ b/src/renderer/components/+cluster/cluster-no-metrics.tsx @@ -3,20 +3,33 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ +import styles from "./cluster-no-metrics.module.scss"; + import React from "react"; import { Icon } from "../icon"; import { cssNames } from "../../utils"; +import { broadcastMessage } from "../../../common/ipc"; +import { IpcRendererNavigationEvents } from "../../navigation/events"; +import { catalogEntityRegistry } from "../../api/catalog-entity-registry"; export interface ClusterNoMetricsProps { className: string; } export function ClusterNoMetrics({ className }: ClusterNoMetricsProps) { + function getClusterId() { + return catalogEntityRegistry.activeEntity; + } + + function openSettingsPage() { + broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, `/entity/${getClusterId()?.getId()}/settings`); + } + return ( -
Metrics are not available due to missing or invalid Prometheus configuration.
-Right click cluster icon to open cluster settings.
+Open cluster settings