|
|
|
@ -18,6 +18,7 @@ package org.thingsboard.server.controller; |
|
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
|
import io.swagger.v3.oas.annotations.media.ArraySchema; |
|
|
|
import io.swagger.v3.oas.annotations.media.Schema; |
|
|
|
import jakarta.validation.Valid; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.http.HttpStatus; |
|
|
|
@ -160,7 +161,12 @@ public class TenantProfileController extends BaseController { |
|
|
|
" \"rpcTtlDays\": 0,\n" + |
|
|
|
" \"queueStatsTtlDays\": 0,\n" + |
|
|
|
" \"ruleEngineExceptionsTtlDays\": 0,\n" + |
|
|
|
" \"warnThreshold\": 0\n" + |
|
|
|
" \"warnThreshold\": 0,\n" + |
|
|
|
" \"maxCalculatedFieldsPerEntity\": 5,\n" + |
|
|
|
" \"maxArgumentsPerCF\": 10,\n" + |
|
|
|
" \"maxDataPointsPerRollingArg\": 1000,\n" + |
|
|
|
" \"maxStateSizeInKBytes\": 32,\n" + |
|
|
|
" \"maxSingleValueArgumentSizeInKBytes\": 2" + |
|
|
|
" }\n" + |
|
|
|
" },\n" + |
|
|
|
" \"default\": false\n" + |
|
|
|
@ -172,7 +178,7 @@ public class TenantProfileController extends BaseController { |
|
|
|
@RequestMapping(value = "/tenantProfile", method = RequestMethod.POST) |
|
|
|
@ResponseBody |
|
|
|
public TenantProfile saveTenantProfile(@Parameter(description = "A JSON value representing the tenant profile.") |
|
|
|
@RequestBody TenantProfile tenantProfile) throws ThingsboardException { |
|
|
|
@Valid @RequestBody TenantProfile tenantProfile) throws ThingsboardException { |
|
|
|
TenantProfile oldProfile; |
|
|
|
if (tenantProfile.getId() == null) { |
|
|
|
accessControlService.checkPermission(getCurrentUser(), Resource.TENANT_PROFILE, Operation.CREATE); |
|
|
|
|