Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
assets.3795.9bf1d89926b9972b5b0a.js Maven / Gradle / Ivy
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[3795,8649],{68649:function(e,n,t){t.r(n),t.d(n,{ReactComponent:function(){return s}});var i,r,a=t(67294);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n * {\n padding: 5px 35px !important;\n}\n',""]),n.Z=o},59629:function(e,n,t){var i=t(70655),r=t(27509),a=t(76772),o=t(23031),s=t(96486),c=t(67294),l=t(89204),u=t(19894),d=t(48794),f=t(97354),m=t(93895),v=t(98736),g=t(3363),h=t(16296),p=t(9546),E=t(30743),y=t(8074);n.Z=function(e){var n,t=e.data,N=e.okText,M=void 0===N?"Save":N,S=e.cancelText,b=void 0===S?"Cancel":S,T=e.serviceType,C=e.serviceCategory,I=e.status,w=e.onCancel,A=e.onSave,D=e.onFocus,L=e.disableTestConnection,x=void 0!==L&&L,Z=(0,s.isNil)(t)?{}:null===(n=t.connection)||void 0===n?void 0:n.config,O=(0,d.N)().inlineAlertDetails,j=(0,c.useRef)(null),z=(0,u.w)().isAirflowAvailable,k=(0,i.CR)((0,c.useState)(),2),R=k[0],U=k[1];(0,c.useEffect)((function(){z&&(0,i.mG)(void 0,void 0,void 0,(function(){var e,n,t;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,(0,f.ut)()];case 1:return e=i.sent(),n=e.status,t=e.data,U(200===n?(null==t?void 0:t.ip)||"[unknown]":void 0),[3,3];case 2:return i.sent(),U("[error - unknown]"),[3,3];case 3:return[2]}}))}))}),[z]);var Q=function(){var e;return Boolean(null===(e=j.current)||void 0===e?void 0:e.validateForm())},V=function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var n;return(0,i.Jh)(this,(function(t){switch(t.label){case 0:return n=(0,v.Fz)(e.formData),[4,A((0,i.pi)((0,i.pi)({},e),{formData:n}))];case 1:return t.sent(),[2]}}))}))};return c.createElement(c.Fragment,null,c.createElement(h.Z,null),function(){var e,n,u,d,f={schema:{},uiSchema:{}},v=(0,s.cloneDeep)(Z||{});try{for(var h=(0,i.XA)(Object.entries(v)),N=h.next();!N.done;N=h.next()){var S=(0,i.CR)(N.value,2),A=S[0],L=S[1];(0,s.isNil)(L)&&delete v[A]}}catch(n){e={error:n}}finally{try{N&&!N.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}switch(C){case l.u.DATABASE_SERVICES:f=g.Z.getDatabaseServiceConfig(T);break;case l.u.MESSAGING_SERVICES:f=g.Z.getMessagingServiceConfig(T);break;case l.u.DASHBOARD_SERVICES:f=g.Z.getDashboardServiceConfig(T);break;case l.u.PIPELINE_SERVICES:f=g.Z.getPipelineServiceConfig(T);break;case l.u.ML_MODEL_SERVICES:f=g.Z.getMlModelServiceConfig(T);break;case l.u.METADATA_SERVICES:f=g.Z.getMetadataServiceConfig(T);break;case l.u.STORAGE_SERVICES:f=g.Z.getStorageServiceConfig(T);break;case l.u.SEARCH_SERVICES:f=g.Z.getSearchServiceConfig(T);break;case l.u.API_SERVICES:f=g.Z.getAPIServiceConfig(T)}return c.createElement(p.Z,{cancelText:b,formData:v,okText:M,ref:j,schema:f.schema,serviceCategory:C,status:I,uiSchema:f.uiSchema,validator:r.ZP,onCancel:w,onFocus:D,onSubmit:V},(0,s.isEmpty)(f.schema)&&c.createElement("div",{className:"text-grey-muted text-center","data-testid":"no-config-available"},(0,o.t)("message.no-config-available")),!(0,s.isEmpty)(f.schema)&&z&&R&&c.createElement(a.Z,{"data-testid":"ip-address",description:c.createElement(m.u1,{i18nKey:"message.airflow-host-ip-address",renderElement:c.createElement("strong",null),values:{hostIp:R}}),type:"info"}),!(0,s.isEmpty)(f.schema)&&z&&(null===(d=null===(u=j.current)||void 0===u?void 0:u.state)||void 0===d?void 0:d.formData)&&c.createElement(y.Z,{connectionType:T,getData:function(){var e,n;return null===(n=null===(e=j.current)||void 0===e?void 0:e.state)||void 0===n?void 0:n.formData},isTestingDisabled:x,serviceCategory:C,serviceName:null==t?void 0:t.name,onValidateFormRequiredFields:Q}),!(0,s.isUndefined)(O)&&c.createElement(E.Z,(0,i.pi)({alertClassName:"m-t-xs"},O)))}())}},30743:function(e,n,t){t.d(n,{Z:function(){return A}});var i=t(15873),r=t(57119),a=t(76772),o=t(56256),s=t(94184),c=t.n(s),l=t(96486),u=t(67294),d=t(2758),f=t(68649),m=t(48794),v=t(93379),g=t.n(v),h=t(7795),p=t.n(h),E=t(90569),y=t.n(E),N=t(3565),M=t.n(N),S=t(19216),b=t.n(S),T=t(44589),C=t.n(T),I=t(98511),w={};w.styleTagTransform=C(),w.setAttributes=M(),w.insert=y().bind(null,"head"),w.domAPI=p(),w.insertStyleElement=b(),g()(I.Z,w),I.Z&&I.Z.locals&&I.Z.locals;var A=function(e){var n=e.alertClassName,t=void 0===n?"":n,s=e.type,v=e.heading,g=e.description,h=e.onClose,p=(0,m.N)(),E=p.inlineAlertDetails,y=p.setInlineAlertDetails,N=(0,u.useMemo)((function(){return{alertContainerClass:(null!=s?s:"default")+"-alert",alertIconClass:(null!=s?s:"default")+"-icon"}}),[s]),M=N.alertContainerClass,S=N.alertIconClass,b=(0,u.useMemo)((function(){switch(s){case"error":return u.createElement(f.ReactComponent,{className:c()("alert-icon",S)});case"warning":return u.createElement(d.ReactComponent,{className:c()("alert-icon",S)});case"success":return u.createElement(i.Z,{className:c()("alert-icon",S)});default:return u.createElement(r.Z,{className:c()("alert-icon",S)})}}),[s,S]);return(0,u.useEffect)((function(){return function(){(0,l.isUndefined)(E)||y(void 0)}}),[]),u.createElement(a.Z,{closable:!0,className:c()("inline-error-container",M,t),description:u.createElement("div",{className:"d-flex items-start gap-3"},b,u.createElement("div",{className:"d-flex flex-col gap-2"},u.createElement(o.Z.Text,{className:"font-semibold text-sm"},v),u.createElement(o.Z.Paragraph,{className:"m-b-0 text-sm"},g))),type:s,onClose:h})}},1261:function(e,n,t){t.d(n,{Z:function(){return A}});var i=t(70655),r=t(71230),a=t(15746),o=t(96486),s=t(67294),c=t(68432),l=t(16139),u=t(39117),d=t(2391),f=t(35850),m=t(38048),v=t(93379),g=t.n(v),h=t(7795),p=t.n(h),E=t(90569),y=t.n(E),N=t(3565),M=t.n(N),S=t(19216),b=t.n(S),T=t(44589),C=t.n(T),I=t(76301),w={};w.styleTagTransform=C(),w.setAttributes=M(),w.insert=y().bind(null,"head"),w.domAPI=p(),w.insertStyleElement=b(),g()(I.Z,w),I.Z&&I.Z.locals&&I.Z.locals;var A=function(e){var n=e.serviceType,t=e.serviceName,v=e.activeField,g=e.isWorkflow,h=e.workflowType,p=(0,c.$)().i18n,E=(0,i.CR)((0,s.useState)(!1),2),y=E[0],N=E[1],M=(0,i.CR)((0,s.useState)(""),2),S=M[0],b=M[1],T=(0,s.useCallback)((function(e){var n;if(e){var t=e.split("/");if(l.JJ.test(e))return t[1];var i=null!==(n=(0,o.last)(t))&&void 0!==n?n:"";return l.X$.test(i)?(0,o.first)(i.split("_")):i}}),[]);return(0,s.useEffect)((function(){(0,i.mG)(void 0,void 0,void 0,(function(){var e,r,a,o,s,c,l;return(0,i.Jh)(this,(function(f){switch(f.label){case 0:N(!0),f.label=1;case 1:return f.trys.push([1,3,4,5]),e="",r=p.language===d.Qv.English,a=p.language+"/"+n+"/"+t+".md",o=d.Qv.English+"/"+n+"/"+t+".md",g&&h&&(a=p.language+"/"+n+"/workflows/"+h+".md",o=d.Qv.English+"/"+n+"/workflows/"+h+".md"),[4,Promise.allSettled([(0,u.bA)(a),r?Promise.reject(""):(0,u.bA)(o)])];case 2:return s=i.CR.apply(void 0,[f.sent(),2]),c=s[0],l=s[1],"fulfilled"===c.status&&(e=c.value),r||"fulfilled"!==l.status||(e=l.value),b(e),[3,5];case 3:return f.sent(),b(""),[3,5];case 4:return N(!1),[7];case 5:return[2]}}))}))}),[t,n]),(0,s.useEffect)((function(){var e=T(v);if(e){var n=document.querySelector('[data-id="'+e+'"]');n&&(n.scrollIntoView({block:"center",behavior:"smooth",inline:"center"}),n.setAttribute("data-highlighted","true"))}}),[v,T]),y?s.createElement(f.Z,null):s.createElement(r.Z,{"data-testid":"service-requirements"},s.createElement(a.Z,{span:24},s.createElement(m.Z,{enableSeeMoreVariant:!1,markdown:S})))}},73795:function(e,n,t){t.r(n),t.d(n,{default:function(){return L}});var i=t(70655),r=t(91894),a=t(56256),o=t(34901),s=t(96486),c=t(67294),l=t(68432),u=t(15137),d=t(26396),f=t(35850),m=t(89011),v=t(1261),g=t(36169),h=t(96840),p=t(59629),E=function(e){var n=e.serviceCategory,t=e.serviceFQN,r=e.serviceType,a=e.data,o=e.handleUpdate,s=e.disableTestConnection,l=e.onFocus,d=(0,u.k6)(),f=(0,i.CR)((0,c.useState)("initial"),2),m=f[0],v=f[1];return c.createElement("div",{className:"bg-white h-full"},c.createElement("div",{className:"w-full p-b-lg","data-testid":"service-config",id:"serviceConfig"},c.createElement("div",{className:"m-x-auto"},c.createElement(p.Z,{data:a,disableTestConnection:s,serviceCategory:n,serviceType:r,status:m,onCancel:function(){d.goBack()},onFocus:l,onSave:function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(i){switch(i.label){case 0:if(!e.formData)return[2];v("waiting"),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,o(e.formData,n)];case 2:return i.sent(),setTimeout((function(){v("success"),d.push((0,h.jN)(n,t))}),200),[3,5];case 3:return i.sent(),[3,5];case 4:return setTimeout((function(){v("initial")}),500),[7];case 5:return[2]}}))}))}}))))},y=t(96162),N=t(55846),M=t(64632),S=t(89204),b=t(66537),T=t(99166),C=t(93895),I=t(24671),w=t(3363),A=t(75838),D=t(46321),L=function(){var e,n,t=this,p=(0,l.$)().t,L=(0,u.UO)().serviceCategory,x=(0,b.f)().fqn,Z=(0,c.useMemo)((function(){return x===N.rn}),[x]),O=(0,i.CR)((0,c.useState)(!Z),2),j=O[0],z=O[1],k=(0,i.CR)((0,c.useState)(Z),2),R=k[0],U=k[1],Q=(0,i.CR)((0,c.useState)(),2),V=Q[0],P=Q[1],W=(0,i.CR)((0,c.useState)([]),2),Y=W[0],F=W[1],G=(0,i.CR)((0,c.useState)(""),2),B=G[0],_=G[1];if((0,c.useEffect)((function(){(0,i.mG)(t,void 0,void 0,(function(){var e,n,t,r;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:z(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,T.dO)(L,x,{fields:M.GB.OWNERS})];case 2:return e=i.sent(),P(e),F([{name:(0,s.startCase)(L),url:(0,h.si)(y.CZ.SERVICES,(0,A.tJ)(L))},{name:(0,I.C_)(e),imgSrc:w.Z.getServiceTypeLogo(e),url:(0,h.jN)(L,x)},{name:p("label.edit-entity",{entity:p("label.connection")}),url:"",activeTitle:!0}]),[3,5];case 3:return n=i.sent(),404===(null===(r=(t=n).response)||void 0===r?void 0:r.status)?U(!0):(0,D.Eo)(t),[3,5];case 4:return z(!1),[7];case 5:return[2]}}))}))}),[x,L]),j)return c.createElement(f.Z,null);if(R&&!j)return c.createElement(d.Z,null,(0,C.mW)(L,x));var J=c.createElement("div",{className:"max-width-md w-9/10 service-form-container"},c.createElement(g.Z,{titleLinks:Y}),c.createElement(r.Z,{className:"p-lg m-t-md"},c.createElement(a.Z.Title,{level:5},p("message.edit-service-entity-connection",{entity:x})),c.createElement(E,{data:V,disableTestConnection:S.u.METADATA_SERVICES===L&&N.rn===x,handleUpdate:function(e){return(0,i.mG)(t,void 0,void 0,(function(){var n,t,r,a,c;return(0,i.Jh)(this,(function(l){switch(l.label){case 0:if((0,s.isUndefined)(V))return[2];if(n=(0,i.pi)((0,i.pi)({},V),{connection:{config:e}}),t=(0,o.qu)(V,n),(0,s.isEmpty)(t))return[2];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,(0,T.ws)(L,V.id,t)];case 2:return r=l.sent(),P((0,i.pi)((0,i.pi)({},r),{owners:null!==(c=null==r?void 0:r.owners)&&void 0!==c?c:null==V?void 0:V.owners})),[3,4];case 3:return a=l.sent(),(0,D.Eo)(a),[3,4];case 4:return[2]}}))}))},serviceCategory:L,serviceFQN:x,serviceType:(null==V?void 0:V.serviceType)||"",onFocus:function(e){(0,s.isEmpty)(e)||setTimeout((function(){_(e)}),50)}})));return c.createElement(m.Z,{className:"content-height-with-resizable-panel",firstPanel:{children:J,minWidth:700,flex:.7,className:"content-resizable-panel-container"},hideSecondPanel:null!==(e=!(null==V?void 0:V.serviceType))&&void 0!==e?e:"",pageTitle:p("label.edit-entity",{entity:p("label.connection")}),secondPanel:{children:c.createElement(v.Z,{activeField:B,serviceName:null!==(n=null==V?void 0:V.serviceType)&&void 0!==n?n:"",serviceType:(0,A.rP)(L)}),className:"service-doc-panel content-resizable-panel-container",minWidth:400,flex:.3}})}}}]);