mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-04 18:29:21 +02:00
clean up providers ui
This commit is contained in:
@@ -133,12 +133,14 @@ export type ResourceTargetAddressItemProps = {
|
||||
updateTarget: (targetId: number, data: Partial<LocalTarget>) => void;
|
||||
proxyTarget: LocalTarget;
|
||||
isHttp: boolean;
|
||||
allowedMethods?: ("http" | "https" | "h2c")[];
|
||||
};
|
||||
|
||||
export function ResourceTargetAddressItem({
|
||||
updateTarget,
|
||||
proxyTarget,
|
||||
isHttp
|
||||
isHttp,
|
||||
allowedMethods = ["http", "https", "h2c"]
|
||||
}: ResourceTargetAddressItemProps) {
|
||||
return (
|
||||
<div className="flex items-center w-full" key={proxyTarget.targetId}>
|
||||
@@ -157,9 +159,15 @@ export function ResourceTargetAddressItem({
|
||||
{proxyTarget.method || "http"}
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="http">http</SelectItem>
|
||||
<SelectItem value="https">https</SelectItem>
|
||||
<SelectItem value="h2c">h2c</SelectItem>
|
||||
{allowedMethods.includes("http") && (
|
||||
<SelectItem value="http">http</SelectItem>
|
||||
)}
|
||||
{allowedMethods.includes("https") && (
|
||||
<SelectItem value="https">https</SelectItem>
|
||||
)}
|
||||
{allowedMethods.includes("h2c") && (
|
||||
<SelectItem value="h2c">h2c</SelectItem>
|
||||
)}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user