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
ed44face
Unverified
Commit
ed44face
authored
Apr 16, 2018
by
David
Committed by
GitHub
Apr 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11605 from grafana/davkal/show-version-in-help
Show Grafana version and build in Help menu
parents
90ed046c
5a29c172
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
pkg/api/index.go
+7
-1
public/app/core/components/sidemenu/sidemenu.html
+5
-1
public/sass/components/_sidemenu.scss
+9
-0
No files found.
pkg/api/index.go
View file @
ed44face
...
...
@@ -118,9 +118,14 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
})
if
c
.
IsSignedIn
{
// Only set login if it's different from the name
var
login
string
if
c
.
SignedInUser
.
Login
!=
c
.
SignedInUser
.
NameOrFallback
()
{
login
=
c
.
SignedInUser
.
Login
}
profileNode
:=
&
dtos
.
NavLink
{
Text
:
c
.
SignedInUser
.
NameOrFallback
(),
SubTitle
:
c
.
SignedInUser
.
L
ogin
,
SubTitle
:
l
ogin
,
Id
:
"profile"
,
Img
:
data
.
User
.
GravatarUrl
,
Url
:
setting
.
AppSubUrl
+
"/profile"
,
...
...
@@ -284,6 +289,7 @@ func setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, error) {
data
.
NavTree
=
append
(
data
.
NavTree
,
&
dtos
.
NavLink
{
Text
:
"Help"
,
SubTitle
:
fmt
.
Sprintf
(
`Grafana v%s (%s)`
,
setting
.
BuildVersion
,
setting
.
BuildCommit
),
Id
:
"help"
,
Url
:
"#"
,
Icon
:
"gicon gicon-question"
,
...
...
public/app/core/components/sidemenu/sidemenu.html
View file @
ed44face
...
...
@@ -54,6 +54,9 @@
</span>
</a>
<ul
class=
"dropdown-menu dropdown-menu--sidemenu"
role=
"menu"
>
<li
ng-if=
"item.subTitle"
class=
"sidemenu-subtitle"
>
<span
class=
"sidemenu-item-text"
>
{{::item.subTitle}}
</span>
</li>
<li
ng-if=
"item.showOrgSwitcher"
class=
"sidemenu-org-switcher"
>
<a
ng-click=
"ctrl.switchOrg()"
>
<div>
...
...
@@ -75,4 +78,4 @@
</li>
</ul>
</div>
</div>
</div>
\ No newline at end of file
public/sass/components/_sidemenu.scss
View file @
ed44face
...
...
@@ -149,6 +149,15 @@
color
:
#ebedf2
;
}
.sidemenu-subtitle
{
padding
:
0
.5rem
1rem
0
.5rem
;
font-size
:
$font-size-sm
;
color
:
$text-color-weak
;
border-bottom
:
1px
solid
$dropdownDividerBottom
;
margin-bottom
:
0
.25rem
;
white-space
:
nowrap
;
}
li
.sidemenu-org-switcher
{
border-bottom
:
1px
solid
$dropdownDividerBottom
;
}
...
...
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