This is an automated email from the ASF dual-hosted git repository.
jonathanhurley pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new c540bb2 [AMBARI-24296] Yarn Queue manager is allowing to Create a
Child Queue for queue-mappings enabled Queue and Save it (#1776)
c540bb2 is described below
commit c540bb2d0ccca61f1ae689e189e7b3d5c0caece5
Author: Akhil S Naik <[email protected]>
AuthorDate: Tue Oct 23 21:47:38 2018 +0530
[AMBARI-24296] Yarn Queue manager is allowing to Create a Child Queue for
queue-mappings enabled Queue and Save it (#1776)
---
.../src/main/resources/ui/app/controllers/queues.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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 ed2f60e..3f0f26c 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
@@ -407,14 +407,15 @@ App.QueuesController = Ember.ArrayController.extend({
if(mapping.length!=3 || (mapping[0] != 'u'&& mapping[0] != 'g')) {
hasInvalidMapping = true;
}else{
- hasInvalidMapping = queues.filter(function(queue){
+ //shouldn't allow if any of the leafqueue is having queue_mappings.
+ hasInvalidMapping = hasInvalidMapping || queues.filter(function(queue){
return !queue.get("queues"); //get all leaf queues
}).map(function(queue){
return queue.get("name");
}).indexOf(mapping[2]) == -1;
}
- })
+ });
return hasInvalidMapping;
}.property('scheduler.queue_mappings','content.length','[email protected]'),