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 <[email protected]>
Sent: Tuesday, May 19, 2015 10:59 AM
To: [email protected]
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

Reply via email to