-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34052/
-----------------------------------------------------------
Review request for Ambari, Srimanth Gunturi, Xi Wang, and Yusaku Sako.
Bugs: AMBARI-11050
https://issues.apache.org/jira/browse/AMBARI-11050
Repository: ambari
Description
-------
Attempted to save a widget. After clicking "Complete", dialog dismissed but
doesn't save.
Looks like API error.
In addition to fixing the save bug, we need to inform the user of save errors
and not fail silently.
{code}
POST
http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/widgets/
{"WidgetInfo":{"widget_name":"Heloo
World","widget_type":"GAUGE","description":"asda ds ads asdas","scope"
:"USER","author":"admin","metrics":[{"name":"FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset
.impl.FsDatasetImpl.DfsUsed._sum","metric_path":"metrics/dfs/datanode/DfsUsed._sum"}],"values":[{"name"
:"","value":"${FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.DfsUsed
._sum}"}],"properties":{"warning_threshold":"0.7","error_threshold":"0.9"},"display_name":"Heloo
World"
}}
{code}
response:
{code}
{
"status" : 400,
"message" : "The properties [WidgetInfo/display_name] specified in the
request or predicate are not
supported for the resource type Widget."
}
{code}
Diffs
-----
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_widgets.json
767c678
ambari-web/app/controllers/main/service/info/summary.js 26a8a4a
ambari-web/app/mixins/common/widgets/widget_mixin.js 6a15e57
Diff: https://reviews.apache.org/r/34052/diff/
Testing
-------
tested on a cluster
All unit tests passed
Thanks,
Jaimin Jetly