## Links | ## Links | ||||
- [Website](https://www.sonarqube.org) | |||||
- [Download](https://www.sonarqube.org/downloads/) | |||||
- [Website](https://www.sonarsource.com/products/sonarqube) | |||||
- [Download](https://www.sonarsource.com/products/sonarqube/downloads) | |||||
- [Documentation](https://docs.sonarsource.com/sonarqube) | - [Documentation](https://docs.sonarsource.com/sonarqube) | ||||
- [Twitter](https://twitter.com/SonarQube) | - [Twitter](https://twitter.com/SonarQube) | ||||
- [SonarSource](https://www.sonarsource.com), author of SonarQube | - [SonarSource](https://www.sonarsource.com), author of SonarQube |
pom { | pom { | ||||
name = 'SonarQube' | name = 'SonarQube' | ||||
description = project.description | description = project.description | ||||
url = 'http://www.sonarqube.org/' | |||||
url = 'https://www.sonarsource.com/products/sonarqube' | |||||
organization { | organization { | ||||
name = 'SonarSource' | name = 'SonarSource' | ||||
url = 'http://www.sonarsource.com' | |||||
url = 'https://www.sonarsource.com' | |||||
} | } | ||||
licenses { | licenses { | ||||
license { | license { |
.setRef(1) | .setRef(1) | ||||
.setType(ComponentType.PROJECT) | .setType(ComponentType.PROJECT) | ||||
.addChildRef(2) | .addChildRef(2) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(SCM).setHref("https://github.com/SonarSource/sonar").build()) | .addLink(ScannerReport.ComponentLink.newBuilder().setType(SCM).setHref("https://github.com/SonarSource/sonar").build()) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(ISSUE).setHref("http://jira.sonarsource.com/").build()) | .addLink(ScannerReport.ComponentLink.newBuilder().setType(ISSUE).setHref("http://jira.sonarsource.com/").build()) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(CI).setHref("http://bamboo.ci.codehaus.org/browse/SONAR").build()) | .addLink(ScannerReport.ComponentLink.newBuilder().setType(CI).setHref("http://bamboo.ci.codehaus.org/browse/SONAR").build()) | ||||
assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.projectUuid())) | assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.projectUuid())) | ||||
.extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref, ProjectLinkDto::getName) | .extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref, ProjectLinkDto::getName) | ||||
.containsExactlyInAnyOrder( | .containsExactlyInAnyOrder( | ||||
tuple("homepage", "http://www.sonarqube.org", null), | |||||
tuple("homepage", "https://www.sonarsource.com/products/sonarqube", null), | |||||
tuple("scm", "https://github.com/SonarSource/sonar", null), | tuple("scm", "https://github.com/SonarSource/sonar", null), | ||||
tuple("issue", "http://jira.sonarsource.com/", null), | tuple("issue", "http://jira.sonarsource.com/", null), | ||||
tuple("ci", "http://bamboo.ci.codehaus.org/browse/SONAR", null)); | tuple("ci", "http://bamboo.ci.codehaus.org/browse/SONAR", null)); | ||||
@Test | @Test | ||||
public void nothing_to_do_when_link_already_exists() { | public void nothing_to_do_when_link_already_exists() { | ||||
mockBranch(true); | mockBranch(true); | ||||
db.projectLinks().insertProvidedLink(project.getProjectDto(), l -> l.setType("homepage").setName("Home").setHref("http://www.sonarqube.org")); | |||||
db.projectLinks().insertProvidedLink(project.getProjectDto(), l -> l.setType("homepage").setName("Home").setHref("https://www.sonarsource.com/products/sonarqube")); | |||||
treeRootHolder.setRoot(ReportComponent.builder(Component.Type.PROJECT, 1).setUuid(project.getMainBranchComponent().uuid()).build()); | treeRootHolder.setRoot(ReportComponent.builder(Component.Type.PROJECT, 1).setUuid(project.getMainBranchComponent().uuid()).build()); | ||||
reportReader.putComponent(ScannerReport.Component.newBuilder() | reportReader.putComponent(ScannerReport.Component.newBuilder() | ||||
.setRef(1) | .setRef(1) | ||||
.setType(ComponentType.PROJECT) | .setType(ComponentType.PROJECT) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.build()); | .build()); | ||||
underTest.execute(new TestComputationStepContext()); | underTest.execute(new TestComputationStepContext()); | ||||
assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.projectUuid())) | assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.projectUuid())) | ||||
.extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref) | .extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref) | ||||
.containsExactlyInAnyOrder(tuple("homepage", "http://www.sonarqube.org")); | |||||
.containsExactlyInAnyOrder(tuple("homepage", "https://www.sonarsource.com/products/sonarqube")); | |||||
} | } | ||||
@Test | @Test | ||||
reportReader.putComponent(ScannerReport.Component.newBuilder() | reportReader.putComponent(ScannerReport.Component.newBuilder() | ||||
.setRef(2) | .setRef(2) | ||||
.setType(ComponentType.MODULE) | .setType(ComponentType.MODULE) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.build()); | .build()); | ||||
underTest.execute(new TestComputationStepContext()); | underTest.execute(new TestComputationStepContext()); | ||||
reportReader.putComponent(ScannerReport.Component.newBuilder() | reportReader.putComponent(ScannerReport.Component.newBuilder() | ||||
.setRef(2) | .setRef(2) | ||||
.setType(ComponentType.FILE) | .setType(ComponentType.FILE) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.build()); | .build()); | ||||
underTest.execute(new TestComputationStepContext()); | underTest.execute(new TestComputationStepContext()); | ||||
reportReader.putComponent(ScannerReport.Component.newBuilder() | reportReader.putComponent(ScannerReport.Component.newBuilder() | ||||
.setRef(1) | .setRef(1) | ||||
.setType(ComponentType.PROJECT) | .setType(ComponentType.PROJECT) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.build()); | .build()); | ||||
underTest.execute(new TestComputationStepContext()); | underTest.execute(new TestComputationStepContext()); | ||||
assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.getProjectDto().getUuid())) | assertThat(db.getDbClient().projectLinkDao().selectByProjectUuid(db.getSession(), project.getProjectDto().getUuid())) | ||||
.extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref) | .extracting(ProjectLinkDto::getType, ProjectLinkDto::getHref) | ||||
.containsExactlyInAnyOrder(tuple("homepage", "http://www.sonarqube.org")); | |||||
.containsExactlyInAnyOrder(tuple("homepage", "https://www.sonarsource.com/products/sonarqube")); | |||||
} | } | ||||
@Test | @Test | ||||
reportReader.putComponent(ScannerReport.Component.newBuilder() | reportReader.putComponent(ScannerReport.Component.newBuilder() | ||||
.setRef(1) | .setRef(1) | ||||
.setType(ComponentType.PROJECT) | .setType(ComponentType.PROJECT) | ||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("http://www.sonarqube.org").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.addLink(ScannerReport.ComponentLink.newBuilder().setType(HOME).setHref("https://www.sonarsource.com/products/sonarqube").build()) | |||||
.build()); | .build()); | ||||
assertThatThrownBy(() -> underTest.execute(new TestComputationStepContext())) | assertThatThrownBy(() -> underTest.execute(new TestComputationStepContext())) |
static final String DESCRIPTION = "Check upgrade possibility for not analyzed code files."; | static final String DESCRIPTION = "Check upgrade possibility for not analyzed code files."; | ||||
private static final String LANGUAGE_UPGRADE_MESSAGE = "%s detected in this project during the last analysis. %s cannot be analyzed with your" + | private static final String LANGUAGE_UPGRADE_MESSAGE = "%s detected in this project during the last analysis. %s cannot be analyzed with your" + | ||||
" current SonarQube edition. Please consider <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to" + | |||||
" current SonarQube edition. Please consider <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to" + | |||||
" Developer Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in %s."; | " Developer Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in %s."; | ||||
private final BatchReportReader reportReader; | private final BatchReportReader reportReader; |
.containsExactly(tuple( | .containsExactly(tuple( | ||||
"10 unanalyzed C, 20 unanalyzed C++ and 1000 unanalyzed SomeLang files were detected in this project during the last analysis. C," + | "10 unanalyzed C, 20 unanalyzed C++ and 1000 unanalyzed SomeLang files were detected in this project during the last analysis. C," + | ||||
" C++ and SomeLang cannot be analyzed with your current SonarQube edition. Please consider" + | " C++ and SomeLang cannot be analyzed with your current SonarQube edition. Please consider" + | ||||
" <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to Developer Edition</a> to find Bugs," + | |||||
" <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer Edition</a> to find Bugs," + | |||||
" Code Smells, Vulnerabilities and Security Hotspots in these files.", | " Code Smells, Vulnerabilities and Security Hotspots in these files.", | ||||
MessageType.SUGGEST_DEVELOPER_EDITION_UPGRADE)); | MessageType.SUGGEST_DEVELOPER_EDITION_UPGRADE)); | ||||
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10); | assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10); | ||||
List<CeTaskMessages.Message> messages = argumentCaptor.getAllValues(); | List<CeTaskMessages.Message> messages = argumentCaptor.getAllValues(); | ||||
assertThat(messages).extracting(CeTaskMessages.Message::getText).containsExactly( | assertThat(messages).extracting(CeTaskMessages.Message::getText).containsExactly( | ||||
"10 unanalyzed C files were detected in this project during the last analysis. C cannot be analyzed with your current SonarQube edition. Please" + | "10 unanalyzed C files were detected in this project during the last analysis. C cannot be analyzed with your current SonarQube edition. Please" + | ||||
" consider <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to Developer" + | |||||
" consider <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer" + | |||||
" Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in this file."); | " Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in this file."); | ||||
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10); | assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY).get().getIntValue()).isEqualTo(10); | ||||
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY)).isEmpty(); | assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY)).isEmpty(); | ||||
List<CeTaskMessages.Message> messages = argumentCaptor.getAllValues(); | List<CeTaskMessages.Message> messages = argumentCaptor.getAllValues(); | ||||
assertThat(messages).extracting(CeTaskMessages.Message::getText).containsExactly( | assertThat(messages).extracting(CeTaskMessages.Message::getText).containsExactly( | ||||
"1 unanalyzed C++ file was detected in this project during the last analysis. C++ cannot be analyzed with your current SonarQube edition. Please" + | "1 unanalyzed C++ file was detected in this project during the last analysis. C++ cannot be analyzed with your current SonarQube edition. Please" + | ||||
" consider <a target=\"_blank\" href=\"https://www.sonarqube.org/trial-request/developer-edition/?referrer=sonarqube-cpp\">upgrading to Developer" + | |||||
" consider <a target=\"_blank\" href=\"https://www.sonarsource.com/plans-and-pricing/developer/?referrer=sonarqube-cpp\">upgrading to Developer" + | |||||
" Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in this file."); | " Edition</a> to find Bugs, Code Smells, Vulnerabilities and Security Hotspots in this file."); | ||||
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY).get().getIntValue()).isOne(); | assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_CPP_KEY).get().getIntValue()).isOne(); | ||||
assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY)).isEmpty(); | assertThat(measureRepository.getAddedRawMeasure(PROJECT_REF, UNANALYZED_C_KEY)).isEmpty(); |
.setProjectUuid(project2.uuid()) | .setProjectUuid(project2.uuid()) | ||||
.setType("homepage") | .setType("homepage") | ||||
.setName("Home") | .setName("Home") | ||||
.setHref("http://www.sonarqube.org")); | |||||
.setHref("https://www.sonarsource.com/products/sonarqube")); | |||||
db.getSession().commit(); | db.getSession().commit(); | ||||
ProjectLinkDto reloaded = underTest.selectByUuid(db.getSession(), link.getUuid()); | ProjectLinkDto reloaded = underTest.selectByUuid(db.getSession(), link.getUuid()); | ||||
assertThat(reloaded.getProjectUuid()).isEqualTo(project2.uuid()); | assertThat(reloaded.getProjectUuid()).isEqualTo(project2.uuid()); | ||||
assertThat(reloaded.getType()).isEqualTo("homepage"); | assertThat(reloaded.getType()).isEqualTo("homepage"); | ||||
assertThat(reloaded.getName()).isEqualTo("Home"); | assertThat(reloaded.getName()).isEqualTo("Home"); | ||||
assertThat(reloaded.getHref()).isEqualTo("http://www.sonarqube.org"); | |||||
assertThat(reloaded.getHref()).isEqualTo("https://www.sonarsource.com/products/sonarqube"); | |||||
assertThat(reloaded.getCreatedAt()).isEqualTo(PAST); | assertThat(reloaded.getCreatedAt()).isEqualTo(PAST); | ||||
assertThat(reloaded.getUpdatedAt()).isEqualTo(NOW); | assertThat(reloaded.getUpdatedAt()).isEqualTo(NOW); | ||||
} | } |
.setProjectUuid("EFGH") | .setProjectUuid("EFGH") | ||||
.setType("homepage") | .setType("homepage") | ||||
.setName("Home") | .setName("Home") | ||||
.setHref("http://www.sonarqube.org") | |||||
.setHref("https://www.sonarsource.com/products/sonarqube") | |||||
.setCreatedAt(1_000_000_000L) | .setCreatedAt(1_000_000_000L) | ||||
.setUpdatedAt(5_000_000_000L); | .setUpdatedAt(5_000_000_000L); | ||||
assertThat(dto.getProjectUuid()).isEqualTo("EFGH"); | assertThat(dto.getProjectUuid()).isEqualTo("EFGH"); | ||||
assertThat(dto.getType()).isEqualTo("homepage"); | assertThat(dto.getType()).isEqualTo("homepage"); | ||||
assertThat(dto.getName()).isEqualTo("Home"); | assertThat(dto.getName()).isEqualTo("Home"); | ||||
assertThat(dto.getHref()).isEqualTo("http://www.sonarqube.org"); | |||||
assertThat(dto.getHref()).isEqualTo("https://www.sonarsource.com/products/sonarqube"); | |||||
assertThat(dto.getCreatedAt()).isEqualTo(1_000_000_000L); | assertThat(dto.getCreatedAt()).isEqualTo(1_000_000_000L); | ||||
assertThat(dto.getUpdatedAt()).isEqualTo(5_000_000_000L); | assertThat(dto.getUpdatedAt()).isEqualTo(5_000_000_000L); | ||||
} | } |
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>https://sonarqube.org</td> | |||||
<td>https://www.sonarsource.com/products/sonarqube</td> | |||||
<td className="markdown"> | <td className="markdown"> | ||||
<a href="https://sonarqube.org">https://sonarqube.org</a> | |||||
<a href="https://www.sonarsource.com/products/sonarqube"> | |||||
https://www.sonarsource.com/products/sonarqube | |||||
</a> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td className="text-top">[SonarQube™ Home Page](https://www.sonarqube.org)</td> | |||||
<td className="text-top"> | |||||
[SonarQube™ Home Page](https://www.sonarsource.com/products/sonarqube) | |||||
</td> | |||||
<td className="markdown text-top"> | <td className="markdown text-top"> | ||||
<a href="https://www.sonarqube.org">SonarQube™ Home Page</a> | |||||
<a href="https://www.sonarsource.com/products/sonarqube">SonarQube™ Home Page</a> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> |
<div> | <div> | ||||
This application is based on{' '} | This application is based on{' '} | ||||
<a | <a | ||||
href="https://www.sonarqube.org/?referrer=sonarqube" | |||||
href="https://www.sonarsource.com/products/sonarqube/?referrer=sonarqube" | |||||
rel="noopener noreferrer" | rel="noopener noreferrer" | ||||
target="_blank" | target="_blank" | ||||
title="SonarQube™" | title="SonarQube™" |
<div className="toaster-actions spacer-left padded-left display-flex-column display-flex-center"> | <div className="toaster-actions spacer-left padded-left display-flex-column display-flex-center"> | ||||
<a | <a | ||||
className="button button-primary big-spacer-bottom" | className="button button-primary big-spacer-bottom" | ||||
href="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-welcome" | |||||
href="https://www.sonarsource.com/products/sonarlint/?referrer=sonarqube-welcome" | |||||
rel="noreferrer" | rel="noreferrer" | ||||
onClick={onClick} | onClick={onClick} | ||||
target="_blank" | target="_blank" |
> | > | ||||
<a | <a | ||||
className="button button-primary big-spacer-bottom" | className="button button-primary big-spacer-bottom" | ||||
href="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-welcome" | |||||
href="https://www.sonarsource.com/products/sonarlint/?referrer=sonarqube-welcome" | |||||
onClick={[Function]} | onClick={[Function]} | ||||
rel="noreferrer" | rel="noreferrer" | ||||
target="_blank" | target="_blank" |
</p> | </p> | ||||
<p> | <p> | ||||
<Link | <Link | ||||
to="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks" | |||||
to="https://www.sonarsource.com/plans-and-pricing/enterprise/?referrer=sonarqube-background-tasks" | |||||
target="_blank" | target="_blank" | ||||
> | > | ||||
{translate('learn_more')} | {translate('learn_more')} |
link: ( | link: ( | ||||
<> | <> | ||||
<DiscreetLink | <DiscreetLink | ||||
to="https://www.sonarqube.org/sonarlint/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarqube" | |||||
rel="noopener noreferrer" | rel="noopener noreferrer" | ||||
target="_blank" | target="_blank" | ||||
showExternalIcon={false} | showExternalIcon={false} |
<ItemDivider /> | <ItemDivider /> | ||||
<ItemHeader id="stay_connected">{translate('docs.stay_connected')}</ItemHeader> | <ItemHeader id="stay_connected">{translate('docs.stay_connected')}</ItemHeader> | ||||
<IconLink | <IconLink | ||||
link="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
link="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
text={translate('docs.news')} | text={translate('docs.news')} | ||||
/> | /> | ||||
<IconLink | <IconLink | ||||
link="https://www.sonarqube.org/roadmap/?referrer=sonarqube" | |||||
link="https://www.sonarsource.com/products/sonarqube/roadmap/?referrer=sonarqube" | |||||
text={translate('docs.roadmap')} | text={translate('docs.roadmap')} | ||||
/> | /> | ||||
<IconLink | <IconLink |
values={{ | values={{ | ||||
link: ( | link: ( | ||||
<Link | <Link | ||||
to="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix" | |||||
to="https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarqube-quick-fix" | |||||
target="_blank" | target="_blank" | ||||
> | > | ||||
SonarLint | SonarLint |
<div className="modal-foot"> | <div className="modal-foot"> | ||||
<Link | <Link | ||||
className="pull-left link-no-underline display-flex-center" | className="pull-left link-no-underline display-flex-center" | ||||
to="https://www.sonarqube.org/downloads/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/downloads/?referrer=sonarqube" | |||||
target="_blank" | target="_blank" | ||||
> | > | ||||
{translate('system.see_sonarqube_downloads')} | {translate('system.see_sonarqube_downloads')} |
{!isPatch && ( | {!isPatch && ( | ||||
<Link | <Link | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
target="_blank" | target="_blank" | ||||
> | > | ||||
{translate('system.see_whats_new')} | {translate('system.see_whats_new')} |
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="pull-left link-no-underline display-flex-center" | className="pull-left link-no-underline display-flex-center" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/downloads/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/downloads/?referrer=sonarqube" | |||||
> | > | ||||
system.see_sonarqube_downloads | system.see_sonarqube_downloads | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="pull-left link-no-underline display-flex-center" | className="pull-left link-no-underline display-flex-center" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/downloads/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/downloads/?referrer=sonarqube" | |||||
> | > | ||||
system.see_sonarqube_downloads | system.see_sonarqube_downloads | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="pull-left link-no-underline display-flex-center" | className="pull-left link-no-underline display-flex-center" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/downloads/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/downloads/?referrer=sonarqube" | |||||
> | > | ||||
system.see_sonarqube_downloads | system.see_sonarqube_downloads | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="pull-left link-no-underline display-flex-center" | className="pull-left link-no-underline display-flex-center" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/downloads/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/downloads/?referrer=sonarqube" | |||||
> | > | ||||
system.see_sonarqube_downloads | system.see_sonarqube_downloads | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="pull-left link-no-underline display-flex-center" | className="pull-left link-no-underline display-flex-center" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/downloads/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/downloads/?referrer=sonarqube" | |||||
> | > | ||||
system.see_sonarqube_downloads | system.see_sonarqube_downloads | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> |
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
> | > | ||||
system.see_whats_new | system.see_whats_new | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
> | > | ||||
system.see_whats_new | system.see_whats_new | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
> | > | ||||
system.see_whats_new | system.see_whats_new | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
> | > | ||||
system.see_whats_new | system.see_whats_new | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
> | > | ||||
system.see_whats_new | system.see_whats_new | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> | ||||
<ForwardRef(Link) | <ForwardRef(Link) | ||||
className="spacer-left medium" | className="spacer-left medium" | ||||
target="_blank" | target="_blank" | ||||
to="https://www.sonarqube.org/whats-new/?referrer=sonarqube" | |||||
to="https://www.sonarsource.com/products/sonarqube/whats-new/?referrer=sonarqube" | |||||
> | > | ||||
system.see_whats_new | system.see_whats_new | ||||
</ForwardRef(Link)> | </ForwardRef(Link)> |
{ | { | ||||
"message": "Login message set by admin with a link to [SonarQube Home Page](https://www.sonarqube.org)" | |||||
"message": "Login message set by admin with a link to [SonarQube Home Page](https://www.sonarsource.com/products/sonarqube)" | |||||
} | } |
private final LoginMessageFeature loginMessageFeature = mock(LoginMessageFeature.class); | private final LoginMessageFeature loginMessageFeature = mock(LoginMessageFeature.class); | ||||
private final LoginMessageAction underTest = new LoginMessageAction(dbClient, loginMessageFeature); | private final LoginMessageAction underTest = new LoginMessageAction(dbClient, loginMessageFeature); | ||||
private final WsActionTester ws = new WsActionTester(underTest); | private final WsActionTester ws = new WsActionTester(underTest); | ||||
private static final String LOGIN_MESSAGE_TEXT = "test link [SonarQube™ Home Page](https://www.sonarqube.org)\n* list 1\n* list 2"; | |||||
private static final String FORMATTED_LOGIN_MESSAGE_TEXT = "test link \\u003ca href\\u003d\\\"https://www.sonarqube.org\\\" target\\u003d\\\"_blank\\\" rel\\u003d\\\"noopener noreferrer\\\"\\u003eSonarQube\\u0026trade; Home Page\\u003c/a\\u003e\\u003cbr/\\u003e\\u003cul\\u003e\\u003cli\\u003elist 1\\u003c/li\\u003e\\n\\u003cli\\u003elist 2\\u003c/li\\u003e\\u003c/ul\\u003e"; | |||||
private static final String LOGIN_MESSAGE_TEXT = "test link [SonarQube™ Home Page](https://www.sonarsource.com/products/sonarqube)\n* list 1\n* list 2"; | |||||
private static final String FORMATTED_LOGIN_MESSAGE_TEXT = "test link \\u003ca href\\u003d\\\"https://www.sonarsource.com/products/sonarqube\\\" target\\u003d\\\"_blank\\\" rel\\u003d\\\"noopener noreferrer\\\"\\u003eSonarQube\\u0026trade; Home Page\\u003c/a\\u003e\\u003cbr/\\u003e\\u003cul\\u003e\\u003cli\\u003elist 1\\u003c/li\\u003e\\n\\u003cli\\u003elist 2\\u003c/li\\u003e\\u003c/ul\\u003e"; | |||||
private static final String JSON_RESPONSE = "{\"message\":\"" + FORMATTED_LOGIN_MESSAGE_TEXT + "\"}"; | private static final String JSON_RESPONSE = "{\"message\":\"" + FORMATTED_LOGIN_MESSAGE_TEXT + "\"}"; | ||||
private static final String EMPTY_JSON_RESPONSE = "{\"message\":\"\"}"; | private static final String EMPTY_JSON_RESPONSE = "{\"message\":\"\"}"; | ||||
private PropertiesDao propertiesDao; | private PropertiesDao propertiesDao; |