Merge pull request #3414 from ssilvert/cluster-node
KEYCLOAK-2206: Hide last registration field when adding new cluster node
This commit is contained in:
commit
dcaac76b4b
2 changed files with 9 additions and 6 deletions
|
@ -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.client = client;
|
||||||
$scope.realm = realm;
|
$scope.realm = realm;
|
||||||
$scope.create = !$routeParams.node;
|
$scope.create = !$routeParams.node;
|
||||||
|
@ -1563,9 +1564,11 @@ module.controller('ClientClusteringNodeCtrl', function($scope, client, Client, C
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.unregisterNode = function() {
|
$scope.unregisterNode = function() {
|
||||||
ClientClusterNode.remove({ realm : realm.realm, client : client.id , node: $scope.node.host }, function() {
|
Dialog.confirmDelete($scope.node.host, 'node', function() {
|
||||||
Notifications.success('Node ' + $scope.node.host + ' unregistered successfully.');
|
ClientClusterNode.remove({ realm : realm.realm, client : client.id , node: $scope.node.host }, function() {
|
||||||
$location.url('/realms/' + realm.realm + '/clients/' + client.id + '/clustering');
|
Notifications.success('Node ' + $scope.node.host + ' unregistered successfully.');
|
||||||
|
$location.url('/realms/' + realm.realm + '/clients/' + client.id + '/clustering');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
<input ng-disabled="!create" class="form-control" type="text" id="host" name="host" data-ng-model="node.host" required>
|
<input ng-disabled="!create" class="form-control" type="text" id="host" name="host" data-ng-model="node.host" required>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
<label class="col-md-2 control-label" for="lastRegistration">{{:: 'last-registration' | translate}}</label>
|
||||||
<div class="col-sm-6">
|
<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>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
Loading…
Reference in a new issue