Browse Source

Merge pull request '合并dev' (#34) from dev into master

pull/71/head
cp3hnu 1 year ago
parent
commit
7c12f28add
16 changed files with 36 additions and 48 deletions
  1. +1
    -1
      react-ui/config/config.ts
  2. +1
    -1
      react-ui/config/defaultSettings.ts
  3. +1
    -0
      react-ui/src/app.tsx
  4. +0
    -2
      react-ui/src/components/KFRadio/index.less
  5. +0
    -1
      react-ui/src/components/ModalTitle/index.less
  6. +0
    -2
      react-ui/src/components/SubAreaTitle/index.less
  7. +14
    -23
      react-ui/src/global.less
  8. +1
    -1
      react-ui/src/pages/DevelopmentEnvironment/index.tsx
  9. +0
    -2
      react-ui/src/pages/Mirror/components/MirrorStatusCell/index.less
  10. +0
    -2
      react-ui/src/pages/Mirror/create.less
  11. +5
    -1
      react-ui/src/pages/Mirror/create.tsx
  12. +0
    -2
      react-ui/src/pages/Mirror/info.less
  13. +7
    -3
      react-ui/src/pages/Model/personalData.jsx
  14. +0
    -2
      react-ui/src/pages/Pipeline/components/ResourceSelectorModal/index.less
  15. +3
    -2
      react-ui/src/pages/Pipeline/editPipeline/modelMenus.jsx
  16. +3
    -3
      react-ui/src/pages/User/Login/index.tsx

+ 1
- 1
react-ui/config/config.ts View File

@@ -76,7 +76,7 @@ export default defineConfig({
* @name layout 插件 * @name layout 插件
* @doc https://umijs.org/docs/max/layout-menu * @doc https://umijs.org/docs/max/layout-menu
*/ */
title: '复杂智能软件',
title: '智能软件开发平台',
layout: { layout: {
locale: true, locale: true,
...defaultSettings, ...defaultSettings,


+ 1
- 1
react-ui/config/defaultSettings.ts View File

@@ -16,7 +16,7 @@ const Settings: ProLayoutProps & {
fixSiderbar: false, fixSiderbar: false,
splitMenus: false, splitMenus: false,
colorWeak: false, colorWeak: false,
title: '复杂智能软件',
title: '智能软件开发平台',
pwa: true, pwa: true,
logo: '/assets/images/left-top-logo.png', logo: '/assets/images/left-top-logo.png',
iconfontUrl: '//at.alicdn.com/t/c/font_4511326_ndnvm4elll.js', iconfontUrl: '//at.alicdn.com/t/c/font_4511326_ndnvm4elll.js',


+ 1
- 0
react-ui/src/app.tsx View File

@@ -193,6 +193,7 @@ export const antd: RuntimeAntdConfig = (memo) => {
colorSuccess: themes['successColor'], colorSuccess: themes['successColor'],
colorError: themes['errorColor'], colorError: themes['errorColor'],
colorWarning: themes['warningColor'], colorWarning: themes['warningColor'],
colorLink: themes['primaryColor'],
}; };
memo.theme.components ??= {}; memo.theme.components ??= {};
memo.theme.components.Tabs = {}; memo.theme.components.Tabs = {};


+ 0
- 2
react-ui/src/components/KFRadio/index.less View File

@@ -1,5 +1,3 @@
// @import '@/styles/theme.less';

.kf-radio { .kf-radio {
display: flex; display: flex;
align-items: center; align-items: center;


+ 0
- 1
react-ui/src/components/ModalTitle/index.less View File

@@ -1,4 +1,3 @@
@import '@/styles/theme.less';
.modal_title { .modal_title {
display: flex; display: flex;
align-items: center; align-items: center;


+ 0
- 2
react-ui/src/components/SubAreaTitle/index.less View File

@@ -1,5 +1,3 @@
@import '@/styles/theme.less';

.kf-subarea-title { .kf-subarea-title {
display: flex; display: flex;
align-items: center; align-items: center;


+ 14
- 23
react-ui/src/global.less View File

@@ -58,7 +58,8 @@ body {
.ant-pro-layout .ant-pro-sider-menu { .ant-pro-layout .ant-pro-sider-menu {
padding-top: 40px; padding-top: 40px;
} }
.ant-table-wrapper .ant-table-container table>thead>tr:first-child >*:first-child,.ant-table-wrapper .ant-table-container table>tbody>tr:first-child{
.ant-table-wrapper .ant-table-container table > thead > tr:first-child > *:first-child,
.ant-table-wrapper .ant-table-container table > tbody > tr:first-child {
padding: 0 30px; padding: 0 30px;
} }


@@ -97,7 +98,7 @@ body {
} }
.ant-table-wrapper .ant-table-pagination.ant-pagination { .ant-table-wrapper .ant-table-pagination.ant-pagination {
margin: 0; margin: 0;
padding: 21px 16px;
padding: 20px 16px;
background-color: #fff; background-color: #fff;
} }
// .ant-table-wrapper .ant-table { // .ant-table-wrapper .ant-table {
@@ -112,6 +113,7 @@ body {
} }
.ant-pro-layout .ant-pro-layout-container { .ant-pro-layout .ant-pro-layout-container {
height: 100vh; height: 100vh;
overflow-y: hidden;
} }
.ant-modal-confirm .ant-modal-confirm-paragraph { .ant-modal-confirm .ant-modal-confirm-paragraph {
margin: 54px 0 auto; margin: 54px 0 auto;
@@ -188,32 +190,21 @@ body {
.ant-modal .ant-modal-footer > .ant-btn + .ant-btn { .ant-modal .ant-modal-footer > .ant-btn + .ant-btn {
margin-left: 20px; margin-left: 20px;
} }
.ant-pagination .ant-pagination-item-active a {
color: #fff;
background: rgba(22, 100, 255, 0.8);
// color: #fff;
border-radius: 6px;
.ant-pagination .ant-pagination-item.ant-pagination-item-active {
background: @primary-color;
border-width: 0;

a {
color: #fff;
}
} }
.ant-pagination .ant-pagination-item-active:hover { .ant-pagination .ant-pagination-item-active:hover {
// color: #fff;
// background: rgba(22, 100, 255, 0.8);
// border-color: rgba(22, 100, 255, 0.8);
border-radius: 6px;
color: #fff;
background: rgba(22, 100, 255, 0.8);
border-color: rgba(22, 100, 255, 0.8);
} }
.ant-pagination .ant-pagination-item { .ant-pagination .ant-pagination-item {
border: 1px solid #e6e6e6; border: 1px solid #e6e6e6;
border-radius: 6px;
}

.ant-tabs {
.ant-tabs-nav::before,
div > .ant-tabs-nav::before {
border: none;
}

.ant-tabs-nav {
margin-bottom: 0;
}
} }


// ::-webkit-scrollbar-button { // ::-webkit-scrollbar-button {


+ 1
- 1
react-ui/src/pages/DevelopmentEnvironment/index.tsx View File

@@ -17,6 +17,6 @@ const DevelopmentEnvironment = () => {
} }
}; };


return <iframe style={{ width: '100%', height: '81vh', border: 0 }} src={iframeUrl}></iframe>;
return <iframe style={{ width: '100%', height: '100%', border: 0 }} src={iframeUrl}></iframe>;
}; };
export default DevelopmentEnvironment; export default DevelopmentEnvironment;

+ 0
- 2
react-ui/src/pages/Mirror/components/MirrorStatusCell/index.less View File

@@ -1,5 +1,3 @@
//@import '@/styles/theme.less';

.mirror-status-cell { .mirror-status-cell {
color: @text-color; color: @text-color;




+ 0
- 2
react-ui/src/pages/Mirror/create.less View File

@@ -1,5 +1,3 @@
@import '@/styles/theme.less';

.mirror-create { .mirror-create {
height: 100%; height: 100%;




+ 5
- 1
react-ui/src/pages/Mirror/create.tsx View File

@@ -90,6 +90,10 @@ function MirrorCreate() {
message.error('文件上传失败,请重新上传文件'); message.error('文件上传失败,请重新上传文件');
return; return;
} }
if (!file.response || !file.response.data) {
message.error('文件上传失败,请重新上传文件');
return;
}


params = { params = {
...omit(formData, ['fileList', 'upload_type']), ...omit(formData, ['fileList', 'upload_type']),
@@ -119,7 +123,7 @@ function MirrorCreate() {


const beforeUpload: UploadProps['beforeUpload'] = () => { const beforeUpload: UploadProps['beforeUpload'] = () => {
const fileList = form.getFieldValue('fileList'); const fileList = form.getFieldValue('fileList');
if (fileList.length >= 1) {
if (Array.isArray(fileList) && fileList.length >= 1) {
message.error('只允许上传一个文件'); message.error('只允许上传一个文件');
return Upload.LIST_IGNORE; return Upload.LIST_IGNORE;
} }


+ 0
- 2
react-ui/src/pages/Mirror/info.less View File

@@ -1,5 +1,3 @@
@import '@/styles/theme.less';

.mirror-info { .mirror-info {
height: 100%; height: 100%;




+ 7
- 3
react-ui/src/pages/Model/personalData.jsx View File

@@ -4,7 +4,7 @@ import creatByImg from '@/assets/img/creatBy.png';
import KFIcon from '@/components/KFIcon'; import KFIcon from '@/components/KFIcon';
import { addModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; import { addModel, getAssetIcon, getModelList } from '@/services/dataset/index.js';
import { UploadOutlined } from '@ant-design/icons'; import { UploadOutlined } from '@ant-design/icons';
import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload } from 'antd';
import { Button, Form, Input, Modal, Pagination, Select, Upload } from 'antd';
import moment from 'moment'; import moment from 'moment';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
@@ -106,6 +106,10 @@ const PublicData = () => {
setIsModalOpen(false); setIsModalOpen(false);
}; };
const onFinish = (values) => { const onFinish = (values) => {
const params = {
...values,
available_range: 0,
};
addModel(values).then((ret) => { addModel(values).then((ret) => {
console.log(ret); console.log(ret);
getModelLists(queryFlow); getModelLists(queryFlow);
@@ -379,12 +383,12 @@ const PublicData = () => {
> >
<Input placeholder="请输入模型描述" showCount maxLength={256} /> <Input placeholder="请输入模型描述" showCount maxLength={256} />
</Form.Item> </Form.Item>
<Form.Item label="可见范围" name="available_range">
{/* <Form.Item label="可见范围" name="available_range">
<Radio.Group> <Radio.Group>
<Radio value="0">仅自己可见</Radio> <Radio value="0">仅自己可见</Radio>
<Radio value="1">工作空间可见</Radio> <Radio value="1">工作空间可见</Radio>
</Radio.Group> </Radio.Group>
</Form.Item>
</Form.Item> */}
<Form.Item <Form.Item
label="模型框架" label="模型框架"
name="model_type" name="model_type"


+ 0
- 2
react-ui/src/pages/Pipeline/components/ResourceSelectorModal/index.less View File

@@ -1,5 +1,3 @@
@import '@/styles/theme.less';

.model-tabs { .model-tabs {
margin-left: 8px; margin-left: 8px;
:global { :global {


+ 3
- 2
react-ui/src/pages/Pipeline/editPipeline/modelMenus.jsx View File

@@ -19,7 +19,7 @@ const items = [
children: [1, 2, 3, 4, 5], children: [1, 2, 3, 4, 5],
}, },
]; ];
const modelMenus = ({ onParDragEnd }) => {
const ModelMenus = ({ onParDragEnd }) => {
const [modelMenusList, setModelMenusList] = useState([]); const [modelMenusList, setModelMenusList] = useState([]);
useEffect(() => { useEffect(() => {
getComponentAll().then((ret) => { getComponentAll().then((ret) => {
@@ -55,6 +55,7 @@ const modelMenus = ({ onParDragEnd }) => {
{item.value && item.value.length > 0 {item.value && item.value.length > 0
? item.value.map((ele) => ( ? item.value.map((ele) => (
<div <div
key={ele.id}
draggable="true" draggable="true"
onDragEnd={(e) => { onDragEnd={(e) => {
dragEnd(e, ele); dragEnd(e, ele);
@@ -78,4 +79,4 @@ const modelMenus = ({ onParDragEnd }) => {
</div> </div>
); );
}; };
export default modelMenus;
export default ModelMenus;

+ 3
- 3
react-ui/src/pages/User/Login/index.tsx View File

@@ -246,10 +246,10 @@ const Login: React.FC = () => {
style={{ height: '42px', marginRight: '10px' }} style={{ height: '42px', marginRight: '10px' }}
alt="" alt=""
/> />
复杂智能软件
智能软件开发平台
</div> </div>
<div className={centerTitleBoX}> <div className={centerTitleBoX}>
<span style={{ whiteSpace: 'nowrap' }}>复杂智能软件</span>
<span style={{ whiteSpace: 'nowrap' }}>智能软件开发平台</span>


<img <img
src="/assets/images/ai-logo.png" src="/assets/images/ai-logo.png"
@@ -276,7 +276,7 @@ const Login: React.FC = () => {
<div className={rightTopTitle}> <div className={rightTopTitle}>
<span style={{ color: '#111111', fontSize: '36px' }}>hello~</span> <span style={{ color: '#111111', fontSize: '36px' }}>hello~</span>
<span style={{ color: '#606b7a', fontSize: '32px', marginLeft: '10px' }}>欢迎登陆</span> <span style={{ color: '#606b7a', fontSize: '32px', marginLeft: '10px' }}>欢迎登陆</span>
<span style={{ color: '#1664ff', fontSize: '32px' }}>复杂智能软件</span>
<span style={{ color: '#1664ff', fontSize: '32px' }}>智能软件开发平台</span>
</div> </div>
<div className={containerLoginForm}> <div className={containerLoginForm}>
<div <div


Loading…
Cancel
Save