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
ad73eddc
Commit
ad73eddc
authored
Aug 13, 2020
by
Tristan Read
Committed by
Miguel Rincon
Aug 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the `alert_runbooks` feature flag
parent
19240517
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
19 deletions
+12
-19
app/assets/javascripts/monitoring/components/alert_widget_form.vue
...s/javascripts/monitoring/components/alert_widget_form.vue
+0
-1
app/controllers/projects/environments_controller.rb
app/controllers/projects/environments_controller.rb
+0
-1
app/controllers/projects/metrics_dashboard_controller.rb
app/controllers/projects/metrics_dashboard_controller.rb
+0
-1
changelogs/unreleased/tr-remove-runbook-feature-flag.yml
changelogs/unreleased/tr-remove-runbook-feature-flag.yml
+5
-0
spec/frontend/monitoring/components/alert_widget_form_spec.js
.../frontend/monitoring/components/alert_widget_form_spec.js
+7
-16
No files found.
app/assets/javascripts/monitoring/components/alert_widget_form.vue
View file @
ad73eddc
...
...
@@ -302,7 +302,6 @@ export default {
/>
</gl-form-group>
<gl-form-group
v-if=
"glFeatures.alertRunbooks"
:label=
"s__('PrometheusAlerts|Runbook URL (optional)')"
label-for=
"alert-runbook"
>
...
...
app/controllers/projects/environments_controller.rb
View file @
ad73eddc
...
...
@@ -14,7 +14,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
push_frontend_feature_flag
(
:disable_metric_dashboard_refresh_rate
)
push_frontend_feature_flag
(
:alert_runbooks
)
push_frontend_feature_flag
(
:metrics_dashboard_new_panel_page
)
end
before_action
:authorize_read_environment!
,
except:
[
:metrics
,
:additional_metrics
,
:metrics_dashboard
,
:metrics_redirect
]
...
...
app/controllers/projects/metrics_dashboard_controller.rb
View file @
ad73eddc
...
...
@@ -10,7 +10,6 @@ module Projects
before_action
do
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
push_frontend_feature_flag
(
:disable_metric_dashboard_refresh_rate
)
push_frontend_feature_flag
(
:alert_runbooks
)
push_frontend_feature_flag
(
:metrics_dashboard_new_panel_page
)
end
...
...
changelogs/unreleased/tr-remove-runbook-feature-flag.yml
0 → 100644
View file @
ad73eddc
---
title
:
Add runbooks to metric alerts
merge_request
:
39315
author
:
type
:
added
spec/frontend/monitoring/components/alert_widget_form_spec.js
View file @
ad73eddc
...
...
@@ -36,7 +36,7 @@ describe('AlertWidgetForm', () => {
configuredAlert
:
metricId
,
};
function
createComponent
(
props
=
{}
,
featureFlags
=
{}
)
{
function
createComponent
(
props
=
{})
{
const
propsData
=
{
...
defaultProps
,
...
props
,
...
...
@@ -44,9 +44,6 @@ describe('AlertWidgetForm', () => {
wrapper
=
shallowMount
(
AlertWidgetForm
,
{
propsData
,
provide
:
{
glFeatures
:
featureFlags
,
},
stubs
:
{
GlModal
:
ModalStub
,
},
...
...
@@ -88,7 +85,7 @@ describe('AlertWidgetForm', () => {
});
it
(
'
emits a "create" event when form submitted without existing alert
'
,
async
()
=>
{
createComponent
(
defaultProps
,
{
alertRunbooks
:
true
}
);
createComponent
(
defaultProps
);
modal
().
vm
.
$emit
(
'
shown
'
);
...
...
@@ -109,7 +106,7 @@ describe('AlertWidgetForm', () => {
});
it
(
'
resets form when modal is dismissed (hidden)
'
,
()
=>
{
createComponent
(
defaultProps
,
{
alertRunbooks
:
true
}
);
createComponent
(
defaultProps
);
modal
().
vm
.
$emit
(
'
shown
'
);
...
...
@@ -199,7 +196,7 @@ describe('AlertWidgetForm', () => {
it
(
'
emits "update" event when form changed
'
,
()
=>
{
const
updatedRunbookUrl
=
`
${
INVALID_URL
}
/test`
;
createComponent
(
propsWithAlertData
,
{
alertRunbooks
:
true
}
);
createComponent
(
propsWithAlertData
);
modal
().
vm
.
$emit
(
'
shown
'
);
...
...
@@ -231,15 +228,9 @@ describe('AlertWidgetForm', () => {
expect
(
submitButtonTrackingOpts
()).
toEqual
(
dataTrackingOptions
.
update
);
});
describe
(
'
alert runbooks feature flag
'
,
()
=>
{
it
(
'
hides the runbook field when the flag is disabled
'
,
()
=>
{
createComponent
(
undefined
,
{
alertRunbooks
:
false
});
expect
(
findRunbookField
().
exists
()).
toBe
(
false
);
});
it
(
'
shows the runbook field when the flag is enabled
'
,
()
=>
{
createComponent
(
undefined
,
{
alertRunbooks
:
true
});
describe
(
'
alert runbooks
'
,
()
=>
{
it
(
'
shows the runbook field
'
,
()
=>
{
createComponent
();
expect
(
findRunbookField
().
exists
()).
toBe
(
true
);
});
...
...
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