diff options
author | Mike Greiling <mike@pixelcog.com> | 2019-06-12 19:20:22 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-06-12 19:20:22 +0000 |
commit | c5902f159533ccd6ee9102982f8cd8a150461bd1 (patch) | |
tree | 007779f6b7e74f293ad73212629b8617fc4a4fdd | |
parent | b98633ade38bb75d750608f422c9fbc4b4080909 (diff) | |
parent | a4e320a42c1d1b973719e27e0ebc9fc96c173a03 (diff) | |
download | gitlab-ce-c5902f159533ccd6ee9102982f8cd8a150461bd1.tar.gz |
Merge branch 'remove-grafana-dashboard-link-feature-flag' into 'master'
Remove the grafana_dashboard_link feature flag
See merge request gitlab-org/gitlab-ce!29344
5 files changed, 21 insertions, 58 deletions
diff --git a/app/assets/javascripts/operation_settings/index.js b/app/assets/javascripts/operation_settings/index.js index 6946578e6d2..f075291ce98 100644 --- a/app/assets/javascripts/operation_settings/index.js +++ b/app/assets/javascripts/operation_settings/index.js @@ -3,14 +3,6 @@ import store from './store'; import ExternalDashboardForm from './components/external_dashboard.vue'; export default () => { - /** - * This check can be removed when we remove - * the :grafana_dashboard_link feature flag - */ - if (!gon.features.grafanaDashboardLink) { - return null; - } - const el = document.querySelector('.js-operation-settings'); return new Vue({ diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index e002a4d349b..08a0647f6b2 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -13,7 +13,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController before_action only: [:metrics, :additional_metrics, :metrics_dashboard] do push_frontend_feature_flag(:environment_metrics_use_prometheus_endpoint) push_frontend_feature_flag(:environment_metrics_show_multiple_dashboards) - push_frontend_feature_flag(:grafana_dashboard_link) push_frontend_feature_flag(:prometheus_computed_alerts) end diff --git a/app/controllers/projects/settings/operations_controller.rb b/app/controllers/projects/settings/operations_controller.rb index b5c77e5bbf4..5cfb0ac307d 100644 --- a/app/controllers/projects/settings/operations_controller.rb +++ b/app/controllers/projects/settings/operations_controller.rb @@ -5,10 +5,6 @@ module Projects class OperationsController < Projects::ApplicationController before_action :authorize_update_environment! - before_action do - push_frontend_feature_flag(:grafana_dashboard_link) - end - helper_method :error_tracking_setting def show diff --git a/changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml b/changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml new file mode 100644 index 00000000000..24b5fb50e40 --- /dev/null +++ b/changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml @@ -0,0 +1,5 @@ +--- +title: Link to an external dashboard from metrics dashboard +merge_request: 29369 +author: +type: added diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js index f9c3122088e..f1d578648b8 100644 --- a/spec/javascripts/monitoring/dashboard_spec.js +++ b/spec/javascripts/monitoring/dashboard_spec.js @@ -49,9 +49,6 @@ describe('Dashboard', () => { window.gon = { ...window.gon, ee: false, - features: { - grafanaDashboardLink: true, - }, }; store = createStore(); @@ -382,52 +379,26 @@ describe('Dashboard', () => { describe('external dashboard link', () => { beforeEach(() => { mock.onGet(mockApiEndpoint).reply(200, metricsGroupsAPIResponse); - }); - - describe('with feature flag enabled', () => { - beforeEach(() => { - component = new DashboardComponent({ - el: document.querySelector('.prometheus-graphs'), - propsData: { - ...propsData, - hasMetrics: true, - showPanels: false, - externalDashboardUrl: '/mockUrl', - }, - store, - }); - }); - it('shows the link', done => { - setTimeout(() => { - expect(component.$el.querySelector('.js-external-dashboard-link').innerText).toContain( - 'View full dashboard', - ); - done(); - }); + component = new DashboardComponent({ + el: document.querySelector('.prometheus-graphs'), + propsData: { + ...propsData, + hasMetrics: true, + showPanels: false, + showTimeWindowDropdown: false, + externalDashboardUrl: '/mockUrl', + }, + store, }); }); - describe('without feature flage enabled', () => { - beforeEach(() => { - window.gon.features.grafanaDashboardLink = false; - component = new DashboardComponent({ - el: document.querySelector('.prometheus-graphs'), - propsData: { - ...propsData, - hasMetrics: true, - showPanels: false, - externalDashboardUrl: '', - }, - store, - }); - }); - - it('does not show the link', done => { - setTimeout(() => { - expect(component.$el.querySelector('.js-external-dashboard-link')).toBe(null); - done(); - }); + it('shows the link', done => { + setTimeout(() => { + expect(component.$el.querySelector('.js-external-dashboard-link').innerText).toContain( + 'View full dashboard', + ); + done(); }); }); }); |