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 @@
color: rgba(19, 112, 255, 1);
font-size: 14px;
}
.outputItemName{
max-width: 190px;
white-space: nowrap;
display: block;
overflow: hidden;
text-overflow: ellipsis;
}
.outputLiLeftImg {
margin-right: 12px;
}
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @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
* @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 "
import styles from "./index.module.css";
const stateMap = {
SUBMITTED:"正在启动",
RUNNING: "正在运行",
ABORTED: "运行终止",
FAILED: "运行失败",
......@@ -349,17 +350,6 @@ const ProjectSubmitWork = observer(() => {
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(() => {
cancelWorkJob({
......@@ -375,7 +365,7 @@ const ProjectSubmitWork = observer(() => {
}, [deleteWorkJob, workFlowJobInfo?.id]);
const returnPermission = useMemo(() => {
if (state === "RUNNING") {
if (['SUBMITTED', 'RUNNING'].includes(state || '')) {
return isPass("PROJECT_WORKBENCH_JOBS_STOP", "USER");
} else {
return isPass("PROJECT_WORKBENCH_JOBS_DELETE", "MANAGER");
......@@ -446,13 +436,13 @@ const ProjectSubmitWork = observer(() => {
}}
> */}
<MyButton
text={state === "RUNNING" ? "终止" : "删除"}
text={['SUBMITTED', 'RUNNING'].includes(state || '') ? "终止" : "删除"}
variant="outlined"
color="secondary"
onClick={(e: any) =>
handleShowPopper(
e,
state === "RUNNING"
['SUBMITTED', 'RUNNING'].includes(state || '')
? "正在运行的任务终止后将无法重新运行,确认继续吗?"
: "任务被删除后将无法恢复,确认继续吗?"
)
......@@ -490,7 +480,7 @@ const ProjectSubmitWork = observer(() => {
}
alt=""
/>
{item.name}
<span className={styles.outputItemName}>{item.name}</span>
</div>
{/* </MyPopconfirm> */}
<span className={styles.outputLiRight}>
......@@ -551,7 +541,7 @@ const ProjectSubmitWork = observer(() => {
alt=""
/>
)}
{state === "RUNNING" && (
{['SUBMITTED', 'RUNNING'].includes(state || '') && (
<img
className={styles.taskInfoValueIcon}
src={jobRun}
......
......@@ -87,6 +87,8 @@ const TaskCard = (props: TaskCardProps) => {
// 渲染状态
const renderStatusText = (data: string) => {
switch (data) {
case "SUBMITTED":
return "正在启动";
case "RUNNING":
return '正在运行'
case "ABORTED":
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -48,6 +48,10 @@ const currencies = [
value: "ALL",
label: "全部",
},
{
value: "SUBMITTED",
label: "正在启动",
},
{
value: "RUNNING",
label: "正在运行",
......
......@@ -144,7 +144,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
};
// 获取模板列表
const getAddTemplateListFun = useCallback(() => {
const getAddTemplateListFun = useCallback((newTitle?: string) => {
const userName = JSON.parse(localStorage.getItem("userInfo") || "{}")?.name;
setSelectTemplateData([]);
setAddTemplateList([]);
......@@ -153,14 +153,14 @@ const AddTemplate = (props: IAddTemplateProps) => {
projectId: projectId as string,
productId: productId as string,
creator: "root",
keyword: title,
keyword: newTitle,
});
} else {
getAddTemplateList({
projectId: projectId as string,
productId: productId as string,
creator: userName,
keyword: title,
keyword: newTitle,
});
}
}, [
......@@ -169,7 +169,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
productId,
projectId,
templateType,
title,
// title,
]);
//模板启用切换
......@@ -193,6 +193,13 @@ const AddTemplate = (props: IAddTemplateProps) => {
getAddTemplateListFun();
}, [getAddTemplateListFun]);
// 按回车搜索
const handleKeyWordChangeKeyUp = (e: any) => {
if (e.keyCode === 13) {
getAddTemplateListFun(e.target.value);
}
};
const hiddenBoxArr = useMemo(() => {
const length =
templateType === "public"
......@@ -231,6 +238,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
onChange={(e: any) => {
setTitle(e.target.value);
}}
onKeyUp={handleKeyWordChangeKeyUp}
placeholder="输入关键词搜索"
size="small"
sx={{ width: 340, height: 32 }}
......
......@@ -40,6 +40,7 @@
margin-bottom: 20px;
line-height: 22px;
font-size: 14px;
font-weight: 900;
/* text-align: center; */
/* transform: translateX(-50%) rotate(-90deg); */
}
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:20:29
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -99,7 +99,7 @@ const FlowNode = (props: any) => {
})
: null}
<div>
{title || ""} {showVersion && version}
<span style={{fontSize: '12px', lineHeight: '24px'}}>{title || ""} {showVersion && version}</span>
{flowType !== "edit" && isCheck ? (
<span className={styles.successDot}></span>
) : 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