diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/update-center/init.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/update-center/init.js | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/server/sonar-web/src/main/js/apps/update-center/init.js b/server/sonar-web/src/main/js/apps/update-center/init.js deleted file mode 100644 index 36595131ccb..00000000000 --- a/server/sonar-web/src/main/js/apps/update-center/init.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import Backbone from 'backbone'; -import Marionette from 'backbone.marionette'; -import Layout from './layout'; -import HeaderView from './header-view'; -import SearchView from './search-view'; -import ListView from './list-view'; -import FooterView from './footer-view'; -import Controller from './controller'; -import Router from './router'; -import Plugins from './plugins'; - -const App = new Marionette.Application(); - -const init = function({ el, updateCenterActive }) { - // State - this.state = new Backbone.Model({ updateCenterActive }); - - // Layout - this.layout = new Layout({ el }); - this.layout.render(); - - // Plugins - this.plugins = new Plugins(); - - // Controller - this.controller = new Controller({ collection: this.plugins, state: this.state }); - - // Router - this.router = new Router({ controller: this.controller }); - - // Header - this.headerView = new HeaderView({ collection: this.plugins }); - this.layout.headerRegion.show(this.headerView); - - // Search - this.searchView = new SearchView({ - collection: this.plugins, - router: this.router, - state: this.state - }); - this.layout.searchRegion.show(this.searchView); - this.searchView.focusSearch(); - - // List - this.listView = new ListView({ collection: this.plugins }); - this.layout.listRegion.show(this.listView); - - // Footer - this.footerView = new FooterView({ collection: this.plugins }); - this.layout.footerRegion.show(this.footerView); - - // Go - Backbone.history.start({ - pushState: true, - root: window.baseUrl + '/admin/update_center' - }); -}; - -App.on('start', options => init.call(App, options)); - -export default function(el, updateCenterActive) { - App.start({ el, updateCenterActive }); - - return () => { - Backbone.history.stop(); - App.layout.destroy(); - }; -} |