mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add support for Prometheus api prefix (#341)
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
1 parent
5c1974f07b
commit
bba6eb743d
3 files changed
+14
-4
No files matched your search
@@ -46,6 +46,7 @@ export type ClusterPreferences = {
|
||||
namespace: string;
|
||||
service: string;
|
||||
port: number;
|
||||
prefix: string;
|
||||
};
|
||||
prometheusProvider?: {
|
||||
type: string;
|
||||
@@ -153,6 +154,13 @@ export class Cluster implements ClusterInfo {
|
||||
this.save()
|
||||
}
|
||||
|
||||
public getPrometheusApiPrefix() {
|
||||
if (!this.preferences.prometheus?.prefix) {
|
||||
return ""
|
||||
}
|
||||
return this.preferences.prometheus.prefix
|
||||
}
|
||||
|
||||
public save() {
|
||||
clusterStore.storeCluster(this)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user