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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
ba97a421
Commit
ba97a421
authored
7 years ago
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove default arguments for common query context
parent
feb94e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb
...rometheus/queries/additional_metrics_environment_query.rb
+3
-1
lib/gitlab/prometheus/queries/query_additional_metrics.rb
lib/gitlab/prometheus/queries/query_additional_metrics.rb
+1
-1
No files found.
lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb
View file @
ba97a421
...
...
@@ -6,7 +6,9 @@ module Gitlab
def
query
(
environment_id
)
Environment
.
find_by
(
id:
environment_id
).
try
do
|
environment
|
query_metrics
(
common_query_context
(
environment
))
query_metrics
(
common_query_context
(
environment
,
timeframe_start:
8
.
hours
.
ago
.
to_f
,
timeframe_end:
Time
.
now
.
to_f
)
)
end
end
end
...
...
This diff is collapsed.
Click to expand it.
lib/gitlab/prometheus/queries/query_additional_metrics.rb
View file @
ba97a421
...
...
@@ -71,7 +71,7 @@ module Gitlab
result
.
select
{
|
group
|
group
.
metrics
.
any?
}
end
def
common_query_context
(
environment
,
timeframe_start:
8
.
hours
.
ago
.
to_f
,
timeframe_end:
Time
.
now
.
to_f
)
def
common_query_context
(
environment
,
timeframe_start
:
,
timeframe_end
:
)
{
timeframe_start:
timeframe_start
,
timeframe_end:
timeframe_end
,
...
...
This diff is collapsed.
Click to expand it.
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