You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Juanjo Marron <ju...@yahoo.com.INVALID> on 2015/05/19 19:59:36 UTC

Using theme framework on my own stack

Hi all, 

Im trying to use thenew theme framework on my own stack. The goal is to add the new lookand feel with slider controls in the configuration of myservices.

It seems to me that adding the themes directory,which includes the theme.json file on my stack service , and configuring this directoryon the service metainfo.xml should be correct,but I'm not able to see the slider controls on the installationwizard. This approach is not working for HDFS, which is the serviceI'm testing.

Do I need to add/modify something else on theambari-web module? Do I need to provide some endpoint for thetheme?

Thanks for your help 

Re: Using theme framework on my own stack

Posted by Juanjo Marron <ju...@yahoo.com.INVALID>.
Hi again,

My problem was some missing configuration properties on the .xml file of the service definition.

The previous steps mentioned by Srimantha re enough to enhance service configurations using the new theme framework.

Thanks again

Regards,
Juanjo Marron

  


     On Wednesday, May 20, 2015 4:39 PM, Juanjo Marron <ju...@yahoo.com.INVALID> wrote:
   

 Thanks Sgunturi,
It seems to me that following these steps should be correct:  
  - adding the themes directory, which includes the theme.json file, on my stack service 
  - configuring themes directory on the service metainfo.xml  
  - Editing -env.xml and -site.xml files to include the <value-attributes> for the required properties on the theme.json file
but I'm not able to see the new controls on the installation wizard for my services. This approach iscurrently working just for HDFS, but failing with for other services asHBASE or YARN.
I'm debugging the UI and hitting these errors:Error: <DS.StateManager:ember22432>could not respond to event setAssociation in state rootState.loading.Error: <DS.StateManager:ember6260>could not respond to event didChangeData in staterootState.loaded.updated.uncommitted.
I'm doing something wrong? Not changes are required on ambari-web module?

Regards,

Juanjo Marron
   


    On Wednesday, May 20, 2015 11:22 AM, Srimanth Gunturi <sg...@hortonworks.com> wrote:
  

 Hello,
This is work in progress, but you should be able to define a theme for your service and get enhanced configurations - with controls like Sliders, Combos, Toggles, etc.

The trunk builds already have theme based enhanced-configs for HDFS, YARN, MapReduce, Hive & HBase. These can be seen inside respective service folders of the stack definitions - https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/

Step 1) Define themes to use in metainfo.xml
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml#L93

Step 2) Create theme JSON file in themes/ folder. 
Theme should have 'configuration' object with properties 'layouts', 'placement' and 'widgets'. 'Layouts' determines the tabs and sections within respective tabs. It is the general layout of the configurations
'Placement' determines which configurations go into what sub-sections
'Widgets' determines which UI widgets to use for respective configs. Also, UI specific metadata can be specified here (like what units the value should be shown in - MB, GB, Days, etc.)
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json

Step 3) Define non-UI metadata for configs
Configs which are shown via a theme need some non-UI metadata defined on them. Things like <display-name>, and additional attributes about the value - like <minimum>, <maximum>, <increment-step> etc.
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml#L198

This should allow you to see enhanced-configurations for your service.
Hoping that helps.
Regards,
Srimanth


________________________________________
From: Juanjo Marron <ju...@yahoo.com.INVALID>
Sent: Tuesday, May 19, 2015 10:59 AM
To: dev@ambari.apache.org
Subject: Using theme framework on my own stack

Hi all,

Im trying to use thenew theme framework on my own stack. The goal is to add the new lookand feel with slider controls in the configuration of myservices.

It seems to me that adding the themes directory,which includes the theme.json file on my stack service , and configuring this directoryon the service metainfo.xml should be correct,but I'm not able to see the slider controls on the installationwizard. This approach is not working for HDFS, which is the serviceI'm testing.

Do I need to add/modify something else on theambari-web module? Do I need to provide some endpoint for thetheme?

Thanks for your help



  

Re: Using theme framework on my own stack

Posted by Juanjo Marron <ju...@yahoo.com.INVALID>.
Thanks Sgunturi,
It seems to me that following these steps should be correct:   
   - adding the themes directory, which includes the theme.json file, on my stack service 
   - configuring themes directory on the service metainfo.xml  
   - Editing -env.xml and -site.xml files to include the <value-attributes> for the required properties on the theme.json file
