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
4a807b63
Commit
4a807b63
authored
Mar 30, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(preferences): still a lot more work needed in prefernces branch
parent
6ed9164c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
59 deletions
+92
-59
public/app/core/components/dashboard_selector.ts
+28
-0
public/app/features/dashboard/partials/settings.html
+56
-55
public/app/features/profile/partials/profile.html
+8
-4
No files found.
public/app/core/components/dashboard_selector.ts
0 → 100644
View file @
4a807b63
///<reference path="../../headers/common.d.ts" />
import
config
from
'app/core/config'
;
import
_
from
'lodash'
;
import
$
from
'jquery'
;
import
coreModule
from
'app/core/core_module'
;
var
template
=
`
`
;
export
class
DashboardSelectorCtrl
{
/** @ngInject */
constructor
(
private
$scope
,
private
$rootScope
)
{
}
}
export
function
dashboardSelector
()
{
return
{
restrict
:
'E'
,
controller
:
DashboardSelectorCtrl
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
template
:
template
,
};
}
coreModule
.
directive
(
'dashboardSelector'
,
dashboardSelector
);
public/app/features/dashboard/partials/settings.html
View file @
4a807b63
...
...
@@ -62,66 +62,67 @@
</gf-form-switch>
</div>
</div>
</div>
<div
ng-if=
"editor.index == 1"
>
<h5
class=
"section-heading"
>
Rows settings
</h5>
</div>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form-inline"
ng-repeat=
"row in dashboard.rows"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label"
>
Title
</span>
<input
type=
"text"
class=
"gf-form-input max-width-14"
ng-model=
'row.title'
></input>
</div>
<gf-form-switch
class=
"gf-form"
label=
"Show title"
checked=
"row.showTitle"
switch-class=
"max-width-6"
></gf-form-switch>
<div
ng-if=
"editor.index == 1"
>
<h5
class=
"section-heading"
>
Rows settings
</h5>
<div
class=
"gf-form"
>
<button
class=
"btn btn-inverse gf-form-btn"
ng-click=
"_.move(dashboard.rows,$index,$index-1)"
>
<i
ng-class=
"{'invisible': $first}"
class=
"fa fa-arrow-up"
></i>
</button>
<button
class=
"btn btn-inverse gf-from-btn"
ng-click=
"_.move(dashboard.rows,$index,$index+1)"
>
<i
ng-class=
"{'invisible': $last}"
class=
"fa fa-arrow-down"
></i>
</button>
<button
class=
"btn btn-inverse gf-form-btn"
click=
"dashboard.rows = _.without(dashboard.rows,row)"
>
<i
class=
"fa fa-trash"
></i>
</button>
</div>
</div>
</div>
</div>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form-inline"
ng-repeat=
"row in dashboard.rows"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label"
>
Title
</span>
<input
type=
"text"
class=
"gf-form-input max-width-14"
ng-model=
'row.title'
></input>
</div>
<gf-form-switch
class=
"gf-form"
label=
"Show title"
checked=
"row.showTitle"
switch-class=
"max-width-6"
></gf-form-switch>
<div
ng-if=
"editor.index == 2"
>
<dash-links-editor></dash-links-editor>
</div>
<div
class=
"gf-form"
>
<button
class=
"btn btn-inverse gf-form-btn"
ng-click=
"_.move(dashboard.rows,$index,$index-1)"
>
<i
ng-class=
"{'invisible': $first}"
class=
"fa fa-arrow-up"
></i>
</button>
<button
class=
"btn btn-inverse gf-from-btn"
ng-click=
"_.move(dashboard.rows,$index,$index+1)"
>
<i
ng-class=
"{'invisible': $last}"
class=
"fa fa-arrow-down"
></i>
</button>
<button
class=
"btn btn-inverse gf-form-btn"
click=
"dashboard.rows = _.without(dashboard.rows,row)"
>
<i
class=
"fa fa-trash"
></i>
</button>
</div>
</div>
</div>
</div>
<div
ng-if=
"editor.index == 3
"
>
<gf-time-picker-settings
dashboard=
"dashboard"
></gf-time-picker-settings
>
</div>
<div
ng-if=
"editor.index == 2
"
>
<dash-links-editor></dash-links-editor
>
</div>
<div
ng-if=
"editor.index == 4"
>
<h5
class=
"section-heading"
>
Dashboard info
</h5>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Last updated at:
</span>
<span
class=
"gf-form-label width-18"
>
{{formatDate(dashboardMeta.updated)}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Last updated by:
</span>
<span
class=
"gf-form-label width-18"
>
{{dashboardMeta.updatedBy}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Created at:
</span>
<span
class=
"gf-form-label width-18"
>
{{formatDate(dashboardMeta.created)}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Created by:
</span>
<span
class=
"gf-form-label width-18"
>
{{dashboardMeta.createdBy}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Current version:
</span>
<span
class=
"gf-form-label width-18"
>
{{dashboardMeta.version}}
</span>
</div>
</div>
</div>
<div
ng-if=
"editor.index == 3"
>
<gf-time-picker-settings
dashboard=
"dashboard"
></gf-time-picker-settings>
</div>
<div
ng-if=
"editor.index == 4"
>
<h5
class=
"section-heading"
>
Dashboard info
</h5>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Last updated at:
</span>
<span
class=
"gf-form-label width-18"
>
{{formatDate(dashboardMeta.updated)}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Last updated by:
</span>
<span
class=
"gf-form-label width-18"
>
{{dashboardMeta.updatedBy}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Created at:
</span>
<span
class=
"gf-form-label width-18"
>
{{formatDate(dashboardMeta.created)}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Created by:
</span>
<span
class=
"gf-form-label width-18"
>
{{dashboardMeta.createdBy}}
</span>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-10"
>
Current version:
</span>
<span
class=
"gf-form-label width-18"
>
{{dashboardMeta.version}}
</span>
</div>
</div>
</div>
</div>
public/app/features/profile/partials/profile.html
View file @
4a807b63
...
...
@@ -10,21 +10,25 @@
<h3
class=
"page-heading"
>
Preferences
</h3>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-
7
"
>
Name
</span>
<span
class=
"gf-form-label width-
9
"
>
Name
</span>
<input
class=
"gf-form-input max-width-21"
type=
"text"
required
ng-model=
"user.name"
>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-
7
"
>
Email
</span>
<span
class=
"gf-form-label width-
9
"
>
Email
</span>
<input
class=
"gf-form-input max-width-21"
type=
"email"
required
ng-model=
"user.email"
>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-
7
"
>
Username
</span>
<span
class=
"gf-form-label width-
9
"
>
Username
</span>
<input
class=
"gf-form-input max-width-21"
type=
"text"
required
ng-model=
"user.login"
>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-
7
"
>
UI Theme
</span>
<span
class=
"gf-form-label width-
9
"
>
UI Theme
</span>
<select
class=
"gf-form-input gf-size-auto"
ng-model=
"user.theme"
ng-options=
"f for f in ['dark', 'light']"
></select>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label width-9"
>
Home Dashboard
</span>
<dashboard-selector
model=
"user.homeDashboardId"
></dashboard-selector>
</div>
<div
class=
"gf-form-button-row"
>
<button
type=
"submit"
class=
"btn btn-success"
ng-click=
"update()"
>
Update
</button>
...
...
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