Browse Source

added ruleChainDebugPerTenantLimitsConfiguration to the system params

pull/11861/head
YevhenBondarenko 2 years ago
parent
commit
9dbade0b78
  1. 11
      application/src/main/java/org/thingsboard/server/controller/SystemInfoController.java
  2. 1
      common/data/src/main/java/org/thingsboard/server/common/data/SystemParams.java

11
application/src/main/java/org/thingsboard/server/controller/SystemInfoController.java

@ -74,6 +74,14 @@ public class SystemInfoController extends BaseController {
@Value("${actors.rule.node.max_debug_mode_duration:60}") @Value("${actors.rule.node.max_debug_mode_duration:60}")
private int maxRuleNodeDebugModeDurationMinutes; private int maxRuleNodeDebugModeDurationMinutes;
@Value("${actors.rule.chain.debug_mode_rate_limits_per_tenant.enabled:true}")
@Getter
private boolean ruleChainDebugPerTenantLimitsEnabled;
@Value("${actors.rule.chain.debug_mode_rate_limits_per_tenant.configuration:50000:3600}")
@Getter
private String ruleChainDebugPerTenantLimitsConfiguration;
@Autowired(required = false) @Autowired(required = false)
private BuildProperties buildProperties; private BuildProperties buildProperties;
@ -146,6 +154,9 @@ public class SystemInfoController extends BaseController {
DefaultTenantProfileConfiguration tenantProfileConfiguration = tenantProfileCache.get(tenantId).getDefaultProfileConfiguration(); DefaultTenantProfileConfiguration tenantProfileConfiguration = tenantProfileCache.get(tenantId).getDefaultProfileConfiguration();
systemParams.setMaxResourceSize(tenantProfileConfiguration.getMaxResourceSize()); systemParams.setMaxResourceSize(tenantProfileConfiguration.getMaxResourceSize());
systemParams.setMaxRuleNodeDebugDurationMinutes(tenantProfileConfiguration.getMaxRuleNodeDebugModeDurationMinutes(maxRuleNodeDebugModeDurationMinutes)); systemParams.setMaxRuleNodeDebugDurationMinutes(tenantProfileConfiguration.getMaxRuleNodeDebugModeDurationMinutes(maxRuleNodeDebugModeDurationMinutes));
if (ruleChainDebugPerTenantLimitsEnabled) {
systemParams.setRuleChainDebugPerTenantLimitsConfiguration(ruleChainDebugPerTenantLimitsConfiguration);
}
} }
systemParams.setMobileQrEnabled(Optional.ofNullable(mobileAppSettingsService.getMobileAppSettings(TenantId.SYS_TENANT_ID)) systemParams.setMobileQrEnabled(Optional.ofNullable(mobileAppSettingsService.getMobileAppSettings(TenantId.SYS_TENANT_ID))
.map(MobileAppSettings::getQrCodeConfig).map(QRCodeConfig::isShowOnHomePage) .map(MobileAppSettings::getQrCodeConfig).map(QRCodeConfig::isShowOnHomePage)

1
common/data/src/main/java/org/thingsboard/server/common/data/SystemParams.java

@ -33,4 +33,5 @@ public class SystemParams {
long maxResourceSize; long maxResourceSize;
boolean mobileQrEnabled; boolean mobileQrEnabled;
int maxRuleNodeDebugDurationMinutes; int maxRuleNodeDebugDurationMinutes;
String ruleChainDebugPerTenantLimitsConfiguration;
} }

Loading…
Cancel
Save