From e4489015d4c3f478e790e9aa5f68c2a76d61ec17 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 2 Feb 2017 14:06:20 +0100 Subject: [PATCH] fix quality flaws --- .../src/main/js/apps/projects/components/PageSidebar.js | 2 -- .../js/apps/quality-gates/components/DetailsContent.js | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js index 29a08cbae67..c5b99bc98f2 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js +++ b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js @@ -35,8 +35,6 @@ export default class PageSidebar extends React.Component { organization: React.PropTypes.object }; - get - render () { const isFiltered = Object.keys(this.props.query).some(key => this.props.query[key] != null); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.js b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.js index 4f00ef69d26..a1e0bc3a13c 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.js @@ -28,6 +28,10 @@ export default class DetailsContent extends Component { const { onAddCondition, onDeleteCondition, onSaveCondition } = this.props; const conditions = gate.conditions || []; + const defaultMessage = canEdit ? + translate('quality_gates.projects_for_default.edit') : + translate('quality_gates.projects_for_default'); + return (
{gate.isDefault ? ( - canEdit ? translate('quality_gates.projects_for_default.edit') : - translate('quality_gates.projects_for_default') + defaultMessage ) : (