From: Stas Vilchik Date: Fri, 24 Apr 2015 12:26:19 +0000 (+0200) Subject: SONAR-6210 add some rule meta X-Git-Tag: 5.2-RC1~2129 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aceb9ec247fb3e5ad2ca609c2148fd875b42e9fa;p=sonarqube.git SONAR-6210 add some rule meta --- diff --git a/server/sonar-web/src/main/hbs/workspace/workspace-rule.hbs b/server/sonar-web/src/main/hbs/workspace/workspace-rule.hbs index acdf14906c2..6259ae84d00 100644 --- a/server/sonar-web/src/main/hbs/workspace/workspace-rule.hbs +++ b/server/sonar-web/src/main/hbs/workspace/workspace-rule.hbs @@ -2,18 +2,53 @@
- + {{/if}}
{{{htmlDesc}}}
@@ -22,4 +57,33 @@
{{{htmlNote}}}
{{/if}} + +

{{t 'coding_rules.parameters'}}

+ + {{#each params}} + + + + + {{/each}} +
{{key}} +

{{{htmlDesc}}}

+ {{#if ../../templateKey}} +
+ {{#if defaultValue }} + {{defaultValue}} + {{else}} + {{t 'coding_rules.parameter.empty'}} + {{/if}} +
+ {{else}} + {{#if defaultValue}} +
+ {{t 'coding_rules.parameters.default_value'}}
+ {{defaultValue}} +
+ {{/if}} + {{/if}} +
+ diff --git a/server/sonar-web/src/main/js/workspace/views/rule-view.js b/server/sonar-web/src/main/js/workspace/views/rule-view.js index f3626009209..2bb983ad1de 100644 --- a/server/sonar-web/src/main/js/workspace/views/rule-view.js +++ b/server/sonar-web/src/main/js/workspace/views/rule-view.js @@ -30,6 +30,15 @@ define([ 'change': 'render' }, + onRender: function () { + BaseView.prototype.onRender.apply(this, arguments); + this.$('[data-toggle="tooltip"]').tooltip({ container: 'body' }); + }, + + onClose: function () { + this.$('[data-toggle="tooltip"]').tooltip('destroy'); + }, + serializeData: function () { return _.extend(Marionette.Layout.prototype.serializeData.apply(this, arguments), { allTags: _.union(this.model.get('sysTags'), this.model.get('tags'))