Files
openmaxio-object-browser/portal-ui/build/static/js/808.aaa3f59e.chunk.js
2023-08-16 10:03:02 -07:00

2 lines
14 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[808],{75578:function(e,t,o){var n=o(1413),r=o(72791),a=o(80184);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(o){return(0,a.jsx)(r.Suspense,{fallback:t,children:(0,a.jsx)(e,(0,n.Z)({},o))})}}},50808:function(e,t,o){o.r(t),o.d(t,{default:function(){return j}});var n=o(29439),r=o(1413),a=o(72791),i=o(26181),l=o.n(i),s=o(11135),c=o(25787),u=o(29945),p=o(61757),d=o(23814),f=o(75578),g=o(56087),m=o(87995),h=o(57689),y=o(81551),b=o(47974),S=o(17691),v=o(80184),T=S.ZP.div((function(e){var t=e.theme;return{background:l()(t,"boxBackground","#fff"),border:"".concat(l()(t,"borderColor","#E5E5E5")," 1px solid"),borderRadius:5,height:80,display:"flex",alignItems:"center",justifyContent:"start",marginBottom:16,cursor:"pointer",padding:0,overflow:"hidden","& .logoButton":{height:"80px"},"& .imageContainer":{backgroundColor:l()(t,"bgColor","#fff"),display:"flex",alignItems:"center",justifyContent:"center",width:80,height:80,"& img":{maxWidth:46,maxHeight:46,filter:"drop-shadow(1px 1px 8px #fff)"}},"& .titleBox":{color:l()(t,"fontColor","#000"),fontSize:16,fontFamily:"Inter,sans-serif",paddingLeft:18}}})),_=function(e){var t=e.logoSrc,o=e.title;return(0,v.jsxs)(T,{children:[(0,v.jsx)(u.xuv,{className:"imageContainer",children:(0,v.jsx)("img",{src:t,className:"logoButton",alt:o})}),(0,v.jsx)(u.xuv,{className:"titleBox",children:(0,v.jsxs)("b",{children:[o," Event Destination"]})})]})},k=o(53669),x=o(99670),E=o(31776),A=o(82342),q=(0,f.Z)(a.lazy((function(){return Promise.all([o.e(5473),o.e(1715),o.e(7391),o.e(6158)]).then(o.bind(o,9059))}))),L=(0,f.Z)(a.lazy((function(){return o.e(4770).then(o.bind(o,94770))}))),C=(0,f.Z)(a.lazy((function(){return Promise.all([o.e(5473),o.e(1715),o.e(7391),o.e(8305)]).then(o.bind(o,56247))}))),j=(0,c.Z)((function(e){return(0,s.Z)((0,r.Z)((0,r.Z)({},d.oO),d.Je))}))((function(e){var t=e.saveAndRefresh,o=e.classes,r=(0,y.TL)(),i=(0,h.s0)(),s=(0,h.UO)(),c=(0,a.useState)([]),d=(0,n.Z)(c,2),f=d[0],S=d[1],T=(0,a.useState)(""),j=(0,n.Z)(T,2),w=j[0],N=j[1],Q=(0,a.useState)(!1),Z=(0,n.Z)(Q,2),D=Z[0],I=Z[1],P=s.service||"";(0,a.useEffect)((function(){if(D){var e={key_values:(0,p.DD)(f)};E.h.configs.setConfig("".concat(P,":").concat(w),e).then((function(){I(!1),r((0,m.cN)(!0)),r((0,k.iP)(!0)),i(g.gA.EVENT_DESTINATIONS)})).catch((function(e){I(!1),r((0,m.Ih)((0,A.g)(e.error)))}))}}),[D,P,f,t,r,i,w]);var M,K=(0,a.useCallback)((function(e){S(e)}),[S]);switch(P){case p.ee:M=(0,v.jsx)(C,{onChange:K});break;case p.dM:M=(0,v.jsx)(q,{onChange:K});break;default:var R=l()(p.oj,P,[]);M=(0,v.jsx)(L,{fields:R,onChange:K})}var B=p.BI.find((function(e){return e.actionTrigger===P}));return(0,a.useEffect)((function(){r((0,m.Sc)("add_notification_endpoint"))}),[]),(0,v.jsxs)(a.Fragment,{children:[(0,v.jsx)(b.Z,{label:(0,v.jsx)(a.Fragment,{children:(0,v.jsx)(u.hbI,{label:"Event Destinations",onClick:function(){return i(g.gA.EVENT_DESTINATIONS_ADD)}})}),actions:(0,v.jsx)(x.Z,{})}),(0,v.jsx)(u.Xgh,{children:(0,v.jsx)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),I(!0)},children:""!==P&&(0,v.jsxs)(a.Fragment,{children:[(0,v.jsx)(u.rjZ,{item:!0,xs:12,children:B&&(0,v.jsx)(_,{logoSrc:B.logo,title:B?B.targetTitle:""})}),(0,v.jsxs)(u.ltY,{children:[(0,v.jsx)(u.rjZ,{item:!0,xs:12,className:o.formFieldRow,sx:{marginBottom:"12px"},children:(0,v.jsx)(u.Wzg,{id:"identifier-field",name:"identifier-field",label:"Identifier",value:w,onChange:function(e){return N(e.target.value)},tooltip:"Unique descriptive string for this destination",placeholder:"Enter Destination Identifier",required:!0})}),(0,v.jsx)(u.rjZ,{item:!0,xs:12,children:M}),(0,v.jsx)(u.rjZ,{item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-end",marginTop:15},children:(0,v.jsx)(u.zxk,{id:"save-notification-target",type:"submit",variant:"callAction",disabled:D||""===w.trim(),label:"Save Event Destination"})})]})]})})})]})}))},61757:function(e,t,o){o.d(t,{BI:function(){return S},DD:function(){return T},L:function(){return x},dM:function(){return s},ee:function(){return l},fk:function(){return y},oj:function(){return _},z5:function(){return b}});var n,r=o(4942),a=o(43144),i=o(15671),l="notify_postgres",s="notify_mysql",c="notify_kafka",u="notify_amqp",p="notify_mqtt",d="notify_redis",f="notify_nats",g="notify_elasticsearch",m="notify_webhook",h="notify_nsq",y=function(e){return e.map((function(e){return{service_name:"".concat(e.service,":").concat(e.account_id),name:e.service,account_id:e.account_id,status:e.status}}))},b=(0,a.Z)((function e(){(0,i.Z)(this,e)}));b.DB="database",b.Queue="queue",b.Func="functions";var S=[{actionTrigger:l,targetTitle:"PostgreSQL",logo:"/postgres-logo.svg",category:b.DB},{actionTrigger:c,targetTitle:"Kafka",logo:"/kafka-logo.svg",category:b.Queue},{actionTrigger:u,targetTitle:"AMQP",logo:"/amqp-logo.svg",category:b.Queue},{actionTrigger:p,targetTitle:"MQTT",logo:"/mqtt-logo.svg",category:b.Queue},{actionTrigger:d,targetTitle:"Redis",logo:"/redis-logo.svg",category:b.Queue},{actionTrigger:f,targetTitle:"NATS",logo:"/nats-logo.svg",category:b.Queue},{actionTrigger:s,targetTitle:"Mysql",logo:"/mysql-logo.svg",category:b.DB},{actionTrigger:g,targetTitle:"Elastic Search",logo:"/elasticsearch-logo.svg",category:b.DB},{actionTrigger:m,targetTitle:"Webhook",logo:"/webhooks-logo.svg",category:b.Func},{actionTrigger:h,targetTitle:"NSQ",logo:"/nsq-logo.svg",category:b.Queue}],v=[{name:"queue_dir",label:"Queue Directory",required:!1,tooltip:"Staging directory for undelivered messages e.g. '/home/events'",type:"string",placeholder:"Enter Queue Directory"},{name:"queue_limit",label:"Queue Limit",required:!1,tooltip:"Maximum limit for undelivered messages, defaults to '10000'",type:"number",placeholder:"Enter Queue Limit"},{name:"comment",label:"Comment",required:!1,type:"comment",placeholder:"Enter custom notes if any"}],T=function(e){return e.filter((function(e){return""!==e.value}))},_=(n={},(0,r.Z)(n,c,[{name:"brokers",label:"Brokers",required:!0,tooltip:"Comma separated list of Kafka broker addresses",type:"string",placeholder:"Enter Brokers"},{name:"topic",label:"Topic",tooltip:"Kafka topic used for bucket notifications",type:"string",placeholder:"Enter Topic"},{name:"sasl_username",label:"SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Username"},{name:"sasl_password",label:"SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Password"},{name:"sasl_mechanism",label:"SASL Mechanism",tooltip:"SASL authentication mechanism, default 'PLAIN'",type:"string"},{name:"tls_client_auth",label:"TLS Client Auth",tooltip:"Client Auth determines the Kafka server's policy for TLS client authorization",type:"string",placeholder:"Enter TLS Client Auth"},{name:"sasl",label:"SASL",tooltip:"Set to 'on' to enable SASL authentication",type:"on|off"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS skip verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"client_tls_cert",label:"client TLS cert",tooltip:"Path to client certificate for mTLS authorization",type:"path",placeholder:"Enter TLS Client Cert"},{name:"client_tls_key",label:"client TLS key",tooltip:"Path to client key for mTLS authorization",type:"path",placeholder:"Enter TLS Client Key"},{name:"version",label:"Version",tooltip:"Specify the version of the Kafka cluster e.g '2.2.0'",type:"string",placeholder:"Enter Kafka Version"}].concat(v)),(0,r.Z)(n,u,[{name:"url",required:!0,label:"URL",tooltip:"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`",type:"url"},{name:"exchange",label:"Exchange",tooltip:"Name of the AMQP exchange",type:"string",placeholder:"Enter Exchange"},{name:"exchange_type",label:"Exchange Type",tooltip:"AMQP exchange type",type:"string",placeholder:"Enter Exchange Type"},{name:"routing_key",label:"Routing Key",tooltip:"Routing key for publishing",type:"string",placeholder:"Enter Routing Key"},{name:"mandatory",label:"Mandatory",tooltip:"Quietly ignore undelivered messages when set to 'off', default is 'on'",type:"on|off"},{name:"durable",label:"Durable",tooltip:"Persist queue across broker restarts when set to 'on', default is 'off'",type:"on|off"},{name:"no_wait",label:"No Wait",tooltip:"Non-blocking message delivery when set to 'on', default is 'off'",type:"on|off"},{name:"internal",label:"Internal",tooltip:"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges",type:"on|off"},{name:"auto_deleted",label:"Auto Deleted",tooltip:"Auto delete queue when set to 'on', when there are no consumers",type:"on|off"},{name:"delivery_mode",label:"Delivery Mode",tooltip:"Set to '1' for non-persistent or '2' for persistent queue",type:"number",placeholder:"Enter Delivery Mode"}].concat(v)),(0,r.Z)(n,d,[{name:"address",required:!0,label:"Address",tooltip:"Redis server's address e.g. `localhost:6379`",type:"address",placeholder:"Enter Address"},{name:"key",required:!0,label:"Key",tooltip:"Redis key to store/update events, key is auto-created",type:"string",placeholder:"Enter Key"},{name:"password",label:"Password",tooltip:"Redis server password",type:"string",placeholder:"Enter Password"}].concat(v)),(0,r.Z)(n,p,[{name:"broker",required:!0,label:"Broker",tooltip:"MQTT server endpoint e.g. `tcp://localhost:1883`",type:"uri",placeholder:"Enter Brokers"},{name:"topic",required:!0,label:"Topic",tooltip:"Name of the MQTT topic to publish",type:"string",placeholder:"Enter Topic"},{name:"username",label:"Username",tooltip:"MQTT username",type:"string",placeholder:"Enter Username"},{name:"password",label:"Password",tooltip:"MQTT password",type:"string",placeholder:"Enter Password"},{name:"qos",label:"QOS",tooltip:"Set the quality of service priority, defaults to '0'",type:"number",placeholder:"Enter QOS"},{name:"keep_alive_interval",label:"Keep Alive Interval",tooltip:"Keep-alive interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Keep Alive Interval"},{name:"reconnect_interval",label:"Reconnect Interval",tooltip:"Reconnect interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Reconnect Interval"}].concat(v)),(0,r.Z)(n,f,[{name:"address",required:!0,label:"Address",tooltip:"NATS server address e.g. '0.0.0.0:4222'",type:"address",placeholder:"Enter Address"},{name:"subject",required:!0,label:"Subject",tooltip:"NATS subscription subject",type:"string",placeholder:"Enter NATS Subject"},{name:"username",label:"Username",tooltip:"NATS username",type:"string",placeholder:"Enter NATS Username"},{name:"password",label:"Password",tooltip:"NATS password",type:"string",placeholder:"Enter NATS password"},{name:"token",label:"Token",tooltip:"NATS token",type:"string",placeholder:"Enter NATS token"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"ping_interval",label:"Ping Interval",tooltip:"Client ping commands interval in s,m,h,d. Disabled by default",type:"duration",placeholder:"Enter Ping Interval"},{name:"streaming",label:"Streaming",tooltip:"Set to 'on' to use streaming NATS server",type:"on|off"},{name:"streaming_async",label:"Streaming async",tooltip:"Set to 'on' to enable asynchronous publish",type:"on|off"},{name:"streaming_max_pub_acks_in_flight",label:"Streaming max publish ACKS in flight",tooltip:"Number of messages to publish without waiting for ACKs",type:"number",placeholder:"Enter Streaming in flight value"},{name:"streaming_cluster_id",label:"Streaming Cluster ID",tooltip:"Unique ID for NATS streaming cluster",type:"string",placeholder:"Enter Streaming Cluster ID"},{name:"cert_authority",label:"Cert Authority",tooltip:"Path to certificate chain of the target NATS server",type:"string",placeholder:"Enter Cert Authority"},{name:"client_cert",label:"Client Cert",tooltip:"Client cert for NATS mTLS auth",type:"string",placeholder:"Enter Client Cert"},{name:"client_key",label:"Client Key",tooltip:"Client cert key for NATS mTLS authorization",type:"string",placeholder:"Enter Client Key"}].concat(v)),(0,r.Z)(n,g,[{name:"url",required:!0,label:"URL",tooltip:"Elasticsearch server's address, with optional authentication info",type:"url",placeholder:"Enter URL"},{name:"index",required:!0,label:"Index",tooltip:"Elasticsearch index to store/update events, index is auto-created",type:"string",placeholder:"Enter Index"},{name:"format",required:!0,label:"Format",tooltip:"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'",type:"enum",placeholder:"Enter Format"}].concat(v)),(0,r.Z)(n,m,[{name:"endpoint",required:!0,label:"Endpoint",tooltip:"Webhook server endpoint e.g. http://localhost:8080/minio/events",type:"url",placeholder:"Enter Endpoint"},{name:"auth_token",label:"Auth Token",tooltip:"Opaque string or JWT authorization token",type:"string",placeholder:"Enter auth_token"}].concat(v)),(0,r.Z)(n,h,[{name:"nsqd_address",required:!0,label:"NSQD Address",tooltip:"NSQ server address e.g. '127.0.0.1:4150'",type:"address",placeholder:"Enter nsqd_address"},{name:"topic",required:!0,label:"Topic",tooltip:"NSQ topic",type:"string",placeholder:"Enter Topic"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"}].concat(v)),n),k={webhook:"notify_webhook",amqp:"notify_amqp",kafka:"notify_kafka",mqtt:"notify_mqtt",nats:"notify_nats",nsq:"notify_nsq",mysql:"notify_mysql",postgresql:"notify_postgres",elasticsearch:"notify_elasticsearch",redis:"notify_redis"},x=function(e){return k[e]}}}]);
//# sourceMappingURL=808.aaa3f59e.chunk.js.map