Skip to content

Commit 44afc3d

Browse files
committed
Fix needed page refresh when first app showed up
When an empty application list was initially returned the events wasn't pushed into the applications array, because the Applications.query returned no array. This issue made a page refresh necessary.
1 parent 45a19cd commit 44afc3d

File tree

1 file changed

+3
-2
lines changed
  • spring-boot-admin-server-ui/app/js

1 file changed

+3
-2
lines changed

spring-boot-admin-server-ui/app/js/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ springBootAdmin.config(function ($stateProvider, $urlRouterProvider) {
122122
springBootAdmin.run(function ($rootScope, $state, $log, $filter, Notification, Application ) {
123123
$rootScope.$state = $state;
124124
$rootScope.applications = [];
125+
125126
$rootScope.indexOfApplication = function (id) {
126127
for (var i = 0; i < $rootScope.applications.length; i++) {
127128
if ($rootScope.applications[i].id === id) {
@@ -154,9 +155,9 @@ springBootAdmin.run(function ($rootScope, $state, $log, $filter, Notification, A
154155

155156
Application.query(function (applications) {
156157
for (var i = 0; i < applications.length; i++) {
157-
refresh(applications[i]);
158+
refresh(applications[i]);
159+
$rootScope.applications.push(applications[i]);
158160
}
159-
$rootScope.applications = applications;
160161
});
161162

162163

0 commit comments

Comments
 (0)