gtsoft-snail-job-server/easy-retry-server/easy-retry-server-starter/src/main/resources/admin/js/chunk-6dd56a72.18c86c53.js
byteblogs168 0dc769fd1b fix:2.5.0
1. 修复编辑组配置NPE
2023-12-02 20:18:52 +08:00

1 line
17 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6dd56a72"],{"0242c":function(e,t,r){"use strict";var a=function(){var e=this,t=e._self._c;return t("div",[t("a-modal",{attrs:{visible:e.visible,title:"Cron表达式",width:"650px"},on:{ok:e.handleOk,cancel:e.handlerCancel}},[t("cron-input",{attrs:{item:e.cronItem},on:{change:e.showFive},model:{value:e.cron,callback:function(t){e.cron=t},expression:"cron"}}),t("a-input",{attrs:{placeholder:"请输入cron表达式"},model:{value:e.cron,callback:function(t){e.cron=t},expression:"cron"}}),t("div",{staticStyle:{margin:"20px 0","border-left":"#f5222d 5px solid","font-size":"medium","font-weight":"bold"}},[e._v("    近5次的运行时间: ")]),e._l(e.list,(function(r,a){return t("div",{key:r,staticStyle:{"margin-top":"10px"}},[e._v(" 第"+e._s(a+1)+"次: "+e._s(r))])}))],2)],1)},n=[],o=r("3b7a"),i={name:"CronModal",data:function(){return{visible:!1,cronItem:["second","minute","hour","day","month","week","year"],cron:"",list:[]}},methods:{handleOk:function(){this.visible=!1,this.$emit("getCron",this.cron)},handlerCancel:function(){this.visible=!1},isShow:function(e){this.cron=e,this.visible=!0},showFive:function(e){var t=this;this.cron=e,Object(o["k"])({cron:e}).then((function(e){t.list=e.data}))}}},s=i,c=(r("ae4b"),r("2877")),u=Object(c["a"])(s,a,n,!1,null,null,null);t["a"]=u.exports},"12b3":function(e,t){var r={sceneStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},backOffLabels:{1:{name:"延迟等级",color:"#d06892"},2:{name:"固定时间",color:"#f5a22d"},3:{name:"CRON表达式",color:"#e1f52d"},4:{name:"随机等待",color:"#a127f3"}},triggerInterval:{1:{name:"CRON表达式",color:"#d06892"},2:{name:"固定时间",color:"#f5a22d"}},notifyScene:{1:{name:"重试数量超过阈值",color:"#d06892"},2:{name:"重试失败数量超过阈值",color:"#f5a22d"},3:{name:"客户端上报失败",color:"#e1f52d"},4:{name:"客户端组件异常",color:"#a127f3"}},routeKey:{4:{name:"轮询",color:"#8f68d2"},1:{name:"一致性Hash",color:"#d06892"},2:{name:"随机",color:"#f5a22d"},3:{name:"LRU",color:"#e1f52d"}},notifyType:{1:{name:"钉钉通知",color:"#64a6ea"},2:{name:"邮箱通知",color:"#1b7ee5"},4:{name:"飞书",color:"#087da1"}},notifyStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},idGenMode:{1:{name:"号段模式",color:"#1b7ee5"},2:{name:"雪花算法",color:"#087da1"}},groupStatus:{0:{name:"停用",color:"#9c1f1f"},1:{name:"启用",color:"#f5a22d"}},initScene:{0:{name:"否",color:"#9c1f1f"},1:{name:"是",color:"#f5a22d"}}};e.exports=r},"3b7a":function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"j",(function(){return i})),r.d(t,"g",(function(){return s})),r.d(t,"k",(function(){return c})),r.d(t,"a",(function(){return u})),r.d(t,"n",(function(){return l})),r.d(t,"f",(function(){return m})),r.d(t,"h",(function(){return f})),r.d(t,"e",(function(){return d})),r.d(t,"d",(function(){return b})),r.d(t,"c",(function(){return h})),r.d(t,"b",(function(){return g})),r.d(t,"i",(function(){return p})),r.d(t,"m",(function(){return v}));var a=r("b775"),n={jobList:"/job/list",jobDetail:"/job/",saveJob:"/job/",updateJob:"/job/",updateJobStatus:"/job/status",delJob:"/job/",timeByCron:"/job/cron",jobNameList:"/job/job-name/list",triggerJob:"/job/trigger/",jobBatchList:"/job/batch/list",jobBatchDetail:"/job/batch/",stop:"/job/batch/stop/",jobTaskList:"/job/task/list",jobLogList:"/job/log/list"};function o(e){return Object(a["b"])({url:n.triggerJob+e,method:"post"})}function i(e){return Object(a["b"])({url:n.stop+e,method:"post"})}function s(e){return Object(a["b"])({url:n.jobNameList,method:"get",params:e})}function c(e){return Object(a["b"])({url:n.timeByCron,method:"get",params:e})}function u(e){return Object(a["b"])({url:n.delJob+e,method:"delete"})}function l(e){return Object(a["b"])({url:n.updateJobStatus,method:"put",data:e})}function m(e){return Object(a["b"])({url:n.jobLogList,method:"get",params:e})}function f(e){return Object(a["b"])({url:n.jobTaskList,method:"get",params:e})}function d(e){return Object(a["b"])({url:n.jobBatchList,method:"get",params:e})}function b(e){return Object(a["b"])({url:n.jobBatchDetail+e,method:"get"})}function h(e){return Object(a["b"])({url:n.jobList,method:"get",params:e})}function g(e){return Object(a["b"])({url:n.jobDetail+e,method:"get"})}function p(e){return Object(a["b"])({url:n.saveJob,method:"post",data:e})}function v(e){return Object(a["b"])({url:n.updateJob,method:"put",data:e})}},"5d3b":function(e,t,r){},"88bc":function(e,t,r){(function(t){var r=1/0,a=9007199254740991,n="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",s="[object Symbol]",c="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")();function m(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function f(e,t){var r=-1,a=e?e.length:0,n=Array(a);while(++r<a)n[r]=t(e[r],r,e);return n}function d(e,t){var r=-1,a=t.length,n=e.length;while(++r<a)e[n+r]=t[r];return e}var b=Object.prototype,h=b.hasOwnProperty,g=b.toString,p=l.Symbol,v=b.propertyIsEnumerable,y=p?p.isConcatSpreadable:void 0,j=Math.max;function w(e,t,r,a,n){var o=-1,i=e.length;r||(r=S),n||(n=[]);while(++o<i){var s=e[o];t>0&&r(s)?t>1?w(s,t-1,r,a,n):d(n,s):a||(n[n.length]=s)}return n}function O(e,t){return e=Object(e),x(e,t,(function(t,r){return r in e}))}function x(e,t,r){var a=-1,n=t.length,o={};while(++a<n){var i=t[a],s=e[i];r(s,i)&&(o[i]=s)}return o}function k(e,t){return t=j(void 0===t?e.length-1:t,0),function(){var r=arguments,a=-1,n=j(r.length-t,0),o=Array(n);while(++a<n)o[a]=r[t+a];a=-1;var i=Array(t+1);while(++a<t)i[a]=r[a];return i[t]=o,m(e,this,i)}}function S(e){return q(e)||N(e)||!!(y&&e&&e[y])}function C(e){if("string"==typeof e||T(e))return e;var t=e+"";return"0"==t&&1/e==-r?"-0":t}function N(e){return L(e)&&h.call(e,"callee")&&(!v.call(e,"callee")||g.call(e)==n)}var q=Array.isArray;function _(e){return null!=e&&F(e.length)&&!V(e)}function L(e){return J(e)&&_(e)}function V(e){var t=I(e)?g.call(e):"";return t==o||t==i}function F(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function I(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function J(e){return!!e&&"object"==typeof e}function T(e){return"symbol"==typeof e||J(e)&&g.call(e)==s}var R=k((function(e,t){return null==e?{}:O(e,f(w(t,1),C))}));e.exports=R}).call(this,r("c8ba"))},ae4b:function(e,t,r){"use strict";r("5d3b")},e941:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return s})),r.d(t,"b",(function(){return c})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return l}));var a=r("b775"),n=(r("0fea"),{scenePageList:"/scene-config/page/list",sceneList:"/scene-config/list",sceneDetail:"/scene-config/",saveScene:"/scene-config",updateScene:"/scene-config",notifyConfigList:"/notify-config/list",notifyConfigDetail:"/notify-config/",saveNotify:"/notify-config/",updateNotify:"/notify-config/"});function o(e){return Object(a["b"])({url:n.notifyConfigDetail+e,method:"get"})}function i(e){return Object(a["b"])({url:n.saveNotify,method:"post",data:e})}function s(e){return Object(a["b"])({url:n.updateNotify,method:"put",data:e})}function c(e){return Object(a["b"])({url:n.sceneDetail+e,method:"get"})}function u(e){return Object(a["b"])({url:n.saveScene,method:"post",data:e})}function l(e){return Object(a["b"])({url:n.updateScene,method:"put",data:e})}},f595:function(e,t,r){"use strict";r.r(t);r("b0c0");var a=function(){var e=this,t=e._self._c;return t("div",[t("page-header-wrapper",{staticStyle:{margin:"-24px -1px 0"},attrs:{content:"场景配置"},on:{back:function(){return e.$router.go(-1)}}},[t("div")]),t("a-card",{attrs:{"body-style":{padding:"24px 32px"},bordered:!1,loading:e.loading}},[t("a-form",{staticClass:"form-row",staticStyle:{width:"40%",margin:"auto"},attrs:{form:e.form,layout:"vertical"},on:{submit:e.handleSubmit}},[t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:24,md:24,sm:24}},[t("a-form-item",[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["id"],expression:"['id']"}],attrs:{hidden:""}})],1),t("a-form-item",{attrs:{label:"场景名称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["sceneName",{rules:[{required:!0,message:"请输入场景名称",whitespace:!0},{required:!0,max:64,message:"最多支持64个字符"}]}],expression:"[\n 'sceneName',\n {rules: [{ required: true, message: '请输入场景名称', whitespace: true},{required: true, max: 64, message: '最多支持64个字符'}]}\n ]"}],attrs:{placeholder:"请输入场景名称",maxLength:64}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:18,md:18,sm:24}},[t("a-form-item",{attrs:{label:"组"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["groupName",{rules:[{required:!0,message:"请选择组"}]}],expression:"['groupName', { rules: [{ required: true, message: '请选择组' }] }]"}],attrs:{placeholder:"请选择组"}},e._l(e.groupNameList,(function(r){return t("a-select-option",{key:r,attrs:{value:r}},[e._v(e._s(r))])})),1)],1)],1),t("a-col",{attrs:{lg:6,md:12,sm:24}},[t("a-form-item",{attrs:{label:"状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["sceneStatus",{initialValue:"1",rules:[{required:!0,message:"请选择状态"}]}],expression:"[\n 'sceneStatus',\n {\n initialValue: '1',\n rules: [{ required: true, message: '请选择状态'}]\n }\n ]"}],attrs:{placeholder:"请选择状态"}},e._l(e.sceneStatus,(function(r,a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(r.name))])})),1)],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8,md:12,sm:12}},[t("a-form-item",{attrs:{label:"退避策略"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["backOff",{initialValue:"2",rules:[{required:!0,message:"请选择退避策略"}]}],expression:"[\n 'backOff',\n {\n initialValue: '2',\n rules: [{ required: true, message: '请选择退避策略'}]\n }\n ]"}],attrs:{placeholder:"请选择退避策略"},on:{change:e.handleChange}},e._l(e.backOffLabels,(function(r,a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(r.name))])})),1)],1)],1),t("a-col",{attrs:{lg:16,md:12,sm:12}},[t("a-form-item",{attrs:{label:"间隔时长"}},["1"===e.backOff?t("a-input",{attrs:{placeholder:"10s,15s,30s,35s,40s,50s,1m,2m,4m,6m,8m,10m,20m,40m,1h,2h,3h,4h,5h,6h,7h,8h,9h,10h,11h,12h",disabled:""}},[t("a-tooltip",{attrs:{slot:"suffix",title:"10s,15s,30s,35s,40s,50s,1m,2m,4m,6m,8m,10m,20m,40m,1h,2h,3h,4h,5h,6h,7h,8h,9h,10h,11h,12h"},slot:"suffix"},[t("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.45)"},attrs:{type:"info-circle"}})],1)],1):e._e(),"2"===e.backOff||"4"===e.backOff?t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["triggerInterval",{initialValue:"60",rules:[{required:!0,message:"请输入间隔时长"}]}],expression:"[\n 'triggerInterval',\n {initialValue: '60',\n rules: [ { required: true, message: '请输入间隔时长'}]}\n ]"}],staticStyle:{width:"-webkit-fill-available"},attrs:{placeholder:"请输入间隔时长(秒)",min:10}}):e._e(),"3"===e.backOff?t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["triggerInterval",{rules:[{required:!0,message:"请输入间隔时长",whitespace:!0}]}],expression:"[\n 'triggerInterval',\n {rules: [{ required: true, message: '请输入间隔时长', whitespace: true}]}\n ]"}],attrs:{placeholder:"请输入间隔时长"},on:{click:e.handlerCron}}):e._e()],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8,md:12,sm:24}},[t("a-form-item",{attrs:{label:"路由策略"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["routeKey",{initialValue:"4",rules:[{required:!0,message:"请选择路由策略"}]}],expression:"[\n 'routeKey',\n {\n initialValue: '4',\n rules: [{ required: true, message: '请选择路由策略'}]\n }\n ]"}],attrs:{placeholder:"请选择路由策略"}},e._l(e.routeKey,(function(r,a){return t("a-select-option",{key:a,attrs:{value:a}},[e._v(e._s(r.name))])})),1)],1)],1),t("a-col",{attrs:{lg:8,md:24,sm:24}},[t("a-form-item",{attrs:{label:"超时时间(秒)"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["executorTimeout",{initialValue:"60",rules:[{required:!0,message:"请输入超时时间"}]}],expression:"[\n 'executorTimeout',\n {\n initialValue: '60',\n rules: [{ required: true, message: '请输入超时时间'}]\n }\n ]"}],staticStyle:{width:"-webkit-fill-available"},attrs:{id:"inputNumber",min:1,max:36e3}})],1)],1),t("a-col",{attrs:{lg:8,md:24,sm:24}},[t("a-form-item",{attrs:{label:"最大重试次数"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["maxRetryCount",{initialValue:"16",rules:[{required:!0,message:"请输入最大重试次数"}]}],expression:"[\n 'maxRetryCount',\n {\n initialValue: '16',\n rules: [{ required: true, message: '请输入最大重试次数'}]\n }\n ]"}],staticStyle:{width:"-webkit-fill-available"},attrs:{min:1,max:"1"===this.backOff?26:9999999}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:8,md:24,sm:24}},[t("a-form-item",{attrs:{label:"调用链超时时间(毫秒)"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["deadlineRequest",{initialValue:"60000",rules:[{required:!0,message:"请输入调用链超时时间(毫秒)"}]}],expression:"[\n 'deadlineRequest',\n {\n initialValue: '60000',\n rules: [{ required: true, message: '请输入调用链超时时间(毫秒)'}]\n }\n ]"}],staticStyle:{width:"-webkit-fill-available"},attrs:{min:100,max:6e4}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:16}}),t("a-row",{staticClass:"form-row",attrs:{gutter:16}},[t("a-col",{attrs:{lg:24,md:24,sm:24}},[t("a-form-item",{attrs:{label:"描述"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["description",{rules:[{required:!1,max:256,message:"最多支持256个字符"}]}],expression:"[\n 'description',\n {rules: [{required: false, max: 256, message: '最多支持256个字符'}]}\n ]"}],attrs:{placeholder:"请输入描述",type:"textarea"}})],1)],1)],1),t("a-form-item",{staticStyle:{"text-align":"center"},attrs:{wrapperCol:{span:24}}},[t("a-button",{attrs:{htmlType:"submit",type:"primary"}},[e._v("提交")]),t("a-button",{staticStyle:{"margin-left":"8px"}},[e._v("重置")])],1)],1)],1),t("cron-modal",{ref:"cronModalRef",on:{getCron:e.getCron}})],1)},n=[],o=(r("d3b7"),r("25f0"),r("0fea")),i=r("e941"),s=r("88bc"),c=r.n(s),u=r("0242c"),l=r("12b3"),m={name:"SceneFrom",components:{CronModal:u["a"]},props:{},comments:{CronModal:u["a"]},data:function(){return{form:this.$form.createForm(this),formType:"create",groupNameList:[],routeKey:l.routeKey,backOffLabels:l.backOffLabels,sceneStatus:l.sceneStatus,loading:!1,visible:!1,count:0,backOff:"2"}},beforeCreate:function(){this.dynamicForm=this.$form.createForm(this,{name:"dynamic_form_item"}),this.dynamicForm.getFieldDecorator("keys",{initialValue:[],preserve:!0})},mounted:function(){var e=this;Object(o["j"])().then((function(t){e.groupNameList=t.data})),this.$nextTick((function(){var t=e.$route.query.id;t&&(e.loading=!0,Object(i["b"])(t).then((function(t){e.loadEditInfo(t.data),e.loading=!1})))}))},methods:{handleChange:function(e){this.backOff=e,this.form.setFieldsValue({triggerInterval:null})},handlerCron:function(){var e=this.form.getFieldValue("backOff");if("3"===e){var t=this.form.getFieldValue("triggerInterval");null!==t&&""!==t||(t="* * * * * ?"),this.$refs.cronModalRef.isShow(t)}},getCron:function(e){this.form.setFieldsValue({triggerInterval:e})},handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e,r){e||("create"===t.formType?Object(i["d"])(r).then((function(e){t.$message.success("场景新增完成"),t.form.resetFields(),t.$router.go(-1)})):Object(i["f"])(r).then((function(e){t.$message.success("场景更新完成"),t.form.resetFields(),t.$router.go(-1)})))}))},loadEditInfo:function(e){var t=this;this.formType="edit";var r=this.form;new Promise((function(e){setTimeout(e,100)})).then((function(){var a=c()(e,["id","sceneName","groupName","sceneStatus","deadlineRequest","maxRetryCount","description","backOff","triggerInterval","executorTimeout"]);a.sceneStatus=a.sceneStatus.toString(),a.backOff=a.backOff.toString(),t.backOff=a.backOff,r.setFieldsValue(a)}))}}},f=m,d=r("2877"),b=Object(d["a"])(f,a,n,!1,null,null,null);t["default"]=b.exports}}]);