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
6bc88545
Commit
6bc88545
authored
Jul 10, 2020
by
David O'Regan
Committed by
Peter Leitzen
Jul 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alert endpoint dropdown helper
parent
da0d7017
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
13 deletions
+6
-13
app/helpers/operations_helper.rb
app/helpers/operations_helper.rb
+3
-2
app/views/projects/services/alerts/_help.html.haml
app/views/projects/services/alerts/_help.html.haml
+1
-7
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/helpers/operations_helper_spec.rb
spec/helpers/operations_helper_spec.rb
+2
-1
No files found.
app/helpers/operations_helper.rb
View file @
6bc88545
...
...
@@ -15,7 +15,7 @@ module OperationsHelper
end
end
def
alerts_settings_data
def
alerts_settings_data
(
disabled:
false
)
{
'prometheus_activated'
=>
prometheus_service
.
manual_configuration?
.
to_s
,
'activated'
=>
alerts_service
.
activated?
.
to_s
,
...
...
@@ -28,7 +28,8 @@ module OperationsHelper
'prometheus_url'
=>
notify_project_prometheus_alerts_url
(
@project
,
format: :json
),
'url'
=>
alerts_service
.
url
,
'alerts_setup_url'
=>
help_page_path
(
'user/project/integrations/generic_alerts.md'
,
anchor:
'setting-up-generic-alerts'
),
'alerts_usage_url'
=>
project_alert_management_index_path
(
@project
)
'alerts_usage_url'
=>
project_alert_management_index_path
(
@project
),
'disabled'
=>
disabled
.
to_s
}
end
end
...
...
app/views/projects/services/alerts/_help.html.haml
View file @
6bc88545
.js-alerts-service-settings
{
data:
{
activated:
@service
.
activated?
.
to_s
,
form_path:
scoped_integration_path
(
@service
),
authorization_key:
@service
.
token
,
url:
@service
.
url
||
_
(
'<namespace / project>'
),
disabled:
'true'
,
alerts_setup_url:
help_page_path
(
'user/project/integrations/generic_alerts.md'
,
anchor:
'setting-up-generic-alerts'
),
alerts_usage_url:
help_page_path
(
'user/project/operations/alert_management.md'
)
}
}
.js-alerts-service-settings
{
data:
alerts_settings_data
(
disabled:
true
)
}
locale/gitlab.pot
View file @
6bc88545
...
...
@@ -983,9 +983,6 @@ msgstr ""
msgid "<code>Protected</code> to expose them to protected branches or tags only."
msgstr ""
msgid "<namespace / project>"
msgstr ""
msgid "<no name set>"
msgstr ""
...
...
spec/helpers/operations_helper_spec.rb
View file @
6bc88545
...
...
@@ -39,7 +39,8 @@ RSpec.describe OperationsHelper do
'prometheus_authorization_key'
=>
nil
,
'prometheus_api_url'
=>
nil
,
'prometheus_activated'
=>
'false'
,
'prometheus_url'
=>
notify_project_prometheus_alerts_url
(
project
,
format: :json
)
'prometheus_url'
=>
notify_project_prometheus_alerts_url
(
project
,
format: :json
),
'disabled'
=>
'false'
)
end
end
...
...
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