Commit d77de3e3 authored by chenshouchao's avatar chenshouchao

feat: 增加一些loading

parent e4483cae
.seeEnv {
position: relative;
}
.titleBox {
padding: 14px 24px;
display: flex;
......@@ -8,10 +11,6 @@
.goBackIcon {
width: 22px;
height: 22px;
/* background-color: #fff; */
/* border-radius: 4px; */
/* margin-right: 12px; */
/* box-shadow: 0px 2px 5px 0px rgba(3, 47, 105, 0.09); */
cursor: pointer;
}
.title {
......
import style from "./index.module.css";
import React, { useState, useEffect, useMemo } from "react";
import React, { useState, useEffect } from "react";
import LogView from "@/views/ResourceCenter/components/LogView";
import { useNavigate } from "react-router-dom";
import BasicInfo, {
......@@ -9,6 +9,7 @@ import { getActorenvDetail } from "@/api/resourceCenter";
import useMyRequest from "@/hooks/useMyRequest";
import goback from "@/assets/project/goback.svg";
import { useLocation } from "react-router-dom";
import MyCircularProgress from "@/components/mui/MyCircularProgress";
import jobFail from "@/assets/project/jobFail.svg";
import jobRun from "@/assets/project/jobRun.svg";
import jobSue from "@/assets/project/jobSue.svg";
......@@ -18,8 +19,34 @@ const SeeEnv = () => {
const location = useLocation();
const [id, setId] = useState("");
const [info, setInfo] = useState<any>({});
const [infoListTop, setInfoListTop] = useState<Array<IInfoItem>>([]);
const [infoListBot, setInfoListBot] = useState<Array<IInfoItem>>([]);
const [infoListTop, setInfoListTop] = useState<Array<IInfoItem>>([
{
label: "构建状态",
value: "",
},
{
label: "创建时间",
value: "",
},
{
label: "构建时长",
value: "",
},
{
label: "构建成本",
value: "",
},
{
label: "基础环境",
value: "",
},
]);
const [infoListBot, setInfoListBot] = useState<Array<IInfoItem>>([
{
label: "描述",
value: "",
},
]);
const [logs, setLogs] = useState<Array<any>>([]);
const getStatus = (item: any) => {
......@@ -58,7 +85,6 @@ const SeeEnv = () => {
const { run, loading } = useMyRequest(getActorenvDetail, {
onSuccess: (res) => {
console.log(res);
setInfo(res.data);
let data = res.data;
setInfoListTop([
......@@ -112,6 +138,7 @@ const SeeEnv = () => {
return (
<div className={style.seeEnv}>
<MyCircularProgress loading={loading} />
<div className={style.titleBox}>
<img
className={style.goBackIcon}
......@@ -134,7 +161,7 @@ const SeeEnv = () => {
<div className={style.logsBox}>
<div className={style.logsTitle}>日志</div>
<div className={style.LogViewBox}>
<LogView logs={logs}></LogView>
{!loading && <LogView logs={logs}></LogView>}
</div>
</div>
</div>
......
......@@ -54,7 +54,7 @@ const UserResourcesEnvironment = () => {
width: 140,
},
];
const { run: getList } = useMyRequest(getActorenvList, {
const { run: getList, loading } = useMyRequest(getActorenvList, {
onSuccess: (res) => {
setList(res.data.content);
setCount(res.data.totalPages - 1);
......@@ -257,6 +257,7 @@ const UserResourcesEnvironment = () => {
nodataText="暂无应用环境"
paginationType="complex"
totalElements={totalElements}
loading={loading}
></MyTable>
</div>
{addOpen && <AddEnvironment setAddopen={setAddopen}></AddEnvironment>}
......
import style from "./index.module.css";
import usePass from "@/hooks/usePass";
import UserResourcesEnvironment from "./UserResourcesEnvironment";
import { useMemo, useState } from "react";
import classNames from "classnames";
import { useMemo } from "react";
import Tabs from "@/components/mui/MyTabs";
import WorkflowOperator from "./WorkflowOperator";
import OperatorDetails from "./WorkflowOperator/components/OperatorDetails";
......
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