diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-07-28 17:09:52 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-07-28 17:09:59 +0200 |
commit | 09a85daf7e6cd68ae6f3b597189071ebf7c3e6de (patch) | |
tree | 160e1cb9cdc7c30f90ac78a5a7231a861df8478d /server | |
parent | 6652d3bb288a00232da41b6f09d429b4ed21cd40 (diff) | |
download | sonarqube-09a85daf7e6cd68ae6f3b597189071ebf7c3e6de.tar.gz sonarqube-09a85daf7e6cd68ae6f3b597189071ebf7c3e6de.zip |
SONAR-5490 Improve readability and payload of results in the Coding Rules page
Diffstat (limited to 'server')
5 files changed, 38 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/app.coffee b/server/sonar-web/src/main/coffee/coding-rules/app.coffee index d87badeec08..aab13d216d4 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/app.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/app.coffee @@ -159,7 +159,7 @@ requirejs [ @storeQuery pristineQuery, @codingRules.sorting # Optimize requested fields - _.extend fetchQuery, f: 'name,lang,status' + _.extend fetchQuery, f: 'name,lang,status,tags,sysTags' if @codingRulesListView scrollOffset = jQuery('.navigator-results')[0].scrollTop diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee index b9bf0f82ab0..77efec04259 100644 --- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee +++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-list-item-view.coffee @@ -21,3 +21,8 @@ define [ showDetail: -> @options.listView.selectIssue @$el @options.app.showRule @model.get('key') + + + serializeData: -> + _.extend super, + allTags: _.union @model.get('sysTags'), @model.get('tags') diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs index b64e0c037ef..bba7a0835aa 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs @@ -14,7 +14,7 @@ {{/unless}} {{#notEq status 'READY'}} <li class="coding-rules-detail-property"> - <span class="coding-rules-detail-status">{{status}}</span> + <span class="coding-rules-detail-status coding-rules-detail-not-ready">{{status}}</span> </li> {{/notEq}} diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs index 00ec5d80d9d..ea2a2057d7e 100644 --- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs +++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-list-item.hbs @@ -1,5 +1,13 @@ <div class="line line-small"> <span class="coding-rules-detail-status">{{language}}</span> - <div class="line-right">{{#notEq status 'READY'}}{{status}}{{/notEq}}</div> + + <div class="line-right"> + <span class="coding-rules-list-tags"> + <i class="icon-tags"></i> + <span>{{#if allTags}}{{join allTags ', '}}{{else}}{{t 'coding_rules.no_tags'}}{{/if}}</span> + </span> + + {{#notEq status 'READY'}}| <span class="coding-rules-detail-not-ready">{{status}}</span>{{/notEq}} + </div> </div> -<div class="line line-nowrap" title="{{name}}" name="{{key}}">{{name}}</div> +<div class="line" title="{{name}}" name="{{key}}">{{name}}</div> diff --git a/server/sonar-web/src/main/less/coding-rules.less b/server/sonar-web/src/main/less/coding-rules.less index bacf9217e72..b58a9f94b7f 100644 --- a/server/sonar-web/src/main/less/coding-rules.less +++ b/server/sonar-web/src/main/less/coding-rules.less @@ -11,6 +11,12 @@ margin: @navigatorPadding; } + .navigator-results .line-right { + margin-top: -14px; + float: none; + text-align: right; + } + } .navigator-filter-query { @@ -372,3 +378,18 @@ textarea.coding-rules-markdown-description { .coding-rules-subcharacteristic-more { display: none; } + +.coding-rules-detail-not-ready { + color: @orange; +} + +.coding-rules-list-tags { + display: inline-block; + vertical-align: top; + max-width: 50%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + .icon-tags:before { font-size: 12px; } +} |