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
38520b03
Commit
38520b03
authored
Apr 19, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
column panel documentation
parent
b85f2c94
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
panels/column/module.js
+17
-0
panels/timepicker/module.js
+9
-5
No files found.
panels/column/module.js
View file @
38520b03
/*
## Column
The column panel is sort of a hack to allow you to put multiple, veritcal,
panels next to a bigger panel. Note that it has no group, and setting a group
for the panel itself will do nothing
### Parameters
* panels :: an array of panel objects. All of their spans should be set to 12
### Group Events
#### Sends
* time :: Object Includes from, to and index
*/
angular
.
module
(
'kibana.column'
,
[])
.
controller
(
'column'
,
function
(
$scope
,
$rootScope
)
{
// Set and populate defaults
...
...
panels/timepicker/module.js
View file @
38520b03
...
...
@@ -12,6 +12,7 @@ a pattern
* timefield :: The field in which time is stored in the document.
* index :: Index pattern to match. Literals should be double quoted. Default: '_all'
* defaultindex :: Index to failover to if index not found
* index_interval :: Time between timestamped indices (can be 'none') for static index
* refresh: Object containing refresh parameters
* enable :: true/false, enable auto refresh by default. Default: false
* interval :: Seconds between auto refresh. Default: 30
...
...
@@ -21,7 +22,7 @@ a pattern
#### Sends
* time :: Object Includes from, to and index
#### Receives
* get_time :: Receives an object containing a
uniqueid, broadcasts
to it.
* get_time :: Receives an object containing a
$id, broadcasts back
to it.
*/
angular
.
module
(
'kibana.timepicker'
,
[])
...
...
@@ -167,8 +168,8 @@ angular.module('kibana.timepicker', [])
$scope
.
time_apply
();
}
$scope
.
time_check
=
function
(){
//
$scope
.
time_calc
=
function
(){
// If time picker is defined (on initialization)
if
(
!
(
_
.
isUndefined
(
$scope
.
timepicker
)))
{
var
from
=
$scope
.
panel
.
mode
===
'relative'
?
time_ago
(
$scope
.
panel
.
timespan
)
:
...
...
@@ -198,7 +199,7 @@ angular.module('kibana.timepicker', [])
$scope
.
time_apply
=
function
()
{
// Update internal time object
$scope
.
time
=
$scope
.
time_c
heck
();
$scope
.
time
=
$scope
.
time_c
alc
();
$scope
.
time
.
field
=
$scope
.
panel
.
timefield
// Get indices for the time period, then broadcast time range and index list
...
...
@@ -213,7 +214,9 @@ angular.module('kibana.timepicker', [])
eventBus
.
broadcast
(
$scope
.
$id
,
$scope
.
panel
.
group
,
'time'
,
$scope
.
time
)
}
// Update panel's string representation of the time object
// Update panel's string representation of the time object.Don't update if
// we're in relative mode since we dont want to store the time object in the
// json for relative periods
if
(
$scope
.
panel
.
mode
!==
'relative'
)
{
$scope
.
panel
.
time
=
{
from
:
$scope
.
time
.
from
.
format
(
"mm/dd/yyyy HH:MM:ss"
),
...
...
@@ -276,6 +279,7 @@ angular.module('kibana.timepicker', [])
// this is stupid, but there is otherwise no good way to ensure that when
// I extract the date from an object that I'm get the UTC date. Stupid js.
// I die a little inside every time I call this function.
// Update: I just read this again. I died a little more inside.
function
fake_utc
(
date
)
{
return
new
Date
(
date
.
getTime
()
+
date
.
getTimezoneOffset
()
*
60000
);
}
...
...
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