diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html index 3e502950b6..8ec75f4889 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/index.html @@ -71,6 +71,7 @@ Loading... +
Keycloak {{serverInfo.version}}
diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js index 44124411e3..1a0adcb977 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js @@ -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; diff --git a/forms/common-themes/src/main/resources/theme/admin/keycloak/resources/css/admin-console.css b/forms/common-themes/src/main/resources/theme/admin/keycloak/resources/css/admin-console.css index e0e2450385..e72d4d6939 100644 --- a/forms/common-themes/src/main/resources/theme/admin/keycloak/resources/css/admin-console.css +++ b/forms/common-themes/src/main/resources/theme/admin/keycloak/resources/css/admin-console.css @@ -836,4 +836,11 @@ legend .kc-icon-collapse { table table { margin-bottom: 0 !important; +} + +#serverInfo { + color: #666; + position: absolute; + bottom: 10px; + right: 10px; } \ No newline at end of file diff --git a/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java index 391ffbb71a..42f3264df5 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java @@ -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> themes; private List 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> getThemes() { return themes; }