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
a9abd2ff
Commit
a9abd2ff
authored
Apr 03, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
began work in inspector feature for easy troubleshooting, Issue #265
parent
8cba5940
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
11 deletions
+45
-11
src/app/controllers/all.js
+1
-0
src/app/directives/kibanaPanel.js
+3
-2
src/app/panels/graphite/module.js
+1
-0
src/app/partials/inspector.html
+38
-8
src/app/partials/roweditor.html
+2
-1
No files found.
src/app/controllers/all.js
View file @
a9abd2ff
...
...
@@ -10,4 +10,5 @@ define([
'./graphiteImport'
,
'./influxTargetCtrl'
,
'./playlistCtrl'
,
'./inspectCtrl'
,
],
function
()
{});
src/app/directives/kibanaPanel.js
View file @
a9abd2ff
...
...
@@ -16,9 +16,10 @@ function (angular, $, _) {
var
panelHeader
=
'<div class="panel-header">'
+
'<div class="row-fluid">'
+
'<div class="span12 alert-error panel-error" ng-
hide="!
panel.error">'
+
'<div class="span12 alert-error panel-error" ng-
if="
panel.error">'
+
'<a class="close" ng-click="panel.error=false">×</a>'
+
'<i class="icon-exclamation-sign"></i> <strong>Oops!</strong> {{panel.error}}'
+
'<span><i class="icon-exclamation-sign"></i> <strong>Oops!</strong> {{panel.error}} </span>'
+
'<span class="pointer" config-modal="app/partials/inspector.html"> (inspect)</span>'
+
'</div>'
+
'</div>
\
n'
+
...
...
src/app/panels/graphite/module.js
View file @
a9abd2ff
...
...
@@ -261,6 +261,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
return
$scope
.
datasource
.
query
(
graphiteQuery
)
.
then
(
$scope
.
dataHandler
)
.
then
(
null
,
function
(
err
)
{
$scope
.
inspector_info
=
{
error
:
err
};
$scope
.
panel
.
error
=
err
.
message
||
"Graphite HTTP Request Error"
;
});
};
...
...
src/app/partials/inspector.html
View file @
a9abd2ff
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h3>
Last Elasticsearch Query
</h3>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
ng-controller=
"InspectCtrl"
ng-init=
"init()"
>
<div
class=
"pull-right editor-title"
>
Inspector
</div>
<div
ng-model=
"editor.index"
bs-tabs
>
<div
ng-repeat=
"tab in ['Request','Response']"
data-title=
"{{tab}}"
>
</div>
</div>
<div
class=
"editor-row"
ng-if=
"editor.index == 0"
>
<div>
<pre>
curl -XGET '{{config.elasticsearch}}/{{dashboard.indices|stringify}}/_search?pretty' -d '{{inspector}}'
</pre>
<table
class=
"table table-striped"
>
<tr>
<td>
Url
</td>
<td>
{{inspector_info.error.config.url}}
</td>
</tr>
<tr>
<td>
Method
</td>
<td>
{{inspector_info.error.config.method}}
</td>
</tr>
<tr
ng-repeat=
"(key, value) in inspector_info.error.config.headers"
>
<td>
{{key}}
</td>
<td>
{{value}}
</td>
</tr>
<tr>
<td>
Data
</td>
<td>
{{inspector_info.error.config.data}}
</td>
</tr>
</table>
</div>
<div
class=
"editor-row"
ng-if=
"editor.index == 1"
>
<div
ng-if=
"response_html"
>
<div
iframe-content=
"response_html"
></div>
</div>
</div>
</div>
...
...
src/app/partials/roweditor.html
View file @
a9abd2ff
...
...
@@ -62,5 +62,5 @@
<div
class=
"modal-footer"
>
<button
ng-show=
"editor.index == 1"
ng-click=
"editor.index = 2;"
class=
"btn btn-success"
ng-disabled=
"panel.loadingEditor"
>
Add Panel
</button>
<button
ng-show=
"panel.type && editor.index == 2"
ng-click=
"add_panel(row,panel); reset_panel(); editor.index = 1;"
class=
"btn btn-success"
ng-disabled=
"panel.loadingEditor"
>
Add Panel
</button>
<button
type=
"button"
class=
"btn btn-
danger
"
ng-click=
"editor.index=0;dismiss();reset_panel();close_edit()"
>
Close
</button>
<button
type=
"button"
class=
"btn btn-
info
"
ng-click=
"editor.index=0;dismiss();reset_panel();close_edit()"
>
Close
</button>
</div>
\ No newline at end of file
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