picoContainer.getComponentAdapters().stream()
.map(ComponentAdapter::getComponentImplementation)
.collect(Collectors.toList())).contains((Class) StartableHazelcastMember.class,
- (Class) CeDistributedInformationImpl.class);
+ (Class) CeDistributedInformationImpl.class);
underTest.stop();
}
+ 4 // content of ReportAnalysisFailureNotificationModule
+ 3 // CeCleaningModule + its content
+ 1 // CeDistributedInformation
- );
+ );
assertThat(picoContainer.getParent().getComponentAdapters()).hasSize(
CONTAINER_ITSELF
+ 5 // level 3
+ 26 // level 1
+ 51 // content of DaoModule
+ 3 // content of EsSearchModule
- + 65 // content of CorePropertyDefinitions
+ + 66 // content of CorePropertyDefinitions
+ 1 // StopFlagContainer
);
assertThat(
picoContainer.getComponentAdapters().stream()
.map(ComponentAdapter::getComponentImplementation)
.collect(Collectors.toList())).doesNotContain((Class) StartableHazelcastMember.class,
- (Class) CeDistributedInformationImpl.class).contains(
- (Class) StandaloneCeDistributedInformation.class);
+ (Class) CeDistributedInformationImpl.class).contains(
+ (Class) StandaloneCeDistributedInformation.class);
assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
underTest.stop();
import org.sonar.server.user.UserSession;
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.SONARCLOUD_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;
SONAR_LF_ENABLE_GRAVATAR,
SONAR_LF_GRAVATAR_SERVER_URL,
SONAR_UPDATECENTER_ACTIVATE,
- SONARQUBE_DOT_COM_ENABLED,
+ SONARCLOUD_ENABLED,
RATING_GRID);
private final PageRepository pageRepository;
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.sonarcloud.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
"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.sonarcloud.enabled": "true",
"sonar.updatecenter.activate": "false",
"sonar.technicalDebt.ratingGrid": "0.05,0.1,0.2,0.5"
}
if (this.mounted) {
const onSonarCloud =
appState.settings != undefined &&
- appState.settings['sonar.lf.sonarqube.com.enabled'] === 'true';
+ appState.settings['sonar.sonarcloud.enabled'] === 'true';
this.setState({
branchesEnabled: appState.branchesEnabled,
canAdmin: appState.canAdmin,
}
const mapStateToProps = state => ({
- sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.lf.sonarqube.com.enabled')
+ sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled')
});
export default connect(mapStateToProps)(DefaultHelmetContainer);
const mapStateToProps = state => ({
sonarqubeVersion: getAppState(state).version,
productionDatabase: getAppState(state).productionDatabase,
- sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.lf.sonarqube.com.enabled')
+ sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled')
});
export default connect(mapStateToProps)(GlobalFooter);
}
const mapStateToProps = state => {
- const sonarCloudSetting = getGlobalSettingValue(state, 'sonar.lf.sonarqube.com.enabled');
+ const sonarCloudSetting = getGlobalSettingValue(state, 'sonar.sonarcloud.enabled');
return {
currentUser: getCurrentUser(state),
appState: getAppState(state),
currentUser: getCurrentUser(state),
customText: getGlobalSettingValue(state, 'sonar.lf.aboutText'),
- sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.lf.sonarqube.com.enabled')
+ sonarqubeDotCom: getGlobalSettingValue(state, 'sonar.sonarcloud.enabled')
});
const mapDispatchToProps = { fetchAboutPageSettings };
} from '../../../store/rootReducer';
const mapStateToProps = state => {
- const sonarCloudSetting = getGlobalSettingValue(state, 'sonar.lf.sonarqube.com.enabled');
+ const sonarCloudSetting = getGlobalSettingValue(state, 'sonar.sonarcloud.enabled');
return {
currentUser: getCurrentUser(state),
defs.addAll(WebhookProperties.all());
defs.addAll(TelemetryProperties.all());
defs.addAll(ScannerProperties.all());
+ defs.addAll(WebProperties.all());
defs.addAll(asList(
PropertyDefinition.builder(PROP_PASSWORD)
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";
+ public static final String SONARCLOUD_ENABLED = "sonar.sonarcloud.enabled";
private WebConstants() {
}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.core.config;
+
+import java.util.List;
+import org.sonar.api.PropertyType;
+import org.sonar.api.config.PropertyDefinition;
+
+import static java.util.Arrays.asList;
+
+public final class WebProperties {
+
+ private WebProperties() {
+ }
+
+ public static List<PropertyDefinition> all() {
+ return asList(
+ PropertyDefinition.builder(WebConstants.SONARCLOUD_ENABLED)
+ .deprecatedKey("sonar.lf.sonarqube.com.enabled")
+ .defaultValue("false")
+ .name("Enable SonarCloud look&feel")
+ .type(PropertyType.BOOLEAN)
+ .hidden()
+ .build());
+ }
+}
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(65);
+ assertThat(defs).hasSize(66);
}
@Test