Browse Source

Merge branch 'dev' of https://gitlink.org.cn/ci4s/ci4sManagement-cloud into dev

pull/41/head
fanshuai 1 year ago
parent
commit
2e89060b94
19 changed files with 104 additions and 42 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. +11
    -22
      react-ui/src/global.less
  5. +7
    -3
      react-ui/src/pages/Model/personalData.jsx
  6. +3
    -2
      react-ui/src/pages/Pipeline/editPipeline/modelMenus.jsx
  7. +3
    -3
      react-ui/src/pages/User/Login/index.tsx
  8. +3
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/RuoYiManagementPlatformApplication.java
  9. +2
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/AssetIcon.java
  10. +23
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java
  11. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Image.java
  12. +1
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/AssetIconDao.java
  13. +9
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/AssetIconService.java
  14. +8
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AssetIconServiceImpl.java
  15. +16
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java
  16. +1
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java
  17. +8
    -0
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/AssetIconDaoMapper.xml
  18. +4
    -3
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml
  19. +1
    -1
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml

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

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


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

@@ -16,7 +16,7 @@ const Settings: ProLayoutProps & {
fixSiderbar: false,
splitMenus: false,
colorWeak: false,
title: '复杂智能软件',
title: '智能软件开发平台',
pwa: true,
logo: '/assets/images/left-top-logo.png',
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'],
colorError: themes['errorColor'],
colorWarning: themes['warningColor'],
colorLink: themes['primaryColor'],
};
memo.theme.components ??= {};
memo.theme.components.Tabs = {};


+ 11
- 22
react-ui/src/global.less View File

