From: Wouter Admiraal Date: Mon, 15 Jun 2020 08:09:03 +0000 (+0200) Subject: SONAR-13459 Sort Quality Profiles by display name X-Git-Tag: 8.4.0.35506~92 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8cbfbbe99dab20d6ecf3477d64888e474dbe6428;p=sonarqube.git SONAR-13459 Sort Quality Profiles by display name --- diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx index e03ae4f3b72..ba36aed88ab 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx @@ -102,7 +102,12 @@ export default class ProfilesList extends React.PureComponent { const profilesToShow = language ? pick(profilesIndex, language) : profilesIndex; - const languagesToShow = sortBy(Object.keys(profilesToShow)); + let languagesToShow: string[]; + if (language) { + languagesToShow = languages.find(({ key }) => key === language) ? [language] : []; + } else { + languagesToShow = sortBy(languages, ({ name }) => name).map(({ key }) => key); + } return (