Dont do socket on non-newt sites

This commit is contained in:
Owen
2025-06-04 16:02:45 -04:00
parent 58a2a9dcc9
commit df4da75c57
6 changed files with 45 additions and 66 deletions

View File

@@ -129,31 +129,35 @@ export default function GeneralPage() {
</FormItem>
)}
/>
<FormField
control={form.control}
name="dockerSocketEnabled"
render={({ field }) => (
<FormItem>
<FormControl>
<SwitchInput
id="docker-socket-enabled"
label="Enable Docker Socket"
defaultChecked={field.value}
onCheckedChange={
field.onChange
}
/>
</FormControl>
<FormMessage />
<FormDescription>
Enable Docker Socket discovery
for populating container
information, useful in resource
targets.
</FormDescription>
</FormItem>
)}
/>
{site && site.type === "newt" && (
<FormField
control={form.control}
name="dockerSocketEnabled"
render={({ field }) => (
<FormItem>
<FormControl>
<SwitchInput
id="docker-socket-enabled"
label="Enable Docker Socket"
defaultChecked={
field.value
}
onCheckedChange={
field.onChange
}
/>
</FormControl>
<FormMessage />
<FormDescription>
Enable Docker Socket
discovery for populating
container information,
useful in resource targets.
</FormDescription>
</FormItem>
)}
/>
)}
</form>
</Form>
</SettingsSectionForm>