You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/07/25 23:39:06 UTC
git commit: AMBARI-6588. Decommission/Recommission BG window UI
defects.(xiwang)
Repository: ambari
Updated Branches:
refs/heads/trunk 0ae8350bc -> 9100e08a7
AMBARI-6588. Decommission/Recommission BG window UI defects.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9100e08a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9100e08a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9100e08a
Branch: refs/heads/trunk
Commit: 9100e08a7b7a8c0f050ef6f22843f9f7eaf8cc29
Parents: 0ae8350
Author: Xi Wang <xi...@apache.org>
Authored: Wed Jul 23 15:38:37 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Fri Jul 25 14:38:39 2014 -0700
----------------------------------------------------------------------
.../controllers/global/background_operations_controller.js | 2 ++
ambari-web/app/models/stack_service_component.js | 1 +
ambari-web/app/utils/helper.js | 7 ++++---
ambari-web/app/utils/host_progress_popup.js | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9100e08a/ambari-web/app/controllers/global/background_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/background_operations_controller.js b/ambari-web/app/controllers/global/background_operations_controller.js
index 52108f7..b6dc603 100644
--- a/ambari-web/app/controllers/global/background_operations_controller.js
+++ b/ambari-web/app/controllers/global/background_operations_controller.js
@@ -123,6 +123,7 @@ App.BackgroundOperationsController = Em.Controller.extend({
*/
callBackFilteredByRequest: function (data, ajaxQuery, params) {
var requestId = data.Requests.id;
+ var requestInputs = data.Requests.inputs;
var request = this.get('services').findProperty('id', requestId);
var hostsMap = {};
var previousTaskStatusMap = request.get('previousTaskStatusMap');
@@ -130,6 +131,7 @@ App.BackgroundOperationsController = Em.Controller.extend({
data.tasks.forEach(function (task) {
var host = hostsMap[task.Tasks.host_name];
task.Tasks.request_id = requestId;
+ task.Tasks.request_inputs = requestInputs;
if (host) {
host.logTasks.push(task);
host.isModified = (host.isModified) ? true : previousTaskStatusMap[task.Tasks.id] !== task.Tasks.status;
http://git-wip-us.apache.org/repos/asf/ambari/blob/9100e08a/ambari-web/app/models/stack_service_component.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service_component.js b/ambari-web/app/models/stack_service_component.js
index 3f42eb6..ff6da8b 100644
--- a/ambari-web/app/models/stack_service_component.js
+++ b/ambari-web/app/models/stack_service_component.js
@@ -212,3 +212,4 @@ App.StackServiceComponent.coHost = {
'HIVE_METASTORE': 'HIVE_SERVER',
'WEBHCAT_SERVER': 'HIVE_SERVER'
};
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/9100e08a/ambari-web/app/utils/helper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/helper.js b/ambari-web/app/utils/helper.js
index efa5ce3..d9e6136 100644
--- a/ambari-web/app/utils/helper.js
+++ b/ambari-web/app/utils/helper.js
@@ -406,9 +406,10 @@ App.format = {
* @memberof App.format
* @method commandDetail
* @param {string} command_detail
+ * @param {string} request_inputs
* @return {string}
*/
- commandDetail: function (command_detail) {
+ commandDetail: function (command_detail, request_inputs) {
var detailArr = command_detail.split(' ');
var self = this;
var result = '';
@@ -417,9 +418,9 @@ App.format = {
if (item.contains('/')) {
item = item.split('/')[1];
}
- // ignore 'DECOMMISSION', command came from 'excluded/included'
if (item == 'DECOMMISSION,') {
- item = '';
+ // ignore text 'DECOMMISSION,'( command came from 'excluded/included'), here get the component name from request_inputs
+ item = (jQuery.parseJSON(request_inputs)) ? jQuery.parseJSON(request_inputs).slave_type : '';
}
if (self.components[item]) {
result = result + ' ' + self.components[item];
http://git-wip-us.apache.org/repos/asf/ambari/blob/9100e08a/ambari-web/app/utils/host_progress_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/host_progress_popup.js b/ambari-web/app/utils/host_progress_popup.js
index 41dd17a..529b8bb 100644
--- a/ambari-web/app/utils/host_progress_popup.js
+++ b/ambari-web/app/utils/host_progress_popup.js
@@ -298,7 +298,7 @@ App.HostPopup = Em.Object.create({
id: _task.Tasks.id,
hostName: _task.Tasks.host_name,
command: ( _task.Tasks.command.toLowerCase() != 'service_check') ? _task.Tasks.command.toLowerCase() : '',
- commandDetail: App.format.commandDetail(_task.Tasks.command_detail),
+ commandDetail: App.format.commandDetail(_task.Tasks.command_detail, _task.Tasks.request_inputs),
status: App.format.taskStatus(_task.Tasks.status),
role: App.format.role(_task.Tasks.role),
stderr: _task.Tasks.stderr,