From: Stas Vilchik Date: Thu, 7 Jul 2016 11:45:03 +0000 (+0200) Subject: apply feedback for the quality profiles page X-Git-Tag: 6.0-RC1~130 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d788c4781bee2c122649b12b99ab8fc46f821c79;p=sonarqube.git apply feedback for the quality profiles page --- 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 bbf2913801e..7f2c10f5abb 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 @@ -19,6 +19,8 @@ */ import React from 'react'; import { Link, IndexLink } from 'react-router'; +import classNames from 'classnames'; +import moment from 'moment'; import ProfileLink from '../components/ProfileLink'; import RenameProfileView from '../views/RenameProfileView'; import CopyProfileView from '../views/CopyProfileView'; @@ -28,6 +30,7 @@ import { ProfileType } from '../propTypes'; import { translate } from '../../../helpers/l10n'; import { setDefaultProfile } from '../../../api/quality-profiles'; import { getRulesUrl } from '../../../helpers/urls'; +import { isStagnant } from '../utils'; export default class ProfileHeader extends React.Component { static propTypes = { @@ -79,6 +82,21 @@ export default class ProfileHeader extends React.Component { }).render(); } + renderUpdateDate () { + const { profile } = this.props; + const warning = isStagnant(profile); + const className = classNames('small spacer-right', { + 'alert-warning': warning + }); + return ( +
  • + {translate('quality_profiles.updated_')} + {' '} + +
  • + ); + } + render () { const { profile, canAdmin } = this.props; @@ -115,11 +133,7 @@ export default class ProfileHeader extends React.Component {