Repository: ambari
Updated Branches:
  refs/heads/trunk 1485e3f04 -> 7af320663


AMBARI-14852. Capacity Scheduler View - Provide dropdown for scheduling 
calculator. (Akhil PB via dipayanb)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7af32066
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7af32066
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7af32066

Branch: refs/heads/trunk
Commit: 7af320663005f1c07d8f3973be501a704bac0e17
Parents: 1485e3f
Author: Dipayan Bhowmick <dipayan.bhowm...@gmail.com>
Authored: Fri Feb 26 13:04:55 2016 +0530
Committer: Dipayan Bhowmick <dipayan.bhowm...@gmail.com>
Committed: Fri Feb 26 13:05:47 2016 +0530

----------------------------------------------------------------------
 .../src/main/resources/ui/app/controllers/queues.js   | 14 +++++++++++++-
 .../src/main/resources/ui/app/styles/application.less |  4 ++++
 .../resources/ui/app/templates/schedulerPanel.hbs     | 10 ++++++++--
 3 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7af32066/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
index 416ff43..4aeb442 100644
--- 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
+++ 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
@@ -416,5 +416,17 @@ App.QueuesController = Ember.ArrayController.extend({
     })
 
     return hasInvalidMapping;
-  
}.property('scheduler.queue_mappings','content.length','content.@each.capacity')
+  
}.property('scheduler.queue_mappings','content.length','content.@each.capacity'),
+
+  /**
+   * Resource calculator dropdown options
+   */
+  resourceCalculatorValues: [{
+    label: 'Default Resource Calculator',
+    value: 'org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator'
+  }, {
+    label: 'Dominant Resource Calculator',
+    value: 'org.apache.hadoop.yarn.util.resource.DominantResourceCalculator'
+  }]
+
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/7af32066/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
----------------------------------------------------------------------
diff --git 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
index 69fb96f..cd7de10 100644
--- 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
+++ 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
@@ -204,6 +204,10 @@
         }
       }
     }
+    .input-resource-calc {
+       width: 85%;
+       display: inline-block;
+    }
   }
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7af32066/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
----------------------------------------------------------------------
diff --git 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
index 4419aa0..22bff46 100644
--- 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
+++ 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
@@ -106,10 +106,16 @@
             {{tooltip-label
               label='Calculator'
               class="col-xs-5 control-label"
-              message='The method by which the scheduler calculates resource 
capacity across resource types.'
+              message='The method by which the scheduler calculates resource 
capacity across resource types. <br/> Default Resource Calculator allocates 
resources based on memory alone. <br/> Dominant Resource Calculator allocates 
resources based on memory, cpu etc.'
             }}
             <div class="col-xs-7 control-value">
-              {{expandable-input value=scheduler.resource_calculator 
class="input-sm form-control input-expand"}}
+              {{view Ember.Select
+                class="form-control input-sm input-resource-calc"
+                content=resourceCalculatorValues
+                optionLabelPath="content.label"
+                optionValuePath="content.value"
+                value=scheduler.resource_calculator
+              }}
               {{#if schedulerDirtyFilelds.resource_calculator}}
                 <div class="btn-group btn-group-xs" >
                     <a {{action 'rollbackProp' 'resource_calculator' 
scheduler}} href="#" class="btn btn-default btn-warning"><i class="fa 
fa-undo"></i></a>

Reply via email to