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
c4a4ecfc
Commit
c4a4ecfc
authored
Aug 29, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into filtering_overhaul
Conflicts: src/app/controllers/dashboardNavCtrl.js
parents
f9b0ce0f
d4d3ae75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
CHANGELOG.md
+1
-0
src/app/controllers/dashboardNavCtrl.js
+16
-15
No files found.
CHANGELOG.md
View file @
c4a4ecfc
...
...
@@ -15,6 +15,7 @@
-
[
Issue #277
](
https://github.com/grafana/grafana/issues/277
)
. Dashboard: Fix for timepicker date & tooltip when UTC timezone selected.
-
[
Issue #699
](
https://github.com/grafana/grafana/issues/699
)
. Dashboard: Fix for bug when adding rows from dashboard settings dialog.
-
[
Issue #723
](
https://github.com/grafana/grafana/issues/723
)
. Dashboard: Fix for hide controls setting not used/initialized on dashboard load
-
[
Issue #724
](
https://github.com/grafana/grafana/issues/724
)
. Dashboard: Fix for zoom out causing right hand "to" range to be set in the future.
**Tech**
-
Upgraded from angularjs 1.1.5 to 1.3 beta 17;
...
...
src/app/controllers/dashboardNavCtrl.js
View file @
c4a4ecfc
...
...
@@ -23,6 +23,7 @@ function (angular, _, moment, config, store) {
$scope
.
onAppEvent
(
'zoom-out'
,
function
()
{
$scope
.
zoom
(
2
);
});
};
$scope
.
set_default
=
function
()
{
...
...
@@ -112,23 +113,23 @@ function (angular, _, moment, config, store) {
};
$scope
.
zoom
=
function
(
factor
)
{
var
_
range
=
timeSrv
.
timeRange
();
var
_timespan
=
(
_range
.
to
.
valueOf
()
-
_range
.
from
.
valueOf
());
var
_center
=
_range
.
to
.
valueOf
()
-
_timespan
/
2
;
var
_to
=
(
_center
+
(
_timespan
*
factor
)
/
2
);
var
_from
=
(
_center
-
(
_
timespan
*
factor
)
/
2
);
// If we're not already looking into the future, don't.
if
(
_to
>
Date
.
now
()
&&
_range
.
to
<
Date
.
now
())
{
var
_offset
=
_
to
-
Date
.
now
();
_from
=
_from
-
_
offset
;
_
to
=
Date
.
now
();
var
range
=
timeSrv
.
timeRange
();
var
timespan
=
(
range
.
to
.
valueOf
()
-
range
.
from
.
valueOf
())
;
var
center
=
range
.
to
.
valueOf
()
-
timespan
/
2
;
var
to
=
(
center
+
(
timespan
*
factor
)
/
2
);
var
from
=
(
center
-
(
timespan
*
factor
)
/
2
);
if
(
to
>
Date
.
now
()
&&
range
.
to
<=
Date
.
now
())
{
var
offset
=
to
-
Date
.
now
();
from
=
from
-
offset
;
to
=
Date
.
now
();
}
timeSrv
.
setTime
({
from
:
moment
.
utc
(
_
from
).
toDate
(),
to
:
moment
.
utc
(
_
to
).
toDate
(),
$scope
.
filter
.
setTime
({
from
:
moment
.
utc
(
from
).
toDate
(),
to
:
moment
.
utc
(
to
).
toDate
(),
});
};
...
...
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