diff --git a/datax-admin/src/main/java/com/wugui/datax/admin/core/kill/KillJob.java b/datax-admin/src/main/java/com/wugui/datax/admin/core/kill/KillJob.java index eddeeeee..6a5fa4d0 100644 --- a/datax-admin/src/main/java/com/wugui/datax/admin/core/kill/KillJob.java +++ b/datax-admin/src/main/java/com/wugui/datax/admin/core/kill/KillJob.java @@ -26,7 +26,7 @@ public class KillJob { triggerParam.setExecutorHandler("killJobHandler"); triggerParam.setProcessId(processId); triggerParam.setLogId(logId); - triggerParam.setGlueType(GlueTypeEnum.BEAN.getDesc()); + triggerParam.setGlueType(GlueTypeEnum.DATAX.getDesc()); triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.SERIAL_EXECUTION.getTitle()); triggerParam.setLogDateTime(triggerTime.getTime()); if (address != null) { diff --git a/datax-admin/src/main/java/com/wugui/datax/admin/core/trigger/JobTrigger.java b/datax-admin/src/main/java/com/wugui/datax/admin/core/trigger/JobTrigger.java index 1af31105..912b1219 100644 --- a/datax-admin/src/main/java/com/wugui/datax/admin/core/trigger/JobTrigger.java +++ b/datax-admin/src/main/java/com/wugui/datax/admin/core/trigger/JobTrigger.java @@ -50,7 +50,7 @@ public class JobTrigger { logger.warn(">>>>>>>>>>>> trigger fail, jobId invalid,jobId={}", jobId); return; } - if (GlueTypeEnum.BEAN.getDesc().equals(jobInfo.getGlueType())) { + if (GlueTypeEnum.DATAX.getDesc().equals(jobInfo.getGlueType())) { //解密账密 String json = JSONUtils.changeJson(jobInfo.getJobJson(), JSONUtils.decrypt); jobInfo.setJobJson(json); diff --git a/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobServiceImpl.java b/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobServiceImpl.java index 0a2a150c..751cd690 100644 --- a/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobServiceImpl.java +++ b/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobServiceImpl.java @@ -72,6 +72,7 @@ public class JobServiceImpl implements JobService { return maps; } + @Override public List list() { return jobInfoMapper.findAll(); } @@ -86,7 +87,7 @@ public class JobServiceImpl implements JobService { if (!CronExpression.isValidExpression(jobInfo.getJobCron())) { return new ReturnT<>(ReturnT.FAIL_CODE, I18nUtil.getString("jobinfo_field_cron_invalid")); } - if (jobInfo.getGlueType().equals(GlueTypeEnum.BEAN.getDesc()) && jobInfo.getJobJson().trim().length() <= 2) { + if (jobInfo.getGlueType().equals(GlueTypeEnum.DATAX.getDesc()) && jobInfo.getJobJson().trim().length() <= 2) { return new ReturnT<>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_field_jobjson"))); } if (jobInfo.getJobDesc() == null || jobInfo.getJobDesc().trim().length() == 0) { @@ -104,7 +105,8 @@ public class JobServiceImpl implements JobService { if (GlueTypeEnum.match(jobInfo.getGlueType()) == null) { return new ReturnT<>(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_gluetype") + I18nUtil.getString("system_invalid"))); } - if (GlueTypeEnum.BEAN == GlueTypeEnum.match(jobInfo.getGlueType()) && (jobInfo.getExecutorHandler() == null || jobInfo.getExecutorHandler().trim().length() == 0)) { + if ((GlueTypeEnum.DATAX == GlueTypeEnum.match(jobInfo.getGlueType()) || GlueTypeEnum.JAVA_BEAN == GlueTypeEnum.match(jobInfo.getGlueType())) + && (jobInfo.getExecutorHandler() == null || jobInfo.getExecutorHandler().trim().length() == 0)) { return new ReturnT<>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input") + "JobHandler")); } @@ -173,7 +175,7 @@ public class JobServiceImpl implements JobService { if (!CronExpression.isValidExpression(jobInfo.getJobCron())) { return new ReturnT<>(ReturnT.FAIL_CODE, I18nUtil.getString("jobinfo_field_cron_invalid")); } - if (jobInfo.getGlueType().equals(GlueTypeEnum.BEAN.getDesc()) && jobInfo.getJobJson().trim().length() <= 2) { + if (jobInfo.getGlueType().equals(GlueTypeEnum.DATAX.getDesc()) && jobInfo.getJobJson().trim().length() <= 2) { return new ReturnT<>(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobinfo_field_jobjson"))); } if (jobInfo.getJobDesc() == null || jobInfo.getJobDesc().trim().length() == 0) { @@ -253,7 +255,7 @@ public class JobServiceImpl implements JobService { exists_jobInfo.setTriggerNextTime(nextTriggerTime); exists_jobInfo.setUpdateTime(new Date()); - if (GlueTypeEnum.BEAN.getDesc().equals(jobInfo.getGlueType())) { + if (GlueTypeEnum.DATAX.getDesc().equals(jobInfo.getGlueType()) || GlueTypeEnum.JAVA_BEAN.getDesc().equals(jobInfo.getGlueType())) { exists_jobInfo.setJobJson(jobInfo.getJobJson()); exists_jobInfo.setGlueSource(null); } else { diff --git a/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobTemplateServiceImpl.java b/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobTemplateServiceImpl.java index ffd484c8..5ee39fd7 100644 --- a/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobTemplateServiceImpl.java +++ b/datax-admin/src/main/java/com/wugui/datax/admin/service/impl/JobTemplateServiceImpl.java @@ -80,7 +80,7 @@ public class JobTemplateServiceImpl implements JobTemplateService { if (GlueTypeEnum.match(jobTemplate.getGlueType()) == null) { return new ReturnT(ReturnT.FAIL_CODE, (I18nUtil.getString("jobinfo_field_gluetype") + I18nUtil.getString("system_invalid"))); } - if (GlueTypeEnum.BEAN == GlueTypeEnum.match(jobTemplate.getGlueType()) && (jobTemplate.getExecutorHandler() == null || jobTemplate.getExecutorHandler().trim().length() == 0)) { + if (GlueTypeEnum.DATAX == GlueTypeEnum.match(jobTemplate.getGlueType()) && (jobTemplate.getExecutorHandler() == null || jobTemplate.getExecutorHandler().trim().length() == 0)) { return new ReturnT(ReturnT.FAIL_CODE, (I18nUtil.getString("system_please_input") + "JobHandler")); } diff --git a/datax-admin/src/main/resources/static/index.html b/datax-admin/src/main/resources/static/index.html index c00f9d61..ac4c4778 100644 --- a/datax-admin/src/main/resources/static/index.html +++ b/datax-admin/src/main/resources/static/index.html @@ -1 +1 @@ -Datax Web
\ No newline at end of file +Datax Web
\ No newline at end of file diff --git a/datax-admin/src/main/resources/static/static/js/chunk-2d0db496.2bf6de61.js b/datax-admin/src/main/resources/static/static/js/chunk-2d0db496.4a01f556.js similarity index 100% rename from datax-admin/src/main/resources/static/static/js/chunk-2d0db496.2bf6de61.js rename to datax-admin/src/main/resources/static/static/js/chunk-2d0db496.4a01f556.js diff --git a/datax-admin/src/main/resources/static/static/js/chunk-35cb90ad.76cbbe16.js b/datax-admin/src/main/resources/static/static/js/chunk-35cb90ad.73011621.js similarity index 100% rename from datax-admin/src/main/resources/static/static/js/chunk-35cb90ad.76cbbe16.js rename to datax-admin/src/main/resources/static/static/js/chunk-35cb90ad.73011621.js diff --git a/datax-admin/src/main/resources/static/static/js/chunk-3a8a15ea.bbc0f843.js b/datax-admin/src/main/resources/static/static/js/chunk-3a8a15ea.060cf6f5.js similarity index 76% rename from datax-admin/src/main/resources/static/static/js/chunk-3a8a15ea.bbc0f843.js rename to datax-admin/src/main/resources/static/static/js/chunk-3a8a15ea.060cf6f5.js index e737bfa9..edc508b5 100644 --- a/datax-admin/src/main/resources/static/static/js/chunk-3a8a15ea.bbc0f843.js +++ b/datax-admin/src/main/resources/static/static/js/chunk-3a8a15ea.060cf6f5.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3a8a15ea"],{"3a8d":function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return l})),r.d(t,"f",(function(){return i})),r.d(t,"a",(function(){return n})),r.d(t,"e",(function(){return s})),r.d(t,"d",(function(){return c}));var o=r("b775");function a(e){return Object(o["a"])({url:"api/jobTemplate/pageList",method:"get",params:e})}function l(){return Object(o["a"])({url:"api/jobGroup/list",method:"get"})}function i(e){return Object(o["a"])({url:"/api/jobTemplate/update",method:"post",data:e})}function n(e){return Object(o["a"])({url:"/api/jobTemplate/add/",method:"post",data:e})}function s(e){return Object(o["a"])({url:"/api/jobTemplate/remove/"+e,method:"post"})}function c(e){return Object(o["a"])({url:"/api/jobTemplate/nextTriggerTime?cron="+e,method:"get"})}},a897:function(e,t,r){},c3e2:function(e,t,r){"use strict";var o=r("a897"),a=r.n(o);a.a},e7ae:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container"},[r("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"任务描述"},model:{value:e.listQuery.jobDesc,callback:function(t){e.$set(e.listQuery,"jobDesc",t)},expression:"listQuery.jobDesc"}}),e._v(" "),r("el-select",{staticClass:"filter-item",attrs:{multiple:"",placeholder:"所属项目"},model:{value:e.projectIds,callback:function(t){e.projectIds=t},expression:"projectIds"}},e._l(e.jobProjectList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),e._v(" "),r("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.fetchData}},[e._v("\n 搜索\n ")]),e._v(" "),r("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("\n 添加\n ")])],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[r("el-table-column",{attrs:{align:"center",label:"任务ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.id))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"任务描述",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.jobDesc))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"所属项目",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.projectName))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"Cron",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.jobCron))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"路由策略",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.routeStrategies.find((function(e){return e.value===t.row.executorRouteStrategy})).label))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"修改用户",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.userName))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"注册节点",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"bottom",width:"500"},on:{show:function(r){return e.loadById(t.row)}}},[r("el-table",{attrs:{data:e.registerNode}},[r("el-table-column",{attrs:{width:"150",property:"title",label:"执行器名称"}}),e._v(" "),r("el-table-column",{attrs:{width:"150",property:"appName",label:"appName"}}),e._v(" "),r("el-table-column",{attrs:{width:"150",property:"registryList",label:"机器地址"}})],1),e._v(" "),r("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"下次触发时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"bottom",width:"300"},on:{show:function(r){return e.nextTriggerTime(t.row)}}},[r("h5",{domProps:{innerHTML:e._s(e.triggerNextTimes)}}),e._v(" "),r("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[r("el-dropdown",{attrs:{trigger:"click"}},[r("span",{staticClass:"el-dropdown-link"},[e._v("\n 操作"),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(t){return e.handlerUpdate(o)}}},[e._v("编辑")]),e._v(" "),r("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerDelete(o)}}},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),r("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.current,limit:e.listQuery.size},on:{"update:page":function(t){return e.$set(e.listQuery,"current",t)},"update:limit":function(t){return e.$set(e.listQuery,"size",t)},pagination:e.fetchData}}),e._v(" "),r("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,width:"1000px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.temp,"label-position":"left","label-width":"110px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"执行器",prop:"jobGroup"}},[r("el-select",{attrs:{placeholder:"请选择执行器"},model:{value:e.temp.jobGroup,callback:function(t){e.$set(e.temp,"jobGroup",t)},expression:"temp.jobGroup"}},e._l(e.executorList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"任务描述",prop:"jobDesc"}},[r("el-input",{attrs:{size:"medium",placeholder:"请输入任务描述"},model:{value:e.temp.jobDesc,callback:function(t){e.$set(e.temp,"jobDesc",t)},expression:"temp.jobDesc"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"路由策略",prop:"executorRouteStrategy"}},[r("el-select",{attrs:{placeholder:"请选择路由策略"},model:{value:e.temp.executorRouteStrategy,callback:function(t){e.$set(e.temp,"executorRouteStrategy",t)},expression:"temp.executorRouteStrategy"}},e._l(e.routeStrategies,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-dialog",{attrs:{title:"提示",visible:e.showCronBox,width:"60%","append-to-body":""},on:{"update:visible":function(t){e.showCronBox=t}}},[r("cron",{model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}}),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.showCronBox=!1}}},[e._v("关闭")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.showCronBox=!1}}},[e._v("确 定")])],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"Cron",prop:"jobCron"}},[r("el-input",{attrs:{"auto-complete":"off",placeholder:"请输入Cron表达式"},model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}},[e.showCronBox?r("el-button",{attrs:{slot:"append",icon:"el-icon-open",title:"关闭图形配置"},on:{click:function(t){e.showCronBox=!1}},slot:"append"}):r("el-button",{attrs:{slot:"append",icon:"el-icon-turn-off",title:"打开图形配置"},on:{click:function(t){e.showCronBox=!0}},slot:"append"})],1)],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"阻塞处理",prop:"executorBlockStrategy"}},[r("el-select",{attrs:{placeholder:"请选择阻塞处理策略"},model:{value:e.temp.executorBlockStrategy,callback:function(t){e.$set(e.temp,"executorBlockStrategy",t)},expression:"temp.executorBlockStrategy"}},e._l(e.blockStrategies,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报警邮件"}},[r("el-input",{attrs:{placeholder:"请输入报警邮件,多个用逗号分隔"},model:{value:e.temp.alarmEmail,callback:function(t){e.$set(e.temp,"alarmEmail",t)},expression:"temp.alarmEmail"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"任务类型",prop:"glueType"}},[r("el-select",{attrs:{placeholder:"任务脚本类型"},model:{value:e.temp.glueType,callback:function(t){e.$set(e.temp,"glueType",t)},expression:"temp.glueType"}},e._l(e.glueTypes,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"失败重试次数"}},[r("el-input-number",{attrs:{min:0,max:20},model:{value:e.temp.executorFailRetryCount,callback:function(t){e.$set(e.temp,"executorFailRetryCount",t)},expression:"temp.executorFailRetryCount"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"所属项目",prop:"projectId"}},[r("el-select",{staticClass:"filter-item",attrs:{placeholder:"所属项目"},model:{value:e.temp.projectId,callback:function(t){e.$set(e.temp,"projectId",t)},expression:"temp.projectId"}},e._l(e.jobProjectList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"超时时间(分钟)"}},[r("el-input-number",{attrs:{min:0,max:120},model:{value:e.temp.executorTimeout,callback:function(t){e.$set(e.temp,"executorTimeout",t)},expression:"temp.executorTimeout"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"子任务"}},[r("el-select",{attrs:{multiple:"",placeholder:"子任务","value-key":"id"},model:{value:e.temp.childJobId,callback:function(t){e.$set(e.temp,"childJobId",t)},expression:"temp.childJobId"}},e._l(e.jobIdList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.jobDesc,value:e}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}})],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"JVM启动参数"}},[r("el-input",{attrs:{placeholder:"-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"},model:{value:e.temp.jvmParam,callback:function(t){e.$set(e.temp,"jvmParam",t)},expression:"temp.jvmParam"}})],1)],1)],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("\n 取消\n ")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v("\n 确认\n ")])],1)],1)],1)},a=[],l=(r("28a5"),r("6b54"),r("39ed")),i=r("5ec8"),n=r("3a8d"),s=r("6724"),c=r("333d"),u=r("7e39"),d=r("a53d"),p=r("2b10"),m={name:"JobTemplate",components:{Pagination:c["a"],Cron:i["a"]},directives:{waves:s["a"]},filters:{statusFilter:function(e){var t={published:"success",draft:"gray",deleted:"danger"};return t[e]}},data:function(){var e=this,t=function(e,t,r){t||r(new Error("Increment parameters is required")),r()},r=function(t,r,o){e.partitionField||o(new Error("Partition parameters is required")),o()};return{projectIds:"",list:null,listLoading:!0,total:0,listQuery:{current:1,size:10,jobGroup:0,triggerStatus:-1,jobDesc:"",executorHandler:"",userId:0,projectIds:""},showCronBox:!1,dialogPluginVisible:!1,pluginData:[],dialogFormVisible:!1,dialogStatus:"",textMap:{update:"Edit",create:"Create"},rules:{jobGroup:[{required:!0,message:"jobGroup is required",trigger:"change"}],executorRouteStrategy:[{required:!0,message:"executorRouteStrategy is required",trigger:"change"}],executorBlockStrategy:[{required:!0,message:"executorBlockStrategy is required",trigger:"change"}],jobDesc:[{required:!0,message:"jobDesc is required",trigger:"blur"}],jobProject:[{required:!0,message:"jobProject is required",trigger:"blur"}],jobCron:[{required:!0,message:"jobCron is required",trigger:"blur"}],incStartId:[{trigger:"blur",validator:t}],replaceParam:[{trigger:"blur",validator:t}],primaryKey:[{trigger:"blur",validator:t}],incStartTime:[{trigger:"change",validator:t}],replaceParamType:[{trigger:"change",validator:t}],partitionField:[{trigger:"blur",validator:r}],datasourceId:[{trigger:"change",validator:t}],readerTable:[{trigger:"blur",validator:t}],projectId:[{required:!0,message:"projectId is required",trigger:"change"}]},temp:{id:void 0,jobGroup:"",jobCron:"",jobDesc:"",executorRouteStrategy:"RANDOM",executorBlockStrategy:"DISCARD_LATER",childJobId:"",executorFailRetryCount:"",alarmEmail:"",executorTimeout:"",userId:0,jobConfigId:"",executorHandler:"executorJobHandler",glueType:"BEAN",executorParam:"",jvmParam:"",projectId:"",datasourceId:0,readerTable:""},resetTemp:function(){this.temp=this.$options.data().temp},executorList:"",jobIdList:"",jobProjectList:"",dataSourceList:"",blockStrategies:[{value:"SERIAL_EXECUTION",label:"单机串行"},{value:"DISCARD_LATER",label:"丢弃后续调度"},{value:"COVER_EARLY",label:"覆盖之前调度"}],routeStrategies:[{value:"FIRST",label:"第一个"},{value:"LAST",label:"最后一个"},{value:"ROUND",label:"轮询"},{value:"RANDOM",label:"随机"},{value:"CONSISTENT_HASH",label:"一致性HASH"},{value:"LEAST_FREQUENTLY_USED",label:"最不经常使用"},{value:"LEAST_RECENTLY_USED",label:"最近最久未使用"},{value:"FAILOVER",label:"故障转移"},{value:"BUSYOVER",label:"忙碌转移"}],glueTypes:[{value:"BEAN",label:"DataX任务"}],triggerNextTimes:"",registerNode:[]}},created:function(){this.fetchData(),this.getExecutor(),this.getJobIdList(),this.getJobProject(),this.getDataSourceList()},methods:{handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},getExecutor:function(){var e=this;n["b"]().then((function(t){var r=t.content;e.executorList=r}))},getJobIdList:function(){var e=this;p["d"]().then((function(t){var r=t.content;e.jobIdList=r}))},getJobProject:function(){var e=this;d["c"]().then((function(t){e.jobProjectList=t}))},getDataSourceList:function(){var e=this;u["d"]().then((function(t){e.dataSourceList=t}))},fetchData:function(){var e=this;this.listLoading=!0,this.projectIds&&(this.listQuery.projectIds=this.projectIds.toString()),n["c"](this.listQuery).then((function(t){var r=t.content;e.total=r.recordsTotal,e.list=r.data,e.listLoading=!1}))},handleCreate:function(){var e=this;this.resetTemp(),this.dialogStatus="create",this.dialogFormVisible=!0,this.temp.jobGroup=this.executorList[0]["id"],this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var r=[];for(var o in e.temp.childJobId)r.push(e.temp.childJobId[o].id);e.temp.childJobId=r.toString()}e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),n["a"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Created Successfully",type:"success",duration:2e3})}))}}))},handlerUpdate:function(e){var t=this;this.resetTemp(),this.temp=Object.assign({},e),this.dialogStatus="update",this.dialogFormVisible=!0;var r=[],o=[];if(this.JobIdList){for(var a in this.JobIdList)this.JobIdList[a].id!==this.temp.id&&o.push(this.JobIdList[a]);this.JobIdList=o}if(this.temp.childJobId){var l=this.temp.childJobId.split(",");for(var i in l)for(var n in this.jobIdList)this.jobIdList[n].id===parseInt(l[i])&&r.push(this.jobIdList[n]);this.temp.childJobId=r}if(this.temp.partitionInfo){var s=this.temp.partitionInfo.split(",");this.partitionField=s[0],this.timeOffset=s[1],this.timeFormatType=s[2]}this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var r=[];for(var o in e.temp.childJobId)r.push(e.temp.childJobId[o].id);e.temp.childJobId=r.toString()}e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),n["f"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Update Successfully",type:"success",duration:2e3})}))}}))},handlerDelete:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){n["e"](e.id).then((function(e){t.fetchData(),t.$notify({title:"Success",message:"Delete Successfully",type:"success",duration:2e3})}))}))},nextTriggerTime:function(e){var t=this;n["d"](e.jobCron).then((function(e){var r=e.content;t.triggerNextTimes=r.join("
")}))},loadById:function(e){var t=this;l["e"](e.jobGroup).then((function(e){t.registerNode=[];var r=e.content;t.registerNode.push(r)}))}}},b=m,f=(r("c3e2"),r("2877")),v=Object(f["a"])(b,o,a,!1,null,null,null);t["default"]=v.exports}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3a8a15ea"],{"3a8d":function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"b",(function(){return l})),r.d(t,"f",(function(){return i})),r.d(t,"a",(function(){return n})),r.d(t,"e",(function(){return s})),r.d(t,"d",(function(){return c}));var o=r("b775");function a(e){return Object(o["a"])({url:"api/jobTemplate/pageList",method:"get",params:e})}function l(){return Object(o["a"])({url:"api/jobGroup/list",method:"get"})}function i(e){return Object(o["a"])({url:"/api/jobTemplate/update",method:"post",data:e})}function n(e){return Object(o["a"])({url:"/api/jobTemplate/add/",method:"post",data:e})}function s(e){return Object(o["a"])({url:"/api/jobTemplate/remove/"+e,method:"post"})}function c(e){return Object(o["a"])({url:"/api/jobTemplate/nextTriggerTime?cron="+e,method:"get"})}},a897:function(e,t,r){},c3e2:function(e,t,r){"use strict";var o=r("a897"),a=r.n(o);a.a},e7ae:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container"},[r("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"任务描述"},model:{value:e.listQuery.jobDesc,callback:function(t){e.$set(e.listQuery,"jobDesc",t)},expression:"listQuery.jobDesc"}}),e._v(" "),r("el-select",{staticClass:"filter-item",attrs:{multiple:"",placeholder:"所属项目"},model:{value:e.projectIds,callback:function(t){e.projectIds=t},expression:"projectIds"}},e._l(e.jobProjectList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),e._v(" "),r("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.fetchData}},[e._v("\n 搜索\n ")]),e._v(" "),r("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("\n 添加\n ")])],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[r("el-table-column",{attrs:{align:"center",label:"任务ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.id))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"任务描述",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.jobDesc))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"所属项目",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.projectName))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"Cron",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.jobCron))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"路由策略",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.routeStrategies.find((function(e){return e.value===t.row.executorRouteStrategy})).label))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"修改用户",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.userName))]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"注册节点",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"bottom",width:"500"},on:{show:function(r){return e.loadById(t.row)}}},[r("el-table",{attrs:{data:e.registerNode}},[r("el-table-column",{attrs:{width:"150",property:"title",label:"执行器名称"}}),e._v(" "),r("el-table-column",{attrs:{width:"150",property:"appName",label:"appName"}}),e._v(" "),r("el-table-column",{attrs:{width:"150",property:"registryList",label:"机器地址"}})],1),e._v(" "),r("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"下次触发时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"bottom",width:"300"},on:{show:function(r){return e.nextTriggerTime(t.row)}}},[r("h5",{domProps:{innerHTML:e._s(e.triggerNextTimes)}}),e._v(" "),r("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[r("el-dropdown",{attrs:{trigger:"click"}},[r("span",{staticClass:"el-dropdown-link"},[e._v("\n 操作"),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(t){return e.handlerUpdate(o)}}},[e._v("编辑")]),e._v(" "),r("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerDelete(o)}}},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),r("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.current,limit:e.listQuery.size},on:{"update:page":function(t){return e.$set(e.listQuery,"current",t)},"update:limit":function(t){return e.$set(e.listQuery,"size",t)},pagination:e.fetchData}}),e._v(" "),r("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,width:"1000px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.temp,"label-position":"left","label-width":"110px"}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"执行器",prop:"jobGroup"}},[r("el-select",{attrs:{placeholder:"请选择执行器"},model:{value:e.temp.jobGroup,callback:function(t){e.$set(e.temp,"jobGroup",t)},expression:"temp.jobGroup"}},e._l(e.executorList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"任务描述",prop:"jobDesc"}},[r("el-input",{attrs:{size:"medium",placeholder:"请输入任务描述"},model:{value:e.temp.jobDesc,callback:function(t){e.$set(e.temp,"jobDesc",t)},expression:"temp.jobDesc"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"路由策略",prop:"executorRouteStrategy"}},[r("el-select",{attrs:{placeholder:"请选择路由策略"},model:{value:e.temp.executorRouteStrategy,callback:function(t){e.$set(e.temp,"executorRouteStrategy",t)},expression:"temp.executorRouteStrategy"}},e._l(e.routeStrategies,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-dialog",{attrs:{title:"提示",visible:e.showCronBox,width:"60%","append-to-body":""},on:{"update:visible":function(t){e.showCronBox=t}}},[r("cron",{model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}}),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.showCronBox=!1}}},[e._v("关闭")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.showCronBox=!1}}},[e._v("确 定")])],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"Cron",prop:"jobCron"}},[r("el-input",{attrs:{"auto-complete":"off",placeholder:"请输入Cron表达式"},model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}},[e.showCronBox?r("el-button",{attrs:{slot:"append",icon:"el-icon-open",title:"关闭图形配置"},on:{click:function(t){e.showCronBox=!1}},slot:"append"}):r("el-button",{attrs:{slot:"append",icon:"el-icon-turn-off",title:"打开图形配置"},on:{click:function(t){e.showCronBox=!0}},slot:"append"})],1)],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"阻塞处理",prop:"executorBlockStrategy"}},[r("el-select",{attrs:{placeholder:"请选择阻塞处理策略"},model:{value:e.temp.executorBlockStrategy,callback:function(t){e.$set(e.temp,"executorBlockStrategy",t)},expression:"temp.executorBlockStrategy"}},e._l(e.blockStrategies,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报警邮件"}},[r("el-input",{attrs:{placeholder:"请输入报警邮件,多个用逗号分隔"},model:{value:e.temp.alarmEmail,callback:function(t){e.$set(e.temp,"alarmEmail",t)},expression:"temp.alarmEmail"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"任务类型",prop:"glueType"}},[r("el-select",{attrs:{placeholder:"任务脚本类型"},model:{value:e.temp.glueType,callback:function(t){e.$set(e.temp,"glueType",t)},expression:"temp.glueType"}},e._l(e.glueTypes,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"失败重试次数"}},[r("el-input-number",{attrs:{min:0,max:20},model:{value:e.temp.executorFailRetryCount,callback:function(t){e.$set(e.temp,"executorFailRetryCount",t)},expression:"temp.executorFailRetryCount"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"所属项目",prop:"projectId"}},[r("el-select",{staticClass:"filter-item",attrs:{placeholder:"所属项目"},model:{value:e.temp.projectId,callback:function(t){e.$set(e.temp,"projectId",t)},expression:"temp.projectId"}},e._l(e.jobProjectList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"超时时间(分钟)"}},[r("el-input-number",{attrs:{min:0,max:120},model:{value:e.temp.executorTimeout,callback:function(t){e.$set(e.temp,"executorTimeout",t)},expression:"temp.executorTimeout"}})],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"子任务"}},[r("el-select",{attrs:{multiple:"",placeholder:"子任务","value-key":"id"},model:{value:e.temp.childJobId,callback:function(t){e.$set(e.temp,"childJobId",t)},expression:"temp.childJobId"}},e._l(e.jobIdList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.jobDesc,value:e}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}})],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"JVM启动参数"}},[r("el-input",{attrs:{placeholder:"-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"},model:{value:e.temp.jvmParam,callback:function(t){e.$set(e.temp,"jvmParam",t)},expression:"temp.jvmParam"}})],1)],1)],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("\n 取消\n ")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v("\n 确认\n ")])],1)],1)],1)},a=[],l=(r("28a5"),r("6b54"),r("39ed")),i=r("5ec8"),n=r("3a8d"),s=r("6724"),c=r("333d"),u=r("7e39"),d=r("a53d"),p=r("2b10"),m={name:"JobTemplate",components:{Pagination:c["a"],Cron:i["a"]},directives:{waves:s["a"]},filters:{statusFilter:function(e){var t={published:"success",draft:"gray",deleted:"danger"};return t[e]}},data:function(){var e=this,t=function(e,t,r){t||r(new Error("Increment parameters is required")),r()},r=function(t,r,o){e.partitionField||o(new Error("Partition parameters is required")),o()};return{projectIds:"",list:null,listLoading:!0,total:0,listQuery:{current:1,size:10,jobGroup:0,triggerStatus:-1,jobDesc:"",executorHandler:"",userId:0,projectIds:""},showCronBox:!1,dialogPluginVisible:!1,pluginData:[],dialogFormVisible:!1,dialogStatus:"",textMap:{update:"Edit",create:"Create"},rules:{jobGroup:[{required:!0,message:"jobGroup is required",trigger:"change"}],executorRouteStrategy:[{required:!0,message:"executorRouteStrategy is required",trigger:"change"}],executorBlockStrategy:[{required:!0,message:"executorBlockStrategy is required",trigger:"change"}],jobDesc:[{required:!0,message:"jobDesc is required",trigger:"blur"}],jobProject:[{required:!0,message:"jobProject is required",trigger:"blur"}],jobCron:[{required:!0,message:"jobCron is required",trigger:"blur"}],incStartId:[{trigger:"blur",validator:t}],replaceParam:[{trigger:"blur",validator:t}],primaryKey:[{trigger:"blur",validator:t}],incStartTime:[{trigger:"change",validator:t}],replaceParamType:[{trigger:"change",validator:t}],partitionField:[{trigger:"blur",validator:r}],datasourceId:[{trigger:"change",validator:t}],readerTable:[{trigger:"blur",validator:t}],projectId:[{required:!0,message:"projectId is required",trigger:"change"}]},temp:{id:void 0,jobGroup:"",jobCron:"",jobDesc:"",executorRouteStrategy:"RANDOM",executorBlockStrategy:"DISCARD_LATER",childJobId:"",executorFailRetryCount:"",alarmEmail:"",executorTimeout:"",userId:0,jobConfigId:"",executorHandler:"executorJobHandler",glueType:"DATAX",executorParam:"",jvmParam:"",projectId:"",datasourceId:0,readerTable:""},resetTemp:function(){this.temp=this.$options.data().temp},executorList:"",jobIdList:"",jobProjectList:"",dataSourceList:"",blockStrategies:[{value:"SERIAL_EXECUTION",label:"单机串行"},{value:"DISCARD_LATER",label:"丢弃后续调度"},{value:"COVER_EARLY",label:"覆盖之前调度"}],routeStrategies:[{value:"FIRST",label:"第一个"},{value:"LAST",label:"最后一个"},{value:"ROUND",label:"轮询"},{value:"RANDOM",label:"随机"},{value:"CONSISTENT_HASH",label:"一致性HASH"},{value:"LEAST_FREQUENTLY_USED",label:"最不经常使用"},{value:"LEAST_RECENTLY_USED",label:"最近最久未使用"},{value:"FAILOVER",label:"故障转移"},{value:"BUSYOVER",label:"忙碌转移"}],glueTypes:[{value:"DATAX",label:"DataX任务"}],triggerNextTimes:"",registerNode:[]}},created:function(){this.fetchData(),this.getExecutor(),this.getJobIdList(),this.getJobProject(),this.getDataSourceList()},methods:{handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},getExecutor:function(){var e=this;n["b"]().then((function(t){var r=t.content;e.executorList=r}))},getJobIdList:function(){var e=this;p["d"]().then((function(t){var r=t.content;e.jobIdList=r}))},getJobProject:function(){var e=this;d["c"]().then((function(t){e.jobProjectList=t}))},getDataSourceList:function(){var e=this;u["d"]().then((function(t){e.dataSourceList=t}))},fetchData:function(){var e=this;this.listLoading=!0,this.projectIds&&(this.listQuery.projectIds=this.projectIds.toString()),n["c"](this.listQuery).then((function(t){var r=t.content;e.total=r.recordsTotal,e.list=r.data,e.listLoading=!1}))},handleCreate:function(){var e=this;this.resetTemp(),this.dialogStatus="create",this.dialogFormVisible=!0,this.temp.jobGroup=this.executorList[0]["id"],this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var r=[];for(var o in e.temp.childJobId)r.push(e.temp.childJobId[o].id);e.temp.childJobId=r.toString()}e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),n["a"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Created Successfully",type:"success",duration:2e3})}))}}))},handlerUpdate:function(e){var t=this;this.resetTemp(),this.temp=Object.assign({},e),this.dialogStatus="update",this.dialogFormVisible=!0;var r=[],o=[];if(this.JobIdList){for(var a in this.JobIdList)this.JobIdList[a].id!==this.temp.id&&o.push(this.JobIdList[a]);this.JobIdList=o}if(this.temp.childJobId){var l=this.temp.childJobId.split(",");for(var i in l)for(var n in this.jobIdList)this.jobIdList[n].id===parseInt(l[i])&&r.push(this.jobIdList[n]);this.temp.childJobId=r}if(this.temp.partitionInfo){var s=this.temp.partitionInfo.split(",");this.partitionField=s[0],this.timeOffset=s[1],this.timeFormatType=s[2]}this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var r=[];for(var o in e.temp.childJobId)r.push(e.temp.childJobId[o].id);e.temp.childJobId=r.toString()}e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),n["f"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Update Successfully",type:"success",duration:2e3})}))}}))},handlerDelete:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){n["e"](e.id).then((function(e){t.fetchData(),t.$notify({title:"Success",message:"Delete Successfully",type:"success",duration:2e3})}))}))},nextTriggerTime:function(e){var t=this;n["d"](e.jobCron).then((function(e){var r=e.content;t.triggerNextTimes=r.join("
")}))},loadById:function(e){var t=this;l["e"](e.jobGroup).then((function(e){t.registerNode=[];var r=e.content;t.registerNode.push(r)}))}}},b=m,f=(r("c3e2"),r("2877")),v=Object(f["a"])(b,o,a,!1,null,null,null);t["default"]=v.exports}}]); \ No newline at end of file diff --git a/datax-admin/src/main/resources/static/static/js/chunk-6ace4dde.0ced191b.js b/datax-admin/src/main/resources/static/static/js/chunk-6ace4dde.0ced191b.js new file mode 100644 index 00000000..4acbb0d7 --- /dev/null +++ b/datax-admin/src/main/resources/static/static/js/chunk-6ace4dde.0ced191b.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ace4dde"],{"0247":function(e,t,a){},"110d":function(e,t,a){},"4c2a":function(e,t,a){"use strict";var r=a("0247"),l=a.n(r);l.a},"8cca":function(e,t,a){"use strict";var r=a("110d"),l=a.n(r);l.a},"8f79":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"任务名称"},model:{value:e.listQuery.jobDesc,callback:function(t){e.$set(e.listQuery,"jobDesc",t)},expression:"listQuery.jobDesc"}}),e._v(" "),a("el-select",{staticClass:"filter-item",attrs:{multiple:"",placeholder:"所属项目"},model:{value:e.projectIds,callback:function(t){e.projectIds=t},expression:"projectIds"}},e._l(e.jobProjectList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),e._v(" "),a("el-select",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"任务类型"},model:{value:e.listQuery.glueType,callback:function(t){e.$set(e.listQuery,"glueType",t)},expression:"listQuery.glueType"}},e._l(e.glueTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.fetchData}},[e._v("\n 搜索\n ")]),e._v(" "),a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("\n 添加\n ")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":"",size:"medium"}},[a("el-table-column",{attrs:{align:"center",label:"ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.id))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"任务名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.jobDesc))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"所属项目",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.projectName))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"Cron",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.jobCron))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"路由策略",align:"center",width:"130"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.routeStrategies.find((function(e){return e.value===t.row.executorRouteStrategy})).label))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-color":"#00A854","active-text":"启动","active-value":1,"inactive-color":"#F04134","inactive-text":"停止","inactive-value":0},on:{change:function(a){return e.changeSwitch(t.row)}},model:{value:t.row.triggerStatus,callback:function(a){e.$set(t.row,"triggerStatus",a)},expression:"scope.row.triggerStatus"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"注册节点",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-popover",{attrs:{placement:"bottom",width:"500"},on:{show:function(a){return e.loadById(t.row)}}},[a("el-table",{attrs:{data:e.registerNode}},[a("el-table-column",{attrs:{width:"150",property:"title",label:"执行器名称"}}),e._v(" "),a("el-table-column",{attrs:{width:"150",property:"appName",label:"appName"}}),e._v(" "),a("el-table-column",{attrs:{width:"150",property:"registryList",label:"机器地址"}})],1),e._v(" "),a("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"下次触发时间",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-popover",{attrs:{placement:"bottom",width:"300"},on:{show:function(a){return e.nextTriggerTime(t.row)}}},[a("h5",{domProps:{innerHTML:e._s(e.triggerNextTimes)}}),e._v(" "),a("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"执行状态",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.statusList.find((function(e){return e.value===t.row.lastHandleCode})).label))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("el-dropdown",{attrs:{trigger:"click"}},[a("span",{staticClass:"el-dropdown-link"},[e._v("\n 操作"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerExecute(r)}}},[e._v("执行一次")]),e._v(" "),a("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerViewLog(r)}}},[e._v("查询日志")]),e._v(" "),a("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(t){return e.handlerUpdate(r)}}},[e._v("编辑")]),e._v(" "),a("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerDelete(r)}}},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.current,limit:e.listQuery.size},on:{"update:page":function(t){return e.$set(e.listQuery,"current",t)},"update:limit":function(t){return e.$set(e.listQuery,"size",t)},pagination:e.fetchData}}),e._v(" "),a("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,width:"1000px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.temp,"label-position":"left","label-width":"110px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"执行器",prop:"jobGroup"}},[a("el-select",{attrs:{placeholder:"请选择执行器"},model:{value:e.temp.jobGroup,callback:function(t){e.$set(e.temp,"jobGroup",t)},expression:"temp.jobGroup"}},e._l(e.executorList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"任务名称",prop:"jobDesc"}},[a("el-input",{attrs:{size:"medium",placeholder:"请输入任务描述"},model:{value:e.temp.jobDesc,callback:function(t){e.$set(e.temp,"jobDesc",t)},expression:"temp.jobDesc"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"路由策略",prop:"executorRouteStrategy"}},[a("el-select",{attrs:{placeholder:"请选择路由策略"},model:{value:e.temp.executorRouteStrategy,callback:function(t){e.$set(e.temp,"executorRouteStrategy",t)},expression:"temp.executorRouteStrategy"}},e._l(e.routeStrategies,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-dialog",{attrs:{title:"提示",visible:e.showCronBox,width:"60%","append-to-body":""},on:{"update:visible":function(t){e.showCronBox=t}}},[a("cron",{model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.showCronBox=!1}}},[e._v("关闭")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.showCronBox=!1}}},[e._v("确 定")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"Cron",prop:"jobCron"}},[a("el-input",{attrs:{"auto-complete":"off",placeholder:"请输入Cron表达式"},model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}},[e.showCronBox?a("el-button",{attrs:{slot:"append",icon:"el-icon-open",title:"关闭图形配置"},on:{click:function(t){e.showCronBox=!1}},slot:"append"}):a("el-button",{attrs:{slot:"append",icon:"el-icon-turn-off",title:"打开图形配置"},on:{click:function(t){e.showCronBox=!0}},slot:"append"})],1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"阻塞处理",prop:"executorBlockStrategy"}},[a("el-select",{attrs:{placeholder:"请选择阻塞处理策略"},model:{value:e.temp.executorBlockStrategy,callback:function(t){e.$set(e.temp,"executorBlockStrategy",t)},expression:"temp.executorBlockStrategy"}},e._l(e.blockStrategies,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"报警邮件"}},[a("el-input",{attrs:{placeholder:"请输入报警邮件,多个用逗号分隔"},model:{value:e.temp.alarmEmail,callback:function(t){e.$set(e.temp,"alarmEmail",t)},expression:"temp.alarmEmail"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"任务类型",prop:"glueType"}},[a("el-select",{attrs:{placeholder:"任务脚本类型"},model:{value:e.temp.glueType,callback:function(t){e.$set(e.temp,"glueType",t)},expression:"temp.glueType"}},e._l(e.glueTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},["JAVA_BEAN"===e.temp.glueType?a("el-form-item",{attrs:{label:"JobHandler",prop:"executorHandler"}},[a("el-input",{attrs:{placeholder:"请输入JobHandler"},model:{value:e.temp.executorHandler,callback:function(t){e.$set(e.temp,"executorHandler",t)},expression:"temp.executorHandler"}})],1):e._e()],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"所属项目",prop:"projectId"}},[a("el-select",{staticClass:"filter-item",attrs:{placeholder:"所属项目"},model:{value:e.temp.projectId,callback:function(t){e.$set(e.temp,"projectId",t)},expression:"temp.projectId"}},e._l(e.jobProjectList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"失败重试次数"}},[a("el-input-number",{attrs:{min:0,max:20},model:{value:e.temp.executorFailRetryCount,callback:function(t){e.$set(e.temp,"executorFailRetryCount",t)},expression:"temp.executorFailRetryCount"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"子任务"}},[a("el-select",{attrs:{multiple:"",placeholder:"子任务","value-key":"id"},model:{value:e.temp.childJobId,callback:function(t){e.$set(e.temp,"childJobId",t)},expression:"temp.childJobId"}},e._l(e.jobIdList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.jobDesc,value:e}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"超时时间(分钟)"}},[a("el-input-number",{attrs:{min:0,max:120},model:{value:e.temp.executorTimeout,callback:function(t){e.$set(e.temp,"executorTimeout",t)},expression:"temp.executorTimeout"}})],1)],1)],1),e._v(" "),"DATAX"===e.temp.glueType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"辅助参数",prop:"incrementType"}},[a("el-select",{attrs:{placeholder:"请选择参数类型",value:""},model:{value:e.temp.incrementType,callback:function(t){e.$set(e.temp,"incrementType",t)},expression:"temp.incrementType"}},e._l(e.incrementTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1):e._e(),e._v(" "),"DATAX"===e.temp.glueType&&1===e.temp.incrementType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量主键开始ID",prop:"incStartId"}},[a("el-input",{staticStyle:{width:"56%"},attrs:{placeholder:"首次增量使用"},model:{value:e.temp.incStartId,callback:function(t){e.$set(e.temp,"incStartId",t)},expression:"temp.incStartId"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"ID增量参数",prop:"replaceParam"}},[a("el-input",{attrs:{placeholder:"-DstartId='%s' -DendId='%s'"},model:{value:e.temp.replaceParam,callback:function(t){e.$set(e.temp,"replaceParam",t)},expression:"temp.replaceParam"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"reader数据源",prop:"datasourceId"}},[a("el-select",{staticClass:"filter-item",attrs:{placeholder:"reader数据源"},model:{value:e.temp.datasourceId,callback:function(t){e.$set(e.temp,"datasourceId",t)},expression:"temp.datasourceId"}},e._l(e.dataSourceList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.datasourceName,value:e.id}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"reader表",prop:"readerTable"}},[a("el-input",{attrs:{placeholder:"读表的表名"},model:{value:e.temp.readerTable,callback:function(t){e.$set(e.temp,"readerTable",t)},expression:"temp.readerTable"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"主键","label-width":"40px",prop:"primaryKey"}},[a("el-input",{attrs:{placeholder:"请填写主键字段名"},model:{value:e.temp.primaryKey,callback:function(t){e.$set(e.temp,"primaryKey",t)},expression:"temp.primaryKey"}})],1)],1)],1):e._e(),e._v(" "),"DATAX"===e.temp.glueType&&2===e.temp.incrementType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量开始时间",prop:"incStartTime"}},[a("el-date-picker",{staticStyle:{width:"57%"},attrs:{type:"datetime",placeholder:"首次增量使用",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.temp.incStartTime,callback:function(t){e.$set(e.temp,"incStartTime",t)},expression:"temp.incStartTime"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量时间字段",prop:"replaceParam"}},[a("el-input",{attrs:{placeholder:"-DlastTime='%s' -DcurrentTime='%s'"},model:{value:e.temp.replaceParam,callback:function(t){e.$set(e.temp,"replaceParam",t)},expression:"temp.replaceParam"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量时间格式",prop:"replaceParamType"}},[a("el-select",{attrs:{placeholder:"增量时间格式"},on:{change:e.incStartTimeFormat},model:{value:e.temp.replaceParamType,callback:function(t){e.$set(e.temp,"replaceParamType",t)},expression:"temp.replaceParamType"}},e._l(e.replaceFormatTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1):e._e(),e._v(" "),"DATAX"===e.temp.glueType&&3===e.temp.incrementType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"分区字段",prop:"partitionField"}},[a("el-input",{staticStyle:{width:"56%"},attrs:{placeholder:"请输入分区字段"},model:{value:e.partitionField,callback:function(t){e.partitionField=t},expression:"partitionField"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"分区时间"}},[a("el-select",{attrs:{placeholder:"分区时间格式"},model:{value:e.timeFormatType,callback:function(t){e.timeFormatType=t},expression:"timeFormatType"}},e._l(e.timeFormatTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-input-number",{staticStyle:{width:"65%"},attrs:{min:-20,max:0},model:{value:e.timeOffset,callback:function(t){e.timeOffset=t},expression:"timeOffset"}})],1)],1):e._e(),e._v(" "),"DATAX"===e.temp.glueType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"JVM启动参数"}},[a("el-input",{attrs:{placeholder:"-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"},model:{value:e.temp.jvmParam,callback:function(t){e.$set(e.temp,"jvmParam",t)},expression:"temp.jvmParam"}})],1)],1)],1):e._e()],1),e._v(" "),"DATAX"===e.temp.glueType||"JAVA_BEAN"===e.temp.glueType?a("json-editor",{ref:"jsonEditor",model:{value:e.jobJson,callback:function(t){e.jobJson=t},expression:"jobJson"}}):e._e(),e._v(" "),"GLUE_SHELL"===e.temp.glueType?a("shell-editor",{ref:"shellEditor",model:{value:e.glueSource,callback:function(t){e.glueSource=t},expression:"glueSource"}}):e._e(),e._v(" "),"GLUE_PYTHON"===e.temp.glueType?a("python-editor",{ref:"pythonEditor",model:{value:e.glueSource,callback:function(t){e.glueSource=t},expression:"glueSource"}}):e._e(),e._v(" "),"GLUE_POWERSHELL"===e.temp.glueType?a("powershell-editor",{ref:"powershellEditor",model:{value:e.glueSource,callback:function(t){e.glueSource=t},expression:"glueSource"}}):e._e(),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("\n 取消\n ")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v("\n 确定\n ")])],1)],1)],1)},l=[],o=(a("28a5"),a("6b54"),a("39ed")),i=a("2b10"),n=a("6724"),s=a("5ec8"),u=a("333d"),c=a("fa7e"),p=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shell-editor"},[a("textarea",{ref:"textarea"})])},d=[],m=a("56b3"),f=a.n(m);a("0dd0"),a("a7be"),a("acdf"),a("f9d4"),a("8822");a("02f0");var h={name:"ShellEditor",props:["value"],data:function(){return{shellEditor:!1}},watch:{value:function(e){var t=this.shellEditor.getValue();e!==t&&this.shellEditor.setValue(this.value)}},mounted:function(){var e=this;this.shellEditor=f.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"text/x-sh",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.shellEditor.setValue(this.value?this.value:""),this.shellEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.shellEditor.getValue()}}},b=h,v=(a("93bc"),a("2877")),g=Object(v["a"])(b,p,d,!1,null,"8a0faab0",null),y=g.exports,_=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"python-editor"},[a("textarea",{ref:"textarea"})])},x=[];a("db91");var S={name:"PythonEditor",props:["value"],data:function(){return{pythonEditor:!1}},watch:{value:function(e){var t=this.pythonEditor.getValue();e!==t&&this.pythonEditor.setValue(this.value)}},mounted:function(){var e=this;this.pythonEditor=f.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"text/x-python",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.pythonEditor.setValue(this.value?this.value:""),this.pythonEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.pythonEditor.getValue()}}},T=S,j=(a("8cca"),Object(v["a"])(T,_,x,!1,null,"0cf95e77",null)),w=j.exports,E=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"powershell-editor"},[a("textarea",{ref:"textarea"})])},k=[];a("9da3");var I={name:"PowershellEditor",props:["value"],data:function(){return{powershellEditor:!1}},watch:{value:function(e){var t=this.powershellEditor.getValue();e!==t&&this.powershellEditor.setValue(this.value)}},mounted:function(){var e=this;this.powershellEditor=f.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"powershell",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.powershellEditor.setValue(this.value?this.value:""),this.powershellEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.powershellEditor.getValue()}}},$=I,C=(a("4c2a"),Object(v["a"])($,E,k,!1,null,"44735eba",null)),L=C.exports,A=a("7e39"),J=a("a53d"),D=a("61f7"),V={name:"JobInfo",components:{Pagination:u["a"],JsonEditor:c["a"],ShellEditor:y,PythonEditor:w,PowershellEditor:L,Cron:s["a"]},directives:{waves:n["a"]},filters:{statusFilter:function(e){var t={published:"success",draft:"gray",deleted:"danger"};return t[e]}},data:function(){var e=this,t=function(e,t,a){t||a(new Error("Increment parameters is required")),a()},a=function(t,a,r){e.partitionField||r(new Error("Partition parameters is required")),r()};return{projectIds:"",list:null,listLoading:!0,total:0,listQuery:{current:1,size:10,jobGroup:0,projectIds:"",triggerStatus:-1,jobDesc:"",glueType:""},showCronBox:!1,dialogPluginVisible:!1,pluginData:[],dialogFormVisible:!1,dialogStatus:"",textMap:{update:"Edit",create:"Create"},rules:{jobGroup:[{required:!0,message:"jobGroup is required",trigger:"change"}],executorRouteStrategy:[{required:!0,message:"executorRouteStrategy is required",trigger:"change"}],executorBlockStrategy:[{required:!0,message:"executorBlockStrategy is required",trigger:"change"}],glueType:[{required:!0,message:"jobType is required",trigger:"change"}],executorHandler:[{required:!0,message:"executorHandler is required",trigger:"change"}],projectId:[{required:!0,message:"projectId is required",trigger:"change"}],jobDesc:[{required:!0,message:"jobDesc is required",trigger:"blur"}],jobProject:[{required:!0,message:"jobProject is required",trigger:"blur"}],jobCron:[{required:!0,message:"jobCron is required",trigger:"blur"}],incStartId:[{trigger:"blur",validator:t}],replaceParam:[{trigger:"blur",validator:t}],primaryKey:[{trigger:"blur",validator:t}],incStartTime:[{trigger:"change",validator:t}],replaceParamType:[{trigger:"change",validator:t}],partitionField:[{trigger:"blur",validator:a}],datasourceId:[{trigger:"change",validator:t}],readerTable:[{trigger:"blur",validator:t}]},temp:{id:void 0,jobGroup:"",jobCron:"",jobDesc:"",executorRouteStrategy:"",executorBlockStrategy:"",childJobId:"",executorFailRetryCount:"",alarmEmail:"",executorTimeout:"",userId:0,jobConfigId:"",executorHandler:"",glueType:"",glueSource:"",jobJson:"",executorParam:"",replaceParam:"",replaceParamType:"Timestamp",jvmParam:"",incStartTime:"",partitionInfo:"",incrementType:0,incStartId:"",primaryKey:"",projectId:"",datasourceId:"",readerTable:""},resetTemp:function(){this.temp=this.$options.data().temp,this.jobJson="",this.glueSource="",this.timeOffset=0,this.timeFormatType="yyyy-MM-dd",this.partitionField=""},executorList:"",jobIdList:"",jobProjectList:"",dataSourceList:"",blockStrategies:[{value:"SERIAL_EXECUTION",label:"单机串行"},{value:"DISCARD_LATER",label:"丢弃后续调度"},{value:"COVER_EARLY",label:"覆盖之前调度"}],routeStrategies:[{value:"FIRST",label:"第一个"},{value:"LAST",label:"最后一个"},{value:"ROUND",label:"轮询"},{value:"RANDOM",label:"随机"},{value:"CONSISTENT_HASH",label:"一致性HASH"},{value:"LEAST_FREQUENTLY_USED",label:"最不经常使用"},{value:"LEAST_RECENTLY_USED",label:"最近最久未使用"},{value:"FAILOVER",label:"故障转移"},{value:"BUSYOVER",label:"忙碌转移"}],glueTypes:[{value:"DATAX",label:"DataX任务"},{value:"JAVA_BEAN",label:"Java任务"},{value:"GLUE_SHELL",label:"Shell任务"},{value:"GLUE_PYTHON",label:"Python任务"},{value:"GLUE_POWERSHELL",label:"PowerShell任务"}],incrementTypes:[{value:0,label:"无"},{value:1,label:"主键自增"},{value:2,label:"时间自增"},{value:3,label:"HIVE分区"}],triggerNextTimes:"",registerNode:[],jobJson:"",glueSource:"",timeOffset:0,timeFormatType:"yyyy-MM-dd",partitionField:"",timeFormatTypes:[{value:"yyyy-MM-dd",label:"yyyy-MM-dd"},{value:"yyyyMMdd",label:"yyyyMMdd"},{value:"yyyy/MM/dd",label:"yyyy/MM/dd"}],replaceFormatTypes:[{value:"yyyy/MM/dd",label:"yyyy/MM/dd"},{value:"yyyy-MM-dd",label:"yyyy-MM-dd"},{value:"HH:mm:ss",label:"HH:mm:ss"},{value:"yyyy/MM/dd HH:mm:ss",label:"yyyy/MM/dd HH:mm:ss"},{value:"yyyy-MM-dd HH:mm:ss",label:"yyyy-MM-dd HH:mm:ss"},{value:"Timestamp",label:"时间戳"}],statusList:[{value:500,label:"失败"},{value:502,label:"失败(超时)"},{value:200,label:"成功"},{value:0,label:"无"}]}},created:function(){this.fetchData(),this.getExecutor(),this.getJobIdList(),this.getJobProject(),this.getDataSourceList()},methods:{handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},getExecutor:function(){var e=this;i["c"]().then((function(t){var a=t.content;e.executorList=a}))},getJobIdList:function(){var e=this;i["d"]().then((function(t){var a=t.content;e.jobIdList=a}))},getJobProject:function(){var e=this;J["c"]().then((function(t){e.jobProjectList=t}))},getDataSourceList:function(){var e=this;A["d"]().then((function(t){e.dataSourceList=t}))},fetchData:function(){var e=this;this.listLoading=!0,this.projectIds&&(this.listQuery.projectIds=this.projectIds.toString()),i["e"](this.listQuery).then((function(t){var a=t.content;e.total=a.recordsTotal,e.list=a.data,e.listLoading=!1}))},incStartTimeFormat:function(e){},handleCreate:function(){var e=this;this.resetTemp(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;"DATAX"!==this.temp.glueType&&"JAVA_BEAN"!==this.temp.glueType||Object(D["c"])(this.jobJson)?this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var a=[];for(var r in e.temp.childJobId)a.push(e.temp.childJobId[r].id);e.temp.childJobId=a.toString()}e.temp.jobJson=e.jobJson,e.temp.glueSource=e.glueSource,e.temp.executorHandler="DATAX"===e.temp.glueType?"executorJobHandler":"JAVA_BEAN"===e.temp.glueType?e.temp.executorHandler:"",e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),i["b"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Created Successfully",type:"success",duration:2e3})}))}})):this.$notify({title:"Fail",message:"json格式错误",type:"error",duration:2e3})},handlerUpdate:function(e){var t=this;this.resetTemp(),this.temp=Object.assign({},e),this.temp.jobJson&&(this.jobJson=JSON.parse(this.temp.jobJson)),this.glueSource=this.temp.glueSource;var a=[],r=[];if(this.jobIdList){for(var l in this.jobIdList)this.jobIdList[l].id!==this.temp.id&&r.push(this.jobIdList[l]);this.JobIdList=r}if(this.temp.childJobId){var o=this.temp.childJobId.split(",");for(var i in o)for(var n in this.jobIdList)this.jobIdList[n].id===parseInt(o[i])&&a.push(this.jobIdList[n]);this.temp.childJobId=a}if(this.temp.partitionInfo){var s=this.temp.partitionInfo.split(",");this.partitionField=s[0],this.timeOffset=s[1],this.timeFormatType=s[2]}this.dialogStatus="update",this.dialogFormVisible=!0,this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},updateData:function(){var e=this;this.temp.jobJson="string"!==typeof this.jobJson?JSON.stringify(this.jobJson):this.jobJson,"DATAX"!==this.temp.glueType&&"JAVA_BEAN"!==this.temp.glueType||Object(D["c"])(this.temp.jobJson)?this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var a=[];for(var r in e.temp.childJobId)a.push(e.temp.childJobId[r].id);e.temp.childJobId=a.toString()}e.temp.executorHandler="DATAX"===e.temp.glueType?"executorJobHandler":"JAVA_BEAN"===e.temp.glueType?e.temp.executorHandler:"",e.temp.glueSource=e.glueSource,e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),i["k"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Update Successfully",type:"success",duration:2e3})}))}})):this.$notify({title:"Fail",message:"json格式错误",type:"error",duration:2e3})},handlerDelete:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){i["g"](e.id).then((function(e){t.fetchData(),t.$notify({title:"Success",message:"Delete Successfully",type:"success",duration:2e3})}))}))},handlerExecute:function(e){var t=this;this.$confirm("确定执行吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={};a.jobId=e.id,a.executorParam=e.executorParam,i["j"](a).then((function(e){t.$notify({title:"Success",message:"Execute Successfully",type:"success",duration:2e3})}))}))},handlerViewLog:function(e){this.$router.push({path:"/datax/log/jobLog",query:{jobId:e.id}})},handlerStart:function(e){var t=this;i["h"](e.id).then((function(e){t.$notify({title:"Success",message:"Start Successfully",type:"success",duration:2e3})}))},handlerStop:function(e){var t=this;i["i"](e.id).then((function(e){t.$notify({title:"Success",message:"Start Successfully",type:"success",duration:2e3})}))},changeSwitch:function(e){1===e.triggerStatus?this.handlerStart(e):this.handlerStop(e)},nextTriggerTime:function(e){var t=this;i["f"](e.jobCron).then((function(e){var a=e.content;t.triggerNextTimes=a.join("
")}))},loadById:function(e){var t=this;o["e"](e.jobGroup).then((function(e){t.registerNode=[];var a=e.content;t.registerNode.push(a)}))}}},F=V,P=(a("fe6f"),Object(v["a"])(F,r,l,!1,null,null,null));t["default"]=P.exports},"93bc":function(e,t,a){"use strict";var r=a("c42f"),l=a.n(r);l.a},b8b0:function(e,t,a){"use strict";var r=a("f84c"),l=a.n(r);l.a},c319:function(e,t,a){},c42f:function(e,t,a){},f84c:function(e,t,a){},fa7e:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"json-editor"},[a("textarea",{ref:"textarea"})])},l=[],o=a("56b3"),i=a.n(o);a("0dd0"),a("a7be"),a("acdf"),a("f9d4"),a("8822"),a("d2de");a("ae67");var n={name:"JsonEditor",props:["value"],data:function(){return{jsonEditor:!1}},watch:{value:function(e){var t=this.jsonEditor.getValue();e!==t&&this.jsonEditor.setValue(JSON.stringify(this.value,null,2))}},mounted:function(){var e=this;this.jsonEditor=i.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"application/json",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.jsonEditor.setValue(JSON.stringify(this.value,null,2)),this.jsonEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.jsonEditor.getValue()}}},s=n,u=(a("b8b0"),a("2877")),c=Object(u["a"])(s,r,l,!1,null,"fad11014",null);t["a"]=c.exports},fe6f:function(e,t,a){"use strict";var r=a("c319"),l=a.n(r);l.a}}]); \ No newline at end of file diff --git a/datax-admin/src/main/resources/static/static/js/chunk-6ace4dde.23eea700.js b/datax-admin/src/main/resources/static/static/js/chunk-6ace4dde.23eea700.js deleted file mode 100644 index 8a0b0ddd..00000000 --- a/datax-admin/src/main/resources/static/static/js/chunk-6ace4dde.23eea700.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ace4dde"],{"0247":function(e,t,a){},"110d":function(e,t,a){},"4c2a":function(e,t,a){"use strict";var r=a("0247"),l=a.n(r);l.a},"8cca":function(e,t,a){"use strict";var r=a("110d"),l=a.n(r);l.a},"8f79":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"任务名称"},model:{value:e.listQuery.jobDesc,callback:function(t){e.$set(e.listQuery,"jobDesc",t)},expression:"listQuery.jobDesc"}}),e._v(" "),a("el-select",{staticClass:"filter-item",attrs:{multiple:"",placeholder:"所属项目"},model:{value:e.projectIds,callback:function(t){e.projectIds=t},expression:"projectIds"}},e._l(e.jobProjectList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),e._v(" "),a("el-select",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"任务类型"},model:{value:e.listQuery.glueType,callback:function(t){e.$set(e.listQuery,"glueType",t)},expression:"listQuery.glueType"}},e._l(e.glueTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),e._v(" "),a("el-button",{directives:[{name:"waves",rawName:"v-waves"}],staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.fetchData}},[e._v("\n 搜索\n ")]),e._v(" "),a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("\n 添加\n ")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":"",size:"medium"}},[a("el-table-column",{attrs:{align:"center",label:"ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.id))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"任务名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.jobDesc))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"所属项目",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.projectName))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"Cron",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.jobCron))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"路由策略",align:"center",width:"130"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.routeStrategies.find((function(e){return e.value===t.row.executorRouteStrategy})).label))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"状态",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-color":"#00A854","active-text":"启动","active-value":1,"inactive-color":"#F04134","inactive-text":"停止","inactive-value":0},on:{change:function(a){return e.changeSwitch(t.row)}},model:{value:t.row.triggerStatus,callback:function(a){e.$set(t.row,"triggerStatus",a)},expression:"scope.row.triggerStatus"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"注册节点",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-popover",{attrs:{placement:"bottom",width:"500"},on:{show:function(a){return e.loadById(t.row)}}},[a("el-table",{attrs:{data:e.registerNode}},[a("el-table-column",{attrs:{width:"150",property:"title",label:"执行器名称"}}),e._v(" "),a("el-table-column",{attrs:{width:"150",property:"appName",label:"appName"}}),e._v(" "),a("el-table-column",{attrs:{width:"150",property:"registryList",label:"机器地址"}})],1),e._v(" "),a("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"下次触发时间",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-popover",{attrs:{placement:"bottom",width:"300"},on:{show:function(a){return e.nextTriggerTime(t.row)}}},[a("h5",{domProps:{innerHTML:e._s(e.triggerNextTimes)}}),e._v(" "),a("el-button",{attrs:{slot:"reference",size:"small"},slot:"reference"},[e._v("查看")])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"执行状态",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.statusList.find((function(e){return e.value===t.row.lastHandleCode})).label))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("el-dropdown",{attrs:{trigger:"click"}},[a("span",{staticClass:"el-dropdown-link"},[e._v("\n 操作"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerExecute(r)}}},[e._v("执行一次")]),e._v(" "),a("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerViewLog(r)}}},[e._v("查询日志")]),e._v(" "),a("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(t){return e.handlerUpdate(r)}}},[e._v("编辑")]),e._v(" "),a("el-dropdown-item",{nativeOn:{click:function(t){return e.handlerDelete(r)}}},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.current,limit:e.listQuery.size},on:{"update:page":function(t){return e.$set(e.listQuery,"current",t)},"update:limit":function(t){return e.$set(e.listQuery,"size",t)},pagination:e.fetchData}}),e._v(" "),a("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,width:"1000px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.temp,"label-position":"left","label-width":"110px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"执行器",prop:"jobGroup"}},[a("el-select",{attrs:{placeholder:"请选择执行器"},model:{value:e.temp.jobGroup,callback:function(t){e.$set(e.temp,"jobGroup",t)},expression:"temp.jobGroup"}},e._l(e.executorList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"任务名称",prop:"jobDesc"}},[a("el-input",{attrs:{size:"medium",placeholder:"请输入任务描述"},model:{value:e.temp.jobDesc,callback:function(t){e.$set(e.temp,"jobDesc",t)},expression:"temp.jobDesc"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"路由策略",prop:"executorRouteStrategy"}},[a("el-select",{attrs:{placeholder:"请选择路由策略"},model:{value:e.temp.executorRouteStrategy,callback:function(t){e.$set(e.temp,"executorRouteStrategy",t)},expression:"temp.executorRouteStrategy"}},e._l(e.routeStrategies,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-dialog",{attrs:{title:"提示",visible:e.showCronBox,width:"60%","append-to-body":""},on:{"update:visible":function(t){e.showCronBox=t}}},[a("cron",{model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.showCronBox=!1}}},[e._v("关闭")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.showCronBox=!1}}},[e._v("确 定")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"Cron",prop:"jobCron"}},[a("el-input",{attrs:{"auto-complete":"off",placeholder:"请输入Cron表达式"},model:{value:e.temp.jobCron,callback:function(t){e.$set(e.temp,"jobCron",t)},expression:"temp.jobCron"}},[e.showCronBox?a("el-button",{attrs:{slot:"append",icon:"el-icon-open",title:"关闭图形配置"},on:{click:function(t){e.showCronBox=!1}},slot:"append"}):a("el-button",{attrs:{slot:"append",icon:"el-icon-turn-off",title:"打开图形配置"},on:{click:function(t){e.showCronBox=!0}},slot:"append"})],1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"阻塞处理",prop:"executorBlockStrategy"}},[a("el-select",{attrs:{placeholder:"请选择阻塞处理策略"},model:{value:e.temp.executorBlockStrategy,callback:function(t){e.$set(e.temp,"executorBlockStrategy",t)},expression:"temp.executorBlockStrategy"}},e._l(e.blockStrategies,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"报警邮件"}},[a("el-input",{attrs:{placeholder:"请输入报警邮件,多个用逗号分隔"},model:{value:e.temp.alarmEmail,callback:function(t){e.$set(e.temp,"alarmEmail",t)},expression:"temp.alarmEmail"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"任务类型",prop:"glueType"}},[a("el-select",{attrs:{placeholder:"任务脚本类型"},model:{value:e.temp.glueType,callback:function(t){e.$set(e.temp,"glueType",t)},expression:"temp.glueType"}},e._l(e.glueTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"失败重试次数"}},[a("el-input-number",{attrs:{min:0,max:20},model:{value:e.temp.executorFailRetryCount,callback:function(t){e.$set(e.temp,"executorFailRetryCount",t)},expression:"temp.executorFailRetryCount"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"所属项目",prop:"projectId"}},[a("el-select",{staticClass:"filter-item",attrs:{placeholder:"所属项目"},model:{value:e.temp.projectId,callback:function(t){e.$set(e.temp,"projectId",t)},expression:"temp.projectId"}},e._l(e.jobProjectList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"超时时间(分钟)"}},[a("el-input-number",{attrs:{min:0,max:120},model:{value:e.temp.executorTimeout,callback:function(t){e.$set(e.temp,"executorTimeout",t)},expression:"temp.executorTimeout"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"子任务"}},[a("el-select",{attrs:{multiple:"",placeholder:"子任务","value-key":"id"},model:{value:e.temp.childJobId,callback:function(t){e.$set(e.temp,"childJobId",t)},expression:"temp.childJobId"}},e._l(e.jobIdList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.jobDesc,value:e}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}})],1),e._v(" "),"BEAN"===e.temp.glueType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"辅助参数",prop:"incrementType"}},[a("el-select",{attrs:{placeholder:"请选择参数类型",value:""},model:{value:e.temp.incrementType,callback:function(t){e.$set(e.temp,"incrementType",t)},expression:"temp.incrementType"}},e._l(e.incrementTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1):e._e(),e._v(" "),"BEAN"===e.temp.glueType&&1===e.temp.incrementType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量主键开始ID",prop:"incStartId"}},[a("el-input",{staticStyle:{width:"56%"},attrs:{placeholder:"首次增量使用"},model:{value:e.temp.incStartId,callback:function(t){e.$set(e.temp,"incStartId",t)},expression:"temp.incStartId"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"ID增量参数",prop:"replaceParam"}},[a("el-input",{attrs:{placeholder:"-DstartId='%s' -DendId='%s'"},model:{value:e.temp.replaceParam,callback:function(t){e.$set(e.temp,"replaceParam",t)},expression:"temp.replaceParam"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"reader数据源",prop:"datasourceId"}},[a("el-select",{staticClass:"filter-item",attrs:{placeholder:"reader数据源"},model:{value:e.temp.datasourceId,callback:function(t){e.$set(e.temp,"datasourceId",t)},expression:"temp.datasourceId"}},e._l(e.dataSourceList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.datasourceName,value:e.id}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"reader表",prop:"readerTable"}},[a("el-input",{attrs:{placeholder:"读表的表名"},model:{value:e.temp.readerTable,callback:function(t){e.$set(e.temp,"readerTable",t)},expression:"temp.readerTable"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"主键","label-width":"40px",prop:"primaryKey"}},[a("el-input",{attrs:{placeholder:"请填写主键字段名"},model:{value:e.temp.primaryKey,callback:function(t){e.$set(e.temp,"primaryKey",t)},expression:"temp.primaryKey"}})],1)],1)],1):e._e(),e._v(" "),"BEAN"===e.temp.glueType&&2===e.temp.incrementType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量开始时间",prop:"incStartTime"}},[a("el-date-picker",{staticStyle:{width:"57%"},attrs:{type:"datetime",placeholder:"首次增量使用",format:"yyyy-MM-dd HH:mm:ss"},model:{value:e.temp.incStartTime,callback:function(t){e.$set(e.temp,"incStartTime",t)},expression:"temp.incStartTime"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量时间字段",prop:"replaceParam"}},[a("el-input",{attrs:{placeholder:"-DlastTime='%s' -DcurrentTime='%s'"},model:{value:e.temp.replaceParam,callback:function(t){e.$set(e.temp,"replaceParam",t)},expression:"temp.replaceParam"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"增量时间格式",prop:"replaceParamType"}},[a("el-select",{attrs:{placeholder:"增量时间格式"},on:{change:e.incStartTimeFormat},model:{value:e.temp.replaceParamType,callback:function(t){e.$set(e.temp,"replaceParamType",t)},expression:"temp.replaceParamType"}},e._l(e.replaceFormatTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1):e._e(),e._v(" "),"BEAN"===e.temp.glueType&&3===e.temp.incrementType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"分区字段",prop:"partitionField"}},[a("el-input",{staticStyle:{width:"56%"},attrs:{placeholder:"请输入分区字段"},model:{value:e.partitionField,callback:function(t){e.partitionField=t},expression:"partitionField"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"分区时间"}},[a("el-select",{attrs:{placeholder:"分区时间格式"},model:{value:e.timeFormatType,callback:function(t){e.timeFormatType=t},expression:"timeFormatType"}},e._l(e.timeFormatTypes,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-input-number",{staticStyle:{width:"65%"},attrs:{min:-20,max:0},model:{value:e.timeOffset,callback:function(t){e.timeOffset=t},expression:"timeOffset"}})],1)],1):e._e(),e._v(" "),"BEAN"===e.temp.glueType?a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"JVM启动参数"}},[a("el-input",{attrs:{placeholder:"-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError"},model:{value:e.temp.jvmParam,callback:function(t){e.$set(e.temp,"jvmParam",t)},expression:"temp.jvmParam"}})],1)],1)],1):e._e()],1),e._v(" "),"BEAN"===e.temp.glueType?a("json-editor",{ref:"jsonEditor",model:{value:e.jobJson,callback:function(t){e.jobJson=t},expression:"jobJson"}}):e._e(),e._v(" "),"GLUE_SHELL"===e.temp.glueType?a("shell-editor",{ref:"shellEditor",model:{value:e.glueSource,callback:function(t){e.glueSource=t},expression:"glueSource"}}):e._e(),e._v(" "),"GLUE_PYTHON"===e.temp.glueType?a("python-editor",{ref:"pythonEditor",model:{value:e.glueSource,callback:function(t){e.glueSource=t},expression:"glueSource"}}):e._e(),e._v(" "),"GLUE_POWERSHELL"===e.temp.glueType?a("powershell-editor",{ref:"powershellEditor",model:{value:e.glueSource,callback:function(t){e.glueSource=t},expression:"glueSource"}}):e._e(),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("\n 取消\n ")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v("\n 确定\n ")])],1)],1)],1)},l=[],o=(a("28a5"),a("6b54"),a("39ed")),i=a("2b10"),n=a("6724"),s=a("5ec8"),u=a("333d"),c=a("fa7e"),p=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shell-editor"},[a("textarea",{ref:"textarea"})])},d=[],m=a("56b3"),f=a.n(m);a("0dd0"),a("a7be"),a("acdf"),a("f9d4"),a("8822");a("02f0");var h={name:"ShellEditor",props:["value"],data:function(){return{shellEditor:!1}},watch:{value:function(e){var t=this.shellEditor.getValue();e!==t&&this.shellEditor.setValue(this.value)}},mounted:function(){var e=this;this.shellEditor=f.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"text/x-sh",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.shellEditor.setValue(this.value?this.value:""),this.shellEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.shellEditor.getValue()}}},b=h,v=(a("93bc"),a("2877")),g=Object(v["a"])(b,p,d,!1,null,"8a0faab0",null),y=g.exports,_=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"python-editor"},[a("textarea",{ref:"textarea"})])},x=[];a("db91");var S={name:"PythonEditor",props:["value"],data:function(){return{pythonEditor:!1}},watch:{value:function(e){var t=this.pythonEditor.getValue();e!==t&&this.pythonEditor.setValue(this.value)}},mounted:function(){var e=this;this.pythonEditor=f.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"text/x-python",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.pythonEditor.setValue(this.value?this.value:""),this.pythonEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.pythonEditor.getValue()}}},j=S,w=(a("8cca"),Object(v["a"])(j,_,x,!1,null,"0cf95e77",null)),T=w.exports,E=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"powershell-editor"},[a("textarea",{ref:"textarea"})])},k=[];a("9da3");var I={name:"PowershellEditor",props:["value"],data:function(){return{powershellEditor:!1}},watch:{value:function(e){var t=this.powershellEditor.getValue();e!==t&&this.powershellEditor.setValue(this.value)}},mounted:function(){var e=this;this.powershellEditor=f.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"powershell",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.powershellEditor.setValue(this.value?this.value:""),this.powershellEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.powershellEditor.getValue()}}},$=I,C=(a("4c2a"),Object(v["a"])($,E,k,!1,null,"44735eba",null)),L=C.exports,F=a("7e39"),J=a("a53d"),V=a("61f7"),D={name:"JobInfo",components:{Pagination:u["a"],JsonEditor:c["a"],ShellEditor:y,PythonEditor:T,PowershellEditor:L,Cron:s["a"]},directives:{waves:n["a"]},filters:{statusFilter:function(e){var t={published:"success",draft:"gray",deleted:"danger"};return t[e]}},data:function(){var e=this,t=function(e,t,a){t||a(new Error("Increment parameters is required")),a()},a=function(t,a,r){e.partitionField||r(new Error("Partition parameters is required")),r()};return{projectIds:"",list:null,listLoading:!0,total:0,listQuery:{current:1,size:10,jobGroup:0,projectIds:"",triggerStatus:-1,jobDesc:"",glueType:""},showCronBox:!1,dialogPluginVisible:!1,pluginData:[],dialogFormVisible:!1,dialogStatus:"",textMap:{update:"Edit",create:"Create"},rules:{jobGroup:[{required:!0,message:"jobGroup is required",trigger:"change"}],executorRouteStrategy:[{required:!0,message:"executorRouteStrategy is required",trigger:"change"}],executorBlockStrategy:[{required:!0,message:"executorBlockStrategy is required",trigger:"change"}],glueType:[{required:!0,message:"jobType is required",trigger:"change"}],projectId:[{required:!0,message:"projectId is required",trigger:"change"}],jobDesc:[{required:!0,message:"jobDesc is required",trigger:"blur"}],jobProject:[{required:!0,message:"jobProject is required",trigger:"blur"}],jobCron:[{required:!0,message:"jobCron is required",trigger:"blur"}],incStartId:[{trigger:"blur",validator:t}],replaceParam:[{trigger:"blur",validator:t}],primaryKey:[{trigger:"blur",validator:t}],incStartTime:[{trigger:"change",validator:t}],replaceParamType:[{trigger:"change",validator:t}],partitionField:[{trigger:"blur",validator:a}],datasourceId:[{trigger:"change",validator:t}],readerTable:[{trigger:"blur",validator:t}]},temp:{id:void 0,jobGroup:"",jobCron:"",jobDesc:"",executorRouteStrategy:"",executorBlockStrategy:"",childJobId:"",executorFailRetryCount:"",alarmEmail:"",executorTimeout:"",userId:0,jobConfigId:"",executorHandler:"",glueType:"",glueSource:"",jobJson:"",executorParam:"",replaceParam:"",replaceParamType:"Timestamp",jvmParam:"",incStartTime:"",partitionInfo:"",incrementType:0,incStartId:"",primaryKey:"",projectId:"",datasourceId:"",readerTable:""},resetTemp:function(){this.temp=this.$options.data().temp,this.jobJson="",this.glueSource="",this.timeOffset=0,this.timeFormatType="yyyy-MM-dd",this.partitionField=""},executorList:"",jobIdList:"",jobProjectList:"",dataSourceList:"",blockStrategies:[{value:"SERIAL_EXECUTION",label:"单机串行"},{value:"DISCARD_LATER",label:"丢弃后续调度"},{value:"COVER_EARLY",label:"覆盖之前调度"}],routeStrategies:[{value:"FIRST",label:"第一个"},{value:"LAST",label:"最后一个"},{value:"ROUND",label:"轮询"},{value:"RANDOM",label:"随机"},{value:"CONSISTENT_HASH",label:"一致性HASH"},{value:"LEAST_FREQUENTLY_USED",label:"最不经常使用"},{value:"LEAST_RECENTLY_USED",label:"最近最久未使用"},{value:"FAILOVER",label:"故障转移"},{value:"BUSYOVER",label:"忙碌转移"}],glueTypes:[{value:"BEAN",label:"DataX任务"},{value:"GLUE_SHELL",label:"Shell任务"},{value:"GLUE_PYTHON",label:"Python任务"},{value:"GLUE_POWERSHELL",label:"PowerShell任务"}],incrementTypes:[{value:0,label:"无"},{value:1,label:"主键自增"},{value:2,label:"时间自增"},{value:3,label:"HIVE分区"}],triggerNextTimes:"",registerNode:[],jobJson:"",glueSource:"",timeOffset:0,timeFormatType:"yyyy-MM-dd",partitionField:"",timeFormatTypes:[{value:"yyyy-MM-dd",label:"yyyy-MM-dd"},{value:"yyyyMMdd",label:"yyyyMMdd"},{value:"yyyy/MM/dd",label:"yyyy/MM/dd"}],replaceFormatTypes:[{value:"yyyy/MM/dd",label:"yyyy/MM/dd"},{value:"yyyy-MM-dd",label:"yyyy-MM-dd"},{value:"HH:mm:ss",label:"HH:mm:ss"},{value:"yyyy/MM/dd HH:mm:ss",label:"yyyy/MM/dd HH:mm:ss"},{value:"yyyy-MM-dd HH:mm:ss",label:"yyyy-MM-dd HH:mm:ss"},{value:"Timestamp",label:"时间戳"}],statusList:[{value:500,label:"失败"},{value:502,label:"失败(超时)"},{value:200,label:"成功"},{value:0,label:"无"}]}},created:function(){this.fetchData(),this.getExecutor(),this.getJobIdList(),this.getJobProject(),this.getDataSourceList()},methods:{handleClose:function(e){this.$confirm("确认关闭?").then((function(t){e()})).catch((function(e){}))},getExecutor:function(){var e=this;i["c"]().then((function(t){var a=t.content;e.executorList=a}))},getJobIdList:function(){var e=this;i["d"]().then((function(t){var a=t.content;e.jobIdList=a}))},getJobProject:function(){var e=this;J["c"]().then((function(t){e.jobProjectList=t}))},getDataSourceList:function(){var e=this;F["d"]().then((function(t){e.dataSourceList=t}))},fetchData:function(){var e=this;this.listLoading=!0,this.projectIds&&(this.listQuery.projectIds=this.projectIds.toString()),i["e"](this.listQuery).then((function(t){var a=t.content;e.total=a.recordsTotal,e.list=a.data,e.listLoading=!1}))},incStartTimeFormat:function(e){},handleCreate:function(){var e=this;this.resetTemp(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;"BEAN"!==this.temp.glueType||Object(V["c"])(this.jobJson)?this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var a=[];for(var r in e.temp.childJobId)a.push(e.temp.childJobId[r].id);e.temp.childJobId=a.toString()}e.temp.jobJson=e.jobJson,e.temp.glueSource=e.glueSource,e.temp.executorHandler="BEAN"===e.temp.glueType?"executorJobHandler":"",e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),i["b"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Created Successfully",type:"success",duration:2e3})}))}})):this.$notify({title:"Fail",message:"json格式错误",type:"error",duration:2e3})},handlerUpdate:function(e){var t=this;this.resetTemp(),this.temp=Object.assign({},e),this.temp.jobJson&&(this.jobJson=JSON.parse(this.temp.jobJson)),this.glueSource=this.temp.glueSource;var a=[],r=[];if(this.jobIdList){for(var l in this.jobIdList)this.jobIdList[l].id!==this.temp.id&&r.push(this.jobIdList[l]);this.JobIdList=r}if(this.temp.childJobId){var o=this.temp.childJobId.split(",");for(var i in o)for(var n in this.jobIdList)this.jobIdList[n].id===parseInt(o[i])&&a.push(this.jobIdList[n]);this.temp.childJobId=a}if(this.temp.partitionInfo){var s=this.temp.partitionInfo.split(",");this.partitionField=s[0],this.timeOffset=s[1],this.timeFormatType=s[2]}this.dialogStatus="update",this.dialogFormVisible=!0,this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},updateData:function(){var e=this;this.temp.jobJson="string"!==typeof this.jobJson?JSON.stringify(this.jobJson):this.jobJson,"BEAN"!==this.temp.glueType||Object(V["c"])(this.temp.jobJson)?this.$refs["dataForm"].validate((function(t){if(t){if(e.temp.childJobId){var a=[];for(var r in e.temp.childJobId)a.push(e.temp.childJobId[r].id);e.temp.childJobId=a.toString()}e.temp.executorHandler="BEAN"===e.temp.glueType?"executorJobHandler":"",e.temp.glueSource=e.glueSource,e.partitionField&&(e.temp.partitionInfo=e.partitionField+","+e.timeOffset+","+e.timeFormatType),i["k"](e.temp).then((function(){e.fetchData(),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"Update Successfully",type:"success",duration:2e3})}))}})):this.$notify({title:"Fail",message:"json格式错误",type:"error",duration:2e3})},handlerDelete:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){i["g"](e.id).then((function(e){t.fetchData(),t.$notify({title:"Success",message:"Delete Successfully",type:"success",duration:2e3})}))}))},handlerExecute:function(e){var t=this;this.$confirm("确定执行吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={};a.jobId=e.id,a.executorParam=e.executorParam,i["j"](a).then((function(e){t.$notify({title:"Success",message:"Execute Successfully",type:"success",duration:2e3})}))}))},handlerViewLog:function(e){this.$router.push({path:"/datax/log/jobLog",query:{jobId:e.id}})},handlerStart:function(e){var t=this;i["h"](e.id).then((function(e){t.$notify({title:"Success",message:"Start Successfully",type:"success",duration:2e3})}))},handlerStop:function(e){var t=this;i["i"](e.id).then((function(e){t.$notify({title:"Success",message:"Start Successfully",type:"success",duration:2e3})}))},changeSwitch:function(e){1===e.triggerStatus?this.handlerStart(e):this.handlerStop(e)},nextTriggerTime:function(e){var t=this;i["f"](e.jobCron).then((function(e){var a=e.content;t.triggerNextTimes=a.join("
")}))},loadById:function(e){var t=this;o["e"](e.jobGroup).then((function(e){t.registerNode=[];var a=e.content;t.registerNode.push(a)}))}}},P=D,M=(a("fe6f"),Object(v["a"])(P,r,l,!1,null,null,null));t["default"]=M.exports},"93bc":function(e,t,a){"use strict";var r=a("c42f"),l=a.n(r);l.a},b8b0:function(e,t,a){"use strict";var r=a("f84c"),l=a.n(r);l.a},c319:function(e,t,a){},c42f:function(e,t,a){},f84c:function(e,t,a){},fa7e:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"json-editor"},[a("textarea",{ref:"textarea"})])},l=[],o=a("56b3"),i=a.n(o);a("0dd0"),a("a7be"),a("acdf"),a("f9d4"),a("8822"),a("d2de");a("ae67");var n={name:"JsonEditor",props:["value"],data:function(){return{jsonEditor:!1}},watch:{value:function(e){var t=this.jsonEditor.getValue();e!==t&&this.jsonEditor.setValue(JSON.stringify(this.value,null,2))}},mounted:function(){var e=this;this.jsonEditor=i.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"application/json",gutters:["CodeMirror-lint-markers"],theme:"rubyblue",lint:!0}),this.jsonEditor.setValue(JSON.stringify(this.value,null,2)),this.jsonEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())}))},methods:{getValue:function(){return this.jsonEditor.getValue()}}},s=n,u=(a("b8b0"),a("2877")),c=Object(u["a"])(s,r,l,!1,null,"fad11014",null);t["a"]=c.exports},fe6f:function(e,t,a){"use strict";var r=a("c319"),l=a.n(r);l.a}}]); \ No newline at end of file diff --git a/datax-admin/src/test/java/com/wugui/executor/ExecutorBizTest.java b/datax-admin/src/test/java/com/wugui/executor/ExecutorBizTest.java index af6c8351..2eb3f4e7 100644 --- a/datax-admin/src/test/java/com/wugui/executor/ExecutorBizTest.java +++ b/datax-admin/src/test/java/com/wugui/executor/ExecutorBizTest.java @@ -41,7 +41,7 @@ public class ExecutorBizTest { triggerParam.setExecutorHandler(jobHandler); triggerParam.setExecutorParams(params); triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name()); - triggerParam.setGlueType(GlueTypeEnum.BEAN.name()); + triggerParam.setGlueType(GlueTypeEnum.DATAX.name()); triggerParam.setGlueSource(null); triggerParam.setGlueUpdatetime(System.currentTimeMillis()); triggerParam.setLogId(1); diff --git a/datax-core/src/main/java/com/wugui/datatx/core/biz/impl/ExecutorBizImpl.java b/datax-core/src/main/java/com/wugui/datatx/core/biz/impl/ExecutorBizImpl.java index b5acdea3..4efd74fb 100644 --- a/datax-core/src/main/java/com/wugui/datatx/core/biz/impl/ExecutorBizImpl.java +++ b/datax-core/src/main/java/com/wugui/datatx/core/biz/impl/ExecutorBizImpl.java @@ -72,7 +72,7 @@ public class ExecutorBizImpl implements ExecutorBiz { // valid:jobHandler + jobThread GlueTypeEnum glueTypeEnum = GlueTypeEnum.match(triggerParam.getGlueType()); - if (GlueTypeEnum.BEAN == glueTypeEnum) { + if (GlueTypeEnum.DATAX == glueTypeEnum || GlueTypeEnum.JAVA_BEAN == glueTypeEnum) { // new jobhandler IJobHandler newJobHandler = JobExecutor.loadJobHandler(triggerParam.getExecutorHandler()); diff --git a/datax-core/src/main/java/com/wugui/datatx/core/glue/GlueTypeEnum.java b/datax-core/src/main/java/com/wugui/datatx/core/glue/GlueTypeEnum.java index f3139dc5..5e28cd1c 100644 --- a/datax-core/src/main/java/com/wugui/datatx/core/glue/GlueTypeEnum.java +++ b/datax-core/src/main/java/com/wugui/datatx/core/glue/GlueTypeEnum.java @@ -5,7 +5,8 @@ package com.wugui.datatx.core.glue; */ public enum GlueTypeEnum { - BEAN("BEAN", false, null, null), + JAVA_BEAN("JAVA_BEAN", false, null, null), + DATAX("DATAX", false, null, null), GLUE_GROOVY("GLUE(Java)", false, null, null), GLUE_SHELL("GLUE(Shell)", true, "bash", ".sh"), GLUE_PYTHON("GLUE(Python)", true, "python", ".py"), diff --git a/datax-core/src/test/java/com/wugui/datax/impl/ExecutorBizImplTest.java b/datax-core/src/test/java/com/wugui/datax/impl/ExecutorBizImplTest.java index 31af8bd5..90998921 100644 --- a/datax-core/src/test/java/com/wugui/datax/impl/ExecutorBizImplTest.java +++ b/datax-core/src/test/java/com/wugui/datax/impl/ExecutorBizImplTest.java @@ -129,7 +129,7 @@ public class ExecutorBizImplTest { triggerParam.setExecutorHandler("demoJobHandler"); triggerParam.setExecutorParams(null); triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name()); - triggerParam.setGlueType(GlueTypeEnum.BEAN.name()); + triggerParam.setGlueType(GlueTypeEnum.DATAX.name()); triggerParam.setGlueSource(null); triggerParam.setGlueUpdatetime(System.currentTimeMillis()); triggerParam.setLogId(1);