From e78b3b9dd0ea04e0c194af97753fa2ea8b97a3ac Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 22 Jan 2015 14:07:13 +0100 Subject: [PATCH] SONAR-5820/SONAR-5987 Ability to filter rules that are active in a quality profile --- .../coding-rules-workspace-list-item.hbs | 40 ++++++++--------- .../rule/coding-rules-profile-activation.hbs | 6 ++- .../src/main/js/coding-rules/controller.js | 1 + .../src/main/js/coding-rules/models/rules.js | 17 ++++--- .../rule/profile-activation-view.js | 8 +--- .../js/coding-rules/rule/rule-profile-view.js | 17 ++++--- .../coding-rules/rule/rule-profiles-view.js | 15 ++++--- .../coding-rules/workspace-list-item-view.js | 45 +++++++++---------- 8 files changed, 79 insertions(+), 70 deletions(-) diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs index 92087c04044..7db42af3919 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-workspace-list-item.hbs @@ -1,19 +1,17 @@ - {{#if activeProfile}} - {{#if activeProfile.severity}} - - {{/if}} + {{#if activation}} + {{/if}} - {{#if activeProfile}} + {{#any activation selectedProfile}} {{#if canWrite}} {{/if}} - {{/if}} + {{/any}}
- {{severityIcon activeProfile.severity}} - {{#eq activeProfile.inherit 'OVERRIDES'}} - - {{/eq}} - {{#eq activeProfile.inherit 'INHERITED'}} - - {{/eq}} - + {{severityIcon activation.severity}} + {{#eq activation.inherit 'OVERRIDES'}} + + {{/eq}} + {{#eq activation.inherit 'INHERITED'}} + + {{/eq}} + @@ -39,24 +37,24 @@
- {{#if activeProfile.severity}} - {{#eq activeProfile.inherit 'NONE'}} + {{#if activation}} + {{#eq activation.inherit 'NONE'}} {{/eq}} {{else}} - + {{#unless isTemplate}} + + {{/unless}} {{/if}}
diff --git a/server/sonar-web/src/main/hbs/coding-rules/rule/coding-rules-profile-activation.hbs b/server/sonar-web/src/main/hbs/coding-rules/rule/coding-rules-profile-activation.hbs index 36f422a6710..a13691e5705 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/rule/coding-rules-profile-activation.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/rule/coding-rules-profile-activation.hbs @@ -1,3 +1,5 @@ +{{log this}} +