ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [27/50] [abbrv] ambari git commit: AMBARI-19982 Admin View: issues with Users/Groups table filters. (ababiichuk)
Date Mon, 13 Feb 2017 21:04:01 GMT
AMBARI-19982 Admin View: issues with Users/Groups table filters. (ababiichuk)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: a6445ac838cc2b54e5ee5f943d4fa22a72fc7ad3
Parents: a7eafd5
Author: ababiichuk <ababiichuk@hortonworks.com>
Authored: Mon Feb 13 13:56:29 2017 +0200
Committer: ababiichuk <ababiichuk@hortonworks.com>
Committed: Mon Feb 13 14:45:50 2017 +0200

----------------------------------------------------------------------
 .../controllers/clusters/UserAccessListCtrl.js  |  5 +-
 .../clusters/UserAccessListCtrl_test.js         | 90 --------------------
 2 files changed, 1 insertion(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6445ac8/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
index 3737414..5dc6bd3 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/UserAccessListCtrl.js
@@ -314,8 +314,6 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams,
Permissio
 
   $scope.clearFilters = function() {
     $scope.currentNameFilter = '';
-    $scope.isUserActive = true;
-    $scope.currentTypeFilter = $scope.typeFilterOptions[0];
     $scope.currentRoleFilter = $scope.roleFilterOptions[0];
     $scope.resetPagination();
   };
@@ -325,8 +323,7 @@ function($scope, $location, Cluster, $modal, $rootScope, $routeParams,
Permissio
 
   $scope.$watch(
     function (scope) {
-      return Boolean(scope.currentNameFilter || (scope.currentTypeFilter && scope.currentTypeFilter.value)
-        || (scope.currentRoleFilter && scope.currentRoleFilter.value));
+      return Boolean(scope.currentNameFilter || (scope.currentRoleFilter && scope.currentRoleFilter.value));
     },
     function (newValue, oldValue, scope) {
       scope.isNotEmptyFilter = newValue;

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6445ac8/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/clusters/UserAccessListCtrl_test.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/clusters/UserAccessListCtrl_test.js
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/clusters/UserAccessListCtrl_test.js
index 42fb453..14c0975 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/clusters/UserAccessListCtrl_test.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/clusters/UserAccessListCtrl_test.js
@@ -77,10 +77,6 @@ describe('#Cluster', function () {
             value: 'CLUSTER.USER'
           }
         ];
-        scope.typeFilterOptions = [
-          {label: $t('common.user'), value: 'USER'},
-          {label: $t('common.group'), value: 'GROUP'}
-        ];
         scope.currentRoleFilter = scope.roleFilterOptions[1];
         scope.clearFilters();
         expect(scope.currentNameFilter).toEqual('');
@@ -98,16 +94,12 @@ describe('#Cluster', function () {
       var cases = [
         {
           currentNameFilter: '',
-          currentTypeFilter: null,
           currentRoleFilter: null,
           isNotEmptyFilter: false,
           title: 'no filters'
         },
         {
           currentNameFilter: '',
-          currentTypeFilter: {
-            value: ''
-          },
           currentRoleFilter: {
             value: ''
           },
@@ -116,9 +108,6 @@ describe('#Cluster', function () {
         },
         {
           currentNameFilter: 'a',
-          currentTypeFilter: {
-            value: ''
-          },
           currentRoleFilter: {
             value: ''
           },
@@ -127,9 +116,6 @@ describe('#Cluster', function () {
         },
         {
           currentNameFilter: '0',
-          currentTypeFilter: {
-            value: ''
-          },
           currentRoleFilter: {
             value: ''
           },
@@ -138,20 +124,6 @@ describe('#Cluster', function () {
         },
         {
           currentNameFilter: '',
-          currentTypeFilter: {
-            value: 'GROUP'
-          },
-          currentRoleFilter: {
-            value: ''
-          },
-          isNotEmptyFilter: true,
-          title: 'type filter'
-        },
-        {
-          currentNameFilter: '',
-          currentTypeFilter: {
-            value: ''
-          },
           currentRoleFilter: {
             value: 'CLUSTER.USER'
           },
@@ -160,64 +132,6 @@ describe('#Cluster', function () {
         },
         {
           currentNameFilter: 'a',
-          currentTypeFilter: {
-            value: 'GROUP'
-          },
-          currentRoleFilter: {
-            value: ''
-          },
-          isNotEmptyFilter: true,
-          title: 'name and type filters'
-        },
-        {
-          currentNameFilter: 'a',
-          currentTypeFilter: {
-            value: ''
-          },
-          currentRoleFilter: {
-            value: 'CLUSTER.USER'
-          },
-          isNotEmptyFilter: true,
-          title: 'name and role filters'
-        },
-        {
-          currentNameFilter: '0',
-          currentTypeFilter: {
-            value: 'GROUP'
-          },
-          currentRoleFilter: {
-            value: ''
-          },
-          isNotEmptyFilter: true,
-          title: 'name and type filters with "0" as string'
-        },
-        {
-          currentNameFilter: '0',
-          currentTypeFilter: {
-            value: ''
-          },
-          currentRoleFilter: {
-            value: 'CLUSTER.USER'
-          },
-          isNotEmptyFilter: true,
-          title: 'name and role filters with "0" as string'
-        },
-        {
-          currentNameFilter: '',
-          currentTypeFilter: {
-            value: 'GROUP'
-          },
-          currentRoleFilter: {
-            value: 'CLUSTER.USER'
-          },
-          isNotEmptyFilter: true,
-          title: 'type and role filters'
-        },
-        {
-          currentNameFilter: 'a',
-          currentTypeFilter: {
-            value: 'CLUSTER.USER'
-          },
           currentRoleFilter: {
             value: 'GROUP'
           },
@@ -226,9 +140,6 @@ describe('#Cluster', function () {
         },
         {
           currentNameFilter: '0',
-          currentTypeFilter: {
-            value: 'CLUSTER.USER'
-          },
           currentRoleFilter: {
             value: 'GROUP'
           },
@@ -241,7 +152,6 @@ describe('#Cluster', function () {
         it(item.title, function () {
           scope.currentNameFilter = item.currentNameFilter;
           scope.currentRoleFilter = item.currentRoleFilter;
-          scope.currentTypeFilter = item.currentTypeFilter;
           scope.$digest();
           expect(scope.isNotEmptyFilter).toEqual(item.isNotEmptyFilter);
         });


Mime
View raw message