aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java2
-rw-r--r--server/sonar-web/src/main/js/apps/about/components/AboutApp.js8
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/about/index.html.erb1
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java7
-rw-r--r--sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java2
5 files changed, 17 insertions, 3 deletions
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index d070de48002..e1815013c35 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -108,7 +108,7 @@ public class ComputeEngineContainerImplTest {
+ 25 // level 1
+ 47 // content of DaoModule
+ 2 // content of EsSearchModule
- + 62 // content of CorePropertyDefinitions
+ + 63 // content of CorePropertyDefinitions
+ 1 // content of CePropertyDefinitions
);
assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.js b/server/sonar-web/src/main/js/apps/about/components/AboutApp.js
index bc4c24d3c7c..05c0e1e39e1 100644
--- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.js
+++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.js
@@ -80,7 +80,7 @@ export default class AboutApp extends React.Component {
}
const isAuthenticated = !!window.SS.user;
- const { signUpAllowed } = window.sonarqube;
+ const { signUpAllowed, landingText } = window.sonarqube;
const loginFormShown = !isAuthenticated && this.props.location.query.login !== undefined;
const logoUrl = this.state.logoUrl || `${window.baseUrl}/images/logo.svg`;
@@ -114,6 +114,12 @@ export default class AboutApp extends React.Component {
)}
</div>
+ {landingText.length > 0 && (
+ <div className="about-page-section bordered-bottom">
+ <div className="about-page-container" dangerouslySetInnerHTML={{ __html: landingText }}/>
+ </div>
+ )}
+
<AboutCleanCode/>
<AboutIssues
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/about/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/about/index.html.erb
index 5a7fb782123..efaf6f1c578 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/about/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/about/index.html.erb
@@ -1,6 +1,7 @@
<% content_for :extra_script do %>
<script>
window.sonarqube.signUpAllowed = <%= Property.value("sonar.allowUsersToSignUp") == "true" ? "true" : "false" -%>;
+ window.sonarqube.landingText = '<%= escape_javascript configuration("sonar.lf.landingText", "") -%>';
<% auth_providers = Api::Utils.java_facade.getIdentityProviders().to_a %>
window.sonarqube.authProviders = [
diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
index 82c74404660..454f0842c74 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
@@ -197,6 +197,13 @@ public class CorePropertyDefinitions {
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL)
.build(),
+ PropertyDefinition.builder("sonar.lf.landingText")
+ .name("Landing page text")
+ .description("Optional text that is display on the landing page. Supports html.")
+ .category(CoreProperties.CATEGORY_GENERAL)
+ .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL)
+ .type(PropertyType.TEXT)
+ .build(),
// ISSUES
PropertyDefinition.builder(CoreProperties.DEFAULT_ISSUE_ASSIGNEE)
diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
index bf9d2501497..470cc2f2ed8 100644
--- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
@@ -35,7 +35,7 @@ public class CorePropertyDefinitionsTest {
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(64);
+ assertThat(defs).hasSize(65);
}
@Test