diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json index 7dcf388958..879df6b9fa 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-abfs.json @@ -118,7 +118,8 @@ "name": "ip-range", "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerIpMatcher", "label": "IP Address Range", - "description": "IP Address Range" + "description": "IP Address Range", + "uiHint" : "{ \"isMultiValue\":true }" } ] } \ No newline at end of file diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-kafka.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-kafka.json index 2f511eff52..b169c6ba93 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-kafka.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-kafka.json @@ -239,9 +239,9 @@ }, "validationRegEx":"", "validationMessage":"", - "uiHint":"", "label":"IP Address Range", - "description":"IP Address Range" + "description":"IP Address Range", + "uiHint" : "{ \"isMultiValue\":true }" } ] } diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-knox.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-knox.json index 410b9ef58c..ee44687b4e 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-knox.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-knox.json @@ -135,9 +135,9 @@ "evaluatorOptions": { }, "validationRegEx":"", "validationMessage": "", - "uiHint":"", "label": "IP Address Range", - "description": "IP Address Range" + "description": "IP Address Range", + "uiHint" : "{ \"isMultiValue\":true }" } ] } diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json index 4b899736bf..13915130c4 100755 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-ozone.json @@ -254,9 +254,9 @@ "evaluatorOptions": { }, "validationRegEx":"", "validationMessage": "", - "uiHint":"", "label": "IP Address Range", - "description": "IP Address Range" + "description": "IP Address Range", + "uiHint" : "{ \"isMultiValue\":true }" } ] diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-schema-registry.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-schema-registry.json index 987a50fc54..bdebf406db 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-schema-registry.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-schema-registry.json @@ -264,9 +264,9 @@ }, "validationRegEx":"", "validationMessage":"", - "uiHint":"", "label":"IP Address Range", - "description":"IP Address Range" + "description":"IP Address Range", + "uiHint" : "{ \"isMultiValue\":true }" } ] diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-solr.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-solr.json index de33998457..50545f7449 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-solr.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-solr.json @@ -188,9 +188,9 @@ }, "validationRegEx":"", "validationMessage":"", - "uiHint":"", "label":"IP Address Range", - "description":"IP Address Range" + "description":"IP Address Range", + "uiHint" : "{ \"isMultiValue\":true }" } ] diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-tag.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-tag.json index 7cb523075f..add29feed4 100644 --- a/agents-common/src/main/resources/service-defs/ranger-servicedef-tag.json +++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-tag.json @@ -88,7 +88,8 @@ "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerScriptConditionEvaluator", "evaluatorOptions" : {"engineName":"JavaScript", "ui.isMultiline":"true"}, "label":"Enter boolean expression", - "description": "Boolean expression" + "description": "Boolean expression", + "uiHint" : "{ \"isMultiline\":true }" } ] } diff --git a/security-admin/src/main/webapp/react-webapp/src/components/Editable.jsx b/security-admin/src/main/webapp/react-webapp/src/components/Editable.jsx index 7dd32ebaa5..34eb8c5fad 100644 --- a/security-admin/src/main/webapp/react-webapp/src/components/Editable.jsx +++ b/security-admin/src/main/webapp/react-webapp/src/components/Editable.jsx @@ -17,7 +17,13 @@ * under the License. */ -import React, { useEffect, useReducer, useRef, useState, useCallback } from "react"; +import React, { + useEffect, + useReducer, + useRef, + useState, + useCallback +} from "react"; import { OverlayTrigger, Popover, @@ -27,13 +33,14 @@ import { Col, Badge } from "react-bootstrap"; -import { findIndex, isArray } from "lodash"; +import { find, findIndex, isArray, isEmpty, map } from "lodash"; import { isObject } from "Utils/XAUtils"; import CreatableSelect from "react-select/creatable"; import Select from "react-select"; import { InfoIcon } from "../utils/XAUtils"; import { RegexMessage } from "../utils/XAMessages"; +const esprima = require("esprima"); const TYPE_SELECT = "select"; const TYPE_CHECKBOX = "checkbox"; const TYPE_INPUT = "input"; @@ -75,7 +82,7 @@ const CheckboxComp = (props) => { return ( <> - {options.map((obj) => ( + {options.map((obj, index) => (