----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63352/ -----------------------------------------------------------
(Updated εδΈζ 15, 2017, 2:40 a.m.) Review request for ranger, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Nitin Galave, pengjianhua, Ramesh Mani, Selvamohan Neethiraj, sam rome, Venkat Ranganathan, and Velmurugan Periasamy. Bugs: RANGER-1860 https://issues.apache.org/jira/browse/RANGER-1860 Repository: ranger Description ------- The ranger used the hard-coded way to achieve the service interface prompt function, the result is that the codes have worse maintainability. if(!isPolicyForm) { if(v.name == 'yarn.url'){ formObj.type = 'TextFiledWithIcon'; formObj.errorMsg = localization.tt("hintMsg.yarnRestUrl"); }else if(v.name == 'sqoop.url'){ formObj.type = 'TextFiledWithIcon'; formObj.errorMsg = localization.tt("hintMsg.sqoopRestUrl"); }else if(v.name == 'jdbc.url'){ formObj.type = 'TextFiledWithIcon'; formObj.errorMsg = localization.tt("hintMsg.hiveJDBCUrl"); }else if(v.name == 'fs.default.name'){ formObj.type = 'TextFiledWithIcon'; formObj.errorMsg = localization.tt("hintMsg.hdfsNameNodeUrl"); }else{ formObj.type = 'Text'; } break; } Using the new issue we can directly modify the configuration file to meet the requirements of the new prompt function. Such as we can modify the following configuration to meet following requirements: the configuration in the ranger-servicedef-yarn.json is as follows? "configs": [ { "itemId": 3, "name": "yarn.url", "type": "string", "mandatory": true, "defaultValue": "", "validationRegEx":"", "validationMessage": "", "uiHint":"{\"TextFiledWithIcon\":true, \"info\": \"1.For one url, eg.<br>'http or https://<ipaddr>:8088'<br>2.For multiple urls (use , or ; delimiter), eg.<br>'http://<ipaddr1>:8088,http://<ipaddr2>:8088'\"}", "label": "YARN REST URL" } ] requirements: adding text field with an icon( i.e information) on service form page,we should add unified configuration management functions in the service definition. Diffs (updated) ----- agents-common/src/main/resources/service-defs/ranger-servicedef-nifi.json 1d11232 Diff: https://reviews.apache.org/r/63352/diff/4/ Changes: https://reviews.apache.org/r/63352/diff/3-4/ Testing ------- tested Thanks, Qiang Zhang