Merge pull request #3414 from ssilvert/cluster-node

KEYCLOAK-2206: Hide last registration field when adding new cluster node
This commit is contained in:
Stan Silvert 2016-10-21 16:57:09 -04:00 committed by GitHub
commit dcaac76b4b
2 changed files with 9 additions and 6 deletions

View file

@ -1550,7 +1550,8 @@ module.controller('ClientClusteringCtrl', function($scope, client, Client, Clien
};
});
module.controller('ClientClusteringNodeCtrl', function($scope, client, Client, ClientClusterNode, realm, $location, $routeParams, Notifications) {
module.controller('ClientClusteringNodeCtrl', function($scope, client, Client, ClientClusterNode, realm,
$location, $routeParams, Notifications, Dialog) {
$scope.client = client;
$scope.realm = realm;
$scope.create = !$routeParams.node;
@ -1563,9 +1564,11 @@ module.controller('ClientClusteringNodeCtrl', function($scope, client, Client, C
}
$scope.unregisterNode = function() {
ClientClusterNode.remove({ realm : realm.realm, client : client.id , node: $scope.node.host }, function() {
Notifications.success('Node ' + $scope.node.host + ' unregistered successfully.');
$location.url('/realms/' + realm.realm + '/clients/' + client.id + '/clustering');
Dialog.confirmDelete($scope.node.host, 'node', function() {
ClientClusterNode.remove({ realm : realm.realm, client : client.id , node: $scope.node.host }, function() {
Notifications.success('Node ' + $scope.node.host + ' unregistered successfully.');
$location.url('/realms/' + realm.realm + '/clients/' + client.id + '/clustering');
});
});
}

View file

@ -20,10 +20,10 @@
<input ng-disabled="!create" class="form-control" type="text" id="host" name="host" data-ng-model="node.host" required>
</div>
</div>
<div class="form-group">
<div ng-hide="create" class="form-group">
<label class="col-md-2 control-label" for="lastRegistration">{{:: 'last-registration' | translate}}</label>
<div class="col-sm-6">
<input ng-disabled="true" class="form-control" type="text" id="lastRegistration" name="lastRegistration" data-ng-model="node.lastRegistration">
{{node.lastRegistration}}
</div>
</div>
<div class="form-group">