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
6bff4164
Commit
6bff4164
authored
Dec 01, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navigation: more progress on new page header
parent
e348ec8c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
31 deletions
+28
-31
pkg/api/index.go
+20
-22
public/app/core/components/PageHeader.tsx
+1
-1
public/app/features/dashboard/partials/dashboardList.html
+6
-6
public/sass/components/_dropdown.scss
+0
-1
public/sass/components/_page_header.scss
+1
-1
No files found.
pkg/api/index.go
View file @
6bff4164
...
...
@@ -102,7 +102,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
dashboardChildNavs
:=
[]
*
dtos
.
NavLink
{
{
Text
:
"Home"
,
Url
:
setting
.
AppSubUrl
+
"/"
,
Icon
:
"fa fa-fw fa-home"
,
HideFromTabs
:
true
},
{
Divider
:
true
},
{
Divider
:
true
,
HideFromTabs
:
true
},
{
Text
:
"Manage"
,
Id
:
"dashboards"
,
Url
:
setting
.
AppSubUrl
+
"/dashboards"
,
Icon
:
"fa fa-fw fa-sitemap"
},
{
Text
:
"Playlists"
,
Id
:
"playlists"
,
Url
:
setting
.
AppSubUrl
+
"/playlists"
,
Icon
:
"fa fa-fw fa-film"
},
{
Text
:
"Snapshots"
,
Id
:
"snapshots"
,
Url
:
setting
.
AppSubUrl
+
"/dashboard/snapshots"
,
Icon
:
"icon-gf icon-gf-fw icon-gf-snapshot"
},
...
...
@@ -113,7 +113,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Id
:
"dashboards"
,
SubTitle
:
"Manage dashboards & folders"
,
Icon
:
"gicon gicon-dashboard"
,
Url
:
setting
.
AppSubUrl
+
"/
dashboards
"
,
Url
:
setting
.
AppSubUrl
+
"/"
,
Children
:
dashboardChildNavs
,
})
...
...
@@ -239,11 +239,6 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Description
:
"View and configure plugins"
,
Icon
:
"icon-gf icon-gf-fw icon-gf-apps"
,
Url
:
setting
.
AppSubUrl
+
"/plugins"
,
// Children: []*dtos.NavLink{
// {Text: "Panels", Url: setting.AppSubUrl + "/plugins?type=panel", Icon: "fa fa-fw fa-stop"},
// {Text: "Data sources", Url: setting.AppSubUrl + "/plugins?type=datasource", Icon: "icon-gf icon-gf-datasources"},
// {Text: "Apps", Url: setting.AppSubUrl + "/plugins?type=app", Icon: "icon-gf icon-gf-apps"},
// },
},
{
Text
:
"Preferences"
,
...
...
@@ -263,21 +258,24 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
},
}
// if c.IsGrafanaAdmin {
// cfgNode.Children = append(cfgNode.Children, &dtos.NavLink{
// Text: "Server Admin",
// Id: "admin",
// Icon: "fa fa-fw fa-shield",
// Url: setting.AppSubUrl + "/admin",
// Children: []*dtos.NavLink{
// {Text: "Users", Id: "global-users", Url: setting.AppSubUrl + "/admin/users"},
// {Text: "Orgs", Id: "global-orgs", Url: setting.AppSubUrl + "/admin/orgs"},
// {Text: "Server Settings", Id: "server-settings", Url: setting.AppSubUrl + "/admin/settings"},
// {Text: "Server Stats", Id: "server-stats", Url: setting.AppSubUrl + "/admin/stats"},
// {Text: "Style Guide", Id: "styleguide", Url: setting.AppSubUrl + "/styleguide"},
// },
// })
// }
if
c
.
IsGrafanaAdmin
{
cfgNode
.
Children
=
append
(
cfgNode
.
Children
,
&
dtos
.
NavLink
{
Divider
:
true
,
HideFromTabs
:
true
,
})
cfgNode
.
Children
=
append
(
cfgNode
.
Children
,
&
dtos
.
NavLink
{
Text
:
"Server Admin"
,
Id
:
"admin"
,
Icon
:
"fa fa-fw fa-shield"
,
Url
:
setting
.
AppSubUrl
+
"/admin"
,
Children
:
[]
*
dtos
.
NavLink
{
{
Text
:
"Users"
,
Id
:
"global-users"
,
Url
:
setting
.
AppSubUrl
+
"/admin/users"
},
{
Text
:
"Orgs"
,
Id
:
"global-orgs"
,
Url
:
setting
.
AppSubUrl
+
"/admin/orgs"
},
{
Text
:
"Server Settings"
,
Id
:
"server-settings"
,
Url
:
setting
.
AppSubUrl
+
"/admin/settings"
},
{
Text
:
"Server Stats"
,
Id
:
"server-stats"
,
Url
:
setting
.
AppSubUrl
+
"/admin/stats"
},
{
Text
:
"Style Guide"
,
Id
:
"styleguide"
,
Url
:
setting
.
AppSubUrl
+
"/styleguide"
},
},
})
}
data
.
NavTree
=
append
(
data
.
NavTree
,
cfgNode
)
}
...
...
public/app/core/components/PageHeader.tsx
View file @
6bff4164
...
...
@@ -28,7 +28,7 @@ export interface IProps {
// }
function
TabItem
(
tab
:
NavModelItem
)
{
if
(
tab
.
hideFromTabs
||
tab
.
divider
)
{
if
(
tab
.
hideFromTabs
)
{
return
(
null
);
}
...
...
public/app/features/dashboard/partials/dashboardList.html
View file @
6bff4164
...
...
@@ -2,17 +2,17 @@
<div
class=
"page-container page-body"
>
<div
class=
"page-action-bar"
>
<div
class=
"gf-form
width-15
"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label"
>
Search
</label>
<input
type=
"text"
class=
"gf-form-input"
placeholder=
"Find Dashboard by name"
tabindex=
"1"
give-focus=
"true"
ng-model=
"ctrl.query.query"
ng-model-options=
"{ debounce: 500 }"
spellcheck=
'false'
ng-change=
"ctrl.onQueryChange()"
/>
<input
type=
"text"
class=
"gf-form-input
max-width-30
"
placeholder=
"Find Dashboard by name"
tabindex=
"1"
give-focus=
"true"
ng-model=
"ctrl.query.query"
ng-model-options=
"{ debounce: 500 }"
spellcheck=
'false'
ng-change=
"ctrl.onQueryChange()"
/>
</div>
<div
class=
"page-action-bar__spacer"
></div>
<a
class=
"btn btn-
inverse
"
href=
"/dashboard/new"
>
<i
class=
"
gicon gicon-dashboard-new
"
></i>
<a
class=
"btn btn-
success
"
href=
"/dashboard/new"
>
<i
class=
"
fa fa-plus
"
></i>
Dashboard
</a>
<a
class=
"btn btn-
inverse
"
href=
"/dashboard/new/?editview=new-folder"
>
<i
class=
"
gicon gicon-folder-new
"
></i>
<a
class=
"btn btn-
success
"
href=
"/dashboard/new/?editview=new-folder"
>
<i
class=
"
fa fa-plus
"
></i>
Folder
</a>
</div>
...
...
public/sass/components/_dropdown.scss
View file @
6bff4164
...
...
@@ -91,7 +91,6 @@
color
:
$link-color-disabled
;
position
:
relative
;
top
:
3px
;
padding-left
:
5px
;
}
.gicon
{
...
...
public/sass/components/_page_header.scss
View file @
6bff4164
...
...
@@ -51,7 +51,7 @@
}
&
.gicon
{
top
:
9
px
;
top
:
10
px
;
}
&
.icon-gf
{
...
...
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