1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[25],{"/59z":function(B,b,i){"use strict";i.d(b,"a",function(){return E}),i.d(b,"b",function(){return v});var f=i("miYZ"),q=i("tsqr"),o=i("kZX9"),m=i("HOj0");function E(c){var j=Object(o.c)("api/sysConfig/getAll");j.then(function(l){l.datas&&c&&c({type:"Settings/saveSettings",payload:l.datas})})}function v(c,j){var l=Object(o.m)("api/sysConfig/updateSysConfigByJson",c);l.then(function(T){q.default.success(Object(m.a)("app.request.update.setting.success")),j&&j({type:"Settings/saveSettings",payload:c})})}},VQRM:function(B,b,i){"use strict";i.r(b);var f=i("q1tI"),q=i("Mwp2"),o=i("VXEj"),m=i("k1fw"),E=i("BoS7"),v=i("Sdc0"),c=i("CiB2"),j=i("5NDa"),l=i("5rEg"),T=i("y8nQ"),k=i("Vl3Y"),J=i("tJVT"),y=i("9kvl"),p=i("/59z"),e=i("HOj0"),a=i("nKUr"),K=function(s){var O=s.sqlSubmitJarPath,P=s.sqlSubmitJarParas,x=s.sqlSubmitJarMainAppClass,X=s.useRestAPI,I=s.sqlSeparator,M=s.jobIdWait,V=s.dispatch,Y=Object(f.useState)(""),D=Object(J.a)(Y,2),r=D[0],A=D[1],Z=Object(f.useState)(s),R=Object(J.a)(Z,2),F=R[0],W=R[1],$=k.a.useForm(),G=Object(J.a)($,1),L=G[0];Object(f.useEffect)(function(){L.setFieldsValue(s)},[s]);var w=function(){return[{title:Object(e.a)("pages.settings.FlinkURL"),description:r!="sqlSubmitJarPath"?O||Object(e.a)("pages.settings.FlinkNoSetting"):Object(a.jsx)(l.a,{id:"sqlSubmitJarPath",defaultValue:O,onChange:S,placeholder:"hdfs:///dlink/jar/dlink-app.jar"}),actions:r!="sqlSubmitJarPath"?[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),C("sqlSubmitJarPath")},children:Object(e.a)("button.edit")})]:[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),g("sqlSubmitJarPath")},children:Object(e.a)("button.save")}),Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),h()},children:Object(e.a)("button.cancel")})]},{title:Object(e.a)("pages.settings.FlinkSQLJarMainParameter"),description:r!="sqlSubmitJarParas"?P||Object(e.a)("pages.settings.FlinkNoSetting"):Object(a.jsx)(l.a,{id:"sqlSubmitJarParas",defaultValue:P,onChange:S,placeholder:""}),actions:r!="sqlSubmitJarParas"?[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),C("sqlSubmitJarParas")},children:Object(e.a)("button.edit")})]:[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),g("sqlSubmitJarParas")},children:Object(e.a)("button.save")}),Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),h()},children:Object(e.a)("button.cancel")})]},{title:Object(e.a)("pages.settings.FlinkSQLJarMainClass"),description:r!="sqlSubmitJarMainAppClass"?x||Object(e.a)("pages.settings.FlinkNoSetting"):Object(a.jsx)(l.a,{id:"sqlSubmitJarMainAppClass",defaultValue:x,onChange:S,placeholder:"com.dlink.app.MainApp"}),actions:r!="sqlSubmitJarMainAppClass"?[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),C("sqlSubmitJarMainAppClass")},children:Object(e.a)("button.edit")})]:[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),g("sqlSubmitJarMainAppClass")},children:Object(e.a)("button.save")}),Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),h()},children:Object(e.a)("button.cancel")})]},{title:Object(e.a)("pages.settings.FlinkRestAPI"),description:Object(e.a)("pages.settings.FlinkNoUseSetting"),actions:[Object(a.jsx)(k.a.Item,{name:"useRestAPI",valuePropName:"checked",children:Object(a.jsx)(v.a,{checkedChildren:Object(e.a)("button.enable"),unCheckedChildren:Object(e.a)("button.disable"),checked:X})})]},{title:Object(e.a)("pages.settings.FlinkURLSplit"),description:r!="sqlSeparator"?I||Object(e.a)("pages.settings.FlinkNoSetting"):Object(a.jsx)(l.a,{id:"sqlSeparator",defaultValue:I,onChange:S,placeholder:";"}),actions:r!="sqlSeparator"?[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),C("sqlSeparator")},children:Object(e.a)("button.edit")})]:[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),g("sqlSeparator")},children:Object(e.a)("button.save")}),Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),h()},children:Object(e.a)("button.cancel")})]},{title:Object(e.a)("pages.settings.FlinkJobID"),description:r!="jobIdWait"?M||"30":Object(a.jsx)(l.a,{id:"jobIdWait",defaultValue:M,onChange:S,placeholder:"30"}),actions:r!="jobIdWait"?[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),C("jobIdWait")},children:Object(e.a)("button.edit")})]:[Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),g("jobIdWait")},children:Object(e.a)("button.save")}),Object(a.jsx)("a",{onClick:function(t){return Object(c.a)(t),h()},children:Object(e.a)("button.cancel")})]}]},S=function(n){var t={};t[n.target.id]=n.target.value,W(Object(m.a)(Object(m.a)({},F),t))},_=function(n,t){var N={};for(var U in n)N[U]=t[U];Object(p.b)(N,V)},C=function(n){A(n)},g=function(n){if(F[n]!=s[n]){var t={};t[n]=F[n],Object(p.b)(t,V)}A("")},h=function(){W(s),A("")},tt=w();return Object(a.jsx)(a.Fragment,{children:Object(a.jsx)(k.a,{form:L,layout:"vertical",onValuesChange:_,children:Object(a.jsx)(o.b,{itemLayout:"horizontal",dataSource:tt,renderItem:function(n){return Object(a.jsx)(o.b.Item,{actions:n.actions,children:Object(a.jsx)(o.b.Item.Meta,{title:n.title,description:n.description})})}})})})},Q=Object(y.c)(function(d){var s=d.Settings;return{sqlSubmitJarPath:s.sqlSubmitJarPath,sqlSubmitJarParas:s.sqlSubmitJarParas,sqlSubmitJarMainAppClass:s.sqlSubmitJarMainAppClass,useRestAPI:s.useRestAPI,sqlSeparator:s.sqlSeparator,jobIdWait:s.jobIdWait}})(K),z=i("tMyG"),H=function(s){var O=s.dispatch;return Object(p.a)(O),Object(a.jsx)(z.a,{title:!1,children:Object(a.jsx)(Q,{})})},at=b.default=Object(y.c)(function(d){var s=d.Settings;return{sqlSubmitJarPath:s.sqlSubmitJarPath,sqlSubmitJarParas:s.sqlSubmitJarParas,sqlSubmitJarMainAppClass:s.sqlSubmitJarMainAppClass}})(H)}}]);
|