From e0a07eda920a56d8754c9d240c3d97938bb60dab Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Thu, 1 Jan 2026 12:42:22 -0800 Subject: [PATCH] refactor pt2 --- ui/litellm-dashboard/src/app/model_hub_table/page.tsx | 1 + .../AIHub/{ => forms}/make_agent_public_form.tsx | 4 ++-- .../AIHub/{ => forms}/make_mcp_public_form.tsx | 6 +++--- .../AIHub/{ => forms}/make_model_public_form.tsx | 6 +++--- .../src/components/AIHub/model_hub_table.tsx | 10 +++++----- .../components/{AIHub => }/mcp_hub_table_columns.tsx | 0 .../components/{AIHub => }/model_hub_table_columns.tsx | 0 7 files changed, 14 insertions(+), 13 deletions(-) rename ui/litellm-dashboard/src/components/AIHub/{ => forms}/make_agent_public_form.tsx (98%) rename ui/litellm-dashboard/src/components/AIHub/{ => forms}/make_mcp_public_form.tsx (98%) rename ui/litellm-dashboard/src/components/AIHub/{ => forms}/make_model_public_form.tsx (98%) rename ui/litellm-dashboard/src/components/{AIHub => }/mcp_hub_table_columns.tsx (100%) rename ui/litellm-dashboard/src/components/{AIHub => }/model_hub_table_columns.tsx (100%) diff --git a/ui/litellm-dashboard/src/app/model_hub_table/page.tsx b/ui/litellm-dashboard/src/app/model_hub_table/page.tsx index f8845cf872c..df454eb48e5 100644 --- a/ui/litellm-dashboard/src/app/model_hub_table/page.tsx +++ b/ui/litellm-dashboard/src/app/model_hub_table/page.tsx @@ -7,6 +7,7 @@ export default function PublicModelHubTable() { const searchParams = useSearchParams()!; const key = searchParams.get("key"); const [accessToken, setAccessToken] = useState(null); + console.log("PublicModelHubTable accessToken:", accessToken); useEffect(() => { if (!key) { diff --git a/ui/litellm-dashboard/src/components/AIHub/make_agent_public_form.tsx b/ui/litellm-dashboard/src/components/AIHub/forms/make_agent_public_form.tsx similarity index 98% rename from ui/litellm-dashboard/src/components/AIHub/make_agent_public_form.tsx rename to ui/litellm-dashboard/src/components/AIHub/forms/make_agent_public_form.tsx index ed1b25d5641..bcb23b99974 100644 --- a/ui/litellm-dashboard/src/components/AIHub/make_agent_public_form.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/forms/make_agent_public_form.tsx @@ -1,8 +1,8 @@ import React, { useState, useEffect } from "react"; import { Modal, Form, Steps, Button, Checkbox } from "antd"; import { Text, Title, Badge } from "@tremor/react"; -import { makeAgentsPublicCall } from "../networking"; -import NotificationsManager from "../molecules/notifications_manager"; +import { makeAgentsPublicCall } from "../../networking"; +import NotificationsManager from "../../molecules/notifications_manager"; import { AgentHubData } from "@/components/AIHub/agent_hub_table_columns"; const { Step } = Steps; diff --git a/ui/litellm-dashboard/src/components/AIHub/make_mcp_public_form.tsx b/ui/litellm-dashboard/src/components/AIHub/forms/make_mcp_public_form.tsx similarity index 98% rename from ui/litellm-dashboard/src/components/AIHub/make_mcp_public_form.tsx rename to ui/litellm-dashboard/src/components/AIHub/forms/make_mcp_public_form.tsx index 28ccfa3093c..d7103da9ed7 100644 --- a/ui/litellm-dashboard/src/components/AIHub/make_mcp_public_form.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/forms/make_mcp_public_form.tsx @@ -1,9 +1,9 @@ import React, { useState, useEffect } from "react"; import { Modal, Form, Steps, Button, Checkbox } from "antd"; import { Text, Title, Badge } from "@tremor/react"; -import { makeMCPPublicCall } from "../networking"; -import NotificationsManager from "../molecules/notifications_manager"; -import { MCPServerData } from "@/components/AIHub/mcp_hub_table_columns"; +import { makeMCPPublicCall } from "../../networking"; +import NotificationsManager from "../../molecules/notifications_manager"; +import { MCPServerData } from "@/components/mcp_hub_table_columns"; const { Step } = Steps; diff --git a/ui/litellm-dashboard/src/components/AIHub/make_model_public_form.tsx b/ui/litellm-dashboard/src/components/AIHub/forms/make_model_public_form.tsx similarity index 98% rename from ui/litellm-dashboard/src/components/AIHub/make_model_public_form.tsx rename to ui/litellm-dashboard/src/components/AIHub/forms/make_model_public_form.tsx index 16398c6c558..16ed04c1779 100644 --- a/ui/litellm-dashboard/src/components/AIHub/make_model_public_form.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/forms/make_model_public_form.tsx @@ -1,9 +1,9 @@ import React, { useState, useCallback, useEffect } from "react"; import { Modal, Form, Steps, Button, Checkbox } from "antd"; import { Text, Title, Badge } from "@tremor/react"; -import { makeModelGroupPublic } from "../networking"; -import ModelFilters from "../model_filters"; -import NotificationsManager from "../molecules/notifications_manager"; +import { makeModelGroupPublic } from "../../networking"; +import ModelFilters from "../../model_filters"; +import NotificationsManager from "../../molecules/notifications_manager"; const { Step } = Steps; diff --git a/ui/litellm-dashboard/src/components/AIHub/model_hub_table.tsx b/ui/litellm-dashboard/src/components/AIHub/model_hub_table.tsx index 9ad0deb7e63..d73be781cb8 100644 --- a/ui/litellm-dashboard/src/components/AIHub/model_hub_table.tsx +++ b/ui/litellm-dashboard/src/components/AIHub/model_hub_table.tsx @@ -1,9 +1,9 @@ import { agentHubColumns, AgentHubData } from "@/components/AIHub/agent_hub_table_columns"; -import MakeAgentPublicForm from "@/components/AIHub/make_agent_public_form"; -import MakeMCPPublicForm from "@/components/AIHub/make_mcp_public_form"; -import MakeModelPublicForm from "@/components/AIHub/make_model_public_form"; -import { mcpHubColumns, MCPServerData } from "@/components/AIHub/mcp_hub_table_columns"; -import { modelHubColumns } from "@/components/AIHub/model_hub_table_columns"; +import MakeAgentPublicForm from "@/components/AIHub/forms/make_agent_public_form"; +import MakeMCPPublicForm from "@/components/AIHub/forms/make_mcp_public_form"; +import MakeModelPublicForm from "@/components/AIHub/forms/make_model_public_form"; +import { mcpHubColumns, MCPServerData } from "@/components/mcp_hub_table_columns"; +import { modelHubColumns } from "@/components/model_hub_table_columns"; import UsefulLinksManagement from "@/components/AIHub/useful_links_management"; import { ModelDataTable } from "@/components/model_dashboard/table"; import ModelFilters from "@/components/model_filters"; diff --git a/ui/litellm-dashboard/src/components/AIHub/mcp_hub_table_columns.tsx b/ui/litellm-dashboard/src/components/mcp_hub_table_columns.tsx similarity index 100% rename from ui/litellm-dashboard/src/components/AIHub/mcp_hub_table_columns.tsx rename to ui/litellm-dashboard/src/components/mcp_hub_table_columns.tsx diff --git a/ui/litellm-dashboard/src/components/AIHub/model_hub_table_columns.tsx b/ui/litellm-dashboard/src/components/model_hub_table_columns.tsx similarity index 100% rename from ui/litellm-dashboard/src/components/AIHub/model_hub_table_columns.tsx rename to ui/litellm-dashboard/src/components/model_hub_table_columns.tsx