but I'm not able to see the new controls on the installation wizard for my services. This approach iscurrently working just for HDFS, but failing with for other services asHBASE or YARN.
I'm debugging the UI and hitting these errors:Error: <DS.StateManager:ember22432>could not respond to event setAssociation in state rootState.loading.Error: <DS.StateManager:ember6260>could not respond to event didChangeData in staterootState.loaded.updated.uncommitted.
I'm doing something wrong? Not changes are required on ambari-web module?

Regards,

Juanjo Marron
   


     On Wednesday, May 20, 2015 11:22 AM, Srimanth Gunturi <sg...@hortonworks.com> wrote:
   

 Hello,
This is work in progress, but you should be able to define a theme for your service and get enhanced configurations - with controls like Sliders, Combos, Toggles, etc.

The trunk builds already have theme based enhanced-configs for HDFS, YARN, MapReduce, Hive & HBase. These can be seen inside respective service folders of the stack definitions - https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/

Step 1) Define themes to use in metainfo.xml
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml#L93

Step 2) Create theme JSON file in themes/ folder. 
Theme should have 'configuration' object with properties 'layouts', 'placement' and 'widgets'. 'Layouts' determines the tabs and sections within respective tabs. It is the general layout of the configurations
'Placement' determines which configurations go into what sub-sections
'Widgets' determines which UI widgets to use for respective configs. Also, UI specific metadata can be specified here (like what units the value should be shown in - MB, GB, Days, etc.)
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json

Step 3) Define non-UI metadata for configs
Configs which are shown via a theme need some non-UI metadata defined on them. Things like <display-name>, and additional attributes about the value - like <minimum>, <maximum>, <increment-step> etc.
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml#L198

This should allow you to see enhanced-configurations for your service.
Hoping that helps.
Regards,
Srimanth


________________________________________
From: Juanjo Marron <ju...@yahoo.com.INVALID>
Sent: Tuesday, May 19, 2015 10:59 AM
To: dev@ambari.apache.org
Subject: Using theme framework on my own stack

Hi all,

Im trying to use thenew theme framework on my own stack. The goal is to add the new lookand feel with slider controls in the configuration of myservices.

It seems to me that adding the themes directory,which includes the theme.json file on my stack service , and configuring this directoryon the service metainfo.xml should be correct,but I'm not able to see the slider controls on the installationwizard. This approach is not working for HDFS, which is the serviceI'm testing.

Do I need to add/modify something else on theambari-web module? Do I need to provide some endpoint for thetheme?

Thanks for your help

  

Re: Using theme framework on my own stack

Posted by Srimanth Gunturi <sg...@hortonworks.com>.
Hello,
This is work in progress, but you should be able to define a theme for your service and get enhanced configurations - with controls like Sliders, Combos, Toggles, etc.

The trunk builds already have theme based enhanced-configs for HDFS, YARN, MapReduce, Hive & HBase. These can be seen inside respective service folders of the stack definitions - https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/

Step 1) Define themes to use in metainfo.xml
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/metainfo.xml#L93

Step 2) Create theme JSON file in themes/ folder. 
Theme should have 'configuration' object with properties 'layouts', 'placement' and 'widgets'. 'Layouts' determines the tabs and sections within respective tabs. It is the general layout of the configurations
'Placement' determines which configurations go into what sub-sections
'Widgets' determines which UI widgets to use for respective configs. Also, UI specific metadata can be specified here (like what units the value should be shown in - MB, GB, Days, etc.)
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json

Step 3) Define non-UI metadata for configs
Configs which are shown via a theme need some non-UI metadata defined on them. Things like <display-name>, and additional attributes about the value - like <minimum>, <maximum>, <increment-step> etc.
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/HBASE/configuration/hbase-site.xml#L198

This should allow you to see enhanced-configurations for your service.
Hoping that helps.
Regards,
Srimanth


________________________________________
From: Juanjo Marron <ju...@yahoo.com.INVALID>
Sent: Tuesday, May 19, 2015 10:59 AM
To: dev@ambari.apache.org
Subject: Using theme framework on my own stack

Hi all,

Im trying to use thenew theme framework on my own stack. The goal is to add the new lookand feel with slider controls in the configuration of myservices.

It seems to me that adding the themes directory,which includes the theme.json file on my stack service , and configuring this directoryon the service metainfo.xml should be correct,but I'm not able to see the slider controls on the installationwizard. This approach is not working for HDFS, which is the serviceI'm testing.

Do I need to add/modify something else on theambari-web module? Do I need to provide some endpoint for thetheme?

Thanks for your help