Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
c65db9bf
Unverified
Commit
c65db9bf
authored
Mar 13, 2020
by
Ryan McKinley
Committed by
GitHub
Mar 13, 2020
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: remove expressions flag and allow (#22764)
parent
31789466
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
pkg/api/metrics.go
+4
-4
No files found.
pkg/api/metrics.go
View file @
c65db9bf
...
@@ -19,10 +19,6 @@ import (
...
@@ -19,10 +19,6 @@ import (
// QueryMetricsV2 returns query metrics
// QueryMetricsV2 returns query metrics
// POST /api/ds/query DataSource query w/ expressions
// POST /api/ds/query DataSource query w/ expressions
func
(
hs
*
HTTPServer
)
QueryMetricsV2
(
c
*
models
.
ReqContext
,
reqDto
dtos
.
MetricRequest
)
Response
{
func
(
hs
*
HTTPServer
)
QueryMetricsV2
(
c
*
models
.
ReqContext
,
reqDto
dtos
.
MetricRequest
)
Response
{
if
!
setting
.
IsExpressionsEnabled
()
{
return
Error
(
404
,
"Expressions feature toggle is not enabled"
,
nil
)
}
if
len
(
reqDto
.
Queries
)
==
0
{
if
len
(
reqDto
.
Queries
)
==
0
{
return
Error
(
500
,
"No queries found in query"
,
nil
)
return
Error
(
500
,
"No queries found in query"
,
nil
)
}
}
...
@@ -76,6 +72,10 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
...
@@ -76,6 +72,10 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
return
Error
(
500
,
"Metric request error"
,
err
)
return
Error
(
500
,
"Metric request error"
,
err
)
}
}
}
else
{
}
else
{
if
!
setting
.
IsExpressionsEnabled
()
{
return
Error
(
404
,
"Expressions feature toggle is not enabled"
,
nil
)
}
resp
,
err
=
plugins
.
Transform
.
Transform
(
c
.
Req
.
Context
(),
request
)
resp
,
err
=
plugins
.
Transform
.
Transform
(
c
.
Req
.
Context
(),
request
)
if
err
!=
nil
{
if
err
!=
nil
{
return
Error
(
500
,
"Transform request error"
,
err
)
return
Error
(
500
,
"Transform request error"
,
err
)
...
...
Kornkitt Poolsup
@Doratong24
mentioned in commit
ed307897
Mar 05, 2021
mentioned in commit
ed307897
mentioned in commit ed307897e7d407edc4b62a0a1424ff2d3f6d72dd
Toggle commit list
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