Merge branch 'feature/1.5-cx' into 'main'

feat: Local deployment popup optimization

See merge request apipark/APIPark!169
This commit is contained in:
lichunxian
2025-02-14 16:46:31 +08:00
4 changed files with 6 additions and 9 deletions
@@ -19,6 +19,7 @@ const RestAIDeploy = forwardRef<RestAIDeployHandle, any>((props: any, ref: any)
const { getTeamOptionList } = useDeployLocalModel()
const uploadProps: UploadProps = {
accept: '.json,.yaml',
name: 'file',
multiple: false,
maxCount: 1,
@@ -132,7 +132,7 @@ const LoadBalancingPage = () => {
const handleDelete = (id: string) => {
fetchData<BasicResponse<null>>('ai/balance', {
method: 'DELETE',
eoBody: {
eoParams: {
id
}
})
@@ -47,7 +47,7 @@ export const LogsFooter = (props: any) => {
return new Promise((resolve, reject) => {
fetchData<BasicResponse<any>>('model/local', {
method: 'DELETE',
eoBody: { model: record.id }
eoParams: { model: record.id }
})
.then((response: BasicResponse<any>) => {
const { code, msg } = response
@@ -99,11 +99,10 @@ export const ServiceDeployment = (props: { record: SystemTableListItem, closeMod
*/
const getLocalModelState = () => {
fetchData<BasicResponse<any>>('model/local/state', {
method: 'DELETE',
method: 'GET',
eoParams: {
model: record.id
},
eoApiPrefix: 'http://uat.apikit.com:11204/mockApi/aoplatform/api/v1/'
}
})
.then((response) => {
if (response.code === STATUS_CODE.SUCCESS) {
@@ -125,10 +124,7 @@ export const ServiceDeployment = (props: { record: SystemTableListItem, closeMod
'model/local/deploy',
{
method: 'POST',
eoBody: { recordId: record.id },
headers: {
'Content-Type': 'event-stream'
},
eoBody: { model: record.id, team: record.team?.id },
isStream: true,
handleStream: (chunk) => {
const parsedChunk = JSON.parse(chunk)