webpackJsonp([36],{Ll7Y:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("mtWM"),a=i.n(n),s={data:function(){return{url:"",percentage:0,building:!1}},methods:{deploy:function(){var t=this;this.$confirm("确定重新部署?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.a.post("http://49.4.67.181:8000/job/信牧基础平台/build",{auth:{username:"admin",password:"3edc#EDC"}}).then(function(e){201===e.status&&(t.buildid=/(.*)\/(.+?)\/$/.exec(e.headers.location)[2],t.percentage=0,t.building=!0,t.pollingStatus())})}).catch(function(){})},pollingStatus:function(){var t=this;a.a.get("http://49.4.67.181:8000/job/信牧基础平台/"+this.buildid+"/api/json").then(function(e){if(200===e.status)if(e.data.building){var i=100*((new Date).getTime()-e.data.timestamp)/e.data.estimatedDuration;i=i<0?0:i>=100?99:parseInt(i),t.percentage=i,setTimeout(function(){t.pollingStatus()},500)}else t.percentage=100,t.building=!1,t.$message.success("部署成功")})}}},o={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[this.building?e("div",[e("div",{staticStyle:{color:"#606266","font-size":"14px"}},[this._v("部署中")]),this._v(" "),e("el-progress",{attrs:{percentage:this.percentage}})],1):e("div",[e("el-alert",{attrs:{title:"请谨慎操作",type:"warning",description:"重新部署会导致网站暂时无法访问",closable:!1,"show-icon":""}}),this._v(" "),e("el-button",{staticStyle:{"margin-top":"20px"},attrs:{size:"small"},on:{click:this.deploy}},[this._v("重新部署")])],1)])},staticRenderFns:[]};var c=i("VU/8")(s,o,!1,function(t){i("iIFa")},"data-v-2fc804dc",null);e.default=c.exports},iIFa:function(t,e){}});
//# sourceMappingURL=36.a13305a657fd2b1a4dea.js.map