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
8f0269de
Commit
8f0269de
authored
May 09, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'subsecond-influx' of
https://github.com/abrander/grafana
parents
1a6e6f40
d685644d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
public/app/components/kbn.js
+7
-2
public/test/specs/kbn-format-specs.js
+1
-1
No files found.
public/app/components/kbn.js
View file @
8f0269de
...
...
@@ -81,11 +81,16 @@ function($, _, moment) {
if
(
numminutes
){
return
numminutes
+
'm'
;
}
var
numseconds
=
(((
seconds
%
31536000
)
%
86400
)
%
3600
)
%
60
;
var
numseconds
=
Math
.
floor
((((
seconds
%
31536000
)
%
86400
)
%
3600
)
%
60
)
;
if
(
numseconds
){
return
numseconds
+
's'
;
}
return
'less then a second'
;
//'just now' //or other string you like;
var
nummilliseconds
=
Math
.
floor
(
seconds
*
1000.0
);
if
(
nummilliseconds
){
return
nummilliseconds
+
'ms'
;
}
return
'less then a millisecond'
;
//'just now' //or other string you like;
};
kbn
.
to_percent
=
function
(
number
,
outof
)
{
...
...
public/test/specs/kbn-format-specs.js
View file @
8f0269de
...
...
@@ -63,7 +63,7 @@ define([
it
(
'10m 1600 resolution'
,
function
()
{
var
range
=
{
from
:
kbn
.
parseDate
(
'now-10m'
),
to
:
kbn
.
parseDate
(
'now'
)
};
var
str
=
kbn
.
calculateInterval
(
range
,
1600
,
null
);
expect
(
str
).
to
.
be
(
'
0.1
s'
);
expect
(
str
).
to
.
be
(
'
100m
s'
);
});
it
(
'fixed user interval'
,
function
()
{
...
...
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