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 4C7F011C6A for ; Wed, 10 Sep 2014 11:40:33 +0000 (UTC) Received: (qmail 14557 invoked by uid 500); 10 Sep 2014 11:40:33 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 14525 invoked by uid 500); 10 Sep 2014 11:40:33 -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 14511 invoked by uid 99); 10 Sep 2014 11:40:32 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2014 11:40:32 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 804331DD5ED; Wed, 10 Sep 2014 11:40:31 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3163717121832684306==" MIME-Version: 1.0 Subject: Re: Review Request 25480: Views : support for a property From: "Tom Beerbower" To: "Nate Cole" , "Jonathan Hurley" Cc: "Ambari" , "Tom Beerbower" Date: Wed, 10 Sep 2014 11:40:31 -0000 Message-ID: <20140910114031.23924.37161@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Tom Beerbower" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/25480/ X-Sender: "Tom Beerbower" References: <20140910041401.23924.23627@reviews.apache.org> In-Reply-To: <20140910041401.23924.23627@reviews.apache.org> Reply-To: "Tom Beerbower" X-ReviewRequest-Repository: ambari --===============3163717121832684306== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Sept. 10, 2014, 4:14 a.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java, line 117 > > > > > > Was there a reason that you chose to make this a character? The other entities that need to represent a boolean use a SMALLINT. > > Tom Beerbower wrote: > Thanks for the review. The other view entities all use character. Should I change just this one to SMALLINT or change them all now? Changing the others will need to include changes to the upgrade script. If it's okay, I'll fix this one case and open another Jira to fix the existing char / boolean columns. - Tom ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25480/#review52817 ----------------------------------------------------------- On Sept. 9, 2014, 6 p.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25480/ > ----------------------------------------------------------- > > (Updated Sept. 9, 2014, 6 p.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: Ambari-7211 > https://issues.apache.org/jira/browse/Ambari-7211 > > > Repository: ambari > > > Description > ------- > > 1 Add support for a property in view.xml, which means the view is a system view and restricted to only admin access > 2 Set true in the Admin View view.xml > 3 The Admin View UI will recognize this property and totally hide the view (and it's instances) from the Admin View UI (i.e. it will not be shown on the Views section of the Admin View to avoid confusion). > 4 The view API will disable creating instances or setting privileges for any view with this prop. > > So end result: views that are system are meant to be AMBARI.ADMIN only and have their instances statically defined. The first usage of this is the ADMIN_VIEW. > > We might have to evolve this over time but think this would solve more than a few problems we are having with the fact Admin View is a view. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProvider.java d7c6a8f > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java ed9f06a > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java 073451d > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java 801249f > ambari-server/src/main/java/org/apache/ambari/server/view/configuration/ViewConfig.java 816c178 > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 59d972e > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 52ca857 > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 39d3ecf > ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 196d298 > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java fbeb0cc > ambari-server/src/test/java/org/apache/ambari/server/orm/entities/ViewEntityTest.java 977e01d > ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog170Test.java 9668ed5 > ambari-server/src/test/java/org/apache/ambari/server/view/configuration/ViewConfigTest.java 2ed365e > > Diff: https://reviews.apache.org/r/25480/diff/ > > > Testing > ------- > > Manual testing. > > New unit tests added. All pass ... > > Results : > > Tests run: 1975, Failures: 0, Errors: 0, Skipped: 16 > > ... > > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 41:21.741s > [INFO] Finished at: Tue Sep 09 13:47:17 EDT 2014 > [INFO] Final Memory: 45M/421M > [INFO] ------------------------------------------------------------------------ > > > Thanks, > > Tom Beerbower > > --===============3163717121832684306==--