github.com/minio/console@v1.4.1/web-app/build/static/js/8769.996efd0a.chunk.js (about) 1 "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[8769],{72237:(e,t,o)=>{o.d(t,{A:()=>r});var n=o(65043),a=o(70579);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(o){return(0,a.jsx)(n.Suspense,{fallback:t,children:(0,a.jsx)(e,{...o})})}}},68769:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(65043),a=o(33097),r=o.n(a),l=o(89923),i=o(73216),s=o(56629),c=o(53518),p=o(67433),d=o(99161),u=o(64159),g=o(20554),m=o(39161),f=o(72237),h=o(48793),y=o(94574),b=o(70579);const S=y.Ay.div((e=>{let{theme:t}=e;return{background:r()(t,"boxBackground","#fff"),border:"".concat(r()(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:r()(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:r()(t,"fontColor","#000"),fontSize:16,fontFamily:"Inter,sans-serif",paddingLeft:18}}})),T=e=>{let{logoSrc:t,title:o}=e;return(0,b.jsxs)(S,{children:[(0,b.jsx)(l.azJ,{className:"imageContainer",children:(0,b.jsx)("img",{src:t,className:"logoButton",alt:o})}),(0,b.jsx)(l.azJ,{className:"titleBox",children:(0,b.jsxs)("b",{children:[o," Event Destination"]})})]})};var v=o(55968);const _=(0,f.A)(n.lazy((()=>o.e(3323).then(o.bind(o,43323))))),k=(0,f.A)(n.lazy((()=>o.e(5128).then(o.bind(o,5128))))),A=(0,f.A)(n.lazy((()=>o.e(6140).then(o.bind(o,13759))))),E=e=>{let{saveAndRefresh:t}=e;const o=(0,g.jL)(),a=(0,i.Zp)(),f=(0,i.g)(),[y,S]=(0,n.useState)([]),[E,x]=(0,n.useState)(""),[q,L]=(0,n.useState)(!1),C=f.service||"";(0,n.useEffect)((()=>{if(q){const e={key_values:(0,p.Xm)(y)};s.F.configs.setConfig("".concat(C,":").concat(E),e).then((()=>{L(!1),o((0,u.YR)(!0)),o((0,m.$Y)(!0)),a(d.zZ.EVENT_DESTINATIONS)})).catch((e=>{L(!1),o((0,u.C9)((0,c.S)(e.error)))}))}}),[q,C,y,t,o,a,E]);const w=(0,n.useCallback)((e=>{S(e)}),[S]);let j;switch(C){case p.P4:j=(0,b.jsx)(A,{onChange:w});break;case p.AU:j=(0,b.jsx)(_,{onChange:w});break;default:{const e=r()(p.fx,C,[]);j=(0,b.jsx)(k,{fields:e,onChange:w})}}const N=p.bo.find((e=>e.actionTrigger===C));return(0,n.useEffect)((()=>{o((0,u.ph)("add_notification_endpoint"))}),[]),(0,b.jsxs)(n.Fragment,{children:[(0,b.jsx)(h.A,{label:(0,b.jsx)(n.Fragment,{children:(0,b.jsx)(l.EGL,{label:"Event Destinations",onClick:()=>a(d.zZ.EVENT_DESTINATIONS_ADD)})}),actions:(0,b.jsx)(v.A,{})}),(0,b.jsx)(l.Mxu,{children:(0,b.jsx)("form",{noValidate:!0,onSubmit:e=>{e.preventDefault(),L(!0)},children:""!==C&&(0,b.jsxs)(n.Fragment,{children:[(0,b.jsx)(l.xA9,{item:!0,xs:12,children:N&&(0,b.jsx)(T,{logoSrc:N.logo,title:N?N.targetTitle:""})}),(0,b.jsxs)(l.Hbc,{children:[(0,b.jsx)(l.cl_,{id:"identifier-field",name:"identifier-field",label:"Identifier",value:E,onChange:e=>x(e.target.value),tooltip:"Unique descriptive string for this destination",placeholder:"Enter Destination Identifier",required:!0}),(0,b.jsx)(l.xA9,{item:!0,xs:12,children:j}),(0,b.jsx)(l.xA9,{item:!0,xs:12,sx:{display:"flex",justifyContent:"flex-end",marginTop:15},children:(0,b.jsx)(l.$nd,{id:"save-notification-target",type:"submit",variant:"callAction",disabled:q||""===E.trim(),label:"Save Event Destination"})})]})]})})})]})}},67433:(e,t,o)=>{o.d(t,{AU:()=>a,D3:()=>m,Es:()=>g,P4:()=>n,Xm:()=>b,bo:()=>h,fx:()=>S,h4:()=>v});const n="notify_postgres",a="notify_mysql",r="notify_kafka",l="notify_amqp",i="notify_mqtt",s="notify_redis",c="notify_nats",p="notify_elasticsearch",d="notify_webhook",u="notify_nsq",g=e=>e.map((e=>({service_name:"".concat(e.service,":").concat(e.account_id),name:e.service,account_id:e.account_id,status:e.status})));class m{}m.DB="database",m.Queue="queue",m.Func="functions";const f=()=>"".concat(document.baseURI),h=[{actionTrigger:n,targetTitle:"PostgreSQL",logo:"".concat(f(),"postgres-logo.svg"),category:m.DB},{actionTrigger:r,targetTitle:"Kafka",logo:"".concat(f(),"kafka-logo.svg"),category:m.Queue},{actionTrigger:l,targetTitle:"AMQP",logo:"".concat(f(),"amqp-logo.svg"),category:m.Queue},{actionTrigger:i,targetTitle:"MQTT",logo:"".concat(f(),"mqtt-logo.svg"),category:m.Queue},{actionTrigger:s,targetTitle:"Redis",logo:"".concat(f(),"redis-logo.svg"),category:m.Queue},{actionTrigger:c,targetTitle:"NATS",logo:"".concat(f(),"nats-logo.svg"),category:m.Queue},{actionTrigger:a,targetTitle:"Mysql",logo:"".concat(f(),"mysql-logo.svg"),category:m.DB},{actionTrigger:p,targetTitle:"Elastic Search",logo:"".concat(f(),"elasticsearch-logo.svg"),category:m.DB},{actionTrigger:d,targetTitle:"Webhook",logo:"".concat(f(),"webhooks-logo.svg"),category:m.Func},{actionTrigger:u,targetTitle:"NSQ",logo:"".concat(f(),"nsq-logo.svg"),category:m.Queue}],y=[{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"}],b=e=>e.filter((e=>""!==e.value)),S={[r]:[{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"},...y],[l]:[{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"},...y],[s]:[{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"},...y],[i]:[{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"},...y],[c]:[{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"},...y],[p]:[{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"},...y],[d]:[{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"},...y],[u]:[{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"},...y]},T={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"},v=e=>T[e]}}]); 2 //# sourceMappingURL=8769.996efd0a.chunk.js.map