[ISSUE #58] enable the service to support multiple namesrvs (#59)

* enable the service to support multiple namesrvs

* use @ to split the namesrv of different clusters

Co-authored-by: dengzhiwen1 <dengzhiwen1@xiaomi.com>
This commit is contained in:
cserwen
2022-01-04 18:02:08 +08:00
committed by GitHub
parent 1caeb4ce31
commit 2d8bf001b3
6 changed files with 31 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ app.controller('opsController', ['$scope', '$location', '$http', 'Notification',
$scope.namesvrAddrList = resp.data.namesvrAddrList;
$scope.useVIPChannel = resp.data.useVIPChannel;
$scope.useTLS = resp.data.useTLS;
$scope.selectedNamesrv = resp.data.currentNamesrv;
} else {
Notification.error({message: resp.errMsg, delay: 2000});
}
@@ -43,7 +44,7 @@ app.controller('opsController', ['$scope', '$location', '$http', 'Notification',
$http({
method: "POST",
url: "ops/updateNameSvrAddr.do",
params: {nameSvrAddrList: $scope.namesvrAddrList.join(";")}
params: {nameSvrAddrList: $scope.selectedNamesrv}
}).success(function (resp) {
if (resp.status == 0) {
Notification.info({message: "SUCCESS", delay: 2000});

View File

@@ -17,9 +17,11 @@
<div class="container-fluid" id="deployHistoryList">
<div class="page-content">
<h2 class="md-title">NameServerAddressList</h2>
<div class="pull-left">
<md-chips ng-model="namesvrAddrList" md-on-add="eleChange(namesvrAddrList)"
md-on-remove="eleChange(namesvrAddrList)" readonly="inputReadonly" md-removable="ctrl.removable"></md-chips>
<div class="pull-left" style="min-width: 400px; max-width: 500px; padding: 10px 10px 10px 0">
<select ng-model="selectedNamesrv" chosen
ng-options="x for x in namesvrAddrList"
ng-change="updateNameSvrAddr()"
required></select>
</div>
<div class="pull-left">
<button class="btn btn-raised btn-sm btn-primary" type="button" ng-show="{{writeOperationEnabled}}"