mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 22:15:18 +00:00
Major additions: - Complete Next.js studio application with 1600+ components - Docker support (Dockerfile.combined, docker-compose.yml) - GCP deployment documentation and benchmarks - SQL benchmark scripts for performance testing - Sentry integration for monitoring - Comprehensive test suite and mocks Studio features: - Dashboard and admin interfaces - Data visualization components - Authentication and user management - API integration with RuVector backend - Static data and public assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
77 lines
2.4 KiB
TypeScript
77 lines
2.4 KiB
TypeScript
import { UseFormReturn } from 'react-hook-form'
|
|
|
|
import {
|
|
FormControl_Shadcn_,
|
|
FormField_Shadcn_,
|
|
FormItem_Shadcn_,
|
|
FormLabel_Shadcn_,
|
|
FormMessage_Shadcn_,
|
|
Input,
|
|
Select_Shadcn_,
|
|
SelectContent_Shadcn_,
|
|
SelectItem_Shadcn_,
|
|
SelectTrigger_Shadcn_,
|
|
SelectValue_Shadcn_,
|
|
SheetSection,
|
|
} from 'ui'
|
|
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
|
|
import { CreateCronJobForm } from './CreateCronJobSheet/CreateCronJobSheet.constants'
|
|
|
|
interface HttpRequestSectionProps {
|
|
form: UseFormReturn<CreateCronJobForm>
|
|
}
|
|
|
|
export const HttpRequestSection = ({ form }: HttpRequestSectionProps) => {
|
|
return (
|
|
<SheetSection className="flex flex-col gap-3">
|
|
<FormField_Shadcn_
|
|
control={form.control}
|
|
name="values.method"
|
|
render={({ field }) => (
|
|
<FormItem_Shadcn_>
|
|
<FormLabel_Shadcn_>Method</FormLabel_Shadcn_>
|
|
<Select_Shadcn_ onValueChange={field.onChange} value={field.value}>
|
|
<FormControl_Shadcn_>
|
|
<SelectTrigger_Shadcn_>
|
|
<SelectValue_Shadcn_ placeholder="Select a method for the HTTP request" />
|
|
</SelectTrigger_Shadcn_>
|
|
</FormControl_Shadcn_>
|
|
<SelectContent_Shadcn_>
|
|
<SelectItem_Shadcn_ value="GET">GET</SelectItem_Shadcn_>
|
|
<SelectItem_Shadcn_ value="POST">POST</SelectItem_Shadcn_>
|
|
</SelectContent_Shadcn_>
|
|
</Select_Shadcn_>
|
|
<FormMessage_Shadcn_ />
|
|
</FormItem_Shadcn_>
|
|
)}
|
|
/>
|
|
|
|
<FormField_Shadcn_
|
|
control={form.control}
|
|
name="values.endpoint"
|
|
render={({ field: { ref, ...rest } }) => (
|
|
<FormItemLayout label="Endpoint URL" className="gap-1">
|
|
<FormControl_Shadcn_>
|
|
<Input {...rest} placeholder="https://api.example.com/endpoint" />
|
|
</FormControl_Shadcn_>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
|
|
<FormField_Shadcn_
|
|
control={form.control}
|
|
name="values.timeoutMs"
|
|
render={({ field: { ref, ...rest } }) => (
|
|
<FormItemLayout label="Timeout" className="gap-1">
|
|
<Input
|
|
{...rest}
|
|
type="number"
|
|
placeholder="1000"
|
|
actions={<p className="text-foreground-light pr-2">ms</p>}
|
|
/>
|
|
</FormItemLayout>
|
|
)}
|
|
/>
|
|
</SheetSection>
|
|
)
|
|
}
|