mirror of https://github.com/rancher/dashboard.git
Fix dashboardExists monitoring installation check (#6991)
This commit is contained in:
parent
80eeacfb41
commit
3ac69b7c8c
|
|
@ -1,5 +1,5 @@
|
|||
import { haveV2Monitoring } from '@shell/utils/monitoring';
|
||||
import { parse as parseUrl, addParam } from '@shell/utils/url';
|
||||
import { MONITORING } from '@shell/config/types';
|
||||
|
||||
export function computeDashboardUrl(embedUrl, clusterId, params) {
|
||||
const url = parseUrl(embedUrl);
|
||||
|
|
@ -21,7 +21,7 @@ export function computeDashboardUrl(embedUrl, clusterId, params) {
|
|||
}
|
||||
|
||||
export async function dashboardExists(store, clusterId, embedUrl, storeName = 'cluster') {
|
||||
if (!isMonitoringInstalled(store.getters, storeName)) {
|
||||
if ( !haveV2Monitoring(store.getters) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,3 @@ export async function failedProposals(dispatch, clusterId) {
|
|||
|
||||
return response.data.result[0]?.values?.[0]?.[1] || 0;
|
||||
}
|
||||
|
||||
function isMonitoringInstalled(getters, storeName = 'cluster') {
|
||||
return !!getters[`${ storeName }/schemaFor`](MONITORING.SERVICEMONITOR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue