(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5158],{57300:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-catalog/[systemId]/resources",function(){return a(21174)}])},79609:function(e,t,a){"use strict";a.d(t,{N4:function(){return i},UG:function(){return o},xw:function(){return n}});var s=a(54427);let{useGetCatalogSystemsQuery:o,useGetCatalogProjectsQuery:n,useGetCatalogDatasetsQuery:i}=a(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,s.oM)({name:"dataCatalog",initialState:{page:1,pageSize:50},reducers:{}})},21174:function(e,t,a){"use strict";a.r(t);var s=a(24246),o=a(59003),n=a(92222),i=a(86677),r=a(27378),l=a(77213),u=a(77830),c=a(58754),d=a(47935),g=a(79609),m=a(98800),p=a(81406),f=a(69172),y=a(1315);let _={items:[],total:0,page:1,size:50,pages:1};t.default=()=>{let{query:e,push:t}=(0,i.useRouter)(),a=e.systemId,C=e.monitor_config_ids,{data:w,isLoading:h}=(0,y.rn)(a),{PAGE_SIZES:v,pageSize:x,setPageSize:R,onPreviousPageClick:j,isPreviousPageDisabled:E,onNextPageClick:P,isNextPageDisabled:N,startRange:b,endRange:T,pageIndex:k,setTotalPages:D}=(0,d.oi)(),{isFetching:M,isLoading:S,data:q}=(0,g.N4)({page:k,size:x,monitor_config_ids:C}),{items:z,total:Z,pages:G}=(0,r.useMemo)(()=>null!=q?q:_,[q]);(0,r.useEffect)(()=>{D(G)},[G,D]);let[I,X]=(0,r.useState)(void 0),O=(0,f.Z)({onDetailClick:e=>X(e)}),A=(0,o.b7)({getCoreRowModel:(0,n.sC)(),getGroupedRowModel:(0,n.qe)(),getExpandedRowModel:(0,n.rV)(),columns:O,manualPagination:!0,data:z,columnResizeMode:"onChange"}),F=!S&&!h&&!M;return(0,s.jsxs)(l.Z,{title:"Data catalog",children:[(0,s.jsx)(c.Z,{heading:"Data catalog",breadcrumbItems:[{title:"All systems",href:u.mX},{title:(null==w?void 0:w.name)||a}]}),!F&&(0,s.jsx)(d.I4,{rowHeight:36,numRows:36}),F&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.ZK,{tableInstance:A,emptyTableNotice:(0,s.jsx)(p.Z,{}),onRowClick:e=>t("".concat(u.mX,"/").concat(a,"/resources/").concat(e.urn))}),(0,s.jsx)(d.s8,{totalRows:Z||0,pageSizes:v,setPageSize:R,onPreviousPageClick:j,isPreviousPageDisabled:E,onNextPageClick:P,isNextPageDisabled:N,startRange:b,endRange:T}),(0,s.jsx)(m.Z,{dataset:I,onClose:()=>X(void 0)})]})]})}}},function(e){e.O(0,[3872,2888,9774,179],function(){return e(e.s=57300)}),_N_E=e.O()}]);