aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-08-07 15:00:34 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-08-14 11:44:44 +0200
commit0fe44ef3084fdd0cbeb5cb7100c9e46f797155d5 (patch)
tree2f75ea82b6dcf771658a570701cc7bb357a80f4c /server
parent1a1a2e29a007e393935fbf360ed7dddcd5ef904e (diff)
downloadsonarqube-0fe44ef3084fdd0cbeb5cb7100c9e46f797155d5.tar.gz
sonarqube-0fe44ef3084fdd0cbeb5cb7100c9e46f797155d5.zip
SONAR-9608 Change facets order in measures page
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap16
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/config/domains.js57
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap64
3 files changed, 73 insertions, 64 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap b/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap
index 7459d13dc96..782aa588005 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap
@@ -67,29 +67,29 @@ exports[`sortMeasures should sort based on the config 1`] = `
Array [
Object {
"metric": Object {
- "key": "bugs",
- "name": "bugs",
+ "key": "new_bugs",
+ "name": "new_bugs",
"type": "INT",
},
},
Object {
"metric": Object {
- "key": "new_bugs",
- "name": "new_bugs",
+ "key": "new_reliability_remediation_effort",
+ "name": "bugs",
"type": "INT",
},
},
Object {
"metric": Object {
- "key": "reliability_remediation_effort",
- "name": "new_bugs",
+ "key": "bugs",
+ "name": "bugs",
"type": "INT",
},
},
Object {
"metric": Object {
- "key": "new_reliability_remediation_effort",
- "name": "bugs",
+ "key": "reliability_remediation_effort",
+ "name": "new_bugs",
"type": "INT",
},
},
diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/domains.js b/server/sonar-web/src/main/js/apps/component-measures/config/domains.js
index bd683bd18fb..9f10d6f7b28 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/config/domains.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/config/domains.js
@@ -21,51 +21,57 @@
export const domains = {
Reliability: {
order: [
- 'bugs',
+ 'new_reliability_rating',
'new_bugs',
+ 'new_reliability_remediation_effort',
+
'reliability_rating',
- 'reliability_remediation_effort',
- 'new_reliability_remediation_effort'
+ 'bugs',
+ 'reliability_remediation_effort'
]
},
Security: {
order: [
- 'vulnerabilities',
+ 'new_security_rating',
'new_vulnerabilities',
+ 'new_security_remediation_effort',
+
'security_rating',
- 'security_remediation_effort',
- 'new_security_remediation_effort'
+ 'vulnerabilities',
+ 'security_remediation_effort'
]
},
Maintainability: {
order: [
- 'code_smells',
'new_code_smells',
+ 'new_maintainability_rating',
+ 'new_technical_debt',
+ 'new_sqale_debt_ratio',
+
+ 'code_smells',
'sqale_rating',
'sqale_index',
- 'new_technical_debt',
'sqale_debt_ratio',
- 'new_sqale_debt_ratio',
'effort_to_reach_maintainability_rating_a'
]
},
Coverage: {
order: [
- 'coverage',
'new_coverage',
- 'line_coverage',
'new_line_coverage',
- 'branch_coverage',
'new_branch_coverage',
- 'uncovered_lines',
'new_uncovered_lines',
- 'uncovered_conditions',
'new_uncovered_conditions',
'new_lines_to_cover',
+ 'coverage',
+ 'line_coverage',
+ 'branch_coverage',
+ 'uncovered_lines',
+ 'uncovered_conditions',
'lines_to_cover',
'tests',
@@ -80,21 +86,23 @@ export const domains = {
Duplications: {
order: [
- 'duplicated_lines_density',
'new_duplicated_lines_density',
- 'duplicated_blocks',
'new_duplicated_blocks',
- 'duplicated_lines',
'new_duplicated_lines',
+
+ 'duplicated_lines_density',
+ 'duplicated_blocks',
+ 'duplicated_lines',
'duplicated_files'
]
},
Size: {
order: [
+ 'new_lines',
+
'ncloc',
'lines',
- 'new_lines',
'statements',
'functions',
'classes',
@@ -113,18 +121,19 @@ export const domains = {
Issues: {
order: [
- 'violations',
'new_violations',
- 'blocker_violations',
'new_blocker_violations',
- 'critical_violations',
'new_critical_violations',
- 'major_violations',
'new_major_violations',
- 'minor_violations',
'new_minor_violations',
- 'info_violations',
'new_info_violations',
+
+ 'violations',
+ 'blocker_violations',
+ 'critical_violations',
+ 'major_violations',
+ 'minor_violations',
+ 'info_violations',
'open_issues',
'reopened_issues',
'confirmed_issues',
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap
index 3b11a53b1ff..8aff649b863 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap
@@ -41,17 +41,17 @@ exports[`should display facet item list 1`] = `
name={
<Tooltip
mouseEnterDelay={0.5}
- overlay="Bugs"
+ overlay="New Bugs"
placement="bottom"
>
<span
- id="measure-bugs-name"
+ id="measure-new_bugs-name"
>
<IssueTypeIcon
className="little-spacer-right"
- query="bugs"
+ query="new_bugs"
/>
- Bugs
+ New Bugs
</span>
</Tooltip>
}
@@ -63,8 +63,8 @@ exports[`should display facet item list 1`] = `
"leak": "5",
"metric": Object {
"domain": "Reliability",
- "key": "bugs",
- "name": "Bugs",
+ "key": "new_bugs",
+ "name": "New Bugs",
"type": "INT",
},
"periods": Array [
@@ -73,12 +73,11 @@ exports[`should display facet item list 1`] = `
"value": "5",
},
],
- "value": "5",
}
}
/>
}
- value="bugs"
+ value="new_bugs"
/>
<FacetItem
active={false}
@@ -87,17 +86,17 @@ exports[`should display facet item list 1`] = `
name={
<Tooltip
mouseEnterDelay={0.5}
- overlay="New Bugs"
+ overlay="Bugs"
placement="bottom"
>
<span
- id="measure-new_bugs-name"
+ id="measure-bugs-name"
>
<IssueTypeIcon
className="little-spacer-right"
- query="new_bugs"
+ query="bugs"
/>
- New Bugs
+ Bugs
</span>
</Tooltip>
}
@@ -109,8 +108,8 @@ exports[`should display facet item list 1`] = `
"leak": "5",
"metric": Object {
"domain": "Reliability",
- "key": "new_bugs",
- "name": "New Bugs",
+ "key": "bugs",
+ "name": "Bugs",
"type": "INT",
},
"periods": Array [
@@ -119,11 +118,12 @@ exports[`should display facet item list 1`] = `
"value": "5",
},
],
+ "value": "5",
}
}
/>
}
- value="new_bugs"
+ value="bugs"
/>
</FacetItemsList>
</FacetBox>
@@ -164,23 +164,23 @@ exports[`should display facet item list with bugs selected 1`] = `
value="Reliability"
/>
<FacetItem
- active={true}
+ active={false}
disabled={false}
halfWidth={false}
name={
<Tooltip
mouseEnterDelay={0.5}
- overlay="Bugs"
+ overlay="New Bugs"
placement="bottom"
>
<span
- id="measure-bugs-name"
+ id="measure-new_bugs-name"
>
<IssueTypeIcon
className="little-spacer-right"
- query="bugs"
+ query="new_bugs"
/>
- Bugs
+ New Bugs
</span>
</Tooltip>
}
@@ -192,8 +192,8 @@ exports[`should display facet item list with bugs selected 1`] = `
"leak": "5",
"metric": Object {
"domain": "Reliability",
- "key": "bugs",
- "name": "Bugs",
+ "key": "new_bugs",
+ "name": "New Bugs",
"type": "INT",
},
"periods": Array [
@@ -202,31 +202,30 @@ exports[`should display facet item list with bugs selected 1`] = `
"value": "5",
},
],
- "value": "5",
}
}
/>
}
- value="bugs"
+ value="new_bugs"
/>
<FacetItem
- active={false}
+ active={true}
disabled={false}
halfWidth={false}
name={
<Tooltip
mouseEnterDelay={0.5}
- overlay="New Bugs"
+ overlay="Bugs"
placement="bottom"
>
<span
- id="measure-new_bugs-name"
+ id="measure-bugs-name"
>
<IssueTypeIcon
className="little-spacer-right"
- query="new_bugs"
+ query="bugs"
/>
- New Bugs
+ Bugs
</span>
</Tooltip>
}
@@ -238,8 +237,8 @@ exports[`should display facet item list with bugs selected 1`] = `
"leak": "5",
"metric": Object {
"domain": "Reliability",
- "key": "new_bugs",
- "name": "New Bugs",
+ "key": "bugs",
+ "name": "Bugs",
"type": "INT",
},
"periods": Array [
@@ -248,11 +247,12 @@ exports[`should display facet item list with bugs selected 1`] = `
"value": "5",
},
],
+ "value": "5",
}
}
/>
}
- value="new_bugs"
+ value="bugs"
/>
</FacetItemsList>
</FacetBox>