text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4223605d"],{"41db":function(t,a,s){"use strict";s.d(a,"o",function(){return n}),s.d(a,"d",function(){return o}),s.d(a,"h",function(){return p}),s.d(a,"g",function(){return r}),s.d(a,"e",function(){return i}),s.d(a,"f",function(){return l}),s.d(a,"k",function(){return u}),s.d(a,"j",function(){return c}),s.d(a,"c",function(){return d}),s.d(a,"a",function(){return y}),s.d(a,"p",function(){return _}),s.d(a,"b",function(){return v}),s.d(a,"q",function(){return f}),s.d(a,"i",function(){return b}),s.d(a,"l",function(){return h}),s.d(a,"m",function(){return S}),s.d(a,"n",function(){return g});var e=s("e1d2");function n(t){return Object(e["b"])("/deploy/apply/submit",t)}function o(t){return Object(e["a"])("/deploy/apply/list",t)}function p(t){return Object(e["a"])("/deploy/apply/space/list",t)}function r(t){return Object(e["a"])("/deploy/apply/project/list",t)}function i(t){return Object(e["a"])("/deploy/apply/project/all",t)}function l(t){return Object(e["a"])("/deploy/apply/project/detail",t)}function u(t){return Object(e["a"])("/deploy/apply/repo/taglist",t)}function c(t){return Object(e["a"])("/deploy/apply/repo/commitlist",t)}function d(t){return Object(e["a"])("/deploy/apply/detail",t)}function y(t){return Object(e["b"])("/deploy/apply/audit",t)}function _(t){return Object(e["b"])("/deploy/apply/unaudit",t)}function v(t){return Object(e["b"])("/deploy/apply/discard",t)}function f(t){return Object(e["b"])("/deploy/apply/update",t)}function b(t){return Object(e["a"])("/deploy/apply/log",t)}function h(t){return Object(e["b"])("/deploy/deploy/start",t)}function S(t){return Object(e["a"])("/deploy/deploy/status",t)}function g(t){return Object(e["b"])("/deploy/deploy/stop",t)}},bf14:function(t,a,s){"use strict";s.r(a);var e=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",[s("a-card",{staticClass:"app-card app-release",attrs:{title:"部署上线单",bordered:!1}},[s("a-row",{staticClass:"app-mt-20",attrs:{gutter:20}},[s("a-col",{attrs:{span:8}},[s("span",{staticClass:"sp-title"},[t._v("上线单:")]),t._v(" "+t._s(t.detail.name))]),s("a-col",{attrs:{span:16}},[s("span",{staticClass:"sp-title"},[t._v("所属项目:")]),t._v(" "+t._s(t.detail.space_name)+" "+t._s(t.detail.project_name))])],1),s("a-row",{staticClass:"app-mt-20",attrs:{gutter:20}},[s("a-col",{attrs:{span:8}},[s("span",{staticClass:"sp-title"},[t._v("仓库类型:")]),t._v(" Git")]),1==t.detail.repo_mode?s("a-col",{attrs:{span:16}},[s("span",{staticClass:"sp-title"},[t._v("上线分支:")]),t._v(" "+t._s(t.detail.repo_branch)+" - "+t._s(t.detail.repo_commit))]):t._e(),2==t.detail.repo_mode?s("a-col",{attrs:{span:16}},[s("span",{staticClass:"sp-title"},[t._v("上线Tag:")]),t._v(" "+t._s(t.detail.repo_tag))]):t._e()],1),s("a-row",{staticClass:"app-mt-20",attrs:{gutter:20}},[s("a-col",{attrs:{span:8}},[s("span",{staticClass:"sp-title"},[t._v("提交者:")]),t._v(" "+t._s(t.detail.user_name)+" - "+t._s(t.detail.user_email))]),s("a-col",{attrs:{span:16}},[s("span",{staticClass:"sp-title"},[t._v("描述:")]),t._v(" "+t._s(t.detail.description))])],1),s("a-divider"),3==t.applyStatus?s("a-button",{attrs:{type:"primary",size:"large"},on:{click:t.handleStartDeploy}},[s("a-icon",{attrs:{type:"cloud-upload"}}),t._v(" 开始上线")],1):4==t.applyStatus?s("a-button",{attrs:{type:"danger",size:"large"},on:{click:t.handleStopDeploy}},[s("a-icon",{attrs:{type:"close-circle"}}),t._v(" 终止上线")],1):6==t.applyStatus&&t.stopingStatus?s("a-button",{attrs:{type:"danger",size:"large"}},[s("a-icon",{attrs:{type:"loading"}}),t._v(" 正在终止")],1):6==t.applyStatus?s("a-button",{attrs:{type:"primary",size:"large"},on:{click:t.handleStartDeploy}},[s("a-icon",{attrs:{type:"cloud-upload"}}),t._v(" 再次上线")],1):t._e(),s("div",{staticClass:"shell"},[s("div",{staticClass:"shell-title"},[t._v("\n                syncd@localhost:~$\n                "),[t.stopingStatus?s("span",{staticClass:"app-color-error"},[t._v("正在终止上线...")]):4==t.applyStatus?s("span",{staticClass:"app-color-info"},[t._v("上线中")]):5==t.applyStatus?s("span",{staticClass:"app-color-success"},[t._v("上线成功")]):6==t.applyStatus?s("span",{staticClass:"app-color-error"},[t._v("上线失败")]):s("span",[t._v("等待上线...")])]],2),this.errorLog?s("div",{staticClass:"shell-body app-color-error"},[t._v("\n                Error Output >>>\n                "),s("pre",[t._v(t._s(this.errorLog))])]):t._e(),t._l(t.deployList,function(a){return[s("div",{staticClass:"shell-sub-title"},[s("div",[t._v(">>> "+t._s(4==a.level?"部署到> ":"")+t._s(t.$root.T(a.name))+"\n                        "),2==a.status?s("a-icon",{attrs:{type:"loading-3-quarters",spin:""}}):t._e(),3==a.status?s("a-icon",{attrs:{type:"check"}}):t._e(),4==a.status||5==a.status?s("a-icon",{attrs:{type:"warning"}}):t._e()],1)]),s("div",{staticClass:"shell-body"},[1==a.status&&t.stopingStatus?s("div",[t._v("\n                        正在拦截并终止...\n                    ")]):1==a.status?s("div",[t._v("\n                        未开始\n                    ")]):2==a.status?s("div",[s("span",{staticClass:"app-color-info"},[t._v("执行中")])]):2==a.status?s("div",[s("span",{staticClass:"app-color-info"},[t._v("执行中")])]):3==a.status?s("div",[s("span",{staticClass:"app-color-success"},[t._v("完成")])]):4==a.status?s("div",[s("span",{staticClass:"app-color-error"},[t._v("失败")])]):5==a.status?s("div",[s("span",{staticClass:"app-color-error"},[t._v("终止")])]):t._e(),s("pre",[t._v(t._s(a.output))])])]})],2)],1)],1)},n=[],o=(s("ac6a"),s("41db")),p={data:function(){return{id:0,detail:{},loopStatus:null,applyStatus:0,errorLog:"",deployList:[]}},computed:{stopingStatus:function(){var t=!1;return this.deployList&&this.deployList.forEach(function(a){2==a.status&&(t=!0)}),!(6!=this.applyStatus||!t)}},methods:{handleStartDeploy:function(){var t=this;Object(o["l"])({id:this.id}).then(function(a){t.loopDeployStatus()})},handleStopDeploy:function(){var t=this;Object(o["n"])({id:this.id}).then(function(a){t.getApplyStatus()})},loopDeployStatus:function(){var t=this;t.loopStatus=setInterval(function(){t.getApplyStatus()},3e3),this.getApplyStatus()},getApplyStatus:function(){var t=this;Object(o["m"])({id:this.id}).then(function(a){t.applyStatus=a.apply_status,t.deployList=a.deploy_list,t.errorLog=a.error_log,4==t.applyStatus||t.stopingStatus&&6==t.applyStatus||clearInterval(t.loopStatus)})},loadApplyDetail:function(){var t=this;Object(o["c"])({id:this.id}).then(function(a){t.detail=a})}},mounted:function(){this.id=this.$route.query.id,this.id||this.$root.GotoRouter("deployDeploy"),this.loadApplyDetail(),this.loopDeployStatus()}},r=p,i=s("2877"),l=Object(i["a"])(r,e,n,!1,null,null,null);l.options.__file="Release.vue";a["default"]=l.exports}}]);