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
d4a231fe
Commit
d4a231fe
authored
Aug 17, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: fixed sidenav issues
parent
4dd4631b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
54 deletions
+27
-54
public/app/core/components/grafana_app.ts
+19
-1
public/app/features/org/user_group_details_ctrl.ts
+1
-1
public/app/features/org/user_groups_ctrl.ts
+1
-1
public/sass/components/_navbar.scss
+2
-42
public/sass/components/_sidemenu.scss
+3
-7
public/sass/components/_view_states.scss
+1
-2
No files found.
public/app/core/components/grafana_app.ts
View file @
d4a231fe
...
@@ -65,7 +65,7 @@ export class GrafanaCtrl {
...
@@ -65,7 +65,7 @@ export class GrafanaCtrl {
}
}
/** @ngInject */
/** @ngInject */
export
function
grafanaAppDirective
(
playlistSrv
,
contextSrv
)
{
export
function
grafanaAppDirective
(
playlistSrv
,
contextSrv
,
$timeout
,
$rootScope
)
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
controller
:
GrafanaCtrl
,
controller
:
GrafanaCtrl
,
...
@@ -118,6 +118,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
...
@@ -118,6 +118,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
var
lastActivity
=
new
Date
().
getTime
();
var
lastActivity
=
new
Date
().
getTime
();
var
activeUser
=
true
;
var
activeUser
=
true
;
var
inActiveTimeLimit
=
60
*
1000
;
var
inActiveTimeLimit
=
60
*
1000
;
var
sidemenuHidden
=
false
;
function
checkForInActiveUser
()
{
function
checkForInActiveUser
()
{
if
(
!
activeUser
)
{
if
(
!
activeUser
)
{
...
@@ -131,6 +132,14 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
...
@@ -131,6 +132,14 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
if
((
new
Date
().
getTime
()
-
lastActivity
)
>
inActiveTimeLimit
)
{
if
((
new
Date
().
getTime
()
-
lastActivity
)
>
inActiveTimeLimit
)
{
activeUser
=
false
;
activeUser
=
false
;
body
.
addClass
(
'user-activity-low'
);
body
.
addClass
(
'user-activity-low'
);
// hide sidemenu
if
(
sidemenuOpen
)
{
sidemenuHidden
=
true
;
body
.
removeClass
(
'sidemenu-open'
);
$timeout
(
function
()
{
$rootScope
.
$broadcast
(
"render"
);
},
100
);
}
}
}
}
}
...
@@ -139,6 +148,15 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
...
@@ -139,6 +148,15 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
if
(
!
activeUser
)
{
if
(
!
activeUser
)
{
activeUser
=
true
;
activeUser
=
true
;
body
.
removeClass
(
'user-activity-low'
);
body
.
removeClass
(
'user-activity-low'
);
// restore sidemenu
if
(
sidemenuHidden
)
{
sidemenuHidden
=
false
;
body
.
addClass
(
'sidemenu-open'
);
$timeout
(
function
()
{
$rootScope
.
$broadcast
(
"render"
);
},
100
);
}
}
}
}
}
...
...
public/app/features/org/user_group_details_ctrl.ts
View file @
d4a231fe
...
@@ -9,7 +9,7 @@ export default class UserGroupDetailsCtrl {
...
@@ -9,7 +9,7 @@ export default class UserGroupDetailsCtrl {
navModel
:
any
;
navModel
:
any
;
constructor
(
private
$scope
,
private
$http
,
private
backendSrv
,
private
$routeParams
,
navModelSrv
)
{
constructor
(
private
$scope
,
private
$http
,
private
backendSrv
,
private
$routeParams
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
get
OrgNav
(
3
);
this
.
navModel
=
navModelSrv
.
get
Nav
(
'cfg'
,
'users'
);
this
.
get
();
this
.
get
();
}
}
...
...
public/app/features/org/user_groups_ctrl.ts
View file @
d4a231fe
...
@@ -15,7 +15,7 @@ export class UserGroupsCtrl {
...
@@ -15,7 +15,7 @@ export class UserGroupsCtrl {
/** @ngInject */
/** @ngInject */
constructor
(
private
$scope
,
private
$http
,
private
backendSrv
,
private
$location
,
navModelSrv
)
{
constructor
(
private
$scope
,
private
$http
,
private
backendSrv
,
private
$location
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
get
OrgNav
(
3
);
this
.
navModel
=
navModelSrv
.
get
Nav
(
'cfg'
,
'users'
);
this
.
get
();
this
.
get
();
}
}
...
...
public/sass/components/_navbar.scss
View file @
d4a231fe
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
display
:
block
;
display
:
block
;
overflow
:
visible
;
overflow
:
visible
;
position
:
relative
;
position
:
relative
;
margin-left
:
$side-menu-width
;
}
}
.navbar-inner
{
.navbar-inner
{
...
@@ -10,12 +11,11 @@
...
@@ -10,12 +11,11 @@
padding-right
:
$spacer
;
padding-right
:
$spacer
;
background-color
:
$navbarBackground
;
background-color
:
$navbarBackground
;
border-bottom
:
$navbarBorder
;
border-bottom
:
$navbarBorder
;
margin-left
:
$side-menu-width
;
@include
clearfix
();
@include
clearfix
();
}
}
.sidemenu-open
{
.sidemenu-open
{
.navbar
-inner
{
.navbar
{
margin-left
:
0
;
margin-left
:
0
;
}
}
}
}
...
@@ -61,46 +61,6 @@
...
@@ -61,46 +61,6 @@
background-color
:
$navbarLinkBackgroundActive
;
background-color
:
$navbarLinkBackgroundActive
;
}
}
.navbar-brand-btn
{
display
:
block
;
margin-bottom
:
3rem
;
background-color
:
$side-menu-bg
;
padding
:
0
.4rem
1
.0rem
0
.4rem
0
.65rem
;
min-height
:
$navbarHeight
;
.fa-caret-down
{
font-size
:
70%
;
}
&
:hover
{
background
:
$navbarButtonBackgroundHighlight
;
}
img
{
width
:
30px
;
position
:
relative
;
top
:
-1px
;
}
.navbar-brand-btn-background
{
display
:
inline-block
;
border
:
1px
solid
$body-bg
;
padding
:
4px
;
border-radius
:
50%
;
background
:
$iconContainerBackground
;
width
:
40px
;
height
:
40px
;
}
.icon-gf-grafana_wordmark
{
font-size
:
21px
;
position
:
relative
;
top
:
6px
;
padding-left
:
5px
;
display
:
none
;
}
}
.navbar-page-btn-wrapper
{
.navbar-page-btn-wrapper
{
float
:
left
;
float
:
left
;
&
:hover
{
&
:hover
{
...
...
public/sass/components/_sidemenu.scss
View file @
d4a231fe
.sidemenu
{
.sidemenu
{
position
:
fixed
;
position
:
fixed
;
height
:
30px
;
display
:
flex
;
display
:
flex
;
flex-flow
:
column
;
flex-flow
:
column
;
flex-direction
:
column
;
flex-direction
:
column
;
width
:
$side-menu-width
;
width
:
$side-menu-width
;
background
-color
:
$side-menu-bg
;
background
:
$navbarBackground
;
z-index
:
1
;
z-index
:
1
;
a
:focus
{
a
:focus
{
...
@@ -18,6 +14,7 @@
...
@@ -18,6 +14,7 @@
.sidemenu-open
{
.sidemenu-open
{
.sidemenu
{
.sidemenu
{
background
:
$side-menu-bg
;
position
:
initial
;
position
:
initial
;
height
:
auto
;
height
:
auto
;
}
}
...
@@ -28,6 +25,7 @@
...
@@ -28,6 +25,7 @@
}
}
.sidemenu__top
{
.sidemenu__top
{
padding-top
:
3rem
;
flex-grow
:
1
;
flex-grow
:
1
;
display
:
none
;
display
:
none
;
}
}
...
@@ -153,8 +151,6 @@ li.sidemenu-org-switcher {
...
@@ -153,8 +151,6 @@ li.sidemenu-org-switcher {
.sidemenu__logo
{
.sidemenu__logo
{
display
:
block
;
display
:
block
;
margin-bottom
:
3rem
;
background-color
:
$side-menu-bg
;
padding
:
0
.4rem
1
.0rem
0
.4rem
0
.65rem
;
padding
:
0
.4rem
1
.0rem
0
.4rem
0
.65rem
;
min-height
:
$navbarHeight
;
min-height
:
$navbarHeight
;
...
...
public/sass/components/_view_states.scss
View file @
d4a231fe
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
}
}
// navbar buttons
// navbar buttons
.navbar-brand-btn
,
.navbar-inner
{
.navbar-inner
{
border-color
:
transparent
;
border-color
:
transparent
;
background
:
transparent
;
background
:
transparent
;
...
@@ -52,7 +51,7 @@
...
@@ -52,7 +51,7 @@
.navbar-page-btn
{
.navbar-page-btn
{
border-color
:
transparent
;
border-color
:
transparent
;
background
:
transparent
;
background
:
transparent
;
transform
:
translate3d
(
-
5
0px
,
0
,
0
);
transform
:
translate3d
(
-
4
0px
,
0
,
0
);
transition
:
all
1
.5s
ease-in-out
1s
;
transition
:
all
1
.5s
ease-in-out
1s
;
.icon-gf
{
.icon-gf
{
opacity
:
0
;
opacity
:
0
;
...
...
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