diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
index 3405791..4503b2f 100755
--- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
+++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
@@ -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');
+ });
});
}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html
index a2bc19e..440994f 100644
--- a/themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html
+++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html
@@ -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">