build/static/js/72.bef599ce.chunk.js

1 line
24 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(this.webpackJsonp=this.webpackJsonp||[]).push([[72],{"B/o2":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(r=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=n("q1tI"),l=c(i),o=c(n("GJQR")),u=c(n("hi2r")),s=c(n("vDqi"));function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(){var e=(0,i.useState)(void 0),t=a(e,2),n=t[0],c=t[1];return(0,i.useEffect)((function(){n||s.default.get("/api/ci/pipelines/ssh_server.json").then((function(e){e&&e.data&&c(r({},e.data))})).catch((function(e){})),setTimeout((function(){u.default.publish("create-socket",1)}),300)}),[n]),l.default.createElement(o.default,{sshConfigData:n||{},sid:1})}},FFNF:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagsLine=t.Tags=void 0;var r,a=n("q1tI"),i=(r=a)&&r.__esModule?r:{default:r};n("KkuB");t.Tags=function(e){switch(e){case"running":return i.default.createElement("span",{className:"statusColor running"},"运行中");case"failure":case"error":return i.default.createElement("span",{className:"statusColor failed"},"未通过");case"success":return i.default.createElement("span",{className:"statusColor pass"},"已通过");case"pending":return i.default.createElement("span",{className:"statusColor Preparing"},"准备中");case"killed":return i.default.createElement("span",{className:"statusColor killed"},"已撤销")}},t.TagsLine=function(e){switch(e){case"running":return i.default.createElement("span",{className:"statuslineColor running"},"运行中");case"failure":case"error":return i.default.createElement("span",{className:"statuslineColor failed"},"未通过");case"success":return i.default.createElement("span",{className:"statuslineColor pass"},"已通过");case"pending":return i.default.createElement("span",{className:"statuslineColor Preparing"},"准备中");case"killed":return i.default.createElement("span",{className:"statuslineColor killed"},"已撤销");case"skipped":return i.default.createElement("span",{className:"statuslineColor skipped"},"已跳过")}}},GJQR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(r=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=n("q1tI"),l=d(i),o=n("J66h"),u=n("/POA");n("q7KB");var s=d(n("hi2r")),c=d(n("bdgK"));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){var r=n._core._renderService.dimensions.actualCellWidth||9.5,a=n._core._renderService.dimensions.actualCellHeight||18,i=Math.floor(t/a);return[Math.floor(e/r),i]}t.default=function(e){var t=e.sshConfigData,n=e.sid,d=(0,i.useState)(null),p=a(d,2),g=p[0],m=p[1],h=t.ws_url,x=(t.password,t.port),b=t.secret,v=(0,i.useRef)(),y=(0,i.useRef)(),E=(0,i.useRef)(!1);return(0,i.useEffect)((function(){if(v.current&&h){var e=new u.Terminal({fontSize:16,rendererType:"dom"});e.open(v.current),e.onData((function(e){y.current&&1===y.current.readyState&&(y.current.send(JSON.stringify({tp:"client",data:e})),s.default.publish("on-operating-ssh"))})),e.write("Connecting..."),m(e);var t=function(e,t){var n=new c.default((function(t){console.log(t);var n=!0,r=!1,i=void 0;try{for(var l,o=t[Symbol.iterator]();!(n=(l=o.next()).done);n=!0){var u=l.value;if(u.target.offsetHeight>0||u.target.offsetWidth>0){var c=f(u.target.offsetWidth,u.target.offsetHeight,e),d=a(c,2),p=d[0],g=d[1];e.resize(p,g),s.default.publish("ssh-xterm-resize",{columns:p,rows:g,width:u.target.offsetWidth,height:u.target.offsetHeight})}}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}));return n.observe(t),n}(e,v.current);return function(){e.dispose(),t.unobserve(v.current)}}}),[h,v.current]),(0,i.useEffect)((function(){if(g&&h){var e=setInterval((function(){y.current&&y.current.send(JSON.stringify({tp:"h"}))}),3e4),a=s.default.subscribe("create-socket",(function(a){var i;n===a&&(y.current&&1===y.current.readyState?g.focus():(i=new WebSocket(h),y.current=i,i.onopen=function(){var e=g.element.parentElement;if(e){var n=e.offsetWidth,a=e.offsetHeight;console.log("init",{tp:"init",data:r({},t,{secret:b,width:n,height:a,rows:g.rows,columns:g.cols})}),i.send(JSON.stringify({tp:"init",data:r({},t,{secret:b,width:n,height:a,rows:g.rows,columns:g.cols})}))}g.focus()},i.onerror=function(e){console.log("------in socket error----",e,i,h)},i.onmessage=function(e){E.current||(g.write("\r"),setTimeout((function(){}),1e3)),E.current=!0;var t=o.Base64.decode(e.data.toString());g._core._renderService.dimensions.actualCellWidth,g.write(t)},i.onclose=function(t){e&&clearInterval(e),g.write("\r\nconnection closed")}),g.focus())})),i=s.default.subscribe("close-socket",(function(e){n===e&&(y.current&&(y.current.close(),E.current=!1,g.clear()),y.current=null)})),l=s.default.subscribe("ssh-xterm-resize",(function(e){y.current&&1===y.current.readyState&&y.current.send(JSON.stringify({tp:"resize",data:r({},e)}))})),u=s.default.subscribe("ssh-add-connect-time",(function(){y.current&&1===y.current.readyState&&y.current.send(JSON.stringify({tp:"overtime"}))}));return function(){i(),a(),l(),u(),y.current&&(y.current.close(),E.current=!1)}}}),[g,h,x]),l.default.createElement("div",{ref:v,className:"xterm-panel",style:{height:"100%"}},h?null:l.default.createElement("p",{style:{color:"#fff"}},"正在连接命令行服务..."))}},N5Xz:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a,i=x(n("NJEC")),l=x(n("BvKs")),o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(r=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=(r=["\n {\n width: 25px;\n height: 25px;\n border-radius: 50%;\n margin-right: 10px;\n }\n"],a=["\n {\n width: 25px;\n height: 25px;\n border-radius: 50%;\n margin-right: 10px;\n }\n"],Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(a)}})));n("k994"),n("2WkQ");var s=n("q1tI"),c=x(s),d=n("spEH"),f=x(n("vOnD")),p=n("FFNF"),g=n("zxge"),m=n("PhNK"),h=n("sYIF");function x(e){return e&&e.__esModule?e:{default:e}}var b=l.default.SubMenu,v=f.default.img(u);t.default=function(e){var t,n,r=e.data,a=e.repeatSet,u=e.chooseSteps,f=(0,s.useState)(void 0),x=o(f,2),y=(x[0],x[1]),E=(0,s.useState)(void 0),w=o(E,2),k=(w[0],w[1]);return(0,s.useEffect)((function(){if(r&&r.started){var e=1e3*parseInt(r.started),t=(0,g.Time)(e);y(t)}r&&r.after&&k((0,m.truncateCommitId)(r.after))}),[r]),c.default.createElement("div",null,c.default.createElement(d.FlexAJ,{className:"leftheader"},c.default.createElement(d.AlignCenter,null,c.default.createElement(v,{src:(0,h.getImageUrl)("/"+(r&&r.author&&r.author.image_url))}),r&&r.started&&c.default.createElement("span",{className:"nest"},"开始时间:",c.default.createElement("span",null," ",r.started)),r&&r.duration_time&&c.default.createElement("span",{className:"nest"},"运行时间:",c.default.createElement("span",null,r.duration_time))),(t=r&&r.status,n=r&&r.number,"failure"===t||"error"===t||"success"===t?"":"killed"===t?c.default.createElement(i.default,{title:"确认重新构建?",onConfirm:function(e){return a(e,"repeat",n)},onCancel:function(e){e.stopPropagation()},cancelText:"取消",okText:"确定"},c.default.createElement(d.Blueline,{onClick:function(e){e.stopPropagation()}},"重新构建")):c.default.createElement(i.default,{title:"确认撤销构建?",onConfirm:function(e){return a(e,"cancel",n)},onCancel:function(e){e.stopPropagation()},cancelText:"取消",okText:"确定"},c.default.createElement(d.Blueline,{onClick:function(e){e.stopPropagation()}},"撤销构建")))),c.default.createElement("div",{className:"leftMainContent"},c.default.createElement(d.AlignCenter,{className:"contentBranch"},c.default.createElement("i",{className:"iconfont icon-fenzhi1"}),c.default.createElement("span",null,"分支:"),c.default.createElement("span",{className:"branchname"},r&&r.branch_target),c.default.createElement("span",{className:"branchsha"},r&&(0,m.truncateCommitId)(r.build_after_sha)))),c.default.createElement(l.default,{mode:"inline",className:"leftMenu",defaultOpenKeys:["0"],defaultSelectedKeys:["0"]},r&&r.stages?r.stages.map((function(e,t){return e.steps&&e.steps.length>0?c.default.createElement(b,{title:c.default.createElement("div",null,c.default.createElement("i",{className:"iconfont icon-gongzuoliu font-14 mr4"}),c.default.createElement("span",null,e.name)),key:""+t},e.steps.map((function(t,n){return c.default.createElement(l.default.Item,{key:""+n,onClick:function(n){return r=e.number,a=t.id,void u(r,a);var r,a}},c.default.createElement(d.FlexAJ,null,c.default.createElement("span",null,t.name," ",t.status?(0,p.TagsLine)(t.status):""),c.default.createElement("span",null,t.duration_time)))}))):""})):""))}},N66O:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n("W9HT")),a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(r=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("04bd");var i=n("q1tI"),l=c(i),o=n("spEH"),u=c(n("vDqi")),s=c(n("B/o2"));function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.data,n=e.stepN,c=e.stageN,d=e.projectId,f=e.owner,p=e.opsId,g=e.rightSpin,m=(0,i.useState)(void 0),h=a(m,2),x=h[0],b=h[1],v=(0,i.useState)(!1),y=a(v,2),E=y[0],w=y[1],k=(0,i.useState)(!0),S=a(k,2),N=S[0],C=S[1],_=(0,i.useState)(void 0),j=a(_,2),B=j[0],O=j[1],M=(0,i.useState)(void 0),A=a(M,2),D=A[0],I=A[1],F=(0,i.useState)("0"),T=a(F,2),P=T[0],z=T[1];return(0,i.useEffect)((function(){C(g)}),[g]),(0,i.useEffect)((function(){if(t){var e=t.stages;if(e&&e.length>0){var r=c?e.filter((function(e){return e.number===c}))[0]:e[0];O(r);var a=r&&r.steps,i=n?a&&a.length>0&&a.filter((function(e){return e.id===n}))[0]:a[0];I(i),z("0"),i&&"skipped"!==i.status&&function(e,t){if(e&&t){var n="/"+f+"/"+d+"/builds/"+p+"/logs/"+e+"/"+t+".json";u.default.get(n).then((function(e){e&&(b(e.data),C(!1))})).catch((function(e){console.log(e)}))}}(r.number,i.number),"skipped"===i.status&&(b(void 0),w(!0),C(!1))}else C(!1)}}),[t,c,n]),l.default.createElement(l.default.Fragment,null,"0"===P&&l.default.createElement(r.default,{spinning:N},l.default.createElement("div",{className:"rightMainContent"},t&&"error"!==t.status?l.default.createElement("div",null,l.default.createElement(o.FlexAJ,{className:"items"},l.default.createElement("span",null,D&&D.name),l.default.createElement(o.AlignCenter,null,D&&D.duration_time,l.default.createElement("i",{className:"iconfont icon-sanjiaoxing-down"}))),l.default.createElement("div",null,x&&x.length>0?x.map((function(e,t){return l.default.createElement("div",{className:"opsDetailOut"},l.default.createElement("span",null,t+1),l.default.createElement("p",null,e.out))})):E?l.default.createElement("div",{className:"opsDetailOut"},l.default.createElement("span",null,"1"),l.default.createElement("p",null,B&&B.name," ",D&&D.name,": Skipped")):"")):l.default.createElement("div",{style:{color:"red"}},"error:",t&&t.error))),"1"===P&&l.default.createElement(s.default,null))}},PhNK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.truncateCommitId=function(e){return e&&e.length>11?e.substring(0,10):e},t.timeFormat=function(e){var t=new Date(1e3*e),n=t.getHours()<10?"0".concat(t.getHours()):t.getHours(),r=t.getMinutes()<10?"0".concat(t.getMinutes()):t.getMinutes();return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+n+":"+r}},hi2r:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new function(e){var t={},n={subscribe:function(e,n){return t[e]||(t[e]=[]),t[e].push(n),this.unsubscribe.bind(null,e,n)},unsubscribe:function(e,n){var r=t[e],a=-1;if(r){for(var i=0;i<r.length;i++)if(r[i].name===n.name){a=i;break}if(a>=0)return t[e].splice(a,1),!0}return!1},publish:function(e){if(!t[e])return!1;var n=Array.prototype.slice.call(arguments,1);return t[e].forEach((function(e){e.apply(null,n)})),this}};return e?Object.assign(e,n):n};t.default=r},spEH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupProjectBackgroup=t.Content=t.Cancel=t.GreenUnder=t.NumUl=t.Redback=t.Blueback=t.Greenback=t.Greenline=t.Redline=t.Blueline=t.WhiteBack=t.Gap=t.Short=t.ShortWidth=t.Long=t.LongWidth=t.Box=t.AlignAJBottom=t.AlignTop=t.AlignCenter=t.FlexAJ=t.AlignCenterBetween=t.Banner=void 0;var r,a=O(["{\n padding:20px 25px;\n color:#333;\n font-size:18px;\n border-bottom:1px solid #eee;\n background-color:#fff;\n border-radius:5px 5px 0px 0px;\n justify-content: space-between;\n display: flex;\n}"],["{\n padding:20px 25px;\n color:#333;\n font-size:18px;\n border-bottom:1px solid #eee;\n background-color:#fff;\n border-radius:5px 5px 0px 0px;\n justify-content: space-between;\n display: flex;\n}"]),i=O(["{\n display:flex;\n align-items: center;\n padding: 14px 14px 14px 20px;\n justify-content: space-between;\n border-bottom:1px solid #eee;\n}"],["{\n display:flex;\n align-items: center;\n padding: 14px 14px 14px 20px;\n justify-content: space-between;\n border-bottom:1px solid #eee;\n}"]),l=O(["{\n display:flex;\n align-items: center;\n justify-content: space-between;\n}"],["{\n display:flex;\n align-items: center;\n justify-content: space-between;\n}"]),o=O(["{\n display:flex;\n align-items: center;\n}"],["{\n display:flex;\n align-items: center;\n}"]),u=O(["{\n display:flex;\n align-items: flex-start;\n}"],["{\n display:flex;\n align-items: flex-start;\n}"]),s=O(["{\n display:flex;\n justify-content: space-between;\n align-items: flex-end;\n}"],["{\n display:flex;\n justify-content: space-between;\n align-items: flex-end;\n}"]),c=O(["{\n display:flex;\n align-items:flex-start;\n}"],["{\n display:flex;\n align-items:flex-start;\n}"]),d=O(["{\n flex:1;\n width:0;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n flex:1;\n width:0;\n border-radius:5px;\n margin-bottom:30px;\n}"]),f=O(["{\n width:78%;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n width:78%;\n border-radius:5px;\n margin-bottom:30px;\n}"]),p=O(["{\n width:300px;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n width:300px;\n border-radius:5px;\n margin-bottom:30px;\n}"]),g=O(["{\n flex:1;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n flex:1;\n border-radius:5px;\n margin-bottom:30px;\n}"]),m=O(["{\n padding-left:20px;\n box-sizing:border-box;\n}"],["{\n padding-left:20px;\n box-sizing:border-box;\n}"]),h=O(["{\n background-color:#fff;\n border-radius:5px;\n}"],["{\n background-color:#fff;\n border-radius:5px;\n}"]),x=O(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid rgba(80,145,255,1);\n color:rgba(80,145,255,1);\n padding:0px 12px;\n display:inline-block;\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid rgba(80,145,255,1);\n color:rgba(80,145,255,1);\n padding:0px 12px;\n display:inline-block;\n}"]),b=O(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #F73030;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #F73030;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"]),v=O(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #28BD6C;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #28BD6C;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"]),y=O(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#28BD6C;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"],["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#28BD6C;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),E=O(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:rgba(80,145,255,1);\n color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"],["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:rgba(80,145,255,1);\n color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),w=O(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#F73030;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"],["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#F73030;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),k=O(["{\n padding-left: 20px;\n & > li{\n list-style-type: decimal;\n color:#888;\n height:24px;\n line-height:24px;\n }\n}"],["{\n padding-left: 20px;\n & > li{\n list-style-type: decimal;\n color:#888;\n height:24px;\n line-height:24px;\n }\n}"]),S=O(["{\n color:#28BD6C!important;\n position:relative;\n &:after{\n position:absolute;\n bottom:-2px;\n left:0px;\n width:100%;\n height:1px;\n content:'';\n background:#28BD6C;\n }\n}"],["{\n color:#28BD6C!important;\n position:relative;\n &:after{\n position:absolute;\n bottom:-2px;\n left:0px;\n width:100%;\n height:1px;\n content:'';\n background:#28BD6C;\n }\n}"]),N=O(["{\n height:32px;\n line-height:32px;\n border-radius:2px;\n background-color:#BBBBBB;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:64px;\n text-align:center;\n letter-spacing: 4px;\n}"],["{\n height:32px;\n line-height:32px;\n border-radius:2px;\n background-color:#BBBBBB;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:64px;\n text-align:center;\n letter-spacing: 4px;\n}"]),C=O(["{\n width:1200px;\n margin:20px auto;\n text-align:center;\n display:flex;\n align-Items:center;\n background-color:#fff;\n justify-content: center;\n}"],["{\n width:1200px;\n margin:20px auto;\n text-align:center;\n display:flex;\n align-Items:center;\n background-color:#fff;\n justify-content: center;\n}"]),_=O(["{\n background:#fafafa;\n padding:20px 30px;\n width:100%;\n}"],["{\n background:#fafafa;\n padding:20px 30px;\n width:100%;\n}"]),j=n("vOnD"),B=(r=j)&&r.__esModule?r:{default:r};function O(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}t.Banner=B.default.div(a),t.AlignCenterBetween=B.default.div(i),t.FlexAJ=B.default.div(l),t.AlignCenter=B.default.div(o),t.AlignTop=B.default.div(u),t.AlignAJBottom=B.default.div(s),t.Box=B.default.div(c),t.LongWidth=B.default.div(d),t.Long=B.default.div(f),t.ShortWidth=B.default.div(p),t.Short=B.default.div(g),t.Gap=B.default.div(m),t.WhiteBack=B.default.div(h),t.Blueline=B.default.a(x),t.Redline=B.default.a(b,(function(e){return e.bold?"#fff":"#F73030"}),(function(e){return e.bold?"#F73030":"#fff"})),t.Greenline=B.default.a(v,(function(e){return e.bold?"#fff":"#28BD6C"}),(function(e){return e.bold?"#28BD6C":"#fff"})),t.Greenback=B.default.a(y),t.Blueback=B.default.a(E),t.Redback=B.default.a(w),t.NumUl=B.default.ul(k),t.GreenUnder=B.default.a(S),t.Cancel=B.default.a(N),t.Content=B.default.div(C),t.GroupProjectBackgroup=B.default.div(_)},y8uv:function(e,t,n){},ya74:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n("W9HT")),a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(r=(l=o.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("04bd");var i=n("q1tI"),l=g(i);n("y8uv");var o=n("spEH"),u=n("FFNF"),s=g(n("dZ1t")),c=g(n("N5Xz")),d=g(n("N66O")),f=g(n("vDqi")),p=n("eO8H");function g(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=(0,i.useState)(void 0),n=a(t,2),g=n[0],m=n[1],h=(0,i.useState)(void 0),x=a(h,2),b=x[0],v=x[1],y=(0,i.useState)(void 0),E=a(y,2),w=E[0],k=E[1],S=(0,i.useState)(!1),N=a(S,2),C=N[0],_=N[1],j=(0,i.useState)(!0),B=a(j,2),O=B[0],M=B[1],A=e.match.params.projectId,D=e.match.params.owner,I=e.match.params.opsId;function F(){var e="/"+D+"/"+A+"/builds/"+I+".json";f.default.get(e).then((function(e){e&&e.data&&(M(!1),m(e.data))})).catch((function(e){console.log(e),M(!1)}))}return(0,i.useEffect)((function(){I&&A&&F()}),[I]),l.default.createElement(r.default,{spinning:O},l.default.createElement("div",{className:"opsDetailPanel"},l.default.createElement(o.FlexAJ,{className:"opsInfos"},l.default.createElement(o.AlignCenter,null,l.default.createElement("span",null,"#",g&&g.number),l.default.createElement("span",{className:"ml10"},g&&g.message),(0,u.Tags)(""+(g&&g.status))),l.default.createElement(p.Link,{style:{color:"#ddd"},to:"/"+D+"/"+A+"/devops"},l.default.createElement("i",{className:"iconfont icon-yiguanbi font-15 mr5"}),"退出")),l.default.createElement("div",{className:"opsSection"},l.default.createElement(s.default,{className:"outer-split-pane",split:"vertical",minSize:468,maxSize:-350,defaultSize:"40%"},l.default.createElement("section",{className:"leftSection"},l.default.createElement(c.default,{data:g,repeatSet:function(t,n,r){if("repeat"===n){var a="/"+D+"/"+A+"/builds/"+r+"/restart.json";f.default.post(a).then((function(t){t&&t.data&&(e.showNotification("工作流正在重新构建!"),e.history.push("/"+D+"/"+A+"/devops/"+t.data.number+"/detail"))})).catch((function(e){console.log(e)}))}else{var i="/"+D+"/"+A+"/builds/"+r+"/stop.json";f.default.delete(i).then((function(t){t&&(e.showNotification("撤销构建成功!"),F())})).catch((function(e){console.log(e)}))}},chooseSteps:function(e,t){e&&t&&(k(t),v(e),_(!0))}})),l.default.createElement("section",{className:"rightSection"},l.default.createElement(d.default,{data:g,rightSpin:C,stepN:w,stageN:b,owner:D,projectId:A,opsId:I}))))))}},zxge:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDateTime=function(e,t){return Date.prototype.format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S+":this.getMilliseconds()};for(var n in/(y+)/i.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e},new Date(e).format(t)},t.Time=function(e){var t,n,r=new Date(e),a=r.getFullYear(),i=r.getMonth()+1,l=r.getDate(),o=r.getHours(),u=r.getMinutes(),s=r.getTime(),c=new Date,d=c.getTime();n=(t=d-s)<=6e4?"刚刚":6e4<t&&t<=36e5?Math.round(t/6e4)+"分钟前":36e5<t&&t<=864e5?Math.round(t/36e5)+"小时前":864e5<t&&t<=1296e6?Math.round(t/864e5)+"天前":t>1296e6&&a==c.getFullYear()?i+"-"+l+" "+o+":"+u:a+"-"+i+"-"+l+" "+o+":"+u;return n}}}]);