]> source.dussan.org Git - sonarqube.git/commitdiff
show intro on quality gates page
authorStas Vilchik <vilchiks@gmail.com>
Mon, 1 Jun 2015 13:56:50 +0000 (15:56 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 1 Jun 2015 13:56:50 +0000 (15:56 +0200)
server/sonar-web/src/main/js/apps/quality-gates/controller.js
server/sonar-web/src/main/js/apps/quality-gates/intro-view.js [new file with mode: 0644]
server/sonar-web/src/main/js/apps/quality-gates/layout.js
server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-intro.hbs [new file with mode: 0644]
server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs

index 0b03a0a0d5ca463d8ae56b0f24dc3928d4434602..890adc1ad8bdc0a22988a2debbdaf7fb1e5f4489 100644 (file)
@@ -56,7 +56,7 @@ define([
       this.app.router.navigate('');
       this.app.layout.headerRegion.reset();
       this.app.layout.detailsRegion.reset();
-      //this.app.layout.renderIntro();
+      this.app.layout.renderIntro();
       this.app.gatesView.highlight(null);
     }
 
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/intro-view.js b/server/sonar-web/src/main/js/apps/quality-gates/intro-view.js
new file mode 100644 (file)
index 0000000..c9588a3
--- /dev/null
@@ -0,0 +1,9 @@
+define([
+  './templates'
+], function () {
+
+  return Marionette.ItemView.extend({
+    template: Templates['quality-gates-intro']
+  });
+
+});
index 8d695fd34bc1911ba91f13c589947762927f6244..e9ae08550c484d46acf045e90d0bc35090de82da 100644 (file)
@@ -1,6 +1,7 @@
 define([
+  './intro-view',
   './templates'
-], function () {
+], function (IntroView) {
 
   var $ = jQuery;
 
@@ -18,6 +19,11 @@ define([
       var top = $('.search-navigator').offset().top;
       this.$('.search-navigator-workspace-header').css({ top: top });
       this.$('.search-navigator-side').css({ top: top }).isolatedScroll();
+      this.renderIntro();
+    },
+
+    renderIntro: function () {
+      this.detailsRegion.show(new IntroView());
     }
   });
 
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-intro.hbs b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-intro.hbs
new file mode 100644 (file)
index 0000000..a16e566
--- /dev/null
@@ -0,0 +1,4 @@
+<p class="spacer-bottom">Quality Gates are collections of simple boolean thresholds set on project measures. A project
+  must pass each of the thresholds in order to pass the Quality Gate as a whole.</p>
+<p>It is possible to set a default Quality Gate, which will be applied to all projects not explicitly assigned to some
+  other gate.</p>
index 3428ac4d466ce05d28286ef817dfe4e269f8dd22..4ac8b8b6c37b75de742162dd522dd6286db1a382 100644 (file)
@@ -4,6 +4,6 @@
 </div>
 
 <div class="search-navigator-workspace">
-  <div class="search-navigator-workspace-header">&nbsp;</div>
-  <div class="search-navigator-workspace-details">{{> '_quality-gate-intro'}}</div>
+  <div class="search-navigator-workspace-header"></div>
+  <div class="search-navigator-workspace-details"></div>
 </div>