2020-06-06 20:01:51 +08:00

2 lines
5.9 KiB
JavaScript
Raw 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.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b66febb"],{"0b66":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",[a("el-col",{attrs:{span:1}},[a("el-button",{attrs:{type:"primary"},on:{click:t.back}},[t._v("返回")])],1),a("el-col",{attrs:{span:1,offset:22}},[a("el-button",{attrs:{type:"success"},on:{click:t.fetchWfInstanceInfo}},[t._v("刷新")])],1)],1),a("el-row",[a("el-col",{attrs:{span:24}},[t._v(" 工作流整体状态: "),a("span",{staticClass:"title"},[t._v(t._s(t.wfInstanceDetail.statusStr))])])],1),a("el-row",[a("el-col",{attrs:{span:8}},[t._v(" 工作流ID "),a("span",{staticClass:"title"},[t._v(t._s(t.wfInstanceDetail.workflowId))])]),a("el-col",{attrs:{span:16}},[t._v(" 工作流实例ID "),a("span",{staticClass:"title"},[t._v(t._s(t.wfInstanceDetail.wfInstanceId))])])],1),a("el-row",[a("el-col",{attrs:{span:8}},[t._v(" 触发时间: "),a("span",{staticClass:"title"},[t._v(t._s(t.wfInstanceDetail.actualTriggerTime))])]),a("el-col",{attrs:{span:8}},[t._v(" 结束时间: "),a("span",{staticClass:"title"},[t._v(t._s(t.wfInstanceDetail.finishedTime))])])],1),a("el-row",[a("el-col",{attrs:{span:24}},[t._v(" 执行结果: "),a("span",{staticClass:"title"},[t._v(t._s(t.wfInstanceDetail.result))])])],1),a("el-row",[a("div",[a("svg",{attrs:{width:"80%",height:"1000px",id:"svgCanvas"}},[a("g"),a("rect")])])]),t.instanceDetailVisible?a("el-dialog",{attrs:{title:"任务实例详情",visible:t.instanceDetailVisible},on:{"update:visible":function(e){t.instanceDetailVisible=e}}},[a("InstanceDetail",{attrs:{"instance-id":t.currentInstanceId}})],1):t._e()],1)},n=[],i=(a("4160"),a("d81d"),a("159b"),a("1226")),l=a.n(i),c=a("5698"),o=a("63e7"),r={name:"WorkflowInstanceDetail",components:{InstanceDetail:o["a"]},data:function(){return{wfInstanceDetail:{},currentInstanceId:void 0,instanceDetailVisible:!1}},methods:{fetchWfInstanceInfo:function(){var t=this,e=this.$route.params.wfInstanceId;console.log("wfInstanceId: "+e);var a="/wfInstance/info?appId="+this.$store.state.appInfo.id+"&wfInstanceId="+e;this.axios.get(a).then((function(e){t.wfInstanceDetail=e,t.draw()}))},draw:function(){var t=this;console.log(this.wfInstanceDetail);var e=(new l.a.graphlib.Graph).setGraph({}),a=this.wfInstanceDetail.peworkflowDAG.nodes.map((function(t){var e,a;switch(t.status){case 3:e="#3498DB",a="运行中";break;case 4:e="#EC7063",a="失败";break;case 5:e="#58D68D",a="成功";break;case 10:e="#F1C40F",a="手动停止";break;default:e="#CACFD2",a="等待上游节点";break}var s="任务ID: "+t.jobId+"\n任务名称:"+t.jobName+"\n状态:"+a+"\n任务实例ID:"+t.instanceId;return{id:t.jobId,label:s,color:e}}));a.forEach((function(t){e.setNode(t.id,t),e.node(t.id).style="fill:"+t.color})),this.wfInstanceDetail.peworkflowDAG.edges.forEach((function(t){e.setEdge(t.from,t.to,{})}));var s=c["select"]("svg"),n=s.select("g"),i=c["zoom"]().on("zoom",(function(){n.attr("transform",c["event"].transform)}));s.call(i);var o=new l.a.render;o(n,e),n.selectAll("g.node").on("click",(function(e){t.wfInstanceDetail.peworkflowDAG.nodes.forEach((function(a){a.jobId==e&&(t.currentInstanceId=a.instanceId,t.instanceDetailVisible=!0)}))}))},back:function(){this.$router.go(-1)}},mounted:function(){console.log("Welcome to WorkflowInstanceDetail!"),this.fetchWfInstanceInfo()}},f=r,d=(a("acdd"),a("2877")),p=Object(d["a"])(f,s,n,!1,null,"ab282ec8",null);e["default"]=p.exports},"63e7":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",[a("el-col",{attrs:{offset:20}},[a("el-button",{attrs:{type:"primary"},on:{click:t.fetchInstanceDetail}},[t._v("刷新")])],1)],1),a("el-row",{staticStyle:{"margin-top":"-20px"}},[a("el-col",{attrs:{span:8}},[t._v(" 状态: "),a("span",{staticClass:"title"},[t._v(t._s(t.instanceDetail.status))])]),a("el-col",{attrs:{span:16}},[t._v(" 运行次数:"),a("span",{staticClass:"title"},[t._v(t._s(t.instanceDetail.runningTimes))])])],1),a("el-row",[a("el-col",{attrs:{span:24}},[t._v(" TaskTracker地址: "),a("span",{staticClass:"title"},[t._v(" "+t._s(t.instanceDetail.taskTrackerAddress))])])],1),a("el-row",[a("el-col",{attrs:{span:8}},[t._v(" 开始时间: "),a("span",{staticClass:"title"},[t._v(" "+t._s(this.common.timestamp2Str(t.instanceDetail.actualTriggerTime)))])]),a("el-col",{attrs:{span:8}},[t._v(" 结束时间: "),a("span",{staticClass:"title"},[t._v(t._s(this.common.timestamp2Str(t.instanceDetail.finishedTime)))])])],1),a("el-row",[a("el-col",{attrs:{span:24}},[t._v(" 运行结果: "),a("span",{staticClass:"title"},[t._v(" "+t._s(t.instanceDetail.result))])])],1),a("el-row",{attrs:{id:"taskDetail"}},[t._v(" 子任务数据: "),a("span",{staticClass:"title"},[t._v(t._s(t.instanceDetail.taskDetail))])]),a("el-row",[a("span",{staticClass:"title"},[t._v("最近10条秒级任务历史记录:")]),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.instanceDetail.subInstanceDetails}},[a("el-table-column",{attrs:{prop:"subInstanceId",label:"子实例ID",width:"100"}}),a("el-table-column",{attrs:{prop:"startTime",label:"开始时间",width:"160"}}),a("el-table-column",{attrs:{prop:"finishedTime",label:"结束时间",width:"160"}}),a("el-table-column",{attrs:{prop:"status",label:"运行状态",width:"100"}}),a("el-table-column",{attrs:{prop:"result",label:"运行结果"}})],1)],1)],1)},n=[],i={name:"InstanceDetail",props:["instanceId"],data:function(){return{instanceDetail:{}}},methods:{fetchInstanceDetail:function(){var t=this,e="/instance/detail?instanceId="+this.instanceId;this.axios.get(e).then((function(e){return t.instanceDetail=e}))}},mounted:function(){console.log("using InstanceId: "+this.instanceId),this.fetchInstanceDetail()}},l=i,c=a("2877"),o=Object(c["a"])(l,s,n,!1,null,"c05b78a6",null);e["a"]=o.exports},acdd:function(t,e,a){"use strict";var s=a("fe8c"),n=a.n(s);n.a},fe8c:function(t,e,a){}}]);
//# sourceMappingURL=chunk-2b66febb.52effc93.js.map