-
-
- #1
- 将分支“221063-improve-buy-ci-minutes-link”合并到“221063-improve-buy-ci-minutes-link"
- {Tags(1)}
-
- 退出
-
-
-
-
-
-
+ let projectId = props.match.params.projectId;
+ let opsId = props.match.params.opsId;
+
+ useEffect(() => {
+ if (opsId && projectId) {
+ Init();
+ }
+ }, [opsId]);
+
+ function Init(){
+ const url = `/dev_ops/builds/${opsId}.json`;
+ axios.get(url, {
+ params: {
+ project_id: projectId,
+ },
+ })
+ .then((result) => {
+ if (result && result.data) {
+ setSpinning(false);
+ setData(result.data);
+ setStages(result.data.stages);
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ });
+ }
+
+ // 重新构建
+ function repeatSet() {
+ const url = `/dev_ops/builds/${data && data.number}.json`;
+ axios.post(url, { project_id: projectId })
+ .then((result) => {
+ if (result) {
+ Init();
+ }
+ })
+ .catch((error) => {
+ console.log(error);
+ });
+ }
+ return (
+
+
+
+
+ #{data && data.number}
+ {data && data.message}
+ {Tags(`${data && data.status}`)}
+
+
+ 退出
+
+
+
+
+
+
+
+
-
- )
-});
\ No newline at end of file
+
+ );
+};
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 88f20638..8faaa61b 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -438,12 +438,12 @@ class Detail extends Component {
}
- {/*
-1 ? "active" : ""}>
+ -1 ? "active" : ""}>
工作流
{projectDetail && projectDetail.ops_count ? {projectDetail.ops_count} : ""}
- */}
+
-1 || url.indexOf("meilpost") > -1) ? "active" : ""}>
里程碑
diff --git a/src/forge/Utils/Time.js b/src/forge/Utils/Time.js
index 55d73441..4de4b371 100644
--- a/src/forge/Utils/Time.js
+++ b/src/forge/Utils/Time.js
@@ -26,7 +26,7 @@ export function getDateTime(value, dataformat) {
return date.format(dataformat);
}
-export default function Time(UTCtiem) {
+export function Time(UTCtiem) {
var dateTime = new Date(UTCtiem);
var year = dateTime.getFullYear();