Repository: ambari
Updated Branches:
  refs/heads/trunk 442ccdd4f -> f1a9a9492


AMBARI-7757. Unable to save configs in SUSE, stack 2.1. (akovalenko)


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

Branch: refs/heads/trunk
Commit: f1a9a949214a727d0af51d0cdc25dfb4020f9124
Parents: 442ccdd
Author: Aleksandr Kovalenko <[email protected]>
Authored: Mon Oct 13 18:48:02 2014 +0300
Committer: Aleksandr Kovalenko <[email protected]>
Committed: Mon Oct 13 18:48:02 2014 +0300

----------------------------------------------------------------------
 .../ambariViews/CreateViewInstanceCtrl_test.js  | 77 ++++++++++++++++++++
 .../ambariViews/CreateViewInstanceCtrl_test.js  | 77 --------------------
 .../controllers/main/service/info/configs.js    |  7 +-
 3 files changed, 78 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f1a9a949/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
new file mode 100644
index 0000000..4deaf52
--- /dev/null
+++ 
b/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+describe('#CreateViewInstanceCtrl', function () {
+
+  describe('loadMeta', function () {
+
+    var scope, ctrl, $window, $q, deferred;
+
+    beforeEach(module('ambariAdminConsole', function ($provide) {
+      $provide.value('$window', {
+        location: {
+          pathname: 
'http://c6401.ambari.apache.org:8080/views/ADMIN_VIEW/1.0.0/INSTANCE/#/'
+        }
+      });
+      $provide.value('Auth', {
+        getCurrentUser: function () {
+          return 'admin';
+        }
+      });
+      $provide.value('View', {
+        getMeta: function () {
+          return deferred.promise;
+        },
+        getVersions: function () {
+          var dfd = $q.defer();
+          return dfd.promise;
+        }
+      });
+      $provide.value('$routeParams', {
+        viewId: 'ADMIN_VIEW'
+      });
+    }));
+
+    beforeEach(inject(function ($rootScope, $controller, _$window_, _$q_) {
+      $q = _$q_;
+      $window = _$window_;
+      scope = $rootScope.$new();
+      deferred = $q.defer();
+      ctrl = $controller('CreateViewInstanceCtrl', {
+        $scope: scope
+      });
+    }));
+
+    it('should parse {username}', function () {
+      deferred.resolve({
+        data: {
+          ViewVersionInfo: {
+            parameters: [{
+              description: '{username}'
+            }]
+          }
+        }
+      });
+      scope.version = '1.0.0';
+      scope.$digest();
+      
chai.expect(scope.view.ViewVersionInfo.parameters[0].description).to.equal('admin');
+    });
+
+  });
+
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1a9a949/ambari-web/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
 
b/ambari-web/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
deleted file mode 100644
index 4deaf52..0000000
--- 
a/ambari-web/ambari-admin/src/main/resources/ui/admin-web/test/unit/controllers/ambariViews/CreateViewInstanceCtrl_test.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-describe('#CreateViewInstanceCtrl', function () {
-
-  describe('loadMeta', function () {
-
-    var scope, ctrl, $window, $q, deferred;
-
-    beforeEach(module('ambariAdminConsole', function ($provide) {
-      $provide.value('$window', {
-        location: {
-          pathname: 
'http://c6401.ambari.apache.org:8080/views/ADMIN_VIEW/1.0.0/INSTANCE/#/'
-        }
-      });
-      $provide.value('Auth', {
-        getCurrentUser: function () {
-          return 'admin';
-        }
-      });
-      $provide.value('View', {
-        getMeta: function () {
-          return deferred.promise;
-        },
-        getVersions: function () {
-          var dfd = $q.defer();
-          return dfd.promise;
-        }
-      });
-      $provide.value('$routeParams', {
-        viewId: 'ADMIN_VIEW'
-      });
-    }));
-
-    beforeEach(inject(function ($rootScope, $controller, _$window_, _$q_) {
-      $q = _$q_;
-      $window = _$window_;
-      scope = $rootScope.$new();
-      deferred = $q.defer();
-      ctrl = $controller('CreateViewInstanceCtrl', {
-        $scope: scope
-      });
-    }));
-
-    it('should parse {username}', function () {
-      deferred.resolve({
-        data: {
-          ViewVersionInfo: {
-            parameters: [{
-              description: '{username}'
-            }]
-          }
-        }
-      });
-      scope.version = '1.0.0';
-      scope.$digest();
-      
chai.expect(scope.view.ViewVersionInfo.parameters[0].description).to.equal('admin');
-    });
-
-  });
-
-});

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1a9a949/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js 
b/ambari-web/app/controllers/main/service/info/configs.js
index f7a7b38..c676098 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -1402,7 +1402,7 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
    * On save configs handler. Open save configs popup with appropriate message.
    */
   onDoPUTClusterConfigurations: function () {
-    var header, message, messageClass, value, status, urlParams = '',
+    var header, message, messageClass, value, status = 'unknown', urlParams = 
'',
     result = {
       flag: this.get('saveConfigsFlag'),
       message: null,
@@ -1413,10 +1413,6 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
 
     if (!result.flag) {
       result.message = Em.I18n.t('services.service.config.failSaveConfig');
-    } else {
-      if (!result.flag) {
-        result.message = 
Em.I18n.t('services.service.config.failSaveConfigHostOverrides');
-      }
     }
 
     App.router.get('clusterController').updateClusterData();
@@ -1428,7 +1424,6 @@ App.MainServiceInfoConfigsController = 
Em.Controller.extend(App.ServerValidatorM
       message = Em.I18n.t('services.service.config.saved.message');
       messageClass = 'alert alert-success';
       // warn the user if any of the components are in UNKNOWN state
-      status = 'unknown';
       urlParams += 
',ServiceComponentInfo/installed_count,ServiceComponentInfo/total_count';
       if (this.get('content.serviceName') === 'HDFS' || 
App.Service.find().someProperty('id', 'MAPREDUCE')) {
         urlParams += '&ServiceComponentInfo/service_name.in(HDFS,MAPREDUCE)'

Reply via email to