@JayZhang
Until the mentioned JIRA is fixed permanently can you please try this workaround. One time One line change inside the "/usr/lib/ambari-server/web/javascripts/app.js" file should work.
Step-1). Take a Safe Backup of the file "/usr/lib/ambari-server/web/javascripts/app.js" on ambari server host.
# cp -f /usr/lib/ambari-server/web/javascripts/app.js /PATH/To/Backup/app.js.ORIGINAL
Step-2). Also just above the "App.YarnContainersView = App.TextDashboardWidgetView.extend" line inside the above file you will see a function declaration like "counterOr" we will need to make one change there.
(BEFORE CHANGE)
# grep -B12 'App.YarnContainersView' /usr/lib/ambari-server/web/javascripts/app.js
var App = require('app');
function counterOrNA(key) {
var _key = 'model.{0}.length'.format(key);
return Em.computed(_key, function () {
if (Em.isNone(this.get('model.' + key)) || this.get('model.metricsNotAvailable')) {
return Em.I18n.t('services.service.summary.notAvailable');
}
return this.get(_key);
});
}
Step-3). IN the above function block you will see a line as "var _key = 'model.{0}.length'.format(key);"
We need to just remove the ".length" work from that string.
(AFTER CHANGE)
# grep -B12 'App.YarnContainersView' /usr/lib/ambari-server/web/javascripts/app.js
var App = require('app');
function counterOrNA(key) {
var _key = 'model.{0}'.format(key);
return Em.computed(_key, function () {
if (Em.isNone(this.get('model.' + key)) || this.get('model.metricsNotAvailable')) {
return Em.I18n.t('services.service.summary.notAvailable');
}
return this.get(_key);
});
}
Step-4). Save the file and then Hard Refresh the Browser. On Mac (command + Shift + R)