mirror of https://github.com/apache/lucene.git
SOLR-9232: Fix Swap Cores in Admin UI
This commit is contained in:
parent
633a89c037
commit
f20e2f3a94
|
@ -206,6 +206,8 @@ Bug Fixes
|
||||||
* SOLR-9405: ConcurrentModificationException in ZkStateReader.getStateWatchers.
|
* SOLR-9405: ConcurrentModificationException in ZkStateReader.getStateWatchers.
|
||||||
(Alan Woodward, Edward Ribeiro, shalin)
|
(Alan Woodward, Edward Ribeiro, shalin)
|
||||||
|
|
||||||
|
* SOLR-9232: Admin UI now fully implements Swap Cores interface (Alexandre Rafalovitch)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -129,15 +129,15 @@ solrAdminApp.controller('CoreAdminController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.swapCores = function() {
|
$scope.swapCores = function() {
|
||||||
if ($scope.swapOther) {
|
if (!$scope.swapOther) {
|
||||||
$swapMessage = "Please select a core to swap with";
|
$scope.swapMessage = "Please select a core to swap with";
|
||||||
} else if ($scope.swapOther == $scope.selectedCore) {
|
} else if ($scope.swapOther == $scope.selectedCore) {
|
||||||
$swapMessage = "Cannot swap with the same core";
|
$scope.swapMessage = "Cannot swap with the same core";
|
||||||
} else {
|
} else {
|
||||||
Cores.swap({core: $scope.selectedCore, other: $scope.swapOther}, function(data) {
|
Cores.swap({core: $scope.selectedCore, other: $scope.swapOther}, function(data) {
|
||||||
$location.path("/~cores/" + $scope.swapOther);
|
$location.path("/~cores/" + $scope.swapOther);
|
||||||
delete $scope.swapOther;
|
delete $scope.swapOther;
|
||||||
$scope.cancelSwap();
|
$scope.cancelSwapCores();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,7 +47,7 @@ solrAdminServices.factory('System',
|
||||||
"add": {params:{action: "CREATE"}},
|
"add": {params:{action: "CREATE"}},
|
||||||
"unload": {params:{action: "UNLOAD", core: "@core"}},
|
"unload": {params:{action: "UNLOAD", core: "@core"}},
|
||||||
"rename": {params:{action: "RENAME"}},
|
"rename": {params:{action: "RENAME"}},
|
||||||
"swap": {params:{}},
|
"swap": {params:{action: "SWAP"}},
|
||||||
"reload": {method: "GET", params:{action:"RELOAD", core: "@core"}, headers:{doNotIntercept: "true"}},
|
"reload": {method: "GET", params:{action:"RELOAD", core: "@core"}, headers:{doNotIntercept: "true"}},
|
||||||
"optimize": {params:{}}
|
"optimize": {params:{}}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue