aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx30
1 files changed, 16 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
index 827630106c2..e7953550f34 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
@@ -185,20 +185,22 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
).then(
(results) => {
if (this.mounted) {
- const qgStatuses = results.map(({ measures = [], project, projectBranchLike }) => {
- const { key, name, status, isCaycCompliant } = project;
- const conditions = extractStatusConditionsFromApplicationStatusChildProject(project);
- const failedConditions = this.getFailedConditions(conditions, measures);
-
- return {
- failedConditions,
- isCaycCompliant,
- key,
- name,
- status,
- branchLike: projectBranchLike,
- };
- });
+ const qgStatuses = results
+ .map(({ measures = [], project, projectBranchLike }) => {
+ const { key, name, status, isCaycCompliant } = project;
+ const conditions = extractStatusConditionsFromApplicationStatusChildProject(project);
+ const failedConditions = this.getFailedConditions(conditions, measures);
+
+ return {
+ failedConditions,
+ isCaycCompliant,
+ key,
+ name,
+ status,
+ branchLike: projectBranchLike,
+ };
+ })
+ .sort((a, b) => Math.sign(b.failedConditions.length - a.failedConditions.length));
this.setState({
loadingStatus: false,