diff options
author | Belen Pruvost <belen.pruvost@sonarsource.com> | 2021-03-12 14:13:50 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-03-12 20:07:59 +0000 |
commit | ba182f9025c2b90eb0d9eb5cf0835e1a092dbad6 (patch) | |
tree | bd7712b4864c6a45373b79d52979b8fbdfcd275c /server/sonar-webserver-core | |
parent | 95f03eddc1e1fc1a97ac09daacfb0c12a648c430 (diff) | |
download | sonarqube-ba182f9025c2b90eb0d9eb5cf0835e1a092dbad6.tar.gz sonarqube-ba182f9025c2b90eb0d9eb5cf0835e1a092dbad6.zip |
SONAR-14519 - Update ALMs format and simplify System Info Page
Diffstat (limited to 'server/sonar-webserver-core')
2 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/AlmConfigurationSection.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/AlmConfigurationSection.java index 5af5cfa6f52..970d57081b0 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/AlmConfigurationSection.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/monitoring/AlmConfigurationSection.java @@ -54,18 +54,18 @@ public class AlmConfigurationSection implements SystemInfoSection { } private static String buildValue(AlmSettingDto almSettingDto) { - String value = String.format("alm:%s", almSettingDto.getRawAlm()); + String value = String.format("Alm:%s", almSettingDto.getRawAlm()); if (almSettingDto.getUrl() != null) { - value += String.format(", url:%s", almSettingDto.getUrl()); + value += String.format(", Url:%s", almSettingDto.getUrl()); } switch (almSettingDto.getAlm()) { case GITHUB: // add APP_ID and CLIENT_ID - value += String.format(", appId:%s, clientId:%s", almSettingDto.getAppId(), almSettingDto.getClientId()); + value += String.format(", App Id:%s, Client Id:%s", almSettingDto.getAppId(), almSettingDto.getClientId()); break; case BITBUCKET_CLOUD: // WORKSPACE ID & OAuth key - value += String.format(", workspace id:%s, OAuth Key:%s", almSettingDto.getAppId(), almSettingDto.getClientId()); + value += String.format(", Workspace Id:%s, OAuth Key:%s", almSettingDto.getAppId(), almSettingDto.getClientId()); break; default: // no additional information for the other ALMs diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java index 08b858c2ee2..59c3a3173de 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/monitoring/AlmConfigurationSectionTest.java @@ -50,11 +50,11 @@ public class AlmConfigurationSectionTest { assertThat(section.getAttributesList()) .extracting(Attribute::getKey, Attribute::getStringValue) .containsExactlyInAnyOrder( - tuple(azure.getKey(), String.format("alm:%s, url:%s", azure.getRawAlm(), azure.getUrl())), - tuple(github.getKey(), String.format("alm:%s, url:%s, appId:%s, clientId:%s", github.getRawAlm(), github.getUrl(), github.getAppId(), github.getClientId())), - tuple(gitlab.getKey(), String.format("alm:%s, url:%s", gitlab.getRawAlm(), gitlab.getUrl())), - tuple(bitbucket.getKey(), String.format("alm:%s, url:%s", bitbucket.getRawAlm(), bitbucket.getUrl())), - tuple(bitbucketCloud.getKey(), String.format("alm:%s, workspace id:%s, OAuth Key:%s", bitbucketCloud.getRawAlm(), bitbucketCloud.getAppId(), bitbucketCloud.getClientId()))); + tuple(azure.getKey(), String.format("Alm:%s, Url:%s", azure.getRawAlm(), azure.getUrl())), + tuple(github.getKey(), String.format("Alm:%s, Url:%s, App Id:%s, Client Id:%s", github.getRawAlm(), github.getUrl(), github.getAppId(), github.getClientId())), + tuple(gitlab.getKey(), String.format("Alm:%s, Url:%s", gitlab.getRawAlm(), gitlab.getUrl())), + tuple(bitbucket.getKey(), String.format("Alm:%s, Url:%s", bitbucket.getRawAlm(), bitbucket.getUrl())), + tuple(bitbucketCloud.getKey(), String.format("Alm:%s, Workspace Id:%s, OAuth Key:%s", bitbucketCloud.getRawAlm(), bitbucketCloud.getAppId(), bitbucketCloud.getClientId()))); } @Test @@ -68,8 +68,8 @@ public class AlmConfigurationSectionTest { assertThat(section.getAttributesList()) .extracting(Attribute::getKey, Attribute::getStringValue) .containsExactlyInAnyOrder( - tuple(gitlab1.getKey(), String.format("alm:%s, url:%s", gitlab1.getRawAlm(), gitlab1.getUrl())), - tuple(gitlab2.getKey(), String.format("alm:%s, url:%s", gitlab2.getRawAlm(), gitlab2.getUrl()))); + tuple(gitlab1.getKey(), String.format("Alm:%s, Url:%s", gitlab1.getRawAlm(), gitlab1.getUrl())), + tuple(gitlab2.getKey(), String.format("Alm:%s, Url:%s", gitlab2.getRawAlm(), gitlab2.getUrl()))); } @Test @@ -82,7 +82,7 @@ public class AlmConfigurationSectionTest { assertThat(section.getAttributesList()) .extracting(Attribute::getKey, Attribute::getStringValue) .containsExactlyInAnyOrder( - tuple(azure.getKey(), String.format("alm:%s", azure.getRawAlm()))); + tuple(azure.getKey(), String.format("Alm:%s", azure.getRawAlm()))); } } |