KEYCLOAK-15186 Sort user federation table

This commit is contained in:
Simon Legner 2020-08-17 10:25:23 +02:00 committed by Stan Silvert
parent a92bf0c3be
commit bed664e4fe
2 changed files with 3 additions and 2 deletions

View file

@ -839,8 +839,9 @@ module.controller('UserFederationCtrl', function($scope, $location, $route, real
$scope.getInstancePriority = function(instance) { $scope.getInstancePriority = function(instance) {
if (!instance.config['priority']) { if (!instance.config['priority']) {
console.log('getInstancePriority is undefined'); console.log('getInstancePriority is undefined');
return -1;
} }
return instance.config['priority'][0]; return +instance.config['priority'][0];
} }
Components.query({realm: realm.realm, Components.query({realm: realm.realm,

View file

@ -51,7 +51,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="instance in instances"> <tr ng-repeat="instance in instances | orderBy:[getInstancePriority, getInstanceName]">
<td><a href="#{{getInstanceLink(instance)}}">{{getInstanceName(instance)}}</a></td> <td><a href="#{{getInstanceLink(instance)}}">{{getInstanceName(instance)}}</a></td>
<td>{{isProviderEnabled(instance)}}</td> <td>{{isProviderEnabled(instance)}}</td>
<td>{{getInstanceProvider(instance) | capitalize}}</td> <td>{{getInstanceProvider(instance) | capitalize}}</td>