Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-16230 Run format #487

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 62 additions & 60 deletions src/app/Caches/Create/AdvancedOptionsConfigurator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {
Grid,
GridItem,
HelperText,
HelperTextItem, InputGroup, InputGroupItem,
HelperTextItem,
InputGroup,
InputGroupItem,
Switch,
TextInput
} from '@patternfly/react-core';
Expand Down Expand Up @@ -135,68 +137,68 @@ const AdvancedOptionsConfigurator = (props: { cacheManager: CacheManager }) => {
</HelperText>
<Grid hasGutter md={4}>
<GridItem span={4}>
<FormGroup
isInline
fieldId="field-concurrency-level"
label={t('caches.create.configurations.advanced-options.concurrency-level-title')}
labelIcon={
<PopoverHelp
name="concurrency-level"
label={t('caches.create.configurations.advanced-options.concurrency-level-title')}
content={t('caches.create.configurations.advanced-options.concurrency-level-tooltip')}
<FormGroup
isInline
fieldId="field-concurrency-level"
label={t('caches.create.configurations.advanced-options.concurrency-level-title')}
labelIcon={
<PopoverHelp
name="concurrency-level"
label={t('caches.create.configurations.advanced-options.concurrency-level-title')}
content={t('caches.create.configurations.advanced-options.concurrency-level-tooltip')}
/>
}
>
<TextInput
placeholder="32"
value={concurrencyLevel}
type="number"
onChange={(_event, value) => handleConcurrencyLevel(value)}
aria-label="concurrency-level-input"
data-cy="concurencyLevel"
/>
}
>
<TextInput
placeholder="32"
value={concurrencyLevel}
type="number"
onChange={(_event, value) => handleConcurrencyLevel(value)}
aria-label="concurrency-level-input"
data-cy="concurencyLevel"
/>
</FormGroup>
</FormGroup>
</GridItem>
<GridItem span={6}>
<FormGroup
isInline
fieldId="field-lock-acquisition-timeout"
label={t('caches.create.configurations.advanced-options.lock-acquisition-timeout-title')}
labelIcon={
<PopoverHelp
name="lock-acquisition-timeout"
label={t('caches.create.configurations.advanced-options.lock-acquisition-timeout-title')}
content={t('caches.create.configurations.advanced-options.lock-acquisition-timeout-tooltip')}
/>
}
>
<InputGroup>
<InputGroupItem>
<Grid>
<GridItem span={8}>
<TextInput
placeholder="10"
value={lockAcquisitionTimeout}
type="number"
onChange={(_event, value) => handleLockAcquisitionTimeout(value)}
aria-label="lock-acquisition-timeout-input"
data-cy="lockTimeout"
/>
</GridItem>
<GridItem span={4}>
<SelectSingle
id={'lockAcquisitionTimeoutUnitSelector'}
placeholder={''}
selected={lockAcquisitionTimeoutUnit || TimeUnits.milliseconds}
options={selectOptionProps(TimeUnits)}
style={{ width: '150px' }}
onSelect={(value) => setLockAcquisitionTimeoutUnit(value)}
/>
</GridItem>
</Grid>
</InputGroupItem>
</InputGroup>
</FormGroup>
<FormGroup
isInline
fieldId="field-lock-acquisition-timeout"
label={t('caches.create.configurations.advanced-options.lock-acquisition-timeout-title')}
labelIcon={
<PopoverHelp
name="lock-acquisition-timeout"
label={t('caches.create.configurations.advanced-options.lock-acquisition-timeout-title')}
content={t('caches.create.configurations.advanced-options.lock-acquisition-timeout-tooltip')}
/>
}
>
<InputGroup>
<InputGroupItem>
<Grid>
<GridItem span={8}>
<TextInput
placeholder="10"
value={lockAcquisitionTimeout}
type="number"
onChange={(_event, value) => handleLockAcquisitionTimeout(value)}
aria-label="lock-acquisition-timeout-input"
data-cy="lockTimeout"
/>
</GridItem>
<GridItem span={4}>
<SelectSingle
id={'lockAcquisitionTimeoutUnitSelector'}
placeholder={''}
selected={lockAcquisitionTimeoutUnit || TimeUnits.milliseconds}
options={selectOptionProps(TimeUnits)}
style={{ width: '150px' }}
onSelect={(value) => setLockAcquisitionTimeoutUnit(value)}
/>
</GridItem>
</Grid>
</InputGroupItem>
</InputGroup>
</FormGroup>
</GridItem>
<GridItem span={12}>
<FormGroup fieldId="field-striping">
Expand Down
24 changes: 13 additions & 11 deletions src/app/Caches/Create/AdvancedTuning/BackupsCofigurationTuning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const BackupsConfigurationTuning = () => {
);
const [mergePolicy, setMergePolicy] = useState(configuration.advanced.backupSetting?.mergePolicy);
const [maxCleanupDelay, setMaxCleanupDelay] = useState(configuration.advanced.backupSetting?.maxCleanupDelay);
const [maxCleanupDelayUnit, setMaxCleanupDelayUnit] = useState(configuration.advanced.backupSetting?.maxCleanupDelayUnit);
const [maxCleanupDelayUnit, setMaxCleanupDelayUnit] = useState(
configuration.advanced.backupSetting?.maxCleanupDelayUnit
);
const [tombstoneMapSize, setTombstoneMapSize] = useState(configuration.advanced.backupSetting?.tombstoneMapSize);

useEffect(() => {
Expand Down Expand Up @@ -69,9 +71,7 @@ const BackupsConfigurationTuning = () => {
<TextInput
placeholder="DEFAULT"
value={mergePolicy}
onChange={(_event, val) =>
setMergePolicy(val === ''? undefined! : val)
}
onChange={(_event, val) => setMergePolicy(val === '' ? undefined! : val)}
aria-label="merge-policy-input"
/>
</FormGroup>
Expand All @@ -87,12 +87,14 @@ const BackupsConfigurationTuning = () => {
/>
}
>
<TimeQuantityInputGroup name={'maxCleanupDelay'}
defaultValue={'30000'}
value={maxCleanupDelay}
valueModifier={setMaxCleanupDelay}
unit={maxCleanupDelayUnit}
unitModifier={setMaxCleanupDelayUnit}/>
<TimeQuantityInputGroup
name={'maxCleanupDelay'}
defaultValue={'30000'}
value={maxCleanupDelay}
valueModifier={setMaxCleanupDelay}
unit={maxCleanupDelayUnit}
unitModifier={setMaxCleanupDelayUnit}
/>
</FormGroup>

<FormGroup
Expand All @@ -112,7 +114,7 @@ const BackupsConfigurationTuning = () => {
value={tombstoneMapSize}
onChange={(_event, val) => {
const parsedVal = parseInt(val);
setTombstoneMapSize(isNaN(parsedVal) ? undefined! : parsedVal)
setTombstoneMapSize(isNaN(parsedVal) ? undefined! : parsedVal);
}}
aria-label="tombstone-map-size-input"
/>
Expand Down
70 changes: 37 additions & 33 deletions src/app/Caches/Create/AdvancedTuning/BackupsSiteConfigurator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ const BackupSiteConfigurator = (props: {
props.backupSiteOptions[props.index]?.failurePolicyClass
);

const [afterFailures, setAfterFailures] = useState(
props.backupSiteOptions![props.index]?.takeOffline?.afterFailures
);
const [afterFailures, setAfterFailures] = useState(props.backupSiteOptions![props.index]?.takeOffline?.afterFailures);
const [minWait, setMinWait] = useState(props.backupSiteOptions[props.index]?.takeOffline?.minWait);
const [minWaitUnit, setMinWaitUnit] = useState(props.backupSiteOptions[props.index]?.takeOffline?.minWaitUnit);

Expand Down Expand Up @@ -126,7 +124,7 @@ const BackupSiteConfigurator = (props: {
value={afterFailures}
onChange={(e, val) => {
const value = parseInt(val);
setAfterFailures(isNaN(value)? undefined!: value)
setAfterFailures(isNaN(value) ? undefined! : value);
}}
/>
</FormGroup>
Expand All @@ -141,12 +139,14 @@ const BackupSiteConfigurator = (props: {
/>
}
>
<TimeQuantityInputGroup name={'minwait'}
defaultValue={'0'}
value={minWait}
valueModifier={setMinWait}
unit={minWaitUnit}
unitModifier={setMinWaitUnit}/>
<TimeQuantityInputGroup
name={'minwait'}
defaultValue={'0'}
value={minWait}
valueModifier={setMinWait}
unit={minWaitUnit}
unitModifier={setMinWaitUnit}
/>
</FormGroup>
</React.Fragment>
);
Expand Down Expand Up @@ -211,7 +211,7 @@ const BackupSiteConfigurator = (props: {
value={chunckSize}
onChange={(e, val) => {
const value = parseInt(val);
setChunckSize(isNaN(value)? undefined!: value)
setChunckSize(isNaN(value) ? undefined! : value);
}}
/>
</FormGroup>
Expand All @@ -228,12 +228,14 @@ const BackupSiteConfigurator = (props: {
/>
}
>
<TimeQuantityInputGroup name={'timeoutStateTransfer'}
defaultValue={'1200000'}
value={timeoutStateTransfer}
valueModifier={setTimeoutStateTransfer}
unit={timeoutStateTransferUnit}
unitModifier={setTimeoutStateTransferUnit}/>
<TimeQuantityInputGroup
name={'timeoutStateTransfer'}
defaultValue={'1200000'}
value={timeoutStateTransfer}
valueModifier={setTimeoutStateTransfer}
unit={timeoutStateTransferUnit}
unitModifier={setTimeoutStateTransferUnit}
/>
</FormGroup>
</GridItem>
<GridItem span={6}>
Expand All @@ -255,7 +257,7 @@ const BackupSiteConfigurator = (props: {
value={maxRetries}
onChange={(e, val) => {
const value = parseInt(val);
setMaxRetries(isNaN(value)? undefined!: value)
setMaxRetries(isNaN(value) ? undefined! : value);
}}
/>
</FormGroup>
Expand All @@ -272,12 +274,14 @@ const BackupSiteConfigurator = (props: {
/>
}
>
<TimeQuantityInputGroup name={'waitTime'}
defaultValue={'2000'}
value={waitTime}
valueModifier={setWaitTime}
unit={waitTimeUnit}
unitModifier={setWaitTimeUnit}/>
<TimeQuantityInputGroup
name={'waitTime'}
defaultValue={'2000'}
value={waitTime}
valueModifier={setWaitTime}
unit={waitTimeUnit}
unitModifier={setWaitTimeUnit}
/>
</FormGroup>
</GridItem>
</React.Fragment>
Expand Down Expand Up @@ -342,12 +346,14 @@ const BackupSiteConfigurator = (props: {
/>
}
>
<TimeQuantityInputGroup name={'timeout'}
defaultValue={'15000'}
value={timeout}
valueModifier={setTimeout}
unit={timeoutUnit}
unitModifier={setTimeoutUnit}/>
<TimeQuantityInputGroup
name={'timeout'}
defaultValue={'15000'}
value={timeout}
valueModifier={setTimeout}
unit={timeoutUnit}
unitModifier={setTimeoutUnit}
/>
</FormGroup>
<FormGroup
fieldId="failurePolicyClass"
Expand All @@ -364,9 +370,7 @@ const BackupSiteConfigurator = (props: {
type="text"
id="failurePolicyClass"
value={failurePolicyClass}
onChange={(e, val) =>
setFailurePolicyClass(val === ''? undefined!: val)
}
onChange={(e, val) => setFailurePolicyClass(val === '' ? undefined! : val)}
/>
</FormGroup>
{formTakeOffline()}
Expand Down
40 changes: 23 additions & 17 deletions src/app/Caches/Create/AdvancedTuning/IndexedConfigurationTuning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ const IndexedConfigurationTuning = () => {

//Index Reader
const [refreshInterval, setRefreshInterval] = useState<number>(configuration.advanced.indexReader.refreshInterval!);
const [refreshIntervalUnit, setRefreshIntervalUnit] = useState<string>(configuration.advanced.indexReader.refreshIntervalUnit!);
const [refreshIntervalUnit, setRefreshIntervalUnit] = useState<string>(
configuration.advanced.indexReader.refreshIntervalUnit!
);

//Index Writer
const [commitInterval, setCommitInterval] = useState<number>(configuration.advanced.indexWriter.commitInterval!);
const [commitIntervalUnit, setCommitIntervalUnit] = useState<string>(configuration.advanced.indexWriter.commitIntervalUnit!);
const [commitIntervalUnit, setCommitIntervalUnit] = useState<string>(
configuration.advanced.indexWriter.commitIntervalUnit!
);
const [lowLevelTrace, setLowLevelTrace] = useState<boolean>(configuration.advanced.indexWriter.lowLevelTrace!);
const [maxBufferedEntries, setMaxBufferedEntries] = useState<number>(
configuration.advanced.indexWriter.maxBufferedEntries!
Expand Down Expand Up @@ -127,12 +131,14 @@ const IndexedConfigurationTuning = () => {
/>
}
>
<TimeQuantityInputGroup name={'refreshInterval'}
defaultValue={'0'}
value={refreshInterval}
valueModifier={setRefreshInterval}
unit={refreshIntervalUnit}
unitModifier={setRefreshIntervalUnit}/>
<TimeQuantityInputGroup
name={'refreshInterval'}
defaultValue={'0'}
value={refreshInterval}
valueModifier={setRefreshInterval}
unit={refreshIntervalUnit}
unitModifier={setRefreshIntervalUnit}
/>
</FormGroup>
</FormFieldGroupExpandable>
);
Expand Down Expand Up @@ -180,12 +186,14 @@ const IndexedConfigurationTuning = () => {
/>
}
>
<TimeQuantityInputGroup name={'commitInterval'}
defaultValue={'1000'}
value={commitInterval}
valueModifier={setCommitInterval}
unit={commitIntervalUnit}
unitModifier={setCommitIntervalUnit}/>
<TimeQuantityInputGroup
name={'commitInterval'}
defaultValue={'1000'}
value={commitInterval}
valueModifier={setCommitInterval}
unit={commitIntervalUnit}
unitModifier={setCommitIntervalUnit}
/>
</FormGroup>
<FormGroup
fieldId="ram-buffer-size"
Expand All @@ -203,9 +211,7 @@ const IndexedConfigurationTuning = () => {
placeholder="32"
value={ramBufferSize}
type="number"
onChange={(_event, val) =>
setRamBufferSize(isNaN(parseInt(val)) ?undefined! : parseInt(val))
}
onChange={(_event, val) => setRamBufferSize(isNaN(parseInt(val)) ? undefined! : parseInt(val))}
aria-label="ram-buffer-size"
/>
</FormGroup>
Expand Down
Loading
Loading