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 2016/07/04 14:39:29 UTC
ambari git commit: AMBARI-17549 Client Install Failed icon appears
even after reinstall. (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk cbe8882fc -> 7d2134bf9
AMBARI-17549 Client Install Failed icon appears even after reinstall. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7d2134bf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7d2134bf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7d2134bf
Branch: refs/heads/trunk
Commit: 7d2134bf9f579c6886b04e76b8fc55285c61d3c5
Parents: cbe8882
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Mon Jul 4 15:54:09 2016 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Mon Jul 4 17:37:50 2016 +0300
----------------------------------------------------------------------
ambari-web/app/views/main/host/summary.js | 6 ++----
ambari-web/test/views/main/host/summary_test.js | 13 +++++++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7d2134bf/ambari-web/app/views/main/host/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/summary.js b/ambari-web/app/views/main/host/summary.js
index 8ef4bf4..80c4890 100644
--- a/ambari-web/app/views/main/host/summary.js
+++ b/ambari-web/app/views/main/host/summary.js
@@ -181,14 +181,12 @@ App.MainHostSummaryView = Em.View.extend(App.TimeRangeMixin, {
clients[clients.length - 1].set('isLast', false);
}
component.set('isLast', true);
- if (['INSTALL_FAILED', 'INIT'].contains(component.get('workStatus'))) {
- component.set('isInstallFailed', true);
- }
+ component.set('isInstallFailed', ['INSTALL_FAILED', 'INIT'].contains(component.get('workStatus')));
clients.push(component);
}
}, this);
return clients;
- }.property('content.hostComponents.length'),
+ }.property('content.hostComponents.length', 'content.hostComponents.@each.workStatus'),
anyClientFailedToInstall: Em.computed.someBy('clients', 'isInstallFailed', true),
http://git-wip-us.apache.org/repos/asf/ambari/blob/7d2134bf/ambari-web/test/views/main/host/summary_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/host/summary_test.js b/ambari-web/test/views/main/host/summary_test.js
index eae1f8e..31b6d94 100644
--- a/ambari-web/test/views/main/host/summary_test.js
+++ b/ambari-web/test/views/main/host/summary_test.js
@@ -216,6 +216,19 @@ describe('App.MainHostSummaryView', function() {
});
});
+ it('should set isInstallFailed for clients with INIT and INSTALL_FAILED workStatus', function() {
+ mainHostSummaryView.set('content', Em.Object.create({
+ hostComponents: [
+ Em.Object.create({isMaster: false, isSlave: false, componentName: 'B', workStatus: 'INIT'}),
+ Em.Object.create({isMaster: false, isSlave: false, componentName: 'A', workStatus: 'INSTALLED'}),
+ Em.Object.create({isMaster: false, isSlave: false, componentName: 'C', workStatus: 'INSTALL_FAILED'}),
+ Em.Object.create({isMaster: false, isSlave: false, componentName: 'D', workStatus: 'INSTALLING'})
+ ]
+ }));
+ expect(mainHostSummaryView.get('clients').filterProperty('isInstallFailed', true).mapProperty('componentName')).to.eql(['B', 'C']);
+ expect(mainHostSummaryView.get('clients').filterProperty('isInstallFailed', false).mapProperty('componentName')).to.eql(['A', 'D']);
+ });
+
});
describe('#areClientWithStaleConfigs', function() {