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
963001ba
Commit
963001ba
authored
Apr 12, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'move' of
https://github.com/utkarshcmu/grafana
into utkarshcmu-move
parents
a5eda6a8
6a55ec69
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
0 deletions
+52
-0
public/app/features/dashboard/keybindings.js
+8
-0
public/app/features/dashboard/timepicker/timepicker.html
+10
-0
public/app/features/dashboard/timepicker/timepicker.ts
+26
-0
public/app/partials/help_modal.html
+8
-0
No files found.
public/app/features/dashboard/keybindings.js
View file @
963001ba
...
@@ -60,6 +60,14 @@ function(angular, $) {
...
@@ -60,6 +60,14 @@ function(angular, $) {
scope
.
appEvent
(
'zoom-out'
,
evt
);
scope
.
appEvent
(
'zoom-out'
,
evt
);
},
{
inputDisabled
:
true
});
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'left'
,
function
(
evt
)
{
scope
.
appEvent
(
'shift-time-backward'
,
evt
);
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'right'
,
function
(
evt
)
{
scope
.
appEvent
(
'shift-time-forward'
,
evt
);
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+e'
,
function
(
evt
)
{
keyboardManager
.
bind
(
'ctrl+e'
,
function
(
evt
)
{
scope
.
appEvent
(
'export-dashboard'
,
evt
);
scope
.
appEvent
(
'export-dashboard'
,
evt
);
},
{
inputDisabled
:
true
});
},
{
inputDisabled
:
true
});
...
...
public/app/features/dashboard/timepicker/timepicker.html
View file @
963001ba
<ul
class=
"nav gf-timepicker-nav"
>
<ul
class=
"nav gf-timepicker-nav"
>
<li
class=
"dashnav-zoom-out"
style=
"padding-top: 2px"
>
<li
class=
"dashnav-zoom-out"
style=
"padding-top: 2px"
>
<a
class=
'small'
ng-click=
'ctrl.move(-1)'
>
<i
class=
"fa fa-arrow-left"
></i>
</a>
</li>
<li
class=
"dashnav-zoom-out"
style=
"padding-top: 2px"
>
<a
class=
'small'
ng-click=
'ctrl.move(1)'
>
<i
class=
"fa fa-arrow-right"
></i>
</a>
</li>
<li
class=
"dashnav-zoom-out"
style=
"padding-top: 2px"
>
<a
class=
'small'
ng-click=
'ctrl.zoom(2)'
>
<a
class=
'small'
ng-click=
'ctrl.zoom(2)'
>
Zoom Out
Zoom Out
</a>
</a>
...
...
public/app/features/dashboard/timepicker/timepicker.ts
View file @
963001ba
...
@@ -30,6 +30,8 @@ export class TimePickerCtrl {
...
@@ -30,6 +30,8 @@ export class TimePickerCtrl {
$scope
.
ctrl
=
this
;
$scope
.
ctrl
=
this
;
$rootScope
.
onAppEvent
(
'zoom-out'
,
()
=>
this
.
zoom
(
2
),
$scope
);
$rootScope
.
onAppEvent
(
'zoom-out'
,
()
=>
this
.
zoom
(
2
),
$scope
);
$rootScope
.
onAppEvent
(
'shift-time-forward'
,
()
=>
this
.
move
(
1
),
$scope
);
$rootScope
.
onAppEvent
(
'shift-time-backward'
,
()
=>
this
.
move
(
-
1
),
$scope
);
$rootScope
.
onAppEvent
(
'refresh'
,
()
=>
this
.
init
(),
$scope
);
$rootScope
.
onAppEvent
(
'refresh'
,
()
=>
this
.
init
(),
$scope
);
$rootScope
.
onAppEvent
(
'dash-editor-hidden'
,
()
=>
this
.
isOpen
=
false
,
$scope
);
$rootScope
.
onAppEvent
(
'dash-editor-hidden'
,
()
=>
this
.
isOpen
=
false
,
$scope
);
...
@@ -87,6 +89,30 @@ export class TimePickerCtrl {
...
@@ -87,6 +89,30 @@ export class TimePickerCtrl {
this
.
timeSrv
.
setTime
({
from
:
moment
.
utc
(
from
),
to
:
moment
.
utc
(
to
)
});
this
.
timeSrv
.
setTime
({
from
:
moment
.
utc
(
from
),
to
:
moment
.
utc
(
to
)
});
}
}
move
(
direction
)
{
var
range
=
this
.
timeSrv
.
timeRange
();
var
timespan
=
(
range
.
to
.
valueOf
()
-
range
.
from
.
valueOf
());
var
to
,
from
;
if
(
direction
===
-
1
)
{
to
=
range
.
to
.
valueOf
()
-
timespan
;
from
=
range
.
from
.
valueOf
()
-
timespan
;
}
else
if
(
direction
===
1
)
{
to
=
range
.
to
.
valueOf
()
+
timespan
;
from
=
range
.
from
.
valueOf
()
+
timespan
;
if
(
to
>
Date
.
now
()
&&
range
.
to
<
Date
.
now
())
{
to
=
Date
.
now
();
from
=
range
.
from
.
valueOf
();
}
}
else
{
to
=
range
.
to
.
valueOf
();
from
=
range
.
from
.
valueOf
();
}
this
.
timeSrv
.
setTime
({
from
:
moment
.
utc
(
from
),
to
:
moment
.
utc
(
to
)
});
}
openDropdown
()
{
openDropdown
()
{
this
.
init
();
this
.
init
();
this
.
isOpen
=
true
;
this
.
isOpen
=
true
;
...
...
public/app/partials/help_modal.html
View file @
963001ba
...
@@ -29,6 +29,14 @@
...
@@ -29,6 +29,14 @@
<td>
Refresh (Fetches new data and rerenders panels)
</td>
<td>
Refresh (Fetches new data and rerenders panels)
</td>
</tr>
</tr>
<tr>
<tr>
<td><span
class=
"label label-info"
>
<
</span></td>
<td>
Shift time backward
</td>
</tr>
<tr>
<td><span
class=
"label label-info"
>
>
</span></td>
<td>
Shift time forward
</td>
</tr>
<tr>
<td><span
class=
"label label-info"
>
CTRL+S
</span></td>
<td><span
class=
"label label-info"
>
CTRL+S
</span></td>
<td>
Save dashboard
</td>
<td>
Save dashboard
</td>
</tr>
</tr>
...
...
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