mage-ai 0.8.26__py3-none-any.whl → 0.8.27__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/data_preparation/executors/streaming_pipeline_executor.py +2 -1
- mage_ai/data_preparation/logging/logger_manager.py +7 -1
- mage_ai/data_preparation/models/block/__init__.py +60 -29
- mage_ai/data_preparation/models/block/sql/__init__.py +25 -8
- mage_ai/data_preparation/models/block/sql/utils/shared.py +49 -3
- mage_ai/data_preparation/models/variable.py +6 -1
- mage_ai/data_preparation/repo_manager.py +5 -2
- mage_ai/data_preparation/shared/secrets.py +6 -3
- mage_ai/data_preparation/templates/sensors/bigquery.py +32 -0
- mage_ai/data_preparation/templates/sensors/mysql.py +33 -0
- mage_ai/data_preparation/templates/sensors/postgres.py +33 -0
- mage_ai/data_preparation/templates/sensors/redshift.py +33 -0
- mage_ai/data_preparation/templates/sensors/s3.py +11 -7
- mage_ai/data_preparation/templates/sensors/snowflake.py +33 -0
- mage_ai/io/postgres.py +13 -1
- 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/WbTBCvyjQQ9UFFLZOU1E5/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2344-f8ae030d6a6863ae.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2626-e7fa4f83f8214c97.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{4178-663d9f70bffc7a47.js → 4178-a6d1bd2be4706f51.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4261-88b0103fad331620.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/5141-57c3868a80196da8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6166-705b4fdecaf11e63.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6532-b1bd0b3f422abec8.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/8180-8de652170ea5ed93.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/839-15c54471a9a9bf2e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{9386-9d6a4e5836229264.js → 9386-d4cc11bab74eec8d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-624f87faa4b5ee9a.js → _app-5f3dbed367342a3d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-3046bc53d24917c7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-f6059e27e601627c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-123556bdfe2e194b.js → [...slug]-050ef37b6672100a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-5f95bb4c3a2d7d46.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-270c0198eeef1542.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-c9f1df40e0aa6981.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-e0eb0098dcbf27ac.js → block-runs-d74850779dbe87b3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-848544a58563dbec.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-204daac985c03b62.js → monitors-675171cfd7d7b346.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-44533e244974a422.js → [run]-b2955f0ff960894e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-2d41695001370abc.js → runs-219960b3cc4742e3.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-1767a2f57f887ef7.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-0f373aaa7deb98c9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-181343d8eb894426.js → triggers-bea0439ca2a862ba.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-7446a70bdd8381a5.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-d72dfc596e943cc4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-4c9ad80f8f9d1074.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-783b9526167f1249.js +1 -0
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage.html +4 -4
- mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +5 -5
- mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +5 -5
- mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +9 -9
- mage_ai/server/frontend_dist/terminal.html +5 -5
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +5 -5
- mage_ai/server/server.py +1 -6
- mage_ai/shared/security.py +9 -2
- mage_ai/shared/utils.py +7 -0
- mage_ai/tests/shared/test_security.py +6 -6
- {mage_ai-0.8.26.dist-info → mage_ai-0.8.27.dist-info}/METADATA +1 -1
- {mage_ai-0.8.26.dist-info → mage_ai-0.8.27.dist-info}/RECORD +86 -81
- mage_ai/server/frontend_dist/_next/static/chunks/1830-3882c19d710feadd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2344-a82a406b72fe782b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2626-30c0fab7c3926578.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3688-562e0f129b09d1cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3699-dcc0946dd0709216.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4463-777e71000be29fc4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6532-baf1818fbc89e6c1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6567-2488118bb39a9d99.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-c580ee38f5442bef.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-dd72d2f3375064cf.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-26974ca695994804.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-df603787c041cd8a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-72011b08ef047531.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-3b17a6d28cdde471.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-c31fec2be1160dbe.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-3a60003fce7dfb93.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-ebb4a57934e4fa52.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-ff24167e21f2f0cf.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-be9eab29e8ed712b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-e9c1789f6d5a0429.js +0 -1
- mage_ai/server/frontend_dist/_next/static/kiWhqtXdRSgsbVPwfDLY4/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{kiWhqtXdRSgsbVPwfDLY4 → WbTBCvyjQQ9UFFLZOU1E5}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{kiWhqtXdRSgsbVPwfDLY4 → WbTBCvyjQQ9UFFLZOU1E5}/_ssgManifest.js +0 -0
- {mage_ai-0.8.26.dist-info → mage_ai-0.8.27.dist-info}/LICENSE +0 -0
- {mage_ai-0.8.26.dist-info → mage_ai-0.8.27.dist-info}/WHEEL +0 -0
- {mage_ai-0.8.26.dist-info → mage_ai-0.8.27.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.8.26.dist-info → mage_ai-0.8.27.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function c(){}c.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,c,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:c,resetWarningCache:i};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return T}});var r=t(82394),i=t(21831),c=t(82684),o=t(47999),s=t(49894),a=t(93461),u=t(57384),l=t(12344),d=t(72454),f=t(28598);function h(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var p=c.forwardRef(h),m=t(32063),v=t(15270),x=t(82531),O=t(66166),b=t(3055),E=t(49125),j=t(91427),R=t(24141);function Z(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?Z(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n,t=e.after,r=e.afterHidden,h=e.afterWidth,Z=e.afterWidthOverride,T=e.before,P=e.beforeWidth,g=e.breadcrumbs,S=e.children,_=e.errors,C=e.headerMenuItems,D=e.navigationItems,y=e.setErrors,w=e.subheaderChildren,k=e.title,N=e.uuid,I=(0,R.i)().width,M="dashboard_after_width_".concat(N),L="dashboard_before_width_".concat(N),F=(0,c.useRef)(null),H=(0,c.useState)(Z?h:(0,j.U2)(M,h)),W=H[0],U=H[1],X=(0,c.useState)(!1),Y=X[0],z=X[1],B=(0,c.useState)(T?Math.max((0,j.U2)(L,P),13*E.iI):null),G=B[0],q=B[1],Q=(0,c.useState)(!1),V=Q[0],$=Q[1],J=(0,c.useState)(null)[1],K=x.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===K||void 0===K?void 0:K.projects,ne=[];g?ne.push.apply(ne,(0,i.Z)(g)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return k}}]),(0,c.useEffect)((function(){null===F||void 0===F||!F.current||Y||V||null===J||void 0===J||J(F.current.getBoundingClientRect().width)}),[Y,W,V,G,F,J,I]),(0,c.useEffect)((function(){Y||(0,j.t8)(M,W)}),[r,Y,W,M]),(0,c.useEffect)((function(){V||(0,j.t8)(L,G)}),[V,G,L]);var te=(0,O.Z)(h);return(0,c.useEffect)((function(){Z&&te!==h&&U(h)}),[Z,h,te]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Z,{title:k}),(0,f.jsx)(l.Z,{breadcrumbs:ne,menuItems:C,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[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,{children:(0,f.jsx)(v.Z,{navigationItems:D})}),(0,f.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:t,afterHeightOffset:b.Mz,afterHidden:r,afterMousedownActive:Y,afterWidth:W,before:T,beforeHeightOffset:b.Mz,beforeMousedownActive:V,beforeWidth:d.k1+(T?G:0),hideAfterCompletely:!0,leftOffset:T?d.k1:null,mainContainerRef:F,setAfterMousedownActive:z,setAfterWidth:U,setBeforeMousedownActive:$,setBeforeWidth:q,children:[w&&(0,f.jsx)(p,{children:w}),S]})})]}),_&&(0,f.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===y||void 0===y?void 0:y(null)},children:(0,f.jsx)(s.Z,A(A({},_),{},{onClose:function(){return null===y||void 0===y?void 0:y(null)}}))})]})}},65597:function(e,n,t){"use strict";t.d(n,{f:function(){return s}});var r=t(9518),i=t(23831),c=t(49125),o=t(73942),s=r.default.div.withConfig({displayName:"Tablestyle__PopupContainerStyle",componentId:"sc-8ammqd-0"})(["position:absolute;max-height:","px;z-index:10;border-radius:","px;padding:","px;"," "," "," ",""],58*c.iI,o.TR,2*c.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||i.Z.shadow).popup,";\n background-color: ").concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.leftOffset&&"\n left: ".concat(e.leftOffset,"px;\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}))},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return f},DA:function(){return d},HX:function(){return m},J8:function(){return p},Lq:function(){return u},Qj:function(){return v},Ut:function(){return E},V4:function(){return b},VZ:function(){return h},dO:function(){return l},f2:function(){return O},iZ:function(){return x},t6:function(){return o},tf:function(){return a}});var r,i,c,o,s=t(82394);!function(e){e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(o||(o={}));var a,u,l=(r={},(0,s.Z)(r,o.PYTHON,"PY"),(0,s.Z)(r,o.R,"R"),(0,s.Z)(r,o.SQL,"SQL"),(0,s.Z)(r,o.YAML,"YAML"),r);!function(e){e.CHART="chart",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.TRANSFORMER="transformer"}(a||(a={})),function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(u||(u={}));var d,f=[a.CHART,a.CUSTOM,a.DATA_EXPORTER,a.DATA_LOADER,a.SCRATCHPAD,a.SENSOR,a.TRANSFORMER],h=[a.DATA_EXPORTER,a.DATA_LOADER],p=[a.DATA_EXPORTER,a.DATA_LOADER,a.TRANSFORMER],m=[a.DATA_EXPORTER,a.DATA_LOADER,a.DBT,a.TRANSFORMER],v=[a.CHART,a.SCRATCHPAD,a.SENSOR],x=[a.EXTENSION,a.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(d||(d={}));var O=[a.CUSTOM,a.DATA_EXPORTER,a.TRANSFORMER],b=(i={},(0,s.Z)(i,a.CUSTOM,"Custom"),(0,s.Z)(i,a.DATA_EXPORTER,"Data exporter"),(0,s.Z)(i,a.DATA_LOADER,"Data loader"),(0,s.Z)(i,a.EXTENSION,"Extension"),(0,s.Z)(i,a.SCRATCHPAD,"Scratchpad"),(0,s.Z)(i,a.SENSOR,"Sensor"),(0,s.Z)(i,a.TRANSFORMER,"Transformer"),i),E=[a.DATA_LOADER,a.TRANSFORMER,a.DATA_EXPORTER,a.SENSOR];c={},(0,s.Z)(c,a.DATA_EXPORTER,"DE"),(0,s.Z)(c,a.DATA_LOADER,"DL"),(0,s.Z)(c,a.SCRATCHPAD,"SP"),(0,s.Z)(c,a.SENSOR,"SR"),(0,s.Z)(c,a.TRANSFORMER,"TF")},48438:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return F}});var r=t(77837),i=t(75582),c=t(38860),o=t.n(c),s=t(82684),a=t(83455),u=t(60328),l=t(47999),d=t(57722),f=t(67971),h=t(87372),p=t(11135),m=t(86673),v=t(58180),x=t(19711),O=t(82944),b=t(70902),E=t(82531),j=t(10503),R=t(86422),Z=t(73899),A=t(99994),T=t(85307),P=t(49125),g=t(96510),S=t(90211),_=t(28598);var C=function(e){var n=e.fetchInstances,t=e.instanceType,r=(0,s.useState)(),c=r[0],o=r[1],u=(0,s.useState)(),l=u[0],C=u[1],D=(0,s.useState)(),y=D[0],w=D[1],k=(0,s.useState)(null),N=k[0],I=k[1],M=(0,s.useState)(),L=M[0],F=M[1],H=(0,s.useState)(),W=H[0],U=H[1],X=(0,a.Db)(E.ZP.instances.clusters.useCreate(t),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(e){e.success?(n(),o(!1)):C(e.error_message)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),Y=(0,i.Z)(X,2),z=Y[0],B=Y[1].isLoading,G=[[(0,_.jsx)(x.ZP,{bold:!0,color:Z.cM,children:"Instance name"}),(0,_.jsx)(O.Z,{label:"ecs"===t?"Spaces will be replaced by underscores":"Spaces will be replaced by hyphens",monospace:!0,onChange:function(e){e.preventDefault(),F(e.target.value)},placeholder:"Name your new instance",value:L})]];return"k8s"===t&&G.push([(0,_.jsx)(x.ZP,{bold:!0,color:Z.cM,children:"Service account name (optional)"}),(0,_.jsx)(O.Z,{label:"Name of service account to be attached to stateful set",monospace:!0,onChange:function(e){e.preventDefault(),U(e.target.value)},placeholder:"Service account name",value:W})]),(0,_.jsx)(_.Fragment,{children:c?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(h.Z,{default:!0,level:5,monospace:!0,children:"Configure new instance"}),(0,_.jsx)(v.Z,{columnFlex:[null,3],rows:G}),"k8s"===t&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(m.Z,{mt:1,children:(0,_.jsxs)(f.Z,{alignItems:"center",children:[(0,_.jsx)(x.ZP,{default:!0,monospace:!0,children:"Configure container"}),(0,_.jsx)(m.Z,{ml:1}),(0,_.jsx)(b.Z,{checked:y,onCheck:function(){return w((function(e){return!e}))}})]})}),y&&(0,_.jsx)(m.Z,{mt:1,children:(0,_.jsx)(T.$W,{children:(0,_.jsx)(d.Z,{autoHeight:!0,language:R.t6.YAML,onChange:function(e){I(e)},tabSize:2,value:N||void 0,width:"100%"})})})]}),B&&(0,_.jsx)(m.Z,{mt:1,children:(0,_.jsx)(x.ZP,{small:!0,warning:!0,children:"This may take up to a few minutes... Once the service is created, it may take another 5-10 minutes for the service to be accessible."})}),!B&&l&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(m.Z,{mt:1,children:(0,_.jsx)(x.ZP,{small:!0,danger:!0,children:"Failed to create instance, see error below."})}),(0,_.jsx)(m.Z,{mt:1,children:(0,_.jsx)(x.ZP,{small:!0,danger:!0,children:l})})]}),(0,_.jsx)(m.Z,{my:2,children:(0,_.jsxs)(f.Z,{children:[(0,_.jsx)(p.ZP,{background:Z.a$,bold:!0,inline:!0,loading:B,onClick:function(){return z({instance:{name:(e=L,"ecs"===t?(0,S.We)(e,"_"):(0,S.We)(e,"-")),service_account_name:W,container_config:y&&N}});var e},uuid:"EnvironmentListPage/new",children:"Create"}),(0,_.jsx)(m.Z,{ml:1}),(0,_.jsx)(p.ZP,{bold:!0,inline:!0,onClick:function(){return o(!1)},uuid:"EnvironmentListPage/cancel",children:"Cancel"})]})})]}):(0,_.jsx)(p.ZP,{background:A.eW,beforeElement:(0,_.jsx)(j.mm,{size:2.5*P.iI}),bold:!0,inline:!0,onClick:function(){F((0,S.Y6)()),o(!0)},uuid:"EnvironmentListPage/new_instance",children:"Create new instance"})})},D=t(1210),y=t(62084),w=t(41788),k=t(73942),N=t(65597),I=t(72454);function M(e){var n=e.fetchInstances,t=e.instance,r=e.instanceType,c=(0,s.useRef)(null),o=(0,s.useState)(),d=o[0],h=o[1],p=(0,s.useState)(),v=p[0],O=p[1],b=t.name,R=t.task_arn,Z={};R&&(Z.task_arn=R);var A=(0,a.Db)(E.ZP.instances.clusters.useUpdate(r,b),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(){n(),h(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),T=(0,i.Z)(A,1)[0],S=(0,a.Db)(E.ZP.instances.clusters.useDelete(r,b,Z),{onSuccess:function(e){return(0,g.wD)(e,{callback:function(){n(),h(!1)},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),C=(0,i.Z)(S,1)[0],D=(0,s.useMemo)((function(){var e=t.status,n=[{label:function(){return(0,_.jsx)(x.ZP,{children:"Delete instance"})},onClick:function(){return O(!0)},uuid:"delete_instance"}];return"STOPPED"===e?n.unshift({label:function(){return(0,_.jsx)(x.ZP,{children:"Resume instance"})},onClick:function(){return T({instance:{action:"resume",name:t.name,task_arn:t.task_arn}})},uuid:"resume_instance"}):"RUNNING"===e&&n.unshift({label:function(){return(0,_.jsx)(x.ZP,{children:"Stop instance"})},onClick:function(){return T({instance:{action:"stop",name:t.name,task_arn:t.task_arn}})},uuid:"stop_instance"}),n}),[t]);return(0,_.jsx)(_.Fragment,{children:"ecs"===r&&(0,_.jsxs)("div",{ref:c,style:{position:"relative",zIndex:"1"},children:[(0,_.jsx)(u.Z,{iconOnly:!0,onClick:function(){return h(!d)},children:(0,_.jsx)(j.mH,{size:2*P.iI})}),(0,_.jsx)(l.Z,{disableEscape:!0,onClickOutside:function(){h(!1),O(!1)},open:d,children:v?(0,_.jsxs)(N.f,{leftOffset:30*-P.iI,topOffset:3*-P.iI,width:30*P.iI,children:[(0,_.jsx)(x.ZP,{children:"Are you sure you want to delete"}),(0,_.jsx)(x.ZP,{children:"this instance? You may not be"}),(0,_.jsx)(x.ZP,{children:"able to recover your data."}),(0,_.jsx)(m.Z,{mt:1}),(0,_.jsxs)(f.Z,{children:[(0,_.jsx)(u.Z,{danger:!0,onClick:C,children:"Confirm"}),(0,_.jsx)(m.Z,{ml:1}),(0,_.jsx)(u.Z,{default:!0,onClick:function(){return O(!1)},children:"Cancel"})]})]}):(0,_.jsx)(y.Z,{items:D,left:25*-P.iI,open:d,parentRef:c,topOffset:3*-P.iI,uuid:"Manage/more_actions",width:25*P.iI})})]})})}function L(){var e,n=(0,s.useState)(),t=(n[0],n[1],E.ZP.status.list().data),r=(null===t||void 0===t||null===(e=t.status)||void 0===e?void 0:e.instance_type)||"ecs",i=E.ZP.instances.clusters.list(r,{},{refreshInterval:3e3,revalidateOnFocus:!0}),c=i.data,o=i.mutate,a=(0,s.useMemo)((function(){var e;return null===c||void 0===c||null===(e=c.instances)||void 0===e?void 0:e.filter((function(e){return e.name}))}),[c]);return(0,_.jsx)(D.Z,{afterWidth:I.k1,beforeWidth:I.k1,breadcrumbs:[{bold:!0,label:function(){return"Manage (".concat(r,")")}}],navigationItems:[],subheaderChildren:(0,_.jsx)(C,{fetchInstances:o,instanceType:r}),title:"Manage",uuid:"Manage/index",children:(0,_.jsx)(v.Z,{columns:[{uuid:"Status"},{uuid:"Instance Name"},{uuid:"Type"},{uuid:"Public IP address"},{uuid:"Open"},{label:function(){return""},uuid:"Actions"}],columnFlex:[2,4,2,3,1,null],rows:null===a||void 0===a?void 0:a.map((function(e){var n=e.ip,t=e.name,i=e.status,c=e.type,s="http://".concat(n);return"ecs"===r&&(s="http://".concat(n,":6789")),[(0,_.jsx)(u.Z,{borderRadius:k.D7,danger:"STOPPED"===i,default:"PROVISIONING"===i,notClickable:!0,padding:"6px",primary:"RUNNING"===i,warning:"PENDING"===i,children:(0,S.vg)(i)}),(0,_.jsx)(x.ZP,{children:t}),(0,_.jsx)(x.ZP,{children:(0,S.vg)(c)}),(0,_.jsx)(x.ZP,{children:n}),(0,_.jsx)(u.Z,{iconOnly:!0,onClick:function(){return window.open(s)},children:(0,_.jsx)(j.M0,{size:2*P.iI})}),(0,_.jsx)(M,{fetchInstances:o,instance:e,instanceType:r})]}))})})}L.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var F=(0,w.Z)(L)},13157:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage",function(){return t(48438)}])}},function(e){e.O(0,[3850,2083,8789,2344,9386,6166,8180,4261,9774,2888,179],(function(){return n=13157,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1009],{1210:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(82394),i=n(21831),u=n(82684),o=n(47999),l=n(49894),s=n(93461),a=n(57384),c=n(12344),d=n(72454),f=n(28598);function p(e,t){var n=e.children;return(0,f.jsx)(d.HS,{ref:t,children:n})}var v=u.forwardRef(p),h=n(32063),b=n(15270),j=n(82531),O=n(66166),g=n(3055),m=n(49125),x=n(91427),w=n(24141);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(e){var t,n=e.after,r=e.afterHidden,p=e.afterWidth,P=e.afterWidthOverride,Z=e.before,_=e.beforeWidth,E=e.breadcrumbs,C=e.children,D=e.errors,I=e.headerMenuItems,k=e.navigationItems,M=e.setErrors,N=e.subheaderChildren,A=e.title,S=e.uuid,R=(0,w.i)().width,W="dashboard_after_width_".concat(S),F="dashboard_before_width_".concat(S),H=(0,u.useRef)(null),L=(0,u.useState)(P?p:(0,x.U2)(W,p)),T=L[0],U=L[1],B=(0,u.useState)(!1),Q=B[0],V=B[1],z=(0,u.useState)(Z?Math.max((0,x.U2)(F,_),13*m.iI):null),X=z[0],G=z[1],q=(0,u.useState)(!1),J=q[0],K=q[1],Y=(0,u.useState)(null)[1],$=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,te=[];E?te.push.apply(te,(0,i.Z)(E)):(null===ee||void 0===ee?void 0:ee.length)>=1&&te.push.apply(te,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return A}}]),(0,u.useEffect)((function(){null===H||void 0===H||!H.current||Q||J||null===Y||void 0===Y||Y(H.current.getBoundingClientRect().width)}),[Q,T,J,X,H,Y,R]),(0,u.useEffect)((function(){Q||(0,x.t8)(W,T)}),[r,Q,T,W]),(0,u.useEffect)((function(){J||(0,x.t8)(F,X)}),[J,X,F]);var ne=(0,O.Z)(p);return(0,u.useEffect)((function(){P&&ne!==p&&U(p)}),[P,p,ne]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:A}),(0,f.jsx)(c.Z,{breadcrumbs:te,menuItems:I,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(t=ee[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===k||void 0===k?void 0:k.length)&&(0,f.jsx)(d.lm,{children:(0,f.jsx)(b.Z,{navigationItems:k})}),(0,f.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:n,afterHeightOffset:g.Mz,afterHidden:r,afterMousedownActive:Q,afterWidth:T,before:Z,beforeHeightOffset:g.Mz,beforeMousedownActive:J,beforeWidth:d.k1+(Z?X:0),hideAfterCompletely:!0,leftOffset:Z?d.k1:null,mainContainerRef:H,setAfterMousedownActive:V,setAfterWidth:U,setBeforeMousedownActive:K,setBeforeWidth:G,children:[N&&(0,f.jsx)(v,{children:N}),C]})})]}),D&&(0,f.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===M||void 0===M?void 0:M(null)},children:(0,f.jsx)(l.Z,y(y({},D),{},{onClose:function(){return null===M||void 0===M?void 0:M(null)}}))})]})}},66050:function(e,t,n){"use strict";var r;n.d(t,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running"}(r||(r={}))},92597:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(82394),u=n(38860),o=n.n(u),l=n(82684),s=n(34376),a=n(1210),c=n(67971),d=n(51099),f=n(97496),p=n(41788),v=n(55378),h=n(86673),b=n(19711),j=n(82531),O=n(47409),g=n(66050),m=n(49125),x=n(33766),w=n(59e3),P=n(28598);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(){var e=(0,s.useRouter)(),t=(0,w.iV)(),n=null!==t&&void 0!==t&&t.page?t.page:0,r={_limit:d.Q,_offset:n*d.Q};null!==t&&void 0!==t&&t.status&&(r.status=t.status);var i=j.ZP.pipeline_runs.list(r,{refreshInterval:3e3,revalidateOnFocus:!0}),u=i.data,o=i.mutate,p=(0,l.useMemo)((function(){return(null===u||void 0===u?void 0:u.pipeline_runs)||[]}),[u]),y=(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,P.jsxs)(a.Z,{title:"Pipeline runs",uuid:"pipeline_runs/index",children:[(0,P.jsx)(h.Z,{mx:2,my:1,children:(0,P.jsxs)(c.Z,{alignItems:"center",children:[(0,P.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}),(0,P.jsx)(h.Z,{mr:1}),(0,P.jsxs)(v.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(t){t.preventDefault(),"all"===t.target.value?e.push("/pipeline-runs"):(0,x.u7)({page:0,status:t.target.value})},paddingRight:4*m.iI,placeholder:"Select run status",value:(null===t||void 0===t?void 0:t.status)||"all",children:[(0,P.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(g.V).map((function(e){return(0,P.jsx)("option",{value:e,children:O.D[e]},e)}))]})]})}),(0,P.jsx)(f.Z,{fetchPipelineRuns:o,pipelineRuns:p}),(0,P.jsx)(h.Z,{p:2,children:(0,P.jsx)(d.Z,{maxPages:9,onUpdate:function(n){var r=Number(n),i=Z(Z({},t),{},{page:r>=0?r:0});e.push("/pipeline-runs","/pipeline-runs?".concat((0,w.uM)(i)))},page:Number(n),totalPages:Math.ceil(y/d.Q)})})]})}_.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,p.Z)(_)},60710:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipeline-runs",function(){return n(92597)}])}},function(e){e.O(0,[3850,2083,2344,9386,6166,8180,4178,9774,2888,179],(function(){return t=60710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return c}});var i=t(9518),r=t(23831),l=t(3055),c=34*t(49125).iI,a=i.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],l.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||r.Z.borders).medium,";\n ")}))},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return g},Z:function(){return Z}});var i=t(75582),r=t(82394),l=t(26304),c=t(32316),a=t(22673),s=t(86532),u=t(86673),o=t(19711),d=t(87815),p=t(49125),f=t(19395),b=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j={uuid:"Run details"},x={uuid:"Dependency tree"},g=[x,j];function Z(e){var n=e.height,t=e.heightOffset,r=e.pipeline,h=e.selectedRun,Z=e.selectedTab,y=e.setSelectedTab,O=m({},(0,l.Z)(e,v));h?O.blockStatus=(0,f.IJ)(null===h||void 0===h?void 0:h.block_runs):O.noStatus=!0;var k=(null===h||void 0===h?void 0:h.variables)||{};null!==h&&void 0!==h&&h.event_variables&&(k.event=h.event_variables);var _=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){_.push(" ".concat(e))}));var P=h&&[["Run ID",null===h||void 0===h?void 0:h.id],["Variables",(0,b.jsx)(a.Z,{language:"json",small:!0,source:_.join("\n")})]],I=h&&(0,b.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:P.map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,b.jsx)(o.ZP,{monospace:!0,muted:!0,children:t}),(0,b.jsx)(o.ZP,{monospace:!0,textOverflow:!0,children:r})]})),uuid:"LogDetail"})}),w=Z&&y;return(0,b.jsxs)(b.Fragment,{children:[w&&(0,b.jsx)(u.Z,{py:p.cd,children:(0,b.jsx)(c.Z,{onClickTab:y,selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:g})}),(!w||x.uuid===(null===Z||void 0===Z?void 0:Z.uuid))&&(0,b.jsx)(s.Z,m(m({},O),{},{height:n,heightOffset:(t||0)+(w?76:0),pipeline:r})),j.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&I]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return b},JZ:function(){return h},e7:function(){return m},v0:function(){return p},wx:function(){return v}});var i=t(75582),r=t(82394),l=t(43313),c=t(93348),a=t(1286),s=t(90211),u=t(84779);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function d(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}function p(e){var n=e.statistics,t=Object.keys(n),i=Array(l.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(l.Dy.includes(e)){var t=l.CC[e],r=n[e],c=r,a=!1,s=[2,3],o=l.Ub[e],d=l.oH[e],p=l.OD[e];if(l.y_.includes(e))a=!0,s=[2,1,2];else if(e in l.Sq){r=(0,u.Jw)(r,0);var f=l.Sq[e];c=n[f]}var b={columnFlexNumbers:s,name:t,progress:a,rate:c,successDirection:d,warning:p};l.y_.includes(e)||(b.value=r),i[o]=b}})),i)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,i=e.statistics,r=Object.keys(i);if(0===r.length)return null;var c=Object.values(t),u=c.length,o=[];o.push({name:"Column count",successDirection:l.oH.column_count,value:(0,s.x6)(u)}),r.forEach((function(e){if(l.Zu.includes(e)){var n=l.CC[e],t=i[e],r=l.OD[e];o.push({name:n,successDirection:l.oH[e],value:(0,s.x6)(t),warning:r})}}));var d=(0,a.QO)(c),p=d.countCategory,f=d.countDatetime,b=d.countNumerical;return o.push({name:"Categorical Features",rate:p/u,value:(0,s.x6)(p)},{name:"Numerical Features",rate:b/u,value:(0,s.x6)(b)},{name:"Datetime Features",rate:f/u,value:(0,s.x6)(f)}),o}function b(e){return"string"===typeof e?e:JSON.stringify(e)}function v(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return d(d({},e),{},{value:b(n)})}))}function h(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 m(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],c=t[1],a=c;try{a=JSON.parse(c)}catch(s){}return d(d({},e),{},(0,r.Z)({},l,a))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return a}});var i=t(9518),r=t(23831),l=t(73942),c=t(49125),a=i.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*c.iI,c.cd*c.iI,c.cd*c.iI,40*c.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,c.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*c.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*c.iI,"px;\n ")}))},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return i},IB:function(){return s},VV:function(){return l},_7:function(){return c},rn:function(){return a}});var i,r=t(66050),l="datetime",c="code",a=r.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(i||(i={}));var s=[i.SECOND,i.MINUTE,i.HOUR,i.DAY,i.WEEK,i.MONTH,i.YEAR,i.CUSTOM]},2713:function(e,n,t){"use strict";var i=t(82394),r=t(44495),l=t(67971),c=t(55378),a=t(86673),s=t(19711),u=t(18025),o=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,i=e.setSelectedDate,f=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(r.ZP,{onChange:i,value:n}),(0,p.jsx)(a.Z,{mb:2}),(0,p.jsxs)(l.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(a.Z,{pr:2}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return b(b({},n),{},{hour:e.target.value})}))},paddingRight:5*o.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(a.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return b(b({},n),{},{minute:e.target.value})}))},paddingRight:5*o.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var i=t(82684),r=t(73199),l=t.n(r),c=t(71593),a=t(9518),s=t(65292),u=t(23831),o=t(2005),d=t(49125),p=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,r=e.showLineNumbers,f=e.small,b=e.source,v=e.wrapLines,h=(0,i.useContext)(a.ThemeContext);return(0,p.jsx)(l(),{source:b,renderers:{code:function(e){var i=e.value;return(0,p.jsx)(c.Z,{customStyle:{backgroundColor:(h.background||u.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,paddingBottom:2*d.iI,paddingTop:2*d.iI,maxWidth:t},lineNumberStyle:{color:(h.content||u.Z.content).muted},language:n,showLineNumbers:r,style:s._4,useInlineStyles:!0,wrapLines:v,children:i})}}})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var i=t(82684),r=t(60328),l=t(67971),c=t(882),a=t(86673),s=t(99994),u=t(9518),o=t(49125),d=t(37391),p=u.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],o.cd*o.iI,o.cd*o.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),b=t(28598);var v=function(e){var n=e.allowScroll,t=e.contained,u=e.noPadding,d=e.onClickTab,v=e.selectedTabUUID,h=e.small,m=e.tabs,j=(0,i.useMemo)((function(){var e=m.length,n=[];return m.forEach((function(t,i){var u=t.Icon,p=t.IconSelected,m=t.label,j=t.uuid,x=j===v,g=x&&p||u,Z=m?m():j,y=(0,b.jsxs)(l.Z,{alignItems:"center",children:[g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g,{default:!x,size:2*o.iI}),(0,b.jsx)(a.Z,{mr:1})]}),Z]});i>=1&&e>=2&&n.push((0,b.jsx)("div",{style:{marginLeft:1.5*o.iI}},"spacing-".concat(j))),x?n.push((0,b.jsx)(c.Z,{backgroundGradient:s.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:h,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:h,children:y},j)):n.push((0,b.jsx)("div",{style:{padding:4},children:(0,b.jsx)(r.Z,{borderLess:!0,compact:h,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:h,children:y},"button-tab-".concat(j))}))})),n}),[d,v,m]),x=(0,b.jsx)(l.Z,{alignItems:"center",children:j});return t?x:(0,b.jsx)(p,{allowScroll:n,noPadding:u,children:x})}},12625:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return te}});var i=t(75582),r=t(77837),l=t(82394),c=t(38860),a=t.n(c),s=t(82684),u=t(83455),o=t(34376),d=t(43526),p=t(60328),f=t(34744),b=t(67971),v=t(87372),h=t(51099),m=t(2626),j=t(97496),x=t(47409),g=t(55378),Z=t(86673),y=t(87815),O=t(19711),k=t(82531),_=t(56681),P=t(10503),I=t(2850),w=t(49125),S=t(59920),D=t(90211),C=t(58122),E=t(33766),N=t(7715),T=t(9736),M=t(96510),L=t(66653),F=t(59e3),U=t(28598);function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.backfill,t=e.fetchBackfill,r=e.pipeline,l=e.variables,c=(0,T.Ct)(),a=(0,o.useRouter)(),A=n||{},H=A.block_uuid,B=A.end_datetime,V=A.id,z=A.interval_type,Y=A.interval_units,J=A.name,W=A.pipeline_run_dates,G=A.start_datetime,q=A.status,K=A.total_run_count,X=A.variables,Q=void 0===X?{}:X,$=r.uuid,ee=(0,F.iV)(),ne=(0,s.useState)(null),te=ne[0],ie=ne[1],re={_limit:40,_offset:40*(null!==ee&&void 0!==ee&&ee.page?ee.page:0)};null!==ee&&void 0!==ee&&ee.status&&(re.status=ee.status);var le=k.ZP.pipeline_runs.list(R(R({},re),{},{backfill_id:V,order_by:["id DESC"]}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!V}),ce=le.data,ae=le.mutate,se=!(G&&B&&z&&Y),ue=!q,oe=(0,s.useMemo)((function(){return(ue?W:null===ce||void 0===ce?void 0:ce.pipeline_runs)||[]}),[ce,W,ue]),de=(0,s.useMemo)((function(){var e;return(null===ce||void 0===ce||null===(e=ce.metadata)||void 0===e?void 0:e.count)||[]}),[ce]),pe=(0,s.useState)(null),fe=pe[0],be=pe[1],ve=(0,s.useMemo)((function(){var e=null!==ee&&void 0!==ee&&ee.page?ee.page:0;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(j.Z,{disableRowSelect:ue,emptyMessage:null!==ee&&void 0!==ee&&ee.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:ae,onClickRow:function(e){return be((function(n){var t=oe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:oe,selectedRun:fe}),(0,U.jsx)(Z.Z,{p:2,children:(0,U.jsx)(h.Z,{page:Number(e),maxPages:9,onUpdate:function(e){var n=Number(e),t=R(R({},ee),{},{page:n>=0?n:0});a.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat($,"/triggers/").concat(V,"?").concat((0,F.uM)(t)))},totalPages:Math.ceil(de/40)})})]})}),[ae,r,oe,fe]),he=(0,s.useState)(_.G[0]),me=he[0],je=he[1],xe=(0,u.Db)(k.ZP.backfills.useUpdate(V),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(){t(),ae()},onErrorCallback:function(e,n){return ie({errors:n,response:e})}})}}),ge=(0,i.Z)(xe,2),Ze=ge[0],ye=ge[1].isLoading,Oe=(0,s.useMemo)((function(){return!!q&&(d.rn.CANCELLED!==q&&d.rn.FAILED!==q)}),[q]),ke=(0,s.useMemo)((function(){return q&&d.rn.CANCELLED!==q&&d.rn.FAILED!==q&&d.rn.INITIAL!==q&&d.rn.RUNNING!==q}),[q]),_e=(0,s.useMemo)((function(){var e={default:!0,size:1.5*w.iI},n=[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.VW,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:H?d._7:d.VV},"backfill_type")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.rs,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,U.jsx)(O.ZP,{danger:d.rn.CANCELLED===q||d.rn.FAILED==q,default:d.rn.INITIAL===q,monospace:!0,muted:!q,success:d.rn.RUNNING===q||d.rn.COMPLETED===q,children:q||"inactive"},"backfill_status")]];return H||n.push.apply(n,[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:G},"backfill_start_date")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:B},"backfill_end_date")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:z&&(0,D.kC)(z)},"interval_type")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:Y},"interval_units")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.qZ,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:K},"total_runs")]]),(0,U.jsx)(y.Z,{columnFlex:[null,1],rows:n})}),[H,B,z,Y,Oe,G,q]),Pe=(0,s.useMemo)((function(){return Q||{}}),[Q]),Ie=(0,s.useMemo)((function(){var e,n=[];return(0,N.Qr)(Pe)?n=(0,C.wx)(l,(function(e){return"global"===e.uuid})):Object.entries(Pe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],l=t[1];n.push({uuid:r,value:(0,C.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,U.jsx)(y.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,U.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,U.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Pe,l]);return(0,U.jsx)(U.Fragment,{children:(0,U.jsxs)(m.Z,{afterHidden:!fe,before:(0,U.jsxs)(I.M,{children:[(0,U.jsxs)(Z.Z,{mb:w.HN,pt:w.cd,px:w.cd,children:[(0,U.jsx)(Z.Z,{mb:w.cd,children:(0,U.jsx)(P.yg,{size:5*w.iI})}),(0,U.jsx)(v.Z,{children:J})]}),(0,U.jsx)(Z.Z,{px:w.cd,children:(0,U.jsx)(v.Z,{level:5,children:"Settings"})}),(0,U.jsx)(f.Z,{light:!0,mt:1,short:!0}),_e,Ie&&(0,U.jsxs)(Z.Z,{my:w.HN,children:[(0,U.jsx)(Z.Z,{px:w.cd,children:(0,U.jsx)(v.Z,{level:5,children:"Runtime variables"})}),(0,U.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie]})]}),beforeWidth:34*w.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat($,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return J},linkProps:{as:"/pipelines/".concat($,"/backfills/").concat(V),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,_.Z)(R(R({},e),{},{selectedRun:fe,selectedTab:me,setSelectedTab:je}))},errors:te,pageName:S.M.BACKFILLS,pipeline:r,setErrors:ie,subheader:(0,U.jsxs)(b.Z,{alignItems:"center",children:[!ke&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p.Z,{beforeIcon:Oe?(0,U.jsx)(P.dz,{size:2*w.iI}):(0,U.jsx)(P.Py,{inverted:!(d.rn.CANCELLED===q||d.rn.FAILED===q),size:2*w.iI}),danger:Oe,disabled:se,loading:ye,onClick:function(e){(0,L.j)(e),Ze({backfill:{status:Oe?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!Oe&&!(d.rn.CANCELLED===q||d.rn.FAILED===q)&&!se,children:Oe?"Cancel backfill":d.rn.CANCELLED===q||d.rn.FAILED===q?"Retry backfill":"Start backfill"}),(0,U.jsx)(Z.Z,{mr:w.cd})]}),!c&&(0,U.jsxs)(U.Fragment,{children:[q===x.V.COMPLETED?(0,U.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,U.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat($,"/backfills/").concat(V,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,U.jsx)(Z.Z,{mr:w.cd})]}),!ue&&(0,U.jsxs)(g.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?a.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat($,"/backfills/").concat(V)):(0,E.u7)({page:0,status:e.target.value})},paddingRight:4*w.iI,placeholder:"Select run status",value:(null===ee||void 0===ee?void 0:ee.status)||"all",children:[(0,U.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(x.V).map((function(e){return(0,U.jsx)("option",{value:e,children:x.D[e]},e)}))]})]}),title:function(){return J},uuid:"backfill/detail",children:[(0,U.jsx)(Z.Z,{mt:w.cd,px:w.cd,children:(0,U.jsx)(v.Z,{level:5,children:"Runs for this backfill"})}),(0,U.jsx)(f.Z,{light:!0,mt:w.cd,short:!0}),ve]})})},B=t(2713),V=t(47999),z=t(93461),Y=t(82944),J=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],W=t(18025),G=t(19395);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var X=function(e){var n=e.backfill,t=e.fetchBackfill,r=e.pipeline,l=(e.variables,(0,o.useRouter)()),c=(0,s.useState)(),a=c[0],h=c[1],j=a||{},x=j.block_uuid,_=j.id,I=j.interval_type,E=j.interval_units,T=(j.end_datetime,j.start_datetime,j.name),L=r.uuid,F=(0,s.useState)(null),A=F[0],R=F[1],H=(0,s.useState)({}),q=H[0],X=(H[1],(0,s.useState)(x?d._7:d.VV)),Q=X[0],$=X[1],ee=(0,s.useState)(!1),ne=ee[0],te=ee[1],ie=(0,s.useState)(!1),re=ie[0],le=ie[1],ce=(0,s.useState)(null),ae=ce[0],se=ce[1],ue=(0,s.useState)(null),oe=ue[0],de=ue[1],pe=(0,s.useState)({hour:"00",minute:"00"}),fe=pe[0],be=pe[1],ve=(0,s.useState)({hour:"00",minute:"00"}),he=ve[0],me=ve[1];(0,s.useEffect)((function(){if(n){h(n);var e=n.start_datetime;if(e){var t=e.split(" ")[1];de((0,G.eI)(e)),me({hour:t.substring(0,2),minute:t.substring(3,5)})}var i=n.end_datetime;if(i){var r=i.split(" ")[1];se((0,G.eI)(i)),be({hour:r.substring(0,2),minute:r.substring(3,5)})}}}),[n]);var je=(0,s.useMemo)((function(){var e=[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.KJ,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,U.jsx)(Y.Z,{monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return K(K({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:T},"model_name_input_detail")]];return d.VV===Q&&e.push.apply(e,[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,U.jsxs)("div",{style:{minHeight:"".concat(5.75*w.iI,"px")},children:[!ne&&(0,U.jsx)(Y.Z,{monospace:!0,onClick:function(){return te((function(e){return!e}))},onFocus:function(){return te(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?"".concat(oe.toISOString().split("T")[0]," ").concat(null===he||void 0===he?void 0:he.hour,":").concat(null===he||void 0===he?void 0:he.minute):""}),(0,U.jsx)("div",{style:{width:"400px"},children:(0,U.jsx)(V.Z,{disableEscape:!0,onClickOutside:function(){return te(!1)},open:ne,style:{position:"relative"},children:(0,U.jsx)(B.Z,{selectedDate:oe,selectedTime:he,setSelectedDate:de,setSelectedTime:me,topPosition:!0})})})]},"start_time_input")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,U.jsxs)("div",{style:{minHeight:"".concat(5.75*w.iI,"px")},children:[!re&&(0,U.jsx)(Y.Z,{monospace:!0,onClick:function(){return le((function(e){return!e}))},onFocus:function(){return le(!0)},placeholder:"YYYY-MM-DD HH:MM",value:ae?"".concat(ae.toISOString().split("T")[0]," ").concat(null===fe||void 0===fe?void 0:fe.hour,":").concat(null===fe||void 0===fe?void 0:fe.minute):""}),(0,U.jsx)("div",{style:{width:"400px"},children:(0,U.jsx)(V.Z,{disableEscape:!0,onClickOutside:function(){return le(!1)},open:re,style:{position:"relative"},children:(0,U.jsx)(B.Z,{selectedDate:ae,selectedTime:fe,setSelectedDate:se,setSelectedTime:be,topPosition:!0})})})]},"end_time_input")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,U.jsxs)(g.Z,{monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return K(K({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:I,children:[!I&&(0,U.jsx)("option",{value:""}),d.IB.map((function(e){return(0,U.jsx)("option",{value:e,children:(0,D.kC)(e)},e)}))]},"interval_type_input")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,U.jsx)(Y.Z,{disabled:!I,monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return K(K({},n),{},{interval_units:e.target.value})}))},placeholder:I?"Number of ".concat(I).concat(I!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:E},"interval_unit_input")]]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Z.Z,{mb:2,px:w.cd,children:(0,U.jsx)(v.Z,{children:"Settings"})}),(0,U.jsx)(f.Z,{light:!0,short:!0}),(0,U.jsx)(y.Z,{columnFlex:[null,1],rows:e})]})}),[ae,oe,I,E,T,Q,ne,re,fe,he]),xe=(0,u.Db)(k.ZP.backfills.useUpdate(_),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(){t(),l.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(L,"/backfills/").concat(_))},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}}),ge=(0,i.Z)(xe,2),Ze=ge[0],ye=ge[1].isLoading,Oe=(0,s.useCallback)((function(){var e=K(K({},(0,N.GL)(a,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,C.e7)(q)});return d._7===Q||(e.interval_type=I,e.interval_units=E,e.end_datetime=ae&&null!==fe&&void 0!==fe&&fe.hour&&null!==fe&&void 0!==fe&&fe.minute?"".concat(ae.toISOString().split("T")[0]," ").concat(null===fe||void 0===fe?void 0:fe.hour,":").concat(null===fe||void 0===fe?void 0:fe.minute,":00"):null,e.start_datetime=oe&&null!==he&&void 0!==he&&he.hour&&null!==he&&void 0!==he&&he.minute?"".concat(oe.toISOString().split("T")[0]," ").concat(null===he||void 0===he?void 0:he.hour,":").concat(null===he||void 0===he?void 0:he.minute,":00"):null),Ze({backfill:e})}),[ae,oe,I,E,a,q,Q,fe,he]),ke=(0,s.useMemo)((function(){return d._7===Q?!x:!(ae&&oe&&I&&E)}),[x,ae,oe,I,E,Q,fe,he]);return(0,U.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(L,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===a||void 0===a?void 0:a.name},linkProps:{as:"/pipelines/".concat(L,"/backfills/").concat(_),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:A,pageName:S.M.BACKFILLS,pipeline:r,setErrors:R,subheader:(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(p.Z,{disabled:ke,loading:ye,onClick:Oe,outline:!0,primary:!0,children:"Save changes"}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(L,"/backfills/").concat(_)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===a||void 0===a?void 0:a.name)},uuid:"backfill/edit",children:[(0,U.jsxs)(Z.Z,{p:w.cd,children:[(0,U.jsxs)(Z.Z,{mb:2,children:[(0,U.jsx)(v.Z,{children:"Backfill type"}),(0,U.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,U.jsx)(b.Z,{children:J.map((function(e){var n=e.label,t=e.description,i=e.uuid,r=Q===i,l=Q&&!r;return(0,U.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){$(i)},children:(0,U.jsx)(W.U,{selected:r,children:(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(z.Z,{children:(0,U.jsx)("input",{checked:r,type:"radio"})}),(0,U.jsx)(Z.Z,{mr:w.cd}),(0,U.jsxs)(z.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,U.jsx)(v.Z,{bold:!0,default:!r&&!l,level:5,muted:!r&&l,children:n()}),(0,U.jsx)(O.ZP,{default:!r&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},i)}))})]}),(0,U.jsx)(Z.Z,{mt:5,children:je})]})},Q=t(41788);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ee(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,l.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 ne(e){var n=e.backfillId,t=e.pipelineUUID,i=e.subpath,r=k.ZP.variables.pipelines.list(t).data,l=(0,s.useMemo)((function(){return null===r||void 0===r?void 0:r.variables}),[r]),c=k.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,a=(0,s.useMemo)((function(){return ee(ee({},null===c||void 0===c?void 0:c.pipeline),{},{uuid:t})}),[c,t]),u=k.ZP.backfills.detail(n,{include_preview_runs:!0}),o=u.data,d=u.mutate,p=(0,s.useMemo)((function(){return null===o||void 0===o?void 0:o.backfill}),[o]);return"edit"===i?(0,U.jsx)(X,{backfill:p,fetchBackfill:d,pipeline:a,variables:l}):(0,U.jsx)(H,{backfill:p,fetchBackfill:d,pipeline:a,variables:l})}ne.getInitialProps=function(){var e=(0,r.Z)(a().mark((function e(n){var t,r,l,c,s,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return c=(0,i.Z)(l,2),s=c[0],u=c[1],e.abrupt("return",{backfillId:s,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var te=(0,Q.Z)(ne)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(12625)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2524,4495,2344,9386,1830,2626,4463,6532,1286,4178,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6780],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return a},W:function(){return c}});var i=t(9518),r=t(23831),l=t(3055),c=34*t(49125).iI,a=i.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],l.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||r.Z.borders).medium,";\n ")}))},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return g},Z:function(){return Z}});var i=t(75582),r=t(82394),l=t(26304),c=t(32316),a=t(22673),s=t(86532),u=t(86673),o=t(19711),d=t(58180),p=t(49125),f=t(19395),b=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j={uuid:"Run details"},x={uuid:"Dependency tree"},g=[x,j];function Z(e){var n=e.height,t=e.heightOffset,r=e.pipeline,h=e.selectedRun,Z=e.selectedTab,y=e.setSelectedTab,O=m({},(0,l.Z)(e,v));h?O.blockStatus=(0,f.IJ)(null===h||void 0===h?void 0:h.block_runs):O.noStatus=!0;var k=(null===h||void 0===h?void 0:h.variables)||{};null!==h&&void 0!==h&&h.event_variables&&(k.event=h.event_variables);var _=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){_.push(" ".concat(e))}));var P=h&&[["Run ID",null===h||void 0===h?void 0:h.id],["Variables",(0,b.jsx)(a.Z,{language:"json",small:!0,source:_.join("\n")})]],I=h&&(0,b.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,b.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:P.map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,b.jsx)(o.ZP,{monospace:!0,muted:!0,children:t}),(0,b.jsx)(o.ZP,{monospace:!0,textOverflow:!0,children:r})]})),uuid:"LogDetail"})}),w=Z&&y;return(0,b.jsxs)(b.Fragment,{children:[w&&(0,b.jsx)(u.Z,{py:p.cd,children:(0,b.jsx)(c.Z,{onClickTab:y,selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:g})}),(!w||x.uuid===(null===Z||void 0===Z?void 0:Z.uuid))&&(0,b.jsx)(s.Z,m(m({},O),{},{height:n,heightOffset:(t||0)+(w?76:0),pipeline:r})),j.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&I]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return b},JZ:function(){return h},e7:function(){return m},v0:function(){return p},wx:function(){return v}});var i=t(75582),r=t(82394),l=t(43313),c=t(93348),a=t(1286),s=t(90211),u=t(84779);function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function d(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}function p(e){var n=e.statistics,t=Object.keys(n),i=Array(l.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(l.Dy.includes(e)){var t=l.CC[e],r=n[e],c=r,a=!1,s=[2,3],o=l.Ub[e],d=l.oH[e],p=l.OD[e];if(l.y_.includes(e))a=!0,s=[2,1,2];else if(e in l.Sq){r=(0,u.Jw)(r,0);var f=l.Sq[e];c=n[f]}var b={columnFlexNumbers:s,name:t,progress:a,rate:c,successDirection:d,warning:p};l.y_.includes(e)||(b.value=r),i[o]=b}})),i)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,i=e.statistics,r=Object.keys(i);if(0===r.length)return null;var c=Object.values(t),u=c.length,o=[];o.push({name:"Column count",successDirection:l.oH.column_count,value:(0,s.x6)(u)}),r.forEach((function(e){if(l.Zu.includes(e)){var n=l.CC[e],t=i[e],r=l.OD[e];o.push({name:n,successDirection:l.oH[e],value:(0,s.x6)(t),warning:r})}}));var d=(0,a.QO)(c),p=d.countCategory,f=d.countDatetime,b=d.countNumerical;return o.push({name:"Categorical Features",rate:p/u,value:(0,s.x6)(p)},{name:"Numerical Features",rate:b/u,value:(0,s.x6)(b)},{name:"Datetime Features",rate:f/u,value:(0,s.x6)(f)}),o}function b(e){return"string"===typeof e?e:JSON.stringify(e)}function v(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return d(d({},e),{},{value:b(n)})}))}function h(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 m(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,i.Z)(n,2),l=t[0],c=t[1],a=c;try{a=JSON.parse(c)}catch(s){}return d(d({},e),{},(0,r.Z)({},l,a))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return a}});var i=t(9518),r=t(23831),l=t(73942),c=t(49125),a=i.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],l.TR,14*c.iI,c.cd*c.iI,c.cd*c.iI,40*c.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||r.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||r.Z.interactive).linkPrimary,";\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],l.n_,c.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||r.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*c.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*c.iI,"px;\n ")}))},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return i},IB:function(){return s},VV:function(){return l},_7:function(){return c},rn:function(){return a}});var i,r=t(66050),l="datetime",c="code",a=r.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(i||(i={}));var s=[i.SECOND,i.MINUTE,i.HOUR,i.DAY,i.WEEK,i.MONTH,i.YEAR,i.CUSTOM]},2713:function(e,n,t){"use strict";var i=t(82394),r=t(44495),l=t(67971),c=t(55378),a=t(86673),s=t(19711),u=t(18025),o=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,i=e.setSelectedDate,f=e.setSelectedTime,v=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:v,children:[(0,p.jsx)(r.ZP,{onChange:i,value:n}),(0,p.jsx)(a.Z,{mb:2}),(0,p.jsxs)(l.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(a.Z,{pr:2}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return b(b({},n),{},{hour:e.target.value})}))},paddingRight:5*o.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(a.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return b(b({},n),{},{minute:e.target.value})}))},paddingRight:5*o.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var i=t(82684),r=t(73199),l=t.n(r),c=t(71593),a=t(9518),s=t(65292),u=t(23831),o=t(2005),d=t(49125),p=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,r=e.showLineNumbers,f=e.small,b=e.source,v=e.wrapLines,h=(0,i.useContext)(a.ThemeContext);return(0,p.jsx)(l(),{source:b,renderers:{code:function(e){var i=e.value;return(0,p.jsx)(c.Z,{customStyle:{backgroundColor:(h.background||u.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:o.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,paddingBottom:2*d.iI,paddingTop:2*d.iI,maxWidth:t},lineNumberStyle:{color:(h.content||u.Z.content).muted},language:n,showLineNumbers:r,style:s._4,useInlineStyles:!0,wrapLines:v,children:i})}}})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var i=t(82684),r=t(60328),l=t(67971),c=t(882),a=t(86673),s=t(99994),u=t(9518),o=t(49125),d=t(37391),p=u.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],o.cd*o.iI,o.cd*o.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),b=t(28598);var v=function(e){var n=e.allowScroll,t=e.contained,u=e.noPadding,d=e.onClickTab,v=e.selectedTabUUID,h=e.small,m=e.tabs,j=(0,i.useMemo)((function(){var e=m.length,n=[];return m.forEach((function(t,i){var u=t.Icon,p=t.IconSelected,m=t.label,j=t.uuid,x=j===v,g=x&&p||u,Z=m?m():j,y=(0,b.jsxs)(l.Z,{alignItems:"center",children:[g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g,{default:!x,size:2*o.iI}),(0,b.jsx)(a.Z,{mr:1})]}),Z]});i>=1&&e>=2&&n.push((0,b.jsx)("div",{style:{marginLeft:1.5*o.iI}},"spacing-".concat(j))),x?n.push((0,b.jsx)(c.Z,{backgroundGradient:s.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:h,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:h,children:y},j)):n.push((0,b.jsx)("div",{style:{padding:4},children:(0,b.jsx)(r.Z,{borderLess:!0,compact:h,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:h,children:y},"button-tab-".concat(j))}))})),n}),[d,v,m]),x=(0,b.jsx)(l.Z,{alignItems:"center",children:j});return t?x:(0,b.jsx)(p,{allowScroll:n,noPadding:u,children:x})}},12625:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return te}});var i=t(75582),r=t(77837),l=t(82394),c=t(38860),a=t.n(c),s=t(82684),u=t(83455),o=t(34376),d=t(43526),p=t(60328),f=t(34744),b=t(67971),v=t(87372),h=t(51099),m=t(2626),j=t(97496),x=t(47409),g=t(55378),Z=t(86673),y=t(58180),O=t(19711),k=t(82531),_=t(56681),P=t(10503),I=t(2850),w=t(49125),S=t(59920),D=t(90211),C=t(58122),E=t(33766),N=t(7715),T=t(9736),M=t(96510),L=t(66653),F=t(59e3),U=t(28598);function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function R(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var H=function(e){var n=e.backfill,t=e.fetchBackfill,r=e.pipeline,l=e.variables,c=(0,T.Ct)(),a=(0,o.useRouter)(),A=n||{},H=A.block_uuid,B=A.end_datetime,V=A.id,z=A.interval_type,Y=A.interval_units,J=A.name,W=A.pipeline_run_dates,G=A.start_datetime,q=A.status,K=A.total_run_count,X=A.variables,Q=void 0===X?{}:X,$=r.uuid,ee=(0,F.iV)(),ne=(0,s.useState)(null),te=ne[0],ie=ne[1],re={_limit:40,_offset:40*(null!==ee&&void 0!==ee&&ee.page?ee.page:0)};null!==ee&&void 0!==ee&&ee.status&&(re.status=ee.status);var le=k.ZP.pipeline_runs.list(R(R({},re),{},{backfill_id:V,order_by:["id DESC"]}),{refreshInterval:3e3,revalidateOnFocus:!0},{pauseFetch:!V}),ce=le.data,ae=le.mutate,se=!(G&&B&&z&&Y),ue=!q,oe=(0,s.useMemo)((function(){return(ue?W:null===ce||void 0===ce?void 0:ce.pipeline_runs)||[]}),[ce,W,ue]),de=(0,s.useMemo)((function(){var e;return(null===ce||void 0===ce||null===(e=ce.metadata)||void 0===e?void 0:e.count)||[]}),[ce]),pe=(0,s.useState)(null),fe=pe[0],be=pe[1],ve=(0,s.useMemo)((function(){var e=null!==ee&&void 0!==ee&&ee.page?ee.page:0;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(j.Z,{disableRowSelect:ue,emptyMessage:null!==ee&&void 0!==ee&&ee.status?"No runs available":'No runs available. Please complete backfill configuration by clicking "Edit backfill" above.',fetchPipelineRuns:ae,onClickRow:function(e){return be((function(n){var t=oe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:oe,selectedRun:fe}),(0,U.jsx)(Z.Z,{p:2,children:(0,U.jsx)(h.Z,{page:Number(e),maxPages:9,onUpdate:function(e){var n=Number(e),t=R(R({},ee),{},{page:n>=0?n:0});a.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat($,"/triggers/").concat(V,"?").concat((0,F.uM)(t)))},totalPages:Math.ceil(de/40)})})]})}),[ae,r,oe,fe]),he=(0,s.useState)(_.G[0]),me=he[0],je=he[1],xe=(0,u.Db)(k.ZP.backfills.useUpdate(V),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(){t(),ae()},onErrorCallback:function(e,n){return ie({errors:n,response:e})}})}}),ge=(0,i.Z)(xe,2),Ze=ge[0],ye=ge[1].isLoading,Oe=(0,s.useMemo)((function(){return!!q&&(d.rn.CANCELLED!==q&&d.rn.FAILED!==q)}),[q]),ke=(0,s.useMemo)((function(){return q&&d.rn.CANCELLED!==q&&d.rn.FAILED!==q&&d.rn.INITIAL!==q&&d.rn.RUNNING!==q}),[q]),_e=(0,s.useMemo)((function(){var e={default:!0,size:1.5*w.iI},n=[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.VW,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Backfill type"})]},"backfill_type_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:H?d._7:d.VV},"backfill_type")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.rs,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Status"})]},"backfill_status_label"),(0,U.jsx)(O.ZP,{danger:d.rn.CANCELLED===q||d.rn.FAILED==q,default:d.rn.INITIAL===q,monospace:!0,muted:!q,success:d.rn.RUNNING===q||d.rn.COMPLETED===q,children:q||"inactive"},"backfill_status")]];return H||n.push.apply(n,[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"backfill_start_date_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:G},"backfill_start_date")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"backfill_end_date_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:B},"backfill_end_date")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:z&&(0,D.kC)(z)},"interval_type")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:Y},"interval_units")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.qZ,R({},e)),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Total runs"})]},"total_runs_label"),(0,U.jsx)(O.ZP,{monospace:!0,children:K},"total_runs")]]),(0,U.jsx)(y.Z,{columnFlex:[null,1],rows:n})}),[H,B,z,Y,Oe,G,q]),Pe=(0,s.useMemo)((function(){return Q||{}}),[Q]),Ie=(0,s.useMemo)((function(){var e,n=[];return(0,N.Qr)(Pe)?n=(0,C.wx)(l,(function(e){return"global"===e.uuid})):Object.entries(Pe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],l=t[1];n.push({uuid:r,value:(0,C.FS)(l)})})),"undefined"!==typeof n&&null!==(e=n)&&void 0!==e&&e.length?(0,U.jsx)(y.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,U.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,U.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Pe,l]);return(0,U.jsx)(U.Fragment,{children:(0,U.jsxs)(m.Z,{afterHidden:!fe,before:(0,U.jsxs)(I.M,{children:[(0,U.jsxs)(Z.Z,{mb:w.HN,pt:w.cd,px:w.cd,children:[(0,U.jsx)(Z.Z,{mb:w.cd,children:(0,U.jsx)(P.yg,{size:5*w.iI})}),(0,U.jsx)(v.Z,{children:J})]}),(0,U.jsx)(Z.Z,{px:w.cd,children:(0,U.jsx)(v.Z,{level:5,children:"Settings"})}),(0,U.jsx)(f.Z,{light:!0,mt:1,short:!0}),_e,Ie&&(0,U.jsxs)(Z.Z,{my:w.HN,children:[(0,U.jsx)(Z.Z,{px:w.cd,children:(0,U.jsx)(v.Z,{level:5,children:"Runtime variables"})}),(0,U.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie]})]}),beforeWidth:34*w.iI,breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat($,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return J},linkProps:{as:"/pipelines/".concat($,"/backfills/").concat(V),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],buildSidekick:function(e){return(0,_.Z)(R(R({},e),{},{selectedRun:fe,selectedTab:me,setSelectedTab:je}))},errors:te,pageName:S.M.BACKFILLS,pipeline:r,setErrors:ie,subheader:(0,U.jsxs)(b.Z,{alignItems:"center",children:[!ke&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p.Z,{beforeIcon:Oe?(0,U.jsx)(P.dz,{size:2*w.iI}):(0,U.jsx)(P.Py,{inverted:!(d.rn.CANCELLED===q||d.rn.FAILED===q),size:2*w.iI}),danger:Oe,disabled:se,loading:ye,onClick:function(e){(0,L.j)(e),Ze({backfill:{status:Oe?d.rn.CANCELLED:d.rn.INITIAL}})},outline:!0,success:!Oe&&!(d.rn.CANCELLED===q||d.rn.FAILED===q)&&!se,children:Oe?"Cancel backfill":d.rn.CANCELLED===q||d.rn.FAILED===q?"Retry backfill":"Start backfill"}),(0,U.jsx)(Z.Z,{mr:w.cd})]}),!c&&(0,U.jsxs)(U.Fragment,{children:[q===x.V.COMPLETED?(0,U.jsx)(O.ZP,{bold:!0,default:!0,large:!0,children:"Filter runs by status:"}):(0,U.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat($,"/backfills/").concat(V,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit backfill"}),(0,U.jsx)(Z.Z,{mr:w.cd})]}),!ue&&(0,U.jsxs)(g.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?a.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat($,"/backfills/").concat(V)):(0,E.u7)({page:0,status:e.target.value})},paddingRight:4*w.iI,placeholder:"Select run status",value:(null===ee||void 0===ee?void 0:ee.status)||"all",children:[(0,U.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(x.V).map((function(e){return(0,U.jsx)("option",{value:e,children:x.D[e]},e)}))]})]}),title:function(){return J},uuid:"backfill/detail",children:[(0,U.jsx)(Z.Z,{mt:w.cd,px:w.cd,children:(0,U.jsx)(v.Z,{level:5,children:"Runs for this backfill"})}),(0,U.jsx)(f.Z,{light:!0,mt:w.cd,short:!0}),ve]})})},B=t(2713),V=t(47999),z=t(93461),Y=t(82944),J=[{label:function(){return"Date and time window"},description:function(){return"Backfill between a date and time range."},uuid:d.VV}],W=t(18025),G=t(19395);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var X=function(e){var n=e.backfill,t=e.fetchBackfill,r=e.pipeline,l=(e.variables,(0,o.useRouter)()),c=(0,s.useState)(),a=c[0],h=c[1],j=a||{},x=j.block_uuid,_=j.id,I=j.interval_type,E=j.interval_units,T=(j.end_datetime,j.start_datetime,j.name),L=r.uuid,F=(0,s.useState)(null),A=F[0],R=F[1],H=(0,s.useState)({}),q=H[0],X=(H[1],(0,s.useState)(x?d._7:d.VV)),Q=X[0],$=X[1],ee=(0,s.useState)(!1),ne=ee[0],te=ee[1],ie=(0,s.useState)(!1),re=ie[0],le=ie[1],ce=(0,s.useState)(null),ae=ce[0],se=ce[1],ue=(0,s.useState)(null),oe=ue[0],de=ue[1],pe=(0,s.useState)({hour:"00",minute:"00"}),fe=pe[0],be=pe[1],ve=(0,s.useState)({hour:"00",minute:"00"}),he=ve[0],me=ve[1];(0,s.useEffect)((function(){if(n){h(n);var e=n.start_datetime;if(e){var t=e.split(" ")[1];de((0,G.eI)(e)),me({hour:t.substring(0,2),minute:t.substring(3,5)})}var i=n.end_datetime;if(i){var r=i.split(" ")[1];se((0,G.eI)(i)),be({hour:r.substring(0,2),minute:r.substring(3,5)})}}}),[n]);var je=(0,s.useMemo)((function(){var e=[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.KJ,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Backfill name"})]},"model_name_detail"),(0,U.jsx)(Y.Z,{monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return K(K({},n),{},{name:e.target.value})}))},placeholder:"Name this backfill",value:T},"model_name_input_detail")]];return d.VV===Q&&e.push.apply(e,[[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,U.jsxs)("div",{style:{minHeight:"".concat(5.75*w.iI,"px")},children:[!ne&&(0,U.jsx)(Y.Z,{monospace:!0,onClick:function(){return te((function(e){return!e}))},onFocus:function(){return te(!0)},placeholder:"YYYY-MM-DD HH:MM",value:oe?"".concat(oe.toISOString().split("T")[0]," ").concat(null===he||void 0===he?void 0:he.hour,":").concat(null===he||void 0===he?void 0:he.minute):""}),(0,U.jsx)("div",{style:{width:"400px"},children:(0,U.jsx)(V.Z,{disableEscape:!0,onClickOutside:function(){return te(!1)},open:ne,style:{position:"relative"},children:(0,U.jsx)(B.Z,{selectedDate:oe,selectedTime:he,setSelectedDate:de,setSelectedTime:me,topPosition:!0})})})]},"start_time_input")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.aw,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"End date and time"})]},"end_time"),(0,U.jsxs)("div",{style:{minHeight:"".concat(5.75*w.iI,"px")},children:[!re&&(0,U.jsx)(Y.Z,{monospace:!0,onClick:function(){return le((function(e){return!e}))},onFocus:function(){return le(!0)},placeholder:"YYYY-MM-DD HH:MM",value:ae?"".concat(ae.toISOString().split("T")[0]," ").concat(null===fe||void 0===fe?void 0:fe.hour,":").concat(null===fe||void 0===fe?void 0:fe.minute):""}),(0,U.jsx)("div",{style:{width:"400px"},children:(0,U.jsx)(V.Z,{disableEscape:!0,onClickOutside:function(){return le(!1)},open:re,style:{position:"relative"},children:(0,U.jsx)(B.Z,{selectedDate:ae,selectedTime:fe,setSelectedDate:se,setSelectedTime:be,topPosition:!0})})})]},"end_time_input")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval type"})]},"interval_type"),(0,U.jsxs)(g.Z,{monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return K(K({},n),{},{interval_type:e.target.value})}))},placeholder:"Time spacing between each backfill",value:I,children:[!I&&(0,U.jsx)("option",{value:""}),d.IB.map((function(e){return(0,U.jsx)("option",{value:e,children:(0,D.kC)(e)},e)}))]},"interval_type_input")],[(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(P.Pf,{default:!0,size:1.5*w.iI}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(O.ZP,{default:!0,children:"Interval units"})]},"interval_units"),(0,U.jsx)(Y.Z,{disabled:!I,monospace:!0,onChange:function(e){e.preventDefault(),h((function(n){return K(K({},n),{},{interval_units:e.target.value})}))},placeholder:I?"Number of ".concat(I).concat(I!==d.I7.CUSTOM?"s":""," between each backfill"):"Interval type is required",type:"number",value:E},"interval_unit_input")]]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Z.Z,{mb:2,px:w.cd,children:(0,U.jsx)(v.Z,{children:"Settings"})}),(0,U.jsx)(f.Z,{light:!0,short:!0}),(0,U.jsx)(y.Z,{columnFlex:[null,1],rows:e})]})}),[ae,oe,I,E,T,Q,ne,re,fe,he]),xe=(0,u.Db)(k.ZP.backfills.useUpdate(_),{onSuccess:function(e){return(0,M.wD)(e,{callback:function(){t(),l.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(L,"/backfills/").concat(_))},onErrorCallback:function(e,n){return R({errors:n,response:e})}})}}),ge=(0,i.Z)(xe,2),Ze=ge[0],ye=ge[1].isLoading,Oe=(0,s.useCallback)((function(){var e=K(K({},(0,N.GL)(a,["name"])),{},{end_datetime:null,interval_type:null,interval_units:null,start_datetime:null,variables:(0,C.e7)(q)});return d._7===Q||(e.interval_type=I,e.interval_units=E,e.end_datetime=ae&&null!==fe&&void 0!==fe&&fe.hour&&null!==fe&&void 0!==fe&&fe.minute?"".concat(ae.toISOString().split("T")[0]," ").concat(null===fe||void 0===fe?void 0:fe.hour,":").concat(null===fe||void 0===fe?void 0:fe.minute,":00"):null,e.start_datetime=oe&&null!==he&&void 0!==he&&he.hour&&null!==he&&void 0!==he&&he.minute?"".concat(oe.toISOString().split("T")[0]," ").concat(null===he||void 0===he?void 0:he.hour,":").concat(null===he||void 0===he?void 0:he.minute,":00"):null),Ze({backfill:e})}),[ae,oe,I,E,a,q,Q,fe,he]),ke=(0,s.useMemo)((function(){return d._7===Q?!x:!(ae&&oe&&I&&E)}),[x,ae,oe,I,E,Q,fe,he]);return(0,U.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(L,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{label:function(){return null===a||void 0===a?void 0:a.name},linkProps:{as:"/pipelines/".concat(L,"/backfills/").concat(_),href:"/pipelines/[pipeline]/backfills/[...slug]"}}],errors:A,pageName:S.M.BACKFILLS,pipeline:r,setErrors:R,subheader:(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(p.Z,{disabled:ke,loading:ye,onClick:Oe,outline:!0,primary:!0,children:"Save changes"}),(0,U.jsx)(Z.Z,{mr:1}),(0,U.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/backfills/[...slug]",as:"/pipelines/".concat(L,"/backfills/").concat(_)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===a||void 0===a?void 0:a.name)},uuid:"backfill/edit",children:[(0,U.jsxs)(Z.Z,{p:w.cd,children:[(0,U.jsxs)(Z.Z,{mb:2,children:[(0,U.jsx)(v.Z,{children:"Backfill type"}),(0,U.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be backfilled?"})]}),(0,U.jsx)(b.Z,{children:J.map((function(e){var n=e.label,t=e.description,i=e.uuid,r=Q===i,l=Q&&!r;return(0,U.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){$(i)},children:(0,U.jsx)(W.U,{selected:r,children:(0,U.jsxs)(b.Z,{alignItems:"center",children:[(0,U.jsx)(z.Z,{children:(0,U.jsx)("input",{checked:r,type:"radio"})}),(0,U.jsx)(Z.Z,{mr:w.cd}),(0,U.jsxs)(z.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,U.jsx)(v.Z,{bold:!0,default:!r&&!l,level:5,muted:!r&&l,children:n()}),(0,U.jsx)(O.ZP,{default:!r&&!l,leftAligned:!0,muted:l,children:t()})]})]})})},i)}))})]}),(0,U.jsx)(Z.Z,{mt:5,children:je})]})},Q=t(41788);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ee(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,l.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 ne(e){var n=e.backfillId,t=e.pipelineUUID,i=e.subpath,r=k.ZP.variables.pipelines.list(t).data,l=(0,s.useMemo)((function(){return null===r||void 0===r?void 0:r.variables}),[r]),c=k.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,a=(0,s.useMemo)((function(){return ee(ee({},null===c||void 0===c?void 0:c.pipeline),{},{uuid:t})}),[c,t]),u=k.ZP.backfills.detail(n,{include_preview_runs:!0}),o=u.data,d=u.mutate,p=(0,s.useMemo)((function(){return null===o||void 0===o?void 0:o.backfill}),[o]);return"edit"===i?(0,U.jsx)(X,{backfill:p,fetchBackfill:d,pipeline:a,variables:l}):(0,U.jsx)(H,{backfill:p,fetchBackfill:d,pipeline:a,variables:l})}ne.getInitialProps=function(){var e=(0,r.Z)(a().mark((function e(n){var t,r,l,c,s,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,l=t.slug,!Array.isArray(l)){e.next=4;break}return c=(0,i.Z)(l,2),s=c[0],u=c[1],e.abrupt("return",{backfillId:s,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var te=(0,Q.Z)(ne)},53664:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills/[...slug]",function(){return t(12625)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2524,4495,2344,9386,6166,8180,2626,6532,1286,4178,9774,2888,179],(function(){return n=53664,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{19395:function(e,n,t){"use strict";t.d(n,{IJ:function(){return s},Vx:function(){return d},eI:function(){return f},gU:function(){return b},tL:function(){return p},vJ:function(){return v}});var r,i,u=t(82394),c=t(92083),l=t.n(c);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 a(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,u.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 s(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,i=n.started_at,c=n.status,o=null;i&&r&&(o=l()(r).valueOf()-l()(i).valueOf());return a(a({},e),{},(0,u.Z)({},t,{runtime:o,status:c}))}),{})}function f(e){if(!e)return null;var n=new Date(l()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function d(e){return f(e).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(i||(i={}));var p=(r={},(0,u.Z)(r,i.DAY,86400),(0,u.Z)(r,i.HOUR,3600),(0,u.Z)(r,i.MINUTE,60),(0,u.Z)(r,i.SECOND,1),r);function b(e){var n=i.SECOND,t=e;return e%86400===0?(t/=86400,n=i.DAY):e%3600===0?(t/=3600,n=i.HOUR):e%60===0&&(t/=60,n=i.MINUTE),{time:t,unit:n}}function v(e,n){return e*p[n]}},43526:function(e,n,t){"use strict";t.d(n,{I7:function(){return r},IB:function(){return o},VV:function(){return u},_7:function(){return c},rn:function(){return l}});var r,i=t(66050),u="datetime",c="code",l=i.V;!function(e){e.SECOND="second",e.MINUTE="minute",e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.YEAR="year",e.CUSTOM="custom"}(r||(r={}));var o=[r.SECOND,r.MINUTE,r.HOUR,r.DAY,r.WEEK,r.MONTH,r.YEAR,r.CUSTOM]},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"}(r||(r={}))},47409:function(e,n,t){"use strict";t.d(n,{D:function(){return c},V:function(){return u}});var r,i=t(82394),u=t(66050).V,c=(r={},(0,i.Z)(r,u.CANCELLED,"Cancelled"),(0,i.Z)(r,u.COMPLETED,"Done"),(0,i.Z)(r,u.FAILED,"Failed"),(0,i.Z)(r,u.INITIAL,"Ready"),(0,i.Z)(r,u.RUNNING,"Running"),r)},30206:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return M}});var r=t(77837),i=t(75582),u=t(38860),c=t.n(u),l=t(82684),o=t(83455),a=t(34376),s=t(12691),f=t.n(s),d=t(43526),p=t(60328),b=t(10919),v=t(58180),m=t(19711),O=t(10503),h=t(47409),k=t(49125),E=t(19395),g=t(9736),j=t(28598);var _=function(e){var n=e.models,t=e.onClickRow,r=e.pipeline,i=e.selectedRow,u=(0,g.Ct)(),c=null===r||void 0===r?void 0:r.uuid,l=[{uuid:"Status"},{uuid:"Name"},{uuid:"Type"},{uuid:"Runs"},{uuid:"Backfill"},{uuid:"Started at"},{uuid:"Completed at"}];return u||l.push({label:function(){return""},uuid:"edit"}),(0,j.jsx)(v.Z,{columnFlex:[null,1,null,null,null,1,1,null],columns:l,isSelectedRow:function(e){return n[e].id===(null===i||void 0===i?void 0:i.id)},onClickRow:function(e){return t(n[e])},rows:n.map((function(e,n){var t=e.block_uuid,r=e.completed_at,i=e.end_datetime,l=e.id,o=e.name,a=e.start_datetime,s=e.started_at,v=e.status,g=e.total_run_count,_=[(0,j.jsx)(m.ZP,{default:!0,monospace:!0,children:v||"inactive"},"status"),(0,j.jsx)(f(),{as:"/pipelines/".concat(c,"/backfills/").concat(l),href:"/pipelines/[pipeline]/backfills/[...slug]",passHref:!0,children:(0,j.jsx)(b.Z,{bold:!0,sameColorAsText:!0,children:o})},"name"),(0,j.jsx)(m.ZP,{default:!0,monospace:!0,children:t?d._7:d.VV},"type"),(0,j.jsx)(m.ZP,{default:!0,monospace:!0,children:g||0},"runs"),(0,j.jsxs)(m.ZP,{default:!0,monospace:!0,children:[a&&i&&(0,j.jsxs)(j.Fragment,{children:[(0,E.Vx)(a),"\xa0-\xa0",(0,E.Vx)(i)]}),!(a&&i)&&"-"]},"backfill"),(0,j.jsx)(m.ZP,{default:!0,monospace:!0,children:s?(0,E.Vx)(s):"-"},"started_at"),(0,j.jsx)(m.ZP,{default:!0,monospace:!0,children:r?(0,E.Vx)(r):"-"},"completed_at")];return u||_.push((0,j.jsx)(p.Z,{default:!0,disabled:v===h.V.COMPLETED,iconOnly:!0,linkProps:{as:"/pipelines/".concat(c,"/backfills/").concat(l,"/edit"),href:"/pipelines/[pipeline]/backfills/[...slug]"},noBackground:!0,title:"Edit",children:(0,j.jsx)(O.I8,{default:!0,size:2*k.iI})},"".concat(n,"_edit_button"))),_})),uuid:"pipeline-runs"})},P=t(11135),y=t(2626),w=t(41788),D=t(86673),Z=t(82531),C=t(59920),N=t(33766),x=t(96510),I=t(59e3),S=t(90211);function A(e){var n=e.pipeline,t=(0,a.useRouter)(),r=n.uuid,u=Z.ZP.backfills.list({_limit:20,_offset:0,include_run_count:!0,pipeline_uuid:r},{refreshInterval:6e4}),c=u.data,s=(u.mutate,(0,l.useMemo)((function(){return(null===c||void 0===c?void 0:c.backfills)||[]}),[c])),f=(0,I.iV)(),d=(0,l.useState)(null),p=d[0],b=d[1],v=(0,l.useState)(null),h=v[0],E=v[1];(0,l.useEffect)((function(){null!==f&&void 0!==f&&f.backfill_id?b(null===s||void 0===s?void 0:s.find((function(e){return e.id===Number(f.backfill_id)}))):p&&b(null)}),[s,f,p]);var g=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/backfills"),n=[{label:function(){return"Backfills"},linkProps:p?{as:e,href:"/pipelines/[pipeline]/backfills"}:null}];return p&&n.push({label:function(){return p.name}}),n}),[p]),w=(0,o.Db)(Z.ZP.backfills.pipelines.useCreate(r),{onSuccess:function(e){return(0,x.wD)(e,{callback:function(e){var n=e.backfill.id;t.push("/pipelines/[pipeline]/backfills/[...slug]","/pipelines/".concat(r,"/backfills/").concat(n,"/edit"))},onErrorCallback:function(e,n){return E({errors:n,response:e})}})}}),A=(0,i.Z)(w,2),M=A[0],T=A[1].isLoading;return(0,j.jsxs)(y.Z,{breadcrumbs:g,errors:h,pageName:C.M.BACKFILLS,pipeline:n,setErrors:E,title:function(e){var n=e.name;return"".concat(n," backfills")},uuid:"".concat(C.M.BACKFILLS,"_").concat(r),children:[(0,j.jsx)(D.Z,{p:k.cd,children:(0,j.jsx)(P.ZP,{beforeElement:(0,j.jsx)(O.mm,{size:2.5*k.iI}),blackBorder:!0,inline:!0,loading:T,noHoverUnderline:!0,onClick:function(){return M({backfill:{name:(0,S.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/Backfills/add_new_backfill",children:"Create new backfill"})}),s&&0===s.length&&(0,j.jsx)(D.Z,{p:k.cd,children:(0,j.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No backfills available"})}),(null===s||void 0===s?void 0:s.length)>=1&&(0,j.jsx)(_,{models:s,onClickRow:function(e){var n=e.id;return(0,N.u7)({backfill_id:n})},pipeline:n,selectedRow:p})]})}A.getInitialProps=function(){var e=(0,r.Z)(c().mark((function e(n){var t;return c().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 M=(0,w.Z)(A)},33766:function(e,n,t){"use strict";t.d(n,{g_:function(){return d},u7:function(){return f}});var r=t(75582),i=t(82394),u=t(34376),c=t.n(u),l=t(59e3),o=t(24224);function a(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 s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function f(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,u=t.pushHistory,o=i?{}:(0,l.iV)();n=window.location.pathname;var a=u?c().push:c().replace,f=s(s({},o),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 f[t]}));var d=(0,l.uM)(f);d.length>=1&&(d="?".concat(d));var p="".concat(n.split("?")[0]).concat(d);return a(c().router.pathname,p,{shallow:!0})}function d(e,n,t){var i=t.addingMultipleValues,u=t.isList,c=t.itemsPerPage,l=t.pushHistory,a=void 0!==l&&l,d=t.resetLimitParams,p=s({},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 u="".concat(t,"[]");p[u]=i.map(String)}})):u?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],u=String(i),c="".concat(t,"[]"),l=p[c];l&&Array.isArray(l)?(l=l.map(String)).includes(u)?p[c]=(0,o.Od)(l,(function(e){return e===u})):p[c]=l.concat(u):p[c]=[u]})):p=s(s({},p),n),d&&(p._limit=c||20,p._offset=0),f(p,{pushHistory:a})}},37459:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/backfills",function(){return t(30206)}])}},function(e){e.O(0,[3850,2083,2344,9386,6166,8180,2626,9774,2888,179],(function(){return n=37459,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|