]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5851 add app skeleton
authorStas Vilchik <vilchiks@gmail.com>
Thu, 9 Apr 2015 09:03:44 +0000 (11:03 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 10 Apr 2015 12:43:19 +0000 (14:43 +0200)
server/sonar-web/Gruntfile.coffee
server/sonar-web/src/main/hbs/nav/nav-global-navbar.hbs
server/sonar-web/src/main/js/quality-profiles/app.js [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/quality_profiles_controller.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_profiles/index.html.erb [new file with mode: 0644]

index 9191ea6a716ac5f165735bfc06b45c97bc9cccc5..f7ec3760fedeb3a7a67d5a5a5fe514dc1f1384dc 100644 (file)
@@ -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'
           ]
index 6a630910b6852aa60579aaf2b6f8356a752772e0..d3821e0922d60665bf5ad51f9abe87a659f549bb 100644 (file)
@@ -41,6 +41,9 @@
     <li {{#isActiveLink '/profiles'}}class="active"{{/isActiveLink}}>
       <a href="{{link '/profiles'}}">{{t 'quality_profiles.page'}}</a>
     </li>
+    <li {{#isActiveLink '/quality_profiles'}}class="active"{{/isActiveLink}}>
+      <a href="{{link '/quality_profiles'}}">NEW {{t 'quality_profiles.page'}}</a>
+    </li>
     <li {{#isActiveLink '/quality_gates'}}class="active"{{/isActiveLink}}>
       <a href="{{link '/quality_gates'}}">{{t 'quality_gates.page'}}</a>
     </li>
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 (file)
index 0000000..5fb1b6c
--- /dev/null
@@ -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 (file)
index 0000000..5884d08
--- /dev/null
@@ -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 (file)
index 0000000..3084e76
--- /dev/null
@@ -0,0 +1,5 @@
+<% content_for :script do %>
+  <script>require(['quality-profiles/app']);</script>
+<% end %>
+
+<div class="search-navigator" id="quality-profiles"></div>