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 4392011DF5 for ; Tue, 9 Sep 2014 18:00:08 +0000 (UTC) Received: (qmail 70768 invoked by uid 500); 9 Sep 2014 18:00:08 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 70737 invoked by uid 500); 9 Sep 2014 18:00:08 -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 70710 invoked by uid 99); 9 Sep 2014 18:00:07 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2014 18:00:07 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 149791DD4D8; Tue, 9 Sep 2014 18:00:06 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4343344577461128351==" MIME-Version: 1.0 Subject: Review Request 25480: Views : support for a property From: "Tom Beerbower" To: "Nate Cole" , "Jonathan Hurley" Cc: "Ambari" , "Tom Beerbower" Date: Tue, 09 Sep 2014 18:00:06 -0000 Message-ID: <20140909180006.23923.25027@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" Reply-To: "Tom Beerbower" X-ReviewRequest-Repository: ambari --===============4343344577461128351== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25480/ ----------------------------------------------------------- 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 --===============4343344577461128351==--