This is an automated email from the ASF dual-hosted git repository.
jonathanhurley pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new 56c8ccf [AMBARI-24296] Yarn Queue manager is allowing to Create a
Child Queue for queue-mappings enabled Queue and Save it (asnaik) (#1940)
56c8ccf is described below
commit 56c8ccf77506ddc1268ee1925f3ca0f73bdfb9da
Author: Akhil S Naik <[email protected]>
AuthorDate: Tue Oct 23 21:48:15 2018 +0530
[AMBARI-24296] Yarn Queue manager is allowing to Create a Child Queue for
queue-mappings enabled Queue and Save it (asnaik) (#1940)
---
.../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]'),