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
83bc462c
Commit
83bc462c
authored
Apr 21, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move prometheus-alerts-available inside presenter
parent
5ecf5224
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
ee/app/presenters/ee/clusters/cluster_presenter.rb
ee/app/presenters/ee/clusters/cluster_presenter.rb
+6
-1
ee/spec/presenters/ee/clusters/cluster_presenter_spec.rb
ee/spec/presenters/ee/clusters/cluster_presenter_spec.rb
+6
-1
No files found.
ee/app/presenters/ee/clusters/cluster_presenter.rb
View file @
83bc462c
...
@@ -16,7 +16,8 @@ module EE
...
@@ -16,7 +16,8 @@ module EE
'settings-path'
:
''
,
'settings-path'
:
''
,
'project-path'
:
''
,
'project-path'
:
''
,
'tags-path'
:
''
,
'tags-path'
:
''
,
'alerts-endpoint'
:
alerts_endpoint
'alerts-endpoint'
:
alerts_endpoint
,
'prometheus-alerts-available'
:
prometheus_alerts_available
}
}
end
end
...
@@ -29,6 +30,10 @@ module EE
...
@@ -29,6 +30,10 @@ module EE
def
alerts_endpoint
def
alerts_endpoint
'/'
if
::
Feature
.
enabled?
(
:prometheus_computed_alerts
)
'/'
if
::
Feature
.
enabled?
(
:prometheus_computed_alerts
)
end
end
def
prometheus_alerts_available
'true'
if
::
Feature
.
enabled?
(
:prometheus_computed_alerts
)
end
end
end
end
end
end
end
ee/spec/presenters/ee/clusters/cluster_presenter_spec.rb
View file @
83bc462c
...
@@ -29,7 +29,8 @@ describe Clusters::ClusterPresenter do
...
@@ -29,7 +29,8 @@ describe Clusters::ClusterPresenter do
'settings-path'
:
''
,
'settings-path'
:
''
,
'project-path'
:
''
,
'project-path'
:
''
,
'tags-path'
:
''
,
'tags-path'
:
''
,
'alerts-endpoint'
:
'/'
'alerts-endpoint'
:
'/'
,
'prometheus-alerts-available'
:
'true'
)
)
end
end
...
@@ -41,6 +42,10 @@ describe Clusters::ClusterPresenter do
...
@@ -41,6 +42,10 @@ describe Clusters::ClusterPresenter do
it
'alerts-endpoint is nil'
do
it
'alerts-endpoint is nil'
do
expect
(
subject
[
'alerts-endpoint'
]).
to
be_nil
expect
(
subject
[
'alerts-endpoint'
]).
to
be_nil
end
end
it
'prometheus-alerts-available is nil'
do
expect
(
subject
[
'prometheus-alerts-available'
]).
to
be_nil
end
end
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