mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-15 12:23:51 +00:00
Revert "split url and searchParams allow for post option"
This reverts commit 54ab8d4ffe.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Control, useFieldArray, UseFormRegister } from 'react-hook-form';
|
||||
import { Button, IconButton, Input, Select, Switch } from '@chakra-ui/react';
|
||||
import { Button, IconButton, Input, Switch } from '@chakra-ui/react';
|
||||
import { FiChevronUp } from '@react-icons/all-files/fi/FiChevronUp';
|
||||
import { IoRemove } from '@react-icons/all-files/io5/IoRemove';
|
||||
import { HttpSettings, TimerLifeCycle } from 'ontime-types';
|
||||
@@ -40,10 +40,8 @@ export default function SubscriptionRow(props: SubscriptionRowProps) {
|
||||
return;
|
||||
}
|
||||
append({
|
||||
url: '',
|
||||
options: '',
|
||||
message: '',
|
||||
enabled: false,
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
@@ -72,26 +70,10 @@ export default function SubscriptionRow(props: SubscriptionRowProps) {
|
||||
size='xs'
|
||||
variant='ontime-filled-on-light'
|
||||
autoComplete='off'
|
||||
{...register(`subscriptions.${cycle}.${index}.url`, {
|
||||
{...register(`subscriptions.${cycle}.${index}.message`, {
|
||||
pattern: { value: startsWithHttpOrS, message: 'Request address must start with http://' },
|
||||
})}
|
||||
/>
|
||||
<Input
|
||||
placeholder='test=testtext'
|
||||
size='xs'
|
||||
variant='ontime-filled-on-light'
|
||||
autoComplete='off'
|
||||
{...register(`subscriptions.${cycle}.${index}.options`)}
|
||||
/>
|
||||
<Select
|
||||
variant='ontime-on-light'
|
||||
size='xs'
|
||||
width='6em'
|
||||
{...register(`subscriptions.${cycle}.${index}.method`)}
|
||||
>
|
||||
<option>GET</option>
|
||||
<option>POST</option>
|
||||
</Select>
|
||||
<Switch variant='ontime-on-light' {...register(`subscriptions.${cycle}.${index}.enabled`)} />
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user