Browse Source

SONAR-8750 Return sonar.lf.sonarqube.com.enabled in api/navigation/global

tags/6.3-RC1
Julien Lancelot 7 years ago
parent
commit
21a188aad1

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/ui/ws/GlobalAction.java View File

@@ -35,6 +35,7 @@ import org.sonar.db.dialect.H2;
import org.sonar.server.ui.PageRepository;

import static org.sonar.api.CoreProperties.RATING_GRID;
import static org.sonar.core.config.WebConstants.SONARQUBE_DOT_COM_ENABLED;
import static org.sonar.core.config.WebConstants.SONAR_LF_ENABLE_GRAVATAR;
import static org.sonar.core.config.WebConstants.SONAR_LF_GRAVATAR_SERVER_URL;
import static org.sonar.core.config.WebConstants.SONAR_LF_LOGO_URL;
@@ -49,6 +50,7 @@ public class GlobalAction implements NavigationWsAction {
SONAR_LF_ENABLE_GRAVATAR,
SONAR_LF_GRAVATAR_SERVER_URL,
SONAR_UPDATECENTER_ACTIVATE,
SONARQUBE_DOT_COM_ENABLED,
RATING_GRID);

private final PageRepository pageRepository;

+ 1
- 0
server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java View File

@@ -88,6 +88,7 @@ public class GlobalActionTest {
settings.setProperty("sonar.lf.logoWidthPx", 135);
settings.setProperty("sonar.lf.gravatarServerUrl", "https://secure.gravatar.com/avatar/{EMAIL_MD5}.jpg?s={SIZE}&d=identicon");
settings.setProperty("sonar.lf.enableGravatar", true);
settings.setProperty("sonar.lf.sonarqube.com.enabled", true);
settings.setProperty("sonar.updatecenter.activate", false);
settings.setProperty("sonar.technicalDebt.ratingGrid", "0.05,0.1,0.2,0.5");
// This setting should be ignored as it's not needed

+ 1
- 0
server/sonar-server/src/test/resources/org/sonar/server/ui/ws/GlobalActionTest/settings.json View File

@@ -4,6 +4,7 @@
"sonar.lf.logoWidthPx": "135",
"sonar.lf.gravatarServerUrl": "https://secure.gravatar.com/avatar/{EMAIL_MD5}.jpg?s={SIZE}&d=identicon",
"sonar.lf.enableGravatar": "true",
"sonar.lf.sonarqube.com.enabled": "true",
"sonar.updatecenter.activate": "false",
"sonar.technicalDebt.ratingGrid": "0.05,0.1,0.2,0.5"
}

+ 1
- 1
sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java View File

@@ -192,7 +192,7 @@ public class CorePropertyDefinitions {
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL)
.build(),
PropertyDefinition.builder("sonar.lf.aboutText")
PropertyDefinition.builder(WebConstants.SONAR_LF_ABOUT_TEXT)
.name("About page text")
.description("Optional text that is displayed on the About page. Supports html.")
.category(CoreProperties.CATEGORY_GENERAL)

+ 2
- 0
sonar-core/src/main/java/org/sonar/core/config/WebConstants.java View File

@@ -29,7 +29,9 @@ public final class WebConstants {
public static final String SONAR_LF_GRAVATAR_SERVER_URL = "sonar.lf.gravatarServerUrl";
public static final String SONAR_LF_LOGO_URL = "sonar.lf.logoUrl";
public static final String SONAR_LF_LOGO_WIDTH_PX = "sonar.lf.logoWidthPx";
public static final String SONAR_LF_ABOUT_TEXT = "sonar.lf.aboutText";
public static final String SONAR_UPDATECENTER_ACTIVATE = "sonar.updatecenter.activate";
public static final String SONARQUBE_DOT_COM_ENABLED = "sonar.lf.sonarqube.com.enabled";

private WebConstants() {
}

Loading…
Cancel
Save