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
25ec7b5b
Commit
25ec7b5b
authored
Apr 11, 2018
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrollbar: use native scroll for page
parent
63dab4ff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
17 deletions
+50
-17
public/app/core/components/scroll/page_scroll.ts
+37
-0
public/app/core/core.ts
+2
-0
public/app/partials/dashboard.html
+2
-2
public/sass/components/_panel_graph.scss
+1
-0
public/sass/components/_scrollbar.scss
+7
-13
public/views/index.template.html
+1
-2
No files found.
public/app/core/components/scroll/page_scroll.ts
0 → 100644
View file @
25ec7b5b
import
coreModule
from
'app/core/core_module'
;
import
appEvents
from
'app/core/app_events'
;
export
function
pageScrollbar
()
{
return
{
restrict
:
'A'
,
link
:
function
(
scope
,
elem
,
attrs
)
{
let
lastPos
=
0
;
appEvents
.
on
(
'dash-scroll'
,
evt
=>
{
if
(
evt
.
restore
)
{
elem
[
0
].
scrollTop
=
lastPos
;
return
;
}
lastPos
=
elem
[
0
].
scrollTop
;
if
(
evt
.
animate
)
{
elem
.
animate
({
scrollTop
:
evt
.
pos
},
500
);
}
else
{
elem
[
0
].
scrollTop
=
evt
.
pos
;
}
},
scope
);
scope
.
$on
(
'$routeChangeSuccess'
,
()
=>
{
lastPos
=
0
;
elem
[
0
].
scrollTop
=
0
;
});
},
};
}
coreModule
.
directive
(
'pageScrollbar'
,
pageScrollbar
);
public/app/core/core.ts
View file @
25ec7b5b
...
@@ -47,6 +47,7 @@ import { NavModelSrv, NavModel } from './nav_model_srv';
...
@@ -47,6 +47,7 @@ import { NavModelSrv, NavModel } from './nav_model_srv';
import
{
userPicker
}
from
'./components/user_picker'
;
import
{
userPicker
}
from
'./components/user_picker'
;
import
{
teamPicker
}
from
'./components/team_picker'
;
import
{
teamPicker
}
from
'./components/team_picker'
;
import
{
geminiScrollbar
}
from
'./components/scroll/scroll'
;
import
{
geminiScrollbar
}
from
'./components/scroll/scroll'
;
import
{
pageScrollbar
}
from
'./components/scroll/page_scroll'
;
import
{
gfPageDirective
}
from
'./components/gf_page'
;
import
{
gfPageDirective
}
from
'./components/gf_page'
;
import
{
orgSwitcher
}
from
'./components/org_switcher'
;
import
{
orgSwitcher
}
from
'./components/org_switcher'
;
import
{
profiler
}
from
'./profiler'
;
import
{
profiler
}
from
'./profiler'
;
...
@@ -85,6 +86,7 @@ export {
...
@@ -85,6 +86,7 @@ export {
userPicker
,
userPicker
,
teamPicker
,
teamPicker
,
geminiScrollbar
,
geminiScrollbar
,
pageScrollbar
,
gfPageDirective
,
gfPageDirective
,
orgSwitcher
,
orgSwitcher
,
manageDashboardsDirective
,
manageDashboardsDirective
,
...
...
public/app/partials/dashboard.html
View file @
25ec7b5b
<div
dash-class
ng-if=
"ctrl.dashboard"
>
<div
dash-class
ng-if=
"ctrl.dashboard"
>
<dashnav
dashboard=
"ctrl.dashboard"
></dashnav>
<dashnav
dashboard=
"ctrl.dashboard"
></dashnav>
<div
class=
"scroll-canvas scroll-canvas--dashboard"
>
<div
class=
"scroll-canvas scroll-canvas--dashboard"
page-scrollbar
>
<div
grafana-scrollbar
>
<div>
<dashboard-settings
dashboard=
"ctrl.dashboard"
<dashboard-settings
dashboard=
"ctrl.dashboard"
ng-if=
"ctrl.dashboardViewState.state.editview"
ng-if=
"ctrl.dashboardViewState.state.editview"
class=
"dashboard-settings"
>
class=
"dashboard-settings"
>
...
...
public/sass/components/_panel_graph.scss
View file @
25ec7b5b
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
.graph-legend-scroll
{
.graph-legend-scroll
{
position
:
relative
;
position
:
relative
;
overflow
:
auto
!
important
;
}
}
.graph-legend-icon
{
.graph-legend-icon
{
...
...
public/sass/components/_scrollbar.scss
View file @
25ec7b5b
...
@@ -106,22 +106,16 @@
...
@@ -106,22 +106,16 @@
opacity
:
0
.9
;
opacity
:
0
.9
;
}
}
// Srollbars
// S
c
rollbars
//
//
// ::-webkit-scrollbar {
// width: 8px;
// height: 8px;
// }
// ::-webkit-scrollbar:hover {
// height: 8px;
// }
::-webkit-scrollbar
{
::-webkit-scrollbar
{
// Hide system scrollbar (Mac OS X)
width
:
8px
;
width
:
0
;
height
:
8px
;
height
:
0
;
}
::-webkit-scrollbar:hover
{
height
:
8px
;
}
}
::-webkit-scrollbar-button:start:decrement
,
::-webkit-scrollbar-button:start:decrement
,
...
...
public/views/index.template.html
View file @
25ec7b5b
...
@@ -40,8 +40,7 @@
...
@@ -40,8 +40,7 @@
</div>
</div>
<div
class=
"main-view"
>
<div
class=
"main-view"
>
<!-- Not sure do we really need grafana-scrollbar here? -->
<div
class=
"scroll-canvas"
>
<div
class=
"scroll-canvas"
grafana-scrollbar
>
<div
ng-view
></div>
<div
ng-view
></div>
<footer
class=
"footer"
>
<footer
class=
"footer"
>
...
...
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