From: Stas Vilchik Date: Fri, 7 Aug 2015 14:11:35 +0000 (+0200) Subject: SONAR-6660 apply feedback X-Git-Tag: 5.2-RC1~812 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dd3a408d89027c2eb4d8df7a195c4e70ba951f10;p=sonarqube.git SONAR-6660 apply feedback --- diff --git a/server/sonar-web/src/main/js/apps/maintenance/main-view.js b/server/sonar-web/src/main/js/apps/maintenance/main-view.js index 281f6872b8f..1c97f9eae36 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/main-view.js +++ b/server/sonar-web/src/main/js/apps/maintenance/main-view.js @@ -27,6 +27,9 @@ define([ return Backbone.ajax(this.requestOptions).done(function (r) { that.model.set(r); that.render(); + if (that.model.get('state') === 'MIGRATION_SUCCEEDED') { + that.goHome(); + } }); }, @@ -45,6 +48,12 @@ define([ $('.page-simple').toggleClass('panel-warning', this.model.get('state') === 'MIGRATION_REQUIRED'); }, + goHome: function () { + setInterval(function () { + window.location = baseUrl + '/'; + }, 2500); + }, + serializeData: function () { return _.extend(this._super(), { setup: this.options.setup }); }