mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(preferences): still a lot more work needed in prefernces branch
This commit is contained in:
28
public/app/core/components/dashboard_selector.ts
Normal file
28
public/app/core/components/dashboard_selector.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
///<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);
|
@@ -62,6 +62,7 @@
|
||||
</gf-form-switch>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div ng-if="editor.index == 1">
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user