aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2023-01-12 11:42:43 +0100
committersonartech <sonartech@sonarsource.com>2023-01-12 20:02:52 +0000
commit468f509a077be2da5aaece406bec54ad87b68f47 (patch)
tree9d21b800e54a9e588f7db6228285530ba855cd5b /server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
parent105204fa4727f1c77e0f293cc2a9dfa984493e7b (diff)
downloadsonarqube-468f509a077be2da5aaece406bec54ad87b68f47.tar.gz
sonarqube-468f509a077be2da5aaece406bec54ad87b68f47.zip
SONAR-17816 Improve QG display for Apps
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,