diff --git a/src/components/PublicResourcesTable.tsx b/src/components/PublicResourcesTable.tsx
index 09f451a69..48d7b4486 100644
--- a/src/components/PublicResourcesTable.tsx
+++ b/src/components/PublicResourcesTable.tsx
@@ -312,6 +312,12 @@ export default function PublicResourcesTable({
{
value: "vnc",
label: t("vncTitle")
+ },
+ {
+ value: "inference",
+ label: t(
+ "createInternalResourceDialogModeInference"
+ )
}
]}
selectedValue={
@@ -334,7 +340,11 @@ export default function PublicResourcesTable({
? resourceRow.ssl
? "HTTPS"
: "HTTP"
- : resourceRow.mode?.toUpperCase()}
+ : resourceRow.mode === "inference"
+ ? t(
+ "createInternalResourceDialogModeInference"
+ )
+ : resourceRow.mode?.toUpperCase()}
);
}
@@ -428,7 +438,7 @@ export default function PublicResourcesTable({
const resourceRow = row.original;
if (
- !["http", "ssh", "rdp", "vnc"].includes(
+ !["http", "ssh", "rdp", "vnc", "inference"].includes(
resourceRow.mode || ""
)
) {
@@ -894,7 +904,9 @@ function ResourceEnabledForm({
resource,
onToggleResourceEnabled
}: ResourceEnabledFormProps) {
- const enabled = ["http", "ssh", "rdp", "vnc"].includes(resource.mode || "")
+ const enabled = ["http", "ssh", "rdp", "vnc", "inference"].includes(
+ resource.mode || ""
+ )
? !!resource.domainId && resource.enabled
: resource.enabled;
const [optimisticEnabled, setOptimisticEnabled] = useOptimistic(enabled);
@@ -912,7 +924,7 @@ function ResourceEnabledForm({
*/}
- {["http", "ssh", "rdp", "vnc"].includes(resource.mode) ? (
+ {isDomainResource ? (
<>
URL
@@ -94,33 +100,39 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
? resource.ssl
? "HTTPS"
: "HTTP"
- : resource.mode?.toUpperCase()}
+ : resource.mode === "inference"
+ ? t(
+ "createInternalResourceDialogModeInference"
+ )
+ : resource.mode?.toUpperCase()}
)}
-
-
- {t("authentication")}
-
-
- {authInfo.password ||
- authInfo.pincode ||
- authInfo.sso ||
- authInfo.whitelist ||
- authInfo.headerAuth ? (
-
-
- {t("protected")}
-
- ) : (
-
-
- {t("notProtected")}
-
- )}
-
-
+ {showAuth && (
+
+
+ {t("authentication")}
+
+
+ {authInfo.password ||
+ authInfo.pincode ||
+ authInfo.sso ||
+ authInfo.whitelist ||
+ authInfo.headerAuth ? (
+
+
+ {t("protected")}
+
+ ) : (
+
+
+ {t("notProtected")}
+
+ )}
+
+
+ )}
>
) : (
<>
@@ -138,7 +150,9 @@ export default function ResourceInfoBox({}: ResourceInfoBoxType) {
{t("port")}
diff --git a/src/lib/queries.ts b/src/lib/queries.ts
index 27cf1f7db..9a0cb2403 100644
--- a/src/lib/queries.ts
+++ b/src/lib/queries.ts
@@ -1300,6 +1300,26 @@ export const resourceQueries = {
return res.data.data.providers;
}
}),
+ resourceAiProviders: ({ resourceId }: { resourceId: number }) =>
+ queryOptions({
+ queryKey: ["RESOURCES", resourceId, "AI_PROVIDERS"] as const,
+ queryFn: async ({ signal, meta }) => {
+ const res = await meta!.api.get<
+ AxiosResponse<{
+ providers: Array<{
+ providerId: number;
+ modelAccessMode: "catalog" | "allowlist";
+ name: string;
+ type: string;
+ enabled: boolean;
+ }>;
+ }>
+ >(`/resource/${resourceId}/ai-providers`, {
+ signal
+ });
+ return res.data.data.providers;
+ }
+ }),
resourceTargets: ({ resourceId }: { resourceId: number }) =>
queryOptions({
queryKey: ["RESOURCES", resourceId, "TARGETS"] as const,