Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5857B200D34 for ; Fri, 3 Nov 2017 09:46:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 550EC160BFB; Fri, 3 Nov 2017 08:46:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9A41F160BE9 for ; Fri, 3 Nov 2017 09:46:06 +0100 (CET) Received: (qmail 25838 invoked by uid 500); 3 Nov 2017 08:46:05 -0000 Mailing-List: contact dev-help@ranger.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ranger.apache.org Delivered-To: mailing list dev@ranger.apache.org Received: (qmail 25827 invoked by uid 99); 3 Nov 2017 08:46:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2017 08:46:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D56EB1A5774 for ; Fri, 3 Nov 2017 08:46:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id gAshM-3VRUnQ for ; Fri, 3 Nov 2017 08:46:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B7EA861140 for ; Fri, 3 Nov 2017 08:46:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 90F59E095A for ; Fri, 3 Nov 2017 08:46:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6F8D5241C3 for ; Fri, 3 Nov 2017 08:46:01 +0000 (UTC) Date: Fri, 3 Nov 2017 08:46:01 +0000 (UTC) From: "peng.jianhua (JIRA)" To: dev@ranger.apache.org Message-ID: In-Reply-To: References: 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Nov 2017 08:46:07 -0000 [ https://issues.apache.org/jira/browse/RANGER-1860?page=3Dcom.atlassi= an.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 f= unction, 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 promp= t function, the result is that the codes have worse maintainability. > {code} > if(!isPolicyForm) { > =09if(v.name =3D=3D 'yarn.url'){ > =09=09formObj.type =3D 'TextFiledWithIcon'; > =09=09formObj.errorMsg =3D localization.tt("hintMsg.yarnRestUrl"); > =09}else if(v.name =3D=3D 'sqoop.url'){ > =09=09formObj.type =3D 'TextFiledWithIcon'; > =09=09formObj.errorMsg =3D localization.tt("hintMsg.sqoopRestUrl"); > =09}else if(v.name =3D=3D 'jdbc.url'){ > =09=09formObj.type =3D 'TextFiledWithIcon'; > =09=09formObj.errorMsg =3D localization.tt("hintMsg.hiveJDBCUrl"); > =09}else if(v.name =3D=3D 'fs.default.name'){ > =09=09formObj.type =3D 'TextFiledWithIcon'; > =09=09formObj.errorMsg =3D localization.tt("hintMsg.hdfsNameNodeUrl"); > =09}else{ > =09=09formObj.type =3D 'Text'; > =09} > =09break; > } > {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 fol= lowing configuration to meet following requirements:=20 > the configuration in the ranger-servicedef-yarn.json is as follows=EF=BC= =9A > {code} > "configs":=20 > [ > =09{ > =09=09"itemId": 3, > =09=09"name": "yarn.url", > =09=09"type": "string", > =09=09"mandatory": true, > =09=09"defaultValue": "", > =09=09"validationRegEx":"", > =09=09"validationMessage": "", > =09=09"uiHint":"{\"TextFiledWithIcon\":true, \"info\": \"1.For one url, e= g.
'http or https://<ipaddr>:8088'
2.For multiple urls (use , o= r ; delimiter), eg.
'http://<ipaddr1>:8088,http://<ipaddr2>:= 8088'\"}", > =09=09"label": "YARN REST URL" > =09} > ] > {code} > requirements:=20 > adding text field with an icon( i.e information) on service form page,we = should add unified configuration management functions in the service defini= tion. -- This message was sent by Atlassian JIRA (v6.4.14#64029)