----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29207/#review66536 -----------------------------------------------------------
Ship it! Looks good. Just some minor nits. ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/MyValidator.java <https://reviews.apache.org/r/29207/#comment110107> Minor nit : since each of these methods operates on a single property its a little confusing to pass the entire property map. Maybe something like this instead? ... String propertyValue = definition.getPropertyMap().get(property); if (property.equals(PARAMETER_NAME_FREEFORM)) { // do nothing, this property can be free form } else if (property.equals(PARAMETER_NAME_URL)) { return validateParameterURL(propertyValue); } else if (property.equals(PARAMETER_NAME_INTEGER)) { return validateParameterInteger(propertyValue); } else if (property.equals(PARAMETER_NAME_FIRST_VALUE)) { return validateParameterFirst(propertyValue); } else if (property.equals(PARAMETER_NAME_SECOND_VALUE)) { return validateParameterSecond(propertyValue); } ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/MyValidator.java <https://reviews.apache.org/r/29207/#comment110108> minor : the Ambari coding standard requires enlosing brackets for even a single line if statement. ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/MyValidator.java <https://reviews.apache.org/r/29207/#comment110109> enclosing brackets. - Tom Beerbower On Jan. 2, 2015, 6:30 p.m., Jeff Sposetti wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29207/ > ----------------------------------------------------------- > > (Updated Jan. 2, 2015, 6:30 p.m.) > > > Review request for Ambari, Srimanth Gunturi, Tom Beerbower, and Yusaku Sako. > > > Bugs: AMBARI-8798 > https://issues.apache.org/jira/browse/AMBARI-8798 > > > Repository: ambari > > > Description > ------- > > > Provide an example view that exercises the view validator capability. > Includes example of URL, integer and two value checks. > > > Diffs > ----- > > ambari-views/examples/README.md 4b65216 > ambari-views/examples/property-validator-view/docs/index.md PRE-CREATION > ambari-views/examples/property-validator-view/pom.xml PRE-CREATION > > ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/MyValidator.java > PRE-CREATION > > ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/PropertyValidatorService.java > PRE-CREATION > > ambari-views/examples/property-validator-view/src/main/resources/ui/index.html > PRE-CREATION > ambari-views/examples/property-validator-view/src/main/resources/view.xml > PRE-CREATION > > Diff: https://reviews.apache.org/r/29207/diff/ > > > Testing > ------- > > > Thanks, > > Jeff Sposetti > >
