Browse Source

Merge branch 'rc' of github.com:thingsboard/thingsboard into rc

pull/13043/head
Igor Kulikov 1 year ago
parent
commit
e2e1e9347f
  1. 10
      application/src/main/data/upgrade/basic/schema_update.sql
  2. 5
      application/src/main/java/org/thingsboard/server/service/install/DefaultSystemDataLoaderService.java
  3. 2
      common/util/src/main/java/org/thingsboard/common/util/DebugModeUtil.java
  4. 5
      dao/src/main/java/org/thingsboard/server/dao/tenant/TenantProfileServiceImpl.java
  5. 3
      ui-ngx/src/app/modules/home/components/widget/lib/home-page/getting-started-widget.component.scss

10
application/src/main/data/upgrade/basic/schema_update.sql

@ -83,3 +83,13 @@ SET profile_data = profile_data
WHERE profile_data->'configuration'->>'maxCalculatedFieldsPerEntity' IS NULL;
-- UPDATE TENANT PROFILE CALCULATED FIELD LIMITS END
-- UPDATE TENANT PROFILE DEBUG DURATION START
UPDATE tenant_profile
SET profile_data = jsonb_set(profile_data, '{configuration,maxDebugModeDurationMinutes}', '15', true)
WHERE
profile_data->'configuration' ? 'maxDebugModeDurationMinutes' = false
OR (profile_data->'configuration'->>'maxDebugModeDurationMinutes')::int = 0;
-- UPDATE TENANT PROFILE DEBUG DURATION END

5
application/src/main/java/org/thingsboard/server/service/install/DefaultSystemDataLoaderService.java

@ -122,6 +122,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import static org.thingsboard.common.util.DebugModeUtil.DEBUG_MODE_DEFAULT_DURATION_MINUTES;
import static org.thingsboard.server.common.data.DataConstants.DEFAULT_DEVICE_TYPE;
import static org.thingsboard.server.service.security.auth.jwt.settings.DefaultJwtSettingsService.isSigningKeyDefault;
import static org.thingsboard.server.service.security.auth.jwt.settings.DefaultJwtSettingsService.validateKeyLength;
@ -199,7 +200,9 @@ public class DefaultSystemDataLoaderService implements SystemDataLoaderService {
tenantProfileService.findOrCreateDefaultTenantProfile(TenantId.SYS_TENANT_ID);
TenantProfileData isolatedRuleEngineTenantProfileData = new TenantProfileData();
isolatedRuleEngineTenantProfileData.setConfiguration(new DefaultTenantProfileConfiguration());
DefaultTenantProfileConfiguration configuration = new DefaultTenantProfileConfiguration();
configuration.setMaxDebugModeDurationMinutes(DEBUG_MODE_DEFAULT_DURATION_MINUTES);
isolatedRuleEngineTenantProfileData.setConfiguration(configuration);
TenantProfileQueueConfiguration mainQueueConfiguration = new TenantProfileQueueConfiguration();
mainQueueConfiguration.setName(DataConstants.MAIN_QUEUE_NAME);

2
common/util/src/main/java/org/thingsboard/common/util/DebugModeUtil.java

@ -22,7 +22,7 @@ import java.util.Set;
public final class DebugModeUtil {
private static final int DEBUG_MODE_DEFAULT_DURATION_MINUTES = 15;
public static final int DEBUG_MODE_DEFAULT_DURATION_MINUTES = 15;
private DebugModeUtil() {
}

5
dao/src/main/java/org/thingsboard/server/dao/tenant/TenantProfileServiceImpl.java

@ -44,6 +44,7 @@ import java.util.List;
import java.util.Optional;
import java.util.UUID;
import static org.thingsboard.common.util.DebugModeUtil.DEBUG_MODE_DEFAULT_DURATION_MINUTES;
import static org.thingsboard.server.dao.service.Validator.validateId;
@Service("TenantProfileDaoService")
@ -160,7 +161,9 @@ public class TenantProfileServiceImpl extends AbstractCachedEntityService<Tenant
defaultTenantProfile.setDefault(true);
defaultTenantProfile.setName("Default");
TenantProfileData profileData = new TenantProfileData();
profileData.setConfiguration(new DefaultTenantProfileConfiguration());
DefaultTenantProfileConfiguration configuration = new DefaultTenantProfileConfiguration();
configuration.setMaxDebugModeDurationMinutes(DEBUG_MODE_DEFAULT_DURATION_MINUTES);
profileData.setConfiguration(configuration);
defaultTenantProfile.setProfileData(profileData);
defaultTenantProfile.setDescription("Default tenant profile");
defaultTenantProfile.setIsolatedTbRuleEngine(false);

3
ui-ngx/src/app/modules/home/components/widget/lib/home-page/getting-started-widget.component.scss

@ -38,9 +38,6 @@
.tb-get-started-container {
flex: 1;
overflow: auto;
mat-stepper {
transform: scale(1); //fixed blur content
}
}
}

Loading…
Cancel
Save