ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [08/12] git commit: AMBARI-6904. Admin View: need to handle mask property attribute. (jaimin)
Date Tue, 19 Aug 2014 03:40:01 GMT
AMBARI-6904. Admin View: need to handle mask property attribute. (jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d1e7e14
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d1e7e14
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d1e7e14

Branch: refs/heads/branch-alerts-dev
Commit: 4d1e7e14b901244bcd7721e7719a4519216e97cd
Parents: 08e5fc4
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Aug 18 19:15:48 2014 -0700
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Mon Aug 18 23:12:35 2014 -0400

----------------------------------------------------------------------
 .../main/resources/ui/admin-web/app/index.html  |  4 +--
 .../app/scripts/controllers/NavbarCtrl.js       |  5 +++-
 .../controllers/ambariViews/ViewsEditCtrl.js    | 16 ++++++++++--
 .../controllers/groups/GroupsEditCtrl.js        |  1 -
 .../controllers/groups/GroupsListCtrl.js        | 12 ++++++++-
 .../scripts/controllers/users/UsersListCtrl.js  | 11 +++++++-
 .../resources/ui/admin-web/app/styles/main.css  | 27 +++++++++++++++++++-
 .../admin-web/app/views/ambariViews/create.html | 22 +++++++++++-----
 .../admin-web/app/views/ambariViews/edit.html   |  8 +++---
 .../ui/admin-web/app/views/groups/create.html   |  4 +--
 .../ui/admin-web/app/views/groups/edit.html     |  6 ++++-
 .../ui/admin-web/app/views/groups/list.html     |  2 +-
 .../ui/admin-web/app/views/users/create.html    |  4 +--
 .../ui/admin-web/app/views/users/show.html      |  4 +--
 14 files changed, 98 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/index.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/index.html b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
index 7b03087..2bc520f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/index.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/index.html
@@ -19,9 +19,10 @@
 <html class="no-js">
   <head>
     <meta charset="utf-8">
-    <title>AdminConsole</title>
+    <title>Ambari</title>
     <meta name="description" content="">
     <meta name="viewport" content="width=device-width, initial-scale=1">
+    <link rel="shortcut icon" href="/img/logo.png" type="image/x-icon">
     <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
 
     <!-- build:css styles/vendor.css -->
@@ -47,7 +48,6 @@
           <div class="container">
             <a href="#/" class="logo"><img src="/img/logo-white.png" alt="Apache
Ambari" title="Apache Ambari"></a>
             <a href="#/" class="brand" title="Apache Ambari">Ambari</a>
-            <a href="" class="brand cluster-name">Admin Console</a>
             <ul class="nav navbar-nav navbar-right">
               <li>
                 <div class="btn-group" dropdown is-open="status.isopen">

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
index b839feb..8c7ec9e 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/NavbarCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('NavbarCtrl',['$scope', 'Cluster', '$location', 'uiAlert', 'ROUTES', 'LDAP',
'ConfirmationModal', function($scope, Cluster, $location, uiAlert, ROUTES, LDAP, ConfirmationModal)
{
+.controller('NavbarCtrl',['$scope', 'Cluster', '$location', 'uiAlert', 'ROUTES', 'LDAP',
'ConfirmationModal', '$rootScope', function($scope, Cluster, $location, uiAlert, ROUTES, LDAP,
ConfirmationModal, $rootScope) {
   $scope.cluster = null;
   Cluster.getStatus().then(function(cluster) {
     $scope.cluster = cluster;
@@ -46,6 +46,9 @@ angular.module('ambariAdminConsole')
     ConfirmationModal.show('Sync LDAP', 'Are you sure you want to sync LDAP?').then(function()
{
       LDAP.sync($scope.ldapData['LDAP'].groups, $scope.ldapData['LDAP'].users).then(function()
{
         uiAlert.success('LDAP synced successful');
+        $rootScope.$evalAsync(function() {
+          $rootScope.LDAPSynced = true;
+        });
       }).catch(function(data) {
         uiAlert.danger(data.data.status, data.data.message);
       });

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
index 42318a7..6d251a5 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsEditCtrl.js
@@ -38,6 +38,17 @@ angular.module('ambariAdminConsole')
     });
   }
 
+
+  // Get META for properties
+  View.getMeta($routeParams.viewId, $routeParams.version).then(function(data) {
+    var meta = {};
+    angular.forEach(data.data.ViewVersionInfo.parameters, function(parameter) {
+      meta[parameter.name] = parameter;
+    });
+    $scope.configurationMeta = meta;
+    reloadViewInfo();
+  });
+
   function reloadViewPrivilegies(){
     PermissionLoader.getViewPermissions({
       viewName: $routeParams.viewId,
@@ -57,7 +68,7 @@ angular.module('ambariAdminConsole')
 
   $scope.permissions = [];
   
-  reloadViewInfo();
+  // reloadViewInfo();
   reloadViewPrivilegies();
 
   $scope.editSettingsDisabled = true;
@@ -71,6 +82,7 @@ angular.module('ambariAdminConsole')
       }
     })
     .success(function() {
+      reloadViewInfo();
       $scope.editSettingsDisabled = true;
     })
     .catch(function(data) {
@@ -140,4 +152,4 @@ angular.module('ambariAdminConsole')
       });
     });
   };
-}]);
\ No newline at end of file
+}]);

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
index b5bcded..0896de1 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsEditCtrl.js
@@ -84,7 +84,6 @@ angular.module('ambariAdminConsole')
         privilegies.views[privilegie.instance_name].version = privilegie.version;
         privilegies.views[privilegie.instance_name].view_name = privilegie.view_name;
         privilegies.views[privilegie.instance_name].privileges += privilegies.views[privilegie.instance_name].privileges
