Skip to content

Commit 398da20

Browse files
authored
[frontend] 修复工具流创建发布的问题 (#202)
1 parent 524992e commit 398da20

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

app-engine/frontend/src/pages/addFlow/components/addflow-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const AddHeader = (props) => {
166166
open={open}
167167
setOpen={setOpen}
168168
updateAippCallBack ={updateAippCallBack }
169-
workflow={workFlow} type='waterflow'
169+
workflow={workFlow} type='waterFlow'
170170
/>
171171
</div>
172172
)}</>

app-engine/frontend/src/pages/components/publish-modal.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* Licensed under the MIT License. See License.txt in the project root for license information.
55
*--------------------------------------------------------------------------------------------*/
66

7-
import React, { useState, useImperativeHandle, useRef } from 'react';
8-
import { useParams, useHistory } from 'react-router-dom';
9-
import { Input, Modal, Button, Form } from 'antd';
7+
import React, { useImperativeHandle, useRef, useState } from 'react';
8+
import { useHistory, useParams } from 'react-router-dom';
9+
import { Button, Form, Input, Modal } from 'antd';
1010
import { Message } from '@/shared/utils/message';
11-
import { appPublish, updateFlowInfo, getVersion } from '@/shared/http/aipp';
11+
import { appPublish, getVersion, updateFlowInfo } from '@/shared/http/aipp';
1212
import { versionStringCompare } from '@/shared/utils/common';
1313
import { useAppDispatch } from '@/store/hook';
1414
import { setChatId, setChatList } from '@/store/chatStore/chatStore';
15-
import { setTestStatus } from "@/store/flowTest/flowTest";
15+
import { setTestStatus } from '@/store/flowTest/flowTest';
1616
import { useTranslation } from 'react-i18next';
1717
import { createEvaluate } from '../../shared/http/appEvaluate';
1818
import TextEditor from './text-editor';
@@ -48,7 +48,7 @@ const PublishModal = (props) => {
4848
app_type: publishType !== 'app' ? 'waterflow' : appInfo.attributes?.app_type
4949
});
5050
setIsModalOpen(true);
51-
getVersion(tenantId, appId, null, 0, 1).then(res => {
51+
getVersion(tenantId, appId, publishType, 0, 1).then(res => {
5252
if (res.code === 0) {
5353
form.setFieldsValue({
5454
description: res.data[0]?.publishedDescription || ''
@@ -143,6 +143,9 @@ const PublishModal = (props) => {
143143
async function updateAppRunningFlow() {
144144
setLoading(true);
145145
let params = appInfo.flowGraph;
146+
if (window.agent) {
147+
params.appearance = window.agent.serialize();
148+
}
146149
const res = await updateFlowInfo(tenantId, appId, params);
147150
if (res.code === 0) {
148151
publishWaterFlow();

app-engine/frontend/src/pages/plugin/upload/createWorkflow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const CreateWorkfowDrawer = (props) => {
9898
const res = await createAipp(tenantId, 'df87073b9bc85a48a9b01eccc9afccc3', { type: 'waterFlow', name: form.getFieldValue('name'), icon: icon, description: form.getFieldValue('description'), app_built_type: 'workflow', app_category: 'workflow' });
9999
const aippId = res.data.id;
100100
sessionStorage.setItem('add-type', 'plugin');
101-
navigate(`/app-develop/${tenantId}/add-flow/${aippId}`);
101+
navigate(`/app-develop/${tenantId}/add-flow/${aippId}?type=workFlow`);
102102
setOpen(false);
103103
}}
104104
>

app-engine/frontend/src/shared/http/aipp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function reTestInstance(tenantId, aippId, instanceId, version) {
182182
// 获取版本历史记录
183183
export function getVersion(tenantId, appId, type, offset, limit) {
184184
return get(
185-
`${AIPP_URL}/${tenantId}/app/${appId}/recentPublished?offset=${offset}&limit=${limit}${type ? '&type=waterFlow' : ''}`
185+
`${AIPP_URL}/${tenantId}/app/${appId}/recentPublished?offset=${offset}&limit=${limit}${type ? `&type=${type}` : ''}`
186186
);
187187
}
188188
// 获取插件接口

0 commit comments

Comments
 (0)