diff --git a/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx b/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx index eee02b5a..5acb9ac4 100644 --- a/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx +++ b/web/src/app/home/models/component/embedding-form/EmbeddingForm.tsx @@ -38,7 +38,7 @@ import { SelectValue, } from '@/components/ui/select'; import { toast } from 'sonner'; -import { i18nObj } from '@/i18n/I18nProvider'; +import { extractI18nObject } from '@/i18n/I18nProvider'; const getExtraArgSchema = (t: (key: string) => string) => z @@ -184,7 +184,7 @@ export default function EmbeddingForm({ setRequesterNameList( requesterNameList.requesters.map((item) => { return { - label: i18nObj(item.label), + label: extractI18nObject(item.label), value: item.name, }; }), diff --git a/web/src/app/infra/http/BackendClient.ts b/web/src/app/infra/http/BackendClient.ts index a4ccc23d..ef270258 100644 --- a/web/src/app/infra/http/BackendClient.ts +++ b/web/src/app/infra/http/BackendClient.ts @@ -136,8 +136,15 @@ export class BackendClient extends BaseHttpClient { return this.get('/api/v1/pipelines/_/metadata'); } - public getPipelines(): Promise { - return this.get('/api/v1/pipelines'); + public getPipelines( + sortBy?: string, + sortOrder?: string, + ): Promise { + const params = new URLSearchParams(); + if (sortBy) params.append('sort_by', sortBy); + if (sortOrder) params.append('sort_order', sortOrder); + const queryString = params.toString(); + return this.get(`/api/v1/pipelines${queryString ? `?${queryString}` : ''}`); } public getPipeline(uuid: string): Promise {