From 655d123958ad814fba45877e9cf31a5fbb52d11b Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 18 Jul 2016 14:41:58 +0200 Subject: SONAR-7811 warn about profiles that were never used --- .../apps/quality-profiles/components/ProfileDate.js | 2 +- .../apps/quality-profiles/details/ProfileHeader.js | 21 ++++++++++++++++----- .../apps/quality-profiles/home/ProfilesListRow.js | 8 +++++++- 3 files changed, 24 insertions(+), 7 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/quality-profiles') diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js index a538383bd82..8abac7aea15 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js @@ -36,7 +36,7 @@ export default class ProfileDate extends React.Component { if (!date) { return ( - {translate('never')} + {translate('never')} ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js index 51db2e4b8ac..bef63b8da97 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js @@ -49,6 +49,21 @@ export default class ProfileHeader extends React.Component { ); } + renderUsageDate () { + const { profile } = this.props; + const warning = !profile.lastUsed; + const className = classNames('small big-spacer-right', { + 'alert-warning': warning + }); + return ( +
  • + {translate('quality_profiles.used_')} + {' '} + +
  • + ); + } + render () { const { profile } = this.props; @@ -77,11 +92,7 @@ export default class ProfileHeader extends React.Component {