fix: fix RETENTION period setting UI
This commit is contained in:
@@ -456,7 +456,9 @@
|
||||
{:else if setting.fieldType == 'seconds'}
|
||||
<div>
|
||||
<SecondsInput
|
||||
disabled={true || (setting.ee_only != undefined && !$enterpriseLicense)}
|
||||
max={setting.ee_only != undefined && !$enterpriseLicense
|
||||
? 60 * 60 * 24 * 30
|
||||
: undefined}
|
||||
bind:seconds={values[setting.key]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
export let seconds = 0
|
||||
export let hideDisplay = false
|
||||
export let disabled = false
|
||||
export let max: number | undefined = undefined
|
||||
|
||||
let day: TimeUnit = undefined
|
||||
let hour: TimeUnit = undefined
|
||||
let min: TimeUnit = undefined
|
||||
@@ -38,6 +40,9 @@
|
||||
(min || 0) * ONE_MINUTE_IN_SECONDS +
|
||||
(sec || 0)
|
||||
if (seconds < 0) seconds = 0
|
||||
if (max && seconds > max) {
|
||||
seconds = max
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -78,11 +78,11 @@ export const settings: Record<string, Setting[]> = {
|
||||
{
|
||||
label: 'Retention Period in secs',
|
||||
key: 'retention_period_secs',
|
||||
description: 'How long to keep the jobs data in the database.',
|
||||
description: 'How long to keep the jobs data in the database (max 30 days on CE)',
|
||||
fieldType: 'seconds',
|
||||
placeholder: '30',
|
||||
storage: 'setting',
|
||||
ee_only: 'You can only adjust this setting in the EE version',
|
||||
ee_only: 'You can only adjust this setting to above 30 days in the EE version',
|
||||
cloudonly: false
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user