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
e6e97c19
Commit
e6e97c19
authored
Nov 13, 2019
by
Tristan Read
Committed by
James Lopez
Nov 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove grafana integration feature flag
parent
98d75c2e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
7 additions
and
47 deletions
+7
-47
app/assets/javascripts/pages/projects/settings/operations/show/index.js
...ascripts/pages/projects/settings/operations/show/index.js
+1
-3
app/controllers/projects/grafana_api_controller.rb
app/controllers/projects/grafana_api_controller.rb
+0
-6
changelogs/unreleased/tr-remove-grafana-ff.yml
changelogs/unreleased/tr-remove-grafana-ff.yml
+5
-0
lib/banzai/filter/inline_grafana_metrics_filter.rb
lib/banzai/filter/inline_grafana_metrics_filter.rb
+0
-2
lib/gitlab/gon_helper.rb
lib/gitlab/gon_helper.rb
+0
-3
spec/controllers/projects/grafana_api_controller_spec.rb
spec/controllers/projects/grafana_api_controller_spec.rb
+0
-12
spec/features/projects/settings/operations_settings_spec.rb
spec/features/projects/settings/operations_settings_spec.rb
+1
-11
spec/lib/banzai/filter/inline_grafana_metrics_filter_spec.rb
spec/lib/banzai/filter/inline_grafana_metrics_filter_spec.rb
+0
-10
No files found.
app/assets/javascripts/pages/projects/settings/operations/show/index.js
View file @
e6e97c19
...
...
@@ -6,8 +6,6 @@ import initSettingsPanels from '~/settings_panels';
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
mountErrorTrackingForm
();
mountOperationSettings
();
if
(
gon
.
features
.
gfmGrafanaIntegration
)
{
mountGrafanaIntegration
();
}
mountGrafanaIntegration
();
initSettingsPanels
();
});
app/controllers/projects/grafana_api_controller.rb
View file @
e6e97c19
...
...
@@ -4,8 +4,6 @@ class Projects::GrafanaApiController < Projects::ApplicationController
include
RenderServiceResults
include
MetricsDashboard
before_action
:validate_feature_enabled!
,
only:
[
:metrics_dashboard
]
def
proxy
result
=
::
Grafana
::
ProxyService
.
new
(
project
,
...
...
@@ -26,10 +24,6 @@ class Projects::GrafanaApiController < Projects::ApplicationController
params
.
permit
(
:embedded
,
:grafana_url
)
end
def
validate_feature_enabled!
render_403
unless
Feature
.
enabled?
(
:gfm_grafana_integration
)
end
def
query_params
params
.
permit
(
:query
,
:start
,
:end
,
:step
)
end
...
...
changelogs/unreleased/tr-remove-grafana-ff.yml
0 → 100644
View file @
e6e97c19
---
title
:
Allow Grafana charts to be embedded in Gitlab Flavored Markdown
merge_request
:
18486
author
:
type
:
added
lib/banzai/filter/inline_grafana_metrics_filter.rb
View file @
e6e97c19
...
...
@@ -18,8 +18,6 @@ module Banzai
end
def
embed_params
(
node
)
return
unless
Feature
.
enabled?
(
:gfm_grafana_integration
)
query_params
=
Gitlab
::
Metrics
::
Dashboard
::
Url
.
parse_query
(
node
[
'href'
])
return
unless
[
:panelId
,
:from
,
:to
].
all?
do
|
param
|
query_params
.
include?
(
param
)
...
...
lib/gitlab/gon_helper.rb
View file @
e6e97c19
...
...
@@ -42,9 +42,6 @@ module Gitlab
# Initialize gon.features with any flags that should be
# made globally available to the frontend
push_frontend_feature_flag
(
:suppress_ajax_navigation_errors
,
default_enabled:
true
)
# Flag controls a GFM feature used across many routes.
push_frontend_feature_flag
(
:gfm_grafana_integration
)
end
# Exposes the state of a feature flag to the frontend code.
...
...
spec/controllers/projects/grafana_api_controller_spec.rb
View file @
e6e97c19
...
...
@@ -164,17 +164,5 @@ describe Projects::GrafanaApiController do
it_behaves_like
'error response'
,
:bad_request
end
end
context
'when grafana embeds are not enabled'
do
before
do
stub_feature_flags
(
gfm_grafana_integration:
false
)
end
it
'returns 403 immediately'
do
get
:metrics_dashboard
,
params:
params
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
end
end
end
end
spec/features/projects/settings/operations_settings_spec.rb
View file @
e6e97c19
...
...
@@ -104,17 +104,7 @@ describe 'Projects > Settings > For a forked project', :js do
end
context
'grafana integration settings form'
do
it
'is not present when the feature flag is disabled'
do
stub_feature_flags
(
gfm_grafana_integration:
false
)
visit
project_settings_operations_path
(
project
)
wait_for_requests
expect
(
page
).
to
have_no_css
(
'.js-grafana-integration'
)
end
it
'is present when the feature flag is enabled'
do
it
'successfully fills and completes the form'
do
visit
project_settings_operations_path
(
project
)
wait_for_requests
...
...
spec/lib/banzai/filter/inline_grafana_metrics_filter_spec.rb
View file @
e6e97c19
...
...
@@ -18,16 +18,6 @@ describe Banzai::Filter::InlineGrafanaMetricsFilter do
'&var-instance=All&panelId=14'
end
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
gfm_grafana_integration:
false
)
end
it
'leaves the markdown unchanged'
do
expect
(
unescape
(
doc
.
to_s
)).
to
eq
(
input
)
end
end
it
'appends a metrics charts placeholder with dashboard url after metrics links'
do
node
=
doc
.
at_css
(
'.js-render-metrics'
)
expect
(
node
).
to
be_present
...
...
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