From 7ca77203c0622697123e2fdb6f377d87e3de901b Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Thu, 4 Jul 2019 13:36:49 +0200 Subject: Replace runtime isEE check with compile time one This has the benefit that CE bundles will remove dead code in CE only builds. We have a follow-up issue to get rid of this completely: https://gitlab.com/gitlab-org/gitlab-ce/issues/64173 --- app/assets/javascripts/monitoring/components/dashboard.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/assets/javascripts/monitoring/components/dashboard.vue') diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index ed25a6e3684..ba79a697df2 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -4,7 +4,6 @@ import _ from 'underscore'; import { mapActions, mapState } from 'vuex'; import { s__ } from '~/locale'; import Icon from '~/vue_shared/components/icon.vue'; -import '~/vue_shared/mixins/is_ee'; import { getParameterValues } from '~/lib/utils/url_utility'; import invalidUrl from '~/lib/utils/invalid_url'; import MonitorAreaChart from './charts/area.vue'; @@ -160,6 +159,12 @@ export default { selectedDashboardText() { return this.currentDashboard || (this.allDashboards[0] && this.allDashboards[0].display_name); }, + addingMetricsAvailable() { + return IS_EE && this.canAddMetrics && !this.showEmptyState; + }, + alertWidgetAvailable() { + return IS_EE && this.prometheusAlertsAvailable && this.alertsEndpoint; + }, }, created() { this.setEndpoints({ @@ -313,7 +318,7 @@ export default {
-
+