Procházet zdrojové kódy

dashboard_folders: fixes to user picker & group picker

Torkel Ödegaard před 8 roky
rodič
revize
210813f126

+ 7 - 1
public/app/core/components/user_group_picker.ts

@@ -23,7 +23,13 @@ export class UserGroupPickerCtrl {
   resetUserGroupSegment() {
     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) {
       this.userGroupSegment = userGroupSegment;
     } else {

+ 8 - 3
public/app/core/components/user_picker.ts

@@ -17,14 +17,19 @@ export class UserPickerCtrl {
 
   /** @ngInject */
   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.userId = null;
     this.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) {
       this.userSegment = userSegment;
     } else {

+ 1 - 1
public/app/features/dashboard/acl/acl.html

@@ -1,5 +1,5 @@
 <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">
 		<div class="gf-form-inline">
       <div class="gf-form">

+ 2 - 27
public/app/features/dashboard/partials/settings.html

@@ -4,7 +4,7 @@
 	</h2>
 
 	<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}">
 				{{::tab}}
 			</a>
@@ -118,32 +118,7 @@
 	</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">{{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>
 	</div>
+
 </div>