From: Stas Vilchik Date: Thu, 9 Apr 2015 09:03:44 +0000 (+0200) Subject: SONAR-5851 add app skeleton X-Git-Tag: 5.2-RC1~2313 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f20953ac6c24877fb80f151369227dfad5890324;p=sonarqube.git SONAR-5851 add app skeleton --- diff --git a/server/sonar-web/Gruntfile.coffee b/server/sonar-web/Gruntfile.coffee index 9191ea6a716..f7ec3760fed 100644 --- a/server/sonar-web/Gruntfile.coffee +++ b/server/sonar-web/Gruntfile.coffee @@ -194,6 +194,10 @@ module.exports = (grunt) -> name: 'quality-gate/app' out: '<%= grunt.option("assetsDir") || pkg.assets %>build/js/quality-gate/app.js' + qualityProfiles: options: + name: 'quality-profiles/app' + out: '<%= grunt.option("assetsDir") || pkg.assets %>build/js/quality-profiles/app.js' + codingRules: options: name: 'coding-rules/app' out: '<%= grunt.option("assetsDir") || pkg.assets %>build/js/coding-rules/app.js' @@ -271,6 +275,9 @@ module.exports = (grunt) -> '<%= grunt.option("assetsDir") || pkg.assets %>js/templates/quality-gates.js': [ '<%= pkg.sources %>hbs/quality-gates/**/*.hbs' ] + '<%= grunt.option("assetsDir") || pkg.assets %>js/templates/quality-profiles.js': [ + '<%= pkg.sources %>hbs/quality-profiles/**/*.hbs' + ] '<%= grunt.option("assetsDir") || pkg.assets %>js/templates/source-viewer.js': [ '<%= pkg.sources %>hbs/source-viewer/**/*.hbs' ] diff --git a/server/sonar-web/src/main/hbs/nav/nav-global-navbar.hbs b/server/sonar-web/src/main/hbs/nav/nav-global-navbar.hbs index 6a630910b68..d3821e0922d 100644 --- a/server/sonar-web/src/main/hbs/nav/nav-global-navbar.hbs +++ b/server/sonar-web/src/main/hbs/nav/nav-global-navbar.hbs @@ -41,6 +41,9 @@
  • {{t 'quality_profiles.page'}}
  • +
  • + NEW {{t 'quality_profiles.page'}} +
  • {{t 'quality_gates.page'}}
  • diff --git a/server/sonar-web/src/main/js/quality-profiles/app.js b/server/sonar-web/src/main/js/quality-profiles/app.js new file mode 100644 index 00000000000..5fb1b6cc539 --- /dev/null +++ b/server/sonar-web/src/main/js/quality-profiles/app.js @@ -0,0 +1,10 @@ +require([], function () { + + var $ = jQuery, + App = new Marionette.Application(); + + window.requestMessages().done(function () { + App.start(); + }); + +}); diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_profiles_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_profiles_controller.rb new file mode 100644 index 00000000000..5884d08ab16 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_profiles_controller.rb @@ -0,0 +1,29 @@ +# +# SonarQube, open source software quality management tool. +# Copyright (C) 2008-2014 SonarSource +# mailto:contact AT sonarsource DOT com +# +# SonarQube 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. +# +# SonarQube 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. +# + +class QualityProfilesController < ApplicationController + + SECTION=Navigation::SECTION_QUALITY_PROFILES + + def index + + end + +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_profiles/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_profiles/index.html.erb new file mode 100644 index 00000000000..3084e764ef1 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_profiles/index.html.erb @@ -0,0 +1,5 @@ +<% content_for :script do %> + +<% end %> + +