? ', ' + privilegie.permission_name : privilegie.permission_name;
-
       }
     });
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
index 1ae4c44..82eb029 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/groups/GroupsListCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('GroupsListCtrl',['$scope', 'Group', '$modal', 'ConfirmationModal', function($scope,
Group, $modal, ConfirmationModal) {
+.controller('GroupsListCtrl',['$scope', 'Group', '$modal', 'ConfirmationModal', '$rootScope',
function($scope, Group, $modal, ConfirmationModal, $rootScope) {
   $scope.groups = [];
 
   $scope.groupsPerPage = 10;
@@ -62,4 +62,14 @@ angular.module('ambariAdminConsole')
   $scope.currentTypeFilter = $scope.typeFilterOptions[0];
   
   loadGroups();
+
+  $rootScope.$watch(function(scope) {
+    return scope.LDAPSynced;
+  }, function(LDAPSynced) {
+    if(LDAPSynced === true){
+      $rootScope.LDAPSynced = false;
+      loadGroups();
+    }
+  });
+
 }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
index 4fee376..2ecf8e7 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/users/UsersListCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('UsersListCtrl',['$scope', 'User', '$modal', function($scope, User, $modal) {
+.controller('UsersListCtrl',['$scope', 'User', '$modal', '$rootScope', function($scope, User,
$modal, $rootScope) {
   $scope.users = [];
   $scope.usersPerPage = 10;
   $scope.currentPage = 1;
@@ -67,4 +67,13 @@ angular.module('ambariAdminConsole')
   $scope.currentTypeFilter = $scope.typeFilterOptions[0];
 
   $scope.loadUsers();
+
+  $rootScope.$watch(function(scope) {
+    return scope.LDAPSynced;
+  }, function(LDAPSynced) {
+    if(LDAPSynced === true){
+      $rootScope.LDAPSynced = false;
+      $scope.loadUsers();
+    }
+  });
 }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index 9b1b31d..f6db020 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -98,6 +98,10 @@
   border-radius: 0;
 }
 
+.views-list-table .panel-group .panel:nth-child(even) .panel-heading{
+  background: #f9f9f9;
+}
+
 .users-pane table .glyphicon{
   width: 14px;
 }
@@ -238,7 +242,12 @@
   top: 5px;
   z-index: 100;
 }
-
+.groups-pane table thead th{
+  border-top: 0;
+}
+.groups-pane table thead tr:first-child th{
+  border: 0;
+}
 
 .container{
   padding-left: 0;
@@ -679,3 +688,19 @@ input[type="submit"].btn.btn-mini {
   *padding-top: 1px;
   *padding-bottom: 1px;
 }
+
+.alert-info {
+  background-color: #E6F1F6;
+  border-color: #D2D9DD;
+  color: #4E575B;
+  text-shadow: none;
+}
+.alert-info .link {
+  padding: 0 15px;
+}
+.alert-info .link-left-pad {
+  padding-left: 15px;
+}
+.breadcrumb > .active {
+  color: #666;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
index 6c5ded8..b7e3606 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
@@ -22,9 +22,17 @@
 <hr>
 <form class="form-horizontal create-view-form" role="form" name="form.isntanceCreateForm"
novalidate>
   <div class="view-header">
-    <div class="description">
-      <h4>View: <span>{{view.ViewVersionInfo.view_name}}</span></h4>
-      <h4>Version: <select ng-model="version" class="instanceversion-input" ng-change="versionChanged()"
ng-options="o as o for o in versions"></select></h4>
+    <div class="form-group">
+      <div class="col-sm-2">
+        <label for="" class="control-label">View</label>
+      </div>
+      <div class="col-sm-10"><label for="" class="control-label">{{view.ViewVersionInfo.view_name}}</label></div>
+    </div>
+    <div class="form-group">
+      <div class="col-sm-2"><label for="" class="control-label">Version</label></div>
+      <div class="col-sm-2">
+        <select ng-model="version" class="instanceversion-input form-control" ng-change="versionChanged()"
ng-options="o as o for o in versions"></select>
+      </div>
     </div>
   </div>
   
@@ -53,7 +61,7 @@
       </div>
       <div class="form-group"
       ng-class="{'has-error' : ( (form.isntanceCreateForm.displayLabel.$error.required ||
form.isntanceCreateForm.displayLabel.$error.pattern) && form.isntanceCreateForm.submitted)}">
-        <label for="" class="control-labe col-sm-2">Display Label</label>
+        <label for="" class="control-label col-sm-2">Display Label</label>
         <div class="col-sm-10">
           <input type="text" class="form-control instancelabel-input" name="displayLabel"
ng-model="instance.label" required ng-pattern="nameValidationPattern" autocomplete="off">
 
@@ -83,11 +91,11 @@
     <div class="panel-body">
       <div class="form-group" ng-repeat="parameter in instance.properties"
         ng-class="{'has-error' : (form.isntanceCreateForm[parameter.name].$error.required
&& form.isntanceCreateForm.submitted)}" >
-        <label for="" class="col-sm-3 control-label" ng-class="{'not-required': !parameter.required}">{{parameter.description}}{{parameter.required
? '*' : ''}}</label>
+        <label for="" class="col-sm-3 control-label" ng-class="{'not-required': !parameter.required}"
tooltip="{{parameter.description}}">{{parameter.name}}{{parameter.required ? '*' : ''}}</label>
         <div class="col-sm-9">
-          <input type="text" class="form-control viewproperty-input"  name="{{parameter.name}}"
ng-required="parameter.required" ng-model="parameter.value" autocomplete="off">
+          <input type="{{parameter.masked ? 'password' : 'text'}}" class="form-control
viewproperty-input"  name="{{parameter.name}}" ng-required="parameter.required" ng-model="parameter.value"
autocomplete="off">
           <div class="alert alert-danger no-margin-bottom top-margin" ng-show='form.isntanceCreateForm[parameter.name].$error.required
&& form.isntanceCreateForm.submitted'>
-            Field requried!
+            This field is required.
           </div>
         </div>
       </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
index 92fbecb..7296824 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
@@ -130,9 +130,9 @@
   <div class="panel-body">
     <form action="" class="form-horizontal" ng-hide="isConfigurationEmpty">
       <fieldset ng-disabled="editConfigurationDisabled">
-        <div class="form-group" ng-repeat="(propertyName, propertyValue) in configuration">
-          <label for="" class="control-label col-sm-3">{{propertyName}}</label>
-          <div class="col-sm-9"><input type="text" class="form-control propertie-input"
ng-model="configuration[propertyName]"></div>
+        <div class="form-group" ng-repeat="(propertyName, propertyValue) in configurationMeta">
+          <label for="" class="control-label col-sm-3" ng-class="{'not-required': !propertyValue.required}"
tooltip="{{propertyValue.description}}">{{propertyName}}{{propertyValue.required ? '*'
: ''}}</label>
+          <div class="col-sm-9"><input type="{{propertyValue.masked ? 'password'
: 'text'}}" class="form-control propertie-input" ng-model="configuration[propertyName]"></div>
         </div>
         <div class="form-group" ng-hide="editConfigurationDisabled">
           <div class="col-sm-offset-2 col-sm-10">
@@ -143,7 +143,7 @@
       </fieldset>
     </form>
     <div ng-show="isConfigurationEmpty">
-      <div class="alert alert-info">There are no configuration defined for this view.</div>
+      <div class="alert alert-info">There are no properties defined for this view.</div>
     </div>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/create.html
index 2395da7..9e3bc47 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/create.html
@@ -20,13 +20,13 @@
   <li class="active">Create Local Group</li>
 </ol>
 <hr>
-<form class="form-horizontal" role="form" novalidate name="form">
+<form class="form-horizontal" role="form" novalidate name="form" autocomplete="off">
   <div class="form-group" ng-class="{'has-error' : (form.group_name.$error.required ||
form.group_name.$error.pattern) && form.submitted}">
     <label for="groupname" class="col-sm-2 control-label">Group name</label>
     <div class="col-sm-10">
       <input type="text" id="groupname" class="form-control groupname-input" name="group_name"
placeholder="Group name" ng-model="group.group_name" required ng-pattern="/^([a-zA-Z0-9._\s]+)$/"
autocomplete="off">
       <div class="alert alert-danger top-margin" ng-show="form.group_name.$error.required
&& form.submitted">
-        Required
+        This field is required.
       </div>
       <div class="alert alert-danger top-margin" ng-show="form.group_name.$error.pattern
&& form.submitted">
         Must contain only simple characters.

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/edit.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/edit.html
index 7e399c0..d82caf6 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/edit.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/edit.html
@@ -22,7 +22,11 @@
     <li class="active">{{group.group_name}}</li>
   </ol>
   <div class="pull-right top-margin-4">
-    <button class="btn btn-danger deletegroup-btn" ng-click="deleteGroup(group)">Delete
Group</button>
+    <div ng-switch="group.ldap_group">
+      <button ng-switch-when="true" class="btn disabled deletegroup-btn deleteuser-btn"
tooltip="Cannot Delete Group">Delete Group</button>
+      <button ng-switch-when="false" class="btn btn-danger deletegroup-btn" ng-click="deleteGroup(group)">Delete
Group</button>
+    </div>
+      
   </div>
 </div>
 <hr>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
index bfb2b87..f5fd1dd 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
@@ -29,7 +29,7 @@
     <thead>
       <tr>
         <th>
-          <label for="">Group name</label>
+          <label for="">Group Name</label>
         </th>
         <th>
           <label for="">Type</label>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
index fb379ce..912a26d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/create.html
@@ -20,13 +20,13 @@
   <li class="active">Create Local User</li>
 </ol>
 <hr>
-<form class="form-horizontal create-user-form" role="form" novalidate name="form">
+<form class="form-horizontal create-user-form" role="form" novalidate name="form" autocomplete="off">
   <div class="form-group" ng-class="{'has-error' : form.user_name.$error.required &&
form.submitted}">
     <label for="username" class="col-sm-2 control-label">Username</label>
     <div class="col-sm-10">
       <input type="text" id="username" class="form-control username-input" name="user_name"
