This is an automated email from the ASF dual-hosted git repository.

amagyar 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 157eed4  AMBARI-24958 Ambari YARN Queue Manager allows duplicate names 
when using rename functionality (asnaik) (#2659)
157eed4 is described below

commit 157eed41d264922dd0e6335dc4b54c53859a83a4
Author: Akhil S Naik <asn...@hortonworks.com>
AuthorDate: Thu Feb 7 15:45:33 2019 +0530

    AMBARI-24958 Ambari YARN Queue Manager allows duplicate names when using 
rename functionality (asnaik) (#2659)
---
 .../capacity-scheduler/src/main/resources/ui/app/controllers/queue.js  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
index d3adeb4..6405592 100644
--- 
a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
+++ 
b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
@@ -503,8 +503,9 @@ App.QueueController = Ember.ObjectController.extend({
 
     queue.set('name',name);
 
+    //new queue name has to be unique  
     foundWithName = this.store.all('queue').find(function (q) {
-      return q.get('path') === 
[queue.get('parentPath'),queue.get('name')].join('.');
+      return q.get('name') === queue.get('name') && q.get('path') != 
queue.get('path');
     });
 
     if (!Em.isEmpty(foundWithName) && 
queue.changedAttributes().hasOwnProperty('name')) {

Reply via email to