Merge pull request #1427 from grange74/KEYCLOAK-1486
KEYCLOAK-1486 fixed User link in Clients' Active Sessions page
This commit is contained in:
commit
df6d75e2c5
3 changed files with 17 additions and 7 deletions
|
@ -11,7 +11,8 @@ import java.util.Set;
|
||||||
*/
|
*/
|
||||||
public class UserSessionRepresentation {
|
public class UserSessionRepresentation {
|
||||||
private String id;
|
private String id;
|
||||||
private String user;
|
private String username;
|
||||||
|
private String userId;
|
||||||
private String ipAddress;
|
private String ipAddress;
|
||||||
private long start;
|
private long start;
|
||||||
private long lastAccess;
|
private long lastAccess;
|
||||||
|
@ -25,12 +26,20 @@ public class UserSessionRepresentation {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUser() {
|
public String getUsername() {
|
||||||
return user;
|
return username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUser(String user) {
|
public void setUsername(String username) {
|
||||||
this.user = user;
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIpAddress() {
|
public String getIpAddress() {
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</tfoot>
|
</tfoot>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr data-ng-repeat="session in sessions">
|
<tr data-ng-repeat="session in sessions">
|
||||||
<td><a href="#/realms/{{realm.realm}}/users/{{session.user}}">{{session.user}}</a></td>
|
<td><a href="#/realms/{{realm.realm}}/users/{{session.userId}}">{{session.username}}</a></td>
|
||||||
<td>{{session.ipAddress}}</td>
|
<td>{{session.ipAddress}}</td>
|
||||||
<td>{{session.start | date:'medium'}}</td>
|
<td>{{session.start | date:'medium'}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -230,7 +230,8 @@ public class ModelToRepresentation {
|
||||||
rep.setId(session.getId());
|
rep.setId(session.getId());
|
||||||
rep.setStart(Time.toMillis(session.getStarted()));
|
rep.setStart(Time.toMillis(session.getStarted()));
|
||||||
rep.setLastAccess(Time.toMillis(session.getLastSessionRefresh()));
|
rep.setLastAccess(Time.toMillis(session.getLastSessionRefresh()));
|
||||||
rep.setUser(session.getUser().getUsername());
|
rep.setUsername(session.getUser().getUsername());
|
||||||
|
rep.setUserId(session.getUser().getId());
|
||||||
rep.setIpAddress(session.getIpAddress());
|
rep.setIpAddress(session.getIpAddress());
|
||||||
for (ClientSessionModel clientSession : session.getClientSessions()) {
|
for (ClientSessionModel clientSession : session.getClientSessions()) {
|
||||||
ClientModel client = clientSession.getClient();
|
ClientModel client = clientSession.getClient();
|
||||||
|
|
Loading…
Reference in a new issue