diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js
index 62b6b7de51..f2b1632408 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js
@@ -20,8 +20,12 @@ module.controller('GlobalCtrl', function($scope, $http, Auth, Current, $location
});
});
+module.controller('HomeCtrl', function($scope, Realm, Current) {
+ console.debug("home");
+});
+
module.controller('RealmListCtrl', function($scope, Realm, Current) {
- $scope.realms = Realm.get();
+ $scope.realms = Realm.query();
Current.realms = $scope.realms;
});
@@ -35,6 +39,9 @@ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $l
var show = Current.realms.length > 0;
return Auth.loggedIn && show;
}
+ $scope.refresh = function() {
+ Current.refresh();
+ }
});
module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $http, $location, Dialog, Notifications) {
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
index a76fb080a0..c0e3c6a9f4 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
@@ -232,19 +232,25 @@ module.factory('ApplicationOrigins', function($resource) {
module.factory('Current', function(Realm, $route) {
var current = {};
+ current.realms = {};
current.realm = null;
- current.realms = Realm.query(null, function(realms) {
- if ($route.current.params.realm) {
- for (var i = 0; i < realms.length; i++) {
- if (realms[i].id == $route.current.params.realm) {
- current.realm = realms[i];
- }
- }
- }
- });
-
current.applications = {};
current.application = null;
+ current.refresh = function() {
+ current.realm = null;
+ current.realms = Realm.query(null, function(realms) {
+ if ($route.current.params.realm) {
+ for (var i = 0; i < realms.length; i++) {
+ if (realms[i].id == $route.current.params.realm) {
+ current.realm = realms[i];
+ }
+ }
+ }
+ });
+ }
+
+ current.refresh();
+
return current;
});
\ No newline at end of file
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html
index 68fd97e119..8b8c0178cd 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html
@@ -25,7 +25,7 @@
Realm:
-
Icon: spinner
+ Icon: spinner
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-list.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-list.html
index 1f888c3430..decb41892e 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-list.html
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/realm-list.html
@@ -1,27 +1,34 @@
\ No newline at end of file