(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5158],{57300:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-catalog/[systemId]/resources",function(){return s(21174)}])},79609:function(e,t,s){"use strict";s.d(t,{N4:function(){return o},UG:function(){return i},xw:function(){return n}});var a=s(54427);let{useGetCatalogSystemsQuery:i,useGetCatalogProjectsQuery:n,useGetCatalogDatasetsQuery:o}=s(78780).u.injectEndpoints({endpoints:e=>({getCatalogSystems:e.query({query:e=>({method:"GET",url:"/plus/data-catalog/system",params:e}),providesTags:["Catalog Systems","System"]}),getCatalogProjects:e.query({query:e=>{let{...t}=e;return{method:"GET",url:"/plus/data-catalog/project",params:t}},providesTags:["Discovery Monitor Results"]}),getCatalogDatasets:e.query({query:e=>{let{...t}=e;return{method:"GET",url:"/plus/data-catalog/dataset",params:t}},providesTags:["Discovery Monitor Results"]})})});(0,a.oM)({name:"dataCatalog",initialState:{page:1,pageSize:50},reducers:{}})},98800:function(e,t,s){"use strict";var a=s(24246),i=s(20595),n=s(79789);t.Z=e=>{var t;let{dataset:s,onClose:o}=e;return(0,a.jsxs)(i.dys,{isOpen:!!s,onClose:o,size:"md",children:[(0,a.jsx)(i.P1B,{}),(0,a.jsxs)(i.scA,{children:[(0,a.jsx)(i.OXI,{children:(null==s?void 0:s.name)||(null==s?void 0:s.urn)}),(0,a.jsx)(i.cCv,{}),(0,a.jsxs)(i.Ng0,{children:[(0,a.jsx)(n.cB,{text:"Title",mt:0}),(0,a.jsx)(n.XU,{children:null!==(t=null==s?void 0:s.name)&&void 0!==t?t:null==s?void 0:s.urn}),(null==s?void 0:s.description)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.cB,{text:"Description"}),(0,a.jsx)(n.XU,{children:null==s?void 0:s.description})]})]})]})]})}},81406:function(e,t,s){"use strict";var a=s(24246),i=s(20595);t.Z=()=>(0,a.jsxs)(i.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"empty-state",alignSelf:"center",margin:"auto",children:[(0,a.jsx)(i.xvT,{fontSize:"md",fontWeight:"600",children:"No resources found"}),(0,a.jsx)(i.xvT,{fontSize:"sm",children:"You're up to date!"})]})},69172:function(e,t,s){"use strict";var a=s(24246),i=s(92222),n=s(20595),o=s(27378),r=s(47935),l=s(72625),d=s(89200),c=s(5945),u=s(8151);let g=(0,i.Cl)(),m=e=>{let{onDetailClick:t}=e;return(0,a.jsxs)(n.v2r,{children:[(0,a.jsx)(n.j2t,{as:n.wpx,size:"small",type:"text",icon:(0,a.jsx)(n.nXP,{transform:"rotate(90deg)"}),className:"w-6 gap-0","data-testid":"dataset-actions"}),(0,a.jsx)(n.qyq,{children:(0,a.jsx)(n.sNh,{"data-testid":"view-dataset-details",onClick:t,children:"View details"})})]})};t.Z=e=>{let{onDetailClick:t}=e;return(0,o.useMemo)(()=>[g.accessor(e=>e.name,{id:"name",cell:e=>(0,a.jsx)(d.Z,{resource:e.row.original}),header:"Dataset"}),g.display({id:"status",cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{status:(0,u.u)(t.original)})},header:"Status"}),g.accessor(e=>e.description,{id:"description",cell:e=>(0,a.jsx)(r.G3,{value:e.getValue()}),header:"Description"}),g.accessor(e=>e.updated_at,{id:"lastUpdated",cell:e=>(0,a.jsx)(l.Cy,{time:e.getValue()}),header:"Updated"}),g.display({id:"actions",cell:e=>{let{row:s}=e;return(0,a.jsx)(m,{onDetailClick:()=>t(s.original)})},size:25,meta:{disableRowClick:!0}})],[t])}},21174:function(e,t,s){"use strict";s.r(t);var a=s(24246),i=s(59003),n=s(92222),o=s(86677),r=s(27378),l=s(77213),d=s(77830),c=s(58754),u=s(47935),g=s(79609),m=s(98800),x=s(81406),p=s(69172),j=s(1315);let h={items:[],total:0,page:1,size:50,pages:1};t.default=()=>{let{query:e,push:t}=(0,o.useRouter)(),s=e.systemId,v=e.monitor_config_ids,{data:f,isLoading:y}=(0,j.rn)(s),{PAGE_SIZES:C,pageSize:w,setPageSize:_,onPreviousPageClick:N,isPreviousPageDisabled:R,onNextPageClick:P,isNextPageDisabled:b,startRange:D,endRange:S,pageIndex:T,setTotalPages:k}=(0,u.oi)(),{isFetching:z,isLoading:E,data:Z}=(0,g.N4)({page:T,size:w,monitor_config_ids:v}),{items:q,total:M,pages:X}=(0,r.useMemo)(()=>null!=Z?Z:h,[Z]);(0,r.useEffect)(()=>{k(X)},[X,k]);let[G,I]=(0,r.useState)(void 0),U=(0,p.Z)({onDetailClick:e=>I(e)}),O=(0,i.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:U,manualPagination:!0,data:q,columnResizeMode:"onChange"}),V=!E&&!y&&!z;return(0,a.jsxs)(l.Z,{title:"Data catalog",children:[(0,a.jsx)(c.Z,{heading:"Data catalog",breadcrumbItems:[{title:"All systems",href:d.mX},{title:(null==f?void 0:f.name)||s}]}),!V&&(0,a.jsx)(u.I4,{rowHeight:36,numRows:36}),V&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.ZK,{tableInstance:O,emptyTableNotice:(0,a.jsx)(x.Z,{}),onRowClick:e=>t("".concat(d.mX,"/").concat(s,"/resources/").concat(e.urn))}),(0,a.jsx)(u.s8,{totalRows:M||0,pageSizes:C,setPageSize:_,onPreviousPageClick:N,isPreviousPageDisabled:R,onNextPageClick:P,isNextPageDisabled:b,startRange:D,endRange:S}),(0,a.jsx)(m.Z,{dataset:G,onClose:()=>I(void 0)})]})]})}}},function(e){e.O(0,[9682,2888,9774,179],function(){return e(e.s=57300)}),_N_E=e.O()}]);