You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/04/02 21:55:25 UTC
[2/2] ambari git commit: Revert "AMBARI-10327. Make changes on UI
according to changes for GET/PUT hostcomponents API (alexantonenko)"
Revert "AMBARI-10327. Make changes on UI according to changes for GET/PUT hostcomponents API (alexantonenko)"
This reverts commit 05de8adfc7da3cdf9786142920c14bc778c8eca3.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/05b0d0b7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/05b0d0b7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/05b0d0b7
Branch: refs/heads/trunk
Commit: 05b0d0b7e6ccaf6ec3a07ccdf40e436beba1648b
Parents: 22fb15a
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Apr 2 22:54:27 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Apr 2 22:54:27 2015 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/host.js | 4 ++--
.../app/controllers/main/host/add_controller.js | 2 +-
ambari-web/app/controllers/main/host/details.js | 14 +++++++-------
.../app/controllers/main/service/add_controller.js | 2 +-
.../main/service/reassign/step4_controller.js | 4 ++--
.../main/service/reassign/step6_controller.js | 2 +-
ambari-web/app/controllers/wizard.js | 4 ++--
ambari-web/app/controllers/wizard/step9_controller.js | 2 +-
.../host/details/host_components/decommissionable.js | 2 +-
.../app/mixins/wizard/wizardProgressPageController.js | 2 +-
ambari-web/app/utils/components.js | 2 +-
ambari-web/test/controllers/main/host/details_test.js | 10 +++++-----
.../controllers/main/service/add_controller_test.js | 2 +-
.../wizard/wizardProgressPageController_test.js | 4 ++--
14 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js
index 42ad645..9d8f9c4 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -643,7 +643,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
data: {
query: query,
HostRoles: {
- desired_state: operationData.action
+ state: operationData.action
},
context: operationData.message,
hostName: hostNames
@@ -751,7 +751,7 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, {
sender: self,
data: {
HostRoles: {
- desired_state: operationData.action
+ state: operationData.action
},
query: 'HostRoles/component_name=' + operationData.componentName + '&HostRoles/host_name.in(' + hostsWithComponentInProperState.join(',') + ')&HostRoles/maintenance_state=OFF',
context: operationData.message + ' ' + operationData.componentNameFormatted,
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/main/host/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/add_controller.js b/ambari-web/app/controllers/main/host/add_controller.js
index 079c86c..39e1def 100644
--- a/ambari-web/app/controllers/main/host/add_controller.js
+++ b/ambari-web/app/controllers/main/host/add_controller.js
@@ -402,7 +402,7 @@ App.AddHostController = App.WizardController.extend({
data: {
"context": Em.I18n.t('requestInfo.installComponents'),
"query": "HostRoles/host_name.in(" + hostNames.join(',') + ")",
- "HostRoles": {"desired_state": "INSTALLED"},
+ "HostRoles": {"state": "INSTALLED"},
"level": "HOST_COMPONENT"
},
success: 'installServicesSuccessCallback',
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index b9b4e79..40254d6 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -126,7 +126,7 @@ App.MainHostDetailsController = Em.Controller.extend({
context: context,
component: component,
HostRoles: {
- desired_state: state
+ state: state
}
};
if (Array.isArray(component)) {
@@ -152,11 +152,11 @@ App.MainHostDetailsController = Em.Controller.extend({
* @method stopComponentSuccessCallback
*/
sendComponentCommandSuccessCallback: function (data, opt, params) {
- var running = (params.HostRoles.desired_state === App.HostComponentStatus.stopped) ? App.HostComponentStatus.stopping : App.HostComponentStatus.starting;
+ var running = (params.HostRoles.state === App.HostComponentStatus.stopped) ? App.HostComponentStatus.stopping : App.HostComponentStatus.starting;
console.log('Send request for ' + running + ' successfully');
params.component.set('workStatus', running);
if (App.get('testMode')) {
- this.mimicWorkStatusChange(params.component, running, params.HostRoles.desired_state);
+ this.mimicWorkStatusChange(params.component, running, params.HostRoles.state);
}
this.showBackgroundOperationsPopup();
},
@@ -380,7 +380,7 @@ App.MainHostDetailsController = Em.Controller.extend({
Body: {
HostRoles: {
stack_id: 'HDP-1.2.2',
- desired_state: 'INSTALLED'
+ state: 'INSTALLED'
}
}
})
@@ -1060,7 +1060,7 @@ App.MainHostDetailsController = Em.Controller.extend({
component: component,
context: Em.I18n.t('requestInfo.installHostComponent') + " " + displayName,
HostRoles: {
- desired_state: 'INSTALLED'
+ state: 'INSTALLED'
}
},
success: 'installComponentSuccessCallback',
@@ -1311,7 +1311,7 @@ App.MainHostDetailsController = Em.Controller.extend({
},
"Body": {
HostRoles: {
- desired_state: "INSTALLED"
+ state: "INSTALLED"
}
}
}
@@ -1447,7 +1447,7 @@ App.MainHostDetailsController = Em.Controller.extend({
},
"Body": {
HostRoles: {
- desired_state: "STARTED"
+ state: "STARTED"
}
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index f7322d5..d3d3a37 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -578,7 +578,7 @@ App.AddServiceController = App.WizardController.extend(App.AddSecurityConfigs, {
query: queryStr,
context: 'Install ' + App.format.role(c.componentName),
HostRoles: {
- desired_state: 'INSTALLED'
+ state: 'INSTALLED'
},
counter: k,
deferred: dfd
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/main/service/reassign/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
index 78615c8..d9ec6d2 100644
--- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js
@@ -920,7 +920,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
serviceName: "HIVE",
componentName: "MYSQL_SERVER",
HostRoles: {
- desired_state: "STARTED"
+ state: "STARTED"
}
},
success: 'startPolling',
@@ -938,7 +938,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro
serviceName: "HIVE",
componentName: "MYSQL_SERVER",
HostRoles: {
- desired_state: "STARTED"
+ state: "STARTED"
}
},
success: 'startPolling',
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/main/service/reassign/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step6_controller.js b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
index 36f3699..e3cdab7 100644
--- a/ambari-web/app/controllers/main/service/reassign/step6_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step6_controller.js
@@ -179,7 +179,7 @@ App.ReassignMasterWizardStep6Controller = App.HighAvailabilityProgressPageContro
data.context = "Stop required services";
data.hostName = this.get('content.reassignHosts.source');
data.serviceName = 'HIVE';
- data.HostRoles = { "desired_state": "INSTALLED" };
+ data.HostRoles = { "state": "INSTALLED" };
data.componentName = "MYSQL_SERVER";
App.ajax.send({
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index 5e323f0..0c54fa2 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -334,8 +334,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
if (isRetry) {
data = {
context: Em.I18n.t('requestInfo.installComponents'),
- HostRoles: {"desired_state": "INSTALLED"},
- urlParams: "HostRoles/desired_state=INSTALLED"
+ HostRoles: {"state": "INSTALLED"},
+ urlParams: "HostRoles/state=INSTALLED"
}
} else {
data = {
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/controllers/wizard/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step9_controller.js b/ambari-web/app/controllers/wizard/step9_controller.js
index 54a1fa6..4422f3f 100644
--- a/ambari-web/app/controllers/wizard/step9_controller.js
+++ b/ambari-web/app/controllers/wizard/step9_controller.js
@@ -477,7 +477,7 @@ App.WizardStep9Controller = Em.Controller.extend(App.ReloadPopupMixin, {
data = {
"context": Em.I18n.t("requestInfo.startHostComponents"),
"query": "HostRoles/component_name.in(" + App.get('components.slaves').join(',') + ")&HostRoles/state=INSTALLED&HostRoles/host_name.in(" + hostnames.join(',') + ")",
- "HostRoles": { "desired_state": "STARTED"}
+ "HostRoles": { "state": "STARTED"}
};
break;
case 'addServiceController':
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
index 328153b..2a597b2 100644
--- a/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
+++ b/ambari-web/app/mixins/main/host/details/host_components/decommissionable.js
@@ -206,7 +206,7 @@ App.Decommissionable = Em.Mixin.create({
getDecommissionStatusSuccessCallback: function (response) {
var statusObject = response.ServiceComponentInfo;
if ( statusObject != null) {
- statusObject.component_state = response.host_components[0].HostRoles.desired_state;
+ statusObject.component_state = response.host_components[0].HostRoles.state;
this.setDecommissionStatus(statusObject);
return statusObject;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/mixins/wizard/wizardProgressPageController.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index 3801b42..74e83cd 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -491,7 +491,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
sender: this,
data: {
HostRoles: {
- desired_state: state
+ state: state
},
query: 'HostRoles/component_name=' + componentName + '&HostRoles/host_name.in(' + hostName.join(',') + ')&HostRoles/maintenance_state=OFF',
context: context + " " + App.format.role(componentName),
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/app/utils/components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/components.js b/ambari-web/app/utils/components.js
index 4b7830a..6264895 100644
--- a/ambari-web/app/utils/components.js
+++ b/ambari-web/app/utils/components.js
@@ -68,7 +68,7 @@ module.exports = {
component: params.component,
"context": Em.I18n.t('requestInfo.installNewHostComponent') + " " + params.component.get('displayName'),
HostRoles: {
- desired_state: 'INSTALLED'
+ state: 'INSTALLED'
},
urlParams: "HostRoles/state=INIT"
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/test/controllers/main/host/details_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js
index 23d569f..5a383a3 100644
--- a/ambari-web/test/controllers/main/host/details_test.js
+++ b/ambari-web/test/controllers/main/host/details_test.js
@@ -110,7 +110,7 @@ describe('App.MainHostDetailsController', function () {
componentName: 'COMP1'
}),
"HostRoles": {
- "desired_state": "state"
+ "state": "state"
},
"componentName": "COMP1",
"serviceName": "S1"
@@ -145,7 +145,7 @@ describe('App.MainHostDetailsController', function () {
})
],
"HostRoles": {
- "desired_state": "state"
+ "state": "state"
},
"query": "HostRoles/component_name.in(COMP1,COMP2)"
});
@@ -165,7 +165,7 @@ describe('App.MainHostDetailsController', function () {
var params = {
component: Em.Object.create({}),
HostRoles: {
- desired_state: App.HostComponentStatus.started
+ state: App.HostComponentStatus.started
}
};
@@ -180,7 +180,7 @@ describe('App.MainHostDetailsController', function () {
var params = {
component: Em.Object.create({}),
HostRoles: {
- desired_state: App.HostComponentStatus.stopped
+ state: App.HostComponentStatus.stopped
}
};
@@ -195,7 +195,7 @@ describe('App.MainHostDetailsController', function () {
var params = {
component: Em.Object.create({}),
HostRoles: {
- desired_state: App.HostComponentStatus.stopped
+ state: App.HostComponentStatus.stopped
}
};
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/test/controllers/main/service/add_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/add_controller_test.js b/ambari-web/test/controllers/main/service/add_controller_test.js
index 72b6580..79b0f21 100644
--- a/ambari-web/test/controllers/main/service/add_controller_test.js
+++ b/ambari-web/test/controllers/main/service/add_controller_test.js
@@ -44,7 +44,7 @@ describe('App.AddServiceController', function() {
},
Body: {
HostRoles: {
- desired_state: 'INSTALLED'
+ state: 'INSTALLED'
}
}
};
http://git-wip-us.apache.org/repos/asf/ambari/blob/05b0d0b7/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js b/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
index eeda52e..d72b3f6 100644
--- a/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
+++ b/ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
@@ -96,7 +96,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
{
callParams: ['ZOOKEEPER_SERVER', 'host1', 'ZOOKEEPER', 'Install', 1],
e: [
- { key: 'data.HostRoles.desired_state', value: 'INSTALLED'},
+ { key: 'data.HostRoles.state', value: 'INSTALLED'},
{ key: 'data.hostName[0]', value: 'host1'},
{ key: 'data.query', value: 'HostRoles/component_name=ZOOKEEPER_SERVER&HostRoles/host_name.in(host1)&HostRoles/maintenance_state=OFF'}
]
@@ -104,7 +104,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
{
callParams: ['ZOOKEEPER_SERVER', ['host1', 'host2'], 'ZOOKEEPER', 'start', 1],
e: [
- { key: 'data.HostRoles.desired_state', value: 'STARTED'},
+ { key: 'data.HostRoles.state', value: 'STARTED'},
{ key: 'data.hostName[0]', value: 'host1'},
{ key: 'data.hostName[1]', value: 'host2'},
{ key: 'data.query', value: 'HostRoles/component_name=ZOOKEEPER_SERVER&HostRoles/host_name.in(host1,host2)&HostRoles/maintenance_state=OFF'}