2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[3617],{29316:function(e,t,n){n(50390);var o=n(6369),r=n(86509),a=n(4285),i=n(14549),l=n(56805),s=n(62559);t.Z=(0,a.Z)((function(e){return(0,r.Z)({link:{display:"inline-block",alignItems:"center",justifyContent:"center",textDecoration:"none",maxWidth:"40px","&:active":{color:e.palette.primary.light}},icon:{marginRight:"11px",display:"flex",alignItems:"center",justifyContent:"center",height:"35px",width:"35px",borderRadius:"2px","&:hover":{background:"rgba(234,237,238)"},"& svg.min-icon":{width:"18px",height:"12px"}},label:{display:"flex",alignItems:"center",height:"35px",padding:"0 0px 0 5px",fontSize:"18px",fontWeight:600,color:e.palette.primary.light}})}))((function(e){var t=e.to,n=e.label,r=e.classes,a=e.className,c=e.executeOnClick;return(0,s.jsxs)(l.Z,{sx:{display:"flex",alignItems:"center"},children:[(0,s.jsx)(o.rU,{to:t,className:"".concat(r.link," ").concat(a||""),onClick:function(){c&&c()},children:(0,s.jsx)("div",{className:r.icon,children:(0,s.jsx)(i.xC,{})})}),(0,s.jsx)("div",{className:r.label,children:n})]})}))},37882:function(e,t,n){var o=n(18489),r=n(50390),a=n(62559);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;function n(n){return(0,a.jsx)(r.Suspense,{fallback:t,children:(0,a.jsx)(e,(0,o.Z)({},n))})}return n}},25534:function(e,t,n){var o=n(18489),r=(n(50390),n(25594)),a=n(86509),i=n(4285),l=n(72462),s=n(62559);t.Z=(0,i.Z)((function(e){return(0,a.Z)((0,o.Z)({},l.Bw))}))((function(e){var t=e.classes,n=e.className,o=void 0===n?"":n,a=e.children;return(0,s.jsx)("div",{className:t.contentSpacer,children:(0,s.jsx)(r.ZP,{container:!0,children:(0,s.jsx)(r.ZP,{item:!0,xs:12,className:o,children:a})})})}))},35721:function(e,t,n){var o=n(50390),r=n(34424),a=n(25594),i=n(86509),l=n(4285),s=n(35477),c=n(95467),d=n(26805),p=n(44078),u=n(5265),m=n(14549),g=n(62559),h={toggleList:u.kQ},f=(0,r.$j)((function(e){return{sidebarOpen:e.system.sidebarOpen,operatorMode:e.system.operatorMode,managerObjects:e.objectBrowser.objectManager.objectsToManage,features:e.console.session.features}}),h);t.Z=f((0,l.Z)((function(e){return(0,i.Z)({headerContainer:{width:"100%",minHeight:79,display:"flex",backgroundColor:"#fff",left:0,boxShadow:"rgba(0,0,0,.08) 0 3px 10px"},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:21,marginTop:8},rightMenu:{textAlign:"right"},logo:{marginLeft:34,fill:e.palette.primary.main,"& .min-icon":{width:120}},middleComponent:{display:"flex",justifyContent:"center",alignItems:"center"}})}))((function(e){var t=e.classes,n=e.label,r=e.actions,i=e.sidebarOpen,l=e.operatorMode,u=e.managerObjects,h=e.toggleList,f=e.middleComponent;return e.features.includes("hide-menu")?(0,g.jsx)(o.Fragment,{}):(0,g.jsxs)(a.ZP,{container:!0,className:"".concat(t.headerContainer," page-header"),direction:"row",alignItems:"center",children:[(0,g.jsxs)(a.ZP,{item:!0,xs:12,sm:12,md:f?3:6,className:t.label,sx:{paddingTop:["15px","15px","0","0"]},children:[!i&&(0,g.jsx)("div",{className:t.logo,children:l?(0,g.jsx)(d.Z,{}):(0,g.jsx)(p.Z,{})}),(0,g.jsx)(s.Z,{variant:"h4",className:t.labelStyle,children:n})]}),f&&(0,g.jsx)(a.ZP,{item:!0,xs:12,sm:12,md:6,className:t.middleComponent,sx:{marginTop:["10px","10px","0","0"]},children:f}),(0,g.jsxs)(a.ZP,{item:!0,xs:12,sm:12,md:f?3:6,className:t.rightMenu,children:[r&&r,u&&u.length>0&&(0,g.jsx)(c.Z,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){h()},id:"object-manager-toggle",size:"large",children:(0,g.jsx)(m.gx,{})})]})]})})))},73617:function(e,t,n){n.r(t);var o=n(23430),r=n(18489),a=n(50390),i=n(34424),l=n(38342),s=n.n(l),c=n(25594),d=n(86509),p=n(4285),u=n(66946),m=n(30324),g=n(44149),h=n(65433),f=n(72462),y=n(35721),b=n(24442),x=n(37882),S=n(29316),v=n(25534),T=n(49495),k=n(62559),E=(0,x.Z)(a.lazy((function(){return Promise.all([n.e(14),n.e(3152),n.e(2066),n.e(9769),n.e(9056),n.e(2805)]).then(n.bind(n,62805))}))),j=(0,x.Z)(a.lazy((function(){return Promise.all([n.e(14),n.e(3152),n.e(2066),n.e(9056),n.e(6873)]).then(n.bind(n,96873))}))),N=(0,x.Z)(a.lazy((function(){return Promise.all([n.e(14),n.e(3152),n.e(2066),n.e(9769),n.e(9056),n.e(428)]).then(n.bind(n,70428))}))),A={serverNeedsRestart:g.o8,setErrorSnackMessage:g.Ih},_=(0,i.$j)(null,A);t.default=_((0,p.Z)((function(e){return(0,d.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},f.oO),f.Je),{},{lambdaNotif:{background:"linear-gradient(90deg, rgba(249,249,250,1) 0%, rgba(250,250,251,1) 68%, rgba(254,254,254,1) 100%)",border:"#E5E5E5 1px solid",borderRadius:5,height:80,display:"flex",alignItems:"center",justifyContent:"start",marginBottom:16,cursor:"pointer",padding:0,overflow:"hidden"},lambdaNotifIcon:{backgroundColor:"#FEFEFE",display:"flex",alignItems:"center",justifyContent:"center",width:80,height:80,"& img":{maxWidth:46,maxHeight:46}},lambdaNotifTitle:{color:"#07193E",fontSize:16,fontFamily:"Lato,sans-serif",paddingLeft:18},formBox:{border:"1px solid #EAEAEA",padding:15}}))}))((function(e){var t=e.match,n=e.saveAndRefresh,r=e.serverNeedsRestart,i=e.classes,l=e.setErrorSnackMessage,d=(0,a.useState)([]),p=(0,o.Z)(d,2),g=p[0],f=p[1],x=(0,a.useState)(!1),A=(0,o.Z)(x,2),_=A[0],C=A[1],L=t.params.service;(0,a.useEffect)((function(){if(_){var e={key_values:(0,h.DD)(g)};m.Z.invoke("PUT","/api/v1/configs/".concat(L),e).then((function(){C(!1),r(!0),b.Z.push(T.gA.NOTIFICATIONS_ENDPOINTS)})).catch((function(e){C(!1),l(e)}))}}),[_,r,L,g,n,l]);var Z,w=(0,a.useCallback)((function(e){f(e)}),[f]);switch(L){case h.ee:Z=(0,k.jsx)(N,{onChange:w});break;case h.dM:Z=(0,k.jsx)(E,{onChange:w});break;default:var q=s()(h.oj,L,[]);Z=(0,k.jsx)(j,{fields:q,onChange:w})}var P=h.BR.find((function(e){return e.actionTrigger===L}));return(0,k.jsxs)(a.Fragment,{children:[(0,k.jsx)(y.Z,{label:(0,k.jsx)(a.Fragment,{children:(0,k.jsx)(S.Z,{to:T.gA.NOTIFICATIONS_ENDPOINTS_ADD,label:"Notification Endpoint"})}),actions:(0,k.jsx)(a.Fragment,{})}),(0,k.jsx)(v.Z,{children:(0,k.jsx)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),C(!0)},children:""!==L&&(0,k.jsxs)(a.Fragment,{children:[(0,k.jsx)(c.ZP,{item:!0,xs:12,children:P&&(0,k.jsxs)("div",{className:i.lambdaNotif,children:[(0,k.jsx)("div",{className:i.lambdaNotifIcon,children:(0,k.jsx)("img",{src:P.logo,className:i.logoButton,alt:P.targetTitle})}),(0,k.jsx)("div",{className:i.lambdaNotifTitle,children:(0,k.jsxs)("b",{children:[P?P.targetTitle:"","Notification Endpoint"]})})]},"icon-".concat(P.targetTitle))}),(0,k.jsxs)("div",{className:i.formBox,children:[(0,k.jsx)(c.ZP,{item:!0,xs:12,className:i.configForm,children:Z}),(0,k.jsx)(c.ZP,{item:!0,xs:12,className:i.settingsButtonContainer,children:(0,k.jsx)(u.Z,{type:"submit",variant:"contained",color:"primary",disabled:_,children:"Save Notification Target"})})]})]})})})]})})))},65433:function(e,t,n){n.d(t,{ee:function(){return a},dM:function(){return i},fk:function(){return h},BR:function(){return f},DD:function(){return b},oj:function(){return x}});var o,r=n(36222),a="notify_postgres",i="notify_mysql",l="notify_kafka",s="notify_amqp",c="notify_mqtt",d="notify_redis",p="notify_nats",u="notify_elasticsearch",m="notify_webhook",g="notify_nsq",h=function(e){return e.map((function(e){return{service_name:"".concat(e.service,":").concat(e.account_id),status:e.status}}))},f=[{actionTrigger:a,targetTitle:"PostgreSQL",logo:"/postgres-logo.svg"},{actionTrigger:l,targetTitle:"Kafka",logo:"/kafka-logo.svg"},{actionTrigger:s,targetTitle:"AMQP",logo:"/amqp-logo.svg"},{actionTrigger:c,targetTitle:"MQTT",logo:"/mqtt-logo.svg"},{actionTrigger:d,targetTitle:"Redis",logo:"/redis-logo.svg"},{actionTrigger:p,targetTitle:"NATS",logo:"/nats-logo.svg"},{actionTrigger:i,targetTitle:"Mysql",logo:"/mysql-logo.svg"},{actionTrigger:u,targetTitle:"Elastic Search",logo:"/elasticsearch-logo.svg"},{actionTrigger:m,targetTitle:"Webhook",logo:"/webhooks-logo.svg"},{actionTrigger:g,targetTitle:"NSQ",logo:"/nsq-logo.svg"}],y=[{name:"queue-dir",label:"Queue Directory",required:!0,tooltip:"staging dir 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=function(e){return e.filter((function(e){return""!==e.value}))},x=(o={},(0,r.Z)(o,l,[{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 auth",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 auth",type:"path",placeholder:"Enter TLS Client Cert"},{name:"client_tls_key",label:"client TLS key",tooltip:"Path to client key for mTLS auth",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(y)),(0,r.Z)(o,s,[{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(y)),(0,r.Z)(o,d,[{name:"address",required:!0,label:"Address",tooltip:"Redis server's address. For example: `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(y)),(0,r.Z)(o,c,[{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 Internal"},{name:"reconnect_interval",label:"Reconnect Interval",tooltip:"Reconnect interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Reconnect Interval"}].concat(y)),(0,r.Z)(o,p,[{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 auth",type:"string",placeholder:"Enter Client Key"}].concat(y)),(0,r.Z)(o,u,[{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(y)),(0,r.Z)(o,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(y)),(0,r.Z)(o,g,[{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(y)),o)}}]);
|
|
//# sourceMappingURL=3617.f650b975.chunk.js.map
|