Browse Source

AMBARI-3721 Yarn Memory graph goes over 100%. (ababiichuk)

aBabiichuk 11 năm trước cách đây
mục cha
commit
dace05a7c5

+ 4 - 0
ambari-web/app/models/service/yarn.js

@@ -58,6 +58,10 @@ App.YARNService = App.Service.extend({
    * Provides a flat array of queue names.
    * Provides a flat array of queue names.
    * Example: root, root/default
    * Example: root, root/default
    */
    */
+  maxMemory: function() {
+    return this.get('allocatedMemory') + this.get('availableMemory');
+  }.property('allocatedMemory','availableMemory'),
+
   queueNames: function () {
   queueNames: function () {
     var queueString = this.get('queue');
     var queueString = this.get('queue');
     var allQueueNames = [];
     var allQueueNames = [];

+ 1 - 1
ambari-web/app/views/main/dashboard/widgets/yarn_memory.js

@@ -27,7 +27,7 @@ App.YARNMemoryPieChartView = App.PieChartDashboardWidgetView.extend({
   widgetHtmlId: 'widget-yarn-memory',
   widgetHtmlId: 'widget-yarn-memory',
   model_type: 'yarn',
   model_type: 'yarn',
   modelFieldUsed: 'allocatedMemory',
   modelFieldUsed: 'allocatedMemory',
-  modelFieldMax: 'availableMemory',
+  modelFieldMax: 'maxMemory',
 
 
   didInsertElement: function() {
   didInsertElement: function() {
     this._super();
     this._super();