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
f02be025
Commit
f02be025
authored
Aug 14, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: use flexbox for sidenav, put logo in sidenav
parent
1dab313c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
151 additions
and
181 deletions
+151
-181
public/app/core/components/navbar/navbar.html
+0
-5
public/app/core/components/sidemenu/sidemenu.html
+70
-64
public/app/features/plugins/partials/ds_list.html
+0
-3
public/sass/components/_sidemenu.scss
+3
-34
public/sass/layout/_page.scss
+5
-3
public/views/index.html
+73
-72
No files found.
public/app/core/components/navbar/navbar.html
View file @
f02be025
<div
class=
"navbar-inner"
>
<a
class=
"navbar-brand-btn pointer"
ng-click=
"ctrl.contextSrv.toggleSideMenu()"
>
<span
class=
"navbar-brand-btn-background"
>
<img
src=
"public/img/grafana_icon.svg"
></img>
</span>
</a>
<div
ng-if=
"::!ctrl.hasMenu"
>
<a
href=
"{{::ctrl.section.url}}"
class=
"navbar-page-btn"
>
...
...
public/app/core/components/sidemenu/sidemenu.html
View file @
f02be025
<ul
class=
"sidemenu"
>
<li>
<a
class=
"sidemenu-item"
ng-click=
"ctrl.search()"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-search"
></i></span>
</a>
</li>
<a
class=
"navbar-brand-btn pointer"
ng-click=
"ctrl.contextSrv.toggleSideMenu()"
>
<span
class=
"navbar-brand-btn-background"
>
<img
src=
"public/img/grafana_icon.svg"
></img>
</span>
</a>
<ul
class=
"sidemenu"
>
<li>
<a
class=
"sidemenu-item"
ng-click=
"ctrl.search()"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-search"
></i></span>
</a>
</li>
<li
ng-repeat=
"item in ::ctrl.mainLinks"
class=
"dropdown"
>
<a
href=
"{{::item.url}}"
class=
"sidemenu-item"
target=
"{{::item.target}}"
>
<span
class=
"icon-circle sidemenu-icon"
>
<i
class=
"{{::item.icon}}"
ng-show=
"::item.icon"
></i>
<img
ng-src=
"{{::item.img}}"
ng-show=
"::item.img"
>
</span>
</a>
<ul
class=
"dropdown-menu dropdown-menu--sidemenu"
role=
"menu"
ng-if=
"::item.children"
>
<li
class=
"side-menu-header"
>
<span
class=
"sidemenu-item-text"
>
{{::item.text}}
</span>
</li>
<li
ng-repeat=
"child in ::item.children"
ng-class=
"{divider: child.divider}"
>
<a
href=
"{{::child.url}}"
>
<i
class=
"{{::child.icon}}"
ng-show=
"::child.icon"
></i>
{{::child.text}}
</a>
</li>
</ul>
</li>
<li
ng-repeat=
"item in ::ctrl.mainLinks"
class=
"dropdown"
>
<a
href=
"{{::item.url}}"
class=
"sidemenu-item"
target=
"{{::item.target}}"
>
<span
class=
"icon-circle sidemenu-icon"
>
<i
class=
"{{::item.icon}}"
ng-show=
"::item.icon"
></i>
<img
ng-src=
"{{::item.img}}"
ng-show=
"::item.img"
>
</span>
</a>
<ul
class=
"dropdown-menu dropdown-menu--sidemenu"
role=
"menu"
ng-if=
"::item.children"
>
<li
class=
"side-menu-header"
>
<span
class=
"sidemenu-item-text"
>
{{::item.text}}
</span>
</li>
<li
ng-repeat=
"child in ::item.children"
ng-class=
"{divider: child.divider}"
>
<a
href=
"{{::child.url}}"
>
<i
class=
"{{::child.icon}}"
ng-show=
"::child.icon"
></i>
{{::child.text}}
</a>
</li>
</ul>
</li>
<li
ng-show=
"::!ctrl.isSignedIn"
>
<a
href=
"{{ctrl.loginUrl}}"
class=
"sidemenu-item"
target=
"_self"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-sign-in"
></i></span>
<span
class=
"sidemenu-item-text"
>
Sign in
</span>
</a>
</li>
<li
ng-show=
"::!ctrl.isSignedIn"
>
<a
href=
"{{ctrl.loginUrl}}"
class=
"sidemenu-item"
target=
"_self"
>
<span
class=
"icon-circle sidemenu-icon"
><i
class=
"fa fa-fw fa-sign-in"
></i></span>
<span
class=
"sidemenu-item-text"
>
Sign in
</span>
</a>
</li>
<li
class=
"sidemenu-org-section"
ng-if=
"::ctrl.isSignedIn"
class=
"dropdown"
>
<a
class=
"sidemenu-item"
href=
"profile"
>
<span
class=
"icon-circle sidemenu-icon sidemenu-org-avatar"
>
<img
ng-src=
"{{::ctrl.user.gravatarUrl}}"
>
<span
class=
"sidemenu-org-avatar--missing"
>
<i
class=
"fa fa-fw fa-user"
></i>
</span>
</div>
</a>
<ul
class=
"dropdown-menu dropdown-menu--sidemenu dropup"
role=
"menu"
>
<li
class=
"side-menu-header"
>
<span
class=
"sidemenu-org-user sidemenu-item-text"
>
{{::ctrl.user.name}}
</span>
<span
class=
"sidemenu-org-name sidemenu-item-text"
>
{{::ctrl.user.orgName}}
</span>
</li>
<li
ng-repeat=
"menuItem in ctrl.orgMenu"
ng-class=
"::menuItem.cssClass"
>
<span
ng-show=
"::menuItem.section"
>
{{::menuItem.section}}
</span>
<a
href=
"{{::menuItem.url}}"
ng-show=
"::menuItem.url"
target=
"{{::menuItem.target}}"
>
<i
class=
"{{::menuItem.icon}}"
ng-show=
"::menuItem.icon"
></i>
{{::menuItem.text}}
</a>
</li>
<li
ng-show=
"ctrl.orgs.length > ctrl.maxShownOrgs"
style=
"margin-left: 10px;width: 90%"
>
<span
class=
"sidemenu-item-text"
>
Max shown : {{::ctrl.maxShownOrgs}}
</span>
<input
ng-model=
"::ctrl.orgFilter"
style=
"padding-left: 5px"
type=
"text"
ng-change=
"::ctrl.loadOrgsItems();"
class=
"gf-input-small width-12"
placeholder=
"Filter"
>
</li>
<li
ng-repeat=
"orgItem in ctrl.orgItems"
ng-class=
"::orgItem.cssClass"
>
<a
href=
"{{::orgItem.url}}"
ng-show=
"::orgItem.url"
target=
"{{::orgItem.target}}"
>
<i
class=
"{{::orgItem.icon}}"
ng-show=
"::orgItem.icon"
></i>
{{::orgItem.text}}
</a>
</li>
</ul>
</li>
<li
class=
"sidemenu-org-section"
ng-if=
"::ctrl.isSignedIn"
class=
"dropdown"
>
<a
class=
"sidemenu-item"
href=
"profile"
>
<span
class=
"icon-circle sidemenu-icon sidemenu-org-avatar"
>
<img
ng-src=
"{{::ctrl.user.gravatarUrl}}"
>
<span
class=
"sidemenu-org-avatar--missing"
>
<i
class=
"fa fa-fw fa-user"
></i>
</span>
</div>
</a>
<ul
class=
"dropdown-menu dropdown-menu--sidemenu dropup"
role=
"menu"
>
<li
class=
"side-menu-header"
>
<span
class=
"sidemenu-org-user sidemenu-item-text"
>
{{::ctrl.user.name}}
</span>
<span
class=
"sidemenu-org-name sidemenu-item-text"
>
{{::ctrl.user.orgName}}
</span>
</li>
<li
ng-repeat=
"menuItem in ctrl.orgMenu"
ng-class=
"::menuItem.cssClass"
>
<span
ng-show=
"::menuItem.section"
>
{{::menuItem.section}}
</span>
<a
href=
"{{::menuItem.url}}"
ng-show=
"::menuItem.url"
target=
"{{::menuItem.target}}"
>
<i
class=
"{{::menuItem.icon}}"
ng-show=
"::menuItem.icon"
></i>
{{::menuItem.text}}
</a>
</li>
<li
ng-show=
"ctrl.orgs.length > ctrl.maxShownOrgs"
style=
"margin-left: 10px;width: 90%"
>
<span
class=
"sidemenu-item-text"
>
Max shown : {{::ctrl.maxShownOrgs}}
</span>
<input
ng-model=
"::ctrl.orgFilter"
style=
"padding-left: 5px"
type=
"text"
ng-change=
"::ctrl.loadOrgsItems();"
class=
"gf-input-small width-12"
placeholder=
"Filter"
>
</li>
<li
ng-repeat=
"orgItem in ctrl.orgItems"
ng-class=
"::orgItem.cssClass"
>
<a
href=
"{{::orgItem.url}}"
ng-show=
"::orgItem.url"
target=
"{{::orgItem.target}}"
>
<i
class=
"{{::orgItem.icon}}"
ng-show=
"::orgItem.icon"
></i>
{{::orgItem.text}}
</a>
</li>
</ul>
</li>
</ul>
public/app/features/plugins/partials/ds_list.html
View file @
f02be025
<navbar
model=
"ctrl.navModel"
></navbar>
<div
class=
"page-container"
>
<div
class=
"page-header"
>
<h1>
Data Sources
</h1>
...
...
@@ -44,5 +42,4 @@
<div
ng-if=
"ctrl.datasources.length === 0"
>
<em>
No data sources defined
</em>
</div>
</div>
public/sass/components/_sidemenu.scss
View file @
f02be025
.sidemenu-canvas
{
position
:
relative
;
}
.sidemenu-wrapper
{
position
:
absolute
;
top
:
52px
;
left
:
0
;
//border-top: 1px solid $tight-form-border;
display
:
flex
;
flex-direction
:
column
;
width
:
$side-menu-width
;
background-color
:
$side-menu-bg
;
z-index
:
1000
;
opacity
:
0
;
visibility
:
hidden
;
z-index
:
1
;
a
:focus
{
text-decoration
:
none
;
}
}
.sidemenu-open
{
.sidemenu-wrapper
{
visibility
:
visible
;
//transform: translate3d(0, 0, 0);
opacity
:
1
;
transition
:
opacity
0
.3s
;
}
}
.sidemenu-pinned
{
.sidemenu-wrapper
{
min-height
:
calc
(
100%
-
54px
);
}
.dashboard-container
{
padding-left
:
$side-menu-width
+
8px
;
}
.page-container
{
margin-left
:
$side-menu-width
;
}
.search-container
{
left
:
$side-menu-width
;
}
}
.sidemenu
{
list-style
:
none
;
margin
:
0
;
...
...
public/sass/layout/_page.scss
View file @
f02be025
.grafana-app
{
display
:
block
;
height
:
100%
;
display
:
flex
;
align-items
:
stretch
;
width
:
100%
;
}
.main-view
{
// height: 100%; REMOVED FOR FOOTER TRW
flex-grow
:
1
;
}
.page-container
{
@extend
.container
;
background-color
:
$page-bg
;
padding
:
(
$spacer
*
2
)
(
$spacer
*
4
);
max-width
:
1060px
;
min-height
:
calc
(
100%
-
54px
);
padding-bottom
:
$spacer
*
5
;
background-image
:
linear-gradient
(
60deg
,
transparent
70%
,
darken
(
$page-bg
,
4%
)
98%
)
...
...
public/views/index.html
View file @
f02be025
...
...
@@ -25,9 +25,7 @@
<body
ng-cloak
>
<grafana-app
class=
"grafana-app"
>
<aside
class=
"sidemenu-wrapper"
>
<sidemenu
ng-if=
"contextSrv.sidemenu"
></sidemenu>
</aside>
<sidemenu
class=
"sidemenu-wrapper"
></sidemenu>
<div
class=
"page-alert-list"
>
<div
ng-repeat=
'alert in dashAlerts.list'
class=
"alert-{{alert.severity}} alert"
>
...
...
@@ -39,77 +37,80 @@
</div>
</div>
<div
ng-view
class=
"main-view"
></div>
<footer
class=
"footer"
>
<div
class=
"row text-center"
>
<ul>
<li>
<a
href=
"http://docs.grafana.org"
target=
"_blank"
>
<i
class=
"fa fa-file-code-o"
></i>
Docs
</a>
</li>
<li>
<a
href=
"https://grafana.com/services/support"
target=
"_blank"
>
<i
class=
"fa fa-support"
></i>
Support Plans
</a>
</li>
<li>
<a
href=
"https://community.grafana.com/"
target=
"_blank"
>
<i
class=
"fa fa-comments-o"
></i>
Community
</a>
</li>
<li>
<a
href=
"https://grafana.com"
target=
"_blank"
>
Grafana
</a>
<span>
v[[.BuildVersion]] (commit: [[.BuildCommit]])
</span>
</li>
[[if .NewGrafanaVersionExists]]
<li>
<a
href=
"https://grafana.com/get"
target=
"_blank"
bs-tooltip=
"'[[.NewGrafanaVersion]]'"
>
New version available!
</a>
</li>
[[end]]
</ul>
</div>
</footer>
</grafana-app>
<div
class=
"main-view"
>
<div
ng-view
></div>
<footer
class=
"footer"
>
<div
class=
"row text-center"
>
<ul>
<li>
<a
href=
"http://docs.grafana.org"
target=
"_blank"
>
<i
class=
"fa fa-file-code-o"
></i>
Docs
</a>
</li>
<li>
<a
href=
"https://grafana.com/services/support"
target=
"_blank"
>
<i
class=
"fa fa-support"
></i>
Support Plans
</a>
</li>
<li>
<a
href=
"https://community.grafana.com/"
target=
"_blank"
>
<i
class=
"fa fa-comments-o"
></i>
Community
</a>
</li>
<li>
<a
href=
"https://grafana.com"
target=
"_blank"
>
Grafana
</a>
<span>
v[[.BuildVersion]] (commit: [[.BuildCommit]])
</span>
</li>
[[if .NewGrafanaVersionExists]]
<li>
<a
href=
"https://grafana.com/get"
target=
"_blank"
bs-tooltip=
"'[[.NewGrafanaVersion]]'"
>
New version available!
</a>
</li>
[[end]]
</ul>
</div>
</footer>
</div>
</grafana-app>
<script>
window
.
grafanaBootData
=
{
user
:[[.
User
]],
settings
:
[[.
Settings
]],
mainNavLinks
:
[[.
MainNavLinks
]]
};
</script>
<script>
window
.
grafanaBootData
=
{
user
:[[.
User
]],
settings
:
[[.
Settings
]],
mainNavLinks
:
[[.
MainNavLinks
]]
};
</script>
<!-- build:js [[.AppSubUrl]]/public/app/boot.js -->
<script
src=
"[[.AppSubUrl]]/public/vendor/npm/es6-shim/es6-shim.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/vendor/npm/systemjs/dist/system.src.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/app/system.conf.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/app/boot.js"
></script>
<!-- endbuild -->
<!-- build:js [[.AppSubUrl]]/public/app/boot.js -->
<script
src=
"[[.AppSubUrl]]/public/vendor/npm/es6-shim/es6-shim.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/vendor/npm/systemjs/dist/system.src.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/app/system.conf.js"
></script>
<script
src=
"[[.AppSubUrl]]/public/app/boot.js"
></script>
<!-- endbuild -->
[[if .GoogleTagManagerId]]
<script>
dataLayer
=
[{
'IsSignedIn'
:
'[[.User.IsSignedIn]]'
,
'Email'
:
'[[.User.Email]]'
,
'Name'
:
'[[.User.Name]]'
,
'UserId'
:
'[[.User.Id]]'
,
'OrgId'
:
'[[.User.OrgId]]'
,
'OrgName'
:
'[[.User.OrgName]]'
,
}];
</script>
<!-- Google Tag Manager -->
<noscript><iframe
src=
"//www.googletagmanager.com/ns.html?id=[[.GoogleTagManagerId]]"
height=
"0"
width=
"0"
style=
"display:none;visibility:hidden"
></iframe></noscript>
<script>
(
function
(
w
,
d
,
s
,
l
,
i
){
w
[
l
]
=
w
[
l
]
||
[];
w
[
l
].
push
({
'gtm.start'
:
new
Date
().
getTime
(),
event
:
'gtm.js'
});
var
f
=
d
.
getElementsByTagName
(
s
)[
0
],
j
=
d
.
createElement
(
s
),
dl
=
l
!=
'dataLayer'
?
'&l='
+
l
:
''
;
j
.
async
=
true
;
j
.
src
=
'//www.googletagmanager.com/gtm.js?id='
+
i
+
dl
;
f
.
parentNode
.
insertBefore
(
j
,
f
);
})(
window
,
document
,
'script'
,
'dataLayer'
,
'[[.GoogleTagManagerId]]'
);
</script>
<!-- End Google Tag Manager -->
[[end]]
[[if .GoogleTagManagerId]]
<script>
dataLayer
=
[{
'IsSignedIn'
:
'[[.User.IsSignedIn]]'
,
'Email'
:
'[[.User.Email]]'
,
'Name'
:
'[[.User.Name]]'
,
'UserId'
:
'[[.User.Id]]'
,
'OrgId'
:
'[[.User.OrgId]]'
,
'OrgName'
:
'[[.User.OrgName]]'
,
}];
</script>
<!-- Google Tag Manager -->
<noscript><iframe
src=
"//www.googletagmanager.com/ns.html?id=[[.GoogleTagManagerId]]"
height=
"0"
width=
"0"
style=
"display:none;visibility:hidden"
></iframe></noscript>
<script>
(
function
(
w
,
d
,
s
,
l
,
i
){
w
[
l
]
=
w
[
l
]
||
[];
w
[
l
].
push
({
'gtm.start'
:
new
Date
().
getTime
(),
event
:
'gtm.js'
});
var
f
=
d
.
getElementsByTagName
(
s
)[
0
],
j
=
d
.
createElement
(
s
),
dl
=
l
!=
'dataLayer'
?
'&l='
+
l
:
''
;
j
.
async
=
true
;
j
.
src
=
'//www.googletagmanager.com/gtm.js?id='
+
i
+
dl
;
f
.
parentNode
.
insertBefore
(
j
,
f
);
})(
window
,
document
,
'script'
,
'dataLayer'
,
'[[.GoogleTagManagerId]]'
);
</script>
<!-- End Google Tag Manager -->
[[end]]
</body>
</body>
</html>
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