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

@@ -20,7 +20,7 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
const { resource, authInfo, site } = useResourceContext();
const api = createApiClient(useEnvContext());
const { isEnabled, isAvailable } = useDockerSocket(resource.siteId);
const { isEnabled, isAvailable } = useDockerSocket(site!);
let fullUrl = `${resource.ssl ? "https" : "http"}://${resource.fullDomain}`;

View File

@@ -776,7 +776,7 @@ export default function ReverseProxyTargets(props: {
<Input id="ip" {...field} />
</FormControl>
<FormMessage />
{site && (
{site && site.type == 'newt' && (
<ContainersSelector
site={site}
onContainerSelect={(

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>