You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Peter Radden (Jira)" <ji...@apache.org> on 2019/09/24 16:03:00 UTC
[jira] [Comment Edited] (NIFI-6705)
getSupportedDynamicPropertyDescriptor return PD with non-matching name
[ https://issues.apache.org/jira/browse/NIFI-6705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16936943#comment-16936943 ]
Peter Radden edited comment on NIFI-6705 at 9/24/19 4:02 PM:
-------------------------------------------------------------
My suggestion would be to change the "add" function in jquery.propertytable.js (nifi-web-ui)
so that addItem uses the descriptor.name and descriptor.displayName
{code:java}
propertyData.addItem({
id: id,
hidden: false,
property: descriptor.name,
displayName: descriptor.displayName,
previousValue: null,
value: null,
type: 'userDefined'
});{code}
and to move the existence check until after the descriptor has been retrieved
(to ensure no duplicates based on the resulting descriptor name).
was (Author: peterr):
My suggestion would be to change the "add" function in jquery.propertytable.js (nifi-web-ui)
so that addItem uses the descriptor.name and descriptor.displayName
propertyData.addItem({
id: id,
hidden: false,
property: *descriptor.name*,
displayName: *descriptor.displayName*,
previousValue: null,
value: null,
type: 'userDefined'
});
and to move the existence check until after the descriptor has been retrieved
(to ensure no duplicates based on the resulting descriptor name).
> getSupportedDynamicPropertyDescriptor return PD with non-matching name
> ----------------------------------------------------------------------
>
> Key: NIFI-6705
> URL: https://issues.apache.org/jira/browse/NIFI-6705
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework, Core UI
> Affects Versions: 1.9.2
> Reporter: Peter Radden
> Priority: Minor
>
> If I want to allow a dynamic property to be case-insensitive, the obvious way would seem to be for the getSupportedDynamicPropertyDescriptor to return a PropertyDescriptor with lower-case name as in this:
> {code:java}
> public PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String name)
> {
> final String lowerName = name.toLowerCase();
> if (lowerName.equals("somename"))
> {
> return new PropertyDescriptor.Builder()
> .name(lowerName)
> .addValidator(Validator.VALID)
> .build();
> }
> ...
> }{code}
> Entering the lower-case name explicitly is fine, but if any other casing is used, the UI breaks, and the property is not added.
> My feeling is that the name provided by the PropertyDescriptor should override the provided name.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)