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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
18 deletions
+14
-18
src/app/directives/grafanaGraph.js
+11
-14
src/app/panels/graphite/module.js
+1
-2
src/vendor/jquery/jquery.flot.time.js
+2
-2
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
(
min
&&
max
&&
ticks
)
{
if
(
_int
>=
2628000
)
{
var
secPerTick
=
((
max
-
min
)
/
ticks
)
/
1000
;
return
"%Y-%m"
;
if
(
secPerTick
<=
45
)
{
return
"%H:%M:%S"
;
}
}
if
(
_int
>=
100
00
)
{
if
(
secPerTick
<=
36
00
)
{
return
"%m/%d
"
;
return
"%H:%M
"
;
}
}
if
(
_int
>=
36
00
)
{
if
(
secPerTick
<=
800
00
)
{
return
"%m/%d %H:%M"
;
return
"%m/%d %H:%M"
;
}
}
if
(
_int
>=
700
)
{
if
(
secPerTick
<=
2419200
)
{
return
"%a %H:%M"
;
return
"%m/%d"
;
}
if
(
min
&&
max
&&
ticks
)
{
var
msPerTick
=
(
max
-
min
)
/
ticks
;
if
(
msPerTick
<=
45000
)
{
return
"%H:%M:%S"
;
}
}
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'
:
...
...
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