ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qiang Zhang <zhangqia...@zte.com.cn>
Subject Re: Review Request 63352: RANGER-1860:Provide a new service interface prompt function framework to resolved the defect of the current service interface, increase the flexibility of the function, improve user ease of use
Date Fri, 03 Nov 2017 07:20:49 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63352/
-----------------------------------------------------------

(Updated εδΈ€ζœˆ 3, 2017, 7:20 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://&lt;ipaddr&gt;:8088'<br>2.For multiple urls (use , or ; delimiter),
eg.<br>'http://&lt;ipaddr1&gt;:8088,http://&lt;ipaddr2&gt;: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-hdfs.json 519d6a8 
  agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json 5456e2b 
  agents-common/src/main/resources/service-defs/ranger-servicedef-sqoop.json 3f269fb 
  agents-common/src/main/resources/service-defs/ranger-servicedef-yarn.json 53f9e18 
  security-admin/src/main/webapp/scripts/models/BackboneFormDataType.js 71d43ec 
  security-admin/src/main/webapp/scripts/models/VXGroup.js a8f891c 
  security-admin/src/main/webapp/scripts/models/VXPortalUser.js d54fadc 
  security-admin/src/main/webapp/scripts/modules/XAOverrides.js 5810d5d 
  security-admin/src/main/webapp/scripts/views/users/UserForm.js 27e86a9 


Diff: https://reviews.apache.org/r/63352/diff/3/

Changes: https://reviews.apache.org/r/63352/diff/2-3/


Testing
-------

tested


Thanks,

Qiang Zhang


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message