[
https://issues.apache.org/jira/browse/AMBARI-11606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sangeeta Ravindran resolved AMBARI-11606.
-----------------------------------------
Resolution: Cannot Reproduce
> When adding a value-added service, if you navigate back from the review step,
> displayType of some fields gets incorrectly set
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: AMBARI-11606
> URL: https://issues.apache.org/jira/browse/AMBARI-11606
> Project: Ambari
> Issue Type: Bug
> Components: ambari-web
> Affects Versions: 2.1.0
> Reporter: Sangeeta Ravindran
>
> While adding a value added service (that is not part of the service stack) to
> a new or existing cluster, if you navigate back from installer/step 8 or
> service/add/step6, the displayType for the fields of add-on services is set
> to "advanced". This becomes a problem for certain fields for e.g. password
> fields, because the field is then no longer masked and passwords are visible
> in clear text because the displayType "password" was overwritten to
> "advanced".
> This happens because the add-on service properties are not included in the
> site_properties file under ambari-web/app/data/<stack_version> and hence not
> considered as pre-defined properties. They are instead treated like user
> properties and the type is set to "advanced".
> Specifically the type is getting overwritten in the following block of code
> in
> addUserProperty ambari-web/app/util/config.js
> var
> skipAttributeChanges = {
> displayType: ['ignore_groupsusers_create'],
> displayName: ['ignore_groupsusers_create', 'smokeuser', 'user_group',
> 'mapred_user', 'zk_user']
> },
> configData = {
> id: stored.id,
> name: stored.name,
> displayName: skipAttributeChanges.displayName.contains(stored.name) ?
> this.getOriginalConfigAttribute(stored, 'displayName',
> advancedConfigs) : App.format.normalizeName(stored.name),
> serviceName: stored.serviceName,
> value: stored.value,
> defaultValue: stored.defaultValue,
> displayType: skipAttributeChanges.displayType.contains(stored.name) ?
> this.getOriginalConfigAttribute(stored, 'displayType',
> advancedConfigs) :
> (stringUtils.isSingleLine(stored.value) ? 'advanced' : 'multiLine'),
> filename: stored.filename,
> isUserProperty: stored.isUserProperty === true,
> hasInitialValue: !!stored.hasInitialValue,
> isOverridable: true,
> overrides: stored.overrides,
> isRequired: false,
> isVisible: stored.isVisible,
> isFinal: stored.isFinal,
> defaultIsFinal: stored.defaultIsFinal,
> supportsFinal: stored.supportsFinal,
> showLabel: stored.showLabel !== false,
> category: stored.category
> };
> The displayType should be not be set to 'advanced' or 'multiLine' if it has a
> specific type set.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)