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
890e1d8f
Unverified
Commit
890e1d8f
authored
May 05, 2020
by
Marcus Efraimsson
Committed by
GitHub
May 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backend plugins: Send query type to backend plugins (#24120)
Use v0.60.0 of sdk.
parent
d66d9aa6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
3 deletions
+10
-3
go.mod
+1
-1
go.sum
+4
-2
pkg/api/metrics.go
+1
-0
pkg/plugins/datasource/wrapper/datasource_plugin_wrapper_v2.go
+1
-0
pkg/plugins/transform_plugin.go
+2
-0
pkg/tsdb/models.go
+1
-0
No files found.
go.mod
View file @
890e1d8f
...
...
@@ -30,7 +30,7 @@ require (
github.com/gorilla/websocket v1.4.1
github.com/gosimple/slug v1.4.2
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4
github.com/grafana/grafana-plugin-sdk-go v0.
57
.0
github.com/grafana/grafana-plugin-sdk-go v0.
60
.0
github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd
github.com/hashicorp/go-plugin v1.2.2
github.com/hashicorp/go-version v1.1.0
...
...
go.sum
View file @
890e1d8f
...
...
@@ -135,8 +135,8 @@ github.com/gosimple/slug v1.4.2 h1:jDmprx3q/9Lfk4FkGZtvzDQ9Cj9eAmsjzeQGp24PeiQ=
github.com/gosimple/slug v1.4.2/go.mod h1:ER78kgg1Mv0NQGlXiDe57DpCyfbNywXXZ9mIorhxAf0=
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4 h1:SPdxCL9BChFTlyi0Khv64vdCW4TMna8+sxL7+Chx+Ag=
github.com/grafana/grafana-plugin-model v0.0.0-20190930120109-1fc953a61fb4/go.mod h1:nc0XxBzjeGcrMltCDw269LoWF9S8ibhgxolCdA1R8To=
github.com/grafana/grafana-plugin-sdk-go v0.
57.0 h1:eJnAjUh50uGimDCyK9gA2tzFzMntL6j3vWiSfTNj10g
=
github.com/grafana/grafana-plugin-sdk-go v0.
57.0/go.mod h1:cJqtJv4uuWOB3SAUToTMa8yQoNxEtF07CabXHwsr5fc
=
github.com/grafana/grafana-plugin-sdk-go v0.
60.0 h1:9IhNRdoaRi2RQflmNQHv2VuqXRGigpLacoYHHXZ+XBU
=
github.com/grafana/grafana-plugin-sdk-go v0.
60.0/go.mod h1:V3mq3GjPrIOc4K9jOm3mP5scJQgx9NJaYQ3cUlxm8vE
=
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg=
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
...
...
@@ -212,6 +212,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 h1:7GoSOOW2jpsfkntVKaS2rAr1TJqfcxotyaUcuxoZSzg=
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE=
github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
...
...
pkg/api/metrics.go
View file @
890e1d8f
...
...
@@ -59,6 +59,7 @@ func (hs *HTTPServer) QueryMetricsV2(c *models.ReqContext, reqDto dtos.MetricReq
RefId
:
query
.
Get
(
"refId"
)
.
MustString
(
"A"
),
MaxDataPoints
:
query
.
Get
(
"maxDataPoints"
)
.
MustInt64
(
100
),
IntervalMs
:
query
.
Get
(
"intervalMs"
)
.
MustInt64
(
1000
),
QueryType
:
query
.
Get
(
"queryType"
)
.
MustString
(
""
),
Model
:
query
,
DataSource
:
ds
,
})
...
...
pkg/plugins/datasource/wrapper/datasource_plugin_wrapper_v2.go
View file @
890e1d8f
...
...
@@ -75,6 +75,7 @@ func (tw *DatasourcePluginWrapperV2) Query(ctx context.Context, ds *models.DataS
ToEpochMS
:
query
.
TimeRange
.
GetToAsMsEpoch
(),
FromEpochMS
:
query
.
TimeRange
.
GetFromAsMsEpoch
(),
},
QueryType
:
q
.
QueryType
,
})
}
...
...
pkg/plugins/transform_plugin.go
View file @
890e1d8f
...
...
@@ -93,6 +93,7 @@ func (tw *TransformWrapper) Transform(ctx context.Context, query *tsdb.TsdbQuery
IntervalMS
:
q
.
IntervalMs
,
RefId
:
q
.
RefId
,
MaxDataPoints
:
q
.
MaxDataPoints
,
QueryType
:
q
.
QueryType
,
TimeRange
:
&
pluginv2
.
TimeRange
{
ToEpochMS
:
query
.
TimeRange
.
GetToAsMsEpoch
(),
FromEpochMS
:
query
.
TimeRange
.
GetFromAsMsEpoch
(),
...
...
@@ -160,6 +161,7 @@ func (s *transformCallback) QueryData(ctx context.Context, req *pluginv2.QueryDa
RefId
:
query
.
RefId
,
IntervalMs
:
query
.
IntervalMS
,
MaxDataPoints
:
query
.
MaxDataPoints
,
QueryType
:
query
.
QueryType
,
DataSource
:
getDsInfo
.
Result
,
Model
:
sj
,
}
...
...
pkg/tsdb/models.go
View file @
890e1d8f
...
...
@@ -21,6 +21,7 @@ type Query struct {
DataSource
*
models
.
DataSource
MaxDataPoints
int64
IntervalMs
int64
QueryType
string
}
type
Response
struct
{
...
...
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