mirror of https://github.com/apache/nifi.git
NIFI-8270: Fixed issue to show property dependent on default value of another
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #4860.
This commit is contained in:
parent
7876f412fb
commit
0d473bacf6
|
@ -1556,8 +1556,8 @@ public final class DtoFactory {
|
|||
orderedProperties.putAll(sortedProperties);
|
||||
|
||||
// build the descriptor and property dtos
|
||||
dto.setDescriptors(new LinkedHashMap<String, PropertyDescriptorDTO>());
|
||||
dto.setProperties(new LinkedHashMap<String, String>());
|
||||
dto.setDescriptors(new LinkedHashMap<>());
|
||||
dto.setProperties(new LinkedHashMap<>());
|
||||
for (final Map.Entry<PropertyDescriptor, String> entry : orderedProperties.entrySet()) {
|
||||
final PropertyDescriptor descriptor = entry.getKey();
|
||||
|
||||
|
@ -1568,6 +1568,8 @@ public final class DtoFactory {
|
|||
String propertyValue = entry.getValue();
|
||||
if (propertyValue != null && descriptor.isSensitive()) {
|
||||
propertyValue = SENSITIVE_VALUE_MASK;
|
||||
} else if (propertyValue == null && descriptor.getDefaultValue() != null) {
|
||||
propertyValue = descriptor.getDefaultValue();
|
||||
}
|
||||
|
||||
// set the property value
|
||||
|
@ -1636,8 +1638,8 @@ public final class DtoFactory {
|
|||
orderedProperties.putAll(sortedProperties);
|
||||
|
||||
// build the descriptor and property dtos
|
||||
dto.setDescriptors(new LinkedHashMap<String, PropertyDescriptorDTO>());
|
||||
dto.setProperties(new LinkedHashMap<String, String>());
|
||||
dto.setDescriptors(new LinkedHashMap<>());
|
||||
dto.setProperties(new LinkedHashMap<>());
|
||||
for (final Map.Entry<PropertyDescriptor, String> entry : orderedProperties.entrySet()) {
|
||||
final PropertyDescriptor descriptor = entry.getKey();
|
||||
|
||||
|
@ -1649,6 +1651,8 @@ public final class DtoFactory {
|
|||
String propertyValue = entry.getValue();
|
||||
if (propertyValue != null && descriptor.isSensitive()) {
|
||||
propertyValue = SENSITIVE_VALUE_MASK;
|
||||
} else if (propertyValue == null && descriptor.getDefaultValue() != null) {
|
||||
propertyValue = descriptor.getDefaultValue();
|
||||
}
|
||||
|
||||
// set the property value
|
||||
|
|
Loading…
Reference in New Issue