Commit a74d5b5a authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !67
parents 74c312d1 53ba73c7
...@@ -74,6 +74,13 @@ ...@@ -74,6 +74,13 @@
color: rgba(19, 112, 255, 1); color: rgba(19, 112, 255, 1);
font-size: 14px; font-size: 14px;
} }
.outputItemName{
max-width: 190px;
white-space: nowrap;
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
.outputLiLeftImg { .outputLiLeftImg {
margin-right: 12px; margin-right: 12px;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56 * @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-15 17:18:49 * @LastEditTime: 2022-08-22 16:22:29
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -47,6 +47,7 @@ import { getConnectionArr, getDatasetName, getDatasetPath, getSameBatch } from " ...@@ -47,6 +47,7 @@ import { getConnectionArr, getDatasetName, getDatasetPath, getSameBatch } from "
import styles from "./index.module.css"; import styles from "./index.module.css";
const stateMap = { const stateMap = {
SUBMITTED:"正在启动",
RUNNING: "正在运行", RUNNING: "正在运行",
ABORTED: "运行终止", ABORTED: "运行终止",
FAILED: "运行失败", FAILED: "运行失败",
...@@ -349,17 +350,6 @@ const ProjectSubmitWork = observer(() => { ...@@ -349,17 +350,6 @@ const ProjectSubmitWork = observer(() => {
setShowOptions(!showOptions); setShowOptions(!showOptions);
}; };
const handleDownLoad = (path: string) => {
if (path.indexOf("/ProjectData") !== -1) {
path = path.slice(12);
}
CloudEController.JobFileDownload(
path,
fileToken as string,
projectId as string
);
};
/** 终止任务 */ /** 终止任务 */
const onStopJob = useCallback(() => { const onStopJob = useCallback(() => {
cancelWorkJob({ cancelWorkJob({
...@@ -375,7 +365,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -375,7 +365,7 @@ const ProjectSubmitWork = observer(() => {
}, [deleteWorkJob, workFlowJobInfo?.id]); }, [deleteWorkJob, workFlowJobInfo?.id]);
const returnPermission = useMemo(() => { const returnPermission = useMemo(() => {
if (state === "RUNNING") { if (['SUBMITTED', 'RUNNING'].includes(state || '')) {
return isPass("PROJECT_WORKBENCH_JOBS_STOP", "USER"); return isPass("PROJECT_WORKBENCH_JOBS_STOP", "USER");
} else { } else {
return isPass("PROJECT_WORKBENCH_JOBS_DELETE", "MANAGER"); return isPass("PROJECT_WORKBENCH_JOBS_DELETE", "MANAGER");
...@@ -446,13 +436,13 @@ const ProjectSubmitWork = observer(() => { ...@@ -446,13 +436,13 @@ const ProjectSubmitWork = observer(() => {
}} }}
> */} > */}
<MyButton <MyButton
text={state === "RUNNING" ? "终止" : "删除"} text={['SUBMITTED', 'RUNNING'].includes(state || '') ? "终止" : "删除"}
variant="outlined" variant="outlined"
color="secondary" color="secondary"
onClick={(e: any) => onClick={(e: any) =>
handleShowPopper( handleShowPopper(
e, e,
state === "RUNNING" ['SUBMITTED', 'RUNNING'].includes(state || '')
? "正在运行的任务终止后将无法重新运行,确认继续吗?" ? "正在运行的任务终止后将无法重新运行,确认继续吗?"
: "任务被删除后将无法恢复,确认继续吗?" : "任务被删除后将无法恢复,确认继续吗?"
) )
...@@ -490,7 +480,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -490,7 +480,7 @@ const ProjectSubmitWork = observer(() => {
} }
alt="" alt=""
/> />
{item.name} <span className={styles.outputItemName}>{item.name}</span>
</div> </div>
{/* </MyPopconfirm> */} {/* </MyPopconfirm> */}
<span className={styles.outputLiRight}> <span className={styles.outputLiRight}>
...@@ -551,7 +541,7 @@ const ProjectSubmitWork = observer(() => { ...@@ -551,7 +541,7 @@ const ProjectSubmitWork = observer(() => {
alt="" alt=""
/> />
)} )}
{state === "RUNNING" && ( {['SUBMITTED', 'RUNNING'].includes(state || '') && (
<img <img
className={styles.taskInfoValueIcon} className={styles.taskInfoValueIcon}
src={jobRun} src={jobRun}
......
...@@ -87,6 +87,8 @@ const TaskCard = (props: TaskCardProps) => { ...@@ -87,6 +87,8 @@ const TaskCard = (props: TaskCardProps) => {
// 渲染状态 // 渲染状态
const renderStatusText = (data: string) => { const renderStatusText = (data: string) => {
switch (data) { switch (data) {
case "SUBMITTED":
return "正在启动";
case "RUNNING": case "RUNNING":
return '正在运行' return '正在运行'
case "ABORTED": case "ABORTED":
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13 * @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-07-28 19:02:19 * @LastEditTime: 2022-08-22 15:33:02
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx * @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -48,6 +48,10 @@ const currencies = [ ...@@ -48,6 +48,10 @@ const currencies = [
value: "ALL", value: "ALL",
label: "全部", label: "全部",
}, },
{
value: "SUBMITTED",
label: "正在启动",
},
{ {
value: "RUNNING", value: "RUNNING",
label: "正在运行", label: "正在运行",
......
...@@ -144,7 +144,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -144,7 +144,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
}; };
// 获取模板列表 // 获取模板列表
const getAddTemplateListFun = useCallback(() => { const getAddTemplateListFun = useCallback((newTitle?: string) => {
const userName = JSON.parse(localStorage.getItem("userInfo") || "{}")?.name; const userName = JSON.parse(localStorage.getItem("userInfo") || "{}")?.name;
setSelectTemplateData([]); setSelectTemplateData([]);
setAddTemplateList([]); setAddTemplateList([]);
...@@ -153,14 +153,14 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -153,14 +153,14 @@ const AddTemplate = (props: IAddTemplateProps) => {
projectId: projectId as string, projectId: projectId as string,
productId: productId as string, productId: productId as string,
creator: "root", creator: "root",
keyword: title, keyword: newTitle,
}); });
} else { } else {
getAddTemplateList({ getAddTemplateList({
projectId: projectId as string, projectId: projectId as string,
productId: productId as string, productId: productId as string,
creator: userName, creator: userName,
keyword: title, keyword: newTitle,
}); });
} }
}, [ }, [
...@@ -169,7 +169,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -169,7 +169,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
productId, productId,
projectId, projectId,
templateType, templateType,
title, // title,
]); ]);
//模板启用切换 //模板启用切换
...@@ -193,6 +193,13 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -193,6 +193,13 @@ const AddTemplate = (props: IAddTemplateProps) => {
getAddTemplateListFun(); getAddTemplateListFun();
}, [getAddTemplateListFun]); }, [getAddTemplateListFun]);
// 按回车搜索
const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) {
getAddTemplateListFun(e.target.value);
}
};
const hiddenBoxArr = useMemo(() => { const hiddenBoxArr = useMemo(() => {
const length = const length =
templateType === "public" templateType === "public"
...@@ -231,6 +238,7 @@ const AddTemplate = (props: IAddTemplateProps) => { ...@@ -231,6 +238,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
onChange={(e: any) => { onChange={(e: any) => {
setTitle(e.target.value); setTitle(e.target.value);
}} }}
onKeyUp={handleKeyWordChangeKeyUp}
placeholder="输入关键词搜索" placeholder="输入关键词搜索"
size="small" size="small"
sx={{ width: 340, height: 32 }} sx={{ width: 340, height: 32 }}
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
margin-bottom: 20px; margin-bottom: 20px;
line-height: 22px; line-height: 22px;
font-size: 14px; font-size: 14px;
font-weight: 900;
/* text-align: center; */ /* text-align: center; */
/* transform: translateX(-50%) rotate(-90deg); */ /* transform: translateX(-50%) rotate(-90deg); */
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:20:29 * @Date: 2022-07-12 11:20:29
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-22 11:45:44 * @LastEditTime: 2022-08-22 16:41:54
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx * @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com * @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46 * @Date: 2022-07-12 11:29:46
* @LastEditors: 吴永生 15770852798@163.com * @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-09 19:06:43 * @LastEditTime: 2022-08-22 16:47:06
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.tsx * @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -99,7 +99,7 @@ const FlowNode = (props: any) => { ...@@ -99,7 +99,7 @@ const FlowNode = (props: any) => {
}) })
: null} : null}
<div> <div>
{title || ""} {showVersion && version} <span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span>
{flowType !== "edit" && isCheck ? ( {flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span> <span className={styles.successDot}></span>
) : null} ) : null}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment