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
d18d911d
Commit
d18d911d
authored
Mar 12, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added spy panels to map and histogram, added editor toggle to enable/disable spy
parent
c1b70967
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
92 additions
and
8 deletions
+92
-8
config.js
+1
-1
panels/histogram/editor.html
+11
-0
panels/histogram/module.html
+4
-0
panels/histogram/module.js
+13
-0
panels/map/editor.html
+11
-0
panels/map/module.html
+4
-0
panels/map/module.js
+17
-3
panels/pie/editor.html
+12
-0
panels/pie/module.html
+1
-1
panels/pie/module.js
+4
-2
panels/table/editor.html
+13
-0
panels/table/module.html
+1
-1
No files found.
config.js
View file @
d18d911d
...
...
@@ -15,7 +15,7 @@ If you need to configure the default dashboard, please see default.json
*/
var
config
=
new
Settings
(
{
elasticsearch
:
'http://
demo.kibana.org
'
,
elasticsearch
:
'http://
localhost:9200
'
,
kibana_index
:
"kibana-int"
,
timeformat
:
'mm/dd HH:MM:ss'
,
modules
:
[
'histogram'
,
'map'
,
'pie'
,
'table'
,
'stringquery'
,
'sort'
,
...
...
panels/histogram/editor.html
View file @
d18d911d
...
...
@@ -45,3 +45,14 @@
<select
ng-change=
"$emit('render')"
ng-model=
"panel.timezone"
class=
'input-small'
ng-options=
"f for f in ['browser','utc']"
></select>
</div>
</div>
<h5>
Panel Spy
</h5>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<label
class=
"small"
>
Spyable
</label><input
type=
"checkbox"
ng-model=
"panel.spyable"
ng-checked=
"panel.spyable"
>
</div>
<div
class=
"span9 small"
>
The panel spy shows 'behind the scenes' information about a panel. It can
be accessed by clicking the
<i
class=
'icon-eye-open'
></i>
in the top right
of the panel.
</div>
</div>
panels/histogram/module.html
View file @
d18d911d
<kibana-panel
ng-controller=
'histogram'
ng-init=
"init()"
style=
"height:{{panel.height || row.height}}"
>
<span
ng-show=
"panel.spyable"
style=
"position:absolute;right:0px;top:0px"
class=
'panelextra pointer'
>
<i
bs-modal=
"'partials/modal.html'"
class=
"icon-eye-open"
></i>
</span>
<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 @
d18d911d
...
...
@@ -76,6 +76,8 @@ angular.module('kibana.histogram', [])
).
size
(
0
)
})
$scope
.
populate_modal
(
request
);
// Then run it
var
results
=
request
.
doSearch
();
...
...
@@ -120,6 +122,17 @@ angular.module('kibana.histogram', [])
});
}
// I really don't like this function, too much dom manip. Break out into directive?
$scope
.
populate_modal
=
function
(
request
)
{
$scope
.
modal
=
{
title
:
"Inspector"
,
body
:
"<h5>Last Elasticsearch Query</h5><pre>"
+
'curl -XGET '
+
config
.
elasticsearch
+
'/'
+
$scope
.
panel
.
index
+
"/_search?pretty -d'
\
n"
+
angular
.
toJson
(
JSON
.
parse
(
request
.
toString
()),
true
)
+
"'</pre>"
,
}
}
function
set_time
(
time
)
{
$scope
.
time
=
time
;
$scope
.
panel
.
index
=
_
.
isUndefined
(
time
.
index
)
?
$scope
.
panel
.
index
:
time
.
index
...
...
panels/map/editor.html
View file @
d18d911d
...
...
@@ -22,3 +22,14 @@
<select
ng-change=
"$emit('render')"
class=
"input-small"
ng-model=
"panel.map"
ng-options=
"f for f in ['world','europe','usa']"
></select>
</div>
</div>
<h5>
Panel Spy
</h5>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<label
class=
"small"
>
Spyable
</label><input
type=
"checkbox"
ng-model=
"panel.spyable"
ng-checked=
"panel.spyable"
>
</div>
<div
class=
"span9 small"
>
The panel spy shows 'behind the scenes' information about a panel. It can
be accessed by clicking the
<i
class=
'icon-eye-open'
></i>
in the top right
of the panel.
</div>
</div>
panels/map/module.html
View file @
d18d911d
<kibana-panel
ng-controller=
'map'
ng-init=
"init()"
>
<span
ng-show=
"panel.spyable"
style=
"position:absolute;right:0px;top:0px"
class=
'panelextra pointer'
>
<i
bs-modal=
"'partials/modal.html'"
class=
"icon-eye-open"
></i>
</span>
<div
map
params=
"{{panel}}"
style=
"height:{{panel.height || row.height}}"
></div>
</kibana-panel>
\ No newline at end of file
panels/map/module.js
View file @
d18d911d
...
...
@@ -31,7 +31,7 @@ angular.module('kibana.map', [])
var
request
=
$scope
.
ejs
.
Request
().
indices
(
$scope
.
panel
.
index
);
// Then the insert into facet and make the request
var
re
sults
=
request
var
re
quest
=
request
.
facet
(
ejs
.
TermsFacet
(
'map'
)
.
field
(
$scope
.
panel
.
field
)
.
size
(
$scope
.
panel
[
'size'
])
...
...
@@ -42,8 +42,11 @@ angular.module('kibana.map', [])
ejs
.
RangeFilter
(
$scope
.
time
.
field
)
.
from
(
$scope
.
time
.
from
)
.
to
(
$scope
.
time
.
to
)
)))).
size
(
0
)
.
doSearch
();
)))).
size
(
0
);
$scope
.
populate_modal
(
request
);
var
results
=
request
.
doSearch
();
// Populate scope when we have results
results
.
then
(
function
(
results
)
{
...
...
@@ -57,6 +60,17 @@ angular.module('kibana.map', [])
});
}
// I really don't like this function, too much dom manip. Break out into directive?
$scope
.
populate_modal
=
function
(
request
)
{
$scope
.
modal
=
{
title
:
"Inspector"
,
body
:
"<h5>Last Elasticsearch Query</h5><pre>"
+
'curl -XGET '
+
config
.
elasticsearch
+
'/'
+
$scope
.
panel
.
index
+
"/_search?pretty -d'
\
n"
+
angular
.
toJson
(
JSON
.
parse
(
request
.
toString
()),
true
)
+
"'</pre>"
,
}
}
function
set_time
(
time
)
{
$scope
.
time
=
time
;
$scope
.
panel
.
index
=
_
.
isUndefined
(
time
.
index
)
?
$scope
.
panel
.
index
:
time
.
index
...
...
panels/pie/editor.html
View file @
d18d911d
...
...
@@ -100,3 +100,14 @@
<select
class=
"input-small"
ng-change=
"set_mode(panel.mode)"
ng-model=
"panel.mode"
ng-options=
"f for f in ['query','terms','goal']"
></select>
</div>
</div>
<h5>
Panel Spy
</h5>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<label
class=
"small"
>
Spyable
</label><input
type=
"checkbox"
ng-model=
"panel.spyable"
ng-checked=
"panel.spyable"
>
</div>
<div
class=
"span9 small"
>
The panel spy shows 'behind the scenes' information about a panel. It can
be accessed by clicking the
<i
class=
'icon-eye-open'
></i>
in the top right
of the panel.
</div>
</div>
\ No newline at end of file
panels/pie/module.html
View file @
d18d911d
<kibana-panel
ng-controller=
'pie'
ng-init=
"init()"
>
<span
style=
"position:absolute;right:0px;top:0px"
class=
'panelextra pointer'
>
<span
ng-show=
'panel.spyable'
style=
"position:absolute;right:0px;top:0px"
class=
'panelextra pointer'
>
<i
bs-modal=
"'partials/modal.html'"
class=
"icon-eye-open"
></i>
</span>
...
...
panels/pie/module.js
View file @
d18d911d
...
...
@@ -12,7 +12,8 @@ angular.module('kibana.pie', [])
labels
:
true
,
mode
:
"terms"
,
group
:
"default"
,
default_field
:
'_all'
default_field
:
'_all'
,
spyable
:
true
,
}
_
.
defaults
(
$scope
.
panel
,
_d
)
...
...
@@ -182,9 +183,10 @@ angular.module('kibana.pie', [])
}
}
// I really don't like this function, too much dom manip. Break out into directive?
$scope
.
populate_modal
=
function
(
request
)
{
$scope
.
modal
=
{
title
:
"
Pie
Inspector"
,
title
:
"Inspector"
,
body
:
"<h5>Last Elasticsearch Query</h5><pre>"
+
'curl -XGET '
+
config
.
elasticsearch
+
'/'
+
$scope
.
panel
.
index
+
"/_search?pretty -d'
\
n"
+
angular
.
toJson
(
JSON
.
parse
(
request
.
toString
()),
true
)
+
...
...
panels/table/editor.html
View file @
d18d911d
...
...
@@ -34,3 +34,16 @@
<div
class=
"span3"
><h6>
Font Size
</h6>
<select
class=
"input-small"
ng-model=
"panel.style['font-size']"
ng-options=
"f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"
></select></span>
</div>
</div>
<h5>
Panel Spy
</h5>
<div
class=
"row-fluid"
>
<div
class=
"span2"
>
<label
class=
"small"
>
Spyable
</label><input
type=
"checkbox"
ng-model=
"panel.spyable"
ng-checked=
"panel.spyable"
>
</div>
<div
class=
"span9 small"
>
The panel spy shows 'behind the scenes' information about a panel. It can
be accessed by clicking the
<i
class=
'icon-eye-open'
></i>
in the top right
of the panel.
</div>
</div>
panels/table/module.html
View file @
d18d911d
<kibana-panel
ng-controller=
'table'
ng-init=
'init()'
>
<span
style=
"position:absolute;right:0px;top:0px"
class=
'panelextra pointer'
>
<span
ng-show=
"panel.spyable"
style=
"position:absolute;right:0px;top:0px"
class=
'panelextra pointer'
>
<i
bs-modal=
"'partials/modal.html'"
class=
"icon-eye-open"
></i>
</span>
...
...
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