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
09fe5c30
Commit
09fe5c30
authored
Jan 05, 2018
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename active metrics route
parent
776c71aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/projects/prometheus/metrics_controller.rb
app/controllers/projects/prometheus/metrics_controller.rb
+1
-1
app/views/projects/services/prometheus/_show.html.haml
app/views/projects/services/prometheus/_show.html.haml
+1
-1
config/routes/project.rb
config/routes/project.rb
+1
-1
No files found.
app/controllers/projects/prometheus/metrics_controller.rb
View file @
09fe5c30
...
...
@@ -4,7 +4,7 @@ module Projects
before_action
:authorize_read_project!
before_action
:require_prometheus_metrics!
def
active
def
active
_common
respond_to
do
|
format
|
format
.
json
do
matched_metrics
=
prometheus_service
.
matched_metrics
||
{}
...
...
app/views/projects/services/prometheus/_show.html.haml
View file @
09fe5c30
...
...
@@ -28,7 +28,7 @@
=
link_to
s_
(
'PrometheusService|New metric'
),
new_project_prometheus_metric_path
(
@project
),
class:
'btn btn-success'
%ul
.list-unstyled.metrics-list.hidden.js-custom-metrics-list
.panel.panel-default.js-panel-monitored-metrics
{
data:
{
"active-metrics"
=>
"#{active_project_prometheus_metrics_path(@project, :json)}"
}
}
.panel.panel-default.js-panel-monitored-metrics
{
data:
{
"active-metrics"
=>
"#{active_
common_
project_prometheus_metrics_path(@project, :json)}"
}
}
.panel-heading
%h3
.panel-title
=
s_
(
'PrometheusService|Common metrics'
)
...
...
config/routes/project.rb
View file @
09fe5c30
...
...
@@ -75,7 +75,7 @@ constraints(ProjectUrlConstrainer.new) do
namespace
:prometheus
do
resources
:metrics
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:index
,
:new
,
:create
,
:edit
,
:update
,
:destroy
]
do
post
:validate_query
,
on: :collection
get
:active
,
on: :collection
get
:active
_common
,
on: :collection
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