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
5ecf5224
Commit
5ecf5224
authored
Apr 21, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move alerts-endpoint inside ClusterPresenter
parent
4949b735
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-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
+12
-1
No files found.
ee/app/presenters/ee/clusters/cluster_presenter.rb
View file @
5ecf5224
...
...
@@ -15,7 +15,8 @@ module EE
'empty-unable-to-connect-svg-path'
:
image_path
(
'illustrations/monitoring/unable_to_connect.svg'
),
'settings-path'
:
''
,
'project-path'
:
''
,
'tags-path'
:
''
'tags-path'
:
''
,
'alerts-endpoint'
:
alerts_endpoint
}
end
...
...
@@ -24,6 +25,10 @@ module EE
def
image_path
(
path
)
ActionController
::
Base
.
helpers
.
image_path
(
path
)
end
def
alerts_endpoint
'/'
if
::
Feature
.
enabled?
(
:prometheus_computed_alerts
)
end
end
end
end
ee/spec/presenters/ee/clusters/cluster_presenter_spec.rb
View file @
5ecf5224
...
...
@@ -28,9 +28,20 @@ describe Clusters::ClusterPresenter do
'empty-unable-to-connect-svg-path'
:
match_asset_path
(
'/assets/illustrations/monitoring/unable_to_connect.svg'
),
'settings-path'
:
''
,
'project-path'
:
''
,
'tags-path'
:
''
'tags-path'
:
''
,
'alerts-endpoint'
:
'/'
)
end
context
'when prometheus_computed_alerts feature is disabled'
do
before
do
stub_feature_flags
(
prometheus_computed_alerts:
false
)
end
it
'alerts-endpoint is nil'
do
expect
(
subject
[
'alerts-endpoint'
]).
to
be_nil
end
end
end
context
'with project cluster'
do
...
...
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