[ 
https://issues.apache.org/jira/browse/AMBARI-19249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15764757#comment-15764757
 ] 

sjampa commented on AMBARI-19249:
---------------------------------

Hi akovalenko,
  can you please provide me the information for handling the below scenario:
  
I have added the below code at 
"/opt/apache-ambari-2.2.2-src/ambari-web/public/javascripts/app.js" under:
"var hdp2properties = " section, like below:

  {
    "name": "ldap_ad_authentication",
    "value": "",
    "recommendedValue": "system",
    "options": [
      {
        displayName: 'system',
        hidden: false
      },
      {
        displayName: 'LDAP',
        hidden: false
      },
      {
        displayName: 'AD',
        hidden: false
      },
    ],
    "displayType": "radio button",
    "radioName": "ldap-ad-authentication",
    "serviceName": "AUTHSERVER",
    "filename": "ldap-ad-auth.xml",
    "category": "Advanced ldap-ad-auth",
    "index": 2
  },
  {
    "name": "content",
    "serviceName": "AUTHSERVER",
    "filename": "ldap-ad-auth.xml",
    "category": "Advanced ldap-ad-auth",
    "index": 3
  },
  
  I want to select the "system" radio option as default.
  How to set the default value?
  
  Also, if i try to select the radio options manually, i see the below error in 
the console:
  app.js:180958 Uncaught TypeError: Cannot read property '0' of null(…)
  Which is pointing to the "handleDBConnectionProperty"
  
  Also i need the test connection button to get enabled when we select the LDAP 
or AD radio options.
  The test connection should ideally take values from he config fields and 
should validate the connection to ldap server.

Your inputs are highly appreciated.

> Adding custom config property say radio button fields etc needs hardcoding in 
> various places
> --------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-19249
>                 URL: https://issues.apache.org/jira/browse/AMBARI-19249
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-web
>    Affects Versions: 2.2.2
>            Reporter: sjampa
>             Fix For: 2.5.0
>
>
> Steps for creating a configuration property with radio button options. 
> Something similar to what we have it for “hive database” selection under hive 
> config tab. This needs hard-coding in multiple places like say i want to add 
> a field like below with radio options:
> Example:
> custom_database: 
> o   Mysql
> o   Postgres
> o   Mssql
> The below link will give info on customizing only the first Tab:
> https://cwiki.apache.org/confluence/display/AMBARI/Enhanced+Configs
> For Advanced Tab:
> So far I found one file with references to the fields under Advanced Tab:
> “/opt/apache-ambari-2.2.2-src/ambari-web/public/javascripts/app.js”
> Its better to have some documentation steps as an initial draft for the users 
> to add these fields, also about the "test connection" button. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to