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
34427f34
Commit
34427f34
authored
Jan 05, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
side menu visible by default after login
parent
344812f1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
9 deletions
+15
-9
src/app/components/store.js
+7
-1
src/app/controllers/grafanaCtrl.js
+4
-3
src/app/partials/dashboard_topnav.html
+1
-1
src/app/partials/navbar.html
+1
-1
src/app/partials/register.html
+1
-1
src/app/partials/sidemenu.html
+1
-1
src/app/routes/backend/dashboard.js
+0
-1
No files found.
src/app/components/store.js
View file @
34427f34
...
...
@@ -8,9 +8,15 @@ define([], function() {
set
:
function
(
key
,
value
)
{
window
.
localStorage
[
key
]
=
value
;
},
getBool
:
function
(
key
)
{
getBool
:
function
(
key
,
def
)
{
if
(
def
!==
void
0
&&
!
this
.
exists
(
key
))
{
return
def
;
}
return
window
.
localStorage
[
key
]
===
'true'
?
true
:
false
;
},
exists
:
function
(
key
)
{
return
window
.
localStorage
[
key
]
!==
void
0
;
},
delete
:
function
(
key
)
{
window
.
localStorage
.
removeItem
(
key
);
}
...
...
src/app/controllers/grafanaCtrl.js
View file @
34427f34
...
...
@@ -42,13 +42,14 @@ function (angular, config, _, $, store) {
}
$scope
.
onAppEvent
(
'logged-out'
,
function
()
{
$scope
.
showProSideM
enu
=
false
;
$scope
.
grafana
.
sidem
enu
=
false
;
$scope
.
grafana
.
user
=
{};
});
$scope
.
onAppEvent
(
'logged-in'
,
function
(
evt
,
user
)
{
$scope
.
grafana
.
sidemenu
=
store
.
getBool
(
'grafana.sidemenu'
);
$scope
.
grafana
.
sidemenu
=
store
.
getBool
(
'grafana.sidemenu'
,
true
);
$scope
.
grafana
.
user
=
user
;
store
.
set
(
'grafana.sidemenu'
,
$scope
.
grafana
.
sidemenu
);
});
};
...
...
@@ -56,7 +57,7 @@ function (angular, config, _, $, store) {
$controller
(
'DashboardCtrl'
,
{
$scope
:
viewScope
}).
init
(
dashboardData
);
};
$scope
.
toggle
Pro
SideMenu
=
function
()
{
$scope
.
toggleSideMenu
=
function
()
{
$scope
.
grafana
.
sidemenu
=
!
$scope
.
grafana
.
sidemenu
;
store
.
set
(
'grafana.sidemenu'
,
$scope
.
grafana
.
sidemenu
);
};
...
...
src/app/partials/dashboard_topnav.html
View file @
34427f34
...
...
@@ -2,7 +2,7 @@
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<span
class=
"brand"
>
<a
ng-click=
"toggle
Pro
SideMenu()"
>
<a
ng-click=
"toggleSideMenu()"
>
<img
class=
"logo-icon"
src=
"img/fav32.png"
bs-tooltip=
"'Grafana'"
data-placement=
"bottom"
></img>
</a>
<span
class=
"page-title"
>
{{dashboard.title}}
</span>
...
...
src/app/partials/navbar.html
View file @
34427f34
...
...
@@ -2,7 +2,7 @@
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<span
class=
"brand"
>
<a
ng-click=
"toggle
Pro
SideMenu()"
>
<a
ng-click=
"toggleSideMenu()"
>
<img
class=
"logo-icon"
src=
"img/fav32.png"
bs-tooltip=
"'Grafana'"
data-placement=
"bottom"
></img>
</a>
<span
class=
"page-title"
>
{{pageTitle}}
</span>
...
...
src/app/partials/register.html
View file @
34427f34
...
...
@@ -4,7 +4,7 @@
<div
class=
"login-box"
>
<div
class=
"login-box-logo"
>
<img
src=
"
/
img/logo_transparent_200x75.png"
>
<img
src=
"img/logo_transparent_200x75.png"
>
</div>
<div
class=
"text-center"
style=
"margin-bottom: 50px"
>
...
...
src/app/partials/sidemenu.html
View file @
34427f34
...
...
@@ -8,7 +8,7 @@
<li><a
href=
"/login?logout"
>
Logout
</a></li>
</ul>
</div>
<a
class=
"pro-sidemenu-link"
ng-href=
"{{appSubUrl}}"
>
<a
class=
"pro-sidemenu-link"
ng-href=
"{{appSubUrl}}
/
"
>
<i
class=
"icon-th-large"
></i>
Dashboards
</a>
...
...
src/app/routes/backend/dashboard.js
View file @
34427f34
...
...
@@ -39,7 +39,6 @@ function (angular, store) {
var
db
=
datasourceSrv
.
getGrafanaDB
();
var
isTemp
=
window
.
location
.
href
.
indexOf
(
'dashboard/temp'
)
!==
-
1
;
console
.
log
(
'default route'
);
if
(
!
$routeParams
.
id
)
{
var
savedRoute
=
store
.
get
(
'grafanaDashboardDefault'
);
...
...
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