incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject svn commit: r1467085 - in /incubator/ambari/trunk: ./ ambari-web/app/templates/common/configs/ ambari-web/app/templates/main/host/ ambari-web/app/views/common/configs/ ambari-web/app/views/main/host/
Date Thu, 11 Apr 2013 21:08:01 GMT
Author: srimanth
Date: Thu Apr 11 21:08:00 2013
New Revision: 1467085

URL: http://svn.apache.org/r1467085
Log:
AMBARI-1896. Disable editing Capacity Scheduler on host configs. (srimanth)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
    incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs
    incubator/ambari/trunk/ambari-web/app/templates/main/host/configs_service.hbs
    incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js
    incubator/ambari/trunk/ambari-web/app/views/main/host/configs_service.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1467085&r1=1467084&r2=1467085&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Apr 11 21:08:00 2013
@@ -692,6 +692,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1896. Disable editing Capacity Scheduler on host configs. (srimanth)
+
  AMBARI-1894. Refactor configs of Capacity Scheduler category. (srimanth)
 
  AMBARI-1893. Parsing new alerts format fails. (srimanth)

Modified: incubator/ambari/trunk/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/common/configs/capacity_scheduler.hbs?rev=1467085&r1=1467084&r2=1467085&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
(original)
+++ incubator/ambari/trunk/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
Thu Apr 11 21:08:00 2013
@@ -26,7 +26,9 @@
         <div class="row-fluid header">
             <div class="span1">{{t services.mapReduce.config.queue.header}}</div>
             <div class="offset9 span2">
-                <div class="btn pull-right" {{action queuePopup target="view"}}>{{t
services.mapReduce.config.addQueue}}</div>
+                {{#if view.canEdit}}
+                    <div class="btn pull-right" {{action queuePopup target="view"}}>{{t
services.mapReduce.config.addQueue}}</div>
+                {{/if}}
             </div>
         </div>
         <div>

Modified: incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs?rev=1467085&r1=1467084&r2=1467085&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/common/configs/service_config.hbs Thu
Apr 11 21:08:00 2013
@@ -47,7 +47,7 @@
 <div class="accordion">
   {{#each category in selectedService.configCategories}}
     {{#if category.isCustomView}}
-      {{view category.customView categoryBinding="category" serviceBinding="selectedService"
serviceConfigsBinding="selectedService.configs"}}
+      {{view category.customView categoryBinding="category" serviceBinding="selectedService"
canEditBinding="view.canEdit" serviceConfigsBinding="selectedService.configs"}}
     {{else}}
     {{#view App.ServiceConfigsByCategoryView categoryBinding="category" canEditBinding="view.canEdit"
serviceBinding="selectedService" serviceConfigsBinding="selectedService.configs"}}
 

Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host/configs_service.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host/configs_service.hbs?rev=1467085&r1=1467084&r2=1467085&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host/configs_service.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host/configs_service.hbs Thu Apr
11 21:08:00 2013
@@ -22,7 +22,7 @@
       {{view App.FilterComboboxView filterBinding="controller.filter" columnsBinding="controller.filterColumns"
}}
     </div>
     <div class="clearfix"></div>
-    {{view App.ServiceConfigView canEditBinding="false" filterBinding="controller.filter"
columnsBinding="controller.filterColumns"}}
+    {{view App.ServiceConfigView canEditBinding="view.isConfigsEditable" filterBinding="controller.filter"
columnsBinding="controller.filterColumns"}}
   {{else}}
     <div class="spinner"></div>
   {{/if}}

Modified: incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js?rev=1467085&r1=1467084&r2=1467085&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js Thu Apr
11 21:08:00 2013
@@ -524,11 +524,7 @@ App.ServiceConfigCapacityScheduler = App
     return this.get('categoryConfigs').filterProperty('isQueue', undefined) || [];
   }.property('categoryConfigs.@each'),
   didInsertElement: function(){
-    var isCollapsed = (this.get('category.name').indexOf('Advanced') != -1);
-    this.set('category.isCollapsed', isCollapsed);
-    if(isCollapsed){
-      this.$('.accordion-body').hide();
-    }
+    this._super();
     this.createEmptyQueue(this.get('customConfigs').filterProperty('isQueue'));
   },
   //list of fields which will be populated by default in a new queue
@@ -831,7 +827,7 @@ App.ServiceConfigCapacityScheduler = App
         if(queueName){
           this.set('header', Em.I18n.t('services.mapReduce.config.editQueue'));
           this.set('secondary', Em.I18n.t('common.save'));
-          if(self.get('queues').length > 1){
+          if(self.get('queues').length > 1 && self.get('canEdit')){
             this.set('delete', Em.I18n.t('common.delete'));
           }
         }
@@ -841,6 +837,9 @@ App.ServiceConfigCapacityScheduler = App
       primary: Em.I18n.t('common.cancel'),
       delete: null,
       isError: function(){
+        if(!self.get('canEdit')){
+          return true;
+        }
         var content = this.get('content');
         var configs = content.configs.filter(function(config){
           if((config.name == 'mapred.queue.' + content.name + '.acl-submit-job' ||
@@ -1041,6 +1040,7 @@ App.ServiceConfigCapacityScheduler = App
           }.observes('value'),
           isRequired: true,
           isVisible: true,
+          isEditable: self.get('canEdit'),
           index: 0
         });
         newField.validate();
@@ -1055,6 +1055,7 @@ App.ServiceConfigCapacityScheduler = App
           isVisible: true,
           type: 'USERS',
           displayType: "UNIXList",
+          isEditable: self.get('canEdit'),
           index: 3
         });
 
@@ -1067,6 +1068,7 @@ App.ServiceConfigCapacityScheduler = App
           isVisible: true,
           "displayType": "UNIXList",
           type: 'GROUPS',
+          isEditable: self.get('canEdit'),
           index: 4
         });
 
@@ -1079,6 +1081,7 @@ App.ServiceConfigCapacityScheduler = App
           isVisible: true,
           type: 'USERS',
           displayType: "UNIXList",
+          isEditable: self.get('canEdit'),
           index: 5
         });
 
@@ -1091,6 +1094,7 @@ App.ServiceConfigCapacityScheduler = App
           isVisible: true,
           "displayType": "UNIXList",
           type: 'GROUPS',
+          isEditable: self.get('canEdit'),
           index: 6
         });
 

Modified: incubator/ambari/trunk/ambari-web/app/views/main/host/configs_service.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host/configs_service.js?rev=1467085&r1=1467084&r2=1467085&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host/configs_service.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host/configs_service.js Thu Apr 11 21:08:00
2013
@@ -23,6 +23,7 @@ App.MainHostServiceConfigsView = Em.View
     var controller = this.get('controller');
     controller.loadStep();
   },
+  isConfigsEditable: false,
   content: function () {
     return App.router.get('mainHostDetailsController.content');
   }.property('App.router.mainHostDetailsController.content')



Mime
View raw message