mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[6686],{86686:(e,t,o)=>{o.r(t),o.d(t,{default:()=>_});var n=o(72791),i=o(29945),a=o(78687),r=o(57689),l=o(31776),s=o(82342),c=o(16444),d=o(26181),p=o.n(d),u=o(61757),m=o(23814),g=o(56087),h=o(87995),f=o(44690),y=o(53669),b=o(59114),v=o(23508),S=o(80184);const T=e=>{let{onConfirm:t,onClose:o,serviceName:a,status:r}=e;return(0,S.jsx)(v.Z,{title:"Delete Endpoint",confirmText:"Delete",isOpen:!0,titleIcon:(0,S.jsx)(i.EjK,{}),isLoading:!1,onConfirm:t,onClose:o,confirmationContent:(0,S.jsxs)(n.Fragment,{children:["Are you sure you want to delete the event destination ?",(0,S.jsx)("br",{}),(0,S.jsx)("b",{children:a})," which is ",(0,S.jsx)("b",{children:r})]})})};var x=o(27454);const k=c.ZP.div((e=>{let{theme:t}=e;return{display:"flex",alignItems:"center","& svg":{width:16,marginRight:5,fill:p()(t,"signalColors.good","#4CCB92")},"& svg.offline":{fill:p()(t,"signalColors.danger","#C51B3F")}}})),_=()=>{const e=(0,f.TL)(),t=(0,r.s0)(),o=(0,a.v9)((e=>e.destination.loading)),[c,d]=(0,n.useState)([]),[p,v]=(0,n.useState)(""),[_,E]=(0,n.useState)(!1),[A,j]=(0,n.useState)();(0,n.useEffect)((()=>{if(o){(()=>{l.h.admin.notificationEndpointList().then((t=>{let o=[];t.data.notification_endpoints&&(o=t.data.notification_endpoints),d((0,u.fk)(o)),e((0,y.iP)(!1))})).catch((t=>{e((0,h.Ih)((0,s.g)(t.error))),e((0,y.iP)(!1))}))})()}}),[o,e]),(0,n.useEffect)((()=>{e((0,y.iP)(!0))}),[e]);const C=[{type:"delete",onClick:e=>{j(e),E(!0)}}],L=c.filter((e=>""===p||e.service_name.indexOf(p)>=0));return(0,S.jsx)(n.Fragment,{children:(0,S.jsxs)(i.Xgh,{children:[(0,S.jsxs)(i.rjZ,{item:!0,xs:12,sx:m.OR.actionsTray,children:[(0,S.jsx)(b.Z,{placeholder:"Search target",onChange:v,value:p,sx:{maxWidth:380}}),(0,S.jsxs)(i.xuv,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:5},children:[(0,S.jsx)(x.Z,{tooltip:"Refresh List",children:(0,S.jsx)(i.zxk,{id:"reload-event-destinations",label:"Refresh",variant:"regular",icon:(0,S.jsx)(i.DuK,{}),onClick:()=>{e((0,y.iP)(!0))}})}),(0,S.jsx)(x.Z,{tooltip:"Add Event Destination",children:(0,S.jsx)(i.zxk,{id:"add-notification-target",label:"Add Event Destination",variant:"callAction",icon:(0,S.jsx)(i.dtP,{}),onClick:()=>{t(g.gA.EVENT_DESTINATIONS_ADD)}})})]})]}),o&&(0,S.jsx)(i.kod,{}),!o&&(0,S.jsxs)(n.Fragment,{children:[c.length>0&&(0,S.jsxs)(n.Fragment,{children:[(0,S.jsx)(i.xuv,{sx:{width:"100%"},children:(0,S.jsx)(i.wQF,{itemActions:C,columns:[{label:"Status",elementKey:"status",renderFunction:e=>(0,S.jsxs)(k,{children:[(0,S.jsx)(i.J$M,{className:"Offline"===e?"offline":""}),e]}),width:150},{label:"Service",elementKey:"service_name"}],isLoading:o,records:L,entityName:"Event Destinations",idField:"service_name",customPaperHeight:"400px"})}),(0,S.jsx)(i.rjZ,{item:!0,xs:12,sx:{marginTop:15},children:(0,S.jsx)(i.KfX,{title:"Event Destinations",iconComponent:(0,S.jsx)(i.cCG,{}),help:(0,S.jsxs)(n.Fragment,{children:["MinIO bucket notifications allow administrators to send notifications to supported external services on certain object or bucket events. MinIO supports bucket and object-level S3 events similar to the Amazon S3 Event Notifications.",(0,S.jsx)("br",{}),(0,S.jsx)("br",{}),"You can learn more at our"," ",(0,S.jsx)("a",{href:"https://min.io/docs/minio/linux/administration/monitoring/bucket-notifications.html?ref=con",target:"_blank",rel:"noopener",children:"documentation"}),"."]})})})]}),0===c.length&&(0,S.jsx)(i.rjZ,{container:!0,sx:{justifyContent:"center",alignContent:"center",alignItems:"center"},children:(0,S.jsx)(i.rjZ,{item:!0,xs:8,children:(0,S.jsx)(i.KfX,{title:"Event Destinations",iconComponent:(0,S.jsx)(i.cCG,{}),help:(0,S.jsxs)(n.Fragment,{children:["MinIO bucket notifications allow administrators to send notifications to supported external services on certain object or bucket events. MinIO supports bucket and object-level S3 events similar to the Amazon S3 Event Notifications.",(0,S.jsx)("br",{}),(0,S.jsx)("br",{}),"To get started,"," ",(0,S.jsx)(i.vmT,{onClick:()=>{t(g.gA.EVENT_DESTINATIONS_ADD)},children:"Add an Event Destination"}),"."]})})})})]}),_?(0,S.jsx)(T,{onConfirm:()=>{(t=>{if(null!==t&&void 0!==t&&t.name){const o=(0,u.L)(t.name);let n=":".concat(t.account_id);o?l.h.configs.resetConfig("".concat(o).concat(n)).then((()=>{e((0,h.cN)(!0)),j(null),E(!1),e((0,y.iP)(!0))})).catch((t=>{E(!1),e((0,h.Ih)((0,s.g)(t.error)))})):(j(null),E(!1),console.log("Unable to find Config key for ".concat(t.name)))}})(A)},status:"".concat(null===A||void 0===A?void 0:A.status),serviceName:"".concat(null===A||void 0===A?void 0:A.service_name),onClose:()=>{E(!1)}}):null]})})}},61757:(e,t,o)=>{o.d(t,{BI:()=>h,DD:()=>y,L:()=>S,dM:()=>i,ee:()=>n,fk:()=>m,oj:()=>b,z5:()=>g});const n="notify_postgres",i="notify_mysql",a="notify_kafka",r="notify_amqp",l="notify_mqtt",s="notify_redis",c="notify_nats",d="notify_elasticsearch",p="notify_webhook",u="notify_nsq",m=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 g{}g.DB="database",g.Queue="queue",g.Func="functions";const h=[{actionTrigger:n,targetTitle:"PostgreSQL",logo:"/postgres-logo.svg",category:g.DB},{actionTrigger:a,targetTitle:"Kafka",logo:"/kafka-logo.svg",category:g.Queue},{actionTrigger:r,targetTitle:"AMQP",logo:"/amqp-logo.svg",category:g.Queue},{actionTrigger:l,targetTitle:"MQTT",logo:"/mqtt-logo.svg",category:g.Queue},{actionTrigger:s,targetTitle:"Redis",logo:"/redis-logo.svg",category:g.Queue},{actionTrigger:c,targetTitle:"NATS",logo:"/nats-logo.svg",category:g.Queue},{actionTrigger:i,targetTitle:"Mysql",logo:"/mysql-logo.svg",category:g.DB},{actionTrigger:d,targetTitle:"Elastic Search",logo:"/elasticsearch-logo.svg",category:g.DB},{actionTrigger:p,targetTitle:"Webhook",logo:"/webhooks-logo.svg",category:g.Func},{actionTrigger:u,targetTitle:"NSQ",logo:"/nsq-logo.svg",category:g.Queue}],f=[{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"}],y=e=>e.filter((e=>""!==e.value)),b={[a]:[{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"},...f],[r]:[{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"},...f],[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"},...f],[l]:[{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"},...f],[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"},...f],[d]:[{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"},...f],[p]:[{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"},...f],[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"},...f]},v={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"},S=e=>v[e]}}]);
|
|
//# sourceMappingURL=6686.01ae5612.chunk.js.map
|