Commit 210813f1 by Torkel Ödegaard

dashboard_folders: fixes to user picker & group picker

parent 908eb24d
...@@ -23,7 +23,13 @@ export class UserGroupPickerCtrl { ...@@ -23,7 +23,13 @@ export class UserGroupPickerCtrl {
resetUserGroupSegment() { resetUserGroupSegment() {
this.userGroupId = null; this.userGroupId = null;
const userGroupSegment = this.uiSegmentSrv.newSegment({value: 'Choose User Group', selectMode: true, fake: true}); const userGroupSegment = this.uiSegmentSrv.newSegment({
value: 'Choose User Group',
selectMode: true,
fake: true,
cssClass: 'gf-size-auto'
});
if (!this.userGroupSegment) { if (!this.userGroupSegment) {
this.userGroupSegment = userGroupSegment; this.userGroupSegment = userGroupSegment;
} else { } else {
......
...@@ -17,14 +17,19 @@ export class UserPickerCtrl { ...@@ -17,14 +17,19 @@ export class UserPickerCtrl {
/** @ngInject */ /** @ngInject */
constructor(private backendSrv, private $scope, $sce, private uiSegmentSrv) { constructor(private backendSrv, private $scope, $sce, private uiSegmentSrv) {
this.userSegment = this.uiSegmentSrv.newSegment({value: 'Choose User', selectMode: true, fake: true});
this.debouncedSearchUsers = _.debounce(this.searchUsers, 500, {'leading': true, 'trailing': false}); this.debouncedSearchUsers = _.debounce(this.searchUsers, 500, {'leading': true, 'trailing': false});
this.userId = null;
this.resetUserSegment(); this.resetUserSegment();
} }
resetUserSegment() { resetUserSegment() {
const userSegment = this.uiSegmentSrv.newSegment({value: 'Choose User', selectMode: true, fake: true}); this.userId = null;
const userSegment = this.uiSegmentSrv.newSegment({
value: 'Choose User',
selectMode: true,
fake: true,
cssClass: 'gf-size-auto'
});
if (!this.userSegment) { if (!this.userSegment) {
this.userSegment = userSegment; this.userSegment = userSegment;
} else { } else {
......
<div class="editor-row"> <div class="editor-row">
<h3 class="page-heading">Add New Permission</h3> <h5 class="section-heading">Add New Permission</h5>
<form name="addPermission" class="gf-form-group"> <form name="addPermission" class="gf-form-group">
<div class="gf-form-inline"> <div class="gf-form-inline">
<div class="gf-form"> <div class="gf-form">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
</h2> </h2>
<ul class="gf-tabs"> <ul class="gf-tabs">
<li class="gf-tabs-item" ng-repeat="tab in ::['General', 'Rows', 'Links', 'Time picker', 'Metadata', 'Permissions']"> <li class="gf-tabs-item" ng-repeat="tab in ::['General', 'Rows', 'Links', 'Time picker', 'Permissions']">
<a class="gf-tabs-link" ng-click="editor.index = $index" ng-class="{active: editor.index === $index}"> <a class="gf-tabs-link" ng-click="editor.index = $index" ng-class="{active: editor.index === $index}">
{{::tab}} {{::tab}}
</a> </a>
...@@ -118,32 +118,7 @@ ...@@ -118,32 +118,7 @@
</div> </div>
<div ng-if="editor.index == 4"> <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">{{dashboard.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}}&nbsp;</span>
</div>
<div class="gf-form">
<span class="gf-form-label width-10">Created at:</span>
<span class="gf-form-label width-18">{{dashboard.formatDate(dashboardMeta.created)}}&nbsp;</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}}&nbsp;</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}}&nbsp;</span>
</div>
</div>
</div>
<div ng-if="editor.index == 5">
<acl-settings dashboard="dashboard"></acl-settings> <acl-settings dashboard="dashboard"></acl-settings>
</div> </div>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment