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
13d664ad
Commit
13d664ad
authored
May 13, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #79 from rashidkpc/master
Configurable auto interval resolution
parents
20c1284a
8880654b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
index.html
+1
-1
panels/histogram/editor.html
+7
-1
panels/histogram/module.js
+5
-2
No files found.
index.html
View file @
13d664ad
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<div
class=
"navbar navbar-static-top"
>
<div
class=
"navbar navbar-static-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
>
<p
class=
"navbar-text pull-right"
><small><strong>
Kibana 3
</strong>
<small>
milestone
1
</small></small></p>
<p
class=
"navbar-text pull-right"
><small><strong>
Kibana 3
</strong>
<small>
milestone
pre-2
</small></small></p>
<span
class=
"brand"
>
{{dashboards.title}}
</span>
<span
class=
"brand"
>
{{dashboards.title}}
</span>
<div
class=
"brand"
><i
class=
'icon-edit pointer'
ng-show=
'dashboards.editable'
bs-modal=
"'partials/dasheditor.html'"
></i></div>
<div
class=
"brand"
><i
class=
'icon-edit pointer'
ng-show=
'dashboards.editable'
bs-modal=
"'partials/dasheditor.html'"
></i></div>
</div>
</div>
...
...
panels/histogram/editor.html
View file @
13d664ad
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<label
class=
"small"
>
Mode
</label>
<label
class=
"small"
>
Mode
</label>
<select
ng-change=
"set_refresh(true)"
class=
"input-small"
ng-model=
"panel.mode"
ng-options=
"f for f in ['count','min','mean','max','total']"
></select>
<select
ng-change=
"set_refresh(true)"
class=
"input-small"
ng-model=
"panel.mode"
ng-options=
"f for f in ['count','min','mean','max','total']"
></select>
</div>
</div>
<div
class=
"span3"
>
<div
class=
"span3"
ng-show=
"panel.mode != 'count'"
>
<label
class=
"small"
>
Field
</label>
<label
class=
"small"
>
Field
</label>
<form>
<form>
<input
ng-change=
"set_refresh(true)"
placeholder=
"Start typing"
bs-typeahead=
"fields.list"
type=
"text"
class=
"input-small"
ng-model=
"panel.value_field"
>
<input
ng-change=
"set_refresh(true)"
placeholder=
"Start typing"
bs-typeahead=
"fields.list"
type=
"text"
class=
"input-small"
ng-model=
"panel.value_field"
>
...
@@ -75,6 +75,12 @@
...
@@ -75,6 +75,12 @@
<div
class=
"span2"
>
<div
class=
"span2"
>
<label
class=
"small"
>
Auto-interval
</label><input
type=
"checkbox"
ng-model=
"panel.auto_int"
ng-checked=
"panel.auto_int"
/>
<label
class=
"small"
>
Auto-interval
</label><input
type=
"checkbox"
ng-model=
"panel.auto_int"
ng-checked=
"panel.auto_int"
/>
</div>
</div>
<div
class=
"span2"
ng-show=
'panel.auto_int'
>
<label
class=
"small"
>
Resolution
</label><input
type=
"number"
class=
'input-mini'
ng-model=
"panel.resolution"
ng-change=
'set_refresh(true)'
/>
</div>
<div
class=
"span3"
ng-show=
'panel.auto_int'
>
<label
class=
"small"
>
Shoot for this many data points, rounding to sane intervals
</label>
</div>
<div
class=
"span2"
ng-hide=
'panel.auto_int'
>
<div
class=
"span2"
ng-hide=
'panel.auto_int'
>
<label
class=
"small"
>
Interval
</label><input
type=
"text"
class=
'input-mini'
ng-model=
"panel.interval"
ng-change=
'set_refresh(true)'
/>
<label
class=
"small"
>
Interval
</label><input
type=
"text"
class=
'input-mini'
ng-model=
"panel.interval"
ng-change=
'set_refresh(true)'
/>
</div>
</div>
...
...
panels/histogram/module.js
View file @
13d664ad
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
this is usually populated by a stringquery panel wher the query and label
this is usually populated by a stringquery panel wher the query and label
parameter are the same
parameter are the same
* auto_int :: Auto calculate data point interval?
* auto_int :: Auto calculate data point interval?
* resolution :: If auto_int is enables, shoot for this many data points, rounding to
sane intervals
* interval :: Datapoint interval in elasticsearch date math format (eg 1d, 1w, 1y, 5y)
* interval :: Datapoint interval in elasticsearch date math format (eg 1d, 1w, 1y, 5y)
* fill :: Only applies to line charts. Level of area shading from 0-10
* fill :: Only applies to line charts. Level of area shading from 0-10
* linewidth :: Only applies to line charts. How thick the line should be in pixels
* linewidth :: Only applies to line charts. How thick the line should be in pixels
...
@@ -46,8 +48,9 @@ angular.module('kibana.histogram', [])
...
@@ -46,8 +48,9 @@ angular.module('kibana.histogram', [])
group
:
"default"
,
group
:
"default"
,
query
:
[
{
query
:
"*"
,
label
:
"Query"
}
],
query
:
[
{
query
:
"*"
,
label
:
"Query"
}
],
mode
:
'count'
,
mode
:
'count'
,
value_field
:
null
,
value_field
:
null
,
auto_int
:
true
,
auto_int
:
true
,
resolution
:
100
,
interval
:
'5m'
,
interval
:
'5m'
,
fill
:
3
,
fill
:
3
,
linewidth
:
3
,
linewidth
:
3
,
...
@@ -107,7 +110,7 @@ angular.module('kibana.histogram', [])
...
@@ -107,7 +110,7 @@ angular.module('kibana.histogram', [])
return
return
if
(
$scope
.
panel
.
auto_int
)
if
(
$scope
.
panel
.
auto_int
)
$scope
.
panel
.
interval
=
secondsToHms
(
calculate_interval
(
$scope
.
time
.
from
,
$scope
.
time
.
to
,
50
,
0
)
/
1000
);
$scope
.
panel
.
interval
=
secondsToHms
(
calculate_interval
(
$scope
.
time
.
from
,
$scope
.
time
.
to
,
$scope
.
panel
.
resolution
,
0
)
/
1000
);
$scope
.
panel
.
loading
=
true
;
$scope
.
panel
.
loading
=
true
;
var
_segment
=
_
.
isUndefined
(
segment
)
?
0
:
segment
var
_segment
=
_
.
isUndefined
(
segment
)
?
0
:
segment
...
...
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