Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 72457180AF for ; Tue, 9 Feb 2016 19:39:05 +0000 (UTC) Received: (qmail 69986 invoked by uid 500); 9 Feb 2016 19:38:53 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 69957 invoked by uid 500); 9 Feb 2016 19:38:53 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 69946 invoked by uid 99); 9 Feb 2016 19:38:52 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2016 19:38:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 509D1C0B24 for ; Tue, 9 Feb 2016 19:38:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.798 X-Spam-Level: X-Spam-Status: No, score=0.798 tagged_above=-999 required=6.31 tests=[FSL_HELO_BARE_IP_2=1.499, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id W33psi9UpBzu for ; Tue, 9 Feb 2016 19:38:51 +0000 (UTC) Received: from relayvx12c.securemail.intermedia.net (relayvx12c.securemail.intermedia.net [64.78.52.187]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id B8F7043F58 for ; Tue, 9 Feb 2016 19:38:50 +0000 (UTC) Received: from securemail.intermedia.net (localhost [127.0.0.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by emg-ca-1-2.localdomain (Postfix) with ESMTPS id 0431753E35; Tue, 9 Feb 2016 11:38:50 -0800 (PST) Subject: Re: Redefine Themes and Themes inheritance MIME-Version: 1.0 x-echoworx-msg-id: b33306eb-a4a1-4149-9291-8bb1e5636a46 x-echoworx-emg-received: Tue, 9 Feb 2016 11:38:49.951 -0800 x-echoworx-message-code-hashed: 70faa02089ad7c3d3c5559863deae332a633960eb9a8954836b06c304d1625ce x-echoworx-action: delivered Received: from 10.254.155.17 ([10.254.155.17]) by emg-ca-1-2 (JAMES SMTP Server 2.3.2) with SMTP ID 888; Tue, 9 Feb 2016 11:38:49 -0800 (PST) Received: from MBX080-W4-CO-2.exch080.serverpod.net (unknown [10.224.117.102]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by emg-ca-1-2.localdomain (Postfix) with ESMTPS id BA34053E35; Tue, 9 Feb 2016 11:38:49 -0800 (PST) Received: from MBX080-W4-CO-2.exch080.serverpod.net (10.224.117.102) by MBX080-W4-CO-2.exch080.serverpod.net (10.224.117.102) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Tue, 9 Feb 2016 11:38:48 -0800 Received: from MBX080-W4-CO-2.exch080.serverpod.net ([10.224.117.102]) by mbx080-w4-co-2.exch080.serverpod.net ([10.224.117.102]) with mapi id 15.00.1130.005; Tue, 9 Feb 2016 11:38:48 -0800 From: Srimanth Gunturi To: Ambari , Juanjo Marron Thread-Topic: Redefine Themes and Themes inheritance Thread-Index: AQHRYt51/+NOcbhp5E6Ol2U+H9nB1J8kDoQ8 Date: Tue, 9 Feb 2016 19:38:48 +0000 Message-ID: <1455046728351.20114@hortonworks.com> References: <853135359.1004405.1454983561712.JavaMail.yahoo.ref@mail.yahoo.com>,<853135359.1004405.1454983561712.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <853135359.1004405.1454983561712.JavaMail.yahoo@mail.yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [192.175.27.10] x-source-routing-agent: Processed Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, The way merging with parent themes happens is by the 'name' property for la= youts, and 'config' property for placements and widgets. Which means that you can override in a child the entire layout, tab, sectio= n, sub-section defined in the parent.=20 You can also change and delete the placements of configs. You can also change the type of widgets for a config. So getting back to your questions: > 1. Is there any way to add a new section and configurations to display on= an existing themes file? Yes - can you please try in your child theme to define a layout and tab wit= h the same 'name' as parent, and then add a section with a new 'name'. If you want to remove a section, subsection, etc. from the parent, just def= ine it in the child with same name, but with empty values. > Does the new one defined in common services overwrite the stack inherited= one? Themes are only defined in the stacks/ folder - not in common-services... s= o you would not hit this situation. If you are still unable to get it to work, maybe you can share the exceptio= n, and maybe the parent and child themes. Hope this helps. Regards, Srimanth ________________________________________ From: Juanjo Marron Sent: Monday, February 08, 2016 6:06 PM To: Ambari Subject: Redefine Themes and Themes inheritance Hi all, Couple of questions related with themes inheritance and redefinition: 1. Is there any way to add a new section and configurations to display on a= n existing themes file? For HBASE in HDP stack I saw initial themes is defined in 2.2 stack and in = 2.3 some configuration/widgets are removed (pointed to null). For RANGER, two theme files are defined with different name for HDP 2.2 (th= eme_version_1.json) and HDP 2.3 (theme_version_2,.json). New section, prope= rties and widget are added in version_2 compared with version_1. My doubt is, is it possible to overwrite theme.json file to add new subsect= ion similar to the merge process .xml files are doing or it needs to be com= plete redefined? 2. How is the design for merging theme.json file? In case a service has some theme.json file inherited from the previous stac= k (stack inheritance) and the new stack version also extends a common-servi= ce definition with themes on it (service inheritance). Are they merged? Doe= s the new one defined in common services overwrite the stack inherited one? A good example could be if HBASE in HDP 2.3 extends a new common-service de= finition (lets say 1.2.0.2.3) with a new theme definition, and HDP 2.3 rece= ives also a theme file from previous HDP 2.2 stack inheritance. I'm facing java errors when trying to merge theme.json files with a scenari= o similar to the one detailed below. Im not sure if the java code (org.apa= che.ambari.server.state.theme.Section.mergeWithParent) is supporting this d= ouble inheritance stack& service for theme .json files. Does anyone have some insight on it? Thanks for your help