Merge branch 'jivl-add-feature-flag-gon-ee' into 'master'

make the monitoring bundle reusable

See merge request gitlab-org/gitlab-ce!27402
This commit is contained in:
Fatih Acet 2019-04-17 23:08:26 +00:00
commit ce02daea08
2 changed files with 5 additions and 1 deletions

View file

@ -2,7 +2,7 @@ import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import Dashboard from './components/dashboard.vue';
export default () => {
export default (props = {}) => {
const el = document.getElementById('prometheus-graphs');
if (el && el.dataset) {
@ -15,6 +15,7 @@ export default () => {
...el.dataset,
hasMetrics: parseBoolean(el.dataset.hasMetrics),
showTimeWindowDropdown: gon.features.metricsTimeWindow,
...props,
},
});
},

View file

@ -12,6 +12,9 @@ class Clusters::ClustersController < Clusters::BaseController
before_action :authorize_update_cluster!, only: [:update]
before_action :authorize_admin_cluster!, only: [:destroy]
before_action :update_applications_status, only: [:cluster_status]
before_action only: [:show] do
push_frontend_feature_flag(:metrics_time_window)
end
helper_method :token_in_session