Skip to content

Commit

Permalink
KEYCLOAK-696 Display Keycloak version in admin console
Browse files Browse the repository at this point in the history
  • Loading branch information
stianst committed Sep 18, 2014
1 parent bfdb8d4 commit dcb5717
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 71,7 @@
<span>Loading...</span>
</div>
</div>
<div id="serverInfo">Keycloak {{serverInfo.version}}</div>
</div>

</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -836,4 836,11 @@ legend .kc-icon-collapse {

table table {
margin-bottom: 0 !important;
}

#serverInfo {
color: #666;
position: absolute;
bottom: 10px;
right: 10px;
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -71,6 71,8 @@ private void setEventListeners(ServerInfoRepresentation info) {

public static class ServerInfoRepresentation {

private String version;

private Map<String, List<String>> themes;

private List<String> socialProviders;
Expand All @@ -81,6 83,14 @@ public static class ServerInfoRepresentation {
public ServerInfoRepresentation() {
}

public String getVersion() {
return version;
}

public void setVersion(String version) {
this.version = version;
}

public Map<String, List<String>> getThemes() {
return themes;
}
Expand Down

0 comments on commit dcb5717

Please sign in to comment.