AMBARI-19556. Ambari Yarn Queue Manager allows two same queue name. (Akhil PB via gauravn7)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c326ce4e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c326ce4e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c326ce4e Branch: refs/heads/branch-dev-patch-upgrade Commit: c326ce4e63ccc941df925198125ab42cc74f385b Parents: cba69d9 Author: Gaurav Nagar <[email protected]> Authored: Tue Jan 17 15:47:12 2017 +0530 Committer: Gaurav Nagar <[email protected]> Committed: Tue Jan 17 15:48:12 2017 +0530 ---------------------------------------------------------------------- .../src/main/resources/ui/app/components/pathInput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c326ce4e/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/pathInput.js ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/pathInput.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/pathInput.js index e71d226..d3471bf 100644 --- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/pathInput.js +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/pathInput.js @@ -27,7 +27,8 @@ App.PathInputComponent = Em.Component.extend({ basedir = path.substr(0,path.lastIndexOf('.')) || currentBasedir, queuePath = [basedir,path.substr(path.lastIndexOf('.')+1)].join('.'), queueName = path.substr(path.lastIndexOf('.')+1), - alreadyExists = this.get('queues.firstObject.store').hasRecordForId('queue',queuePath.toLowerCase()); + deletedQueues = this.get('queues.firstObject.store').get('deletedQueues'), + alreadyExists = (this.get('queues').findBy('name',queueName)||deletedQueues.findBy('name',queueName))?true:false; if (!path || !queueName) { return this.setProperties({'isError':true,'errorMessage':'Enter queue name.'});
