Skip to content

Commit

Permalink
KYLIN-3933 Do not refresh front-end page after replica set related op…
Browse files Browse the repository at this point in the history
…erations
  • Loading branch information
nichunen authored and luguosheng1314 committed Jun 24, 2019
1 parent 37a1a80 commit 6fb7ff0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions webapp/app/js/controllers/adminStreaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ KylinApp.controller('AdminStreamingCtrl', function ($scope, $timeout, $modal, Ad
drawLiquidChart(reId, receiverState.rate, receiverState.state, 'isAvailable');
}
});
callback();
callback && callback();
}, 100);
}, function(e) {
if (e.data && e.data.exception) {
Expand All @@ -89,7 +89,7 @@ KylinApp.controller('AdminStreamingCtrl', function ($scope, $timeout, $modal, Ad
} else {
SweetAlert.swal('Oops...', 'Failed get replica set', 'error');
}
callback();
callback && callback();
});
};

Expand Down Expand Up @@ -136,20 +136,19 @@ KylinApp.controller('AdminStreamingCtrl', function ($scope, $timeout, $modal, Ad
});
$scope.replicaSet = newReplicaSet;
scope.listReplicaSet(function() {
$scope.availableNodes = scope.availableReceiver;
loadingRequest.hide();
location.reload();
});
}, function(e) {
scope.listReplicaSet(function() {
$scope.availableNodes = scope.availableReceiver;
loadingRequest.hide();
location.reload();
});
errorMessage(e, 'Failed get replica set');
});
}, function(e) {
scope.listReplicaSet(function() {
loadingRequest.hide();
location.reload();
});
errorMessage(e, 'Failed remove receiver');
});
Expand All @@ -167,20 +166,19 @@ KylinApp.controller('AdminStreamingCtrl', function ($scope, $timeout, $modal, Ad
$scope.replicaSet = newReplicaSet;
$scope.node.selected = '';
scope.listReplicaSet(function() {
$scope.availableNodes = scope.availableReceiver;
loadingRequest.hide();
location.reload();
});
}, function(e) {
scope.listReplicaSet(function() {
$scope.availableNodes = scope.availableReceiver;
loadingRequest.hide();
location.reload();
});
errorMessage(e, 'Failed get replica set');
});
}, function(e) {
scope.listReplicaSet(function() {
loadingRequest.hide();
location.reload();
});
errorMessage(e, 'Failed to add node');
});
Expand Down Expand Up @@ -349,4 +347,4 @@ KylinApp.controller('StreamingReceiverCtrl', function($scope, $routeParams, $mod

$scope.getReceiverStats();

});
});

0 comments on commit 6fb7ff0

Please sign in to comment.