@topgroup/diginext
Version:
A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.
1 lines • 5.07 kB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6067],{47389:function(e,t,n){"use strict";var r=n(1413),i=n(67294),o=n(27363),a=n(91146),s=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:o.Z}))});t.Z=s},634:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return registry}});var r,i=n(16835),o=n(51042),a=n(73318),s=n(11163),c=n(22598),u=n(90447),d=n(59499),l=n(50029),f=n(87794),p=n.n(f),g=n(47389),h=n(48689),y=n(84213),x=n(26855),w=n(78957),j=n(86738),m=n(44973),v=n(27484),b=n.n(v),O=n(96486),Z=n(67294),k=n(95259),_=n(61123),P=n(56832),C=n(55611),S=n(85893);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,d.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var N=n(56176),A=n(84110);b().extend(A),b().extend(N);var E=[{title:"Name",width:70,dataIndex:"name",key:"name",fixed:"left",filterSearch:!0,filters:[{text:"goon",value:"goon"}],onFilter:function(e,t){return!t.name||t.name.indexOf(e.toString())>-1}},{title:"Host",width:60,dataIndex:"host",key:"host",render:function(e){return(0,S.jsx)(a.ZP,{type:"link",style:{padding:0},children:e})},filterSearch:!0,filters:[{text:"goon",value:"goon"}],onFilter:function(e,t){return!t.host||t.host.indexOf(e.toString())>-1}},{title:"Provider",dataIndex:"provider",key:"provider",width:30,render:function(e,t){return(0,S.jsx)(S.Fragment,{children:t.provider})}},{title:"Created by",dataIndex:"owner",key:"owner",width:50,filterSearch:!0,filters:[{text:"goon",value:"goon"}],onFilter:function(e,t){var n;return!t.owner||(null!==(n=t.owner.name)&&void 0!==n?n:"").indexOf(e.toString())>-1},render:function(e,t){return(0,S.jsx)(S.Fragment,{children:t.owner.name})}},{title:"Created at",dataIndex:"createdAt",key:"createdAt",width:50,render:function(e){return(0,S.jsx)(_.q,{date:e})},sorter:function(e,t){return b()(e.createdAt).diff(b()(t.createdAt))}},{title:"Updated at",dataIndex:"updatedAt",key:"updatedAt",width:50,render:function(e){return(0,S.jsx)(_.q,{date:e})},sorter:function(e,t){return b()(e.updatedAt).diff(b()(t.updatedAt))}},{title:"Action",key:"action",width:50,fixed:"right",render:function(e,t){return t.actions}}],I=null!==(r=C.XL.tableConfig.defaultPageSize)&&void 0!==r?r:20,ContainerRegistryList=function(){var e,t=(0,Z.useState)(1),n=t[0],r=t[1],o=(0,k.qB)({populate:"owner",pagination:{page:n,size:I}}),s=o.data,c=o.status,u=s||{},d=u.list,f=(u.pagination||{}).total_items,v=(0,k.Y4)(),b=(0,i.Z)(v,1)[0],_=(0,P.o)(),C=(0,i.Z)(_,2),N=(C[0],C[1].setQuery),A=(e=(0,l.Z)(p().mark(function _callee(e){var t;return p().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,b({_id:e});case 2:null!=(t=n.sent)&&t.status&&x.ZP.success({message:"Item deleted successfully."});case 4:case"end":return n.stop()}},_callee)})),function(t){return e.apply(this,arguments)}),R=(null==d?void 0:d.map(function(e){return _objectSpread(_objectSpread({},e),{},{actions:(0,O.isEmpty)(e.workspace)?null:(0,S.jsxs)(w.Z.Compact,{children:[(0,S.jsx)(a.ZP,{icon:(0,S.jsx)(g.Z,{}),onClick:function(){return N({lv1:"edit",type:"registry",registry_slug:e.slug})}}),(0,S.jsx)(j.Z,{title:"Are you sure to delete this item?",description:(0,S.jsx)("span",{className:"text-red-500",children:"Caution: this is permanent and cannot be rolled back."}),onConfirm:function(){return A(e._id)},okText:"Yes",cancelText:"No",children:(0,S.jsx)(a.ZP,{icon:(0,S.jsx)(h.Z,{})})})]})})}))||[],F=(0,Z.useRef)(null),z=(0,y.Z)(F);return(0,S.jsx)("div",{className:"h-full flex-auto overflow-hidden",ref:F,children:(0,S.jsx)(m.Z,{sticky:!0,size:"small",loading:"loading"===c,columns:E,dataSource:R,scroll:{x:1e3,y:void 0!==(null==z?void 0:z.height)?z.height-140:void 0},pagination:{pageSize:I,total:f,position:["bottomCenter"]},onChange:function(e){var t=e.current;t&&r(t)}})})},R=n(6761),F=n(1071),registry=function(){(0,s.useRouter)();var e=(0,P.o)(),t=(0,i.Z)(e,2)[1].setQuery;return(0,S.jsx)(c.Wk,{children:(0,S.jsxs)(R.o,{meta:(0,S.jsx)(F.h,{title:"Container Registries",description:"List of your container registries."}),children:[(0,S.jsx)(u.V,{title:"Container Registries",breadcrumbs:[{name:"Infrastructure"}],actions:[(0,S.jsx)(a.ZP,{type:"default",icon:(0,S.jsx)(o.Z,{className:"align-middle"}),onClick:function(){return t({lv1:"new",type:"registry"})},children:"New"},"registry-new-btn")]}),(0,S.jsx)(ContainerRegistryList,{})]})})}},40236:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/infrastructure/registry",function(){return n(634)}])}},function(e){e.O(0,[3662,5877,3945,9774,2888,179],function(){return e(e.s=40236)}),_N_E=e.O()}]);