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
75bb8944
Commit
75bb8944
authored
Dec 01, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: new page-header design, most pages beside admin done
parent
92d9093f
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
58 additions
and
88 deletions
+58
-88
pkg/api/dtos/index.go
+1
-0
pkg/api/index.go
+5
-3
public/app/core/components/PageHeader.tsx
+4
-0
public/app/core/nav_model_srv.ts
+2
-0
public/app/features/alerting/notification_edit_ctrl.ts
+3
-2
public/app/features/alerting/partials/notification_edit.html
+5
-5
public/app/features/dashboard/dashboard_list_ctrl.ts
+1
-1
public/app/features/dashboard/partials/dashboardList.html
+8
-12
public/app/features/org/org_api_keys_ctrl.ts
+1
-1
public/app/features/org/partials/orgApiKeys.html
+5
-7
public/app/features/playlist/partials/playlist.html
+6
-6
public/app/features/playlist/partials/playlists.html
+6
-6
public/app/features/playlist/playlist_edit_ctrl.ts
+5
-7
public/app/features/playlist/playlists_ctrl.ts
+1
-1
public/app/features/plugins/partials/ds_edit.html
+0
-28
public/app/features/snapshot/partials/snapshots.html
+3
-7
public/app/features/snapshot/snapshot_ctrl.ts
+1
-1
public/sass/components/_page_header.scss
+1
-1
No files found.
pkg/api/dtos/index.go
View file @
75bb8944
...
...
@@ -31,5 +31,6 @@ type NavLink struct {
Target
string
`json:"target,omitempty"`
Divider
bool
`json:"divider,omitempty"`
HideFromMenu
bool
`json:"hideFromMenu,omitempty"`
HideFromTabs
bool
`json:"hideFromTabs,omitempty"`
Children
[]
*
NavLink
`json:"children,omitempty"`
}
pkg/api/index.go
View file @
75bb8944
...
...
@@ -101,17 +101,19 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
}
dashboardChildNavs
:=
[]
*
dtos
.
NavLink
{
{
Text
:
"Home"
,
Url
:
setting
.
AppSubUrl
+
"/"
,
Icon
:
"fa fa-fw fa-home"
},
{
Text
:
"Home"
,
Url
:
setting
.
AppSubUrl
+
"/"
,
Icon
:
"fa fa-fw fa-home"
,
HideFromTabs
:
true
},
{
Divider
:
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"
},
{
Text
:
"Dashboard List"
,
Id
:
"dashboards"
,
Url
:
setting
.
AppSubUrl
+
"/dashboards"
,
Icon
:
"fa fa-fw fa-bars"
},
}
data
.
NavTree
=
append
(
data
.
NavTree
,
&
dtos
.
NavLink
{
Text
:
"Dashboards"
,
Id
:
"dashboards"
,
SubTitle
:
"Manage dashboards & folders"
,
Icon
:
"gicon gicon-dashboard"
,
Url
:
setting
.
AppSubUrl
+
"/"
,
Url
:
setting
.
AppSubUrl
+
"/
dashboards
"
,
Children
:
dashboardChildNavs
,
})
...
...
public/app/core/components/PageHeader.tsx
View file @
75bb8944
...
...
@@ -28,6 +28,10 @@ export interface IProps {
// }
function
TabItem
(
tab
:
NavModelItem
)
{
if
(
tab
.
hideFromTabs
||
tab
.
divider
)
{
return
(
null
);
}
let
tabClasses
=
classNames
({
'gf-tabs-link'
:
true
,
active
:
tab
.
active
,
...
...
public/app/core/nav_model_srv.ts
View file @
75bb8944
...
...
@@ -9,6 +9,8 @@ export interface NavModelItem {
img
?:
string
;
id
:
string
;
active
?:
boolean
;
hideFromTabs
?:
boolean
;
divider
?:
boolean
;
children
:
NavModelItem
[];
}
...
...
public/app/features/alerting/notification_edit_ctrl.ts
View file @
75bb8944
...
...
@@ -9,7 +9,7 @@ export class AlertNotificationEditCtrl {
testSeverity
=
"critical"
;
notifiers
:
any
;
notifierTemplateId
:
string
;
isNew
:
boolean
;
model
:
any
;
defaults
:
any
=
{
type
:
'email'
,
...
...
@@ -23,7 +23,8 @@ export class AlertNotificationEditCtrl {
/** @ngInject */
constructor
(
private
$routeParams
,
private
backendSrv
,
private
$location
,
private
$templateCache
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
getNav
(
'alerting'
,
'channels'
);
this
.
navModel
=
navModelSrv
.
getNav
(
'alerting'
,
'channels'
,
0
);
this
.
isNew
=
!
this
.
$routeParams
.
id
;
this
.
backendSrv
.
get
(
`/api/alert-notifiers`
).
then
(
notifiers
=>
{
this
.
notifiers
=
notifiers
;
...
...
public/app/features/alerting/partials/notification_edit.html
View file @
75bb8944
<
navbar
model=
"ctrl.navModel"
></navba
r>
<
page-header
model=
"ctrl.navModel"
></page-heade
r>
<div
class=
"page-container"
>
<div
class=
"page-header"
>
<page-h1
model=
"ctrl.navModel"
></page-h1
>
<
/div
>
<div
class=
"page-container
page-body
"
>
<h3
class=
"page-sub-heading"
ng-hide=
"ctrl.isNew"
>
Edit Notification Channel
</h3
>
<
h3
class=
"page-sub-heading"
ng-show=
"ctrl.isNew"
>
New Notification Channel
</h3
>
<form
name=
"ctrl.theForm"
ng-if=
"ctrl.notifiers"
>
<div
class=
"gf-form-group"
>
...
...
public/app/features/dashboard/dashboard_list_ctrl.ts
View file @
75bb8944
...
...
@@ -17,7 +17,7 @@ export class DashboardListCtrl {
/** @ngInject */
constructor
(
private
backendSrv
,
navModelSrv
,
private
$q
,
private
searchSrv
:
SearchSrv
)
{
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'dashboards'
);
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'dashboards'
,
0
);
this
.
query
=
{
query
:
''
,
mode
:
'tree'
,
tag
:
[],
starred
:
false
};
this
.
selectedStarredFilter
=
this
.
starredFilterOptions
[
0
];
...
...
public/app/features/dashboard/partials/dashboardList.html
View file @
75bb8944
<navbar
model=
"ctrl.navModel"
></navbar>
<div
class=
"page-container"
style=
"height: 95%"
>
<div
class=
"page-header"
>
<h1>
Dashboards
</h1>
<page-header
model=
"ctrl.navModel"
></page-header>
<div
class=
"page-container page-body"
>
<div
class=
"page-action-bar"
>
<div
class=
"gf-form width-15"
>
<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()"
/>
</div>
<div
class=
"page-action-bar__spacer"
></div>
<a
class=
"btn btn-inverse"
href=
"/dashboard/new"
>
<i
class=
"gicon gicon-dashboard-new"
></i>
Dashboard
...
...
@@ -12,14 +16,6 @@
Folder
</a>
</div>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form width-15"
>
<span
style=
"position: relative;"
>
<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()"
/>
</span>
</div>
</div>
<div
class=
"gf-form"
ng-if=
"ctrl.query.tag.length"
>
Filters:
...
...
public/app/features/org/org_api_keys_ctrl.ts
View file @
75bb8944
...
...
@@ -4,7 +4,7 @@ export class OrgApiKeysCtrl {
/** @ngInject **/
constructor
(
$scope
,
$http
,
backendSrv
,
navModelSrv
)
{
$scope
.
navModel
=
navModelSrv
.
getNav
(
'cfg'
,
'apikeys'
);
$scope
.
navModel
=
navModelSrv
.
getNav
(
'cfg'
,
'apikeys'
,
0
);
$scope
.
roleTypes
=
[
'Viewer'
,
'Editor'
,
'Admin'
];
$scope
.
token
=
{
role
:
'Viewer'
};
...
...
public/app/features/org/partials/orgApiKeys.html
View file @
75bb8944
<
navbar
model=
"navModel"
></navba
r>
<
page-header
model=
"navModel"
></page-heade
r>
<div
class=
"page-container"
>
<div
class=
"page-header"
>
<page-h1
model=
"navModel"
></page-h1>
</div>
<div
class=
"page-container page-body"
>
<h3
class=
"section-heading"
>
Add new
</h3>
<h3
class=
"page-heading"
>
Add new
</h3>
<form
name=
"addTokenForm"
class=
"gf-form-group"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form max-width-21"
>
...
...
@@ -22,7 +20,7 @@
</div>
</form>
<h3
class=
"
page
-heading"
>
Existing Keys
</h3>
<h3
class=
"
section
-heading"
>
Existing Keys
</h3>
<table
class=
"filter-table"
>
<thead>
<tr>
...
...
public/app/features/playlist/partials/playlist.html
View file @
75bb8944
<
navbar
model=
"ctrl.navModel"
></navba
r>
<
page-header
model=
"ctrl.navModel"
></page-heade
r>
<div
class=
"page-container"
ng-form=
"playlistEditForm"
>
<div
class=
"page-header"
>
<page-h1
model=
"ctrl.navModel"
></page-h1
>
</div
>
<div
class=
"page-container
page-body
"
ng-form=
"playlistEditForm"
>
<h3
class=
"page-sub-heading"
ng-hide=
"ctrl.isNew"
>
Edit Playlist
</h3
>
<h3
class=
"page-sub-heading"
ng-show=
"ctrl.isNew"
>
New Playlist
</h3
>
<p
class=
"playlist-description"
>
A playlist rotates through a pre-selected list of Dashboards. A Playlist can be a great way to build situational awareness, or just show off your metrics to your team or visitors.
</p>
...
...
@@ -103,7 +103,7 @@
<div
class=
"clearfix"
></div>
<div
class=
"gf-form-button-row"
>
<a
class=
"btn btn-success "
ng-show=
"ctrl.isNew
()
"
<a
class=
"btn btn-success "
ng-show=
"ctrl.isNew"
ng-disabled=
"ctrl.playlistEditForm.$invalid || ctrl.isPlaylistEmpty()"
ng-click=
"ctrl.savePlaylist(ctrl.playlist, ctrl.playlistItems)"
>
Create new playlist
</a>
<a
class=
"btn btn-success"
ng-show=
"!ctrl.isNew()"
...
...
public/app/features/playlist/partials/playlists.html
View file @
75bb8944
<
navbar
model=
"ctrl.navModel"
></navba
r>
<
page-header
model=
"ctrl.navModel"
></page-heade
r>
<div
class=
"page-container"
>
<div
class=
"page-
heade
r"
>
<page-h1
model=
"ctrl.navModel"
></page-h1
>
<a
class=
"btn btn-
primary
pull-right"
href=
"playlists/create"
>
<div
class=
"page-container
page-body
"
>
<div
class=
"page-
action-ba
r"
>
<div
class=
"page-action-bar__spacer"
></div
>
<a
class=
"btn btn-
success
pull-right"
href=
"playlists/create"
>
<i
class=
"fa fa-plus"
></i>
New Playlist
</a>
</div>
<table
class=
"filter-table"
style=
"margin-top: 20px"
>
<table
class=
"filter-table"
>
<thead>
<th><strong>
Name
</strong></th>
<th><strong>
Start url
</strong></th>
...
...
public/app/features/playlist/playlist_edit_ctrl.ts
View file @
75bb8944
///<reference path="../../headers/common.d.ts" />
import
_
from
'lodash'
;
import
coreModule
from
'../../core/core_module'
;
...
...
@@ -11,10 +9,12 @@ export class PlaylistEditCtrl {
playlist
:
any
=
{
interval
:
'5m'
,
};
playlistItems
:
any
=
[];
dashboardresult
:
any
=
[];
tagresult
:
any
=
[];
navModel
:
any
;
isNew
:
boolean
;
/** @ngInject */
constructor
(
...
...
@@ -24,7 +24,9 @@ export class PlaylistEditCtrl {
$route
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'playlists'
);
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'playlists'
,
0
);
this
.
isNew
=
$route
.
current
.
params
.
id
;
if
(
$route
.
current
.
params
.
id
)
{
var
playlistId
=
$route
.
current
.
params
.
id
;
...
...
@@ -104,10 +106,6 @@ export class PlaylistEditCtrl {
});
}
isNew
()
{
return
!
this
.
playlist
.
id
;
}
isPlaylistEmpty
()
{
return
!
this
.
playlistItems
.
length
;
}
...
...
public/app/features/playlist/playlists_ctrl.ts
View file @
75bb8944
...
...
@@ -9,7 +9,7 @@ export class PlaylistsCtrl {
/** @ngInject */
constructor
(
private
$scope
,
private
backendSrv
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'playlists'
);
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'playlists'
,
0
);
backendSrv
.
get
(
'/api/playlists'
).
then
(
result
=>
{
this
.
playlists
=
result
;
...
...
public/app/features/plugins/partials/ds_edit.html
View file @
75bb8944
<!-- <div class="page-header-canvas"> -->
<!-- <div class="page-container"> -->
<!-- <navbar model="ctrl.navModel"></navbar> -->
<!-- -->
<!-- <div class="page-header"> -->
<!-- <page-h1 model="ctrl.navModel"></page-h1> -->
<!-- -->
<!-- <div class="page-header-tabs" ng-show="ctrl.hasDashboards"> -->
<!-- <ul class="gf-tabs"> -->
<!-- <li class="gf-tabs-item"> -->
<!-- <a class="gf-tabs-link" ng-click="ctrl.tabIndex = 0" ng-class="{active: ctrl.tabIndex === 0}"> -->
<!-- <i class="fa fa-sliders"></i> -->
<!-- Config -->
<!-- </a> -->
<!-- </li> -->
<!-- <li class="gf-tabs-item"> -->
<!-- <a class="gf-tabs-link" ng-click="ctrl.tabIndex = 1" ng-class="{active: ctrl.tabIndex === 1}"> -->
<!-- <i class="fa fa-th-large"></i> -->
<!-- Dashboards -->
<!-- </a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<!-- -->
<page-header
model=
"ctrl.navModel"
></page-header>
<div
class=
"page-container page-body"
>
...
...
public/app/features/snapshot/partials/snapshots.html
View file @
75bb8944
<
navbar
model=
"ctrl.navModel"
></navba
r>
<
page-header
model=
"ctrl.navModel"
></page-heade
r>
<div
class=
"page-container"
>
<div
class=
"page-header"
>
<page-h1
model=
"ctrl.navModel"
></page-h1>
</div>
<table
class=
"filter-table"
style=
"margin-top: 20px"
>
<div
class=
"page-container page-body"
>
<table
class=
"filter-table"
>
<thead>
<th><strong>
Name
</strong></th>
<th><strong>
Snapshot url
</strong></th>
...
...
public/app/features/snapshot/snapshot_ctrl.ts
View file @
75bb8944
...
...
@@ -9,7 +9,7 @@ export class SnapshotsCtrl {
/** @ngInject */
constructor
(
private
$rootScope
,
private
backendSrv
,
navModelSrv
)
{
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'snapshots'
);
this
.
navModel
=
navModelSrv
.
getNav
(
'dashboards'
,
'snapshots'
,
0
);
this
.
backendSrv
.
get
(
'/api/dashboard/snapshots'
).
then
(
result
=>
{
this
.
snapshots
=
result
;
});
...
...
public/sass/components/_page_header.scss
View file @
75bb8944
...
...
@@ -51,7 +51,7 @@
}
&
.gicon
{
top
:
7
px
;
top
:
9
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