mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix manually set prometheus service address to work after re-connect
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
024c5ee52c
commit
a5f63c8c29
@ -53,7 +53,6 @@ export class ContextHandler implements ClusterContextHandler {
|
||||
|
||||
constructor(private dependencies: Dependencies, protected cluster: Cluster) {
|
||||
this.clusterUrl = url.parse(cluster.apiUrl);
|
||||
this.setupPrometheus(cluster.preferences);
|
||||
}
|
||||
|
||||
public setupPrometheus(preferences: ClusterPrometheusPreferences = {}) {
|
||||
@ -94,6 +93,8 @@ export class ContextHandler implements ClusterContextHandler {
|
||||
}
|
||||
|
||||
protected async getPrometheusService(): Promise<PrometheusService> {
|
||||
this.setupPrometheus(this.cluster.preferences);
|
||||
|
||||
if (this.prometheus && this.prometheusProvider) {
|
||||
return {
|
||||
id: this.prometheusProvider,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user