mage-ai 0.9.13__py3-none-any.whl → 0.9.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/ai/generator.py +1 -1
- mage_ai/ai/generator_cmds.py +1 -1
- mage_ai/ai/llm_pipeline_wizard.py +31 -17
- mage_ai/api/policies/PipelineRunPolicy.py +1 -0
- mage_ai/api/presenters/BlockRunPresenter.py +4 -1
- mage_ai/api/presenters/PipelineRunPresenter.py +2 -0
- mage_ai/api/resources/BlockRunResource.py +18 -12
- mage_ai/api/resources/GitBranchResource.py +8 -1
- mage_ai/api/resources/PipelineResource.py +30 -14
- mage_ai/data_integrations/sources/constants.py +1 -0
- mage_ai/data_preparation/git/__init__.py +18 -0
- mage_ai/data_preparation/models/block/__init__.py +13 -1
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +5 -2
- mage_ai/data_preparation/models/block/integration/__init__.py +1 -1
- mage_ai/data_preparation/models/custom_templates/utils.py +14 -4
- mage_ai/data_preparation/models/variable.py +5 -2
- mage_ai/orchestration/db/models/schedules.py +4 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → CNjkRIWPaAu1yJUmIaX_q}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2786-f71862671f66d948.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-ff1faac7a72b1af1.js → triggers-624a2d7cbe6303b4.js} +1 -1
- mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +11 -11
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{1005-ee665ba499795660.js → 1005-a2f0e3ee378ef02b.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-fca78f21a81a7183.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-f71862671f66d948.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7e4dd11e3f3b8e79.js +1 -0
- mage_ai/server/{frontend_dist/_next/static/chunks/9605-e40d076d9fc36d83.js → frontend_dist_base_path_template/_next/static/chunks/9605-9332e1686c46da7d.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-ccc78f4c29a2a431.js → _app-9dae6fa5126cf001.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-ddaca2c267def72a.js → syncs-484581ae34a1c596.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-ff1faac7a72b1af1.js → triggers-624a2d7cbe6303b4.js} +1 -1
- mage_ai/server/{frontend_dist/_next/static/chunks/pages/triggers-eee16a91f281f92d.js → frontend_dist_base_path_template/_next/static/chunks/pages/triggers-71bbb30dd9b57f80.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → yJvL-3bfsNF3WCStZ10Dm}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +11 -11
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/services/spark/spark.py +75 -2
- mage_ai/tests/data_preparation/models/custom_templates/__init__.py +0 -0
- mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +36 -0
- mage_ai/tests/data_preparation/models/test_block.py +48 -0
- mage_ai/tests/services/spark/__init__.py +0 -0
- mage_ai/tests/services/spark/test_spark.py +52 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.14.dist-info}/METADATA +1 -1
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.14.dist-info}/RECORD +138 -134
- mage_ai/server/frontend_dist/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1424-846b754e84e6eac1.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2786-ba6f486fcaf52ba0.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7496-7d0f9adf0b333801.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-615ab9e61f0f39ed.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs-df014ddb14ebcef4.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → CNjkRIWPaAu1yJUmIaX_q}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{O4HzlRY2U3Q47jF8s3D-E → CNjkRIWPaAu1yJUmIaX_q}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → yJvL-3bfsNF3WCStZ10Dm}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{gJQ7p6K0VGDZzX1HXtRED → yJvL-3bfsNF3WCStZ10Dm}/_ssgManifest.js +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.14.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.14.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.14.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.13.dist-info → mage_ai-0.9.14.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{51099:function(n,e,t){"use strict";t.d(e,{Q:function(){return a}});t(82684);var i=t(60328),r=t(67971),o=t(86673),u=t(22341),l=t(73899),c=t(49125),s=t(28598),a=22;e.Z=function(n){var e=n.page,t=n.maxPages,a=n.onUpdate,d=n.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(n,e){return e}));else{var h=Math.floor(f/2),v=e-h;e+h>=d?(v=d-f+2,f-=2):e-h<=0?(v=0,f-=2):(f-=4,v=e-Math.floor(f/2)),p=Array.from({length:f},(function(n,e){return e+v}))}return(0,s.jsx)(s.Fragment,{children:d>0&&(0,s.jsxs)(r.ZP,{alignItems:"center",children:[(0,s.jsx)(i.Z,{disabled:0===e,onClick:function(){return a(e-1)},children:(0,s.jsx)(u.Hd,{size:1.5*c.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{onClick:function(){return a(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(n){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{onClick:function(){n!==e&&a(n)},notClickable:n===e,backgroundColor:n===e&&l.a$,borderLess:!0,noBackground:!0,children:n+1})},n)})),!p.includes(d-1)&&(0,s.jsxs)(s.Fragment,{children:[!p.includes(d-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(i.Z,{onClick:function(){return a(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(i.Z,{disabled:e===d-1,onClick:function(){return a(e+1)},children:(0,s.jsx)(u.Kw,{size:1.5*c.iI,stroke:"#AEAEAE"})})]})})}},40030:function(n,e,t){"use strict";var i=t(38626),r=t(23831),o=i.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:3;",""],(function(n){return"\n background-color: ".concat(n.backgroundColor||(n.theme.background||r.Z.background).page,";\n border-bottom: 1px solid ").concat((n.theme.borders||r.Z.borders).medium,";\n ")}));e.Z=o},22673:function(n,e,t){"use strict";var i=t(82684),r=t(68792),o=t(31811),u=t(38626),l=t(65292),c=t(23831),s=t(2005),a=t(49125),d=t(28598);e.Z=function(n){var e=n.language,t=n.maxWidth,p=n.showLineNumbers,f=n.small,h=n.source,v=n.wrapLines,g=(0,i.useContext)(u.ThemeContext);function m(n){var i=n.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(g.background||c.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:s.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:e,lineNumberStyle:{color:(g.content||c.Z.content).muted},showLineNumbers:p,style:l._4,useInlineStyles:!0,wrapLines:v,children:i})}return(0,d.jsx)(r.D,{components:{code:function(n){var e=n.children;return(0,d.jsx)(m,{value:e})}},children:h})}},30264:function(n,e,t){"use strict";var i=t(82394),r=t(26304),o=(t(82684),t(47999)),u=t(62084),l=t(28598),c=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function s(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function a(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?s(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}e.Z=function(n){var e=n.children,t=n.items,i=n.open,s=n.onClickCallback,d=n.onClickOutside,p=n.parentRef,f=n.uuid,h=(0,r.Z)(n,c),v=(0,l.jsxs)("div",{style:{position:"relative",zIndex:d?3:2},children:[(0,l.jsx)("div",{ref:p,children:e}),(0,l.jsx)(u.Z,a(a({},h),{},{items:t,onClickCallback:s,open:i,parentRef:p,uuid:f}))]});return d?(0,l.jsx)(o.Z,{onClickOutside:d,open:!0,children:v}):v}},32316:function(n,e,t){"use strict";t.d(e,{Z:function(){return g}});var i=t(82684),r=t(60328),o=t(67971),u=t(882),l=t(86673),c=t(19711),s=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),v=t(28598);var g=function(n){var e=n.allowScroll,t=n.compact,a=n.contained,p=n.noPadding,g=n.onClickTab,m=n.regularSizeText,b=n.selectedTabUUID,x=n.small,j=n.tabs,C=(0,i.useMemo)((function(){var n=j.length,e=[];return j.forEach((function(i,a){var p=i.Icon,f=i.IconSelected,j=i.label,C=i.uuid,Z=C===b,k=Z&&f||p,y=j?j():C,_=(0,v.jsxs)(o.ZP,{alignItems:"center",children:[k&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(k,{default:!Z,size:2*d.iI}),(0,v.jsx)(l.Z,{mr:1})]}),(0,v.jsx)(c.ZP,{bold:!0,default:!Z,noWrapping:!0,small:!m,children:y})]});a>=1&&n>=2&&e.push((0,v.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(C))),Z?e.push((0,v.jsx)(u.Z,{backgroundGradient:s.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||x,onClick:function(n){(0,h.j)(n),g(i)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:x,children:_},C)):e.push((0,v.jsx)("div",{style:{padding:2},children:(0,v.jsx)(r.Z,{borderLess:!0,compact:t||x,default:!0,onClick:function(n){(0,h.j)(n),g(i)},outline:!0,small:x,children:_})},"button-tab-".concat(C)))})),e}),[t,g,b,x,j]),Z=(0,v.jsx)(o.ZP,{alignItems:"center",children:C});return a?Z:(0,v.jsx)(f,{allowScroll:e,noPadding:p,children:Z})}},95820:function(n,e,t){"use strict";t.d(e,{i:function(){return a}});t(82684);var i=t(38626),r=(t(93461),t(67971),t(10919),t(86673),t(47329)),o=t.n(r);o().node,o().node,o().node.isRequired,o().bool,o().string.isRequired;t(19711);var u=t(31969),l=t(2005),c=t(49125),s=t(73942),a=(t(28598),"tab");i.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(n){return n.containerWidthPercentage&&"\n width: ".concat(n.containerWidthPercentage,"%;\n ")})),i.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],s.BG,s.BG,6*c.iI,(function(n){return n.noBottomBorder&&"\n border-bottom: none;\n "}),(function(n){return n.active&&"\n border-bottom: ".concat(c.cd,"px solid;\n border-color: ").concat((n.theme.interactive||u.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.fullWidth&&"\n width: 100%;\n "})),i.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(n){return n.bold&&"\n font-family: ".concat(l.nF,";\n ")}),(function(n){return n.fullWidth&&"\n justify-content: center;\n "}),(function(n){return!n.disabled&&"\n &:hover {\n path {\n fill: ".concat((n.theme.content||u.Z.interactive).linkPrimary," !important;\n }\n }\n ")}))},77492:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return Q}});var i=t(77837),r=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(83455),a=t(34376),d=t(28598);var p=function(n){var e=n.size;return(0,d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,d.jsx)("defs",{children:(0,d.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(27125),h=t(60328),v=t(32316),g=t(47999),m=t(67971),b=t(30264),x=t(40030),j=t(51099);var C=function(n){var e=n.size;return(0,d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("g",{clipPath:"url(#clip0_3007_70027)",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,d.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,d.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},Z=t(60547),k=t(47409),y=t(97496),_=t(62609),w=t(41788),P=t(55378),O=t(86673),I=t(54283),S=t(82531),R=t(56681),E=t(66166),H=t(22341),M=t(33766),N=t(59920),T=t(98781),V=t(66050),D=t(95820),A=t(49125),B=t(13740),L=t(7715),z=t(96510),U=t(59e3);function F(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,i)}return t}function G(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?F(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var W={Icon:H.Nt,IconSelected:C,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},q={Icon:H.Re,IconSelected:p,label:function(){return"Block runs"},uuid:"block_runs"},K=[W,q];function X(n){var e,t,i=n.pipeline,o=(0,a.useRouter)(),u=(0,c.useRef)(null),l=(0,c.useState)(null),p=l[0],C=l[1],w=(0,c.useState)(W),F=w[0],X=w[1],Q=(0,c.useState)(R.G7[0]),Y=Q[0],$=Q[1],J=(0,c.useState)({}),nn=J[0],en=J[1],tn=(0,c.useState)(!1),rn=tn[0],on=tn[1],un=(0,c.useState)(!1),ln=un[0],cn=un[1],sn=(0,c.useState)(null),an=sn[0],dn=sn[1],pn=(0,c.useState)(null),fn=pn[0],hn=pn[1],vn=(0,c.useMemo)((function(){return W.uuid===(null===F||void 0===F?void 0:F.uuid)}),[null===F||void 0===F?void 0:F.uuid]),gn=i.uuid,mn=S.ZP.pipelines.detail(gn,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,bn=(0,c.useMemo)((function(){return G(G({},null===mn||void 0===mn?void 0:mn.pipeline),{},{uuid:gn})}),[mn,gn]),xn=(0,c.useState)(),jn=xn[0],Cn=xn[1],Zn=(0,U.iV)(),kn=(0,E.Z)(Zn),yn=null!==Zn&&void 0!==Zn&&Zn.page?Zn.page:0;(0,c.useEffect)((function(){var n=Zn.pipeline_run_id,e=Zn.status;if(!(0,L.Xy)(Zn,kn)){var t=G(G({},kn),Zn);n?t.pipeline_run_id=n:t.pipeline_uuid=gn,e?t.status=e:delete t.status,hn(t),en({})}}),[gn,Zn,kn]);var _n={_limit:30,_offset:30*yn,pipeline_uuid:gn},wn=(0,L.gR)(G(G({},fn),_n),[D.i,"page"]);vn&&(wn=(0,L.gR)(wn,[M.O2]));var Pn=S.ZP.block_runs.list(wn,{},{pauseFetch:!fn}).data,On=(0,c.useMemo)((function(){return(null===Pn||void 0===Pn?void 0:Pn.block_runs)||[]}),[Pn]),In=G({},_n);null!==Zn&&void 0!==Zn&&Zn.status&&(In.status=Zn.status),vn||(In=(0,L.gR)(In,[M.O2]));var Sn=S.ZP.pipeline_runs.list(In,{refreshInterval:5e3},{pauseFetch:!gn}),Rn=Sn.data,En=Sn.mutate,Hn=(0,c.useMemo)((function(){return(null===Rn||void 0===Rn?void 0:Rn.pipeline_runs)||[]}),[Rn]),Mn=(0,c.useMemo)((function(){var n,e;return vn?(null===Rn||void 0===Rn||null===(n=Rn.metadata)||void 0===n?void 0:n.count)||[]:(null===Pn||void 0===Pn||null===(e=Pn.metadata)||void 0===e?void 0:e.count)||[]}),[null===Pn||void 0===Pn||null===(e=Pn.metadata)||void 0===e?void 0:e.count,null===Rn||void 0===Rn||null===(t=Rn.metadata)||void 0===t?void 0:t.count,vn]),Nn=(0,c.useMemo)((function(){return Hn.some((function(n){var e=n.status;return e===V.V.INITIAL||e===V.V.RUNNING}))}),[Hn]),Tn=(0,c.useMemo)((function(){return Object.values(nn||{}).filter((function(n){return null!==n}))}),[nn]),Vn=Tn.length,Dn=(0,c.useMemo)((function(){return Object.values(nn||{}).filter((function(n){return null!==n&&k.BF.includes(null===n||void 0===n?void 0:n.status)}))}),[nn]),An=Dn.length,Bn=(0,s.Db)(S.ZP.pipelines.useUpdate(gn),{onSuccess:function(n){return(0,z.wD)(n,{callback:function(){en({}),En()},onErrorCallback:function(n,e){return C({errors:e,response:n})}})}}),Ln=(0,r.Z)(Bn,2),zn=Ln[0],Un=(Ln[1].isLoading,(0,E.Z)(F));(0,c.useEffect)((function(){var n=Zn[D.i];n&&X(K.find((function(e){return e.uuid===n})))}),[Zn,F,Un]);var Fn=(0,c.useMemo)((function(){return[{isGroupingTitle:!0,label:function(){return"".concat(Vn," selected")},uuid:"runs_selected_count"},{beforeIcon:(0,d.jsx)(H.hY,{muted:0===Vn}),disabled:0===Vn,label:function(){return"Retry selected (".concat(Vn,")")},onClick:function(){return zn({pipeline:{pipeline_runs:Tn,status:T.QK.RETRY}})},uuid:"retry_selected"},{beforeIcon:(0,d.jsx)(H.uy,{muted:0===An}),disabled:0===An,label:function(){return"Cancel selected running (".concat(An,")")},onClick:function(){return zn({pipeline:{pipeline_runs:Dn,status:V.V.CANCELLED}})},uuid:"cancel_selected_running"},{beforeIcon:(0,d.jsx)(H.uy,{muted:!(Nn&&vn)}),disabled:!(Nn&&vn),label:function(){return"Cancel all running"},onClick:function(){return zn({pipeline:{status:V.V.CANCELLED}})},openConfirmationDialogue:!0,uuid:"cancel_all_running"}]}),[Nn,vn,Dn,An,Tn,Vn,zn]),Gn=(0,c.useMemo)((function(){return(0,d.jsx)(O.Z,{p:2,children:(0,d.jsx)(j.Z,{maxPages:9,onUpdate:function(n){var e=Number(n),t=G(G({},Zn),{},{page:e>=0?e:0});o.push("/pipelines/[pipeline]/runs","/pipelines/".concat(gn,"/runs?").concat((0,U.uM)(t)))},page:Number(yn),totalPages:Math.ceil(Mn/30)})})}),[yn,gn,Zn,o,Mn]),Wn=(0,c.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.Z,{allowBulkSelect:(null===bn||void 0===bn?void 0:bn.type)!==T.qL.STREAMING,fetchPipelineRuns:En,onClickRow:function(n){return Cn((function(e){var t=Hn[n];return(null===e||void 0===e?void 0:e.id)!==t.id?t:null}))},pipelineRuns:Hn,selectedRun:jn,selectedRuns:nn,setErrors:C,setSelectedRuns:en}),Gn]})}),[En,Gn,null===bn||void 0===bn?void 0:bn.type,Hn,jn,nn]),qn=(0,c.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Z,{blockRuns:On,pipeline:bn}),Gn]})}),[On,Gn,bn]);return(0,d.jsxs)(Z.Z,{afterHidden:vn&&!jn,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:vn?function(n){return(0,R.ZP)(G(G({},n),{},{selectedRun:jn,selectedTab:Y,setSelectedTab:$}))}:function(n){return(0,R.ZP)(n)},errors:p,pageName:N.M.RUNS,pipeline:bn,setErrors:C,title:function(n){var e=n.name;return"".concat(e," runs")},uuid:"".concat(N.M.RUNS,"_").concat(gn),children:[(0,d.jsx)(x.Z,{children:(0,d.jsx)(O.Z,{pr:1,py:1,children:(0,d.jsxs)(m.ZP,{alignItems:"center",children:[(0,d.jsx)(v.Z,{onClickTab:function(n){var e=n.uuid;hn(null),(0,M.u7)({tab:e},{replaceParams:!0})},selectedTabUUID:null===F||void 0===F?void 0:F.uuid,tabs:K}),(0,d.jsx)(B.lZ,{right:1}),(0,d.jsxs)(O.Z,{px:2,children:[(0,d.jsx)(b.Z,{items:Fn,onClickCallback:function(){return on(!1)},onClickOutside:function(){return on(!1)},open:rn,parentRef:u,roundedStyle:!0,setConfirmationAction:dn,setConfirmationDialogueOpen:cn,topOffset:4,uuid:"PipelineRuns/ActionsMenu",children:(0,d.jsx)(h.Z,{afterIcon:(0,d.jsx)(H.K5,{}),onClick:function(){return on((function(n){return!n}))},outline:!0,padding:"6px 12px",children:"Actions"})}),(0,d.jsx)(g.Z,{onClickOutside:function(){return cn(!1)},open:ln,children:(0,d.jsx)(_.Z,{danger:!0,onCancel:function(){return cn(!1)},onClick:function(){null===an||void 0===an||an(),cn(!1)},subtitle:"This includes runs on other pages as well, not just the current page.",title:"Are you sure you want to cancel all pipeline runs in progress?",width:40*A.iI})})]}),vn&&(0,d.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(n){n.preventDefault(),"all"===n.target.value?(hn(null),(0,M.u7)({tab:W.uuid},{replaceParams:!0})):(0,M.u7)({page:0,status:n.target.value})},paddingRight:4*A.iI,placeholder:"Select run status",value:null===fn||void 0===fn?void 0:fn.status,children:[(0,d.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),k.IK.map((function(n){return(0,d.jsx)("option",{value:n,children:k.Do[n]},n)}))]})]})})}),Rn||Pn?(0,d.jsxs)(d.Fragment,{children:[vn&&Wn,q.uuid===(null===F||void 0===F?void 0:F.uuid)&&qn]}):(0,d.jsx)(O.Z,{m:3,children:(0,d.jsx)(I.Z,{inverted:!0})})]})}X.getInitialProps=function(){var n=(0,i.Z)(l().mark((function n(e){var t;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var Q=(0,w.Z)(X)},79897:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(77492)}])}},function(n){n.O(0,[844,9902,426,1774,8792,7849,1424,1005,7815,6422,547,8952,7496,2786,9774,2888,179],(function(){return e=79897,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e,n,r){var t=r(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,n){for(var r,t="",i=0,o=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)r=e.charCodeAt(c);else{if(47===r)break;r=47}if(47===r){if(o===c-1||1===l);else if(o!==c-1&&2===l){if(t.length<2||2!==i||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var u=t.lastIndexOf("/");if(u!==t.length-1){-1===u?(t="",i=0):i=(t=t.slice(0,u)).length-1-t.lastIndexOf("/"),o=c,l=0;continue}}else if(2===t.length||1===t.length){t="",i=0,o=c,l=0;continue}n&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+e.slice(o+1,c):t=e.slice(o+1,c),i=c-o-1;o=c,l=0}else 46===r&&-1!==l?++l:l=-1}return t}var i={resolve:function(){for(var e,i="",o=!1,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(void 0===e&&(e=t.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=r(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var t=arguments[r];n(t),t.length>0&&(void 0===e?e=t:e+="/"+t)}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(n(e),n(r),e===r)return"";if((e=i.resolve(e))===(r=i.resolve(r)))return"";for(var t=1;t<e.length&&47===e.charCodeAt(t);++t);for(var o=e.length,l=o-t,c=1;c<r.length&&47===r.charCodeAt(c);++c);for(var u=r.length-c,s=l<u?l:u,a=-1,d=0;d<=s;++d){if(d===s){if(u>s){if(47===r.charCodeAt(c+d))return r.slice(c+d+1);if(0===d)return r.slice(c+d)}else l>s&&(47===e.charCodeAt(t+d)?a=d:0===d&&(a=0));break}var f=e.charCodeAt(t+d);if(f!==r.charCodeAt(c+d))break;47===f&&(a=d)}var v="";for(d=t+a+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===v.length?v+="..":v+="/..");return v.length>0?v+r.slice(c+a):(c+=a,47===r.charCodeAt(c)&&++c,r.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,i=-1,o=!0,l=e.length-1;l>=1;--l)if(47===(r=e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');n(e);var t,i=0,o=-1,l=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var c=r.length-1,u=-1;for(t=e.length-1;t>=0;--t){var s=e.charCodeAt(t);if(47===s){if(!l){i=t+1;break}}else-1===u&&(l=!1,u=t+1),c>=0&&(s===r.charCodeAt(c)?-1===--c&&(o=t):(c=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!l){i=t+1;break}}else-1===o&&(l=!1,o=t+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var r=-1,t=0,i=-1,o=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===i&&(o=!1,i=c+1),46===u?-1===r?r=c:1!==l&&(l=1):-1!==r&&(l=-1);else if(!o){t=c+1;break}}return-1===r||-1===i||0===l||1===l&&r===i-1&&r===t+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var r=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+t:r+e+t:t}("/",e)},parse:function(e){n(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t,i=e.charCodeAt(0),o=47===i;o?(r.root="/",t=1):t=0;for(var l=-1,c=0,u=-1,s=!0,a=e.length-1,d=0;a>=t;--a)if(47!==(i=e.charCodeAt(a)))-1===u&&(s=!1,u=a+1),46===i?-1===l?l=a:1!==d&&(d=1):-1!==l&&(d=-1);else if(!s){c=a+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(r.base=r.name=0===c&&o?e.slice(1,u):e.slice(c,u)):(0===c&&o?(r.name=e.slice(1,l),r.base=e.slice(1,u)):(r.name=e.slice(c,l),r.base=e.slice(c,u)),r.ext=e.slice(l,u)),c>0?r.dir=e.slice(0,c-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}},l=!0;try{n[e](o,o.exports,i),l=!1}finally{l&&delete r[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},66050:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(t||(t={}))},47409:function(e,n,r){"use strict";r.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return a},IK:function(){return l},VO:function(){return o},sZ:function(){return s}});var t,i=r(82394),o=r(66050).V,l=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],u=[o.CANCELLED,o.COMPLETED,o.FAILED],s="__mage_variables",a=(t={},(0,i.Z)(t,o.CANCELLED,"Cancelled"),(0,i.Z)(t,o.COMPLETED,"Done"),(0,i.Z)(t,o.FAILED,"Failed"),(0,i.Z)(t,o.INITIAL,"Ready"),(0,i.Z)(t,o.RUNNING,"Running"),t)},98781:function(e,n,r){"use strict";r.d(n,{$1:function(){return a},G7:function(){return f},LM:function(){return v},Mj:function(){return p},QK:function(){return s},a_:function(){return h},qL:function(){return l},r0:function(){return d}});var t,i,o,l,c=r(82394),u=r(22341);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var s,a,d,f=(t={},(0,c.Z)(t,l.INTEGRATION,"Integration"),(0,c.Z)(t,l.PYTHON,"Standard"),(0,c.Z)(t,l.PYSPARK,"PySpark"),(0,c.Z)(t,l.STREAMING,"Streaming"),t),v="all",p=(l.PYTHON,l.INTEGRATION,l.STREAMING,i={},(0,c.Z)(i,v,u.ie),(0,c.Z)(i,l.INTEGRATION,u.YC),(0,c.Z)(i,l.PYTHON,u.El),(0,c.Z)(i,l.STREAMING,u.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(s||(s={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var h=(o={},(0,c.Z)(o,l.PYTHON,"python3"),(0,c.Z)(o,l.PYSPARK,"pysparkkernel"),o)},89745:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return oe}});var t=r(77837),i=r(38860),o=r.n(i),l=r(82684),c=r(60547),u=r(41788),s=r(75582),a=r(82394),d=r(93461),f=r(67971),v=r(87372),p=r(47409),h=r(86673),m=r(54283),g=r(19711),b=r(23831),x=r(22341),j=r(38626),Z=r(73942),y=r(2005),I=r(49125),N=r(31012),O=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,I.cd*I.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),k=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],k,N.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],k,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=r(90211),w=r(92083),A=r.n(w),C=r(66050),T=r(24224);function S(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function M(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},a=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=L(e);return Object.entries(d).forEach((function(e){var n,r=(0,s.Z)(e,2),a=r[0],d=r[1];if(!t||t===a){var p,h=d||{},m=h.destinations,g=void 0===m?{records_affected:null,records_inserted:null,records_updated:null}:m,b=h.sources,x=void 0===b?{records:null}:b,j=v[a]||[];if(t&&t===a&&j.every((function(e){var n=e.status;return C.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[a])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[a])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===o&&(o=0),o+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[a]||(u[a]={}),u[a][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===a||void 0===a||a.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(C.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function L(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),i=(t[0],t[1]);t[2];r[i]||(r[i]=[]),r[i].push(e)})),r}function D(e){var n=L(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return C.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,r=e.started_at,t=A().utc(n),i=A().utc(r);return t.diff(i,"second")})),c=o.length,u=i.length;r[t]={completed:c,runtime:l.length>=1?(0,T.Sm)(l)/l.length:null,total:u}})),r}function R(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return C.V.COMPLETED===n}))}(e).length||0;return t/r}function V(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,i=e.status;if(null===t||void 0===t||!t.length)return 0;var o=A().utc();if(n)o=A().utc(n);else if([p.VO.CANCELLED,p.VO.FAILED].includes(i)){var l=(0,T.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];o=A().utc(l.updated_at)}var c=A().utc(e.created_at);return o.diff(c,"second")}function G(e,n){var r,t,i,o,l,c=L(e),u=D(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[n],d[n],u[n]||{completed:null,total:null}),v=f.completed,p=f.total,h=v&&p?v/p:0,m=c[n]||[],g=m.every((function(e){var n=e.status;return C.V.COMPLETED===n})),b=(0,T.YC)(m,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,T.YC)(m,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;g?t=null===(l=(0,T.YC)(m,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(o=null===b||void 0===b?void 0:b.updated_at);var j=g?A().utc(t||o):A().utc(),Z=A().utc(x);return{completed:v,completedAt:t,done:g,progress:h,runtime:i=j.diff(Z,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(i),total:p,updatedAt:o}}var U=r(28598);function F(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?F(Object(r),!0).forEach((function(n){(0,a.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var z=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,i=(r.block_runs,r.created_at),o=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),a=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return M(r)}),[r]),N=y.errors,k=y.records,w=y.recordsProcessed,A=(0,l.useMemo)((function(){return R(r)}),[r]),C=(0,l.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),T=(0,l.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:C,warning:p.VO.CANCELLED===o}}),[C,o]),S=(0,l.useMemo)((function(){if(r){var e=V(r);return(0,E.zf)(e)}}),[r]);return(0,U.jsx)(O,Y(Y({},T),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,U.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,U.jsx)(_,Y({},T)),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,U.jsx)(h.Z,{fullWidth:!1,mt:2,children:(0,U.jsx)(P,Y(Y({},T),{},{children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[C&&(0,U.jsx)(x.Jr,{inverted:!0,size:2*I.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,U.jsx)(m.Z,{color:p.VO.INITIAL!==o?b.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0}),"\xa0",p.VO.RUNNING===o&&(0,U.jsxs)(U.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(N).length>=1&&(0,U.jsx)(h.Z,{mt:1,children:Object.entries(N).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,U.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,U.jsxs)(d.Z,{flex:1,children:[(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,U.jsx)(g.ZP,{monospace:!0,children:w>=1?(0,E.x6)(w):"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,U.jsx)(g.ZP,{monospace:!0,children:k>=1&&k>=w?(0,E.x6)(k-w):"-"})]}),p.VO.RUNNING!==o&&(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,U.jsx)(g.ZP,{monospace:!0,children:S})]})]})}),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,U.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,U.jsx)(g.ZP,{monospace:!0,children:a||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,U.jsx)(g.ZP,{monospace:!0,children:Z>=1?(0,E.x6)(Z):"-"})]})]})})]})]})}))},B=r(89565),H=r.n(B),W=r(34376),J=r(60328),K=r(10919),X=r(87815),q=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*I.iI,"px;\n ")})),Q=r(66653);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,i=(0,W.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],a=(0,l.useState)(null),d=a[0],m=a[1],b=(0,l.useMemo)((function(){return r?L(r):{}}),[r]),j=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(j).forEach((function(t){var i=(0,s.Z)(t,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?r.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,T.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,i=n.total;e+=t*(i-r)})),e}),[j]),y=(0,l.useMemo)((function(){return t?j[t]:null}),[j,t]),N=(0,l.useMemo)((function(){if(t&&j){var e=j[t]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(r)return R(r);return 0}),[y,r,t]),O=(0,l.useMemo)((function(){return(0,U.jsx)(f.ZP,{children:(0,T.w6)(101).map((function(e,n){return(0,U.jsx)(q,{even:n%2===0,fill:N>0&&Math.round(100*N)>=n},n)}))})}),[N]),k=(0,l.useMemo)((function(){if(t){var e=b[t]||[],n=e.every((function(e){var n=e.status;return C.V.COMPLETED===n})),i=(0,T.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([C.V.CANCELLED,C.V.FAILED].includes(o))return p.Do[o];if(u&&s>=1){var a=Math.ceil(u*(s-c)/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([p.VO.CANCELLED,p.VO.FAILED].includes(null===r||void 0===r?void 0:r.status))return p.Do[null===r||void 0===r?void 0:r.status];if(p.VO.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var d=Math.ceil(Z/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,Z,y,r,t]),P=(0,l.useMemo)((function(){return r&&t?G(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=V(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&P){var n=(null===P||void 0===P?void 0:P.runtime)||0;m(n),e=setInterval((function(){return m((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,P]);var _=(0,l.useMemo)((function(){if(r){if(t)return null===P||void 0===P?void 0:P.timeText;var e=V(r);return(0,E.zf)(e)}}),[r,t,P]),w=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),A=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[d]),F=(0,l.useMemo)((function(){return r?M(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),Y=F.errors,z=F.records,B=F.recordsInserted,$=F.recordsProcessed,ee=F.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?M(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:z,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:B,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,E.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===r?"-":(0,E.x6)(r)}):null!==n?o.push({label:"Rows inserted",value:(0,E.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,E.x6)(i)}),o.map((function(e){var n=e.label,r=e.value;return(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,U.jsx)(g.ZP,{headline:!0,children:r})]},n)}))}),[z,ne,B,$,ee,_,w,status]),te=(0,l.useMemo)((function(){if(!r)return(0,U.jsx)("div",{});var e=S(r);return(0,U.jsx)(X.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=G(r,e),t=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,a=(n.total,!!Y[e]);return[(0,U.jsx)(g.ZP,{danger:a,default:!a,monospace:!0,children:e},"stream"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,U.jsx)(g.ZP,{default:!0,children:[C.V.INITIAL,C.V.RUNNING].includes(u)?"-":s},"runtime"),(0,U.jsxs)("div",{children:[o&&(0,U.jsx)(x.Jr,{default:!0,size:2*I.iI}),!o&&(0,U.jsx)(f.ZP,{children:(0,T.w6)(51).map((function(e,n){return(0,U.jsx)(q,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,U.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,U.jsx)(x.B4,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[Y,j,r,t]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[t],v=null===d||void 0===d||null===(o=d.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(a=u.bookmarks)||void 0===a?void 0:a[t];if(f||v){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),h=[];p.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,U.jsx)(g.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),h.push(n)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&m.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:m,rows:h,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,d=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[a,d].forEach((function(r,t){if(r){var i=r[e],o="object"===typeof i;n.push((0,U.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,U.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",a],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:p,rows:v.map((function(e){return e.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(h.Z,{p:3,children:[t&&(0,U.jsx)(h.Z,{mb:3,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(K.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(x.Xd,{default:!0,size:1.5*I.iI}),(0,U.jsx)(h.Z,{mr:1}),(0,U.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,U.jsx)(h.Z,{mx:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,U.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(h.Z,{mr:2,my:1,children:(0,U.jsx)(v.Z,{level:5,muted:!r,children:k})}),r&&(0,U.jsx)(J.Z,{onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,U.jsx)(h.Z,{mt:2,children:O}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{mt:3,children:(0,U.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,U.jsxs)(g.ZP,{headline:!0,children:[t&&[C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&A,t&&![C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&(null===P||void 0===P?void 0:P.timeText),!t&&[p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w,!t&&![p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&_]})]}),re]})}),Object.values(Y).length>=1&&(0,U.jsxs)(h.Z,{mt:3,children:[(0,U.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(Y).map((function(e,n){var r=(0,s.Z)(e,2),i=r[0],o=r[1];return(!t||t===i)&&(0,U.jsx)(h.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],o=t.error,l=t.errors,c=t.message,u=Array.isArray(o)?o.join(" "):o;return(0,U.jsxs)("div",{children:[(0,U.jsx)(h.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,U.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!r&&(0,U.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,U.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,U.jsx)(H(),{children:u})})]})}),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(r))}))},i)}))]})]})]}),r&&!t&&(0,U.jsx)(h.Z,{my:3,children:te}),r&&t&&(0,U.jsxs)(U.Fragment,{children:[le&&(0,U.jsx)(h.Z,{my:3,children:(0,U.jsxs)(h.Z,{px:3,children:[(0,U.jsx)(v.Z,{level:5,children:"Table name"}),(0,U.jsx)(h.Z,{mt:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,U.jsx)(h.Z,{px:1,children:ie})]}),oe&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,U.jsx)(h.Z,{px:1,children:oe})]})]})]})},ee=r(82531),ne=r(59920),re=r(33766),te=r(59e3);function ie(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),o=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],a=u[1],d=(0,l.useState)(null),f=d[0],v=d[1],p=(0,l.useState)(null),h=p[0],m=p[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?m(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):h&&m(null),null!==o&&void 0!==o&&o.stream?v(o.stream):f&&v(null)}),[i,o,h,f]);var g=(0,l.useCallback)((function(){var e=h?S(h):[];return(0,U.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:f===r?null:r})},pipelineRun:h,selectedStream:f})}),[h,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");h&&(e="".concat(e,"?pipeline_run_id=").concat(h.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[r,h,f]);return(0,U.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:s,pageName:ne.M.SYNCS,pipeline:n,setErrors:a,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:i.map((function(e){var n=(null===h||void 0===h?void 0:h.id)===e.id;return(0,U.jsx)(z,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,r){"use strict";r.d(n,{O2:function(){return d},g_:function(){return v},u7:function(){return f}});var t=r(75582),i=r(82394),o=r(34376),l=r.n(o),c=r(59e3),u=r(24224);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function a(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.preserveParams,i=n.pushHistory,o=n.replaceParams,u=(0,c.iV)(),s={};r&&r.forEach((function(e){u[e]&&(s[e]=u[e])}));var d,f=o?s:u;d=window.location.pathname;var v=i?l().push:l().replace,p=a(a({},f),e);Object.entries(e).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete p[r]}));var h=(0,c.uM)(p);h.length>=1&&(h="?".concat(h));var m="".concat(d.split("?")[0]).concat(h),g=l().router.basePath;return g&&m.startsWith(g)&&(m=m.replace(g,"")),v(l().router.pathname,m,{shallow:!0})}function v(e,n,r){var i=r.addingMultipleValues,o=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,v=r.resetLimitParams,p=a({},e);i?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(r,"[]");p[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1],o=String(i),l="".concat(r,"[]"),c=p[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?p[l]=(0,u.Od)(c,(function(e){return e===o})):p[l]=c.concat(o):p[l]=[o]})):p=a(a({},p),n),v&&(p._limit=l||20,p[d]=0),f(p,{pushHistory:s})}},90211:function(e,n,r){"use strict";r.d(n,{RA:function(){return a},kC:function(){return d},vg:function(){return b},kE:function(){return I},Mp:function(){return f},Pb:function(){return u},HW:function(){return j},wX:function(){return v},x6:function(){return p},_6:function(){return h},zf:function(){return x},Y6:function(){return y},wE:function(){return N},J3:function(){return m},We:function(){return s},QV:function(){return Z},C5:function(){return g}});var t=r(75582),i=r(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=(r(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=r(24224);function u(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function a(e){return e.split(" ").join("_")}function d(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function v(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),r=(0,t.Z)(n,2),i=r[0],o=r[1],l=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(l,".").concat(o):l}function h(e,n){var r,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)r=e;else{var l=e.length,c=e[l-1];r="y"===c&&"day"!==e?"".concat(e.slice(0,l-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var u=t?p(i):i;return"".concat(u," ").concat(r)}return r}function m(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function g(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d(m(e.toLowerCase()))}function x(e){var n,r=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return r.forEach((function(i,o){if(!n){var l=(0,t.Z)(i,2),c=l[0],u=l[1],s=r.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*s&&(n=h(c,Math.round(e/s)))}})),n}function j(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function Z(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Math.pow(10,n);return Math.round((e||0)*r)/r}function y(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(l))}function I(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,r=e.split(i.sep),t=r[r.length-1].split(".");return n=1===t.length?t[0]:t.slice(0,-1).join("."),r.slice(0,r.length-1).concat(n).join(i.sep)}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{17717:function(e,n,r){var t=r(554);!function(){"use strict";var n={977:function(e){function n(e){if("string"!==typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,n){for(var r,t="",i=0,o=-1,l=0,c=0;c<=e.length;++c){if(c<e.length)r=e.charCodeAt(c);else{if(47===r)break;r=47}if(47===r){if(o===c-1||1===l);else if(o!==c-1&&2===l){if(t.length<2||2!==i||46!==t.charCodeAt(t.length-1)||46!==t.charCodeAt(t.length-2))if(t.length>2){var u=t.lastIndexOf("/");if(u!==t.length-1){-1===u?(t="",i=0):i=(t=t.slice(0,u)).length-1-t.lastIndexOf("/"),o=c,l=0;continue}}else if(2===t.length||1===t.length){t="",i=0,o=c,l=0;continue}n&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+e.slice(o+1,c):t=e.slice(o+1,c),i=c-o-1;o=c,l=0}else 46===r&&-1!==l?++l:l=-1}return t}var i={resolve:function(){for(var e,i="",o=!1,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(void 0===e&&(e=t.cwd()),c=e),n(c),0!==c.length&&(i=c+"/"+i,o=47===c.charCodeAt(0))}return i=r(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var t=arguments[r];n(t),t.length>0&&(void 0===e?e=t:e+="/"+t)}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(n(e),n(r),e===r)return"";if((e=i.resolve(e))===(r=i.resolve(r)))return"";for(var t=1;t<e.length&&47===e.charCodeAt(t);++t);for(var o=e.length,l=o-t,c=1;c<r.length&&47===r.charCodeAt(c);++c);for(var u=r.length-c,s=l<u?l:u,a=-1,d=0;d<=s;++d){if(d===s){if(u>s){if(47===r.charCodeAt(c+d))return r.slice(c+d+1);if(0===d)return r.slice(c+d)}else l>s&&(47===e.charCodeAt(t+d)?a=d:0===d&&(a=0));break}var f=e.charCodeAt(t+d);if(f!==r.charCodeAt(c+d))break;47===f&&(a=d)}var v="";for(d=t+a+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===v.length?v+="..":v+="/..");return v.length>0?v+r.slice(c+a):(c+=a,47===r.charCodeAt(c)&&++c,r.slice(c))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var r=e.charCodeAt(0),t=47===r,i=-1,o=!0,l=e.length-1;l>=1;--l)if(47===(r=e.charCodeAt(l))){if(!o){i=l;break}}else o=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!==typeof r)throw new TypeError('"ext" argument must be a string');n(e);var t,i=0,o=-1,l=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var c=r.length-1,u=-1;for(t=e.length-1;t>=0;--t){var s=e.charCodeAt(t);if(47===s){if(!l){i=t+1;break}}else-1===u&&(l=!1,u=t+1),c>=0&&(s===r.charCodeAt(c)?-1===--c&&(o=t):(c=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!l){i=t+1;break}}else-1===o&&(l=!1,o=t+1);return-1===o?"":e.slice(i,o)},extname:function(e){n(e);for(var r=-1,t=0,i=-1,o=!0,l=0,c=e.length-1;c>=0;--c){var u=e.charCodeAt(c);if(47!==u)-1===i&&(o=!1,i=c+1),46===u?-1===r?r=c:1!==l&&(l=1):-1!==r&&(l=-1);else if(!o){t=c+1;break}}return-1===r||-1===i||0===l||1===l&&r===i-1&&r===t+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!==typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,n){var r=n.dir||n.root,t=n.base||(n.name||"")+(n.ext||"");return r?r===n.root?r+t:r+e+t:t}("/",e)},parse:function(e){n(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var t,i=e.charCodeAt(0),o=47===i;o?(r.root="/",t=1):t=0;for(var l=-1,c=0,u=-1,s=!0,a=e.length-1,d=0;a>=t;--a)if(47!==(i=e.charCodeAt(a)))-1===u&&(s=!1,u=a+1),46===i?-1===l?l=a:1!==d&&(d=1):-1!==l&&(d=-1);else if(!s){c=a+1;break}return-1===l||-1===u||0===d||1===d&&l===u-1&&l===c+1?-1!==u&&(r.base=r.name=0===c&&o?e.slice(1,u):e.slice(c,u)):(0===c&&o?(r.name=e.slice(1,l),r.base=e.slice(1,u)):(r.name=e.slice(c,l),r.base=e.slice(c,u)),r.ext=e.slice(l,u)),c>0?r.dir=e.slice(0,c-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}},l=!0;try{n[e](o,o.exports,i),l=!1}finally{l&&delete r[e]}return o.exports}i.ab="//";var o=i(977);e.exports=o}()},66050:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(t||(t={}))},47409:function(e,n,r){"use strict";r.d(n,{Az:function(){return u},BF:function(){return c},Do:function(){return a},IK:function(){return l},VO:function(){return o},sZ:function(){return s}});var t,i=r(82394),o=r(66050).V,l=[o.FAILED,o.COMPLETED,o.RUNNING,o.CANCELLED,o.INITIAL],c=[o.INITIAL,o.RUNNING],u=[o.CANCELLED,o.COMPLETED,o.FAILED],s="__mage_variables",a=(t={},(0,i.Z)(t,o.CANCELLED,"Cancelled"),(0,i.Z)(t,o.COMPLETED,"Done"),(0,i.Z)(t,o.FAILED,"Failed"),(0,i.Z)(t,o.INITIAL,"Ready"),(0,i.Z)(t,o.RUNNING,"Running"),t)},98781:function(e,n,r){"use strict";r.d(n,{$1:function(){return a},G7:function(){return f},LM:function(){return v},Mj:function(){return p},QK:function(){return s},a_:function(){return h},qL:function(){return l},r0:function(){return d}});var t,i,o,l,c=r(82394),u=r(22341);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(l||(l={}));var s,a,d,f=(t={},(0,c.Z)(t,l.INTEGRATION,"Integration"),(0,c.Z)(t,l.PYTHON,"Standard"),(0,c.Z)(t,l.PYSPARK,"PySpark"),(0,c.Z)(t,l.STREAMING,"Streaming"),t),v="all",p=(l.PYTHON,l.INTEGRATION,l.STREAMING,i={},(0,c.Z)(i,v,u.ie),(0,c.Z)(i,l.INTEGRATION,u.YC),(0,c.Z)(i,l.PYTHON,u.El),(0,c.Z)(i,l.STREAMING,u.dB),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry"}(s||(s={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(d||(d={}));var h=(o={},(0,c.Z)(o,l.PYTHON,"python3"),(0,c.Z)(o,l.PYSPARK,"pysparkkernel"),o)},89745:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return oe}});var t=r(77837),i=r(38860),o=r.n(i),l=r(82684),c=r(60547),u=r(41788),s=r(75582),a=r(82394),d=r(93461),f=r(67971),v=r(87372),p=r(47409),h=r(86673),m=r(54283),g=r(19711),b=r(23831),x=r(22341),j=r(38626),Z=r(73942),y=r(2005),I=r(49125),N=r(31012),O=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,I.cd*I.iI,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||b.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),k=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||b.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).warning,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],k,N.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||b.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||b.Z.content).inverted,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],k,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||b.Z.interactive).focusBackground,";\n ")})),E=r(90211),w=r(92083),A=r.n(w),C=r(66050),T=r(24224);function S(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function L(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},a=(null===e||void 0===e?void 0:e.block_runs)||[],d=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=M(e);return Object.entries(d).forEach((function(e){var n,r=(0,s.Z)(e,2),a=r[0],d=r[1];if(!t||t===a){var p,h=d||{},m=h.destinations,g=void 0===m?{records_affected:null,records_inserted:null,records_updated:null}:m,b=h.sources,x=void 0===b?{records:null}:b,j=v[a]||[];if(t&&t===a&&j.every((function(e){var n=e.status;return C.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[a])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[a])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==g&&void 0!==g&&g.records_updated?(null===l&&(l=0),l+=Number(g.records_updated),null===c&&(c=0),c+=Number(g.records_updated)):null!==g&&void 0!==g&&g.records_inserted?(null===l&&(l=0),l+=Number(g.records_inserted),null===o&&(o=0),o+=Number(g.records_inserted)):null!==g&&void 0!==g&&g.records_affected&&(null===l&&(l=0),l+=Number(g.records_affected)),["destinations","sources"].forEach((function(e){var n=d[e]||{};null!==n&&void 0!==n&&n.error&&(u[a]||(u[a]={}),u[a][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===a||void 0===a||a.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(C.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function M(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),i=(t[0],t[1]);t[2];r[i]||(r[i]=[]),r[i].push(e)})),r}function D(e){var n=M(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return C.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,r=e.started_at,t=A().utc(n),i=A().utc(r);return t.diff(i,"second")})),c=o.length,u=i.length;r[t]={completed:c,runtime:l.length>=1?(0,T.Sm)(l)/l.length:null,total:u}})),r}function R(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return C.V.COMPLETED===n}))}(e).length||0;return t/r}function V(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,i=e.status;if(null===t||void 0===t||!t.length)return 0;var o=A().utc();if(n)o=A().utc(n);else if([p.VO.CANCELLED,p.VO.FAILED].includes(i)){var l=(0,T.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];o=A().utc(l.updated_at)}var c=A().utc(e.created_at);return o.diff(c,"second")}function G(e,n){var r,t,i,o,l,c=M(e),u=D(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},a=s.blocks||{},d=s.pipeline||{},f=(a[n],d[n],u[n]||{completed:null,total:null}),v=f.completed,p=f.total,h=v&&p?v/p:0,m=c[n]||[],g=m.every((function(e){var n=e.status;return C.V.COMPLETED===n})),b=(0,T.YC)(m,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,T.YC)(m,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;g?t=null===(l=(0,T.YC)(m,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:b&&(o=null===b||void 0===b?void 0:b.updated_at);var j=g?A().utc(t||o):A().utc(),Z=A().utc(x);return{completed:v,completedAt:t,done:g,progress:h,runtime:i=j.diff(Z,"second"),startedAt:x,status:null===b||void 0===b?void 0:b.status,timeText:(0,E.zf)(i),total:p,updatedAt:o}}var U=r(28598);function F(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?F(Object(r),!0).forEach((function(n){(0,a.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var z=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,i=(r.block_runs,r.created_at),o=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),a=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return L(r)}),[r]),N=y.errors,k=y.records,w=y.recordsProcessed,A=(0,l.useMemo)((function(){return R(r)}),[r]),C=(0,l.useMemo)((function(){return[p.VO.COMPLETED].includes(o)}),[o]),T=(0,l.useMemo)((function(){return{danger:p.VO.FAILED===o,default:p.VO.INITIAL===o,primary:p.VO.RUNNING===o,success:C,warning:p.VO.CANCELLED===o}}),[C,o]),S=(0,l.useMemo)((function(){if(r){var e=V(r);return(0,E.zf)(e)}}),[r]);return(0,U.jsx)(O,Y(Y({},T),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,U.jsxs)(f.ZP,{fullHeight:!0,justifyContent:"space-between",children:[(0,U.jsx)(_,Y({},T)),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,U.jsx)(h.Z,{fullWidth:!1,mt:2,children:(0,U.jsx)(P,Y(Y({},T),{},{children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[C&&(0,U.jsx)(x.Jr,{inverted:!0,size:2*I.iI}),[p.VO.INITIAL,p.VO.RUNNING].includes(o)&&(0,U.jsx)(m.Z,{color:p.VO.INITIAL!==o?b.Z.monotone.white:null,inverted:p.VO.INITIAL===o,small:!0}),"\xa0",p.VO.RUNNING===o&&(0,U.jsxs)(U.Fragment,{children:["\xa0",Math.round(100*A),"%"]}),![p.VO.INITIAL,p.VO.RUNNING].includes(o)&&p.Do[o],p.VO.INITIAL===o&&"Starting"]})}))}),Object.values(N).length>=1&&(0,U.jsx)(h.Z,{mt:1,children:Object.entries(N).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,U.jsxs)(g.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,U.jsxs)(d.Z,{flex:1,children:[(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,U.jsx)(g.ZP,{monospace:!0,children:w>=1?(0,E.x6)(w):"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,U.jsx)(g.ZP,{monospace:!0,children:k>=1&&k>=w?(0,E.x6)(k-w):"-"})]}),p.VO.RUNNING!==o&&(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,U.jsx)(g.ZP,{monospace:!0,children:S})]})]})}),(0,U.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(h.Z,{ml:3,py:3,children:[(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,U.jsx)(g.ZP,{monospace:!0,children:j||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,U.jsx)(g.ZP,{monospace:!0,children:a||"-"})]}),(0,U.jsxs)(h.Z,{mb:1,children:[(0,U.jsx)(g.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,U.jsx)(g.ZP,{monospace:!0,children:Z>=1?(0,E.x6)(Z):"-"})]})]})})]})]})}))},B=r(89565),H=r.n(B),W=r(34376),J=r(60328),K=r(10919),X=r(87815),q=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||b.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*I.iI,"px;\n ")})),Q=r(66653);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,i=(0,W.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],a=(0,l.useState)(null),d=a[0],m=a[1],b=(0,l.useMemo)((function(){return r?M(r):{}}),[r]),j=(0,l.useMemo)((function(){return r?D(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(j).forEach((function(t){var i=(0,s.Z)(t,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?r.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,T.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,i=n.total;e+=t*(i-r)})),e}),[j]),y=(0,l.useMemo)((function(){return t?j[t]:null}),[j,t]),N=(0,l.useMemo)((function(){if(t&&j){var e=j[t]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(r)return R(r);return 0}),[y,r,t]),O=(0,l.useMemo)((function(){return(0,U.jsx)(f.ZP,{children:(0,T.w6)(101).map((function(e,n){return(0,U.jsx)(q,{even:n%2===0,fill:N>0&&Math.round(100*N)>=n},n)}))})}),[N]),k=(0,l.useMemo)((function(){if(t){var e=b[t]||[],n=e.every((function(e){var n=e.status;return C.V.COMPLETED===n})),i=(0,T.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([C.V.CANCELLED,C.V.FAILED].includes(o))return p.Do[o];if(u&&s>=1){var a=Math.ceil(u*(s-c)/60);return"".concat((0,E._6)("minute",a,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.VO.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([p.VO.CANCELLED,p.VO.FAILED].includes(null===r||void 0===r?void 0:r.status))return p.Do[null===r||void 0===r?void 0:r.status];if(p.VO.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var d=Math.ceil(Z/60);return"".concat((0,E._6)("minute",d,!0)," to completion")}return"Select a sync"}),[b,Z,y,r,t]),P=(0,l.useMemo)((function(){return r&&t?G(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=V(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&P){var n=(null===P||void 0===P?void 0:P.runtime)||0;m(n),e=setInterval((function(){return m((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,P]);var _=(0,l.useMemo)((function(){if(r){if(t)return null===P||void 0===P?void 0:P.timeText;var e=V(r);return(0,E.zf)(e)}}),[r,t,P]),w=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),A=(0,l.useMemo)((function(){var e=Math.floor(d%86400/3600),n=Math.floor(d%3600/60),r=Math.floor(d%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[d]),F=(0,l.useMemo)((function(){return r?L(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),Y=F.errors,z=F.records,B=F.recordsInserted,$=F.recordsProcessed,ee=F.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?L(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:z,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:B,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,E.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===r?"-":(0,E.x6)(r)}):null!==n?o.push({label:"Rows inserted",value:(0,E.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,E.x6)(i)}),o.map((function(e){var n=e.label,r=e.value;return(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,U.jsx)(g.ZP,{headline:!0,children:r})]},n)}))}),[z,ne,B,$,ee,_,w,status]),te=(0,l.useMemo)((function(){if(!r)return(0,U.jsx)("div",{});var e=S(r);return(0,U.jsx)(X.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=G(r,e),t=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,a=(n.total,!!Y[e]);return[(0,U.jsx)(g.ZP,{danger:a,default:!a,monospace:!0,children:e},"stream"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,U.jsx)(g.ZP,{default:!0,children:[C.V.INITIAL,C.V.RUNNING].includes(u)?"-":s},"runtime"),(0,U.jsxs)("div",{children:[o&&(0,U.jsx)(x.Jr,{default:!0,size:2*I.iI}),!o&&(0,U.jsx)(f.ZP,{children:(0,T.w6)(51).map((function(e,n){return(0,U.jsx)(q,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,U.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,U.jsx)(x.UL,{default:!0,size:2*I.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[Y,j,r,t]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,a;if(r&&t){var d=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===d||void 0===d||null===(e=d.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[t],v=null===d||void 0===d||null===(o=d.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(a=u.bookmarks)||void 0===a?void 0:a[t];if(f||v){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),h=[];p.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,U.jsx)(g.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),h.push(n)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===d||void 0===d?void 0:d.source,"source",f],[null===d||void 0===d?void 0:d.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&m.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:m,rows:h,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},a=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,d=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(a||d){var f=Object.keys(d||a||{}).sort(),v=[];f.forEach((function(e){var n=[(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[a,d].forEach((function(r,t){if(r){var i=r[e],o="object"===typeof i;n.push((0,U.jsxs)(g.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,U.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",a],[null===u||void 0===u?void 0:u.destination,"destination",d]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(X.Z,{columnFlex:[null,1,1],columns:p,rows:v.map((function(e){return e.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(h.Z,{p:3,children:[t&&(0,U.jsx)(h.Z,{mb:3,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(K.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,U.jsxs)(f.ZP,{alignItems:"center",children:[(0,U.jsx)(x.Xd,{default:!0,size:1.5*I.iI}),(0,U.jsx)(h.Z,{mr:1}),(0,U.jsx)(g.ZP,{default:!0,children:"Syncs"})]})}),(0,U.jsx)(h.Z,{mx:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:"/"})}),(0,U.jsx)(g.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,U.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(h.Z,{mr:2,my:1,children:(0,U.jsx)(v.Z,{level:5,muted:!r,children:k})}),r&&(0,U.jsx)(J.Z,{onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,U.jsx)(h.Z,{mt:2,children:O}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h.Z,{mt:3,children:(0,U.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(g.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,U.jsxs)(g.ZP,{headline:!0,children:[t&&[C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&A,t&&![C.V.INITIAL,C.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&(null===P||void 0===P?void 0:P.timeText),!t&&[p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w,!t&&![p.VO.INITIAL,p.VO.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&_]})]}),re]})}),Object.values(Y).length>=1&&(0,U.jsxs)(h.Z,{mt:3,children:[(0,U.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(Y).map((function(e,n){var r=(0,s.Z)(e,2),i=r[0],o=r[1];return(!t||t===i)&&(0,U.jsx)(h.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],o=t.error,l=t.errors,c=t.message,u=Array.isArray(o)?o.join(" "):o;return(0,U.jsxs)("div",{children:[(0,U.jsx)(h.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,U.jsxs)(g.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!r&&(0,U.jsxs)(g.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,U.jsx)(g.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,U.jsx)(H(),{children:u})})]})}),(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,U.jsx)(g.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(r))}))},i)}))]})]})]}),r&&!t&&(0,U.jsx)(h.Z,{my:3,children:te}),r&&t&&(0,U.jsxs)(U.Fragment,{children:[le&&(0,U.jsx)(h.Z,{my:3,children:(0,U.jsxs)(h.Z,{px:3,children:[(0,U.jsx)(v.Z,{level:5,children:"Table name"}),(0,U.jsx)(h.Z,{mt:1,children:(0,U.jsx)(g.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,U.jsx)(h.Z,{px:1,children:ie})]}),oe&&(0,U.jsxs)(h.Z,{my:3,children:[(0,U.jsx)(h.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,U.jsx)(h.Z,{px:1,children:oe})]})]})]})},ee=r(82531),ne=r(59920),re=r(33766),te=r(59e3);function ie(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),o=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],a=u[1],d=(0,l.useState)(null),f=d[0],v=d[1],p=(0,l.useState)(null),h=p[0],m=p[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?m(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):h&&m(null),null!==o&&void 0!==o&&o.stream?v(o.stream):f&&v(null)}),[i,o,h,f]);var g=(0,l.useCallback)((function(){var e=h?S(h):[];return(0,U.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:f===r?null:r})},pipelineRun:h,selectedStream:f})}),[h,f]),b=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");h&&(e="".concat(e,"?pipeline_run_id=").concat(h.id));var n=[{label:function(){return"Syncs"},linkProps:f?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return f&&n.push({label:function(){return f}}),n}),[r,h,f]);return(0,U.jsx)(c.Z,{breadcrumbs:b,buildSidekick:g,errors:s,pageName:ne.M.SYNCS,pipeline:n,setErrors:a,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:i.map((function(e){var n=(null===h||void 0===h?void 0:h.id)===e.id;return(0,U.jsx)(z,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,r){"use strict";r.d(n,{O2:function(){return d},g_:function(){return v},u7:function(){return f}});var t=r(75582),i=r(82394),o=r(34376),l=r.n(o),c=r(59e3),u=r(24224);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function a(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.preserveParams,i=n.pushHistory,o=n.replaceParams,u=(0,c.iV)(),s={};r&&r.forEach((function(e){u[e]&&(s[e]=u[e])}));var d,f=o?s:u;d=window.location.pathname;var v=i?l().push:l().replace,p=a(a({},f),e);Object.entries(e).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete p[r]}));var h=(0,c.uM)(p);h.length>=1&&(h="?".concat(h));var m="".concat(d.split("?")[0]).concat(h),g=l().router.basePath;return g&&m.startsWith(g)&&(m=m.replace(g,"")),v(l().router.pathname,m,{shallow:!0})}function v(e,n,r){var i=r.addingMultipleValues,o=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,v=r.resetLimitParams,p=a({},e);i?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(r,"[]");p[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1],o=String(i),l="".concat(r,"[]"),c=p[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?p[l]=(0,u.Od)(c,(function(e){return e===o})):p[l]=c.concat(o):p[l]=[o]})):p=a(a({},p),n),v&&(p._limit=l||20,p[d]=0),f(p,{pushHistory:s})}},90211:function(e,n,r){"use strict";r.d(n,{RA:function(){return a},kC:function(){return d},vg:function(){return b},kE:function(){return I},Mp:function(){return f},Pb:function(){return u},HW:function(){return j},wX:function(){return v},x6:function(){return p},_6:function(){return h},zf:function(){return x},Y6:function(){return y},wE:function(){return N},J3:function(){return m},We:function(){return s},QV:function(){return Z},C5:function(){return g}});var t=r(75582),i=r(17717),o=["aged","ancient","autumn","billowing","bitter","black","blue","bold","broken","cold","cool","crimson","damp","dark","dawn","delicate","divine","dry","empty","falling","floral","fragrant","frosty","green","hidden","holy","icy","late","lingering","little","lively","long","misty","morning","muddy","nameless","old","patient","polished","proud","purple","quiet","red","restless","rough","shy","silent","small","snowy","solitary","sparkling","spring","still","summer","throbbing","twilight","wandering","weathered","white","wild","winter","wispy","withered","young"],l=(r(92083),["bird","breeze","brook","bush","butterfly","cherry","cloud","darkness","dawn","dew","dream","dust","feather","field","fire","firefly","flower","fog","forest","frog","frost","glade","glitter","grass","haze","hill","lake","leaf","meadow","moon","morning","mountain","night","paper","pine","pond","rain","resonance","river","sea","shadow","shape","silence","sky","smoke","snow","snowflake","sound","star","sun","sun","sunset","surf","thunder","tree","violet","voice","water","water","waterfall","wave","wildflower","wind","wood"]),c=r(24224);function u(e){if(!e)return!1;try{JSON.parse(e)}catch(n){return!1}return!0}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return e.split(" ").join(n)}function a(e){return e.split(" ").join("_")}function d(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return String((new Date).getTime()*e)}function v(e){return e.charAt(0).toLowerCase()+e.slice(1)}function p(e){if(null===e||"undefined"===typeof e)return"";var n=e.toString().split("."),r=(0,t.Z)(n,2),i=r[0],o=r[1],l=i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return o?"".concat(l,".").concat(o):l}function h(e,n){var r,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n,o=void 0!==i&&null!==i;if(o||(i=2),1===i)r=e;else{var l=e.length,c=e[l-1];r="y"===c&&"day"!==e?"".concat(e.slice(0,l-1),"ies"):"".concat(e,"s"===c?"es":"s")}if(o){var u=t?p(i):i;return"".concat(u," ").concat(r)}return r}function m(e){return null===e||void 0===e?void 0:e.replace(/_/g," ")}function g(e){var n=e.length;return"ies"===e.slice(n-3,n)?"".concat(e.slice(0,n-3),"y"):"es"===e.slice(n-2,n)&&"ces"!==e.slice(n-3,n)?e.slice(0,n-2):e.slice(0,n-1)}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return d(m(e.toLowerCase()))}function x(e){var n,r=[["second",60],["minute",60],["hour",24],["day",7],["week",4],["month",12],["year",null]];return r.forEach((function(i,o){if(!n){var l=(0,t.Z)(i,2),c=l[0],u=l[1],s=r.slice(0,o).reduce((function(e,n){return e*Number(n[1])}),1);e<Number(u)*s&&(n=h(c,Math.round(e/s)))}})),n}function j(e){return"undefined"!==typeof e&&null!==e&&!isNaN(e)}function Z(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Math.pow(10,n);return Math.round((e||0)*r)/r}function y(){return"".concat((0,c.mp)(o)," ").concat((0,c.mp)(l))}function I(e){return null===e||void 0===e?void 0:e.toLowerCase().replace(/\W+/g,"_")}function N(e){var n,r=e.split(i.sep),t=r[r.length-1].split(".");return n=1===t.length?t[0]:t.slice(0,-1).join("."),r.slice(0,r.length-1).concat(n).join(i.sep)}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(e){e.O(0,[844,9902,1424,1005,7815,547,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return l},JZ:function(){return s},e7:function(){return d},wx:function(){return a}});var r=t(75582),i=t(82394),c=t(93348);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e){return"string"===typeof e?e:JSON.stringify(e)}function a(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return u(u({},e),{},{value:l(n)})}))}function s(e,n){return n===c.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===c.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),c=t[0],o=t[1],l=o;try{l=JSON.parse(o)}catch(a){}return u(u({},e),{},(0,i.Z)({},c,l))}),{}):e}},55264:function(e,n,t){"use strict";var r=t(82684),i=t(79891),c=t(67971),o=t(19711),u=t(24224),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,a=void 0===t?[]:t,s=(0,r.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,r.useMemo)((function(){return(0,u.YC)(a||[],"uuid")}),[a]);return(0,l.jsx)(c.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),c=t.n(i),o=t(82684),u=t(83455),l=t(34376),a=t(60328),s=t(16634),d=t(47999),p=t(67971),f=t(10919),h=t(93348),g=t(62609),v=t(86673),m=t(87815),x=t(55264),b=t(19711),j=t(46261),Z=t(82531),y=t(22341),P=t(66050),_=t(49125),k=t(45838),O=t(9736),w=t(96510),C=t(66653),I=t(28598),E=1.5*_.iI;n.Z=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,S=e.includeCreatedAtColumn,T=e.includePipelineColumn,A=e.pipeline,D=e.pipelineSchedules,N=e.pipelineTriggersByName,M=e.selectedSchedule,H=e.setErrors,V=e.setSelectedSchedule,Y=e.stickyHeader,R=null===A||void 0===A?void 0:A.uuid,B=(0,l.useRouter)(),F=(0,o.useRef)({}),W=(0,o.useState)(null),z=W[0],L=W[1],q=(0,o.useState)(0),J=q[0],K=q[1],U=(0,o.useState)(0),Q=U[0],X=U[1],G=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),$=(0,r.Z)(G,1)[0],ee=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t(),R?B.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(R,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ne=(0,r.Z)(ee,1)[0],te=[],re=[];return n||(te.push.apply(te,[null,null,null]),re.push.apply(re,[{label:function(){return""},uuid:"action"},{uuid:"Info"},{uuid:"Type"}])),te.push.apply(te,[1]),re.push.apply(re,[{uuid:"Name"}]),n||(te.push.apply(te,[null,2]),re.push.apply(re,[{uuid:"Frequency"},{uuid:"Tags"}])),te.push.apply(te,[null,null,null]),re.push.apply(re,[{uuid:"Runs"},{uuid:"Latest status"},{uuid:"Logs"}]),n||(0,O.Ct)()||(te.push.apply(te,[null]),re.push({label:function(){return""},uuid:"edit/delete"})),!n&&T&&(re.splice(2,0,{uuid:"Pipeline"}),te.splice(2,0,2)),!n&&S&&(re.splice(3,0,{uuid:"Created at"}),te.splice(3,0,null)),(0,I.jsx)(k.cl,{overflowVisible:!0,children:0===D.length?(0,I.jsx)(v.Z,{px:3,py:1,children:(0,I.jsx)(b.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,I.jsx)(m.Z,{columnFlex:te,columns:re,highlightRowOnHover:i,isSelectedRow:function(e){return D[e].id===(null===M||void 0===M?void 0:M.id)},onClickRow:V?function(e){return null===V||void 0===V?void 0:V(D[e])}:null,rowVerticalPadding:6,rows:D.map((function(e,t){var r,i=e.id,u=e.created_at,l=e.pipeline_runs_count,m=e.pipeline_uuid,Z=e.last_pipeline_run_status,k=e.name,w=e.schedule_interval,A=e.status,D=e.tags,M=R||m;F.current[i]=(0,o.createRef)(),h.fq.ACTIVE===A?r=(0,I.jsx)(s.Z,{size:E,success:!0}):h.fq.INACTIVE===A&&(r=(0,I.jsx)(s.Z,{borderSize:1,size:E,square:!0,warning:!0}));var H,V=[];n?V.push.apply(V,[(0,I.jsx)(b.ZP,{bold:!0,children:k},"trigger_name_".concat(t))]):V.push.apply(V,[(0,I.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,C.j)(n),$({id:e.id,status:h.fq.ACTIVE===A?h.fq.INACTIVE:h.fq.ACTIVE})},children:h.fq.ACTIVE===A?(0,I.jsx)(y.dz,{muted:!0,size:2*_.iI}):(0,I.jsx)(y.Py,{default:!0,size:2*_.iI})},"toggle_trigger_".concat(t)),(0,I.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,I.jsx)(j.Z,{block:!0,label:A,size:E,widthFitContent:!0,children:r}),(null===N||void 0===N?void 0:N[k])&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(j.Z,{block:!0,label:"This trigger is saved in code.",size:E,widthFitContent:!0,children:(0,I.jsx)(y.EK,{default:!0,size:E})})]})]},"trigger_status_".concat(t)),(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:null===(H=h.Z4[e.schedule_type])||void 0===H?void 0:H.call(h.Z4)},"trigger_type_".concat(t)),(0,I.jsx)(c(),{as:"/pipelines/".concat(M,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,I.jsx)(f.Z,{bold:!0,onClick:function(e){(0,C.j)(e),B.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(i))},sameColorAsText:!0,children:k})},"trigger_name_".concat(t))]);return n||V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:w},"trigger_frequency_".concat(t)),(0,I.jsx)("div",{children:(0,I.jsx)(x.Z,{tags:null===D||void 0===D?void 0:D.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))]),V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(t)),(0,I.jsx)(b.ZP,{danger:P.V.FAILED===Z,default:!Z,monospace:!0,success:P.V.COMPLETED===Z,warning:P.V.CANCELLED===Z,children:Z||"N/A"},"latest_run_status_".concat(t)),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,I.jsx)(y.B4,{default:!0,size:2*_.iI})},"logs_button_".concat(t))]),n||(0,O.Ct)()||V.push((0,I.jsxs)(p.ZP,{children:[(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,I.jsx)(y.I8,{default:!0,size:2*_.iI})}),(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;L(i),K((null===(e=F.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),X((null===(t=F.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:F.current[i],title:"Delete",children:(0,I.jsx)(y.rF,{default:!0,size:2*_.iI})}),(0,I.jsx)(d.Z,{onClickOutside:function(){return L(null)},open:z===i,children:(0,I.jsx)(g.Z,{danger:!0,left:(Q||0)-286,onCancel:function(){return L(null)},onClick:function(){L(null),ne(i)},title:"Are you sure you want to delete the trigger ".concat(k,"?"),top:(J||0)-(t<=1?40:96),width:40*_.iI})})]},"edit_delete_buttons_".concat(t))),!n&&T&&V.splice(2,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:M},"pipeline_name_".concat(t))),!n&&S&&V.splice(3,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:u},"created_at_".concat(t))),V})),stickyHeader:Y,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),i=t(67971),c=t(86673),o=t(22341),u=t(73899),l=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(o.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(c.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(o.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return c},Z4:function(){return s},fq:function(){return u},kJ:function(){return a}});var r,i,c,o=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(c||(c={}));var u,l,a,s=(r={},(0,o.Z)(r,c.API,(function(){return"API"})),(0,o.Z)(r,c.EVENT,(function(){return"event"})),(0,o.Z)(r,c.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(i={},(0,o.Z)(i,a.CREATED_AT,"Created at"),(0,o.Z)(i,a.NAME,"Name"),(0,o.Z)(i,a.PIPELINE,"Pipeline"),(0,o.Z)(i,a.STATUS,"Status"),(0,o.Z)(i,a.TYPE,"Type"),i)},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},79891:function(e,n,t){"use strict";var r=t(38626),i=t(60328),c=t(67971),o=t(86673),u=t(19711),l=t(23831),a=t(22341),s=t(49125),d=t(31012),p=t(28598),f=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,l=e.label,d=e.onClick,h=e.primary,g=e.small;return(0,p.jsx)(f,{border:n,primary:h,small:g,children:(0,p.jsx)(i.Z,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:d,transparent:!0,children:(0,p.jsxs)(c.ZP,{alignItems:"center",children:[t,l&&(0,p.jsx)(u.ZP,{small:g,children:l}),!r&&d&&(0,p.jsx)(o.Z,{ml:1,children:(0,p.jsx)(a.x8,{default:h,muted:!h,size:g?s.iI:1.25*s.iI})})]})})})}},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),c=t(86673),o=t(19711),u=t(23831),l=t(73942),a=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,m=e.fullWidth,x=void 0===m||m,b=e.header,j=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,_=e.maxHeight,k=e.maxWidth,O=e.minWidth,w=e.noPadding,C=e.overflowVisible,I=e.subtitle,E=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:x,maxHeight:_,maxWidth:k,minWidth:O,overflowVisible:C,ref:r,success:E,children:[(b||P)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:j,children:[b&&b,P&&(0,d.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.ZP,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(c.Z,{ml:Z?1:0,children:(0,d.jsx)(o.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,d.jsxs)(g,{maxHeight:_,noPadding:w,overflowVisible:C,ref:u,children:[I&&(0,d.jsx)(c.Z,{mb:2,children:(0,d.jsx)(o.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return pe}});var r=t(77837),i=t(82394),c=t(75582),o=t(38860),u=t.n(o),l=t(12691),a=t.n(l),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(48952),g=t(34744),v=t(67971),m=t(87372),x=t(11135),b=t(10919),j=t(51099),Z=t(60547),y=t(93348),P=t(41788),_=t(29237),k=t(86673),O=t(87815),w=t(19711),C=t(38435),I=t(82944),E=t(70902),S=t(23831),T=t(38626),A=t(73942),D=t(49125),N=T.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*D.iI,2*D.iI,A.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||S.Z).borders.light,";\n background-color: ").concat((e.theme||S.Z).background.popup,";\n ")})),M=t(90211),H=t(58122),V=t(28598);function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Y(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B="".concat(D.iI,"px ").concat(3*D.iI,"px");var F=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,o=e.variables,u=(0,s.useState)(!1),l=u[0],a=u[1],d=(0,s.useState)({}),p=d[0],h=d[1],g=(0,s.useState)(o||{}),x=g[0],b=g[1],j=(0,s.useMemo)((function(){return R(R({},n),{},{name:(0,M.Y6)(),variables:l?(0,H.e7)(x):null})}),[n,l,x]),Z=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),b((function(t){return R(R({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,V.jsx)(C.Z,R(R({},t),{},{rows:1,value:n})):(0,V.jsx)(I.Z,R({},t))};return(0,s.useEffect)((function(){var e=Object.entries(x).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0],o=t[1],u=(0,M.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return R(R({},e),{},(0,i.Z)({},r,u))}),{});h(e)}),[]),(0,V.jsxs)(_.Z,{footer:(0,V.jsxs)(v.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,V.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:B,primaryAlternate:!0,children:"Run now"}),(0,V.jsx)(k.Z,{mr:1}),(0,V.jsx)(f.Z,{borderColor:S.Z.background.page,onClick:t,padding:B,secondary:!0,children:"Cancel"})]}),header:(0,V.jsx)(m.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*D.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,V.jsx)(N,{children:(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(k.Z,{mr:2,children:(0,V.jsx)(E.Z,{checked:l,onCheck:a})}),(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&x&&Object.entries(x).length>0&&(0,V.jsx)(k.Z,{mt:2,children:(0,V.jsx)(O.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(x).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,V.jsx)(w.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),Z(t,r)]}))})})]})},W=t(37391),z=T.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],S.Z.borders.medium,D.tr),L=T.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],W.w5),q=T.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],S.Z.background.output,A.n_,D.iI,D.tr),J=t(73899);var K=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,o=[];return Object.entries(r).forEach((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1],u=null===i||void 0===i?void 0:i[t];o.push({uuid:t,value:(0,H.FS)(u||r)})})),(0,H.JZ)(o,t),(0,V.jsxs)(z,{children:[(0,V.jsx)(k.Z,{mb:2,children:(0,V.jsxs)(w.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,V.jsx)(L,{noScrollbarTrackBackground:!0,children:r&&o.map((function(e){var n=e.uuid,t=e.value;return(0,V.jsxs)(q,{children:[(0,V.jsx)(w.ZP,{monospace:!0,small:!0,children:n}),(0,V.jsx)(w.ZP,{color:J.Or,monospace:!0,small:!0,children:(0,H.FS)(t)})]})}))})]})},U=t(54283),Q=t(46261),X=t(97225),G=t(82531),$=t(22341),ee=t(52769),ne=t(59920),te=t(42305),re=t(24224),ie=t(7715),ce=t(9736),oe=t(96510),ue=t(59e3),le=t(99497);function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function de(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ce.Ct)(),o=n.uuid,u=(0,s.useState)(null),l=u[0],P=u[1],_=G.ZP.variables.pipelines.list(o,{global_only:!0},{revalidateOnFocus:!1}).data,O=null===_||void 0===_?void 0:_.variables,C=(0,ue.iV)(),I=null!==C&&void 0!==C&&C.page?C.page:0,E=G.ZP.pipeline_schedules.pipelines.list(o,{_limit:j.Q,_offset:(null!==C&&void 0!==C&&C.page?C.page:0)*j.Q},{refreshInterval:7500}),S=E.data,T=E.mutate,A=(0,s.useMemo)((function(){return(null===S||void 0===S?void 0:S.pipeline_schedules)||[]}),[S]),N=function(e){return(0,d.Db)(G.ZP.pipeline_schedules.pipelines.useCreate(o),{onSuccess:function(n){return(0,oe.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}})},Y=N((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),R=(0,c.Z)(Y,2),B=R[0],W=R[1].isLoading,z=N(T),L=(0,c.Z)(z,2),q=L[0],J=L[1].isLoading,ae=(0,s.useMemo)((function(){var e;return null===(e=(0,H.wx)(O,(function(e){return e.uuid===ee.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return se(se({},e),{},(0,i.Z)({},t,r))}),{})}),[O]),de={name:(0,M.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},pe=(0,le.dd)((function(){return(0,V.jsx)(F,{initialPipelineSchedulePayload:de,onCancel:ge,onSuccess:q,variables:ae})}),{},[O,ae],{background:!0,uuid:"run_pipeline_now_popup"}),fe=(0,c.Z)(pe,2),he=fe[0],ge=fe[1],ve=(0,s.useState)(),me=ve[0],xe=ve[1],be=(0,s.useMemo)((function(){var e=null===me||void 0===me?void 0:me.variables,n=!(0,ie.Qr)(e),t=n?null===me||void 0===me?void 0:me.variables:(0,ie.Qr)(ae)?null:ae;return function(i){var c=i.height-(t?151:80);return(0,V.jsxs)(V.Fragment,{children:[t&&(0,V.jsx)(K,{hasOverride:n,scheduleType:null===me||void 0===me?void 0:me.schedule_type,variables:ae,variablesOverride:e}),!t&&(0,V.jsxs)(k.Z,{p:D.cd,children:[(0,V.jsx)(w.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,V.jsxs)(k.Z,{mt:1,children:[(0,V.jsx)(a(),{as:"/pipelines/".concat(o,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,V.jsx)(b.Z,{primary:!0,children:"Click here"})})," ",(0,V.jsx)(w.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,V.jsx)(h.Z,se(se({},i),{},{height:c,noStatus:!0}))]})}}),[r,o,null===me||void 0===me?void 0:me.schedule_type,null===me||void 0===me?void 0:me.variables,ae]),je=(0,s.useMemo)((function(){var e;return(null===S||void 0===S||null===(e=S.metadata)||void 0===e?void 0:e.count)||[]}),[S]),Ze=G.ZP.pipeline_triggers.pipelines.list(o),ye=Ze.data,Pe=(Ze.mutate,(0,s.useMemo)((function(){return(0,re.HK)((null===ye||void 0===ye?void 0:ye.pipeline_triggers)||[],(function(e){return e.name}))}),[ye]));return(0,V.jsxs)(Z.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:be,errors:l,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:P,subheaderBackgroundImage:"".concat(t.basePath,"/images/banner-shape-purple-peach.jpg"),subheaderButton:(0,V.jsx)(x.ZP,{beforeElement:(0,V.jsx)($.mm,{size:2.5*D.iI}),blackBorder:!0,inline:!0,loading:W,noHoverUnderline:!0,onClick:function(){return B({pipeline_schedule:{name:(0,M.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Run this pipeline using a schedule, event, or API."}),title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ne.M.TRIGGERS,"_").concat(o),children:[(0,V.jsx)(k.Z,{mt:D.cd,px:D.cd,children:(0,V.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,V.jsx)(m.Z,{level:5,children:"Pipeline triggers"}),(0,V.jsx)(Q.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,V.jsx)(f.Z,{beforeIcon:(0,V.jsx)($.JM,{inverted:!0,size:2*D.iI}),disabled:r,loading:J,onClick:(0,ie.Qr)(ae)?function(){return q({pipeline_schedule:de})}:he,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,V.jsx)(g.Z,{light:!0,mt:D.cd,short:!0}),S?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(X.Z,{fetchPipelineSchedules:T,pipeline:n,pipelineSchedules:A,pipelineTriggersByName:Pe,selectedSchedule:me,setErrors:P,setSelectedSchedule:xe}),(0,V.jsx)(k.Z,{p:2,children:(0,V.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=se(se({},C),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(o,"/triggers?").concat((0,ue.uM)(r)))},page:Number(I),totalPages:Math.ceil(je/j.Q)})})]}):(0,V.jsx)(k.Z,{m:2,children:(0,V.jsx)(U.Z,{inverted:!0})})]})}de.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var pe=(0,P.Z)(de)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return b},AY:function(){return j},BP:function(){return x},JX:function(){return m},OC:function(){return d},Pc:function(){return Z},Ro:function(){return y},Tz:function(){return v},Y_:function(){return _},d$:function(){return g},jV:function(){return P},lJ:function(){return k},n1:function(){return f},s8:function(){return a},vk:function(){return c},yD:function(){return s}});var r,i,c,o=t(82394),u=t(92083),l=t.n(u);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(c||(c={}));var a=(r={},(0,o.Z)(r,c.TODAY,"today"),(0,o.Z)(r,c.WEEK,"last 7 days"),(0,o.Z)(r,c.MONTH,"last 30 days"),r),s=(i={},(0,o.Z)(i,c.TODAY,0),(0,o.Z)(i,c.WEEK,6),(0,o.Z)(i,c.MONTH,29),i),d="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function g(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,c=l()(e),o=p;return i&&(c=c.utc()),t&&(c=c.subtract(1,"days")),r&&(o=d),c.format(o)}function v(e){var n=g((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:p)}function x(e,n,t){return l()(e).utc().hours(+n).minutes(+t).format()}function b(e){return l()(e).unix()}function j(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function Z(e){var n=l().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function y(e,n){var t=l().utc(),r=l().utc();null!==n&&void 0!==n&&n.localTime&&(t=l()().local(),r=l()().local());var i=(t=t.subtract(e,"days")).format(h),c=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?c:"".concat(i," - ").concat(c)}function P(e,n){var t=null!==n&&void 0!==n&&n.localTime?l()().local():l().utc();if(e===c.WEEK){var r=s[c.WEEK];t=t.subtract(r,"days")}else if(e===c.MONTH){var i=s[c.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function _(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function k(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,9902,426,1774,1424,1005,7815,6422,547,8952,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return l},JZ:function(){return s},e7:function(){return d},wx:function(){return a}});var r=t(75582),i=t(82394),c=t(93348);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e){return"string"===typeof e?e:JSON.stringify(e)}function a(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return u(u({},e),{},{value:l(n)})}))}function s(e,n){return n===c.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===c.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function d(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),c=t[0],o=t[1],l=o;try{l=JSON.parse(o)}catch(a){}return u(u({},e),{},(0,i.Z)({},c,l))}),{}):e}},55264:function(e,n,t){"use strict";var r=t(82684),i=t(79891),c=t(67971),o=t(19711),u=t(24224),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,a=void 0===t?[]:t,s=(0,r.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,r.useMemo)((function(){return(0,u.YC)(a||[],"uuid")}),[a]);return(0,l.jsx)(c.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(o.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),c=t.n(i),o=t(82684),u=t(83455),l=t(34376),a=t(60328),s=t(16634),d=t(47999),p=t(67971),f=t(10919),h=t(93348),g=t(62609),v=t(86673),m=t(87815),x=t(55264),b=t(19711),j=t(46261),Z=t(82531),y=t(22341),P=t(66050),_=t(49125),k=t(45838),O=t(9736),w=t(96510),C=t(66653),I=t(28598),E=1.5*_.iI;n.Z=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,S=e.includeCreatedAtColumn,T=e.includePipelineColumn,A=e.pipeline,D=e.pipelineSchedules,N=e.pipelineTriggersByName,M=e.selectedSchedule,H=e.setErrors,V=e.setSelectedSchedule,Y=e.stickyHeader,R=null===A||void 0===A?void 0:A.uuid,B=(0,l.useRouter)(),F=(0,o.useRef)({}),W=(0,o.useState)(null),z=W[0],L=W[1],q=(0,o.useState)(0),J=q[0],U=q[1],K=(0,o.useState)(0),Q=K[0],X=K[1],G=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),$=(0,r.Z)(G,1)[0],ee=(0,u.Db)((function(e){return Z.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){null===t||void 0===t||t(),R?B.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(R,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return H({errors:n,response:e})}})}}),ne=(0,r.Z)(ee,1)[0],te=[],re=[];return n||(te.push.apply(te,[null,null,null]),re.push.apply(re,[{label:function(){return""},uuid:"action"},{uuid:"Info"},{uuid:"Type"}])),te.push.apply(te,[1]),re.push.apply(re,[{uuid:"Name"}]),n||(te.push.apply(te,[null,2]),re.push.apply(re,[{uuid:"Frequency"},{uuid:"Tags"}])),te.push.apply(te,[null,null,null]),re.push.apply(re,[{uuid:"Runs"},{uuid:"Latest status"},{uuid:"Logs"}]),n||(0,O.Ct)()||(te.push.apply(te,[null]),re.push({label:function(){return""},uuid:"edit/delete"})),!n&&T&&(re.splice(2,0,{uuid:"Pipeline"}),te.splice(2,0,2)),!n&&S&&(re.splice(3,0,{uuid:"Created at"}),te.splice(3,0,null)),(0,I.jsx)(k.cl,{overflowVisible:!0,children:0===D.length?(0,I.jsx)(v.Z,{px:3,py:1,children:(0,I.jsx)(b.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,I.jsx)(m.Z,{columnFlex:te,columns:re,highlightRowOnHover:i,isSelectedRow:function(e){return D[e].id===(null===M||void 0===M?void 0:M.id)},onClickRow:V?function(e){return null===V||void 0===V?void 0:V(D[e])}:null,rowVerticalPadding:6,rows:D.map((function(e,t){var r,i=e.id,u=e.created_at,l=e.pipeline_runs_count,m=e.pipeline_uuid,Z=e.last_pipeline_run_status,k=e.name,w=e.schedule_interval,A=e.status,D=e.tags,M=R||m;F.current[i]=(0,o.createRef)(),h.fq.ACTIVE===A?r=(0,I.jsx)(s.Z,{size:E,success:!0}):h.fq.INACTIVE===A&&(r=(0,I.jsx)(s.Z,{borderSize:1,size:E,square:!0,warning:!0}));var H,V=[];n?V.push.apply(V,[(0,I.jsx)(b.ZP,{bold:!0,children:k},"trigger_name_".concat(t))]):V.push.apply(V,[(0,I.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,C.j)(n),$({id:e.id,status:h.fq.ACTIVE===A?h.fq.INACTIVE:h.fq.ACTIVE})},children:h.fq.ACTIVE===A?(0,I.jsx)(y.dz,{muted:!0,size:2*_.iI}):(0,I.jsx)(y.Py,{default:!0,size:2*_.iI})},"toggle_trigger_".concat(t)),(0,I.jsxs)(p.ZP,{alignItems:"center",flexDirection:"row",children:[(0,I.jsx)(j.Z,{block:!0,label:A,size:E,widthFitContent:!0,children:r}),(null===N||void 0===N?void 0:N[k])&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(j.Z,{block:!0,label:"This trigger is saved in code.",size:E,widthFitContent:!0,children:(0,I.jsx)(y.EK,{default:!0,size:E})})]})]},"trigger_status_".concat(t)),(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:null===(H=h.Z4[e.schedule_type])||void 0===H?void 0:H.call(h.Z4)},"trigger_type_".concat(t)),(0,I.jsx)(c(),{as:"/pipelines/".concat(M,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,I.jsx)(f.Z,{bold:!0,onClick:function(e){(0,C.j)(e),B.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(i))},sameColorAsText:!0,children:k})},"trigger_name_".concat(t))]);return n||V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:w},"trigger_frequency_".concat(t)),(0,I.jsx)("div",{children:(0,I.jsx)(x.Z,{tags:null===D||void 0===D?void 0:D.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))]),V.push.apply(V,[(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(t)),(0,I.jsx)(b.ZP,{danger:P.V.FAILED===Z,default:!Z,monospace:!0,success:P.V.COMPLETED===Z,warning:P.V.CANCELLED===Z,children:Z||"N/A"},"latest_run_status_".concat(t)),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,I.jsx)(y.UL,{default:!0,size:2*_.iI})},"logs_button_".concat(t))]),n||(0,O.Ct)()||V.push((0,I.jsxs)(p.ZP,{children:[(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,I.jsx)(y.I8,{default:!0,size:2*_.iI})}),(0,I.jsx)(v.Z,{mr:1}),(0,I.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;L(i),U((null===(e=F.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),X((null===(t=F.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:F.current[i],title:"Delete",children:(0,I.jsx)(y.rF,{default:!0,size:2*_.iI})}),(0,I.jsx)(d.Z,{onClickOutside:function(){return L(null)},open:z===i,children:(0,I.jsx)(g.Z,{danger:!0,left:(Q||0)-286,onCancel:function(){return L(null)},onClick:function(){L(null),ne(i)},title:"Are you sure you want to delete the trigger ".concat(k,"?"),top:(J||0)-(t<=1?40:96),width:40*_.iI})})]},"edit_delete_buttons_".concat(t))),!n&&T&&V.splice(2,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:M},"pipeline_name_".concat(t))),!n&&S&&V.splice(3,0,(0,I.jsx)(b.ZP,{default:!0,monospace:!0,children:u},"created_at_".concat(t))),V})),stickyHeader:Y,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),i=t(67971),c=t(86673),o=t(22341),u=t(73899),l=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(o.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(c.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(o.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return c},Z4:function(){return s},fq:function(){return u},kJ:function(){return a}});var r,i,c,o=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(c||(c={}));var u,l,a,s=(r={},(0,o.Z)(r,c.API,(function(){return"API"})),(0,o.Z)(r,c.EVENT,(function(){return"event"})),(0,o.Z)(r,c.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(i={},(0,o.Z)(i,a.CREATED_AT,"Created at"),(0,o.Z)(i,a.NAME,"Name"),(0,o.Z)(i,a.PIPELINE,"Pipeline"),(0,o.Z)(i,a.STATUS,"Status"),(0,o.Z)(i,a.TYPE,"Type"),i)},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},79891:function(e,n,t){"use strict";var r=t(38626),i=t(60328),c=t(67971),o=t(86673),u=t(19711),l=t(23831),a=t(22341),s=t(49125),d=t(31012),p=t(28598),f=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,l=e.label,d=e.onClick,h=e.primary,g=e.small;return(0,p.jsx)(f,{border:n,primary:h,small:g,children:(0,p.jsx)(i.Z,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:d,transparent:!0,children:(0,p.jsxs)(c.ZP,{alignItems:"center",children:[t,l&&(0,p.jsx)(u.ZP,{small:g,children:l}),!r&&d&&(0,p.jsx)(o.Z,{ml:1,children:(0,p.jsx)(a.x8,{default:h,muted:!h,size:g?s.iI:1.25*s.iI})})]})})})}},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),c=t(86673),o=t(19711),u=t(23831),l=t(73942),a=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,m=e.fullWidth,x=void 0===m||m,b=e.header,j=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,_=e.maxHeight,k=e.maxWidth,O=e.minWidth,w=e.noPadding,C=e.overflowVisible,I=e.subtitle,E=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:x,maxHeight:_,maxWidth:k,minWidth:O,overflowVisible:C,ref:r,success:E,children:[(b||P)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:j,children:[b&&b,P&&(0,d.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.ZP,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(c.Z,{ml:Z?1:0,children:(0,d.jsx)(o.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,d.jsxs)(g,{maxHeight:_,noPadding:w,overflowVisible:C,ref:u,children:[I&&(0,d.jsx)(c.Z,{mb:2,children:(0,d.jsx)(o.ZP,{default:!0,children:I})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return pe}});var r=t(77837),i=t(82394),c=t(75582),o=t(38860),u=t.n(o),l=t(12691),a=t.n(l),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(48952),g=t(34744),v=t(67971),m=t(87372),x=t(11135),b=t(10919),j=t(51099),Z=t(60547),y=t(93348),P=t(41788),_=t(29237),k=t(86673),O=t(87815),w=t(19711),C=t(38435),I=t(82944),E=t(70902),S=t(23831),T=t(38626),A=t(73942),D=t(49125),N=T.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*D.iI,2*D.iI,A.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||S.Z).borders.light,";\n background-color: ").concat((e.theme||S.Z).background.popup,";\n ")})),M=t(90211),H=t(58122),V=t(28598);function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Y(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B="".concat(D.iI,"px ").concat(3*D.iI,"px");var F=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,o=e.variables,u=(0,s.useState)(!1),l=u[0],a=u[1],d=(0,s.useState)({}),p=d[0],h=d[1],g=(0,s.useState)(o||{}),x=g[0],b=g[1],j=(0,s.useMemo)((function(){return R(R({},n),{},{name:(0,M.Y6)(),variables:l?(0,H.e7)(x):null})}),[n,l,x]),Z=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),b((function(t){return R(R({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,V.jsx)(C.Z,R(R({},t),{},{rows:1,value:n})):(0,V.jsx)(I.Z,R({},t))};return(0,s.useEffect)((function(){var e=Object.entries(x).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0],o=t[1],u=(0,M.Pb)(o)&&"object"===typeof JSON.parse(o)&&!Array.isArray(JSON.parse(o))&&null!==JSON.parse(o);return R(R({},e),{},(0,i.Z)({},r,u))}),{});h(e)}),[]),(0,V.jsxs)(_.Z,{footer:(0,V.jsxs)(v.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,V.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:B,primaryAlternate:!0,children:"Run now"}),(0,V.jsx)(k.Z,{mr:1}),(0,V.jsx)(f.Z,{borderColor:S.Z.background.page,onClick:t,padding:B,secondary:!0,children:"Cancel"})]}),header:(0,V.jsx)(m.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*D.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,V.jsx)(N,{children:(0,V.jsxs)(v.ZP,{alignItems:"center",children:[(0,V.jsx)(k.Z,{mr:2,children:(0,V.jsx)(E.Z,{checked:l,onCheck:a})}),(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&x&&Object.entries(x).length>0&&(0,V.jsx)(k.Z,{mt:2,children:(0,V.jsx)(O.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(x).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,V.jsx)(w.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),Z(t,r)]}))})})]})},W=t(37391),z=T.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],S.Z.borders.medium,D.tr),L=T.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],W.w5),q=T.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],S.Z.background.output,A.n_,D.iI,D.tr),J=t(73899);var U=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,o=[];return Object.entries(r).forEach((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1],u=null===i||void 0===i?void 0:i[t];o.push({uuid:t,value:(0,H.FS)(u||r)})})),(0,H.JZ)(o,t),(0,V.jsxs)(z,{children:[(0,V.jsx)(k.Z,{mb:2,children:(0,V.jsxs)(w.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,V.jsx)(L,{noScrollbarTrackBackground:!0,children:r&&o.map((function(e){var n=e.uuid,t=e.value;return(0,V.jsxs)(q,{children:[(0,V.jsx)(w.ZP,{monospace:!0,small:!0,children:n}),(0,V.jsx)(w.ZP,{color:J.Or,monospace:!0,small:!0,children:(0,H.FS)(t)})]})}))})]})},K=t(54283),Q=t(46261),X=t(97225),G=t(82531),$=t(22341),ee=t(52769),ne=t(59920),te=t(42305),re=t(24224),ie=t(7715),ce=t(9736),oe=t(96510),ue=t(59e3),le=t(99497);function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function de(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ce.Ct)(),o=n.uuid,u=(0,s.useState)(null),l=u[0],P=u[1],_=G.ZP.variables.pipelines.list(o,{global_only:!0},{revalidateOnFocus:!1}).data,O=null===_||void 0===_?void 0:_.variables,C=(0,ue.iV)(),I=null!==C&&void 0!==C&&C.page?C.page:0,E=G.ZP.pipeline_schedules.pipelines.list(o,{_limit:j.Q,_offset:(null!==C&&void 0!==C&&C.page?C.page:0)*j.Q},{refreshInterval:7500}),S=E.data,T=E.mutate,A=(0,s.useMemo)((function(){return(null===S||void 0===S?void 0:S.pipeline_schedules)||[]}),[S]),N=function(e){return(0,d.Db)(G.ZP.pipeline_schedules.pipelines.useCreate(o),{onSuccess:function(n){return(0,oe.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}})},Y=N((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),R=(0,c.Z)(Y,2),B=R[0],W=R[1].isLoading,z=N(T),L=(0,c.Z)(z,2),q=L[0],J=L[1].isLoading,ae=(0,s.useMemo)((function(){var e;return null===(e=(0,H.wx)(O,(function(e){return e.uuid===ee.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return se(se({},e),{},(0,i.Z)({},t,r))}),{})}),[O]),de={name:(0,M.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},pe=(0,le.dd)((function(){return(0,V.jsx)(F,{initialPipelineSchedulePayload:de,onCancel:ge,onSuccess:q,variables:ae})}),{},[O,ae],{background:!0,uuid:"run_pipeline_now_popup"}),fe=(0,c.Z)(pe,2),he=fe[0],ge=fe[1],ve=(0,s.useState)(),me=ve[0],xe=ve[1],be=(0,s.useMemo)((function(){var e=null===me||void 0===me?void 0:me.variables,n=!(0,ie.Qr)(e),t=n?null===me||void 0===me?void 0:me.variables:(0,ie.Qr)(ae)?null:ae;return function(i){var c=i.height-(t?151:80);return(0,V.jsxs)(V.Fragment,{children:[t&&(0,V.jsx)(U,{hasOverride:n,scheduleType:null===me||void 0===me?void 0:me.schedule_type,variables:ae,variablesOverride:e}),!t&&(0,V.jsxs)(k.Z,{p:D.cd,children:[(0,V.jsx)(w.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,V.jsxs)(k.Z,{mt:1,children:[(0,V.jsx)(a(),{as:"/pipelines/".concat(o,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,V.jsx)(b.Z,{primary:!0,children:"Click here"})})," ",(0,V.jsx)(w.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,V.jsx)(h.Z,se(se({},i),{},{height:c,noStatus:!0}))]})}}),[r,o,null===me||void 0===me?void 0:me.schedule_type,null===me||void 0===me?void 0:me.variables,ae]),je=(0,s.useMemo)((function(){var e;return(null===S||void 0===S||null===(e=S.metadata)||void 0===e?void 0:e.count)||[]}),[S]),Ze=G.ZP.pipeline_triggers.pipelines.list(o),ye=Ze.data,Pe=(Ze.mutate,(0,s.useMemo)((function(){return(0,re.HK)((null===ye||void 0===ye?void 0:ye.pipeline_triggers)||[],(function(e){return e.name}))}),[ye]));return(0,V.jsxs)(Z.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:be,errors:l,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:P,subheaderBackgroundImage:"".concat(t.basePath,"/images/banner-shape-purple-peach.jpg"),subheaderButton:(0,V.jsx)(x.ZP,{beforeElement:(0,V.jsx)($.mm,{size:2.5*D.iI}),blackBorder:!0,inline:!0,loading:W,noHoverUnderline:!0,onClick:function(){return B({pipeline_schedule:{name:(0,M.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,V.jsx)(w.ZP,{bold:!0,large:!0,children:"Run this pipeline using a schedule, event, or API."}),title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ne.M.TRIGGERS,"_").concat(o),children:[(0,V.jsx)(k.Z,{mt:D.cd,px:D.cd,children:(0,V.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,V.jsx)(m.Z,{level:5,children:"Pipeline triggers"}),(0,V.jsx)(Q.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,V.jsx)(f.Z,{beforeIcon:(0,V.jsx)($.JM,{inverted:!0,size:2*D.iI}),disabled:r,loading:J,onClick:(0,ie.Qr)(ae)?function(){return q({pipeline_schedule:de})}:he,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,V.jsx)(g.Z,{light:!0,mt:D.cd,short:!0}),S?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(X.Z,{fetchPipelineSchedules:T,pipeline:n,pipelineSchedules:A,pipelineTriggersByName:Pe,selectedSchedule:me,setErrors:P,setSelectedSchedule:xe}),(0,V.jsx)(k.Z,{p:2,children:(0,V.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=se(se({},C),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(o,"/triggers?").concat((0,ue.uM)(r)))},page:Number(I),totalPages:Math.ceil(je/j.Q)})})]}):(0,V.jsx)(k.Z,{m:2,children:(0,V.jsx)(K.Z,{inverted:!0})})]})}de.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var pe=(0,P.Z)(de)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return b},AY:function(){return j},BP:function(){return x},JX:function(){return m},OC:function(){return d},Pc:function(){return Z},Ro:function(){return y},Tz:function(){return v},Y_:function(){return _},d$:function(){return g},jV:function(){return P},lJ:function(){return k},n1:function(){return f},s8:function(){return a},vk:function(){return c},yD:function(){return s}});var r,i,c,o=t(82394),u=t(92083),l=t.n(u);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(c||(c={}));var a=(r={},(0,o.Z)(r,c.TODAY,"today"),(0,o.Z)(r,c.WEEK,"last 7 days"),(0,o.Z)(r,c.MONTH,"last 30 days"),r),s=(i={},(0,o.Z)(i,c.TODAY,0),(0,o.Z)(i,c.WEEK,6),(0,o.Z)(i,c.MONTH,29),i),d="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function g(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,c=l()(e),o=p;return i&&(c=c.utc()),t&&(c=c.subtract(1,"days")),r&&(o=d),c.format(o)}function v(e){var n=g((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:p)}function x(e,n,t){return l()(e).utc().hours(+n).minutes(+t).format()}function b(e){return l()(e).unix()}function j(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function Z(e){var n=l().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function y(e,n){var t=l().utc(),r=l().utc();null!==n&&void 0!==n&&n.localTime&&(t=l()().local(),r=l()().local());var i=(t=t.subtract(e,"days")).format(h),c=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?c:"".concat(i," - ").concat(c)}function P(e,n){var t=null!==n&&void 0!==n&&n.localTime?l()().local():l().utc();if(e===c.WEEK){var r=s[c.WEEK];t=t.subtract(r,"days")}else if(e===c.MONTH){var i=s[c.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function _(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function k(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,9902,426,1774,1424,1005,7815,6422,547,8952,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(49894),l=t(93461),s=t(57384),a=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(p),g=t(32063),v=t(85019),j=t(82531),b=t(66166),m=t(3055),x=t(49125),y=t(91427),Z=t(24141);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,p=e.afterHidden,O=e.afterWidth,P=e.afterWidthOverride,E=e.before,C=e.beforeWidth,w=e.breadcrumbs,k=e.children,I=e.errors,A=e.headerMenuItems,T=e.headerOffset,S=e.mainContainerHeader,D=e.navigationItems,N=e.setErrors,M=e.subheaderChildren,R=e.title,L=e.uuid,H=(0,Z.i)().width,B="dashboard_after_width_".concat(L),V="dashboard_before_width_".concat(L),z=(0,o.useRef)(null),F=(0,o.useState)(P?O:(0,y.U2)(B,O)),U=F[0],q=F[1],W=(0,o.useState)(!1),Y=W[0],Q=W[1],J=(0,o.useState)(E?Math.max((0,y.U2)(V,C),13*x.iI):null),K=J[0],X=J[1],G=(0,o.useState)(!1),$=G[0],ee=G[1],ne=(0,o.useState)(null)[1],te=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===te||void 0===te?void 0:te.projects,ie={label:function(){var e;return null===re||void 0===re||null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];w?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(w))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return R}}]),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||Y||$||null===ne||void 0===ne||ne(z.current.getBoundingClientRect().width)}),[Y,U,$,K,z,ne,H]),(0,o.useEffect)((function(){Y||(0,y.t8)(B,U)}),[p,Y,U,B]),(0,o.useEffect)((function(){$||(0,y.t8)(V,K)}),[$,K,V]);var ce=(0,b.Z)(O);return(0,o.useEffect)((function(){P&&ce!==O&&q(O)}),[P,O,ce]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:R}),(0,f.jsx)(a.Z,{breadcrumbs:oe,menuItems:A,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(v.Z,{navigationItems:D,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(g.Z,{after:r,afterHeightOffset:m.Mz,afterHidden:p,afterMousedownActive:Y,afterWidth:U,before:E,beforeHeightOffset:m.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(E?K:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:E?d.k1:null,mainContainerHeader:S,mainContainerRef:z,setAfterMousedownActive:Q,setAfterWidth:q,setBeforeMousedownActive:ee,setBeforeWidth:X,children:[M&&(0,f.jsx)(h,{children:M}),k]})})]}),I&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,f.jsx)(u.Z,_(_({},I),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}},55264:function(e,n,t){"use strict";var r=t(82684),i=t(79891),o=t(67971),c=t(19711),u=t(24224),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,s=void 0===t?[]:t,a=(0,r.useMemo)((function(){return(null===s||void 0===s?void 0:s.length)||0}),[s]),d=(0,r.useMemo)((function(){return(0,u.YC)(s||[],"uuid")}),[s]);return(0,l.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:a>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(c.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),o=t.n(i),c=t(82684),u=t(83455),l=t(34376),s=t(60328),a=t(16634),d=t(47999),f=t(67971),p=t(10919),h=t(93348),g=t(62609),v=t(86673),j=t(87815),b=t(55264),m=t(19711),x=t(46261),y=t(82531),Z=t(22341),O=t(66050),_=t(49125),P=t(45838),E=t(9736),C=t(96510),w=t(66653),k=t(28598),I=1.5*_.iI;n.Z=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,A=e.includeCreatedAtColumn,T=e.includePipelineColumn,S=e.pipeline,D=e.pipelineSchedules,N=e.pipelineTriggersByName,M=e.selectedSchedule,R=e.setErrors,L=e.setSelectedSchedule,H=e.stickyHeader,B=null===S||void 0===S?void 0:S.uuid,V=(0,l.useRouter)(),z=(0,c.useRef)({}),F=(0,c.useState)(null),U=F[0],q=F[1],W=(0,c.useState)(0),Y=W[0],Q=W[1],J=(0,c.useState)(0),K=J[0],X=J[1],G=(0,u.Db)((function(e){return y.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){null===t||void 0===t||t()},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}}),$=(0,r.Z)(G,1)[0],ee=(0,u.Db)((function(e){return y.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){null===t||void 0===t||t(),B?V.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(B,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}}),ne=(0,r.Z)(ee,1)[0],te=[],re=[];return n||(te.push.apply(te,[null,null,null]),re.push.apply(re,[{label:function(){return""},uuid:"action"},{uuid:"Info"},{uuid:"Type"}])),te.push.apply(te,[1]),re.push.apply(re,[{uuid:"Name"}]),n||(te.push.apply(te,[null,2]),re.push.apply(re,[{uuid:"Frequency"},{uuid:"Tags"}])),te.push.apply(te,[null,null,null]),re.push.apply(re,[{uuid:"Runs"},{uuid:"Latest status"},{uuid:"Logs"}]),n||(0,E.Ct)()||(te.push.apply(te,[null]),re.push({label:function(){return""},uuid:"edit/delete"})),!n&&T&&(re.splice(2,0,{uuid:"Pipeline"}),te.splice(2,0,2)),!n&&A&&(re.splice(3,0,{uuid:"Created at"}),te.splice(3,0,null)),(0,k.jsx)(P.cl,{overflowVisible:!0,children:0===D.length?(0,k.jsx)(v.Z,{px:3,py:1,children:(0,k.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,k.jsx)(j.Z,{columnFlex:te,columns:re,highlightRowOnHover:i,isSelectedRow:function(e){return D[e].id===(null===M||void 0===M?void 0:M.id)},onClickRow:L?function(e){return null===L||void 0===L?void 0:L(D[e])}:null,rowVerticalPadding:6,rows:D.map((function(e,t){var r,i=e.id,u=e.created_at,l=e.pipeline_runs_count,j=e.pipeline_uuid,y=e.last_pipeline_run_status,P=e.name,C=e.schedule_interval,S=e.status,D=e.tags,M=B||j;z.current[i]=(0,c.createRef)(),h.fq.ACTIVE===S?r=(0,k.jsx)(a.Z,{size:I,success:!0}):h.fq.INACTIVE===S&&(r=(0,k.jsx)(a.Z,{borderSize:1,size:I,square:!0,warning:!0}));var R,L=[];n?L.push.apply(L,[(0,k.jsx)(m.ZP,{bold:!0,children:P},"trigger_name_".concat(t))]):L.push.apply(L,[(0,k.jsx)(s.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,w.j)(n),$({id:e.id,status:h.fq.ACTIVE===S?h.fq.INACTIVE:h.fq.ACTIVE})},children:h.fq.ACTIVE===S?(0,k.jsx)(Z.dz,{muted:!0,size:2*_.iI}):(0,k.jsx)(Z.Py,{default:!0,size:2*_.iI})},"toggle_trigger_".concat(t)),(0,k.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,k.jsx)(x.Z,{block:!0,label:S,size:I,widthFitContent:!0,children:r}),(null===N||void 0===N?void 0:N[P])&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(v.Z,{mr:1}),(0,k.jsx)(x.Z,{block:!0,label:"This trigger is saved in code.",size:I,widthFitContent:!0,children:(0,k.jsx)(Z.EK,{default:!0,size:I})})]})]},"trigger_status_".concat(t)),(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:null===(R=h.Z4[e.schedule_type])||void 0===R?void 0:R.call(h.Z4)},"trigger_type_".concat(t)),(0,k.jsx)(o(),{as:"/pipelines/".concat(M,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,k.jsx)(p.Z,{bold:!0,onClick:function(e){(0,w.j)(e),V.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(i))},sameColorAsText:!0,children:P})},"trigger_name_".concat(t))]);return n||L.push.apply(L,[(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:C},"trigger_frequency_".concat(t)),(0,k.jsx)("div",{children:(0,k.jsx)(b.Z,{tags:null===D||void 0===D?void 0:D.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))]),L.push.apply(L,[(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(t)),(0,k.jsx)(m.ZP,{danger:O.V.FAILED===y,default:!y,monospace:!0,success:O.V.COMPLETED===y,warning:O.V.CANCELLED===y,children:y||"N/A"},"latest_run_status_".concat(t)),(0,k.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return V.push("/pipelines/".concat(M,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,k.jsx)(Z.B4,{default:!0,size:2*_.iI})},"logs_button_".concat(t))]),n||(0,E.Ct)()||L.push((0,k.jsxs)(f.ZP,{children:[(0,k.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return V.push("/pipelines/".concat(M,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,k.jsx)(Z.I8,{default:!0,size:2*_.iI})}),(0,k.jsx)(v.Z,{mr:1}),(0,k.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;q(i),Q((null===(e=z.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),X((null===(t=z.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:z.current[i],title:"Delete",children:(0,k.jsx)(Z.rF,{default:!0,size:2*_.iI})}),(0,k.jsx)(d.Z,{onClickOutside:function(){return q(null)},open:U===i,children:(0,k.jsx)(g.Z,{danger:!0,left:(K||0)-286,onCancel:function(){return q(null)},onClick:function(){q(null),ne(i)},title:"Are you sure you want to delete the trigger ".concat(P,"?"),top:(Y||0)-(t<=1?40:96),width:40*_.iI})})]},"edit_delete_buttons_".concat(t))),!n&&T&&L.splice(2,0,(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:M},"pipeline_name_".concat(t))),!n&&A&&L.splice(3,0,(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:u},"created_at_".concat(t))),L})),stickyHeader:H,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return a}});t(82684);var r=t(60328),i=t(67971),o=t(86673),c=t(22341),u=t(73899),l=t(49125),s=t(28598),a=22;n.Z=function(e){var n=e.page,t=e.maxPages,a=e.onUpdate,d=e.totalPages,f=[],p=t;if(p>d)f=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(p/2),g=n-h;n+h>=d?(g=d-p+2,p-=2):n-h<=0?(g=0,p-=2):(p-=4,g=n-Math.floor(p/2)),f=Array.from({length:p},(function(e,n){return n+g}))}return(0,s.jsx)(s.Fragment,{children:d>0&&(0,s.jsxs)(i.ZP,{alignItems:"center",children:[(0,s.jsx)(r.Z,{disabled:0===n,onClick:function(){return a(n-1)},children:(0,s.jsx)(c.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!f.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{onClick:function(){return a(0)},borderLess:!0,noBackground:!0,children:1})},0),!f.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),f.map((function(e){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{onClick:function(){e!==n&&a(e)},notClickable:e===n,backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!f.includes(d-1)&&(0,s.jsxs)(s.Fragment,{children:[!f.includes(d-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{onClick:function(){return a(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return a(n+1)},children:(0,s.jsx)(c.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return o},Z4:function(){return a},fq:function(){return u},kJ:function(){return s}});var r,i,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var u,l,s,a=(r={},(0,c.Z)(r,o.API,(function(){return"API"})),(0,c.Z)(r,o.EVENT,(function(){return"event"})),(0,c.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(s||(s={}));var d=(i={},(0,c.Z)(i,s.CREATED_AT,"Created at"),(0,c.Z)(i,s.NAME,"Name"),(0,c.Z)(i,s.PIPELINE,"Pipeline"),(0,c.Z)(i,s.STATUS,"Status"),(0,c.Z)(i,s.TYPE,"Type"),i)},79891:function(e,n,t){"use strict";var r=t(38626),i=t(60328),o=t(67971),c=t(86673),u=t(19711),l=t(23831),s=t(22341),a=t(49125),d=t(31012),f=t(28598),p=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((a.iI+d.Al)/2,"px;\n height: ").concat(1.5*a.iI+d.Al,"px;\n padding: ").concat(a.iI/1.5,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((a.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+a.iI/2+2,"px;\n padding: ").concat(a.iI/4,"px ").concat(a.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,l=e.label,d=e.onClick,h=e.primary,g=e.small;return(0,f.jsx)(p,{border:n,primary:h,small:g,children:(0,f.jsx)(i.Z,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:d,transparent:!0,children:(0,f.jsxs)(o.ZP,{alignItems:"center",children:[t,l&&(0,f.jsx)(u.ZP,{small:g,children:l}),!r&&d&&(0,f.jsx)(c.Z,{ml:1,children:(0,f.jsx)(s.x8,{default:h,muted:!h,size:g?a.iI:1.25*a.iI})})]})})})}},46756:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(75582),c=t(38860),u=t.n(c),l=t(82684),s=t(34376),a=t(1210),d=t(67971),f=t(51099),p=t(41788),h=t(55378),g=t(86673),v=t(19711),j=t(97225),b=t(82531),m=t(93348),x=t(49125),y=t(33766),Z=t(59e3),O=t(28598);function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function E(){var e=(0,s.useRouter)(),n=(0,Z.iV)(),t=null!==n&&void 0!==n&&n.page?n.page:0,r=(null===n||void 0===n?void 0:n.order_by)||m.kJ.CREATED_AT,i={_limit:f.Q,_offset:t*f.Q,order_by:r},c=b.ZP.pipeline_schedules.list(i,{refreshInterval:7500,revalidateOnFocus:!0}),u=c.data,p=c.mutate,_=(0,l.useMemo)((function(){return(null===u||void 0===u?void 0:u.pipeline_schedules)||[]}),[u]),E=(0,l.useMemo)((function(){var e;return(null===u||void 0===u||null===(e=u.metadata)||void 0===e?void 0:e.count)||[]}),[u]);return(0,O.jsxs)(a.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,O.jsx)(g.Z,{mx:2,my:1,children:(0,O.jsxs)(d.ZP,{alignItems:"center",children:[(0,O.jsx)(v.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,O.jsx)(g.Z,{mr:1}),(0,O.jsx)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,y.u7)({order_by:e.target.value,page:0})},paddingRight:4*x.iI,placeholder:"Select column",value:r||m.kJ.CREATED_AT,children:Object.entries(m.TR).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,O.jsx)("option",{value:t,children:r},t)}))})]})}),(0,O.jsx)(j.Z,{fetchPipelineSchedules:p,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:_,stickyHeader:!0}),(0,O.jsx)(g.Z,{p:2,children:(0,O.jsx)(f.Z,{maxPages:9,onUpdate:function(t){var r=Number(t),i=P(P({},n),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,Z.uM)(i)))},page:Number(t),totalPages:Math.ceil(E/f.Q)})})]})}E.getInitialProps=(0,r.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)}))),n.default=(0,p.Z)(E)},33766:function(e,n,t){"use strict";t.d(n,{O2:function(){return d},g_:function(){return p},u7:function(){return f}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),l=t(24224);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.preserveParams,i=n.pushHistory,o=n.replaceParams,l=(0,u.iV)(),s={};t&&t.forEach((function(e){l[e]&&(s[e]=l[e])}));var d,f=o?s:l;d=window.location.pathname;var p=i?c().push:c().replace,h=a(a({},f),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete h[t]}));var g=(0,u.uM)(h);g.length>=1&&(g="?".concat(g));var v="".concat(d.split("?")[0]).concat(g),j=c().router.basePath;return j&&v.startsWith(j)&&(v=v.replace(j,"")),p(c().router.pathname,v,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,s=void 0!==u&&u,p=t.resetLimitParams,h=a({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");h[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),c="".concat(t,"[]"),u=h[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?h[c]=(0,l.Od)(u,(function(e){return e===o})):h[c]=u.concat(o):h[c]=[o]})):h=a(a({},h),n),p&&(h._limit=c||20,h[d]=0),f(h,{pushHistory:s})}},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(46756)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,1424,1005,7815,9774,2888,179],(function(){return n=59733,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(49894),l=t(93461),s=t(57384),a=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(p),g=t(32063),v=t(85019),j=t(82531),b=t(66166),m=t(3055),x=t(49125),y=t(91427),Z=t(24141);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,p=e.afterHidden,O=e.afterWidth,P=e.afterWidthOverride,E=e.before,C=e.beforeWidth,w=e.breadcrumbs,k=e.children,I=e.errors,A=e.headerMenuItems,T=e.headerOffset,S=e.mainContainerHeader,D=e.navigationItems,N=e.setErrors,M=e.subheaderChildren,L=e.title,R=e.uuid,H=(0,Z.i)().width,V="dashboard_after_width_".concat(R),B="dashboard_before_width_".concat(R),z=(0,o.useRef)(null),F=(0,o.useState)(P?O:(0,y.U2)(V,O)),U=F[0],q=F[1],W=(0,o.useState)(!1),Y=W[0],Q=W[1],J=(0,o.useState)(E?Math.max((0,y.U2)(B,C),13*x.iI):null),K=J[0],X=J[1],G=(0,o.useState)(!1),$=G[0],ee=G[1],ne=(0,o.useState)(null)[1],te=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===te||void 0===te?void 0:te.projects,ie={label:function(){var e;return null===re||void 0===re||null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];w?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(w))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return L}}]),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||Y||$||null===ne||void 0===ne||ne(z.current.getBoundingClientRect().width)}),[Y,U,$,K,z,ne,H]),(0,o.useEffect)((function(){Y||(0,y.t8)(V,U)}),[p,Y,U,V]),(0,o.useEffect)((function(){$||(0,y.t8)(B,K)}),[$,K,B]);var ce=(0,b.Z)(O);return(0,o.useEffect)((function(){P&&ce!==O&&q(O)}),[P,O,ce]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:L}),(0,f.jsx)(a.Z,{breadcrumbs:oe,menuItems:A,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(v.Z,{navigationItems:D,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(g.Z,{after:r,afterHeightOffset:m.Mz,afterHidden:p,afterMousedownActive:Y,afterWidth:U,before:E,beforeHeightOffset:m.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(E?K:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:E?d.k1:null,mainContainerHeader:S,mainContainerRef:z,setAfterMousedownActive:Q,setAfterWidth:q,setBeforeMousedownActive:ee,setBeforeWidth:X,children:[M&&(0,f.jsx)(h,{children:M}),k]})})]}),I&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,f.jsx)(u.Z,_(_({},I),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}},55264:function(e,n,t){"use strict";var r=t(82684),i=t(79891),o=t(67971),c=t(19711),u=t(24224),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,s=void 0===t?[]:t,a=(0,r.useMemo)((function(){return(null===s||void 0===s?void 0:s.length)||0}),[s]),d=(0,r.useMemo)((function(){return(0,u.YC)(s||[],"uuid")}),[s]);return(0,l.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:a>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(c.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),o=t.n(i),c=t(82684),u=t(83455),l=t(34376),s=t(60328),a=t(16634),d=t(47999),f=t(67971),p=t(10919),h=t(93348),g=t(62609),v=t(86673),j=t(87815),b=t(55264),m=t(19711),x=t(46261),y=t(82531),Z=t(22341),O=t(66050),_=t(49125),P=t(45838),E=t(9736),C=t(96510),w=t(66653),k=t(28598),I=1.5*_.iI;n.Z=function(e){var n=e.disableActions,t=e.fetchPipelineSchedules,i=e.highlightRowOnHover,A=e.includeCreatedAtColumn,T=e.includePipelineColumn,S=e.pipeline,D=e.pipelineSchedules,N=e.pipelineTriggersByName,M=e.selectedSchedule,L=e.setErrors,R=e.setSelectedSchedule,H=e.stickyHeader,V=null===S||void 0===S?void 0:S.uuid,B=(0,l.useRouter)(),z=(0,c.useRef)({}),F=(0,c.useState)(null),U=F[0],q=F[1],W=(0,c.useState)(0),Y=W[0],Q=W[1],J=(0,c.useState)(0),K=J[0],X=J[1],G=(0,u.Db)((function(e){return y.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){null===t||void 0===t||t()},onErrorCallback:function(e,n){return L({errors:n,response:e})}})}}),$=(0,r.Z)(G,1)[0],ee=(0,u.Db)((function(e){return y.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){null===t||void 0===t||t(),V?B.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(V,"/triggers")):null===t||void 0===t||t()},onErrorCallback:function(e,n){return L({errors:n,response:e})}})}}),ne=(0,r.Z)(ee,1)[0],te=[],re=[];return n||(te.push.apply(te,[null,null,null]),re.push.apply(re,[{label:function(){return""},uuid:"action"},{uuid:"Info"},{uuid:"Type"}])),te.push.apply(te,[1]),re.push.apply(re,[{uuid:"Name"}]),n||(te.push.apply(te,[null,2]),re.push.apply(re,[{uuid:"Frequency"},{uuid:"Tags"}])),te.push.apply(te,[null,null,null]),re.push.apply(re,[{uuid:"Runs"},{uuid:"Latest status"},{uuid:"Logs"}]),n||(0,E.Ct)()||(te.push.apply(te,[null]),re.push({label:function(){return""},uuid:"edit/delete"})),!n&&T&&(re.splice(2,0,{uuid:"Pipeline"}),te.splice(2,0,2)),!n&&A&&(re.splice(3,0,{uuid:"Created at"}),te.splice(3,0,null)),(0,k.jsx)(P.cl,{overflowVisible:!0,children:0===D.length?(0,k.jsx)(v.Z,{px:3,py:1,children:(0,k.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,k.jsx)(j.Z,{columnFlex:te,columns:re,highlightRowOnHover:i,isSelectedRow:function(e){return D[e].id===(null===M||void 0===M?void 0:M.id)},onClickRow:R?function(e){return null===R||void 0===R?void 0:R(D[e])}:null,rowVerticalPadding:6,rows:D.map((function(e,t){var r,i=e.id,u=e.created_at,l=e.pipeline_runs_count,j=e.pipeline_uuid,y=e.last_pipeline_run_status,P=e.name,C=e.schedule_interval,S=e.status,D=e.tags,M=V||j;z.current[i]=(0,c.createRef)(),h.fq.ACTIVE===S?r=(0,k.jsx)(a.Z,{size:I,success:!0}):h.fq.INACTIVE===S&&(r=(0,k.jsx)(a.Z,{borderSize:1,size:I,square:!0,warning:!0}));var L,R=[];n?R.push.apply(R,[(0,k.jsx)(m.ZP,{bold:!0,children:P},"trigger_name_".concat(t))]):R.push.apply(R,[(0,k.jsx)(s.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,w.j)(n),$({id:e.id,status:h.fq.ACTIVE===S?h.fq.INACTIVE:h.fq.ACTIVE})},children:h.fq.ACTIVE===S?(0,k.jsx)(Z.dz,{muted:!0,size:2*_.iI}):(0,k.jsx)(Z.Py,{default:!0,size:2*_.iI})},"toggle_trigger_".concat(t)),(0,k.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,k.jsx)(x.Z,{block:!0,label:S,size:I,widthFitContent:!0,children:r}),(null===N||void 0===N?void 0:N[P])&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(v.Z,{mr:1}),(0,k.jsx)(x.Z,{block:!0,label:"This trigger is saved in code.",size:I,widthFitContent:!0,children:(0,k.jsx)(Z.EK,{default:!0,size:I})})]})]},"trigger_status_".concat(t)),(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:null===(L=h.Z4[e.schedule_type])||void 0===L?void 0:L.call(h.Z4)},"trigger_type_".concat(t)),(0,k.jsx)(o(),{as:"/pipelines/".concat(M,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,k.jsx)(p.Z,{bold:!0,onClick:function(e){(0,w.j)(e),B.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(i))},sameColorAsText:!0,children:P})},"trigger_name_".concat(t))]);return n||R.push.apply(R,[(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:C},"trigger_frequency_".concat(t)),(0,k.jsx)("div",{children:(0,k.jsx)(b.Z,{tags:null===D||void 0===D?void 0:D.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t))]),R.push.apply(R,[(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(t)),(0,k.jsx)(m.ZP,{danger:O.V.FAILED===y,default:!y,monospace:!0,success:O.V.COMPLETED===y,warning:O.V.CANCELLED===y,children:y||"N/A"},"latest_run_status_".concat(t)),(0,k.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,k.jsx)(Z.UL,{default:!0,size:2*_.iI})},"logs_button_".concat(t))]),n||(0,E.Ct)()||R.push((0,k.jsxs)(f.ZP,{children:[(0,k.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return B.push("/pipelines/".concat(M,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,k.jsx)(Z.I8,{default:!0,size:2*_.iI})}),(0,k.jsx)(v.Z,{mr:1}),(0,k.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;q(i),Q((null===(e=z.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),X((null===(t=z.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:z.current[i],title:"Delete",children:(0,k.jsx)(Z.rF,{default:!0,size:2*_.iI})}),(0,k.jsx)(d.Z,{onClickOutside:function(){return q(null)},open:U===i,children:(0,k.jsx)(g.Z,{danger:!0,left:(K||0)-286,onCancel:function(){return q(null)},onClick:function(){q(null),ne(i)},title:"Are you sure you want to delete the trigger ".concat(P,"?"),top:(Y||0)-(t<=1?40:96),width:40*_.iI})})]},"edit_delete_buttons_".concat(t))),!n&&T&&R.splice(2,0,(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:M},"pipeline_name_".concat(t))),!n&&A&&R.splice(3,0,(0,k.jsx)(m.ZP,{default:!0,monospace:!0,children:u},"created_at_".concat(t))),R})),stickyHeader:H,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return a}});t(82684);var r=t(60328),i=t(67971),o=t(86673),c=t(22341),u=t(73899),l=t(49125),s=t(28598),a=22;n.Z=function(e){var n=e.page,t=e.maxPages,a=e.onUpdate,d=e.totalPages,f=[],p=t;if(p>d)f=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(p/2),g=n-h;n+h>=d?(g=d-p+2,p-=2):n-h<=0?(g=0,p-=2):(p-=4,g=n-Math.floor(p/2)),f=Array.from({length:p},(function(e,n){return n+g}))}return(0,s.jsx)(s.Fragment,{children:d>0&&(0,s.jsxs)(i.ZP,{alignItems:"center",children:[(0,s.jsx)(r.Z,{disabled:0===n,onClick:function(){return a(n-1)},children:(0,s.jsx)(c.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!f.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{onClick:function(){return a(0)},borderLess:!0,noBackground:!0,children:1})},0),!f.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),f.map((function(e){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{onClick:function(){e!==n&&a(e)},notClickable:e===n,backgroundColor:e===n&&u.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!f.includes(d-1)&&(0,s.jsxs)(s.Fragment,{children:[!f.includes(d-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.Z,{onClick:function(){return a(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return a(n+1)},children:(0,s.jsx)(c.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running",e.UPSTREAM_FAILED="upstream_failed",e.CONDITION_FAILED="condition_failed"}(r||(r={}))},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return o},Z4:function(){return a},fq:function(){return u},kJ:function(){return s}});var r,i,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var u,l,s,a=(r={},(0,c.Z)(r,o.API,(function(){return"API"})),(0,c.Z)(r,o.EVENT,(function(){return"event"})),(0,c.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(s||(s={}));var d=(i={},(0,c.Z)(i,s.CREATED_AT,"Created at"),(0,c.Z)(i,s.NAME,"Name"),(0,c.Z)(i,s.PIPELINE,"Pipeline"),(0,c.Z)(i,s.STATUS,"Status"),(0,c.Z)(i,s.TYPE,"Type"),i)},79891:function(e,n,t){"use strict";var r=t(38626),i=t(60328),o=t(67971),c=t(86673),u=t(19711),l=t(23831),s=t(22341),a=t(49125),d=t(31012),f=t(28598),p=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((a.iI+d.Al)/2,"px;\n height: ").concat(1.5*a.iI+d.Al,"px;\n padding: ").concat(a.iI/1.5,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((a.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+a.iI/2+2,"px;\n padding: ").concat(a.iI/4,"px ").concat(a.iI,"px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,l=e.label,d=e.onClick,h=e.primary,g=e.small;return(0,f.jsx)(p,{border:n,primary:h,small:g,children:(0,f.jsx)(i.Z,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:d,transparent:!0,children:(0,f.jsxs)(o.ZP,{alignItems:"center",children:[t,l&&(0,f.jsx)(u.ZP,{small:g,children:l}),!r&&d&&(0,f.jsx)(c.Z,{ml:1,children:(0,f.jsx)(s.x8,{default:h,muted:!h,size:g?a.iI:1.25*a.iI})})]})})})}},46756:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(75582),c=t(38860),u=t.n(c),l=t(82684),s=t(34376),a=t(1210),d=t(67971),f=t(51099),p=t(41788),h=t(55378),g=t(86673),v=t(19711),j=t(97225),b=t(82531),m=t(93348),x=t(49125),y=t(33766),Z=t(59e3),O=t(28598);function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function E(){var e=(0,s.useRouter)(),n=(0,Z.iV)(),t=null!==n&&void 0!==n&&n.page?n.page:0,r=(null===n||void 0===n?void 0:n.order_by)||m.kJ.CREATED_AT,i={_limit:f.Q,_offset:t*f.Q,order_by:r},c=b.ZP.pipeline_schedules.list(i,{refreshInterval:7500,revalidateOnFocus:!0}),u=c.data,p=c.mutate,_=(0,l.useMemo)((function(){return(null===u||void 0===u?void 0:u.pipeline_schedules)||[]}),[u]),E=(0,l.useMemo)((function(){var e;return(null===u||void 0===u||null===(e=u.metadata)||void 0===e?void 0:e.count)||[]}),[u]);return(0,O.jsxs)(a.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,O.jsx)(g.Z,{mx:2,my:1,children:(0,O.jsxs)(d.ZP,{alignItems:"center",children:[(0,O.jsx)(v.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,O.jsx)(g.Z,{mr:1}),(0,O.jsx)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,y.u7)({order_by:e.target.value,page:0})},paddingRight:4*x.iI,placeholder:"Select column",value:r||m.kJ.CREATED_AT,children:Object.entries(m.TR).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,O.jsx)("option",{value:t,children:r},t)}))})]})}),(0,O.jsx)(j.Z,{fetchPipelineSchedules:p,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:_,stickyHeader:!0}),(0,O.jsx)(g.Z,{p:2,children:(0,O.jsx)(f.Z,{maxPages:9,onUpdate:function(t){var r=Number(t),i=P(P({},n),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,Z.uM)(i)))},page:Number(t),totalPages:Math.ceil(E/f.Q)})})]})}E.getInitialProps=(0,r.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)}))),n.default=(0,p.Z)(E)},33766:function(e,n,t){"use strict";t.d(n,{O2:function(){return d},g_:function(){return p},u7:function(){return f}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),l=t(24224);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d="_offset";function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.preserveParams,i=n.pushHistory,o=n.replaceParams,l=(0,u.iV)(),s={};t&&t.forEach((function(e){l[e]&&(s[e]=l[e])}));var d,f=o?s:l;d=window.location.pathname;var p=i?c().push:c().replace,h=a(a({},f),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete h[t]}));var g=(0,u.uM)(h);g.length>=1&&(g="?".concat(g));var v="".concat(d.split("?")[0]).concat(g),j=c().router.basePath;return j&&v.startsWith(j)&&(v=v.replace(j,"")),p(c().router.pathname,v,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,s=void 0!==u&&u,p=t.resetLimitParams,h=a({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");h[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),c="".concat(t,"[]"),u=h[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?h[c]=(0,l.Od)(u,(function(e){return e===o})):h[c]=u.concat(o):h[c]=[o]})):h=a(a({},h),n),p&&(h._limit=c||20,h[d]=0),f(h,{pushHistory:s})}},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(46756)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,1424,1005,7815,9774,2888,179],(function(){return n=59733,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(s,e,i,c,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,e,i,a,c,t,n,p,l,u,g,r,f,k,d,b,h,j,o,m,_,w,v,y,I,B,F,A,D,E,L,M,N,S){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/pages/index-32917acd76697307.js"],"/_error":["static/chunks/pages/_error-235304e5badb19eb.js"],"/files":[s,a,r,v,"static/chunks/5643-1f8a6d8a392fe96b.js",e,i,c,t,f,k,I,"static/chunks/pages/files-2dc2a0dfc0ff620d.js"],"/global-data-products":[s,a,e,i,c,h,A,"static/chunks/pages/global-data-products-2756fe6d9decae4a.js"],"/global-data-products/[...slug]":[s,a,e,i,c,h,A,"static/chunks/pages/global-data-products/[...slug]-6d3d53624debede6.js"],"/manage":[s,a,r,e,i,c,t,f,"static/chunks/pages/manage-6815a3ece7dc1678.js"],"/manage/settings":[s,a,r,"static/chunks/4398-5d5c07021ccd37b8.js",e,i,t,f,"static/chunks/pages/manage/settings-6577159a0af52a78.js"],"/manage/users":[s,e,i,c,"static/chunks/pages/manage/users-ec748f838b7b8fad.js"],"/manage/users/new":[s,e,i,y,"static/chunks/pages/manage/users/new-dd41d718cbb5990c.js"],"/manage/users/[user]":[s,e,i,c,y,"static/chunks/pages/manage/users/[user]-3b502aa6d1a04cad.js"],"/overview":[s,a,p,l,g,r,d,j,o,m,e,i,c,t,u,f,b,k,_,B,D,"static/chunks/pages/overview-7f790238fe70d9ab.js"],"/pipeline-runs":[s,a,e,i,c,h,"static/chunks/pages/pipeline-runs-33c7f2550add0719.js"],"/pipelines":[s,a,p,l,g,r,d,o,e,i,c,t,u,f,b,k,_,B,"static/chunks/pages/pipelines-1169f4eecf752033.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-ca9457e1a6bced4b.js"],"/pipelines/[pipeline]/backfills":[s,a,e,i,c,n,"static/chunks/pages/pipelines/[pipeline]/backfills-b8b4bed1e8e50068.js"],"/pipelines/[pipeline]/backfills/[...slug]":[s,a,p,l,g,w,F,e,i,c,t,n,u,h,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-07e4a3a674e83578.js"],"/pipelines/[pipeline]/edit":[E,s,a,p,l,g,r,d,j,w,o,m,v,L,"static/chunks/2991-d0b13a172f9c1dcd.js",e,i,c,t,u,f,b,k,_,I,M,"static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js"],"/pipelines/[pipeline]/logs":[s,a,p,d,F,e,i,c,t,n,b,"static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js"],"/pipelines/[pipeline]/monitors":[s,a,j,m,"static/chunks/2834-d2a1c03968995e8e.js",e,i,n,D,"static/chunks/pages/pipelines/[pipeline]/monitors-9fa0c4ce1c921a41.js"],"/pipelines/[pipeline]/monitors/block-runs":[s,a,j,m,"static/chunks/9404-1fb0792716d46efc.js",e,i,t,n,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-d87d0c21758a2d7c.js"],"/pipelines/[pipeline]/monitors/block-runtime":[E,s,a,j,m,"static/chunks/9464-84f4879568c00a93.js",e,i,t,n,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-68e1b861ef4fc0d7.js"],"/pipelines/[pipeline]/runs":[s,a,p,l,g,w,e,i,c,t,n,u,h,N,"static/chunks/pages/pipelines/[pipeline]/runs-4a2671811a153411.js"],"/pipelines/[pipeline]/runs/[run]":[s,a,p,l,g,d,j,w,L,e,i,c,t,n,u,b,M,N,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-d5ef19ca1f9931de.js"],"/pipelines/[pipeline]/settings":[s,a,e,i,n,S,"static/chunks/pages/pipelines/[pipeline]/settings-8872a6e00280f58c.js"],"/pipelines/[pipeline]/syncs":[s,a,e,i,c,n,"static/chunks/pages/pipelines/[pipeline]/syncs-484581ae34a1c596.js"],"/pipelines/[pipeline]/triggers":[s,a,p,l,e,i,c,t,n,u,"static/chunks/pages/pipelines/[pipeline]/triggers-624a2d7cbe6303b4.js"],"/pipelines/[pipeline]/triggers/[...slug]":[s,a,p,l,g,w,F,e,i,c,t,n,u,h,S,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ce11db27e4af7869.js"],"/settings":["static/chunks/pages/settings-d594a66a568306da.js"],"/settings/account/profile":[s,e,i,y,"static/chunks/pages/settings/account/profile-c3ff06a12baa40a2.js"],"/settings/workspace/preferences":[s,e,i,"static/chunks/pages/settings/workspace/preferences-60b4398d7ae00206.js"],"/settings/workspace/sync-data":[s,e,i,"static/chunks/pages/settings/workspace/sync-data-05b53444f0e7449b.js"],"/settings/workspace/users":[s,e,i,c,y,"static/chunks/pages/settings/workspace/users-89429fea9d64e29d.js"],"/sign-in":[s,e,"static/chunks/pages/sign-in-a5e9561a6c0d2e38.js"],"/templates":[s,a,p,l,g,r,d,o,e,i,c,t,u,f,b,k,_,B,"static/chunks/pages/templates-ce2a29d477a6ce94.js"],"/templates/[...slug]":[s,a,p,l,g,r,d,o,e,i,c,t,u,f,b,k,_,"static/chunks/pages/templates/[...slug]-c21b269750441494.js"],"/terminal":[s,e,i,"static/chunks/pages/terminal-d483cf913167fd8d.js"],"/test":[v,"static/chunks/pages/test-b24d77dc84843924.js"],"/triggers":[s,e,i,c,"static/chunks/pages/triggers-71bbb30dd9b57f80.js"],"/version-control":[s,a,v,"static/chunks/7768-2325216ed654ad05.js",e,i,c,t,k,I,"static/chunks/pages/version-control-1dc780d52fbd1573.js"],sortedPages:["/","/_app","/_error","/files","/global-data-products","/global-data-products/[...slug]","/manage","/manage/settings","/manage/users","/manage/users/new","/manage/users/[user]","/overview","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/settings","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/settings","/settings/account/profile","/settings/workspace/preferences","/settings/workspace/sync-data","/settings/workspace/users","/sign-in","/templates","/templates/[...slug]","/terminal","/test","/triggers","/version-control"]}}("static/chunks/844-1e171f361e63b36d.js","static/chunks/1424-fca78f21a81a7183.js","static/chunks/1005-a2f0e3ee378ef02b.js","static/chunks/9902-b7981346a40ecdc3.js","static/chunks/7815-8b68b0eb665fcd2d.js","static/chunks/6422-0cdd6e596dcd43b6.js","static/chunks/547-bd961ea93f3eb98b.js","static/chunks/426-df62b0bd693bbb87.js","static/chunks/1774-aa51ef1da7217ff9.js","static/chunks/8952-9d6fa18fa9378989.js","static/chunks/8792-10e45963e2486454.js","static/chunks/8789-4f858e520d46973b.js","static/chunks/7722-76c724a66240561b.js","static/chunks/3391-6f0a0a5c254cd7f2.js","static/chunks/4259-b71c17f69499f7bd.js","static/chunks/4822-ee62acb1927c8150.js","static/chunks/7496-7e4dd11e3f3b8e79.js","static/chunks/5896-42c94d54cd2c5706.js","static/chunks/9055-d0d25298cb5f4e45.js","static/chunks/2714-1e79e9f2e998b544.js","static/chunks/1484-87d4d4a698ac63dc.js","static/chunks/7849-1081cd94cceb0227.js","static/chunks/7011-81dd8269c4806d26.js","static/chunks/3881-131cf690e54c23a3.js","static/chunks/6299-fcb702d0f3d3291b.js","static/chunks/2485-39885e5335888821.js","static/chunks/4495-4f0340aa82e0c623.js","static/chunks/9605-9332e1686c46da7d.js","static/chunks/6786-55e1bca3c897d5ee.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/5872-1767c45ee6690ae5.js","static/chunks/437-331193bd9b2fe777.js","static/chunks/2786-f71862671f66d948.js","static/chunks/8190-d38ed1133030797d.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|