From db6fc1233cfe6d281c1bbee419d4cfdff6b02561 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Tue, 6 Jun 2017 17:24:20 +0200 Subject: [PATCH] SONAR-9245 Update leak project cards style on projects page --- .../projects/components/ProjectCardLeak.js | 4 +-- .../components/ProjectCardLeakMeasures.js | 12 ++++---- .../projects/components/ProjectCardOverall.js | 2 +- .../ProjectCardLeak-test.js.snap | 8 ++--- .../ProjectCardLeakMeasures-test.js.snap | 16 +++++----- .../ProjectCardOverall-test.js.snap | 2 +- .../src/main/js/apps/projects/styles.css | 29 ++++++++----------- .../resources/org/sonar/l10n/core.properties | 12 +++++--- 8 files changed, 42 insertions(+), 43 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.js index 9e38e2bcb2d..ac47c003b7a 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeak.js @@ -86,14 +86,14 @@ export default function ProjectCardLeak({ measures, organization, project }: Pro hasLeakPeriodStart &&
{hasLeakPeriodStart && - + {translateWithParameters( 'projects.leak_period_x', moment(project.leakPeriodDate).fromNow() )} } {isProjectAnalyzed && - + {translateWithParameters( 'projects.last_analysis_on_x', moment(project.analysisDate).format('LLL') diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js index 2b9698e7c19..db61abdf13a 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.js @@ -49,7 +49,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
- {translate('metric.new_bugs.name')} + {translate('metric.bugs.name')}
@@ -66,7 +66,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
- {translate('metric.new_vulnerabilities.name')} + {translate('metric.vulnerabilities.name')}
@@ -83,7 +83,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
- {translate('metric.new_code_smells.name')} + {translate('metric.code_smells.name')}
@@ -97,7 +97,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) { />
- {translate('metric.new_coverage.name')} + {translate('metric.coverage.name')}
@@ -111,7 +111,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) { />
- {translate('metric.new_duplicated_lines_density.short_name')} + {translate('metric.duplicated_lines_density.short_name')}
@@ -126,7 +126,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) { />
- {translate('metric.new_lines.short_name')} + {translate('metric.lines.name')}
} diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.js index 8ef49b49179..72bbccbd7ae 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverall.js @@ -82,7 +82,7 @@ export default function ProjectCardOverall({ measures, organization, project }: {hasTags && } {isProjectAnalyzed && -
+
{translateWithParameters( 'projects.last_analysis_on_x', diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.js.snap index 101ba723485..cb539fbafe6 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeak-test.js.snap @@ -35,12 +35,12 @@ exports[`should display the leak measures and quality gate 1`] = `
- - projects.leak_period_x.a month ago - + projects.leak_period_x.a month ago + + projects.last_analysis_on_x.March 1, 2017 9:36 AM
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.js.snap index 964ff49ff68..fa740a935fe 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.js.snap @@ -28,7 +28,7 @@ exports[`should not render new coverage 1`] = `
- metric.new_coverage.name + metric.coverage.name
@@ -62,7 +62,7 @@ exports[`should not render new duplications 1`] = `
- metric.new_duplicated_lines_density.short_name + metric.duplicated_lines_density.short_name
@@ -110,7 +110,7 @@ exports[`should render correctly with all data 1`] = ` - metric.new_bugs.name + metric.bugs.name @@ -150,7 +150,7 @@ exports[`should render correctly with all data 1`] = ` - metric.new_vulnerabilities.name + metric.vulnerabilities.name @@ -190,7 +190,7 @@ exports[`should render correctly with all data 1`] = ` - metric.new_code_smells.name + metric.code_smells.name @@ -221,7 +221,7 @@ exports[`should render correctly with all data 1`] = `
- metric.new_coverage.name + metric.coverage.name
@@ -252,7 +252,7 @@ exports[`should render correctly with all data 1`] = `
- metric.new_duplicated_lines_density.short_name + metric.duplicated_lines_density.short_name
@@ -283,7 +283,7 @@ exports[`should render correctly with all data 1`] = `
- metric.new_lines.short_name + metric.lines.name
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverall-test.js.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverall-test.js.snap index 1e666cc1854..b93bf252c31 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverall-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverall-test.js.snap @@ -33,7 +33,7 @@ exports[`should display the overall measures and quality gate 1`] = ` className="pull-right text-right" />