From 8d3059a3f0b2d64261b44a55189348f0f54e7da8 Mon Sep 17 00:00:00 2001 From: Pascal Mugnier Date: Tue, 20 Mar 2018 09:16:51 +0100 Subject: [PATCH] SONAR-10428 Remove old icons (#13) --- .../quality-gates/components/Conditions.js | 7 +- .../components/ConditionsAlert.js | 66 ------------------- .../resources/org/sonar/l10n/core.properties | 3 - 3 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js index 637a8100547..f3fb35559e7 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js @@ -19,7 +19,6 @@ */ import React from 'react'; import { sortBy, uniqBy } from 'lodash'; -import ConditionsAlert from './ConditionsAlert'; import AddConditionForm from './AddConditionForm'; import Condition from './Condition'; import { translate, getLocalizedMetricName } from '../../../helpers/l10n'; @@ -89,10 +88,10 @@ export default class Conditions extends React.PureComponent { metric: metrics[condition.metric] })); return ( -
+

{translate('quality_gates.conditions')}

- +
{translate('quality_gates.introduction')}
{this.state.error &&
{this.state.error}
} @@ -108,7 +107,7 @@ export default class Conditions extends React.PureComponent { )} {sortedConditions.length ? ( - +
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js deleted file mode 100644 index e0e9e3c7f42..00000000000 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import React, { Component } from 'react'; -import AlertErrorIcon from '../../../components/icons-components/AlertErrorIcon'; -import AlertSuccessIcon from '../../../components/icons-components/AlertSuccessIcon'; -import AlertWarnIcon from '../../../components/icons-components/AlertWarnIcon'; -import { translate } from '../../../helpers/l10n'; - -export default class ConditionsAlert extends Component { - state = { - expanded: false - }; - - handleMoreClick(e) { - e.preventDefault(); - this.setState({ expanded: true }); - } - - render() { - const { expanded } = this.state; - - return ( -
- {translate('quality_gates.introduction')} - {!expanded && ( - - {translate('more')} - - )} - {expanded && ( -
- {translate('quality_gates.health_icons')} -
    -
  • - {translate('alerts.notes.ok')} -
  • -
  • - {translate('alerts.notes.warn')} -
  • -
  • - {translate('alerts.notes.error')} -
  • -
-
- )} -
- ); - } -} diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 2485efae2c7..7e76dfebc6f 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1356,9 +1356,6 @@ notification.dispatcher.CeReportTaskFailure.project=Background tasks in failure # #------------------------------------------------------------------------------ -alerts.notes.ok=at least one threshold is defined, no threshold is reached. -alerts.notes.warn=at least one warning threshold is reached, no error threshold is reached. -alerts.notes.error=at least one error threshold is reached. alerts.operator.<=is less than alerts.operator.>=is greater than alerts.operator.\==equals -- 2.39.5
{translate('quality_gates.conditions.metric')}