From b10cb73c508662f3f027589f01c4f50b811747ac Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 7 Jul 2014 11:55:36 +0600 Subject: [PATCH] SONAR-5209 Improve the message of removed component --- sonar-server/src/main/coffee/component-viewer/main.coffee | 3 ++- sonar-server/src/main/hbs/component-viewer/header.hbs | 2 +- sonar-server/src/main/less/component-viewer.less | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sonar-server/src/main/coffee/component-viewer/main.coffee b/sonar-server/src/main/coffee/component-viewer/main.coffee index 775aa7b08bb..32e4cd8697c 100644 --- a/sonar-server/src/main/coffee/component-viewer/main.coffee +++ b/sonar-server/src/main/coffee/component-viewer/main.coffee @@ -245,9 +245,10 @@ define [ if @settings.get('duplications') then @showDuplications() else @hideDuplications() if @settings.get('scm') then @showSCM() else @hideSCM() @trigger 'loaded' - .fail => + .fail (r) => if component.status == 404 @state.set 'removed', true + @state.set 'removedMessage', _.pluck(r.responseJSON.errors, 'msg').join '. ' @state.set 'hasSource', false @render() @trigger 'loaded' diff --git a/sonar-server/src/main/hbs/component-viewer/header.hbs b/sonar-server/src/main/hbs/component-viewer/header.hbs index 313d7c3ffde..5f6619ce5b6 100644 --- a/sonar-server/src/main/hbs/component-viewer/header.hbs +++ b/sonar-server/src/main/hbs/component-viewer/header.hbs @@ -22,7 +22,7 @@ {{/if}} {{else}} -
{{t 'issue.component_deleted'}}
+
{{state.removedMessage}}
{{/unless}} diff --git a/sonar-server/src/main/less/component-viewer.less b/sonar-server/src/main/less/component-viewer.less index 07798e0ad74..da5027d78f5 100644 --- a/sonar-server/src/main/less/component-viewer.less +++ b/sonar-server/src/main/less/component-viewer.less @@ -335,8 +335,6 @@ .component-viewer-header-component-project { color: #777; font-size: @smallFontSize; - - &.removed { text-decoration: line-through; } } .component-viewer-header-component-name { -- 2.39.5