diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-06-01 15:56:50 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-06-01 15:56:50 +0200 |
commit | 899e9116b68a6663ed9fd4aa8cf84556845aa5fb (patch) | |
tree | 30a55969dae0c09d85b0d5af10e9e8342700eaf6 | |
parent | c47e52ce91615601c444c93242873dba44c4a13e (diff) | |
download | sonarqube-899e9116b68a6663ed9fd4aa8cf84556845aa5fb.tar.gz sonarqube-899e9116b68a6663ed9fd4aa8cf84556845aa5fb.zip |
show intro on quality gates page
5 files changed, 23 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/controller.js b/server/sonar-web/src/main/js/apps/quality-gates/controller.js index 0b03a0a0d5c..890adc1ad8b 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/controller.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/controller.js @@ -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 index 00000000000..c9588a3d48f --- /dev/null +++ b/server/sonar-web/src/main/js/apps/quality-gates/intro-view.js @@ -0,0 +1,9 @@ +define([ + './templates' +], function () { + + return Marionette.ItemView.extend({ + template: Templates['quality-gates-intro'] + }); + +}); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/layout.js b/server/sonar-web/src/main/js/apps/quality-gates/layout.js index 8d695fd34bc..e9ae08550c4 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/layout.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/layout.js @@ -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 index 00000000000..a16e566c47e --- /dev/null +++ b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-intro.hbs @@ -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> diff --git a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs index 3428ac4d466..4ac8b8b6c37 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs +++ b/server/sonar-web/src/main/js/apps/quality-gates/templates/quality-gates-layout.hbs @@ -4,6 +4,6 @@ </div> <div class="search-navigator-workspace"> - <div class="search-navigator-workspace-header"> </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> |