(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{46756:function(e,r,t){"use strict";t.r(r);var n=t(77837),i=t(82394),o=t(75582),c=t(38860),u=t.n(c),a=t(82684),s=t(34376),l=t(1210),p=t(67971),f=t(51099),d=t(41788),g=t(55378),h=t(86673),v=t(19711),O=t(97225),b=t(82531),j=t(93348),y=t(49125),m=t(33766),P=t(59e3),w=t(28598);function _(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function Z(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?_(Object(t),!0).forEach((function(r){(0,i.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function E(){var e=(0,s.useRouter)(),r=(0,P.iV)(),t=null!==r&&void 0!==r&&r.page?r.page:0,n=(null===r||void 0===r?void 0:r.order_by)||j.kJ.CREATED_AT,i={_limit:f.Q,_offset:t*f.Q,order_by:n},c=b.ZP.pipeline_schedules.list(i,{refreshInterval:7500,revalidateOnFocus:!0}),u=c.data,d=c.mutate,_=(0,a.useMemo)((function(){return(null===u||void 0===u?void 0:u.pipeline_schedules)||[]}),[u]),E=(0,a.useMemo)((function(){var e;return(null===u||void 0===u||null===(e=u.metadata)||void 0===e?void 0:e.count)||[]}),[u]);return(0,w.jsxs)(l.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,w.jsx)(h.Z,{mx:2,my:1,children:(0,w.jsxs)(p.Z,{alignItems:"center",children:[(0,w.jsx)(v.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,w.jsx)(h.Z,{mr:1}),(0,w.jsx)(g.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,m.u7)({order_by:e.target.value,page:0})},paddingRight:4*y.iI,placeholder:"Select column",value:n||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var r=(0,o.Z)(e,2),t=r[0],n=r[1];return(0,w.jsx)("option",{value:t,children:n},t)}))})]})}),(0,w.jsx)(O.Z,{fetchPipelineSchedules:d,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:_,stickyHeader:!0}),(0,w.jsx)(h.Z,{p:2,children:(0,w.jsx)(f.Z,{maxPages:9,onUpdate:function(t){var n=Number(t),i=Z(Z({},r),{},{page:n>=0?n:0});e.push("/triggers","/triggers?".concat((0,P.uM)(i)))},page:Number(t),totalPages:Math.ceil(E/f.Q)})})]})}E.getInitialProps=(0,n.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),r.default=(0,d.Z)(E)},33766:function(e,r,t){"use strict";t.d(r,{O2:function(){return p},g_:function(){return d},u7:function(){return f}});var n=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),a=t(24224);function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){(0,i.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var p="_offset";function f(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.preserveParams,i=r.pushHistory,o=r.replaceParams,a=(0,u.iV)(),s={};t&&t.forEach((function(e){a[e]&&(s[e]=a[e])}));var p,f=o?s:a;p=window.location.pathname;var d=i?c().push:c().replace,g=l(l({},f),e);Object.entries(e).forEach((function(e){var r=(0,n.Z)(e,2),t=r[0],i=r[1];"undefined"!==typeof i&&null!==i||delete g[t]}));var h=(0,u.uM)(g);h.length>=1&&(h="?".concat(h));var v="".concat(p.split("?")[0]).concat(h);return d(c().router.pathname,v,{shallow:!0})}function d(e,r,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,s=void 0!==u&&u,d=t.resetLimitParams,g=l({},e);i?Object.entries(r).forEach((function(e){var r=(0,n.Z)(e,2),t=r[0],i=r[1];if(Array.isArray(i)){var o="".concat(t,"[]");g[o]=i.map(String)}})):o?Object.entries(r).forEach((function(e){var r=(0,n.Z)(e,2),t=r[0],i=r[1],o=String(i),c="".concat(t,"[]"),u=g[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?g[c]=(0,a.Od)(u,(function(e){return e===o})):g[c]=u.concat(o):g[c]=[o]})):g=l(l({},g),r),d&&(g._limit=c||20,g[p]=0),f(g,{pushHistory:s})}},59733:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(46756)}])}},function(e){e.O(0,[3850,5716,2344,4506,6166,8180,174,9774,2888,179],(function(){return r=59733,e(e.s=r);var r}));var r=e.O();_N_E=r}]);