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
0a094a73
Unverified
Commit
0a094a73
authored
Mar 17, 2020
by
Carl Bergquist
Committed by
GitHub
Mar 17, 2020
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Datasource config was not mapped for datasource healthcheck (#22848)
closes #22825
parent
b0407b35
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
pkg/plugins/backendplugin/backend_plugin.go
+20
-0
No files found.
pkg/plugins/backendplugin/backend_plugin.go
View file @
0a094a73
...
...
@@ -205,6 +205,26 @@ func (p *BackendPlugin) checkHealth(ctx context.Context, config *PluginConfig) (
LastUpdatedMS
:
config
.
Updated
.
UnixNano
()
/
int64
(
time
.
Millisecond
),
}
if
config
.
DataSourceConfig
!=
nil
{
datasourceJSONData
,
err
:=
config
.
DataSourceConfig
.
JSONData
.
ToDB
()
if
err
!=
nil
{
return
nil
,
err
}
pconfig
.
DatasourceConfig
=
&
pluginv2
.
DataSourceConfig
{
Id
:
config
.
DataSourceConfig
.
ID
,
Name
:
config
.
DataSourceConfig
.
Name
,
Url
:
config
.
DataSourceConfig
.
URL
,
User
:
config
.
DataSourceConfig
.
User
,
Database
:
config
.
DataSourceConfig
.
Database
,
BasicAuthEnabled
:
config
.
DataSourceConfig
.
BasicAuthEnabled
,
BasicAuthUser
:
config
.
DataSourceConfig
.
BasicAuthUser
,
JsonData
:
datasourceJSONData
,
DecryptedSecureJsonData
:
config
.
DataSourceConfig
.
DecryptedSecureJSONData
,
LastUpdatedMS
:
config
.
DataSourceConfig
.
Updated
.
Unix
()
/
int64
(
time
.
Millisecond
),
}
}
res
,
err
:=
p
.
diagnostics
.
CheckHealth
(
ctx
,
&
pluginv2
.
CheckHealthRequest
{
Config
:
pconfig
})
if
err
!=
nil
{
if
st
,
ok
:=
status
.
FromError
(
err
);
ok
{
...
...
Kornkitt Poolsup
@Doratong24
mentioned in commit
6c001d9c
Mar 05, 2021
mentioned in commit
6c001d9c
mentioned in commit 6c001d9c0968e7ee7c63dd851c8a900d6d8e7b7f
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