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
cdd5ba61
Commit
cdd5ba61
authored
Jun 08, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: influxdb test data source error handling now works better, fixes #8577
parent
6c040572
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
public/app/plugins/datasource/influxdb/datasource.ts
+3
-6
No files found.
public/app/plugins/datasource/influxdb/datasource.ts
View file @
cdd5ba61
...
@@ -200,10 +200,7 @@ export default class InfluxDatasource {
...
@@ -200,10 +200,7 @@ export default class InfluxDatasource {
}
}
return
{
status
:
"success"
,
message
:
"Data source is working"
,
title
:
"Success"
};
return
{
status
:
"success"
,
message
:
"Data source is working"
,
title
:
"Success"
};
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
if
(
err
.
data
&&
err
.
message
)
{
return
{
status
:
"error"
,
message
:
err
.
message
,
title
:
"Test Failed"
};
return
{
status
:
"error"
,
message
:
err
.
data
.
message
,
title
:
"InfluxDB Error"
};
}
return
{
status
:
"error"
,
message
:
err
.
toString
(),
title
:
"InfluxDB Error"
};
});
});
}
}
...
@@ -250,9 +247,9 @@ export default class InfluxDatasource {
...
@@ -250,9 +247,9 @@ export default class InfluxDatasource {
},
function
(
err
)
{
},
function
(
err
)
{
if
(
err
.
status
!==
0
||
err
.
status
>=
300
)
{
if
(
err
.
status
!==
0
||
err
.
status
>=
300
)
{
if
(
err
.
data
&&
err
.
data
.
error
)
{
if
(
err
.
data
&&
err
.
data
.
error
)
{
throw
{
message
:
'InfluxDB Error
Response
: '
+
err
.
data
.
error
,
data
:
err
.
data
,
config
:
err
.
config
};
throw
{
message
:
'InfluxDB Error: '
+
err
.
data
.
error
,
data
:
err
.
data
,
config
:
err
.
config
};
}
else
{
}
else
{
throw
{
message
:
'
InfluxDB Error: '
+
err
.
message
,
data
:
err
.
data
,
config
:
err
.
config
};
throw
{
message
:
'
Network Error: '
+
err
.
statusText
+
'('
+
err
.
status
+
')'
,
data
:
err
.
data
,
config
:
err
.
config
};
}
}
}
}
});
});
...
...
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