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
89a7c2c6
Commit
89a7c2c6
authored
Apr 11, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
influxdb: validate database exist when saving data source, fixes #7864
parent
83e0f69c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
public/app/core/components/query_part/query_part.ts
+0
-2
public/app/plugins/datasource/influxdb/datasource.ts
+10
-1
public/app/plugins/datasource/influxdb/query_part.ts
+0
-1
No files found.
public/app/core/components/query_part/query_part.ts
View file @
89a7c2c6
...
...
@@ -119,5 +119,3 @@ export function identityRenderer(part, innerExpr) {
export
function
quotedIdentityRenderer
(
part
,
innerExpr
)
{
return
'"'
+
part
.
params
[
0
]
+
'"'
;
}
public/app/plugins/datasource/influxdb/datasource.ts
View file @
89a7c2c6
...
...
@@ -193,8 +193,17 @@ export default class InfluxDatasource {
}
testDatasource
()
{
return
this
.
metricFindQuery
(
'SHOW MEASUREMENTS LIMIT 1'
).
then
(()
=>
{
return
this
.
metricFindQuery
(
'SHOW DATABASES'
).
then
(
res
=>
{
let
found
=
_
.
find
(
res
,
{
text
:
this
.
database
});
if
(
!
found
)
{
return
{
status
:
"error"
,
message
:
"Could not find the specified database name."
,
title
:
"DB Not found"
};
}
return
{
status
:
"success"
,
message
:
"Data source is working"
,
title
:
"Success"
};
}).
catch
(
err
=>
{
if
(
err
.
data
&&
err
.
message
)
{
return
{
status
:
"error"
,
message
:
err
.
data
.
message
,
title
:
"InfluxDB Error"
};
}
return
{
status
:
"error"
,
message
:
err
.
toString
(),
title
:
"InfluxDB Error"
};
});
}
...
...
public/app/plugins/datasource/influxdb/query_part.ts
View file @
89a7c2c6
...
...
@@ -292,7 +292,6 @@ register({
renderer
:
functionRenderer
,
});
debugger
;
register
({
type
:
'holt_winters_with_fit'
,
addStrategy
:
addTransformationStrategy
,
...
...
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