All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.9556.468c0ca0aae28f7e9b57.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[9556],{3460:function(e,t,n){n.d(t,{w:function(){return a}});var i=n(70655),r=n(67294),s=n(33994),a=function(e){return function(t){return r.createElement(s.ZP,null,r.createElement(e,(0,i.pi)({},t)))}}},19556:function(e,t,n){n.r(t);var i=n(70655),r=n(71230),s=n(15746),a=n(91894),l=n(19650),o=n(25499),u=n(34901),c=n(67294),d=n(68432),p=n(15137),v=n(33994),m=n(75642),f=n(19521),E=n(3460),h=n(58603),y=n(76597),C=n(113),b=n(83716),R=n(40040),T=n(33873),g=n(16177),D=n(69523),w=n(80646),O=n(8752),P=n(79839),A=n(95549),S=n(67167),k=n(24854),Z=n(1727),_=n(62761),U=n(27914),M=n(61105),N=n(64632),F=n(59583),G=n(90058),J=n(76373),I=n(45629),L=n(93895),q=n(24671),x=n(39570),V=n(24378),B=n(40734),Q=n(38333),Y=n(73553),z=n(46321);t.default=(0,E.w)((function(){var e,t=(0,d.$)().t,n=(0,h.Eu)().currentUser,E=null!==(e=null==n?void 0:n.id)&&void 0!==e?e:"",H=(0,p.k6)(),K=(0,p.UO)(),W=K.fqn,$=K.tab,X=void 0===$?N.M8.CODE:$,j=(0,O.BL)().getEntityPermissionByFqn,ee=(0,v.$J)(),te=ee.postFeed,ne=ee.deleteFeed,ie=ee.updateFeed,re=(0,i.CR)((0,c.useState)(!0),2),se=re[0],ae=re[1],le=(0,i.CR)((0,c.useState)(),2),oe=le[0],ue=le[1],ce=(0,i.CR)((0,c.useState)(x.Bd),2),de=ce[0],pe=ce[1],ve=(0,i.CR)((0,c.useState)(!1),2),me=ve[0],fe=ve[1],Ee=(0,i.CR)((0,c.useState)(0),2),he=Ee[0],ye=Ee[1],Ce=(0,i.CR)((0,c.useState)(""),2),be=Ce[0],Re=Ce[1],Te=(0,i.CR)((0,c.useState)(F.T.Conversation),2),ge=Te[0],De=Te[1],we=(0,c.useMemo)((function(){return(0,B.p2)(W)}),[W]),Oe=(0,c.useMemo)((function(){var e,t,n,r,s;return(0,i.pi)((0,i.pi)({},oe),{tier:(0,Q.Zk)(null!==(e=null==oe?void 0:oe.tags)&&void 0!==e?e:[]),tags:(0,Q.nD)(null!==(t=null==oe?void 0:oe.tags)&&void 0!==t?t:[]),entityName:(0,q.C_)(oe),entityFQN:null!==(n=null==oe?void 0:oe.fullyQualifiedName)&&void 0!==n?n:"",code:null!==(s=null===(r=null==oe?void 0:oe.storedProcedureCode)||void 0===r?void 0:r.code)&&void 0!==s?s:""})}),[oe]),Pe=Oe.id,Ae=void 0===Pe?"":Pe,Se=Oe.followers,ke=Oe.owner,Ze=Oe.tags,_e=Oe.tier,Ue=Oe.version,Me=Oe.code,Ne=Oe.description,Fe=Oe.deleted,Ge=Oe.entityName,Je=Oe.entityFQN,Ie=(0,c.useMemo)((function(){return{isFollowing:null==Se?void 0:Se.some((function(e){return e.id===E}))}}),[Se,E]).isFollowing,Le=(0,c.useCallback)((function(){return(0,i.mG)(void 0,void 0,void 0,(function(){var e;return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),[4,j(P.A.STORED_PROCEDURE,W)];case 1:return e=n.sent(),pe(e),[3,4];case 2:return n.sent(),(0,z.Eo)(t("server.fetch-entity-permissions-error",{entity:t("label.resource-permission-lowercase")})),[3,4];case 3:return ae(!1),[7];case 4:return[2]}}))}))}),[j]),qe=function(){(0,L.Aq)(N.py.STORED_PROCEDURE,we,ye)},xe=function(){return(0,i.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:ae(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,I.qM)(W,V.Q)];case 2:return e=i.sent(),ue(e),(0,L.nk)({displayName:(0,q.C_)(e),entityType:N.py.STORED_PROCEDURE,fqn:null!==(t=e.fullyQualifiedName)&&void 0!==t?t:"",serviceType:e.serviceType,timestamp:0,id:null!==(n=e.id)&&void 0!==n?n:""}),[3,5];case 3:return i.sent(),[3,5];case 4:return ae(!1),[7];case 5:return[2]}}))}))},Ve=(0,c.useCallback)((function(){Ue&&H.push((0,_.h4)(N.py.STORED_PROCEDURE,W,Ue+""))}),[W,Ue]),Be=(0,c.useCallback)((function(e){if(!oe)return e;var t=(0,u.qu)(null!=oe?oe:"",e);return(0,I._W)(null!=Ae?Ae:"",t)}),[oe,Ae]),Qe=function(e,t){return(0,i.mG)(void 0,void 0,void 0,(function(){var n,r;return(0,i.Jh)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,Be(e)];case 1:return n=s.sent(),ue((function(e){var r,s,a;if(e)return"tags"===t?(0,i.pi)((0,i.pi)({},e),((r={version:n.version})[t]=(0,L.ch)(null!==(a=n.tags)&&void 0!==a?a:[]),r)):(0,i.pi)((0,i.pi)({},e),((s={version:n.version})[t]=n[t],s))})),qe(),[3,3];case 2:return r=s.sent(),(0,z.Eo)(r),[3,3];case 3:return[2]}}))}))},Ye=(0,c.useCallback)((function(){return(0,i.mG)(void 0,void 0,void 0,(function(){var e,n,r,s;return(0,i.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,I.N9)(Ae,E)];case 1:return e=a.sent(),n=e.changeDescription.fieldsAdded[0].newValue,r=(0,i.ev)((0,i.ev)([],(0,i.CR)(null!=Se?Se:[])),(0,i.CR)(n)),ue((function(e){return e?(0,i.pi)((0,i.pi)({},e),{followers:r}):e})),qe(),[3,3];case 2:return s=a.sent(),(0,z.Eo)(s,t("server.entity-follow-error",{entity:(0,q.C_)(oe)})),[3,3];case 3:return[2]}}))}))}),[E,Se,oe,Ae]),ze=(0,c.useCallback)((function(){return(0,i.mG)(void 0,void 0,void 0,(function(){var e,n,r;return(0,i.Jh)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,(0,I.eR)(Ae,E)];case 1:return e=s.sent(),n=e.changeDescription.fieldsDeleted[0].oldValue,ue((function(e){var t;return e?(0,i.pi)((0,i.pi)({},e),{followers:null===(t=e.followers)||void 0===t?void 0:t.filter((function(e){return e.id!==n[0].id}))}):e})),qe(),[3,3];case 2:return r=s.sent(),(0,z.Eo)(r,t("server.entity-unfollow-error",{entity:(0,q.C_)(oe)})),[3,3];case 3:return[2]}}))}))}),[E,Ae]),He=(0,c.useCallback)((function(){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){switch(e.label){case 0:return Ie?[4,ze()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,Ye()];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))}),[Ie]),Ke=(0,c.useCallback)((function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var t;return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return oe?(t=(0,i.pi)((0,i.pi)({},oe),{owner:e?(0,i.pi)((0,i.pi)({},ke),e):void 0}),[4,Qe(t,"owner")]):[2];case 1:return n.sent(),[2]}}))}))}),[ke,oe]),We=function(){ue((function(e){return e?(0,i.pi)((0,i.pi)({},e),{deleted:!(null==e?void 0:e.deleted)}):e}))},$e=(0,c.useCallback)((function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,i.Jh)(this,(function(r){switch(r.label){case 0:return oe?(t=(0,Y.Jf)(Ze,e),n=(0,i.pi)((0,i.pi)({},oe),{tags:t}),[4,Qe(n,"tags")]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))}),[oe,Ze]),Xe=(0,c.useCallback)((function(e){return e?We():H.push("/")}),[]),je=(0,c.useCallback)((function(e){var t=e;ue((function(e){return(0,i.pi)((0,i.pi)({},null!=e?e:t),{version:t.version})}))}),[]),et=function(){fe(!0)},tt=function(){fe(!1)},nt=function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,i.Jh)(this,(function(r){switch(r.label){case 0:if(Ne===e||!oe)return[3,6];t=(0,i.pi)((0,i.pi)({},oe),{description:e}),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,Qe(t,"description")];case 2:return r.sent(),[3,5];case 3:return n=r.sent(),(0,z.Eo)(n),[3,5];case 4:return fe(!1),[7];case 5:return[3,7];case 6:fe(!1),r.label=7;case 7:return[2]}}))}))},it=function(e,t){Re(e),t&&De(t)},rt=function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,i.Jh)(this,(function(r){switch(r.label){case 0:return(0,Y.eY)(e)&&oe?(t=(0,i.ev)((0,i.ev)([],(0,i.CR)(_e?[_e]:[])),(0,i.CR)(e)),n=(0,i.pi)((0,i.pi)({},oe),{tags:t}),[4,Qe(n,"tags")]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},st=(0,c.useCallback)((function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(t){switch(t.label){case 0:return oe?[4,Be((0,i.pi)((0,i.pi)({},oe),{extension:e.extension}))]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}),[Be,oe]),at=(0,c.useMemo)((function(){return{editTagsPermission:(de.EditTags||de.EditAll)&&!(null==oe?void 0:oe.deleted),editDescriptionPermission:(de.EditDescription||de.EditAll)&&!(null==oe?void 0:oe.deleted),editCustomAttributePermission:(de.EditAll||de.EditCustomFields)&&!(null==oe?void 0:oe.deleted),editLineagePermission:(de.EditAll||de.EditLineage)&&!(null==oe?void 0:oe.deleted),viewAllPermission:de.ViewAll,viewBasicPermission:de.ViewAll||de.ViewBasic}}),[de,oe]),lt=at.editTagsPermission,ot=at.editDescriptionPermission,ut=at.editCustomAttributePermission,ct=at.editLineagePermission,dt=at.viewAllPermission,pt=at.viewBasicPermission,vt=(0,c.useMemo)((function(){var e;return[{label:c.createElement(S.Z,{"data-testid":N.M8.CODE,id:N.M8.CODE,name:t("label.code")}),key:N.M8.CODE,children:c.createElement(r.Z,{gutter:[0,16],wrap:!1},c.createElement(s.Z,{className:"p-t-sm m-l-lg tab-content-height p-r-lg",flex:"auto"},c.createElement("div",{className:"d-flex flex-col gap-4"},c.createElement(C.Z,{description:Ne,entityFqn:we,entityName:Ge,entityType:N.py.STORED_PROCEDURE,hasEditAccess:ot,isEdit:me,owner:ke,showActions:!Fe,onCancel:tt,onDescriptionEdit:et,onDescriptionUpdate:nt,onThreadLinkSelect:it}),c.createElement(a.Z,{className:"m-b-md","data-testid":"code-component"},c.createElement(A.Z,{editorClass:"custom-code-mirror-theme full-screen-editor-height",mode:{name:U.Q.SQL},options:{styleActiveLine:!1,readOnly:"nocursor"},value:Me})))),c.createElement(s.Z,{className:"entity-tag-right-panel-container","data-testid":"entity-right-panel",flex:"320px"},c.createElement(l.Z,{className:"w-full",direction:"vertical",size:"large"},c.createElement(T.Z,{activeDomain:null==oe?void 0:oe.domain,dataProducts:null!==(e=null==oe?void 0:oe.dataProducts)&&void 0!==e?e:[],hasPermission:!1}),c.createElement(k.Z,{displayType:Z.F.READ_MORE,entityFqn:we,entityType:N.py.STORED_PROCEDURE,permission:lt,selectedTags:Ze,tagType:G.c6.Classification,onSelectionChange:rt,onThreadLinkSelect:it}),c.createElement(k.Z,{displayType:Z.F.READ_MORE,entityFqn:we,entityType:N.py.STORED_PROCEDURE,permission:lt,selectedTags:Ze,tagType:G.c6.Glossary,onSelectionChange:rt,onThreadLinkSelect:it}))))},{label:c.createElement(S.Z,{count:he,id:N.M8.ACTIVITY_FEED,isActive:X===N.M8.ACTIVITY_FEED,name:t("label.activity-feed-and-task-plural")}),key:N.M8.ACTIVITY_FEED,children:c.createElement(m.K,{entityType:N.py.STORED_PROCEDURE,fqn:Je,onFeedUpdate:qe,onUpdateEntityDetails:xe})},{label:c.createElement(S.Z,{id:N.M8.LINEAGE,name:t("label.lineage")}),key:N.M8.LINEAGE,children:c.createElement(g.Z,{deleted:Fe,entity:oe,entityType:N.py.STORED_PROCEDURE,hasEditAccess:ct})},{label:c.createElement(S.Z,{id:N.M8.CUSTOM_PROPERTIES,name:t("label.custom-property-plural")}),key:N.M8.CUSTOM_PROPERTIES,children:c.createElement(y.t,{entityType:N.py.STORED_PROCEDURE,handleExtensionUpdate:st,hasEditAccess:ut,hasPermission:dt})}]}),[Me,Ze,me,Fe,he,X,Je,Ge,Ne,oe,we,lt,ct,ot,ut,dt]);return(0,c.useEffect)((function(){W&&Le()}),[W]),(0,c.useEffect)((function(){pt&&(xe(),qe())}),[W,de]),se?c.createElement(D.Z,null):pt?oe?c.createElement(w.Z,{className:"bg-white",pageTitle:t("label.entity-detail-plural",{entity:t("label.stored-procedure")})},c.createElement(r.Z,{gutter:[0,12]},c.createElement(s.Z,{className:"p-x-lg","data-testid":"entity-page-header",span:24},c.createElement(R.U$,{afterDeleteAction:Xe,afterDomainUpdateAction:je,dataAsset:oe,entityType:N.py.STORED_PROCEDURE,permissions:de,onDisplayNameUpdate:function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var t;return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return oe?(t=(0,i.pi)((0,i.pi)({},oe),{displayName:e.displayName}),[4,Qe(t,"displayName")]):[2];case 1:return n.sent(),[2]}}))}))},onFollowClick:He,onOwnerUpdate:Ke,onRestoreDataAsset:function(){return(0,i.mG)(void 0,void 0,void 0,(function(){var e;return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,I.tW)(Ae)];case 1:return n.sent(),(0,z.XA)(t("message.restore-entities-success",{entity:t("label.stored-procedure-plural")}),2e3),We(),[3,3];case 2:return e=n.sent(),(0,z.Eo)(e,t("message.restore-entities-error",{entity:t("label.stored-procedure-plural")})),[3,3];case 3:return[2]}}))}))},onTierUpdate:$e,onUpdateVote:function(e,t){return(0,i.mG)(void 0,void 0,void 0,(function(){var n,r;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,(0,I.z_)(t,e)];case 1:return i.sent(),[4,(0,I.qM)(W,V.Q)];case 2:return n=i.sent(),ue(n),[3,4];case 3:return r=i.sent(),(0,z.Eo)(r),[3,4];case 4:return[2]}}))}))},onVersionClick:Ve})),c.createElement(s.Z,{span:24},c.createElement(o.Z,{destroyInactiveTabPane:!0,activeKey:null!=X?X:N.M8.CODE,className:"entity-details-page-tabs","data-testid":"tabs",items:vt,onChange:function(e){return function(e){e!==X&&H.push((0,_.Bz)(we,e))}(e)}})),be?c.createElement(f.Z,{createThread:function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var n;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,(0,J.Kl)(e)];case 1:return i.sent(),qe(),[3,3];case 2:return n=i.sent(),(0,z.Eo)(n,t("server.create-entity-error",{entity:t("label.conversation")})),[3,3];case 3:return[2]}}))}))},deletePostHandler:ne,open:Boolean(be),postFeedHandler:te,threadLink:be,threadType:ge,updateThreadHandler:ie,onCancel:function(){Re("")}}):null)):c.createElement(b.Z,null):c.createElement(b.Z,{type:M.Wx.PERMISSION})}))}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy