Skip to content

Commit

Permalink
AMBARI-1040. Cluster heatmap: green should always mean good. (Srimant…
Browse files Browse the repository at this point in the history
…h Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1418984 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Yusaku Sako committed Dec 9, 2012
1 parent 7ab2fbf commit 5ed4c1c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions AMBARI-666-CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ AMBARI-666 branch (unreleased changes)

IMPROVEMENTS

AMBARI-1040. Cluster heatmap: green should always mean "good". (Srimanth
Gunturi via yusaku)

AMBARI-1039. Improve Nagios alerts time display. (Srimanth Gunturi via yusaku)

AMBARI-1036. Service Info/Quick Links do not display external hostnames.
Expand Down
2 changes: 1 addition & 1 deletion ambari-web/app/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require('controllers/main/charts');
require('controllers/main/charts/heatmap_metrics/heatmap_metric');
require('controllers/main/charts/heatmap_metrics/heatmap_metric_processrun');
require('controllers/main/charts/heatmap_metrics/heatmap_metric_diskspaceused');
require('controllers/main/charts/heatmap_metrics/heatmap_metric_memoryfree');
require('controllers/main/charts/heatmap_metrics/heatmap_metric_memoryused');
require('controllers/main/charts/heatmap');
require('controllers/main/charts/horizon_chart');
require('controllers/main/rack');
Expand Down
4 changes: 2 additions & 2 deletions ambari-web/app/controllers/main/charts/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ App.MainChartsHeatmapController = Em.Controller.extend({
allMetrics: [ Em.Object.create({
label: Em.I18n.t('charts.heatmap.category.host'),
category: 'host',
items: [ App.MainChartHeatmapProcessRunMetric.create(), App.MainChartHeatmapDiskSpaceUsedMetric.create(), App.MainChartHeatmapMemoryFreeMetric.create() ]
items: [ App.MainChartHeatmapDiskSpaceUsedMetric.create(), App.MainChartHeatmapMemoryUsedMetric.create() /*, App.MainChartHeatmapProcessRunMetric.create()*/ ]
}) ],

selectedMetric: null,
Expand Down Expand Up @@ -67,4 +67,4 @@ App.MainChartsHeatmapController = Em.Controller.extend({
return "span4";
}
}.property('cluster')
})
});
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ var App = require('app');
* </ul>
*
*/
App.MainChartHeatmapMemoryFreeMetric = App.MainChartHeatmapMetric.extend({
name: 'Memory Free %',
App.MainChartHeatmapMemoryUsedMetric = App.MainChartHeatmapMetric.extend({
name: 'Memory Used %',
maximumValue: 100,
defaultMetric: 'metrics.memory',
units: '%',
Expand All @@ -47,13 +47,13 @@ App.MainChartHeatmapMemoryFreeMetric = App.MainChartHeatmapMetric.extend({
});

var total = value.mem_total;
var free = value.mem_free;
value = ((free * 100) / total).toFixed(1);
var used = value.mem_total - value.mem_free;
value = ((used * 100) / total).toFixed(1);

var hostName = item.Hosts.host_name;
hostToValueMap[hostName] = value;
});
}
return hostToValueMap;
}
})
});

0 comments on commit 5ed4c1c

Please sign in to comment.