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
3b327bab
Commit
3b327bab
authored
Mar 05, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to maxDataPoints / resolution and time axis formats
parent
a50b594a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
+19
-23
src/app/directives/grafanaGraph.js
+13
-16
src/app/panels/graphite/module.js
+1
-2
src/vendor/jquery/jquery.flot.time.js
+5
-5
No files found.
src/app/directives/grafanaGraph.js
View file @
3b327bab
...
@@ -257,25 +257,22 @@ function (angular, $, kbn, moment, _) {
...
@@ -257,25 +257,22 @@ function (angular, $, kbn, moment, _) {
}
}
function
time_format
(
interval
,
ticks
,
min
,
max
)
{
function
time_format
(
interval
,
ticks
,
min
,
max
)
{
var
_int
=
kbn
.
interval_to_seconds
(
interval
);
if
(
_int
>=
2628000
)
{
return
"%Y-%m"
;
}
if
(
_int
>=
10000
)
{
return
"%m/%d"
;
}
if
(
_int
>=
3600
)
{
return
"%m/%d %H:%M"
;
}
if
(
_int
>=
700
)
{
return
"%a %H:%M"
;
}
if
(
min
&&
max
&&
ticks
)
{
if
(
min
&&
max
&&
ticks
)
{
var
msPerTick
=
(
max
-
min
)
/
ticks
;
var
secPerTick
=
((
max
-
min
)
/
ticks
)
/
1000
;
if
(
msPerTick
<=
45000
)
{
if
(
secPerTick
<=
45
)
{
return
"%H:%M:%S"
;
return
"%H:%M:%S"
;
}
}
if
(
secPerTick
<=
3600
)
{
return
"%H:%M"
;
}
if
(
secPerTick
<=
80000
)
{
return
"%m/%d %H:%M"
;
}
if
(
secPerTick
<=
2419200
)
{
return
"%m/%d"
;
}
return
"%Y-%m"
;
}
}
return
"%H:%M"
;
return
"%H:%M"
;
...
...
src/app/panels/graphite/module.js
View file @
3b327bab
...
@@ -230,8 +230,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
...
@@ -230,8 +230,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
$scope
.
updateTimeRange
=
function
()
{
$scope
.
updateTimeRange
=
function
()
{
$scope
.
range
=
filterSrv
.
timeRange
();
$scope
.
range
=
filterSrv
.
timeRange
();
$scope
.
rangeUnparsed
=
filterSrv
.
timeRange
(
false
);
$scope
.
rangeUnparsed
=
filterSrv
.
timeRange
(
false
);
$scope
.
resolution
=
(
$
(
window
).
width
()
/
(
$scope
.
panel
.
span
/
12
))
/
2
;
$scope
.
resolution
=
(
$
(
window
).
width
()
*
(
$scope
.
panel
.
span
/
12
))
/
2
;
$scope
.
interval
=
'10m'
;
$scope
.
interval
=
'10m'
;
if
(
$scope
.
range
)
{
if
(
$scope
.
range
)
{
...
...
src/vendor/jquery/jquery.flot.time.js
View file @
3b327bab
...
@@ -71,13 +71,13 @@ API.txt for details.
...
@@ -71,13 +71,13 @@ API.txt for details.
switch
(
c
)
{
switch
(
c
)
{
case
'a'
:
c
=
""
+
dayNames
[
d
.
getDay
()];
break
;
case
'a'
:
c
=
""
+
dayNames
[
d
.
getDay
()];
break
;
case
'b'
:
c
=
""
+
monthNames
[
d
.
getMonth
()];
break
;
case
'b'
:
c
=
""
+
monthNames
[
d
.
getMonth
()];
break
;
case
'd'
:
c
=
leftPad
(
d
.
getDate
());
break
;
case
'd'
:
c
=
leftPad
(
d
.
getDate
()
,
""
);
break
;
case
'e'
:
c
=
leftPad
(
d
.
getDate
(),
" "
);
break
;
case
'e'
:
c
=
leftPad
(
d
.
getDate
(),
" "
);
break
;
case
'h'
:
// For back-compat with 0.7; remove in 1.0
case
'h'
:
// For back-compat with 0.7; remove in 1.0
case
'H'
:
c
=
leftPad
(
hours
);
break
;
case
'H'
:
c
=
leftPad
(
hours
);
break
;
case
'I'
:
c
=
leftPad
(
hours12
);
break
;
case
'I'
:
c
=
leftPad
(
hours12
);
break
;
case
'l'
:
c
=
leftPad
(
hours12
,
" "
);
break
;
case
'l'
:
c
=
leftPad
(
hours12
,
" "
);
break
;
case
'm'
:
c
=
leftPad
(
d
.
getMonth
()
+
1
);
break
;
case
'm'
:
c
=
leftPad
(
d
.
getMonth
()
+
1
,
""
);
break
;
case
'M'
:
c
=
leftPad
(
d
.
getMinutes
());
break
;
case
'M'
:
c
=
leftPad
(
d
.
getMinutes
());
break
;
// quarters not in Open Group's strftime specification
// quarters not in Open Group's strftime specification
case
'q'
:
case
'q'
:
...
@@ -158,7 +158,7 @@ API.txt for details.
...
@@ -158,7 +158,7 @@ API.txt for details.
return
makeUtcWrapper
(
new
Date
(
ts
));
return
makeUtcWrapper
(
new
Date
(
ts
));
}
}
}
}
// map of app. size of time units in milliseconds
// map of app. size of time units in milliseconds
var
timeUnitSize
=
{
var
timeUnitSize
=
{
...
@@ -176,9 +176,9 @@ API.txt for details.
...
@@ -176,9 +176,9 @@ API.txt for details.
var
baseSpec
=
[
var
baseSpec
=
[
[
1
,
"second"
],
[
2
,
"second"
],
[
5
,
"second"
],
[
10
,
"second"
],
[
1
,
"second"
],
[
2
,
"second"
],
[
5
,
"second"
],
[
10
,
"second"
],
[
30
,
"second"
],
[
30
,
"second"
],
[
1
,
"minute"
],
[
2
,
"minute"
],
[
5
,
"minute"
],
[
10
,
"minute"
],
[
1
,
"minute"
],
[
2
,
"minute"
],
[
5
,
"minute"
],
[
10
,
"minute"
],
[
30
,
"minute"
],
[
30
,
"minute"
],
[
1
,
"hour"
],
[
2
,
"hour"
],
[
4
,
"hour"
],
[
1
,
"hour"
],
[
2
,
"hour"
],
[
4
,
"hour"
],
[
8
,
"hour"
],
[
12
,
"hour"
],
[
8
,
"hour"
],
[
12
,
"hour"
],
[
1
,
"day"
],
[
2
,
"day"
],
[
3
,
"day"
],
[
1
,
"day"
],
[
2
,
"day"
],
[
3
,
"day"
],
...
...
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