Commit 34250724 authored by wuyongsheng's avatar wuyongsheng

feat: 日志loading

parent 32d3e94d
......@@ -11,6 +11,7 @@ import FullScreenDrawer from "@/components/CommonComponents/FullScreenDrawer";
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
import useWindowSize from "@/hooks/useWindowSize";
import MyCircularProgress from "@/components/mui/MyCircularProgress";
type LogViewProps = {
logs: any[];
......@@ -37,6 +38,8 @@ const LogView = (props: LogViewProps) => {
const [leftButtonColor, setLeftButtonColor] = useState("#585D62");
const [rightButtonColor, setRightButtonColor] = useState("#585D62");
const [logLoading, setLogLoading] = useState<boolean>(true)
useEffect(() => {
setLogPath(logs[logCurrent]?.logPath);
......@@ -45,6 +48,7 @@ const LogView = (props: LogViewProps) => {
// 请求日志文本
useEffect(() => {
if (logPath) {
setLogLoading(true)
const path = logPath.slice(12);
CloudEController.JobFileDownloadText(
path,
......@@ -52,6 +56,8 @@ const LogView = (props: LogViewProps) => {
projectId as string
)?.then((res) => {
setLogText(res.data);
}).finally(()=>{
// setLogLoading(false)
});
} else {
setLogText("");
......@@ -179,10 +185,12 @@ const LogView = (props: LogViewProps) => {
<ChevronRightIcon />
</div>
</div>
<div className={style.logViewContent}>{logText}</div>
<div className={style.logViewBottom}>
<MyButton text="下载当前日志" onClick={handleDownLoad} />
</div>
<MyCircularProgress loading={logLoading} >
<div className={style.logViewContent}>{logText}</div>
<div className={style.logViewBottom}>
<MyButton text="下载当前日志" onClick={handleDownLoad} />
</div>
</MyCircularProgress>
</div>
</FullScreenDrawer>
);
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-12-13 14:12:44
* @LastEditTime: 2022-12-13 19:15:57
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -251,6 +251,7 @@ const ProjectSubmitWork = observer(() => {
await getFileSize(item, index);
}
});
renderOutputs = arr;
setRenderOutputs(renderOutputs);
} else {
......@@ -328,7 +329,8 @@ const ProjectSubmitWork = observer(() => {
const setExternalSelectedNodeId = (id: string) => {
setActiveFlowIndex(id);
workFlowJobInfo?.tasks &&
if(id) {
workFlowJobInfo?.tasks &&
workFlowJobInfo?.tasks?.forEach((item) => {
if (item.id === id) {
getworkFlowTaskInfoRun({
......@@ -337,6 +339,10 @@ const ProjectSubmitWork = observer(() => {
});
}
});
} else {
getOutputs(workFlowJobInfo?.outputs)
}
};
const selectedParameter = useCallback(
......
......@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-10-17 15:36:29
* @LastEditTime: 2022-12-13 16:12:00
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -58,7 +58,7 @@ const ProjectSetting = observer(() => {
<Box sx={{ width: "100%", typography: "body1" }}>
<Tabs
tabList={tabList}
defaultValue={location?.state?.type || "projectMember"}
defaultValue={location?.state?.type || undefined}
/>
</Box>
</div>
......
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