You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2015/02/26 15:29:53 UTC
ambari git commit: AMBARI-9809. Move Hive Metastore problems after
rollback completed. (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 71bea2aab -> e8c1bbe74
AMBARI-9809. Move Hive Metastore problems after rollback completed. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e8c1bbe7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e8c1bbe7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e8c1bbe7
Branch: refs/heads/trunk
Commit: e8c1bbe745661ff4634b122796db98ca46095231
Parents: 71bea2a
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Feb 26 14:46:35 2015 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Thu Feb 26 16:22:15 2015 +0200
----------------------------------------------------------------------
ambari-web/app/assets/test/tests.js | 1 +
.../main/service/reassign/step7_controller.js | 1 +
ambari-web/app/routes/reassign_master_routes.js | 3 +-
.../service/reassign/step7_controller_test.js | 50 ++++++++++++++++++++
4 files changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e8c1bbe7/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index cfd519f..ef2e202 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -94,6 +94,7 @@ var files = ['test/init_model_test',
'test/controllers/main/service/reassign/step2_controller_test',
'test/controllers/main/service/reassign/step4_controller_test',
'test/controllers/main/service/reassign/step6_controller_test',
+ 'test/controllers/main/service/reassign/step7_controller_test',
'test/controllers/main/dashboard_test',
'test/controllers/main/host_test',
'test/controllers/main/service/item_test',
http://git-wip-us.apache.org/repos/asf/ambari/blob/e8c1bbe7/ambari-web/app/controllers/main/service/reassign/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step7_controller.js b/ambari-web/app/controllers/main/service/reassign/step7_controller.js
index 5fcb1f1..2617a6a 100644
--- a/ambari-web/app/controllers/main/service/reassign/step7_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step7_controller.js
@@ -49,6 +49,7 @@ App.ReassignMasterWizardStep7Controller = App.ReassignMasterWizardStep4Controlle
}
this.removeUnneededTasks();
+ this.set('isLoaded', true);
},
putHostComponentsInMaintenanceMode: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e8c1bbe7/ambari-web/app/routes/reassign_master_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js
index bb52fab..b93f9a6 100644
--- a/ambari-web/app/routes/reassign_master_routes.js
+++ b/ambari-web/app/routes/reassign_master_routes.js
@@ -40,7 +40,6 @@ module.exports = App.WizardRoute.extend({
console.log('in /service/reassign:enter');
var context = this;
var reassignMasterController = router.get('reassignMasterController');
- var currStep = reassignMasterController.get('currentStep');
reassignMasterController.dataLoading().done(function () {
if (App.router.get('mainHostController.hostsCountMap.TOTAL') > 1) {
@@ -62,6 +61,7 @@ module.exports = App.WizardRoute.extend({
App.router.transitionTo('main.services.index');
},
onClose: function () {
+ var currStep = reassignMasterController.get('currentStep');
if (parseInt(currStep) > 3) {
var self = this;
@@ -92,6 +92,7 @@ module.exports = App.WizardRoute.extend({
reassignMasterController.set('popup', popup);
reassignMasterController.loadSecurityEnabled();
reassignMasterController.loadComponentToReassign();
+ var currStep = reassignMasterController.get('currentStep');
var currentClusterStatus = App.clusterStatus.get('value');
if (currentClusterStatus) {
switch (currentClusterStatus.clusterState) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e8c1bbe7/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
new file mode 100644
index 0000000..304fdb6
--- /dev/null
+++ b/ambari-web/test/controllers/main/service/reassign/step7_controller_test.js
@@ -0,0 +1,50 @@
+/**
+ * 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.
+ */
+
+App = require('app');
+
+require('controllers/main/service/reassign/step7_controller');
+
+describe('App.ReassignMasterWizardStep7Controller', function () {
+
+ var controller = App.ReassignMasterWizardStep7Controller.create({
+ content: Em.Object.create({
+ reassign: Em.Object.create(),
+ reassignHosts: Em.Object.create()
+ })
+ });
+
+ beforeEach(function () {
+ sinon.stub(App.ajax, 'send', Em.K);
+ });
+ afterEach(function () {
+ App.ajax.send.restore();
+ });
+
+ describe('#initializeTasks()', function () {
+
+ it('should set isLoaded to true', function () {
+ controller.set('isLoaded', false);
+
+ controller.initializeTasks();
+ expect(controller.get('isLoaded')).to.be.true;
+ });
+
+ });
+
+});