ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "peng.jianhua (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (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 08:46:01 GMT

     [ https://issues.apache.org/jira/browse/RANGER-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

peng.jianhua resolved RANGER-1860.
----------------------------------
       Resolution: Fixed
    Fix Version/s: master
                   1.0.0

> 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
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1860
>                 URL: https://issues.apache.org/jira/browse/RANGER-1860
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>            Priority: Major
>              Labels: patch
>             Fix For: 1.0.0, master
>
>         Attachments: 0001-RANGER-1860.patch
>
>
> The ranger used the hard-coded way to achieve the service interface prompt function,
the result is that the codes have worse maintainability.
> {code}
> 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;
> }
> {code}
> 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´╝Ü
> {code}
> "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"
> 	}
> ]
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message