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
3c1f9457
Commit
3c1f9457
authored
Apr 05, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved error display in histogram and table
parent
e9d1fc7b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
js/controllers.js
+2
-1
panels/dashcontrol/module.js
+2
-1
panels/histogram/module.html
+2
-0
panels/histogram/module.js
+8
-2
panels/table/module.js
+3
-1
No files found.
js/controllers.js
View file @
3c1f9457
...
...
@@ -76,7 +76,8 @@ angular.module('kibana.controllers', [])
// This is whoafully incomplete, but will do for now
$scope
.
parse_error
=
function
(
data
)
{
return
data
.
match
(
"nested: (.*?);"
)[
1
]
var
_error
=
data
.
match
(
"nested: (.*?);"
)
return
_
.
isNull
(
_error
)
?
data
:
_error
[
1
];
}
$scope
.
init
();
...
...
panels/dashcontrol/module.js
View file @
3c1f9457
...
...
@@ -187,8 +187,9 @@ angular.module('kibana.dashcontrol', [])
var
results
=
request
.
query
(
$scope
.
ejs
.
QueryStringQuery
(
query
||
'*'
)
).
size
(
$scope
.
panel
.
elasticsearch_size
).
doSearch
();
results
.
then
(
function
(
results
)
{
if
(
_
.
isUndefined
(
results
))
{
if
(
_
.
isUndefined
(
results
.
hits
))
{
return
;
}
$scope
.
panel
.
error
=
false
;
...
...
panels/histogram/module.html
View file @
3c1f9457
...
...
@@ -12,5 +12,6 @@
<div
class=
'small'
style=
'display:inline-block'
>
{{series.label}} ({{series.hits}})
</div>
</span><span
class=
"small"
>
per
<strong>
{{panel.interval}}
</strong>
| (
<strong>
{{hits}}
</strong>
total)
</span>
</div>
<center><img
ng-show=
'panel.loading && _.isUndefined(data)'
src=
"common/img/load_big.gif"
></center>
<div
histogram
params=
"{{panel}}"
style=
"height:{{panel.height || row.height}};position:relative"
></div>
</kibana-panel>
\ No newline at end of file
panels/histogram/module.js
View file @
3c1f9457
...
...
@@ -48,6 +48,7 @@ angular.module('kibana.histogram', [])
}
$scope
.
get_data
=
function
(
segment
,
query_id
)
{
delete
$scope
.
panel
.
error
// Make sure we have everything for the request to complete
if
(
_
.
isUndefined
(
$scope
.
panel
.
index
)
||
_
.
isUndefined
(
$scope
.
time
))
return
...
...
@@ -92,6 +93,13 @@ angular.module('kibana.histogram', [])
query_id
=
$scope
.
query_id
=
new
Date
().
getTime
();
}
// Check for error and abort if found
if
(
!
(
_
.
isUndefined
(
results
.
error
)))
{
$scope
.
panel
.
error
=
$scope
.
parse_error
(
results
.
error
);
return
;
}
if
(
$scope
.
query_id
===
query_id
)
{
var
i
=
0
;
...
...
@@ -183,8 +191,6 @@ angular.module('kibana.histogram', [])
var
height
=
scope
.
panel
.
height
||
scope
.
row
.
height
;
elem
.
html
(
'<center><img src="common/img/load_big.gif"></center>'
)
// Receive render events
scope
.
$on
(
'render'
,
function
(){
render_panel
();
...
...
panels/table/module.js
View file @
3c1f9457
...
...
@@ -76,6 +76,8 @@ angular.module('kibana.table', [])
}
$scope
.
get_data
=
function
(
segment
,
query_id
)
{
$scope
.
panel
.
error
=
false
;
// Make sure we have everything for the request to complete
if
(
_
.
isUndefined
(
$scope
.
panel
.
index
)
||
_
.
isUndefined
(
$scope
.
time
))
return
...
...
@@ -110,11 +112,11 @@ angular.module('kibana.table', [])
query_id
=
$scope
.
query_id
=
new
Date
().
getTime
()
}
// Check for error and abort if found
if
(
!
(
_
.
isUndefined
(
results
.
error
)))
{
$scope
.
panel
.
error
=
$scope
.
parse_error
(
results
.
error
);
return
;
}
$scope
.
panel
.
error
=
false
;
// Check that we're still on the same query, if not stop
if
(
$scope
.
query_id
===
query_id
)
{
...
...
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