mirror of
https://github.com/supabase/supabase.git
synced 2026-05-06 22:18:00 +08:00
## Screenshots ### New cron job edge function timeout Before: <img width="1157" height="259" alt="image" src="https://github.com/user-attachments/assets/b5e056e7-6216-45a6-9cc6-15e56621c62a" /> After: <img width="1162" height="258" alt="image" src="https://github.com/user-attachments/assets/bfb12a20-8a11-47f1-b7e6-c1ebc2fc187e" /> ### New cron job http request timeout Before: <img width="1161" height="237" alt="image" src="https://github.com/user-attachments/assets/ad1dc7ef-e9ec-4219-8f84-f20025aa1c68" /> After: <img width="1160" height="231" alt="image" src="https://github.com/user-attachments/assets/eb4d0df2-db20-4e04-a78d-fa36656a2987" /> ### New queue, partition configuration Before: <img width="786" height="677" alt="image" src="https://github.com/user-attachments/assets/34b3f1fc-b1e8-434f-bfc7-8a5686bd1c29" /> After: <img width="778" height="668" alt="image" src="https://github.com/user-attachments/assets/f7423240-b810-47d6-af1d-9d5647c78843" /> ### Queue: send message dialog Before: <img width="522" height="411" alt="image" src="https://github.com/user-attachments/assets/f9cf5993-c7e4-4bd0-9718-0c9e85e41378" /> After: <img width="532" height="414" alt="image" src="https://github.com/user-attachments/assets/d965bfcc-c074-44a1-8a8f-ecdd4e766221" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Enhanced input field presentation for timeout, delay, and interval configurations with inline unit labels (milliseconds, seconds, messages) for improved clarity and consistency across integration settings. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
64 lines
2.0 KiB
TypeScript
64 lines
2.0 KiB
TypeScript
import { UseFormReturn } from 'react-hook-form'
|
|
import {
|
|
FormField,
|
|
InputGroup,
|
|
InputGroupAddon,
|
|
InputGroupInput,
|
|
InputGroupText,
|
|
Separator,
|
|
SheetSection,
|
|
} from 'ui'
|
|
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
|
|
|
|
import { CreateQueueForm } from './CreateQueueSheet.schema'
|
|
|
|
export function PartitionConfigFields({ form }: { form: UseFormReturn<CreateQueueForm> }) {
|
|
const queueType = form.watch('values.type')
|
|
|
|
if (queueType !== 'partitioned') return null
|
|
|
|
return (
|
|
<>
|
|
<SheetSection className="flex flex-col gap-3">
|
|
<FormField
|
|
control={form.control}
|
|
name="values.partitionInterval"
|
|
render={({ field: { ref, ...rest } }) => (
|
|
<FormItemLayout
|
|
label="Partition interval"
|
|
description="Number of messages per partition"
|
|
className="gap-1"
|
|
>
|
|
<InputGroup>
|
|
<InputGroupInput {...rest} type="number" placeholder="10000" />
|
|
<InputGroupAddon align="inline-end">
|
|
<InputGroupText>messages</InputGroupText>
|
|
</InputGroupAddon>
|
|
</InputGroup>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
<FormField
|
|
control={form.control}
|
|
name="values.retentionInterval"
|
|
render={({ field: { ref, ...rest } }) => (
|
|
<FormItemLayout
|
|
label="Retention interval"
|
|
description="Partitions older than this many messages behind the latest will be dropped"
|
|
className="gap-1"
|
|
>
|
|
<InputGroup>
|
|
<InputGroupInput {...rest} type="number" placeholder="10000" />
|
|
<InputGroupAddon align="inline-end">
|
|
<InputGroupText>messages</InputGroupText>
|
|
</InputGroupAddon>
|
|
</InputGroup>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
</SheetSection>
|
|
<Separator />
|
|
</>
|
|
)
|
|
}
|