Merge pull request #701 from stianst/master
KEYCLOAK-696 Display Keycloak version in admin console
This commit is contained in:
commit
6f3132eafd
4 changed files with 22 additions and 3 deletions
|
@ -71,6 +71,7 @@
|
|||
<span>Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="serverInfo">Keycloak {{serverInfo.version}}</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
module.controller('GlobalCtrl', function($scope, $http, Auth, WhoAmI, Current, $location, Notifications) {
|
||||
module.controller('GlobalCtrl', function($scope, $http, Auth, WhoAmI, Current, $location, Notifications, ServerInfo) {
|
||||
$scope.addMessage = function() {
|
||||
Notifications.success("test");
|
||||
};
|
||||
|
||||
$scope.authUrl = authUrl;
|
||||
$scope.auth = Auth;
|
||||
$scope.serverInfo = ServerInfo.get();
|
||||
|
||||
WhoAmI.get(function (data) {
|
||||
Auth.user = data;
|
||||
|
|
|
@ -836,4 +836,11 @@ legend .kc-icon-collapse {
|
|||
|
||||
table table {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
#serverInfo {
|
||||
color: #666;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package org.keycloak.services.resources.admin;
|
||||
|
||||
import org.jboss.resteasy.annotations.cache.NoCache;
|
||||
import org.keycloak.Version;
|
||||
import org.keycloak.events.EventListenerProvider;
|
||||
import org.keycloak.freemarker.Theme;
|
||||
import org.keycloak.freemarker.ThemeProvider;
|
||||
|
@ -31,9 +31,9 @@ public class ServerInfoAdminResource {
|
|||
* @return
|
||||
*/
|
||||
@GET
|
||||
@NoCache
|
||||
public ServerInfoRepresentation getInfo() {
|
||||
ServerInfoRepresentation info = new ServerInfoRepresentation();
|
||||
info.setVersion(Version.VERSION);
|
||||
setSocialProviders(info);
|
||||
setThemes(info);
|
||||
setEventListeners(info);
|
||||
|
@ -71,6 +71,8 @@ public class ServerInfoAdminResource {
|
|||
|
||||
public static class ServerInfoRepresentation {
|
||||
|
||||
private String version;
|
||||
|
||||
private Map<String, List<String>> themes;
|
||||
|
||||
private List<String> socialProviders;
|
||||
|
@ -81,6 +83,14 @@ public class ServerInfoAdminResource {
|
|||
public ServerInfoRepresentation() {
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getThemes() {
|
||||
return themes;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue