Browse Source

minor refactoring

pull/11861/head
YevhenBondarenko 2 years ago
parent
commit
2addd49266
  1. 2
      application/src/main/java/org/thingsboard/server/controller/TenantProfileController.java
  2. 2
      application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV1.java
  3. 6
      common/data/src/main/java/org/thingsboard/server/common/data/tenant/profile/DefaultTenantProfileConfiguration.java

2
application/src/main/java/org/thingsboard/server/controller/TenantProfileController.java

@ -151,7 +151,7 @@ public class TenantProfileController extends BaseController {
" \"maxJSExecutions\": 5000000,\n" +
" \"maxDPStorageDays\": 0,\n" +
" \"maxRuleNodeExecutionsPerMessage\": 50,\n" +
" \"maxRuleNodeDebugDurationMinutes\": 15,\n" +
" \"maxDebugModeDurationMinutes\": 15,\n" +
" \"maxEmails\": 0,\n" +
" \"maxSms\": 0,\n" +
" \"maxCreatedAlarms\": 1000,\n" +

2
application/src/main/java/org/thingsboard/server/service/edge/rpc/constructor/tenant/TenantMsgConstructorV1.java

@ -88,7 +88,7 @@ public class TenantMsgConstructorV1 implements TenantMsgConstructor {
configuration.setMaxTransportDataPoints(0);
configuration.setRuleEngineExceptionsTtlDays(0);
configuration.setMaxRuleNodeExecutionsPerMessage(0);
configuration.setMaxDebugDurationMinutes(0);
configuration.setMaxDebugModeDurationMinutes(0);
tenantProfileData.setConfiguration(configuration);
tenantProfile.setProfileData(tenantProfileData);

6
common/data/src/main/java/org/thingsboard/server/common/data/tenant/profile/DefaultTenantProfileConfiguration.java

@ -95,7 +95,7 @@ public class DefaultTenantProfileConfiguration implements TenantProfileConfigura
@Schema(example = "50")
private int maxRuleNodeExecutionsPerMessage;
@Schema(example = "15")
private int maxDebugDurationMinutes;
private int maxDebugModeDurationMinutes;
@Schema(example = "0")
private long maxEmails;
@Schema(example = "true")
@ -205,8 +205,8 @@ public class DefaultTenantProfileConfiguration implements TenantProfileConfigura
@Override
public int getMaxDebugModeDurationMinutes(int systemMaxDebugModeDurationMinutes) {
if (maxDebugDurationMinutes > 0) {
return Math.min(systemMaxDebugModeDurationMinutes, maxDebugDurationMinutes);
if (maxDebugModeDurationMinutes > 0) {
return Math.min(systemMaxDebugModeDurationMinutes, maxDebugModeDurationMinutes);
}
return systemMaxDebugModeDurationMinutes;
}

Loading…
Cancel
Save