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
7c0fc59d
Commit
7c0fc59d
authored
Dec 13, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
execute process directly instead of creating sub shell
parent
411e8a16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
pkg/plugins/backend_datasource.go
+8
-6
pkg/tsdb/models/proxy/wrapper.go
+1
-0
No files found.
pkg/plugins/backend_datasource.go
View file @
7c0fc59d
...
@@ -24,17 +24,19 @@ type BackendDatasource struct {
...
@@ -24,17 +24,19 @@ type BackendDatasource struct {
client
*
plugin
.
Client
client
*
plugin
.
Client
}
}
var
handshakeConfig
=
plugin
.
HandshakeConfig
{
ProtocolVersion
:
1
,
MagicCookieKey
:
"GRAFANA_BACKEND_DATASOURCE"
,
MagicCookieValue
:
"55d2200a-6492-493a-9353-73b728d468aa"
,
}
func
(
p
*
BackendDatasource
)
initBackendPlugin
(
log
log
.
Logger
)
error
{
func
(
p
*
BackendDatasource
)
initBackendPlugin
(
log
log
.
Logger
)
error
{
p
.
log
=
log
.
New
(
"plugin-id"
,
p
.
Id
)
p
.
log
=
log
.
New
(
"plugin-id"
,
p
.
Id
)
p
.
client
=
plugin
.
NewClient
(
&
plugin
.
ClientConfig
{
p
.
client
=
plugin
.
NewClient
(
&
plugin
.
ClientConfig
{
HandshakeConfig
:
plugin
.
HandshakeConfig
{
HandshakeConfig
:
handshakeConfig
,
ProtocolVersion
:
1
,
MagicCookieKey
:
"BASIC_PLUGIN"
,
MagicCookieValue
:
"hello"
,
},
Plugins
:
map
[
string
]
plugin
.
Plugin
{
p
.
Id
:
&
shared
.
TsdbPluginImpl
{}},
Plugins
:
map
[
string
]
plugin
.
Plugin
{
p
.
Id
:
&
shared
.
TsdbPluginImpl
{}},
Cmd
:
exec
.
Command
(
"sh"
,
"-c"
,
path
.
Join
(
p
.
PluginDir
,
p
.
Executable
)),
Cmd
:
exec
.
Command
(
path
.
Join
(
p
.
PluginDir
,
p
.
Executable
)),
AllowedProtocols
:
[]
plugin
.
Protocol
{
plugin
.
ProtocolGRPC
},
AllowedProtocols
:
[]
plugin
.
Protocol
{
plugin
.
ProtocolGRPC
},
Logger
:
backend
.
LogWrapper
{
Logger
:
p
.
log
},
Logger
:
backend
.
LogWrapper
{
Logger
:
p
.
log
},
})
})
...
...
pkg/tsdb/models/proxy/wrapper.go
View file @
7c0fc59d
...
@@ -64,6 +64,7 @@ func (tw *TsdbWrapper) Query(ctx context.Context, ds *models.DataSource, query *
...
@@ -64,6 +64,7 @@ func (tw *TsdbWrapper) Query(ctx context.Context, ds *models.DataSource, query *
res
:=
&
tsdb
.
Response
{
res
:=
&
tsdb
.
Response
{
Message
:
pbres
.
Message
,
Message
:
pbres
.
Message
,
Results
:
map
[
string
]
*
tsdb
.
QueryResult
{},
}
}
for
_
,
r
:=
range
pbres
.
Results
{
for
_
,
r
:=
range
pbres
.
Results
{
...
...
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