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
ed307897
Commit
ed307897
authored
Mar 13, 2020
by
Ryan McKinley
Committed by
Arve Knudsen
Mar 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: remove expressions flag and allow (#22764)
(cherry picked from commit
c65db9bf
)
parent
1d63f57c
Show 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 @
ed307897
...
...
@@ -19,10 +19,6 @@ import (
// QueryMetricsV2 returns query metrics
// POST /api/ds/query DataSource query w/ expressions
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
{
return
Error
(
500
,
"No queries found in query"
,
nil
)
}
...
...
@@ -76,6 +72,10 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
return
Error
(
500
,
"Metric request error"
,
err
)
}
}
else
{
if
!
setting
.
IsExpressionsEnabled
()
{
return
Error
(
404
,
"Expressions feature toggle is not enabled"
,
nil
)
}
resp
,
err
=
plugins
.
Transform
.
Transform
(
c
.
Req
.
Context
(),
request
)
if
err
!=
nil
{
return
Error
(
500
,
"Transform request error"
,
err
)
...
...
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