You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2018/04/12 09:14:00 UTC
[ambari] branch trunk updated: AMBARI-23544 NameNode namespaces
aren't displayed after HDFS page refresh. (ababiichuk)
This is an automated email from the ASF dual-hosted git repository.
ababiichuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 1ad21ee AMBARI-23544 NameNode namespaces aren't displayed after HDFS page refresh. (ababiichuk)
1ad21ee is described below
commit 1ad21eecb127af9776f0fb50ee905f3d6b1d74ea
Author: ababiichuk <ab...@hortonworks.com>
AuthorDate: Wed Apr 11 20:05:59 2018 +0300
AMBARI-23544 NameNode namespaces aren't displayed after HDFS page refresh. (ababiichuk)
---
.../mixins/main/dashboard/widgets/namenode_widget.js | 2 +-
ambari-web/app/models/service/hdfs.js | 2 +-
ambari-web/app/views/main/service/info/summary.js | 17 +++++++++--------
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/ambari-web/app/mixins/main/dashboard/widgets/namenode_widget.js b/ambari-web/app/mixins/main/dashboard/widgets/namenode_widget.js
index 5283634..ff40d11 100644
--- a/ambari-web/app/mixins/main/dashboard/widgets/namenode_widget.js
+++ b/ambari-web/app/mixins/main/dashboard/widgets/namenode_widget.js
@@ -31,7 +31,7 @@ App.NameNodeWidgetMixin = Em.Mixin.create({
clusterId: Em.computed.alias('componentGroup.clusterId'),
hostName: function () {
- const allHostNames = this.get('componentGroup.hosts'),
+ const allHostNames = this.get('componentGroup.hosts') || [],
hostComponents = App.HostComponent.find().filter(component => {
return component.get('componentName') === 'NAMENODE' && allHostNames.contains(component.get('hostName'));
}),
diff --git a/ambari-web/app/models/service/hdfs.js b/ambari-web/app/models/service/hdfs.js
index f4b7f45..2a27dd6 100644
--- a/ambari-web/app/models/service/hdfs.js
+++ b/ambari-web/app/models/service/hdfs.js
@@ -120,7 +120,7 @@ App.HDFSService = App.Service.extend({
}
});
return result;
- }.property('hostComponents.length')
+ }.property('hostComponents.length', 'App.router.clusterController.isHDFSNameSpacesLoaded')
});
App.HDFSService.FIXTURES = [];
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 72b4621..4113242 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -166,7 +166,7 @@ App.MainServiceInfoSummaryView = Em.View.extend({
var self = this;
if (!this.get('service') || this.get('service.deleteInProgress')) return;
Em.run.once(self, 'setComponentsContent');
- }.observes('service.hostComponents.length', 'service.slaveComponents.@each.totalCount', 'service.clientComponents.@each.totalCount'),
+ }.observes('service.hostComponents.length', 'service.slaveComponents.@each.totalCount', 'service.clientComponents.@each.totalCount', 'svc.masterComponentGroups.length'),
loadServiceSummary: function () {
var serviceName = this.get('serviceName');
@@ -214,12 +214,13 @@ App.MainServiceInfoSummaryView = Em.View.extend({
if (Em.isNone(this.get('service'))) {
return;
}
- var masters = this.get('service.hostComponents').filterProperty('isMaster');
- var slaves = this.get('service.slaveComponents').toArray();
- var clients = this.get('service.clientComponents').toArray();
+ const masters = this.get('service.hostComponents').filterProperty('isMaster'),
+ slaves = this.get('service.slaveComponents').toArray(),
+ clients = this.get('service.clientComponents').toArray(),
+ masterGroups = this.get('svc') ? this.get('svc.masterComponentGroups').toArray() : [];
- if (this.get('mastersLength') !== masters.length) {
- const mastersInit = this.get('mastersObj').mapProperty('components').reduce((acc, group) => {
+ if (this.get('mastersLength') !== masters.length || this.get('mastersObj.length') !== masterGroups.length) {
+ let mastersInit = this.get('mastersObj').mapProperty('components').reduce((acc, group) => {
return [...acc, ...group];
}, []);
this.updateComponentList(mastersInit, masters);
@@ -286,8 +287,8 @@ App.MainServiceInfoSummaryView = Em.View.extend({
service: null,
svc: function () {
- var svc = this.get('controller.content');
- var svcName = svc.get('serviceName');
+ let svc = this.get('controller.content');
+ const svcName = svc ? svc.get('serviceName') : null;
if (svcName) {
switch (svcName.toLowerCase()) {
case 'hdfs':
--
To stop receiving notification emails like this one, please contact
ababiichuk@apache.org.