hide method selector on raw resources

This commit is contained in:
miloschwartz
2025-10-20 17:15:35 -07:00
parent ae902da913
commit 08ddba25d0
2 changed files with 50 additions and 42 deletions

View File

@@ -1118,6 +1118,7 @@ export default function ReverseProxyTargets(props: {
</PopoverContent> </PopoverContent>
</Popover> </Popover>
{resource.http && (
<Select <Select
defaultValue={row.original.method ?? "http"} defaultValue={row.original.method ?? "http"}
onValueChange={(value) => onValueChange={(value) =>
@@ -1136,10 +1137,13 @@ export default function ReverseProxyTargets(props: {
<SelectItem value="h2c">h2c</SelectItem> <SelectItem value="h2c">h2c</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
)}
{resource.http && (
<div className="flex items-center justify-center bg-muted px-2 h-9"> <div className="flex items-center justify-center bg-muted px-2 h-9">
{"://"} {"://"}
</div> </div>
)}
<Input <Input
defaultValue={row.original.ip} defaultValue={row.original.ip}

View File

@@ -1034,6 +1034,7 @@ export default function Page() {
</PopoverContent> </PopoverContent>
</Popover> </Popover>
{isHttp && (
<Select <Select
defaultValue={row.original.method ?? "http"} defaultValue={row.original.method ?? "http"}
onValueChange={(value) => onValueChange={(value) =>
@@ -1052,10 +1053,13 @@ export default function Page() {
<SelectItem value="h2c">h2c</SelectItem> <SelectItem value="h2c">h2c</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
)}
{isHttp && (
<div className="flex items-center justify-center bg-muted px-2 h-9"> <div className="flex items-center justify-center bg-muted px-2 h-9">
{"://"} {"://"}
</div> </div>
)}
<Input <Input
defaultValue={row.original.ip} defaultValue={row.original.ip}