----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38420/#review100133 -----------------------------------------------------------
Ship it! Ship It! - Yusaku Sako On Sept. 16, 2015, 7:45 a.m., Nitiraj Rathore wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38420/ > ----------------------------------------------------------- > > (Updated Sept. 16, 2015, 7:45 a.m.) > > > Review request for Ambari, Srimanth Gunturi, Sid Wagle, and Yusaku Sako. > > > Bugs: AMBARI-13110 > https://issues.apache.org/jira/browse/AMBARI-13110 > > > Repository: ambari > > > Description > ------- > > Before : > In capacity-scheduler of ambari view there is a "Access Control and Status". > This section currently allows to change permissions even if Ranger is enabled > on the Yarn. > > After Patch : > This section will not be visible on UI if Ranger is enabled for Yarn and a > message will show that "Permissions are managed by Ranger." > > Changes in Patch : > 1. created new ember controller, model and adapter for 'config'. config is > model which will hold 'siteName', 'configName' and 'configValue' fetched from > server. > 2. created a REST method getConfigurationValue(siteName,configName) > ambari/contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java > it returns a json containing array of matching values. > currently it returns only one value in the array. > 3. Ranger is enabled or not is fetched into client side with siteName = > ranger-yarn-plugin-properties and configName = ranger-yarn-plugin-enabled in > the file router.js in the model of QueuesRoute > and set to a property in configs Controller. > 4. queueController uses the property in configs Controller to show or not the > ACL div on UI > > > Diffs > ----- > > > contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java > 968f212 > contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js > dd02587 > contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers.js > 0101a82 > > contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/configs.js > PRE-CREATION > > contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js > 77f8889 > contrib/views/capacity-scheduler/src/main/resources/ui/app/models.js > 89bbdaa > contrib/views/capacity-scheduler/src/main/resources/ui/app/models/config.js > PRE-CREATION > contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js > 9aa7f60 > contrib/views/capacity-scheduler/src/main/resources/ui/app/router.js > 97473fb > contrib/views/capacity-scheduler/src/main/resources/ui/app/serializers.js > eaa604d > > contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queue.hbs > a6fdfd7 > > contrib/views/capacity-scheduler/src/test/java/org/apache/ambari/view/capacityscheduler/ConfigurationServiceTest.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/38420/diff/ > > > Testing > ------- > > Java test cases added using EasyMock and Junit to test the > getConfigurationValue method -- > /Users/nrathore/development/ambari/contrib/views/capacity-scheduler/src/test/java/org/apache/ambari/view/capacityscheduler/ConfigurationServiceTest.java > > manual functionality test UI shows the property is fetched properly and the > UI is enabled/disabled based on the ranger > > > Thanks, > > Nitiraj Rathore > >
