Commit 621af1fc authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !90
parents 379ab1b7 53d8e36f
......@@ -20,7 +20,6 @@
border-radius: 2px;
line-height: 20px;
padding: 6px 16px;
/* background-color: #e6e8eb; */
flex: 1;
display: flex;
align-items: center;
......
......@@ -71,7 +71,7 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
bgcolor: "transparent",
minWidth: "200px",
fontSize: "14px",
padding: "20px 16px",
padding: "8px 0px",
}}
>
<Box
......@@ -80,7 +80,7 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
minWidth: "200px",
borderRadius: "4px",
fontSize: "14px",
padding: "20px 16px",
padding: "16px 20px",
boxShadow: "0px 3px 10px 0px rgba(0, 24, 57, 0.14)",
}}
>
......
......@@ -8,15 +8,7 @@
}
.logViewBox {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 900px;
height: 600px;
background: #282c34;
box-shadow: 2px 4px 20px 0px rgba(0, 15, 45, 0.12);
border-radius: 8px;
}
.close {
......@@ -29,12 +21,13 @@
.logViewTop {
/* height: 30px; */
width: 100vw;
background-color: #1d2126;
border-radius: 8px 8px 0 0;
/* border-radius: 8px 8px 0 0; */
display: flex;
font-size: 12px;
color: #8a9099;
overflow: overlay;
/* overflow: overlay; */
}
.logViewTop::-webkit-scrollbar-track {
......@@ -43,11 +36,18 @@
.logTitle {
display: flex;
width: 0;
max-width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow:ellipsis;
flex: 1;
align-items: center;
height: 30px;
line-height: 20px;
padding: 0 24px;
cursor: pointer;
border-right: 1px solid #10141A;
}
.logTitleSelected {
......@@ -63,8 +63,8 @@
.logViewContent {
position: relative;
box-sizing: border-box;
height: 510px;
padding: 16px 24px 0;
height: calc(100vh - 148px);
padding: 24px 32px 0;
color: #d1d6de;
white-space: pre-wrap;
word-break: break-word;
......@@ -74,12 +74,12 @@
}
.logViewContentMask {
height: 16px;
width: 852px;
height: 24px;
width: calc(100vw - 64px);
background-color: #282c34;
position: absolute;
top: 30px;
left: 24px;
left: 32px;
z-index: 1005;
}
......@@ -91,6 +91,6 @@
display: flex;
align-items: center;
justify-content: end;
height: 60px;
height: 76px;
padding-right: 24px;
}
}
\ No newline at end of file
......@@ -7,16 +7,18 @@ import InsertDriveFileOutlinedIcon from "@mui/icons-material/InsertDriveFileOutl
import CloudEController from "@/api/fileserver/CloudEController";
import { useStores } from "@/store";
import { toJS } from "mobx";
import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer";
type LogViewProps = {
isshow: boolean;
handleClose: () => void;
logs: any[];
setShowAddTemplate: any;
};
const LogView = (props: LogViewProps) => {
const { isshow, handleClose, logs } = props;
const { isshow, handleClose, logs, setShowAddTemplate } = props;
const { currentProjectStore } = useStores();
const fileToken = toJS(currentProjectStore.currentProjectInfo.filetoken);
const projectId = toJS(currentProjectStore.currentProjectInfo.id);
......@@ -42,7 +44,7 @@ const LogView = (props: LogViewProps) => {
)?.then((res) => {
setLogText(res.data)
})
}else{
} else {
setLogText("")
}
}, [logPath]);
......@@ -53,41 +55,42 @@ const LogView = (props: LogViewProps) => {
}, [logCurrent]);
// 下载当前日志
const handleDownLoad=()=>{
const handleDownLoad = () => {
const path = logPath.slice(12)
CloudEController.JobFileDownload(
path,
fileToken as string,
projectId as string
);
path,
fileToken as string,
projectId as string
);
}
return <div className={style.logView} style={isshow ? {} : { display: "none" }}>
<div className={style.logViewBox}>
<CloseIcon onClick={handleClose} className={style.close} />
<div className={style.logViewContentMask}></div>
<div className={style.logViewTop}>
{logs.map((item: any, index: number) => {
return <div
key={index}
onClick={() => { setLogCurrent(index) }}
className={classnames({
[style.logTitle]: true,
[style.logTitleSelected]: index === logCurrent,
})}>
<InsertDriveFileOutlinedIcon className={style.fileIcon} />
<span>{item.logName}</span>
</div>
})}
return (
<FullScreenDrawer handleClose={setShowAddTemplate} zIndex={1002}>
<div className={style.logViewBox}>
<div className={style.logViewContentMask}></div>
<div className={style.logViewTop}>
{logs.map((item: any, index: number) => {
return <div
key={index}
onClick={() => { setLogCurrent(index) }}
className={classnames({
[style.logTitle]: true,
[style.logTitleSelected]: index === logCurrent,
})}>
<InsertDriveFileOutlinedIcon className={style.fileIcon} />
<span>{item.logName}</span>
</div>
})}
</div>
<div className={style.logViewContent}>
{logText}
</div>
<div className={style.logViewBottom}>
<MyButton text='下载当前日志' onClick={handleDownLoad} />
</div>
</div>
<div className={style.logViewContent}>
{logText}
</div>
<div className={style.logViewBottom}>
<MyButton text='下载当前日志' onClick={handleDownLoad} />
</div>
</div>
</div>
</FullScreenDrawer>
)
}
export default LogView
\ No newline at end of file
......@@ -30,7 +30,7 @@
}
.swTemplateTitle {
margin: 0 19px 0 8px;
line-height: 22px;
line-height: 20px;
font-size: 14px;
color: rgba(30, 38, 51, 1);
font-weight: 700;
......@@ -114,10 +114,10 @@
margin-right: 44px;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.taskInfoValue {
color: rgba(30, 38, 51, 1);
......@@ -130,6 +130,13 @@
word-break: break-all;
flex: 1;
justify-content: flex-end;
overflow: hidden;
word-wrap: break-word;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.taskInfoValueClick {
cursor: pointer;
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-05 17:33:58
* @LastEditTime: 2022-09-06 10:54:40
* @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,8 @@ import {
getDatasetPath,
getSameBatch,
} from "./utils";
import MyTooltip from "@/components/mui/MyTooltip";
import styles from "./index.module.css";
......@@ -75,11 +77,11 @@ const ProjectSubmitWork = observer(() => {
const productId = toJS(currentProjectStore.currentProductInfo.id);
const [workFlowJobInfo, setWorkFlowJobInfo] = useState<ITaskInfo>();
const [patchInfo, setPatchInfo] = useState<any>();
const [overviewInfo, setOverviewInfo] = useState<any>();
const [overviewActive, setOverviewActive] = useState(true);
/** 选中的node Id */
const [activeFlowIndex, setActiveFlowIndex] = useState<string>("");
/** 选中的flow Title */
const [selectNodeTitle, setSelectNodeTitle] = useState('参数')
// const [showOptions, setShowOptions] = useState<boolean>(false);
const [randerOutputs1, setRanderOutputs] = useState<Array<any>>([]);
const locationInfo: any = useLocation()?.state;
......@@ -308,9 +310,8 @@ const ProjectSubmitWork = observer(() => {
if (Array.isArray(res.data)) {
res.data.forEach((item1) => {
if (item1.name === item.path.slice(item.path.lastIndexOf("/") + 1)) {
randerOutputs[index].size = `${
item1.size ? storageUnitFromB(Number(item1.size)) : "-"
}`;
randerOutputs[index].size = `${item1.size ? storageUnitFromB(Number(item1.size)) : "-"
}`;
setRanderOutputs([...randerOutputs]);
}
});
......@@ -356,32 +357,26 @@ const ProjectSubmitWork = observer(() => {
const selectedParameter = useCallback(
(list: any) => {
let result: any = [];
if(patchInfo?.id === activeFlowIndex ) {
setSelectNodeTitle(list[0].title || '')
result = list[0].parameters
} else {
list?.length &&
list?.forEach((item: any) => {
if (item.id === activeFlowIndex) {
console.log(1111)
setSelectNodeTitle(item?.title || '')
setOverviewInfo(item)
result = item.parameters;
}
});
}
return result;
},
[activeFlowIndex, patchInfo]
[activeFlowIndex]
);
const randerParameters = useMemo(() => {
if (patchInfo?.children?.length) {
return selectedParameter(patchInfo?.children);
if(patchInfo?.id === activeFlowIndex ) {
setOverviewInfo(patchInfo)
return patchInfo?.parameters
} else {
return selectedParameter(patchInfo?.parameters);
return selectedParameter(patchInfo?.children);
}
}, [patchInfo, selectedParameter]);
}, [activeFlowIndex, patchInfo, selectedParameter]);
const handleParams = () => {
setOverviewActive(false);
......@@ -515,8 +510,8 @@ const ProjectSubmitWork = observer(() => {
)}
{(!workFlowJobInfo?.outputs ||
Object.keys(workFlowJobInfo?.outputs).length === 0) && (
<div className={styles.notResults}>暂无结果文件</div>
)}
<div className={styles.notResults}>暂无结果文件</div>
)}
<div className={styles.title}>任务信息</div>
<div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>任务名称</div>
......@@ -649,7 +644,7 @@ const ProjectSubmitWork = observer(() => {
)}
{activeFlowIndex && (
<div className={styles.suanziInfo}>
<div className={styles.title}>{patchInfo?.title}</div>
<MyTooltip><div className={styles.title}>{overviewInfo?.title}</div></MyTooltip>
<div className={styles.tabs}>
<div
className={classNames({
......@@ -668,7 +663,7 @@ const ProjectSubmitWork = observer(() => {
// onClick={() => setOverviewActive(false)}
onClick={() => handleParams()}
>
{selectNodeTitle}
参数
</div>
</div>
{overviewActive && (
......@@ -681,40 +676,40 @@ const ProjectSubmitWork = observer(() => {
[styles.taskInfoValueShowAll]: true,
})}
>
{patchInfo?.description}
{overviewInfo?.description}
</div>
</div>
<div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>算子版本</div>
<div className={styles.taskInfoValue}>
{patchInfo?.version || "-"}
{overviewInfo?.version || "-"}
</div>
</div>
<div className={styles.taskInfoLi}>
<div className={styles.taskInfoParams}>算子状态</div>
<div className={styles.taskInfoValue}>
{patchInfo?.status === "Done" && (
{overviewInfo?.status === "Done" && (
<img
className={styles.taskInfoValueIcon}
src={jobSue}
alt=""
/>
)}
{patchInfo?.status === "Running" && (
{overviewInfo?.status === "Running" && (
<img
className={styles.taskInfoValueIcon}
src={jobRun}
alt=""
/>
)}
{patchInfo?.status === "Failed" && (
{overviewInfo?.status === "Failed" && (
<img
className={styles.taskInfoValueIcon}
src={jobFail}
alt=""
/>
)}
{statusMap[patchInfo?.status as IStatus]}
{statusMap[overviewInfo?.status as IStatus]}
</div>
</div>
</div>
......@@ -771,7 +766,7 @@ const ProjectSubmitWork = observer(() => {
projectId={projectId as string}
></SeeDataset>
)}
<LogView isshow={showLogView} handleClose={handleClose} logs={logs} />
{showLogView && <LogView isshow={showLogView} handleClose={handleClose} logs={logs} setShowAddTemplate={handleClose} />}
</div>
);
});
......
......@@ -2,7 +2,7 @@
position: relative;
}
.templateDescBox {
margin-bottom: 40px;
margin-bottom: 24px;
}
.templateDescTitle {
font-size: 16px;
......@@ -81,11 +81,10 @@
}
.taskConfigBox {
padding: 16px 0px 4px;
}
.flowTitle {
line-height: 16px;
margin: 3px 0 27px;
margin: 3px 0 25px;
color: rgba(19, 112, 255, 1);
font-size: 14px;
font-weight: 600;
......@@ -119,11 +118,11 @@
margin-left: 16px;
}
.bacthConfigBox {
padding: 0 24px 0;
padding: 16px 24px 4px;
}
.flowConfigBox {
border-bottom: 1px solid rgba(235, 237, 240, 1);
padding: 20px 24px 12px;
padding: 24px 24px 12px;
}
.flowConfigBox:nth-last-child(1) {
border-bottom: none;
......
......@@ -492,12 +492,16 @@ const ConfigForm = (props: ConfigFormProps) => {
/>
</div>
<div className={styles.taskConfigBox}>
<div className={styles.bacthConfigBox}>
{randerParameters(
task.parameters.filter((parameter) => !parameter?.thrown),
task.id
)}
</div>
{task.parameters.filter(
(parameter) => !parameter?.thrown && !parameter.hidden
).length !== 0 && (
<div className={styles.bacthConfigBox}>
{randerParameters(
task.parameters.filter((parameter) => !parameter?.thrown),
task.id
)}
</div>
)}
{task.flows.map((flow) => {
if (
flow.parameters.filter(
......
......@@ -27,7 +27,7 @@
}
.swTemplateTitle {
margin: 0 19px 0 8px;
line-height: 22px;
line-height: 20px;
font-size: 14px;
color: rgba(30, 38, 51, 1);
font-weight: 700;
......@@ -51,11 +51,11 @@
}
.swFormBox {
background-color: #fff;
border-right: 1xp solid rgba(235, 237, 240, 1);
border-right: 1px solid rgba(235, 237, 240, 1);
width: 608px;
overflow-y: overlay;
box-sizing: border-box;
padding: 36px;
padding: 32px 32px 16px;
}
.swFlowBox {
flex: 1;
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-02 14:45:04
* @LastEditTime: 2022-09-06 10:17:18
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -41,6 +41,7 @@ import MyProgress from "@/components/mui/MyProgress";
import SearchInput from "@/components/BusinessComponents/SearchInput";
import MyCircularProgress from "@/components/mui/MyCircularProgress";
import moment from "moment";
import MyTooltip from "@/components/mui/MyTooltip";
import styles from "./index.module.css";
......@@ -400,7 +401,7 @@ const ProjectMembers = observer(() => {
onClick={() => rowClick(item.id)}
>
<Box className={styles.tabBoxInfo}>
<div className={styles.tabBoxTitle}>{item.name}</div>
<MyTooltip title={item.name}><div className={styles.tabBoxTitle}>{item.name}</div></MyTooltip>
<Box className={styles.tabBoxDescInfo}>
<div
className={styles.tabBoxDesc}
......
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