You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2017/05/19 03:35:28 UTC
[05/13] ambari git commit: Revert "AMBARI-21046. UI: Upgrades should
be started using repo_version_ids instead of version strings (alexantonenko)"
Revert "AMBARI-21046. UI: Upgrades should be started using repo_version_ids instead of version strings (alexantonenko)"
This reverts commit 1568f800764a6b20f2f09330f112070ebc0f7f86.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e5f2470
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e5f2470
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e5f2470
Branch: refs/heads/branch-feature-AMBARI-14714
Commit: 0e5f24700afad30b5f0ac0512442019dedf392cb
Parents: 9cb8701
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu May 18 19:40:31 2017 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu May 18 19:41:47 2017 +0300
----------------------------------------------------------------------
.../controllers/main/admin/stack_and_upgrade_controller.js | 7 ++-----
ambari-web/app/utils/ajax/ajax.js | 4 ++--
.../main/admin/stack_and_upgrade_controller_test.js | 6 ------
3 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5f2470/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index d444b2d..0f2efb0 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -414,8 +414,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
if (currentVersion) {
this.set('currentVersion', {
repository_version: currentVersion.get('repositoryVersion.repositoryVersion'),
- repository_name: currentVersion.get('repositoryVersion.displayName'),
- id: currentVersion.get('repositoryVersion.id')
+ repository_name: currentVersion.get('repositoryVersion.displayName')
});
}
},
@@ -737,7 +736,6 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
from: App.RepositoryVersion.find().findProperty('displayName', this.get('upgradeVersion')).get('repositoryVersion'),
value: currentVersion.repository_version,
label: currentVersion.repository_name,
- id: currentVersion.id,
isDowngrade: true,
upgradeType: this.get('upgradeType')
},
@@ -1381,8 +1379,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
label: version.get('displayName'),
type: version.get('upgradeType'),
skipComponentFailures: version.get('skipComponentFailures') ? 'true' : 'false',
- skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false',
- id: version.get('id')
+ skipSCFailures: version.get('skipSCFailures') ? 'true' : 'false'
};
if (App.get('supports.preUpgradeCheck')) {
this.set('requestInProgress', true);
http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5f2470/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 4dc04f4..f7d0914 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -1712,7 +1712,7 @@ var urls = {
timeout : 600000,
data: JSON.stringify({
"Upgrade": {
- "repository_version_id": data.id,
+ "repository_version": data.value,
"upgrade_type": data.type,
"skip_failures": data.skipComponentFailures,
"skip_service_check_failures": data.skipSCFailures,
@@ -1731,7 +1731,7 @@ var urls = {
data: JSON.stringify({
"Upgrade": {
"from_version": data.from,
- "repository_version_id": data.id,
+ "repository_version": data.value,
"upgrade_type": data.upgradeType,
"direction": "DOWNGRADE"
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0e5f2470/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
index fa0a0b9..e696bb1 100644
--- a/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
@@ -128,7 +128,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
sinon.stub(App.StackVersion, 'find').returns([Em.Object.create({
state: 'CURRENT',
repositoryVersion: {
- id: '1',
repositoryVersion: '2.2',
displayName: 'HDP-2.2'
}
@@ -156,7 +155,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
});
it('currentVersion is corrent', function () {
expect(controller.get('currentVersion')).to.eql({
- "id": "1",
"repository_version": "2.2",
"repository_name": "HDP-2.2"
});
@@ -391,7 +389,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
describe("#runPreUpgradeCheck()", function() {
it("make ajax call", function() {
controller.runPreUpgradeCheck(Em.Object.create({
- id: '1',
repositoryVersion: '2.2',
displayName: 'HDP-2.2',
upgradeType: 'ROLLING',
@@ -402,7 +399,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
expect(args[0]).to.exists;
expect(args[0].sender).to.be.eql(controller);
expect(args[0].data).to.be.eql({
- id: '1',
value: '2.2',
label: 'HDP-2.2',
type: 'ROLLING',
@@ -1130,7 +1126,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
controller.set('upgradeVersion', 'HDP-2.3');
controller.set('upgradeType', 'NON_ROLLING');
controller.startDowngrade(Em.Object.create({
- id: '1',
repository_version: '2.2',
repository_name: 'HDP-2.2'
}));
@@ -1144,7 +1139,6 @@ describe('App.MainAdminStackAndUpgradeController', function() {
it('request-data is valid', function () {
expect(this.callArgs.data).to.eql({
from: '2.3',
- id: '1',
value: '2.2',
label: 'HDP-2.2',
isDowngrade: true,