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

assets.2154.901e89e936d5e82b9c04.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[2154],{62270:function(e,t,n){var r=n(75263).default,i=n(64836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(81670)),l=i(n(10434)),o=i(n(36228)),s=i(n(50132)),u=r(n(67294)),c=n(31929),d=n(51130),f=(i(n(13594)),n(58338)),p=i(n(93319)),v=function(e,t){var n,r,i=e.prefixCls,v=e.className,m=e.children,h=e.indeterminate,y=void 0!==h&&h,E=e.style,b=e.onMouseEnter,g=e.onMouseLeave,T=e.skipGroup,C=void 0!==T&&T,w=e.disabled,A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0&&(r=M().map((function(e){return d.createElement(p.default,{prefixCls:P,key:e.value.toString(),disabled:"disabled"in e?e.disabled:g.disabled,value:e.value,checked:D.includes(e.value),onChange:e.onChange,className:"".concat(Z,"-item"),style:e.style},e.label)})));var F={toggleOption:function(e){var t=D.indexOf(e.value),n=(0,o.default)(D);-1===t?n.push(e.value):n.splice(t,1),"value"in g||O(n);var r=M();null==b||b(n.filter((function(e){return k.includes(e)})).sort((function(e,t){return r.findIndex((function(t){return t.value===e}))-r.findIndex((function(e){return e.value===t}))})))},value:D,disabled:g.disabled,name:g.name,registerValue:function(e){N((function(t){return[].concat((0,o.default)(t),[e])}))},cancelValue:function(e){N((function(t){return t.filter((function(t){return t!==e}))}))}},G=(0,u.default)(Z,(0,l.default)({},"".concat(Z,"-rtl"),"rtl"===w),y);return d.createElement("div",(0,a.default)({className:G,style:E},I,{ref:t}),d.createElement(v.Provider,{value:F},r))},h=d.forwardRef(m),y=d.memo(h);t.default=y},3460:function(e,t,n){n.d(t,{w:function(){return l}});var r=n(70655),i=n(67294),a=n(33994),l=function(e){return function(t){return i.createElement(a.ZP,null,i.createElement(e,(0,r.pi)({},t)))}}},3511:function(e,t,n){n.d(t,{x:function(){return s}});var r=n(70655),i=n(28682),a=n(62270),l=n(96486),o=n(67294),s=function(e){var t=e.setSelectedKeys,n=e.selectedKeys,s=e.confirm,u=e.filters,c=function(e){var i=e.target.value;n.indexOf(i)>-1?t(n.filter((function(e){return e!==i}))):t((0,r.ev)((0,r.ev)([],(0,r.CR)(n)),[i])),s()};return o.createElement(i.Z,{items:null==u?void 0:u.map((function(e){return{key:e.value,label:o.createElement(a.default,{checked:n.indexOf(e.value)>-1,value:e.value,onChange:c},(0,l.startCase)(e.text))}}))})}},61289:function(e,t,n){var r=n(19650),i=n(67294),a=n(68432),l=n(38780),o=n(24135),s=n(62761),u=n(58369),c=n(81787);t.Z=function(e){var t=e.index,n=e.columnData,d=e.entityFqn,f=e.isReadOnly,p=e.onClick,v=e.entityType,m=e.hasEditPermission,h=e.onThreadLinkSelect,y=(0,a.$)().t;return i.createElement(r.Z,{className:"hover-icon-group","data-testid":"description",direction:"vertical",id:"field-description-"+t},n.field?i.createElement(o.Z,{markdown:n.field}):i.createElement("span",{className:"text-grey-muted"},y("label.no-entity",{entity:y("label.description")})),f?null:i.createElement(r.Z,{align:"baseline",size:"middle"},m&&i.createElement(l.ReactComponent,{className:"cursor-pointer hover-cell-icon","data-testid":"edit-button",height:14,name:y("label.edit"),style:{color:s.MJ},width:14,onClick:p}),i.createElement(c.Z,{data:n,entityFqn:d,entityTaskType:u.Sn.DESCRIPTION,entityType:v,onThreadLinkSelect:h})))}},55608:function(e,t,n){var r=n(70655),i=n(94184),a=n.n(i),l=n(96486),o=n(67294),s=n(24854),u=n(58369),c=n(81787);t.Z=function(e){var t,n,i=e.tags,d=e.record,f=e.index,p=e.type,v=e.entityFqn,m=e.isReadOnly,h=e.hasTagEditAccess,y=e.showInlineEditTagButton,E=e.onThreadLinkSelect,b=e.handleTagSelection,g=e.entityType;return o.createElement("div",{className:"hover-icon-group","data-testid":(0,l.lowerCase)(p)+"-tags-"+f},o.createElement("div",{className:a()("d-flex justify-content flex-col items-start"),"data-testid":"tags-wrapper"},o.createElement(s.Z,{showBottomEditButton:!0,permission:h&&!m,selectedTags:i,showHeader:!1,showInlineEditButton:y,tagType:p,onSelectionChange:function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return[4,b(e,d)];case 1:return t.sent(),[2]}}))}))}},o.createElement(o.Fragment,null,!m&&o.createElement(c.Z,{data:{fqn:null!==(t=d.fullyQualifiedName)&&void 0!==t?t:"",field:null!==(n=d.tags)&&void 0!==n?n:[]},entityFqn:v,entityTaskType:u.Sn.TAGS,entityType:g,tagSource:p,onThreadLinkSelect:E})))))}},36775:function(e,t,n){var r,i,a,l,o;n.d(t,{c6:function(){return a}}),function(e){e.Array="ARRAY",e.Boolean="BOOLEAN",e.Bytes="BYTES",e.Date="DATE",e.Double="DOUBLE",e.Enum="ENUM",e.Error="ERROR",e.Fixed="FIXED",e.Float="FLOAT",e.Int="INT",e.Long="LONG",e.Map="MAP",e.Null="NULL",e.Record="RECORD",e.String="STRING",e.Time="TIME",e.Timestamp="TIMESTAMP",e.Timestampz="TIMESTAMPZ",e.Union="UNION",e.Unknown="UNKNOWN"}(r||(r={})),function(e){e.Automated="Automated",e.Derived="Derived",e.Manual="Manual",e.Propagated="Propagated"}(i||(i={})),function(e){e.Classification="Classification",e.Glossary="Glossary"}(a||(a={})),function(e){e.Confirmed="Confirmed",e.Suggested="Suggested"}(l||(l={})),function(e){e.Avro="Avro",e.JSON="JSON",e.None="None",e.Other="Other",e.Protobuf="Protobuf"}(o||(o={}))},52154:function(e,t,n){n.r(t),n.d(t,{default:function(){return re}});var r=n(70655),i=n(34901),a=n(96486),l=n(67294),o=n(68432),s=n(15137),u=n(58603),c=n(83716),d=n(56256),f=n(19650),p=n(71230),v=n(15746),m=n(25213),h=n(25499),y=n(49795),E=n(33994),b=n(75642),g=n(3460),T=n(113),C=n(40040),w=n(33873),A=n(16177),S=n(80646),D=n(3511),O=n(61289),R=n(55608),x=n(67167),k=n(24854),N=n(1727),M=n(62761),P=n(64632),Z=n(31615),I=n(36775),F=n(30314),G=n(93895),U=n(24671),B=n(31982),H=n(39570),L=n(40734),q=n(80539),J=n(38333),V=n(73553),_=n(46321),j=n(19521),K=n(76597),Q=n(59136),Y=n(8752),z=n(79839),$=(0,g.w)((function(e){var t,n=e.updateDashboardDetailsState,g=e.charts,$=e.dashboardDetails,W=e.fetchDashboard,X=e.followDashboardHandler,ee=e.unFollowDashboardHandler,te=e.chartDescriptionUpdateHandler,ne=e.chartTagUpdateHandler,re=e.versionHandler,ie=e.createThread,ae=e.onUpdateVote,le=e.onDashboardUpdate,oe=e.handleToggleDelete,se=(0,o.$)().t,ue=(0,u.Eu)().currentUser,ce=(0,s.k6)(),de=(0,s.UO)(),fe=de.fqn,pe=de.tab,ve=void 0===pe?P.M8.DETAILS:pe,me=(0,E.$J)(),he=me.postFeed,ye=me.deleteFeed,Ee=me.updateFeed,be=(0,r.CR)((0,l.useState)(!1),2),ge=be[0],Te=be[1],Ce=(0,r.CR)((0,l.useState)(),2),we=Ce[0],Ae=Ce[1],Se=(0,r.CR)((0,l.useState)(0),2),De=Se[0],Oe=Se[1],Re=(0,r.CR)((0,l.useState)(""),2),xe=Re[0],ke=Re[1],Ne=(0,r.CR)((0,l.useState)(Z.Th.Conversation),2),Me=Ne[0],Pe=Ne[1],Ze=(0,r.CR)((0,l.useState)(H.Bd),2),Ie=Ze[0],Fe=Ze[1],Ge=(0,r.CR)((0,l.useState)([]),2),Ue=Ge[0],Be=Ge[1],He=(0,l.useMemo)((function(){return(0,L.p2)(fe)}),[fe]),Le=(0,l.useMemo)((function(){var e=$.tags,t=void 0===e?[]:e;return(0,r.pi)((0,r.pi)({},$),{tier:(0,J.Zk)(t),dashboardTags:(0,J.nD)(t),entityName:(0,U.C_)($)})}),[$]),qe=Le.owner,Je=Le.description,Ve=Le.entityName,_e=Le.followers,je=void 0===_e?[]:_e,Ke=Le.deleted,Qe=Le.dashboardTags,Ye=Le.tier,ze=(0,l.useMemo)((function(){return{isFollowing:null==je?void 0:je.some((function(e){return e.id===(null==ue?void 0:ue.id)}))}}),[je,ue]).isFollowing,$e=(0,Y.BL)().getEntityPermission,We=(0,l.useCallback)((function(){return(0,r.mG)(void 0,void 0,void 0,(function(){var e;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,$e(z.A.DASHBOARD,$.id)];case 1:return e=t.sent(),Fe(e),[3,3];case 2:return t.sent(),(0,_.Eo)(se("server.fetch-entity-permissions-error",{entity:se("label.dashboard")})),[3,3];case 3:return[2]}}))}))}),[$.id,$e,Fe]);(0,l.useEffect)((function(){$.id&&We()}),[$.id]);var Xe=(0,l.useCallback)((function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,$e(z.A.CHART,e)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,H.Bd];case 3:return[2]}}))}))}),[]),et=function(){return(0,G.Aq)(P.py.DASHBOARD,He,Oe)};(0,l.useEffect)((function(){et()}),[fe]);var tt=(0,l.useCallback)((function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t;return(0,r.Jh)(this,(function(n){switch(n.label){case 0:t=[],n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Promise.all(e.map((function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return[4,Xe(e.id)];case 1:return n=r.sent(),t.push({id:e.id,permissions:n}),[2]}}))}))})))];case 2:return n.sent(),Be(t),[3,4];case 3:return n.sent(),(0,_.Eo)(se("server.fetch-entity-permissions-error",{entity:se("label.chart")})),[3,4];case 4:return[2]}}))}))}),[$]);(0,l.useEffect)((function(){g&&tt(g)}),[g]);var nt=function(){Te(!0)},rt=function(){Te(!1)},it=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,r.Jh)(this,(function(i){switch(i.label){case 0:if(Je===e)return[3,6];t=(0,r.pi)((0,r.pi)({},$),{description:e}),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,le(t,"description")];case 2:return i.sent(),[3,5];case 3:return n=i.sent(),(0,_.Eo)(n),[3,5];case 4:return Te(!1),[7];case 5:return[3,7];case 6:Te(!1),i.label=7;case 7:return[2]}}))}))},at=(0,l.useCallback)((function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t;return(0,r.Jh)(this,(function(n){switch(n.label){case 0:return t=(0,r.pi)((0,r.pi)({},$),{owner:e?(0,r.pi)((0,r.pi)({},qe),e):void 0}),[4,le(t,"owner")];case 1:return n.sent(),[2]}}))}))}),[qe]),lt=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return[4,le((0,r.pi)((0,r.pi)({},$),{extension:e.extension}),"extension")];case 1:return t.sent(),[2]}}))}))},ot=function(e,t){Ae({chart:e,index:t})},st=function(e,t){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,a,l,o,s;return(0,r.Jh)(this,(function(u){switch(u.label){case 0:return e&&t?(n=null===(s=t.tags)||void 0===s?void 0:s.filter((function(t){return e.some((function(e){return e.tagFQN===t.tagFQN}))})),a=(0,V.eY)(e.filter((function(e){var n;return!(null===(n=t.tags)||void 0===n?void 0:n.some((function(t){return t.tagFQN===e.tagFQN})))}))),l=(0,r.pi)((0,r.pi)({},t),{tags:(0,r.ev)((0,r.ev)([],(0,r.CR)(n)),(0,r.CR)(a))}),o=(0,i.qu)(t,l),[4,ne(t.id,o)]):[3,2];case 1:u.sent(),u.label=2;case 2:return[2]}}))}))},ut=function(e,t){ke(e),t&&Pe(t)},ct=function(e){var t,n=null===(t=null==Ue?void 0:Ue.find((function(t){return t.id===e.id})))||void 0===t?void 0:t.permissions;return!(0,a.isUndefined)(n)&&(n.EditTags||n.EditAll)},dt=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,r.Jh)(this,(function(i){switch(i.label){case 0:return(0,V.eY)(e)&&$?(t=(0,r.ev)((0,r.ev)([],(0,r.CR)(Ye?[Ye]:[])),(0,r.CR)(e)),n=(0,r.pi)((0,r.pi)({},$),{tags:t}),[4,le(n,"tags")]):[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},ft=(0,l.useCallback)((function(e){return e?oe():ce.push("/")}),[]),pt=(0,l.useMemo)((function(){var e=(0,q.Ys)(g);return(0,a.groupBy)((0,a.uniqBy)(e,"value"),(function(e){return e.source}))}),[g]),vt=(0,l.useMemo)((function(){return[{title:se("label.chart-entity",{entity:se("label.name")}),dataIndex:"chartName",key:"chartName",width:200,render:function(e,t){var n=(0,U.C_)(t);return t.sourceUrl?l.createElement(d.Z.Link,{href:t.sourceUrl,target:"_blank"},l.createElement(f.Z,null,n,l.createElement(y.ReactComponent,{height:14,width:14}))):l.createElement(d.Z.Text,null,n)}},{title:se("label.chart-entity",{entity:se("label.type")}),dataIndex:"chartType",key:"chartType",width:120},{title:se("label.description"),dataIndex:"description",key:"description",width:350,render:function(e,t,n){var r,i,o=null===(r=null==Ue?void 0:Ue.find((function(e){return e.id===t.id})))||void 0===r?void 0:r.permissions,s=!(0,a.isUndefined)(o)&&(o.EditDescription||o.EditAll);return l.createElement(O.Z,{columnData:{fqn:null!==(i=t.fullyQualifiedName)&&void 0!==i?i:"",field:t.description},entityFqn:He,entityType:P.py.DASHBOARD,hasEditPermission:s,index:n,isReadOnly:Ke,onClick:function(){return ot(t,n)},onThreadLinkSelect:ut})}},{title:se("label.tag-plural"),dataIndex:"tags",key:"tags",accessor:"tags",width:300,filterIcon:(0,J.zT)("tag-filter"),render:function(e,t,n){return l.createElement(R.Z,{entityFqn:He,entityType:P.py.DASHBOARD,handleTagSelection:st,hasTagEditAccess:ct(t),index:n,isReadOnly:Ke,record:t,tags:e,type:I.c6.Classification,onThreadLinkSelect:ut})},filters:pt.Classification,filterDropdown:D.x,onFilter:q.n5},{title:se("label.glossary-term-plural"),dataIndex:"tags",key:"glossary",accessor:"tags",width:300,filterIcon:(0,J.zT)("glossary-filter"),render:function(e,t,n){return l.createElement(R.Z,{entityFqn:He,entityType:P.py.DASHBOARD,handleTagSelection:st,hasTagEditAccess:ct(t),index:n,isReadOnly:Ke,record:t,tags:e,type:I.c6.Glossary,onThreadLinkSelect:ut})},filters:pt.Glossary,filterDropdown:D.x,onFilter:q.n5}]}),[Ke,Ue,ut,ct,ot,st,B.S$]),mt=(0,l.useMemo)((function(){return{editTagsPermission:(Ie.EditTags||Ie.EditAll)&&!Ke,editDescriptionPermission:(Ie.EditDescription||Ie.EditAll)&&!Ke,editCustomAttributePermission:(Ie.EditAll||Ie.EditCustomFields)&&!Ke,editAllPermission:Ie.EditAll&&!Ke,editLineagePermission:(Ie.EditAll||Ie.EditLineage)&&!Ke,viewAllPermission:Ie.ViewAll}}),[Ie,Ke]),ht=mt.editTagsPermission,yt=mt.editDescriptionPermission,Et=mt.editCustomAttributePermission,bt=mt.editAllPermission,gt=mt.editLineagePermission,Tt=mt.viewAllPermission,Ct=(0,l.useMemo)((function(){var e,t;return[{label:l.createElement(x.Z,{id:P.M8.DETAILS,name:se("label.detail-plural")}),key:P.M8.DETAILS,children:l.createElement(p.Z,{gutter:[0,16],wrap:!1},l.createElement(v.Z,{className:"p-t-sm m-x-lg",flex:"auto"},l.createElement("div",{className:"d-flex flex-col gap-4"},l.createElement(T.Z,{description:$.description,entityFqn:He,entityName:Ve,entityType:P.py.DASHBOARD,hasEditAccess:yt,isEdit:ge,owner:$.owner,showActions:!Ke,onCancel:rt,onDescriptionEdit:nt,onDescriptionUpdate:it,onThreadLinkSelect:ut}),(0,a.isEmpty)(g)?l.createElement(c.Z,null):l.createElement(m.Z,{bordered:!0,columns:vt,"data-testid":"charts-table",dataSource:g,pagination:!1,rowKey:"id",scroll:{x:1200},size:"small"}))),l.createElement(v.Z,{className:"entity-tag-right-panel-container","data-testid":"entity-right-panel",flex:"320px"},l.createElement(f.Z,{className:"w-full",direction:"vertical",size:"large"},l.createElement(w.Z,{activeDomain:null==$?void 0:$.domain,dataProducts:null!==(e=null==$?void 0:$.dataProducts)&&void 0!==e?e:[],hasPermission:!1}),l.createElement(k.Z,{displayType:N.F.READ_MORE,entityFqn:He,entityType:P.py.DASHBOARD,permission:ht,selectedTags:Qe,tagType:I.c6.Classification,onSelectionChange:dt,onThreadLinkSelect:ut}),l.createElement(k.Z,{displayType:N.F.READ_MORE,entityFqn:He,entityType:P.py.DASHBOARD,permission:ht,selectedTags:Qe,tagType:I.c6.Glossary,onSelectionChange:dt,onThreadLinkSelect:ut}))))},{label:l.createElement(x.Z,{count:De,id:P.M8.ACTIVITY_FEED,isActive:ve===P.M8.ACTIVITY_FEED,name:se("label.activity-feed-and-task-plural")}),key:P.M8.ACTIVITY_FEED,children:l.createElement(b.K,{entityType:P.py.DASHBOARD,fqn:null!==(t=null==$?void 0:$.fullyQualifiedName)&&void 0!==t?t:"",onFeedUpdate:et,onUpdateEntityDetails:W})},{label:l.createElement(x.Z,{id:P.M8.LINEAGE,name:se("label.lineage")}),key:P.M8.LINEAGE,children:l.createElement(A.Z,{deleted:Ke,entity:$,entityType:P.py.DASHBOARD,hasEditAccess:gt})},{label:l.createElement(x.Z,{id:P.M8.CUSTOM_PROPERTIES,name:se("label.custom-property-plural")}),key:P.M8.CUSTOM_PROPERTIES,children:l.createElement(K.t,{entityType:P.py.DASHBOARD,handleExtensionUpdate:lt,hasEditAccess:Et,hasPermission:Tt})}]}),[De,ve,ge,vt,$,g,Ke,Ve,Qe,B.S$,rt,nt,it,ut,dt,ht,gt,yt,Et,bt,Tt]);return l.createElement(S.Z,{className:"bg-white",pageTitle:se("label.entity-detail-plural",{entity:se("label.dashboard")}),title:"Table details"},l.createElement(p.Z,{gutter:[0,12]},l.createElement(v.Z,{className:"p-x-lg",span:24},l.createElement(C.U$,{afterDeleteAction:ft,afterDomainUpdateAction:n,dataAsset:$,entityType:P.py.DASHBOARD,permissions:Ie,onDisplayNameUpdate:function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t;return(0,r.Jh)(this,(function(n){switch(n.label){case 0:return t=(0,r.pi)((0,r.pi)({},$),{displayName:e.displayName}),[4,le(t,"displayName")];case 1:return n.sent(),[2]}}))}))},onFollowClick:function(){return(0,r.mG)(void 0,void 0,void 0,(function(){return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return ze?[4,ee()]:[3,2];case 1:return e.sent(),[3,4];case 2:return[4,X()];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},onOwnerUpdate:at,onRestoreDataAsset:function(){return(0,r.mG)(void 0,void 0,void 0,(function(){var e;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,F.Fg)($.id)];case 1:return t.sent(),(0,_.XA)(se("message.restore-entities-success",{entity:se("label.dashboard")}),2e3),oe(),[3,3];case 2:return e=t.sent(),(0,_.Eo)(e,se("message.restore-entities-error",{entity:se("label.dashboard")})),[3,3];case 3:return[2]}}))}))},onTierUpdate:function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t,n,i;return(0,r.Jh)(this,(function(a){switch(a.label){case 0:return t=(0,V.Jf)(null!==(i=null==$?void 0:$.tags)&&void 0!==i?i:[],e),n=(0,r.pi)((0,r.pi)({},$),{tags:t}),[4,le(n,"tags")];case 1:return a.sent(),[2]}}))}))},onUpdateVote:ae,onVersionClick:re})),l.createElement(v.Z,{span:24},l.createElement(h.Z,{activeKey:null!=ve?ve:P.M8.SCHEMA,className:"entity-details-page-tabs","data-testid":"tabs",items:Ct,onChange:function(e){e!==ve&&ce.push((0,M.pB)(He,e))}}))),we&&l.createElement(Q.p,{header:se("label.edit-chart-name",{name:we.chart.displayName}),placeholder:se("label.enter-field-description",{field:se("label.chart")}),value:null!==(t=we.chart.description)&&void 0!==t?t:"",visible:Boolean(we),onCancel:function(){Ae(void 0)},onSave:function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var t,n,a;return(0,r.Jh)(this,(function(l){switch(l.label){case 0:if(!we)return[3,6];t=(0,r.pi)((0,r.pi)({},we.chart),{description:e}),n=(0,i.qu)(g[we.index],t),l.label=1;case 1:return l.trys.push([1,3,4,5]),[4,te(we.index,we.chart.id,n)];case 2:return l.sent(),[3,5];case 3:return a=l.sent(),(0,_.Eo)(a),[3,5];case 4:return Ae(void 0),[7];case 5:return[3,7];case 6:Ae(void 0),l.label=7;case 7:return[2]}}))}))}}),xe?l.createElement(j.Z,{createThread:ie,deletePostHandler:ye,open:Boolean(xe),postFeedHandler:he,threadLink:xe,threadType:Me,updateThreadHandler:Ee,onCancel:function(){ke("")}}):null)})),W=n(69523),X=n(61105),ee=n(46470),te=n(76373),ne=n(13932),re=function(){var e,t=(0,o.$)().t,n=(0,u.Eu)().currentUser,d=null!==(e=null==n?void 0:n.id)&&void 0!==e?e:"",f=(0,s.k6)(),p=(0,Y.BL)().getEntityPermissionByFqn,v=(0,s.UO)().fqn,m=(0,r.CR)((0,l.useState)({}),2),h=m[0],y=m[1],E=(0,r.CR)((0,l.useState)(!1),2),b=E[0],g=E[1],T=(0,r.CR)((0,l.useState)([]),2),C=T[0],w=T[1],A=(0,r.CR)((0,l.useState)(!1),2),S=A[0],D=A[1],O=(0,r.CR)((0,l.useState)(H.Bd),2),R=O[0],x=O[1],k=h.id,N=h.version,Z=(0,l.useMemo)((function(){return R.ViewAll||R.ViewUsage}),[R]),I=function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,i,a,l,o,s,u,c;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:g(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),n=ne.he,Z&&(n+=","+P.GB.USAGE_SUMMARY),[4,(0,F.qK)(e,n)];case 2:return i=r.sent(),a=i.id,l=i.fullyQualifiedName,o=i.charts,s=i.serviceType,y(i),(0,G.nk)({displayName:(0,U.C_)(i),entityType:P.py.DASHBOARD,fqn:null!=l?l:"",serviceType:s,timestamp:0,id:a}),(0,ne.Mn)(o).then((function(e){w(e)})).catch((function(e){(0,_.Eo)(e,t("server.entity-fetch-error",{entity:t("label.chart-plural")}))})),g(!1),[3,5];case 3:return u=r.sent(),404===(null===(c=u.response)||void 0===c?void 0:c.status)?D(!0):(0,_.Eo)(u,t("server.entity-details-fetch-error",{entityType:t("label.dashboard"),entityName:e})),[3,5];case 4:return g(!1),[7];case 5:return[2]}}))}))},B=(0,l.useCallback)((function(e){var t=e;y((function(e){return(0,r.pi)((0,r.pi)({},null!=e?e:t),{version:t.version})}))}),[]);return(0,l.useEffect)((function(){(R.ViewAll||R.ViewBasic)&&I(v)}),[v,R]),(0,l.useEffect)((function(){var e;e=v,(0,r.mG)(void 0,void 0,void 0,(function(){var n;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:g(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,p(z.A.DASHBOARD,e)];case 2:return n=r.sent(),x(n),[3,5];case 3:return r.sent(),(0,_.Eo)(t("server.fetch-entity-permissions-error",{entity:e})),[3,5];case 4:return g(!1),[7];case 5:return[2]}}))}))}),[v]),b?l.createElement(W.Z,null):S?l.createElement(c.Z,null,(0,G.mW)("dashboard",v)):R.ViewAll||R.ViewBasic?l.createElement($,{chartDescriptionUpdateHandler:function(e,t,n){return(0,r.mG)(void 0,void 0,void 0,(function(){var i,a;return(0,r.Jh)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,(0,ee.L)(t,n)];case 1:return i=l.sent(),w((function(t){var n=(0,r.ev)([],(0,r.CR)(t));return n[e]=i,n})),[3,3];case 2:return a=l.sent(),(0,_.Eo)(a),[3,3];case 3:return[2]}}))}))},chartTagUpdateHandler:function(e,n){return(0,r.mG)(void 0,void 0,void 0,(function(){var i,a;return(0,r.Jh)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,(0,ee.L)(e,n)];case 1:return i=l.sent(),w((function(t){var n=(0,r.ev)([],(0,r.CR)(t)).map((function(t){return t.id===e?i:t}));return(0,ne.QM)(n)})),[3,3];case 2:return a=l.sent(),(0,_.Eo)(a,t("server.entity-updating-error",{entity:t("label.chart-plural")})),[3,3];case 3:return[2]}}))}))},charts:C,createThread:function(e){return(0,r.mG)(void 0,void 0,void 0,(function(){var n;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,(0,te.Kl)(e)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),(0,_.Eo)(n,t("server.create-entity-error",{entity:t("label.conversation")})),[3,3];case 3:return[2]}}))}))},dashboardDetails:h,fetchDashboard:function(){return I(v)},followDashboardHandler:function(){return(0,r.mG)(void 0,void 0,void 0,(function(){var e,n,i;return(0,r.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,F.vs)(k,d)];case 1:return e=a.sent(),n=e.changeDescription.fieldsAdded[0].newValue,y((function(e){var t;return(0,r.pi)((0,r.pi)({},e),{followers:(0,r.ev)((0,r.ev)([],(0,r.CR)(null!==(t=null==e?void 0:e.followers)&&void 0!==t?t:[])),(0,r.CR)(n))})})),[3,3];case 2:return i=a.sent(),(0,_.Eo)(i,t("server.entity-follow-error",{entity:(0,U.C_)(h)})),[3,3];case 3:return[2]}}))}))},handleToggleDelete:function(){y((function(e){return e?(0,r.pi)((0,r.pi)({},e),{deleted:!(null==e?void 0:e.deleted)}):e}))},unFollowDashboardHandler:function(){return(0,r.mG)(void 0,void 0,void 0,(function(){var e,n,i;return(0,r.Jh)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,(0,F.mM)(k,d)];case 1:return e=a.sent(),n=e.changeDescription.fieldsDeleted[0].oldValue,y((function(e){var t,i;return(0,r.pi)((0,r.pi)({},e),{followers:null!==(i=null===(t=e.followers)||void 0===t?void 0:t.filter((function(e){return e.id!==n[0].id})))&&void 0!==i?i:[]})})),[3,3];case 2:return i=a.sent(),(0,_.Eo)(i,t("server.entity-unfollow-error",{entity:(0,U.C_)(h)})),[3,3];case 3:return[2]}}))}))},updateDashboardDetailsState:B,versionHandler:function(){N&&f.push((0,M.h4)(P.py.DASHBOARD,v,(0,a.toString)(N)))},onDashboardUpdate:function(e,t){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,l;return(0,r.Jh)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,(s=e,u=(0,i.qu)((0,a.omitBy)(h,a.isUndefined),s),(0,F.oH)(k,u))];case 1:return n=o.sent(),y((function(e){var i,a;return(0,r.pi)((0,r.pi)({},e),((i={version:n.version})[t]="tags"===t?(0,G.ch)(null!==(a=n[t])&&void 0!==a?a:[]):n[t],i))})),[3,3];case 2:return l=o.sent(),(0,_.Eo)(l),[3,3];case 3:return[2]}var s,u}))}))},onUpdateVote:function(e,t){return(0,r.mG)(void 0,void 0,void 0,(function(){var n,i;return(0,r.Jh)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,(0,F.tr)(t,e)];case 1:return r.sent(),[4,(0,F.qK)(v,ne.he)];case 2:return n=r.sent(),y(n),[3,4];case 3:return i=r.sent(),(0,_.Eo)(i),[3,4];case 4:return[2]}}))}))}}):l.createElement(c.Z,{type:X.Wx.PERMISSION})}},81787:function(e,t,n){n.d(t,{Z:function(){return C}});var r=n(94199),i=n(19650),a=n(96486),l=n(67294),o=n(68432),s=n(15137),u=n(7873),c=n(73213),d=n(62761),f=n(58968),p=n(58369),v=n(90058),m=n(93895),h=n(70655),y=n(23031),E=n(90386),b=n(24671),g={height:14,name:"comments",width:14,style:{color:d.MJ}},T=n(86385),C=function(e){var t=e.data,n=e.tagSource,C=e.entityFqn,w=e.entityType,A=e.entityTaskType,S=e.onThreadLinkSelect,D=(0,o.$)().t,O=(0,s.k6)(),R=(0,l.useMemo)((function(){return(0,T.AI)(w)}),[w]),x=R.fqnPart,k=R.entityField,N=(0,l.useMemo)((function(){var e,n=(0,m.Td)(null!==(e=t.fqn)&&void 0!==e?e:"",x);return n.includes(c.o)?'"'+n+'"':n}),[t.fqn]),M=(0,l.useMemo)((function(){var e=!(0,a.isEmpty)(t.field);return l.createElement(r.Z,{destroyTooltipOnHide:!0,overlayClassName:"ant-popover-request-description",title:e?f.Hf[A].update:f.Hf[A].request},l.createElement(u.ReactComponent,{className:"hover-cell-icon cursor-pointer","data-testid":"task-element",height:14,name:D("label.request-tag-plural"),style:{color:d.MJ},width:14,onClick:function(){return function(e){A===p.Sn.DESCRIPTION?O.push((e?T.L6:T.Ub)(w,C,k,N)):O.push((e?T.Se:T.zt)(w,C,k,N))}(e)}}))}),[t.field]);return l.createElement(i.Z,{"data-testid":"entity-task",size:"middle"},n!==v.c6.Glossary&&M,function(e,t,n,i){var a=(0,b.ec)(t,n,i);return l.createElement(r.Z,{destroyTooltipOnHide:!0,overlayClassName:"ant-popover-request-description",title:(0,y.t)("label.list-entity",{entity:(0,y.t)("label.conversation")})},l.createElement(E.ReactComponent,(0,h.pi)({},g,{className:"hover-cell-icon cursor-pointer","data-testid":"field-thread",onClick:function(t){t.preventDefault(),t.stopPropagation(),e(a)}})))}(S,w,C,N))}}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy