}
@CheckForNull
- public boolean isActive() {
+ public Boolean isActive() {
return this.isActive;
}
}
@CheckForNull
- public boolean isLocal() {
+ public Boolean isLocal() {
return this.local;
}
@CheckForNull
- public boolean isOnboarded() {
+ public Boolean isOnboarded() {
return this.onboarded;
}
@CheckForNull
- public boolean isRoot() {
+ public Boolean isRoot() {
return this.root;
}
id="audit_logs.page.description.2"
defaultMessage={translate('audit_logs.page.description.2')}
values={{
- housekeeping: translate('audit_logs.houskeeping_policy', housekeepingPolicy),
+ housekeeping: translate('audit_logs.housekeeping_policy', housekeepingPolicy),
link: (
<Link to={{ pathname: '/admin/settings', query: { category: 'housekeeping' } }}>
{translate('audit_logs.page.description.link')}
handleDateSelection={[Function]}
handleOptionSelection={[Function]}
handleStartDownload={[Function]}
- housekeepingPolicy="monthly"
+ housekeepingPolicy="Monthly"
selection="today"
/>
`;
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`should render correctly for monthly housekeeping policy 1`] = `
+exports[`should render correctly for Monthly housekeeping policy 1`] = `
<div
className="page page-limited"
id="marketplace-page"
id="audit_logs.page.description.2"
values={
Object {
- "housekeeping": "audit_logs.houskeeping_policy.monthly",
+ "housekeeping": "audit_logs.housekeeping_policy.Monthly",
"link": <Link
onlyActiveOnIndex={false}
style={Object {}}
</div>
`;
-exports[`should render correctly for trimestrial housekeeping policy 1`] = `
+exports[`should render correctly for Trimestrial housekeeping policy 1`] = `
<div
className="page page-limited"
id="marketplace-page"
id="audit_logs.page.description.2"
values={
Object {
- "housekeeping": "audit_logs.houskeeping_policy.trimestrial",
+ "housekeeping": "audit_logs.housekeeping_policy.Trimestrial",
"link": <Link
onlyActiveOnIndex={false}
style={Object {}}
</div>
`;
-exports[`should render correctly for weekly housekeeping policy 1`] = `
+exports[`should render correctly for Weekly housekeeping policy 1`] = `
<div
className="page page-limited"
id="marketplace-page"
id="audit_logs.page.description.2"
values={
Object {
- "housekeeping": "audit_logs.houskeeping_policy.weekly",
+ "housekeeping": "audit_logs.housekeeping_policy.Weekly",
"link": <Link
onlyActiveOnIndex={false}
style={Object {}}
</div>
`;
-exports[`should render correctly for yearly housekeeping policy 1`] = `
+exports[`should render correctly for Yearly housekeeping policy 1`] = `
<div
className="page page-limited"
id="marketplace-page"
id="audit_logs.page.description.2"
values={
Object {
- "housekeeping": "audit_logs.houskeeping_policy.yearly",
+ "housekeeping": "audit_logs.housekeeping_policy.Yearly",
"link": <Link
onlyActiveOnIndex={false}
style={Object {}}
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
export enum HousekeepingPolicy {
- Weekly = 'weekly',
- Monthly = 'monthly',
- Trimestrial = 'trimestrial',
- Yearly = 'yearly'
+ Weekly = 'Weekly',
+ Monthly = 'Monthly',
+ Trimestrial = 'Trimestrial',
+ Yearly = 'Yearly'
}
export enum RangeOption {
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 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;
+
+public enum Frequency {
+ WEEKLY("Weekly", 7),
+ MONTHLY("Monthly", 30),
+ TRIMESTRIAL("Trimestrial", 90),
+ YEARLY("Yearly", 365);
+
+ final String description;
+ final int days;
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ Frequency(String description, int days) {
+ this.description = description;
+ this.days = days;
+ }
+}
String DAYS_BEFORE_DELETING_CLOSED_ISSUES = "sonar.dbcleaner.daysBeforeDeletingClosedIssues";
String DAYS_BEFORE_DELETING_INACTIVE_BRANCHES_AND_PRS = "sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs";
String BRANCHES_TO_KEEP_WHEN_INACTIVE = "sonar.dbcleaner.branchesToKeepWhenInactive";
+ String AUDIT_HOUSEKEEPING_FREQUENCY = "sonar.dbcleaner.auditHousekeeping";
}
import org.sonar.api.resources.Qualifiers;
import static java.util.Arrays.asList;
+import static org.sonar.core.config.Frequency.MONTHLY;
public final class PurgeProperties {
+ public static final String DEFAULT_FREQUENCY = MONTHLY.getDescription();
private PurgeProperties() {
}
#------------------------------------------------------------------------------
audit_logs.page=Audit Logs
-audit_logs.page.description.1=Audit logs help Administrators keep control and traceability of security related changes performed on the platform.
+audit_logs.page.description.1=Audit Logs help Administrators keep control and traceability of security related changes performed on the platform.
audit_logs.page.description.2=Your instance is set to keep audit logs for {housekeeping}. You can change the number of days by updating your {link}.
audit_logs.page.description.link=housekeeping policy
-audit_logs.houskeeping_policy.weekly=7 days
-audit_logs.houskeeping_policy.monthly=30 days
-audit_logs.houskeeping_policy.trimestrial=90 days
-audit_logs.houskeeping_policy.yearly=one year
+audit_logs.housekeeping_policy.Weekly=7 days
+audit_logs.housekeeping_policy.Monthly=30 days
+audit_logs.housekeeping_policy.Trimestrial=90 days
+audit_logs.housekeeping_policy.Yearly=one year
-audit_logs.download=Download audit logs
+audit_logs.download=Download Audit Logs
audit_logs.download_start.try_again=Try Again
audit_logs.download_start.sentence.1=Your download should start shortly. For longer periods this might take some time.
-audit_logs.download_start.sentence.2=If the download doesn’t start after a few seconds, contact your administrator.
+audit_logs.download_start.sentence.2=If the download doesn’t start after a few seconds, try to reduce the period for which you are fetching audit logs.
audit_logs.download_start.sentence.3=Change your selection above to download additional audit logs.
audit_logs.range_option.today=Today
property.category.housekeeping=Housekeeping
property.category.housekeeping.general=General
property.category.housekeeping.branchesAndPullRequests=Branches and Pull Requests
+property.category.housekeeping.auditLogs=Audit Logs
#------------------------------------------------------------------------------
* @since 8.1
*/
String CATEGORY_HOUSEKEEPING = "housekeeping";
+ /**
+ * @since 9.1
+ */
+ String CATEGORY_AUDIT_LOGS = "auditLogs";
/**
* @since 6.6