From bf11cb498b91153d984d3a96ef8cc5d741482021 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 19 Jul 2017 16:01:54 +0200 Subject: [PATCH] SONAR-9581 Use fixed width layout on Quality Gates page --- .../apps/quality-gates/components/Details.js | 11 +---- .../components/DetailsContent.js | 2 +- .../quality-gates/components/DetailsHeader.js | 48 +++++++++++-------- .../js/apps/quality-gates/components/Intro.js | 18 +++---- .../quality-gates/components/ListHeader.js | 4 +- .../components/QualityGatesApp.js | 16 ++++--- .../should_display_quality_gates_page.html | 4 +- 7 files changed, 53 insertions(+), 50 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js index 60957d01b68..8fd787e3030 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.js @@ -102,18 +102,11 @@ export default class Details extends Component { const { onAddCondition, onDeleteCondition, onSaveCondition } = this.props; if (!qualityGate) { - return ( -
-
-

 

-
-
-
- ); + return null; } return ( -
+
+
-

- {qualityGate.name} -

- {edit && -
-
- - - - -
-
} +
+
+
+

+ {qualityGate.name} +

+ {edit && +
+
+ + + + +
+
} +
+
); } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js index e7ccb6c49f3..03b2c9ef28b 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js @@ -22,14 +22,16 @@ import { translate } from '../../../helpers/l10n'; export default function Intro() { return ( -
-
-

- {translate('quality_gates.intro.1')} -

-

- {translate('quality_gates.intro.2')} -

+
+
+
+

+ {translate('quality_gates.intro.1')} +

+

+ {translate('quality_gates.intro.2')} +

+
); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js index e7717e0a40f..6c4b912b8df 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js @@ -28,7 +28,7 @@ export default function ListHeader({ canEdit, onAdd }) { } return ( -
+

{translate('quality_gates.page')}

@@ -40,6 +40,6 @@ export default function ListHeader({ canEdit, onAdd }) {
} -
+ ); } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js index 575a9f212e7..ff9d95d7bd7 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatesApp.js @@ -56,15 +56,17 @@ export default class QualityGatesApp extends Component { const { children, qualityGates, edit } = this.props; const defaultTitle = translate('quality_gates.page'); return ( -
+
-
-
- -
-
- {qualityGates && } +
+
+
+
+ + {qualityGates && } +
+
diff --git a/tests/src/test/resources/qualityGate/QualityGateUiTest/should_display_quality_gates_page.html b/tests/src/test/resources/qualityGate/QualityGateUiTest/should_display_quality_gates_page.html index b0975df675d..71a49dc9940 100644 --- a/tests/src/test/resources/qualityGate/QualityGateUiTest/should_display_quality_gates_page.html +++ b/tests/src/test/resources/qualityGate/QualityGateUiTest/should_display_quality_gates_page.html @@ -40,12 +40,12 @@ waitForElementPresent - css=.quality-gates-results a + css=a.list-group-item click - css=.quality-gates-results a + css=a.list-group-item -- 2.39.5