From e78f1b804fa09e696f1cee69e83e076c370ab7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A2=A6=E6=B4=81?= Date: Thu, 21 Nov 2024 18:37:39 +0800 Subject: [PATCH] fix: Change Dashboard Fields --- .../dashboard/src/component/MonitorApiPage.tsx | 12 ++++++------ .../dashboard/src/component/MonitorAppPage.tsx | 8 ++++---- .../dashboard/src/component/MonitorSubPage.tsx | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frontend/packages/dashboard/src/component/MonitorApiPage.tsx b/frontend/packages/dashboard/src/component/MonitorApiPage.tsx index 89b8465d..67d157b8 100644 --- a/frontend/packages/dashboard/src/component/MonitorApiPage.tsx +++ b/frontend/packages/dashboard/src/component/MonitorApiPage.tsx @@ -28,7 +28,7 @@ export type MonitorApiPageProps = { detailEntityName:string } -export type MonitorApiQueryData = SearchBody & { path?:string, apis?:string[], projects?:string[] } +export type MonitorApiQueryData = SearchBody & { path?:string, apis?:string[], services?:string[] } export default function MonitorApiPage(props:MonitorApiPageProps){ const {fetchTableData,detailDrawerContent,fullScreen,setFullScreen,setDetailId,timeButton,setTimeButton,detailEntityName,setDetailEntityName} = props @@ -51,7 +51,7 @@ export default function MonitorApiPage(props:MonitorApiPageProps){ }, []); const getApiList = (projectIds?:string[])=>{ - return fetchData<{apis:EntityItem[]}>('simple/project/apis',{method:'POST',eoBody:({projects:projectIds || queryData?.projects})}).then((resp) => { + return fetchData<{apis:EntityItem[]}>('simple/service/apis',{method:'POST',eoBody:({services:projectIds || queryData?.services})}).then((resp) => { const {code,data,msg} = resp if(code === STATUS_CODE.SUCCESS){ setApiOptionList(data.apis?.map((x:EntityItem)=>({label:x.name, value:x.id}))) @@ -65,10 +65,10 @@ export default function MonitorApiPage(props:MonitorApiPageProps){ } const getProjectList = ()=>{ - return fetchData<{projects:EntityItem[]}>('simple/projects',{method:'GET'}).then((resp) => { + return fetchData<{services:EntityItem[]}>('simple/services',{method:'GET'}).then((resp) => { const {code,data,msg} = resp if(code === STATUS_CODE.SUCCESS){ - setProjectOptionList(data.projects?.map((x:EntityItem)=>({label:x.name, value:x.id}))) + setProjectOptionList(data.services?.map((x:EntityItem)=>({label:x.name, value:x.id}))) }else{ message.error(msg || $t(RESPONSE_TIPS.dataError)) return setProjectOptionList([]) @@ -164,13 +164,13 @@ export default function MonitorApiPage(props:MonitorApiPageProps){