@@ -98,7 +98,7 @@ body {
}
.ant-table-wrapper .ant-table-pagination.ant-pagination {
margin: 0;
padding: 21px 16px;
padding: 20px 16px;
background-color: #fff;
}
// .ant-table-wrapper .ant-table {
@@ -190,32 +190,21 @@ body {
.ant-modal .ant-modal-footer > .ant-btn + .ant-btn {
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 {
// 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 {
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 {


+ 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 { addModel, getAssetIcon, getModelList } from '@/services/dataset/index.js';
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 { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
@@ -106,6 +106,10 @@ const PublicData = () => {
setIsModalOpen(false);
};
const onFinish = (values) => {
const params = {
...values,
available_range: 0,
};
addModel(values).then((ret) => {
console.log(ret);
getModelLists(queryFlow);
@@ -379,12 +383,12 @@ const PublicData = () => {
>
<Input placeholder="请输入模型描述" showCount maxLength={256} />
</Form.Item>
<Form.Item label="可见范围" name="available_range">
{/* <Form.Item label="可见范围" name="available_range">
<Radio.Group>
<Radio value="0">仅自己可见</Radio>
<Radio value="1">工作空间可见</Radio>
</Radio.Group>
</Form.Item>
</Form.Item> */}
<Form.Item
label="模型框架"
name="model_type"


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

@@ -19,7 +19,7 @@ const items = [
children: [1, 2, 3, 4, 5],
},
];
const modelMenus = ({ onParDragEnd }) => {
const ModelMenus = ({ onParDragEnd }) => {
const [modelMenusList, setModelMenusList] = useState([]);
useEffect(() => {
getComponentAll().then((ret) => {
@@ -55,6 +55,7 @@ const modelMenus = ({ onParDragEnd }) => {
{item.value && item.value.length > 0
? item.value.map((ele) => (
<div
key={ele.id}
draggable="true"
onDragEnd={(e) => {
dragEnd(e, ele);
@@ -78,4 +79,4 @@ const modelMenus = ({ onParDragEnd }) => {
</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' }}
alt=""
/>
复杂智能软件
智能软件开发平台
</div>
<div className={centerTitleBoX}>
<span style={{ whiteSpace: 'nowrap' }}>复杂智能软件</span>
<span style={{ whiteSpace: 'nowrap' }}>智能软件开发平台</span>

<img
src="/assets/images/ai-logo.png"
@@ -276,7 +276,7 @@ const Login: React.FC = () => {
<div className={rightTopTitle}>
<span style={{ color: '#111111', fontSize: '36px' }}>hello~</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 className={containerLoginForm}>
<div


+ 3
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/RuoYiManagementPlatformApplication.java View File

@@ -17,7 +17,9 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableRyFeignClients
@SpringBootApplication
@EnableScheduling
public class RuoYiManagementPlatformApplication {
public class

RuoYiManagementPlatformApplication {
public static void main(String[] args) {
SpringApplication.run(RuoYiManagementPlatformApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 复杂智能软件管理平台启动成功 ლ(´ڡ`ლ)゙ \n" +


+ 2
- 2
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/AssetIcon.java View File

@@ -19,8 +19,8 @@ public class AssetIcon implements Serializable {
/**
* 主键
*/
@ApiModelProperty(value = "资产ID")
private Integer id;
@ApiModelProperty(value = "资产ID")
private Integer id;

@ApiModelProperty(value = "资产图标名称")
private String name;


+ 23
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java View File

@@ -76,6 +76,13 @@ public class Dataset implements Serializable {
@ApiModelProperty(value = "状态:0失效,1生效")
private Integer state;

@ApiModelProperty(value = "数据集类型名字")
private String datasetTypeName;

@ApiModelProperty(value = "数据集tag名字")
private String datasetTagName;



public Integer getId() {
return id;
@@ -165,5 +172,21 @@ public class Dataset implements Serializable {
this.state = state;
}

public String getDatasetTypeName() {
return datasetTypeName;
}

public String getDatasetTagName() {
return datasetTagName;
}

public void setDatasetTagName(String datasetTagName) {
this.datasetTagName = datasetTagName;
}

public void setDatasetTypeName(String datasetTypeName) {
this.datasetTypeName = datasetTypeName;
}

}


+ 1
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Image.java View File

@@ -118,7 +118,7 @@ public class Image implements Serializable {
this.updateTime = updateTime;
}

// Getter 和 Setter
public Integer getVersionCount() {
return versionCount;
}


+ 1
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/AssetIconDao.java View File

@@ -84,5 +84,6 @@ public interface AssetIconDao {
List<AssetIcon> queryByCategoryId(Integer categoryId);


AssetIcon queryByPath(String path);
}


+ 9
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/AssetIconService.java View File

@@ -22,6 +22,15 @@ public interface AssetIconService {
*/
AssetIcon queryById(Integer id);


/**
* 通过path查询单条数据
*
* @param path 路径
* @return 实例对象
*/
AssetIcon queryByPath(String path);

/**
* 分页查询
*


+ 8
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AssetIconServiceImpl.java View File

@@ -2,7 +2,6 @@ package com.ruoyi.platform.service.impl;

import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.platform.domain.AssetIcon;
import com.ruoyi.platform.domain.Models;
import com.ruoyi.platform.mapper.AssetIconDao;
import com.ruoyi.platform.service.AssetIconService;
import com.ruoyi.system.api.model.LoginUser;
@@ -38,6 +37,12 @@ public class AssetIconServiceImpl implements AssetIconService {
return this.assetIconDao.queryById(id);
}


@Override
public AssetIcon queryByPath(String path) {
return this.assetIconDao.queryByPath(path);
}

/**
* 分页查询
*
@@ -125,4 +130,6 @@ public class AssetIconServiceImpl implements AssetIconService {
public List<AssetIcon> queryByCategoryId(Integer categoryId) {
return this.assetIconDao.queryByCategoryId(categoryId);
}


}

+ 16
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java View File

@@ -3,10 +3,12 @@ package com.ruoyi.platform.service.impl;

import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.platform.annotations.CheckDuplicate;
import com.ruoyi.platform.domain.AssetIcon;
import com.ruoyi.platform.domain.Dataset;
import com.ruoyi.platform.domain.DatasetVersion;
import com.ruoyi.platform.mapper.DatasetDao;
import com.ruoyi.platform.mapper.DatasetVersionDao;
import com.ruoyi.platform.service.AssetIconService;
import com.ruoyi.platform.service.DatasetService;
import com.ruoyi.platform.service.DatasetVersionService;
import com.ruoyi.platform.service.MinioService;
@@ -59,6 +61,9 @@ public class DatasetServiceImpl implements DatasetService {
@Resource
private DatasetVersionService datasetVersionService;

@Resource
private AssetIconService assetIconService;

@Resource
private MinioService minioService;

@@ -79,7 +84,17 @@ public class DatasetServiceImpl implements DatasetService {
*/
@Override
public Dataset queryById(Integer id) {
return this.datasetDao.queryById(id);

Dataset dataset = this.datasetDao.queryById(id);
String dataType = dataset.getDataType();
String dataTag = dataset.getDataTag();
//去资产管理表中查询对应的图标名
AssetIcon dataTypeAssetIcon = assetIconService.queryByPath(dataType);
AssetIcon dataTagAssetIcon = assetIconService.queryByPath(dataTag);
dataset.setDatasetTypeName(dataTypeAssetIcon.getName());
dataset.setDatasetTagName(dataTagAssetIcon.getName());
return dataset;

}

/**


+ 1
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java View File

@@ -316,6 +316,7 @@ public class ImageServiceImpl implements ImageService {
String filePath = "/data/argo-workflow/" + bucketName + "/" +path;
String logs2 = k8sClientUtil.executeCommand(pod,"docker load -i "+filePath);
// 在容器里执行 docker tag name:tag nexus3.kube-system.svc:8083/imageName:imageTag

if (StringUtils.isNoneBlank(logs2)){
String substring = logs2.substring(logs2.indexOf(":")+1).trim();
String tagCmd = "docker tag " + substring + " " + harborUrl + "/" + repository + "/" + username + "/" + imageName + ":" + imageTag;


+ 8
- 0
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/AssetIconDaoMapper.xml View File

@@ -43,6 +43,13 @@
</where>
</select>

<select id="queryByPath" resultMap="AssetIconMap" >
select
id, name,category_id, path, description, create_by, create_time, update_by, update_time, state
from asset_icon
where path = #{path} and state = 1
</select>

<select id="queryAllByLimit" resultMap="AssetIconMap">
select
id, name, category_id, path, description, create_by, create_time, update_by, update_time, state
@@ -123,6 +130,7 @@
</where>
</select>


<insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into asset_icon(name, category_id, path, description, create_by, create_time, update_by, update_time, state)
values (#{assetIcon.name}, #{assetIcon.categoryId}, #{assetIcon.path}, #{assetIcon.description}, #{assetIcon.createBy}, #{assetIcon.createTime}, #{assetIcon.updateBy}, #{assetIcon.updateTime}, #{assetIcon.state})


+ 4
- 3
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml View File

@@ -152,13 +152,13 @@
description = #{dataset.description},
</if>
<if test="dataset.availableRange != null and dataset.availableRange != ''">
available_range = #{dataset.availableRange}
</if>,
available_range = #{dataset.availableRange},
</if>
<if test="dataset.dataType != null">
data_type = #{dataset.dataType},
</if>
<if test="dataset.dataTag != null">
data_tag = #{dataset.dataTag}
data_tag = #{dataset.dataTag},
</if>
<if test="dataset.createBy != null and dataset.createBy != ''">
create_by = #{dataset.createBy},
@@ -179,6 +179,7 @@
where id = #{dataset.id}
</update>


<!--通过主键删除-->
<delete id="deleteById">
delete from dataset where id = #{id}


+ 1
- 1
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml View File

@@ -154,7 +154,7 @@
description = #{models.description},
</if>
<if test="models.availableRange != null and models.availableRange != ''">
available_range = #{models.availableRange}
available_range = #{models.availableRange},
</if>
<if test="models.modelType != null">
model_type = #{models.modelType},


Loading…
Cancel
Save