placeholder="User name" ng-model="user.user_name" required autocomplete="off">
       <div class="alert alert-danger top-margin" ng-show="form.user_name.$error.required
&& form.submitted">
-        Required
+        This field is required.
       </div>
     </div>
   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d1e7e14/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
index cbd0092..5530031 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/show.html
@@ -23,7 +23,7 @@
       <li class="active"><span class="glyphicon glyphicon-flash" ng-show="user.admin"></span>{{user.user_name}}</li>
     </ol>
     <div class="pull-right top-margin-4">
-      <div ng-switch="isCurrentUser">
+      <div ng-switch="isCurrentUser || user.ldap_user">
         <button class="btn deleteuser-btn disabled btn-default" ng-switch-when="true"
tooltip="Cannot Delete User">Delete User</button>
         <button class="btn deleteuser-btn btn-danger" ng-switch-when="false" ng-click="deleteUser()">Delete
User</button>
       </div>
@@ -52,7 +52,7 @@
     <div class="form-group">
       <label for="password" class="col-sm-2 control-label">Password</label>
       <div class="col-sm-10">
-        <a href ng-click="openChangePwdDialog()" class="btn btn-default changepassword">Change
Password</a>
+        <a href ng-click="openChangePwdDialog()" ng-disabled="user.ldap_user" class="btn
btn-default changepassword">Change Password</a>
       </div>
     </div>
     <div class="form-group">


Mime
View raw message