From 290f5128eafa6e4c406287caecaaecddf0ff2f78 Mon Sep 17 00:00:00 2001 From: Katia Aresti Date: Wed, 6 Dec 2023 16:36:49 +0100 Subject: [PATCH] Fixes small bug on persistence config parse --- src/app/Caches/Create/ReviewCacheConfig.tsx | 2 +- src/services/cacheConfigUtils.ts | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/app/Caches/Create/ReviewCacheConfig.tsx b/src/app/Caches/Create/ReviewCacheConfig.tsx index 3b32e31f3..b12dba8f6 100644 --- a/src/app/Caches/Create/ReviewCacheConfig.tsx +++ b/src/app/Caches/Create/ReviewCacheConfig.tsx @@ -74,7 +74,7 @@ const ReviewCacheConfig = (props: { onChange={onChangeConfig} isLineNumbersVisible code={config} - height="sizeToFit" + height={"400px"} isCopyEnabled isDarkTheme={theme === 'dark'} copyButtonSuccessTooltipText={t('caches.create.review.copied-tooltip')} diff --git a/src/services/cacheConfigUtils.ts b/src/services/cacheConfigUtils.ts index 379812ba8..3df501da6 100644 --- a/src/services/cacheConfigUtils.ts +++ b/src/services/cacheConfigUtils.ts @@ -386,9 +386,15 @@ export class CacheConfigUtils { cache[cacheType]['persistence'] = {}; } cache[cacheType]['persistence'].passivation = data.feature.persistentCache.passivation; - cache[cacheType]['persistence']['connection-attempts'] = data.feature.persistentCache.connectionAttempts; - cache[cacheType]['persistence']['connection-interval'] = data.feature.persistentCache.connectionInterval; - cache[cacheType]['persistence']['availability-interval'] = data.feature.persistentCache.availabilityInterval; + if (data.feature.persistentCache.connectionAttempts) { + cache[cacheType]['persistence']['connection-attempts'] = data.feature.persistentCache.connectionAttempts; + } + if (data.feature.persistentCache.connectionInterval) { + cache[cacheType]['persistence']['connection-interval'] = data.feature.persistentCache.connectionInterval; + } + if (data.feature.persistentCache.availabilityInterval) { + cache[cacheType]['persistence']['availability-interval'] = data.feature.persistentCache.availabilityInterval; + } }; if (data.advanced.concurrencyLevel || data.advanced.striping || data.advanced.lockAcquisitionTimeout) locking();