Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a4e320a4
Commit
a4e320a4
authored
Jun 12, 2019
by
Reuben Pereira
Committed by
Mike Greiling
Jun 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the grafana_dashboard_link feature flag
parent
b98633ad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
58 deletions
+21
-58
app/assets/javascripts/operation_settings/index.js
app/assets/javascripts/operation_settings/index.js
+0
-8
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+0
-1
app/controllers/projects/settings/operations_controller.rb
app/controllers/projects/settings/operations_controller.rb
+0
-4
changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml
...unreleased/remove-grafana-dashboard-link-feature-flag.yml
+5
-0
spec/javascripts/monitoring/dashboard_spec.js
spec/javascripts/monitoring/dashboard_spec.js
+16
-45
No files found.
app/assets/javascripts/operation_settings/index.js
View file @
a4e320a4
...
@@ -3,14 +3,6 @@ import store from './store';
...
@@ -3,14 +3,6 @@ import store from './store';
import
ExternalDashboardForm
from
'
./components/external_dashboard.vue
'
;
import
ExternalDashboardForm
from
'
./components/external_dashboard.vue
'
;
export
default
()
=>
{
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
'
);
const
el
=
document
.
querySelector
(
'
.js-operation-settings
'
);
return
new
Vue
({
return
new
Vue
({
...
...
app/controllers/projects/environments_controller.rb
View file @
a4e320a4
...
@@ -13,7 +13,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
...
@@ -13,7 +13,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action
only:
[
:metrics
,
:additional_metrics
,
:metrics_dashboard
]
do
before_action
only:
[
:metrics
,
:additional_metrics
,
:metrics_dashboard
]
do
push_frontend_feature_flag
(
:environment_metrics_use_prometheus_endpoint
)
push_frontend_feature_flag
(
:environment_metrics_use_prometheus_endpoint
)
push_frontend_feature_flag
(
:environment_metrics_show_multiple_dashboards
)
push_frontend_feature_flag
(
:environment_metrics_show_multiple_dashboards
)
push_frontend_feature_flag
(
:grafana_dashboard_link
)
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
end
end
...
...
app/controllers/projects/settings/operations_controller.rb
View file @
a4e320a4
...
@@ -5,10 +5,6 @@ module Projects
...
@@ -5,10 +5,6 @@ module Projects
class
OperationsController
<
Projects
::
ApplicationController
class
OperationsController
<
Projects
::
ApplicationController
before_action
:authorize_update_environment!
before_action
:authorize_update_environment!
before_action
do
push_frontend_feature_flag
(
:grafana_dashboard_link
)
end
helper_method
:error_tracking_setting
helper_method
:error_tracking_setting
def
show
def
show
...
...
changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml
0 → 100644
View file @
a4e320a4
---
title
:
Link to an external dashboard from metrics dashboard
merge_request
:
29369
author
:
type
:
added
spec/javascripts/monitoring/dashboard_spec.js
View file @
a4e320a4
...
@@ -49,9 +49,6 @@ describe('Dashboard', () => {
...
@@ -49,9 +49,6 @@ describe('Dashboard', () => {
window
.
gon
=
{
window
.
gon
=
{
...
window
.
gon
,
...
window
.
gon
,
ee
:
false
,
ee
:
false
,
features
:
{
grafanaDashboardLink
:
true
,
},
};
};
store
=
createStore
();
store
=
createStore
();
...
@@ -382,52 +379,26 @@ describe('Dashboard', () => {
...
@@ -382,52 +379,26 @@ describe('Dashboard', () => {
describe
(
'
external dashboard link
'
,
()
=>
{
describe
(
'
external dashboard link
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
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
=>
{
component
=
new
DashboardComponent
({
setTimeout
(()
=>
{
el
:
document
.
querySelector
(
'
.prometheus-graphs
'
),
expect
(
component
.
$el
.
querySelector
(
'
.js-external-dashboard-link
'
).
innerText
).
toContain
(
propsData
:
{
'
View full dashboard
'
,
...
propsData
,
);
hasMetrics
:
true
,
done
();
showPanels
:
false
,
});
showTimeWindowDropdown
:
false
,
externalDashboardUrl
:
'
/mockUrl
'
,
},
store
,
});
});
});
});
describe
(
'
without feature flage enabled
'
,
()
=>
{
it
(
'
shows the link
'
,
done
=>
{
beforeEach
(()
=>
{
setTimeout
(()
=>
{
window
.
gon
.
features
.
grafanaDashboardLink
=
false
;
expect
(
component
.
$el
.
querySelector
(
'
.js-external-dashboard-link
'
).
innerText
).
toContain
(
component
=
new
DashboardComponent
({
'
View full dashboard
'
,
el
:
document
.
querySelector
(
'
.prometheus-graphs
'
),
);
propsData
:
{
done
();
...
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
();
});
});
});
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment