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
a5f0f508
Commit
a5f0f508
authored
Aug 16, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(inspector): fixed error handling, showing response body when data proxy returns text/html body
parent
58df60f6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
public/app/core/controllers/inspect_ctrl.js
+5
-1
public/app/core/services/backend_srv.ts
+2
-1
No files found.
public/app/core/controllers/inspect_ctrl.js
View file @
a5f0f508
...
...
@@ -7,7 +7,7 @@ define([
function
(
angular
,
_
,
$
,
coreModule
)
{
'use strict'
;
coreModule
.
default
.
controller
(
'InspectCtrl'
,
function
(
$scope
)
{
coreModule
.
default
.
controller
(
'InspectCtrl'
,
function
(
$scope
,
$sanitize
)
{
var
model
=
$scope
.
inspector
;
function
getParametersFromQueryString
(
queryString
)
{
...
...
@@ -32,7 +32,11 @@ function (angular, _, $, coreModule) {
if
(
_
.
isString
(
model
.
error
.
data
))
{
$scope
.
response
=
$
(
"<div>"
+
model
.
error
.
data
+
"</div>"
).
text
();
}
else
if
(
model
.
error
.
data
)
{
if
(
model
.
error
.
data
.
response
)
{
$scope
.
response
=
$sanitize
(
model
.
error
.
data
.
response
);
}
else
{
$scope
.
response
=
angular
.
toJson
(
model
.
error
.
data
,
true
);
}
}
else
if
(
model
.
error
.
message
)
{
$scope
.
message
=
model
.
error
.
message
;
}
...
...
public/app/core/services/backend_srv.ts
View file @
a5f0f508
...
...
@@ -138,7 +138,8 @@ export class BackendSrv {
//populate error obj on Internal Error
if
(
_
.
isString
(
err
.
data
)
&&
err
.
status
===
500
)
{
err
.
data
=
{
error
:
err
.
statusText
error
:
err
.
statusText
,
response
:
err
.
data
,
};
}
...
...
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