From 6d1f1f6c78eb2e1b760c2e1576b10410ba4683dd Mon Sep 17 00:00:00 2001 From: Alexandre Rafalovitch Date: Tue, 16 Aug 2016 11:15:37 +1000 Subject: [PATCH] SOLR-9032: Fix Create Alias command in Admin UI Upayavira's patch applied to master and tested against cloud example --- solr/CHANGES.txt | 2 ++ solr/webapp/web/js/angular/controllers/collections.js | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 86c2f084526..fc0bde09958 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -216,6 +216,8 @@ Bug Fixes * SOLR-8993: Admin UI now correctly supports multiple DIH handler end-points (Upayavira, Alexandre Rafalovitch) +* SOLR-9032: Admin UI now correctly implements Create Alias command (Upayavira, Alexandre Rafalovitch) + Optimizations ---------------------- diff --git a/solr/webapp/web/js/angular/controllers/collections.js b/solr/webapp/web/js/angular/controllers/collections.js index e6229057a1f..2bd6ab601ba 100644 --- a/solr/webapp/web/js/angular/controllers/collections.js +++ b/solr/webapp/web/js/angular/controllers/collections.js @@ -111,8 +111,11 @@ solrAdminApp.controller('CollectionsController', } $scope.createAlias = function() { - var collections = $scope.aliasCollections.join(","); - Collections.createAlias({name: $scope.aliasToCreate, collections: collections}, function(data) { + var collections = []; + for (var i in $scope.aliasCollections) { + collections.push($scope.aliasCollections[i].name); + } + Collections.createAlias({name: $scope.aliasToCreate, collections: collections.join(",")}, function(data) { $scope.hideAll(); }); }