diff --git a/pkg/dashboard/ui/src/app/app.run.js b/pkg/dashboard/ui/src/app/app.run.js index 43b32327a2..080456efc8 100644 --- a/pkg/dashboard/ui/src/app/app.run.js +++ b/pkg/dashboard/ui/src/app/app.run.js @@ -4,7 +4,7 @@ angular.module('nuclio.app') .run(appInit); - function appInit($rootScope, $state, $urlRouter, $http, $httpBackend, $injector, lodash, ConfigService) { + function appInit($rootScope, $state, $urlRouter, $http, $httpBackend, $injector, lodash, ConfigService, DialogsService, NuclioProjectsDataService) { // @if !IGZ_TESTING $rootScope.$on('$locationChangeSuccess', function (event) { // @if IGZ_E2E_TESTING @@ -24,6 +24,15 @@ .then(function (config) { lodash.merge(ConfigService, config.data); $urlRouter.sync(); + }) + .then(function () { + NuclioProjectsDataService.getExternalIPAddresses() + .then(function (response) { + ConfigService.externalIPAddress = response.data.externalIPAddresses.addresses[0]; + }) + .catch(function () { + DialogsService.alert('Oops: Unknown error occurred while retrieving external IP address'); + }); }); } });