You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by alice zhangxiaolu <zh...@cmss.chinamobile.com> on 2017/03/03 03:14:43 UTC
Review Request 57265: null in heapmap page
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57265/
-----------------------------------------------------------
Review request for Ambari, Dmytro Sen, Jaimin Jetly, Srimanth Gunturi, Sid Wagle, and Yusaku Sako.
Bugs: AMBARI-20290
https://issues.apache.org/jira/browse/AMBARI-20290
Repository: ambari
Description
-------
The value, which obtained from method "this.get('displayName')" with name attribute and is inside of method "drawWidget", is always null. Probably should use "this.get('displayName')" method to assign the obtained value to "this.get('content.widgetName')"
Diffs
-----
ambari-web/app/views/common/widget/heatmap_widget_view.js a7a919b
Diff: https://reviews.apache.org/r/57265/diff/1/
Testing
-------
done it
Thanks,
alice zhangxiaolu
Re: Review Request 57265: null in heapmap page
Posted by zhangxiaolu zhangxiaolu <zh...@cmss.chinamobile.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57265/
-----------------------------------------------------------
(Updated \u4e09\u6708 10, 2017, 6:12 a.m.)
Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, Dmytro Sen, and Vitalyi Brodetskyi.
Bugs: AMBARI-20290
https://issues.apache.org/jira/browse/AMBARI-20290
Repository: ambari
Description
-------
The value, which obtained from method "this.get('displayName')" with name attribute and is inside of method "drawWidget", is always null.
Probably should use "this.get('displayName')" method to assign the obtained value to "this.get('content.widgetName')".
The heatmap cann't load as follows:
setMetric: function (view, host) {
var selectedMetric = this.get('controller.selectedMetric');
if (selectedMetric) {
var metricName = selectedMetric.get('name');
var h2vMap = selectedMetric.get('hostToValueMap');
if (h2vMap && metricName) {
var value = h2vMap[host.hostName];
if (Em.isNone(value)) {
value = this.t('charts.heatmap.unknown');
} else {
if (metricName == 'Garbage Collection Time') {
value = date.timingFormat(parseInt(value));
} else {
if (isNaN(value)) {
value = this.t('charts.heatmap.unknown');
} else {
value = value + selectedMetric.get('units');
}
}
}
view.set('details.metricName', metricName);
view.set('details.metricValue', value);
}
}
},
because the metricName is always null, the if condition cannot execute.
Diffs
-----
ambari-web/app/views/common/widget/heatmap_widget_view.js a7a919b
Diff: https://reviews.apache.org/r/57265/diff/1/
Testing
-------
done it
File Attachments (updated)
----------------
AMBARI-20290.patch
https://reviews.apache.org/media/uploaded/files/2017/03/03/6f22b669-2cd5-4cd7-ae66-693a736811b0__AMBARI-20290.patch
before.png
https://reviews.apache.org/media/uploaded/files/2017/03/10/db183b48-6294-4103-9811-3d3c34f20a79__before.png
after.png
https://reviews.apache.org/media/uploaded/files/2017/03/10/2aeda32b-6d2f-40ee-91cd-16a85dc20aca__after.png
Thanks,
zhangxiaolu zhangxiaolu
Re: Review Request 57265: null in heapmap page
Posted by zhangxiaolu zhangxiaolu <zh...@cmss.chinamobile.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57265/
-----------------------------------------------------------
(Updated \u4e09\u6708 10, 2017, 5:57 a.m.)
Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, Dmytro Sen, and Vitalyi Brodetskyi.
Bugs: AMBARI-20290
https://issues.apache.org/jira/browse/AMBARI-20290
Repository: ambari
Description (updated)
-------
The value, which obtained from method "this.get('displayName')" with name attribute and is inside of method "drawWidget", is always null.
Probably should use "this.get('displayName')" method to assign the obtained value to "this.get('content.widgetName')".
The heatmap cann't load as follows:
setMetric: function (view, host) {
var selectedMetric = this.get('controller.selectedMetric');
if (selectedMetric) {
var metricName = selectedMetric.get('name');
var h2vMap = selectedMetric.get('hostToValueMap');
if (h2vMap && metricName) {
var value = h2vMap[host.hostName];
if (Em.isNone(value)) {
value = this.t('charts.heatmap.unknown');
} else {
if (metricName == 'Garbage Collection Time') {
value = date.timingFormat(parseInt(value));
} else {
if (isNaN(value)) {
value = this.t('charts.heatmap.unknown');
} else {
value = value + selectedMetric.get('units');
}
}
}
view.set('details.metricName', metricName);
view.set('details.metricValue', value);
}
}
},
because the metricName is always null, the if condition cannot execute.
Diffs
-----
ambari-web/app/views/common/widget/heatmap_widget_view.js a7a919b
Diff: https://reviews.apache.org/r/57265/diff/1/
Testing
-------
done it
File Attachments
----------------
AMBARI-20290.patch
https://reviews.apache.org/media/uploaded/files/2017/03/03/6f22b669-2cd5-4cd7-ae66-693a736811b0__AMBARI-20290.patch
Thanks,
zhangxiaolu zhangxiaolu
Re: Review Request 57265: null in heapmap page
Posted by alice zhangxiaolu <zh...@cmss.chinamobile.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57265/
-----------------------------------------------------------
(Updated \u4e09\u6708 3, 2017, 3:15 a.m.)
Review request for Ambari, Dmytro Sen, Jaimin Jetly, Srimanth Gunturi, Sid Wagle, and Yusaku Sako.
Bugs: AMBARI-20290
https://issues.apache.org/jira/browse/AMBARI-20290
Repository: ambari
Description
-------
The value, which obtained from method "this.get('displayName')" with name attribute and is inside of method "drawWidget", is always null. Probably should use "this.get('displayName')" method to assign the obtained value to "this.get('content.widgetName')"
Diffs
-----
ambari-web/app/views/common/widget/heatmap_widget_view.js a7a919b
Diff: https://reviews.apache.org/r/57265/diff/1/
Testing
-------
done it
File Attachments (updated)
----------------
AMBARI-20290.patch
https://reviews.apache.org/media/uploaded/files/2017/03/03/6f22b669-2cd5-4cd7-ae66-693a736811b0__AMBARI-20290.patch
Thanks,
alice zhangxiaolu