Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const AddHeader = (props) => {
open={open}
setOpen={setOpen}
updateAippCallBack ={updateAippCallBack }
workflow={workFlow} type='waterflow'
workflow={workFlow} type='waterFlow'
/>
</div>
)}</>
Expand Down
15 changes: 9 additions & 6 deletions app-engine/frontend/src/pages/components/publish-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import React, { useState, useImperativeHandle, useRef } from 'react';
import { useParams, useHistory } from 'react-router-dom';
import { Input, Modal, Button, Form } from 'antd';
import React, { useImperativeHandle, useRef, useState } from 'react';
import { useHistory, useParams } from 'react-router-dom';
import { Button, Form, Input, Modal } from 'antd';
import { Message } from '@/shared/utils/message';
import { appPublish, updateFlowInfo, getVersion } from '@/shared/http/aipp';
import { appPublish, getVersion, updateFlowInfo } from '@/shared/http/aipp';
import { versionStringCompare } from '@/shared/utils/common';
import { useAppDispatch } from '@/store/hook';
import { setChatId, setChatList } from '@/store/chatStore/chatStore';
import { setTestStatus } from "@/store/flowTest/flowTest";
import { setTestStatus } from '@/store/flowTest/flowTest';
import { useTranslation } from 'react-i18next';
import { createEvaluate } from '../../shared/http/appEvaluate';
import TextEditor from './text-editor';
Expand Down Expand Up @@ -48,7 +48,7 @@ const PublishModal = (props) => {
app_type: publishType !== 'app' ? 'waterflow' : appInfo.attributes?.app_type
});
setIsModalOpen(true);
getVersion(tenantId, appId, null, 0, 1).then(res => {
getVersion(tenantId, appId, publishType, 0, 1).then(res => {
if (res.code === 0) {
form.setFieldsValue({
description: res.data[0]?.publishedDescription || ''
Expand Down Expand Up @@ -143,6 +143,9 @@ const PublishModal = (props) => {
async function updateAppRunningFlow() {
setLoading(true);
let params = appInfo.flowGraph;
if (window.agent) {
params.appearance = window.agent.serialize();
}
const res = await updateFlowInfo(tenantId, appId, params);
if (res.code === 0) {
publishWaterFlow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const CreateWorkfowDrawer = (props) => {
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' });
const aippId = res.data.id;
sessionStorage.setItem('add-type', 'plugin');
navigate(`/app-develop/${tenantId}/add-flow/${aippId}`);
navigate(`/app-develop/${tenantId}/add-flow/${aippId}?type=workFlow`);
setOpen(false);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion app-engine/frontend/src/shared/http/aipp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function reTestInstance(tenantId, aippId, instanceId, version) {
// 获取版本历史记录
export function getVersion(tenantId, appId, type, offset, limit) {
return get(
`${AIPP_URL}/${tenantId}/app/${appId}/recentPublished?offset=${offset}&limit=${limit}${type ? '&type=waterFlow' : ''}`
`${AIPP_URL}/${tenantId}/app/${appId}/recentPublished?offset=${offset}&limit=${limit}${type ? `&type=${type}` : ''}`
);
}
// 获取插件接口
Expand Down