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
b83c2e28
Commit
b83c2e28
authored
Mar 31, 2020
by
Kirstie Cook
Committed by
Sean McGivern
Mar 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add environment-state flag to metrics data
parent
74096b27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
app/helpers/environments_helper.rb
app/helpers/environments_helper.rb
+2
-1
changelogs/unreleased/212346-set-environment-available-flag.yml
...logs/unreleased/212346-set-environment-available-flag.yml
+5
-0
spec/helpers/environments_helper_spec.rb
spec/helpers/environments_helper_spec.rb
+12
-1
No files found.
app/helpers/environments_helper.rb
View file @
b83c2e28
...
...
@@ -38,7 +38,8 @@ module EnvironmentsHelper
"tags-path"
=>
project_tags_path
(
project
),
"has-metrics"
=>
"
#{
environment
.
has_metrics?
}
"
,
"prometheus-status"
=>
"
#{
environment
.
prometheus_status
}
"
,
"external-dashboard-url"
=>
project
.
metrics_setting_external_dashboard_url
"external-dashboard-url"
=>
project
.
metrics_setting_external_dashboard_url
,
"environment-state"
=>
"
#{
environment
.
state
}
"
}
end
...
...
changelogs/unreleased/212346-set-environment-available-flag.yml
0 → 100644
View file @
b83c2e28
---
title
:
Add environment-state flag to metrics data
merge_request
:
28237
author
:
type
:
added
spec/helpers/environments_helper_spec.rb
View file @
b83c2e28
...
...
@@ -33,7 +33,8 @@ describe EnvironmentsHelper do
'tags-path'
=>
project_tags_path
(
project
),
'has-metrics'
=>
"
#{
environment
.
has_metrics?
}
"
,
'prometheus-status'
=>
"
#{
environment
.
prometheus_status
}
"
,
'external-dashboard-url'
=>
nil
'external-dashboard-url'
=>
nil
,
'environment-state'
=>
environment
.
state
)
end
...
...
@@ -46,5 +47,15 @@ describe EnvironmentsHelper do
expect
(
metrics_data
[
'external-dashboard-url'
]).
to
eq
(
'http://gitlab.com'
)
end
end
context
'when the environment is not available'
do
before
do
environment
.
stop
end
subject
{
metrics_data
}
it
{
is_expected
.
to
include
(
'environment-state'
=>
'stopped'
)
}
end
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