@@ -31,10 +31,8 @@ export const nodeFormSchema = z.object({
3131 server_ca : z . string ( ) . min ( 1 , 'Server CA is required' ) ,
3232 keep_alive : z . number ( ) . min ( 0 , 'Keep alive must be 0 or greater' ) ,
3333 keep_alive_unit : z . enum ( [ 'seconds' , 'minutes' , 'hours' ] ) . default ( 'seconds' ) ,
34- max_logs : z . number ( ) . min ( 1 , 'Max logs is required' ) ,
3534 api_key : z . string ( ) . min ( 1 , 'API key is required' ) ,
3635 core_config_id : z . number ( ) . min ( 1 , 'Core configuration is required' ) ,
37- gather_logs : z . boolean ( ) . default ( true ) ,
3836 data_limit : z . number ( ) . min ( 0 ) . optional ( ) . nullable ( ) ,
3937 data_limit_reset_strategy : z . nativeEnum ( DataLimitResetStrategy ) . optional ( ) . nullable ( ) ,
4038 reset_time : z . union ( [ z . null ( ) , z . undefined ( ) , z . number ( ) . min ( - 1 ) ] ) ,
@@ -141,10 +139,8 @@ export default function NodeModal({ isDialogOpen, onOpenChange, form, editingNod
141139 connection_type : nodeData . connection_type ,
142140 server_ca : nodeData . server_ca ,
143141 keep_alive : nodeData . keep_alive ,
144- max_logs : nodeData . max_logs ,
145142 api_key : ( nodeData . api_key as string ) || '' ,
146143 core_config_id : nodeData . core_config_id ?? cores ?. cores ?. [ 0 ] ?. id ,
147- gather_logs : nodeData . gather_logs ?? true ,
148144 data_limit : dataLimitGB ,
149145 data_limit_reset_strategy : nodeData . data_limit_reset_strategy ?? DataLimitResetStrategy . no_reset ,
150146 reset_time : nodeData . reset_time ?? null ,
@@ -169,10 +165,8 @@ export default function NodeModal({ isDialogOpen, onOpenChange, form, editingNod
169165 server_ca : '' ,
170166 keep_alive : 60 ,
171167 keep_alive_unit : 'seconds' ,
172- max_logs : 1000 ,
173168 api_key : '' ,
174169 core_config_id : cores ?. cores ?. [ 0 ] ?. id ,
175- gather_logs : true ,
176170 data_limit : 0 ,
177171 data_limit_reset_strategy : DataLimitResetStrategy . no_reset ,
178172 reset_time : - 1 ,
@@ -330,7 +324,7 @@ export default function NodeModal({ isDialogOpen, onOpenChange, form, editingNod
330324 onOpenChange ( false )
331325 form . reset ( )
332326 } catch ( error : any ) {
333- const fields = [ 'name' , 'address' , 'port' , 'core_config_id' , 'api_key' , 'max_logs' , ' keep_alive_unit', 'keep_alive' , 'server_ca' , 'connection_type' , '' ]
327+ const fields = [ 'name' , 'address' , 'port' , 'core_config_id' , 'api_key' , 'keep_alive_unit' , 'keep_alive' , 'server_ca' , 'connection_type' , '' ]
334328 handleError ( { error, fields, form, contextKey : 'nodes' } )
335329 }
336330 }
@@ -584,25 +578,6 @@ export default function NodeModal({ isDialogOpen, onOpenChange, form, editingNod
584578 ) }
585579 />
586580
587- < FormField
588- control = { form . control }
589- name = "max_logs"
590- render = { ( { field } ) => (
591- < FormItem className = "flex-1" >
592- < FormLabel > { t ( 'nodes.maxLogs' ) } </ FormLabel >
593- < FormControl >
594- < Input
595- isError = { ! ! form . formState . errors . max_logs }
596- type = "number"
597- placeholder = { t ( 'nodes.maxLogsPlaceholder' ) }
598- { ...field }
599- onChange = { e => field . onChange ( parseInt ( e . target . value ) ) }
600- />
601- </ FormControl >
602- < FormMessage />
603- </ FormItem >
604- ) }
605- />
606581 </ div >
607582
608583 < FormField
@@ -701,22 +676,6 @@ export default function NodeModal({ isDialogOpen, onOpenChange, form, editingNod
701676 } }
702677 />
703678
704- < FormField
705- control = { form . control }
706- name = "gather_logs"
707- render = { ( { field } ) => (
708- < FormItem className = "flex flex-row items-center justify-between rounded-lg border p-4" >
709- < div className = "space-y-0.5" >
710- < FormLabel className = "text-sm" > { t ( 'nodeModal.gatherLogs' ) } </ FormLabel >
711- < p className = "text-xs text-muted-foreground" > { t ( 'nodeModal.gatherLogsDescription' ) } </ p >
712- </ div >
713- < FormControl >
714- < Switch checked = { field . value } onCheckedChange = { field . onChange } />
715- </ FormControl >
716- </ FormItem >
717- ) }
718- />
719-
720679 < div className = "flex flex-col gap-4" >
721680 < FormField
722681 control = { form . control }
0 commit comments