mage-ai 0.8.47__py3-none-any.whl → 0.8.49__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/api/resources/DataProviderResource.py +13 -1
- mage_ai/data_preparation/git/__init__.py +1 -1
- mage_ai/data_preparation/models/block/__init__.py +5 -0
- mage_ai/data_preparation/models/block/sql/__init__.py +68 -8
- mage_ai/data_preparation/models/block/sql/clickhouse.py +38 -0
- mage_ai/data_preparation/models/block/utils.py +4 -2
- mage_ai/data_preparation/models/file.py +4 -3
- mage_ai/data_preparation/models/pipeline.py +36 -3
- mage_ai/data_preparation/templates/repo/io_config.yaml +12 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/clickhouse.py +237 -0
- mage_ai/io/config.py +19 -0
- mage_ai/io/io_config.py +1 -0
- mage_ai/io/snowflake.py +0 -1
- mage_ai/io/sql.py +4 -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/I2bRLK9B7Lap2LvCicTKv/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{2249-50d2156ae3ce5933.js → 2249-59feb0a0585ef7c1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2407-35c362852abff411.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2524-ecbe3dd70d06cbe4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3014-26ba07eb6a78e31c.js → 3014-a01e16bc067500ad.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4506-ce5fa63b65f6fa5f.js → 4506-a3c53b0033972626.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4741-5fbecd08232ba3f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5477-793cd2120261d023.js → 5477-b439f211b6146a11.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5716-c5952e5ca9c8e139.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5872-103815a4a043489b.js → 5872-1767c45ee6690ae5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{5896-f84e336fb8877027.js → 5896-10a676bcc86978cc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{6166-5fc2768ef661e7da.js → 6166-97cb3cc7d00d645c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{6532-b0fd357eb359c127.js → 6532-5f86e9e1f32adf3a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{7400-acab00d6265bd4dc.js → 7400-033fb12e7c46f62e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{9832-c8b8970bb522f302.js → 9832-f97919376d52e3bf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-96c89b2a2689f80c.js → manage-8a7b2b707c7038fb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-294eccc0163c80a1.js → pipeline-runs-832218136947bf56.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-c48a45cea6df6192.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-dd637dcb042ff771.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-5541c3e13297ddbc.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-0e6935a2b7f8e1ed.js → logs-caa9fade2bc783b9.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-0e02bcdfcd533830.js → block-runs-1b44f28966826dbe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-baf8bb6da01976db.js → block-runtime-44029312dc580504.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-d42158676a75b451.js → monitors-9b46466e066d6372.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-4049561456ea2314.js → [run]-5f78885afc7758df.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-bebeee2854c734fc.js → runs-43f2c1658cd3d03d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-b95afd173fb265df.js → settings-8fb53eb8dd0267e1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-e46a9b03e0fff91a.js → syncs-c92351b1a81f7a13.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-6a95567766a1d00e.js → [...slug]-ca76f5938bdff8a7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-c259bd9d385404fa.js → triggers-4e9518882c8730b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-0900be641ce4e6ec.js → pipelines-c46347f0308ab09a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{preferences-25735fdf80f95015.js → preferences-45c40fb24c8a5139.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-abfaa2b15eef72a0.js → sync-data-6e80afa0c9b90cdf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-5d0c51213b9bba8e.js → users-12a90f932ff4fc9d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-24eb5df948cc9a7e.js → terminal-cc54b4d4e5295101.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-bd801bde63db7c9e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-6ff85ea842bde8c2.js → triggers-08774e473ea4a96b.js} +1 -1
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/utils/output_display.py +1 -3
- mage_ai/server/websocket_server.py +0 -1
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/METADATA +4 -1
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/RECORD +92 -90
- mage_ai/server/frontend_dist/_next/static/chunks/2083-78a438dbdc57d1e4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2524-6aeb9419acf5d1b4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4538-8a3c3e47be976ede.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4741-acfe40cf3b06659e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-e512333242e02c60.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-774dd41941497640.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c6179a9e737009c9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-85cf18ae78ff535c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/xTScbs8HLliQCDHzVPx5E/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{xTScbs8HLliQCDHzVPx5E → I2bRLK9B7Lap2LvCicTKv}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{xTScbs8HLliQCDHzVPx5E → I2bRLK9B7Lap2LvCicTKv}/_ssgManifest.js +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/LICENSE +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/WHEEL +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{59739:function(e,n,t){"use strict";var i=t(56669);function r(){}function u(){}u.resetWarningCache=r,e.exports=function(){function e(e,n,t,r,u,o){if(o!==i){var l=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 l.name="Invariant Violation",l}}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:u,resetWarningCache:r};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"},27125:function(e,n,t){"use strict";var i=t(82684),r=t(12691),u=t.n(r),o=t(34376),l=t.n(o),c=t(9518),s=t(66050),a=t(60328),d=t(16634),p=t(10919),f=t(98781),h=t(86673),b=t(58180),v=t(19711),g=t(10503),m=t(49125),j=t(44162),x=t(24224),y=t(28598);n.Z=function(e){var n=e.blockRuns,t=e.onClickRow,r=e.pipeline,o=e.selectedRun,O=(0,i.useContext)(c.ThemeContext),Z=(r||{}).uuid,k=(0,i.useMemo)((function(){return r.blocks||[]}),[r]),_=(0,i.useMemo)((function(){return(0,x.HK)(k,(function(e){return e.uuid}))}),[k]);return(0,y.jsx)(b.Z,{columnFlex:[null,1,3,2,null,null],columns:[{uuid:"Date"},{uuid:"Status"},{uuid:"Trigger"},{uuid:"Block"},{uuid:"Completed"},{uuid:"Logs"}],isSelectedRow:function(e){return n[e].id===(null===o||void 0===o?void 0:o.id)},onClickRow:t,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,i,o,c=e.block_uuid,b=e.completed_at,x=e.created_at,k=e.id,P=e.pipeline_schedule_id,w=e.pipeline_schedule_name,I=e.status,C=c,S=C.split(":");f.qL.INTEGRATION===r.type&&(C=S[0],i=S[1],o=S[2]);var T=_[C];return T||(T=_[S[0]]),[(0,y.jsx)(v.ZP,{monospace:!0,default:!0,children:x}),(0,y.jsx)(v.ZP,{danger:s.V.FAILED===I,default:s.V.CANCELLED===I,info:s.V.INITIAL===I,monospace:!0,success:s.V.COMPLETED===I,warning:s.V.RUNNING===I,children:I}),(0,y.jsx)(u(),{as:"/pipelines/".concat(Z,"/triggers/").concat(P),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,y.jsx)(p.Z,{bold:!0,sameColorAsText:!0,children:w})}),(0,y.jsx)(u(),{as:"/pipelines/".concat(Z,"/edit?block_uuid=").concat(C),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsxs)(p.Z,{bold:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,y.jsx)(d.Z,{color:(0,j.qn)(null===(n=T)||void 0===n?void 0:n.type,{blockColor:null===(t=T)||void 0===t?void 0:t.color,theme:O}).accent,size:1.5*m.iI,square:!0}),(0,y.jsx)(h.Z,{mr:1}),(0,y.jsxs)(v.ZP,{monospace:!0,children:[C,i&&": ",i&&(0,y.jsx)(v.ZP,{default:!0,inline:!0,monospace:!0,children:i}),o>=0&&": ",o>=0&&(0,y.jsx)(v.ZP,{default:!0,inline:!0,monospace:!0,children:o})]})]})}),(0,y.jsx)(v.ZP,{monospace:!0,default:!0,children:b||"-"}),(0,y.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(Z,"/logs?block_run_id[]=").concat(k))},children:(0,y.jsx)(g.B4,{default:!0,size:2*m.iI})})]})),uuid:"block-runs"})}},60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var i=t(82394),r=t(21831),u=t(82684),o=t(47999),l=t(1210),c=t(34744),s=t(28358),a=t(67971),d=t(87372),p=t(86673),f=t(82531),h=t(9518),b=t(23831),v=t(73942),g=t(49125),m=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],v.n_,3*g.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||b.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),j=t(3055),x=t(95354),y=t(24141),O=t(28598);function Z(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?Z(Object(t),!0).forEach((function(n){(0,i.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 _=function(e){var n=e.after,t=e.afterHidden,i=e.afterWidth,h=e.before,b=e.beforeWidth,v=e.breadcrumbs,Z=e.buildSidekick,_=e.children,P=e.errors,w=e.headline,I=e.pageName,C=e.pipeline,S=e.setErrors,T=e.subheader,E=e.subheaderBackground,R=e.subheaderBackgroundImage,N=e.subheaderButton,D=e.subheaderText,M=e.title,L=e.uuid,H=(0,y.i)().height,U=C.uuid,z=f.ZP.pipelines.detail(U,{includes_outputs:!1},{revalidateOnFocus:!1}).data,V=null===z||void 0===z?void 0:z.pipeline,B=(0,u.useMemo)((function(){return n||(Z?Z({height:H,heightOffset:j.Mz,pipeline:V}):null)}),[n,Z,H,V]),F=i||(B?50*g.iI:null),A=(0,u.useMemo)((function(){var e=[];return V&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),v?(e.push({label:function(){return V.uuid},linkProps:{as:"/pipelines/".concat(U,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,r.Z)(v)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return V.name}})),e}),[v,V,U]);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(l.Z,{after:B,afterHidden:t,afterWidth:F,before:h,beforeWidth:b,breadcrumbs:A,navigationItems:(0,x.H)(I,V),subheaderChildren:"undefined"!==typeof T&&T,title:V?M?M(V):V.name:null,uuid:L,children:[(N||D)&&(0,O.jsx)(p.Z,{mb:g.Mq,mt:g.cd,mx:g.cd,children:(0,O.jsx)(m,{background:E,backgroundImage:R,children:(0,O.jsxs)(a.Z,{alignItems:"center",children:[N,D&&(0,O.jsx)(p.Z,{ml:3}),D]})})}),w&&(0,O.jsx)(p.Z,{p:g.cd,children:(0,O.jsxs)(p.Z,{mt:g.cd,px:g.cd,children:[(0,O.jsx)(d.Z,{level:5,children:w}),(0,O.jsx)(c.Z,{light:!0,mt:g.cd,short:!0})]})}),_]}),P&&(0,O.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===S||void 0===S?void 0:S(null)},children:(0,O.jsx)(s.Z,k(k({},P),{},{onClose:function(){return null===S||void 0===S?void 0:S(null)}}))})]})}},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return x},Z:function(){return y}});var i=t(75582),r=t(82394),u=t(26304),o=t(32316),l=t(22673),c=t(86532),s=t(86673),a=t(19711),d=t(58180),p=t(49125),f=t(19395),h=t(28598),b=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function v(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 g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m={uuid:"Run details"},j={uuid:"Dependency tree"},x=[j,m];function y(e){var n=e.height,t=e.heightOffset,r=e.pipeline,v=e.selectedRun,y=e.selectedTab,O=e.setSelectedTab,Z=g({},(0,u.Z)(e,b));v?Z.blockStatus=(0,f.IJ)(null===v||void 0===v?void 0:v.block_runs):Z.noStatus=!0;var k=(null===v||void 0===v?void 0:v.variables)||{};null!==v&&void 0!==v&&v.event_variables&&(k.event=v.event_variables);var _=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){_.push(" ".concat(e))}));var P=v&&[["Run ID",null===v||void 0===v?void 0:v.id],["Variables",(0,h.jsx)(l.Z,{language:"json",small:!0,source:_.join("\n")})]],w=v&&(0,h.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,h.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,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:r})]})),uuid:"LogDetail"})}),I=y&&O;return(0,h.jsxs)(h.Fragment,{children:[I&&(0,h.jsx)(s.Z,{py:p.cd,children:(0,h.jsx)(o.Z,{onClickTab:O,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:x})}),(!I||j.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(c.Z,g(g({},Z),{},{height:n,heightOffset:(t||0)+(I?76:0),pipeline:r})),m.uuid===(null===y||void 0===y?void 0:y.uuid)&&w]})}},22673:function(e,n,t){"use strict";var i=t(82684),r=t(73199),u=t.n(r),o=t(71593),l=t(9518),c=t(65292),s=t(23831),a=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,h=e.source,b=e.wrapLines,v=(0,i.useContext)(l.ThemeContext);return(0,p.jsx)(u(),{source:h,renderers:{code:function(e){var i=e.value;return(0,p.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:a.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,paddingBottom:2*d.iI,paddingTop:2*d.iI,maxWidth:t},lineNumberStyle:{color:(v.content||s.Z.content).muted},language:n,showLineNumbers:r,style:c._4,useInlineStyles:!0,wrapLines:b,children:i})}}})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var i=t(82684),r=t(60328),u=t(67971),o=t(882),l=t(86673),c=t(99994),s=t(9518),a=t(49125),d=t(37391),p=s.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],a.cd*a.iI,a.cd*a.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),h=t(28598);var b=function(e){var n=e.allowScroll,t=e.contained,s=e.noPadding,d=e.onClickTab,b=e.selectedTabUUID,v=e.small,g=e.tabs,m=(0,i.useMemo)((function(){var e=g.length,n=[];return g.forEach((function(t,i){var s=t.Icon,p=t.IconSelected,g=t.label,m=t.uuid,j=m===b,x=j&&p||s,y=g?g():m,O=(0,h.jsxs)(u.Z,{alignItems:"center",children:[x&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(x,{default:!j,size:2*a.iI}),(0,h.jsx)(l.Z,{mr:1})]}),y]});i>=1&&e>=2&&n.push((0,h.jsx)("div",{style:{marginLeft:1.5*a.iI}},"spacing-".concat(m))),j?n.push((0,h.jsx)(o.Z,{backgroundGradient:c.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:v,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:v,children:O},m)):n.push((0,h.jsx)("div",{style:{padding:4},children:(0,h.jsx)(r.Z,{borderLess:!0,compact:v,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:v,children:O})},"button-tab-".concat(m)))})),n}),[d,b,v,g]),j=(0,h.jsx)(u.Z,{alignItems:"center",children:m});return t?j:(0,h.jsx)(p,{allowScroll:n,noPadding:s,children:j})}},77980:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return W}});var i=t(77837),r=t(75582),u=t(82394),o=t(38860),l=t.n(o),c=t(82684),s=t(83455),a=t(34376),d=t(16953),p=t(27125),f=t(60328),h=t(32316),b=t(67971),v=t(9518),g=t(23831),m=v.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:2;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||g.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||g.Z.borders).medium,";\n ")})),j=t(51099),x=t(60547),y=t(28598);var O=function(e){var n=e.size;return(0,y.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("g",{"clip-path":"url(#clip0_3007_70027)",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,y.jsxs)("defs",{children:[(0,y.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,y.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,y.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,y.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,y.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},Z=t(47409),k=t(97496),_=t(41788),P=t(55378),w=t(86673),I=t(82531),C=t(56681),S=t(66166),T=t(10503),E=t(59920),R=t(66050),N=t(49125),D=t(33766),M=t(7715),L=t(96510),H=t(59e3);function U(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 z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var V={Icon:T.mR,IconSelected:O,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},B={Icon:T.Re,IconSelected:d.Z,label:function(){return"Block runs"},uuid:"block_runs"},F=[V,B];function A(e){var n=e.pipeline,t=(0,a.useRouter)(),i=(0,c.useState)(null),u=i[0],o=i[1],l=(0,c.useState)(V),d=l[0],v=l[1],g=(0,c.useState)(C.G[0]),O=g[0],_=g[1],T=(0,c.useState)(null),U=T[0],A=T[1],W=n.uuid,G=I.ZP.pipelines.detail(W,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,q=(0,c.useMemo)((function(){return z(z({},null===G||void 0===G?void 0:G.pipeline),{},{uuid:W})}),[G,W]),X=I.ZP.block_runs.list((0,M.gR)(U,["tab"]),{},{pauseFetch:!U}).data,J=(0,c.useMemo)((function(){return(null===X||void 0===X?void 0:X.block_runs)||[]}),[X]),K=(0,c.useState)(),Y=K[0],Q=K[1],$=(0,H.iV)(),ee=(0,S.Z)($);(0,c.useEffect)((function(){var e=$.pipeline_run_id,n=$.status;if(!(0,M.Xy)($,ee)){var t=z(z({},ee),$);e?t.pipeline_run_id=e:t.pipeline_uuid=W,n?t.status=n:delete t.status,A(t)}}),[W,$,ee]);var ne={_limit:25,_offset:25*(null!==$&&void 0!==$&&$.page?$.page:0),pipeline_uuid:W};null!==$&&void 0!==$&&$.status&&(ne.status=$.status);var te=I.ZP.pipeline_runs.list(ne,{refreshInterval:5e3}),ie=te.data,re=te.mutate,ue=(0,c.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.pipeline_runs)||[]}),[ie]),oe=(0,c.useMemo)((function(){var e;return(null===ie||void 0===ie||null===(e=ie.metadata)||void 0===e?void 0:e.count)||[]}),[ie]),le=ue.some((function(e){var n=e.status;return n===R.V.INITIAL||n===R.V.RUNNING})),ce=(0,s.Db)(I.ZP.pipelines.useUpdate(W),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(){re()},onErrorCallback:function(e,n){return o({errors:n,response:e})}})}}),se=(0,r.Z)(ce,2),ae=se[0],de=se[1].isLoading,pe=(0,S.Z)(d);(0,c.useEffect)((function(){var e=$.tab;e&&v(F.find((function(n){return n.uuid===e})))}),[$,d,pe]);var fe=(0,c.useMemo)((function(){var e=null!==$&&void 0!==$&&$.page?$.page:0;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k.Z,{fetchPipelineRuns:re,onClickRow:function(e){return Q((function(n){var t=ue[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ue,selectedRun:Y,setErrors:o}),(0,y.jsx)(w.Z,{p:2,children:(0,y.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),i=z(z({},$),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/runs","/pipelines/".concat(W,"/runs?").concat((0,H.uM)(i)))},page:Number(e),totalPages:Math.ceil(oe/25)})})]})}),[re,q,ue,$,Y,oe]),he=(0,c.useMemo)((function(){return(0,y.jsx)(p.Z,{blockRuns:J,pipeline:q})}),[J,q]);return(0,y.jsxs)(x.Z,{afterHidden:V.uuid===(null===d||void 0===d?void 0:d.uuid)&&!Y,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:V.uuid===(null===d||void 0===d?void 0:d.uuid)?function(e){return(0,C.Z)(z(z({},e),{},{selectedRun:Y,selectedTab:O,setSelectedTab:_}))}:function(e){return(0,C.Z)(e)},errors:u,pageName:E.M.RUNS,pipeline:q,setErrors:o,title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(E.M.RUNS,"_").concat(W),children:[(0,y.jsx)(m,{children:(0,y.jsx)(w.Z,{py:1,children:(0,y.jsxs)(b.Z,{alignItems:"center",children:[le&&V.uuid===(null===d||void 0===d?void 0:d.uuid)&&(0,y.jsx)(w.Z,{pl:2,children:(0,y.jsx)(f.Z,{danger:!0,loading:de,onClick:function(){ae({pipeline:{status:R.V.CANCELLED}})},outline:!0,children:"Cancel running pipeline runs"})}),(0,y.jsx)(h.Z,{onClickTab:function(e){var n=e.uuid;A(null),(0,D.u7)({tab:n},{replaceParams:!0})},selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:F}),V.uuid===(null===d||void 0===d?void 0:d.uuid)&&(0,y.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?(A(null),(0,D.u7)({tab:V.uuid},{replaceParams:!0})):(0,D.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:null===U||void 0===U?void 0:U.status,children:[(0,y.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(R.V).map((function(e){return(0,y.jsx)("option",{value:e,children:Z.D[e]},e)}))]})]})})}),V.uuid===(null===d||void 0===d?void 0:d.uuid)&&fe,B.uuid===(null===d||void 0===d?void 0:d.uuid)&&he]})}A.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().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 W=(0,_.Z)(A)},79897:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(77980)}])}},function(e){e.O(0,[3850,2083,4804,1774,2524,2344,4506,6166,8180,6214,6532,4741,9774,2888,179],(function(){return n=79897,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{59739:function(e,n,t){"use strict";var i=t(56669);function r(){}function u(){}u.resetWarningCache=r,e.exports=function(){function e(e,n,t,r,u,o){if(o!==i){var l=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 l.name="Invariant Violation",l}}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:u,resetWarningCache:r};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"},27125:function(e,n,t){"use strict";var i=t(82684),r=t(12691),u=t.n(r),o=t(34376),l=t.n(o),c=t(9518),s=t(66050),a=t(60328),d=t(16634),p=t(10919),f=t(98781),h=t(86673),b=t(58180),v=t(19711),g=t(10503),m=t(49125),j=t(44162),x=t(24224),y=t(28598);n.Z=function(e){var n=e.blockRuns,t=e.onClickRow,r=e.pipeline,o=e.selectedRun,O=(0,i.useContext)(c.ThemeContext),Z=(r||{}).uuid,k=(0,i.useMemo)((function(){return r.blocks||[]}),[r]),_=(0,i.useMemo)((function(){return(0,x.HK)(k,(function(e){return e.uuid}))}),[k]);return(0,y.jsx)(b.Z,{columnFlex:[null,1,3,2,null,null],columns:[{uuid:"Date"},{uuid:"Status"},{uuid:"Trigger"},{uuid:"Block"},{uuid:"Completed"},{uuid:"Logs"}],isSelectedRow:function(e){return n[e].id===(null===o||void 0===o?void 0:o.id)},onClickRow:t,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,i,o,c=e.block_uuid,b=e.completed_at,x=e.created_at,k=e.id,P=e.pipeline_schedule_id,w=e.pipeline_schedule_name,I=e.status,C=c,S=C.split(":");f.qL.INTEGRATION===r.type&&(C=S[0],i=S[1],o=S[2]);var T=_[C];return T||(T=_[S[0]]),[(0,y.jsx)(v.ZP,{monospace:!0,default:!0,children:x}),(0,y.jsx)(v.ZP,{danger:s.V.FAILED===I,default:s.V.CANCELLED===I,info:s.V.INITIAL===I,monospace:!0,success:s.V.COMPLETED===I,warning:s.V.RUNNING===I,children:I}),(0,y.jsx)(u(),{as:"/pipelines/".concat(Z,"/triggers/").concat(P),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,y.jsx)(p.Z,{bold:!0,sameColorAsText:!0,children:w})}),(0,y.jsx)(u(),{as:"/pipelines/".concat(Z,"/edit?block_uuid=").concat(C),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,y.jsxs)(p.Z,{bold:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,y.jsx)(d.Z,{color:(0,j.qn)(null===(n=T)||void 0===n?void 0:n.type,{blockColor:null===(t=T)||void 0===t?void 0:t.color,theme:O}).accent,size:1.5*m.iI,square:!0}),(0,y.jsx)(h.Z,{mr:1}),(0,y.jsxs)(v.ZP,{monospace:!0,children:[C,i&&": ",i&&(0,y.jsx)(v.ZP,{default:!0,inline:!0,monospace:!0,children:i}),o>=0&&": ",o>=0&&(0,y.jsx)(v.ZP,{default:!0,inline:!0,monospace:!0,children:o})]})]})}),(0,y.jsx)(v.ZP,{monospace:!0,default:!0,children:b||"-"}),(0,y.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(Z,"/logs?block_run_id[]=").concat(k))},children:(0,y.jsx)(g.B4,{default:!0,size:2*m.iI})})]})),uuid:"block-runs"})}},60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var i=t(82394),r=t(21831),u=t(82684),o=t(47999),l=t(1210),c=t(34744),s=t(49894),a=t(67971),d=t(87372),p=t(86673),f=t(82531),h=t(9518),b=t(23831),v=t(73942),g=t(49125),m=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],v.n_,3*g.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||b.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),j=t(3055),x=t(95354),y=t(24141),O=t(28598);function Z(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?Z(Object(t),!0).forEach((function(n){(0,i.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 _=function(e){var n=e.after,t=e.afterHidden,i=e.afterWidth,h=e.before,b=e.beforeWidth,v=e.breadcrumbs,Z=e.buildSidekick,_=e.children,P=e.errors,w=e.headline,I=e.pageName,C=e.pipeline,S=e.setErrors,T=e.subheader,E=e.subheaderBackground,R=e.subheaderBackgroundImage,N=e.subheaderButton,D=e.subheaderText,M=e.title,L=e.uuid,H=(0,y.i)().height,U=C.uuid,z=f.ZP.pipelines.detail(U,{includes_outputs:!1},{revalidateOnFocus:!1}).data,V=null===z||void 0===z?void 0:z.pipeline,B=(0,u.useMemo)((function(){return n||(Z?Z({height:H,heightOffset:j.Mz,pipeline:V}):null)}),[n,Z,H,V]),F=i||(B?50*g.iI:null),A=(0,u.useMemo)((function(){var e=[];return V&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),v?(e.push({label:function(){return V.uuid},linkProps:{as:"/pipelines/".concat(U,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,r.Z)(v)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return V.name}})),e}),[v,V,U]);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(l.Z,{after:B,afterHidden:t,afterWidth:F,before:h,beforeWidth:b,breadcrumbs:A,navigationItems:(0,x.H)(I,V),subheaderChildren:"undefined"!==typeof T&&T,title:V?M?M(V):V.name:null,uuid:L,children:[(N||D)&&(0,O.jsx)(p.Z,{mb:g.Mq,mt:g.cd,mx:g.cd,children:(0,O.jsx)(m,{background:E,backgroundImage:R,children:(0,O.jsxs)(a.Z,{alignItems:"center",children:[N,D&&(0,O.jsx)(p.Z,{ml:3}),D]})})}),w&&(0,O.jsx)(p.Z,{p:g.cd,children:(0,O.jsxs)(p.Z,{mt:g.cd,px:g.cd,children:[(0,O.jsx)(d.Z,{level:5,children:w}),(0,O.jsx)(c.Z,{light:!0,mt:g.cd,short:!0})]})}),_]}),P&&(0,O.jsx)(o.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===S||void 0===S?void 0:S(null)},children:(0,O.jsx)(s.Z,k(k({},P),{},{onClose:function(){return null===S||void 0===S?void 0:S(null)}}))})]})}},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return x},Z:function(){return y}});var i=t(75582),r=t(82394),u=t(26304),o=t(32316),l=t(22673),c=t(86532),s=t(86673),a=t(19711),d=t(58180),p=t(49125),f=t(19395),h=t(28598),b=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function v(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 g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m={uuid:"Run details"},j={uuid:"Dependency tree"},x=[j,m];function y(e){var n=e.height,t=e.heightOffset,r=e.pipeline,v=e.selectedRun,y=e.selectedTab,O=e.setSelectedTab,Z=g({},(0,u.Z)(e,b));v?Z.blockStatus=(0,f.IJ)(null===v||void 0===v?void 0:v.block_runs):Z.noStatus=!0;var k=(null===v||void 0===v?void 0:v.variables)||{};null!==v&&void 0!==v&&v.event_variables&&(k.event=v.event_variables);var _=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){_.push(" ".concat(e))}));var P=v&&[["Run ID",null===v||void 0===v?void 0:v.id],["Variables",(0,h.jsx)(l.Z,{language:"json",small:!0,source:_.join("\n")})]],w=v&&(0,h.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,h.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,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:r})]})),uuid:"LogDetail"})}),I=y&&O;return(0,h.jsxs)(h.Fragment,{children:[I&&(0,h.jsx)(s.Z,{py:p.cd,children:(0,h.jsx)(o.Z,{onClickTab:O,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:x})}),(!I||j.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(c.Z,g(g({},Z),{},{height:n,heightOffset:(t||0)+(I?76:0),pipeline:r})),m.uuid===(null===y||void 0===y?void 0:y.uuid)&&w]})}},22673:function(e,n,t){"use strict";var i=t(82684),r=t(73199),u=t.n(r),o=t(71593),l=t(9518),c=t(65292),s=t(23831),a=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,h=e.source,b=e.wrapLines,v=(0,i.useContext)(l.ThemeContext);return(0,p.jsx)(u(),{source:h,renderers:{code:function(e){var i=e.value;return(0,p.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:a.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,paddingBottom:2*d.iI,paddingTop:2*d.iI,maxWidth:t},lineNumberStyle:{color:(v.content||s.Z.content).muted},language:n,showLineNumbers:r,style:c._4,useInlineStyles:!0,wrapLines:b,children:i})}}})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return b}});var i=t(82684),r=t(60328),u=t(67971),o=t(882),l=t(86673),c=t(99994),s=t(9518),a=t(49125),d=t(37391),p=s.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],a.cd*a.iI,a.cd*a.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),h=t(28598);var b=function(e){var n=e.allowScroll,t=e.contained,s=e.noPadding,d=e.onClickTab,b=e.selectedTabUUID,v=e.small,g=e.tabs,m=(0,i.useMemo)((function(){var e=g.length,n=[];return g.forEach((function(t,i){var s=t.Icon,p=t.IconSelected,g=t.label,m=t.uuid,j=m===b,x=j&&p||s,y=g?g():m,O=(0,h.jsxs)(u.Z,{alignItems:"center",children:[x&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(x,{default:!j,size:2*a.iI}),(0,h.jsx)(l.Z,{mr:1})]}),y]});i>=1&&e>=2&&n.push((0,h.jsx)("div",{style:{marginLeft:1.5*a.iI}},"spacing-".concat(m))),j?n.push((0,h.jsx)(o.Z,{backgroundGradient:c.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:v,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:v,children:O},m)):n.push((0,h.jsx)("div",{style:{padding:4},children:(0,h.jsx)(r.Z,{borderLess:!0,compact:v,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:v,children:O})},"button-tab-".concat(m)))})),n}),[d,b,v,g]),j=(0,h.jsx)(u.Z,{alignItems:"center",children:m});return t?j:(0,h.jsx)(p,{allowScroll:n,noPadding:s,children:j})}},77980:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return W}});var i=t(77837),r=t(75582),u=t(82394),o=t(38860),l=t.n(o),c=t(82684),s=t(83455),a=t(34376),d=t(16953),p=t(27125),f=t(60328),h=t(32316),b=t(67971),v=t(9518),g=t(23831),m=v.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:2;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||g.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||g.Z.borders).medium,";\n ")})),j=t(51099),x=t(60547),y=t(28598);var O=function(e){var n=e.size;return(0,y.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("g",{"clip-path":"url(#clip0_3007_70027)",children:(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,y.jsxs)("defs",{children:[(0,y.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,y.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,y.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,y.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,y.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},Z=t(47409),k=t(97496),_=t(41788),P=t(55378),w=t(86673),I=t(82531),C=t(56681),S=t(66166),T=t(10503),E=t(59920),R=t(66050),N=t(49125),D=t(33766),M=t(7715),L=t(96510),H=t(59e3);function U(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 z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var V={Icon:T.mR,IconSelected:O,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},B={Icon:T.Re,IconSelected:d.Z,label:function(){return"Block runs"},uuid:"block_runs"},F=[V,B];function A(e){var n=e.pipeline,t=(0,a.useRouter)(),i=(0,c.useState)(null),u=i[0],o=i[1],l=(0,c.useState)(V),d=l[0],v=l[1],g=(0,c.useState)(C.G[0]),O=g[0],_=g[1],T=(0,c.useState)(null),U=T[0],A=T[1],W=n.uuid,G=I.ZP.pipelines.detail(W,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,q=(0,c.useMemo)((function(){return z(z({},null===G||void 0===G?void 0:G.pipeline),{},{uuid:W})}),[G,W]),X=I.ZP.block_runs.list((0,M.gR)(U,["tab"]),{},{pauseFetch:!U}).data,J=(0,c.useMemo)((function(){return(null===X||void 0===X?void 0:X.block_runs)||[]}),[X]),K=(0,c.useState)(),Y=K[0],Q=K[1],$=(0,H.iV)(),ee=(0,S.Z)($);(0,c.useEffect)((function(){var e=$.pipeline_run_id,n=$.status;if(!(0,M.Xy)($,ee)){var t=z(z({},ee),$);e?t.pipeline_run_id=e:t.pipeline_uuid=W,n?t.status=n:delete t.status,A(t)}}),[W,$,ee]);var ne={_limit:25,_offset:25*(null!==$&&void 0!==$&&$.page?$.page:0),pipeline_uuid:W};null!==$&&void 0!==$&&$.status&&(ne.status=$.status);var te=I.ZP.pipeline_runs.list(ne,{refreshInterval:5e3}),ie=te.data,re=te.mutate,ue=(0,c.useMemo)((function(){return(null===ie||void 0===ie?void 0:ie.pipeline_runs)||[]}),[ie]),oe=(0,c.useMemo)((function(){var e;return(null===ie||void 0===ie||null===(e=ie.metadata)||void 0===e?void 0:e.count)||[]}),[ie]),le=ue.some((function(e){var n=e.status;return n===R.V.INITIAL||n===R.V.RUNNING})),ce=(0,s.Db)(I.ZP.pipelines.useUpdate(W),{onSuccess:function(e){return(0,L.wD)(e,{callback:function(){re()},onErrorCallback:function(e,n){return o({errors:n,response:e})}})}}),se=(0,r.Z)(ce,2),ae=se[0],de=se[1].isLoading,pe=(0,S.Z)(d);(0,c.useEffect)((function(){var e=$.tab;e&&v(F.find((function(n){return n.uuid===e})))}),[$,d,pe]);var fe=(0,c.useMemo)((function(){var e=null!==$&&void 0!==$&&$.page?$.page:0;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k.Z,{fetchPipelineRuns:re,onClickRow:function(e){return Q((function(n){var t=ue[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ue,selectedRun:Y,setErrors:o}),(0,y.jsx)(w.Z,{p:2,children:(0,y.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),i=z(z({},$),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/runs","/pipelines/".concat(W,"/runs?").concat((0,H.uM)(i)))},page:Number(e),totalPages:Math.ceil(oe/25)})})]})}),[re,q,ue,$,Y,oe]),he=(0,c.useMemo)((function(){return(0,y.jsx)(p.Z,{blockRuns:J,pipeline:q})}),[J,q]);return(0,y.jsxs)(x.Z,{afterHidden:V.uuid===(null===d||void 0===d?void 0:d.uuid)&&!Y,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:V.uuid===(null===d||void 0===d?void 0:d.uuid)?function(e){return(0,C.Z)(z(z({},e),{},{selectedRun:Y,selectedTab:O,setSelectedTab:_}))}:function(e){return(0,C.Z)(e)},errors:u,pageName:E.M.RUNS,pipeline:q,setErrors:o,title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(E.M.RUNS,"_").concat(W),children:[(0,y.jsx)(m,{children:(0,y.jsx)(w.Z,{py:1,children:(0,y.jsxs)(b.Z,{alignItems:"center",children:[le&&V.uuid===(null===d||void 0===d?void 0:d.uuid)&&(0,y.jsx)(w.Z,{pl:2,children:(0,y.jsx)(f.Z,{danger:!0,loading:de,onClick:function(){ae({pipeline:{status:R.V.CANCELLED}})},outline:!0,children:"Cancel running pipeline runs"})}),(0,y.jsx)(h.Z,{onClickTab:function(e){var n=e.uuid;A(null),(0,D.u7)({tab:n},{replaceParams:!0})},selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:F}),V.uuid===(null===d||void 0===d?void 0:d.uuid)&&(0,y.jsxs)(P.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?(A(null),(0,D.u7)({tab:V.uuid},{replaceParams:!0})):(0,D.u7)({page:0,status:e.target.value})},paddingRight:4*N.iI,placeholder:"Select run status",value:null===U||void 0===U?void 0:U.status,children:[(0,y.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(R.V).map((function(e){return(0,y.jsx)("option",{value:e,children:Z.D[e]},e)}))]})]})})}),V.uuid===(null===d||void 0===d?void 0:d.uuid)&&fe,B.uuid===(null===d||void 0===d?void 0:d.uuid)&&he]})}A.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().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 W=(0,_.Z)(A)},79897:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(77980)}])}},function(e){e.O(0,[3850,5716,4804,1774,2524,2344,4506,6166,8180,6214,6532,4741,9774,2888,179],(function(){return n=79897,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(28358),u=t(93461),a=t(57384),d=t(12344),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var b=o.forwardRef(f),h=t(32063),v=t(15270),g=t(82531),m=t(66166),j=t(3055),O=t(49125),x=t(91427),y=t(24141);function k(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 w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,k=e.afterWidthOverride,Z=e.before,P=e.beforeWidth,_=e.breadcrumbs,C=e.children,S=e.errors,I=e.headerMenuItems,D=e.navigationItems,E=e.setErrors,M=e.subheaderChildren,N=e.title,q=e.uuid,H=(0,y.i)().width,W="dashboard_after_width_".concat(q),B="dashboard_before_width_".concat(q),T=(0,o.useRef)(null),A=(0,o.useState)(k?f:(0,x.U2)(W,f)),F=A[0],U=A[1],z=(0,o.useState)(!1),R=z[0],J=z[1],Y=(0,o.useState)(Z?Math.max((0,x.U2)(B,P),13*O.iI):null),G=Y[0],L=Y[1],X=(0,o.useState)(!1),V=X[0],K=X[1],Q=(0,o.useState)(null)[1],$=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];_?ne.push.apply(ne,(0,i.Z)(_)):(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 N}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||R||V||null===Q||void 0===Q||Q(T.current.getBoundingClientRect().width)}),[R,F,V,G,T,Q,H]),(0,o.useEffect)((function(){R||(0,x.t8)(W,F)}),[r,R,F,W]),(0,o.useEffect)((function(){V||(0,x.t8)(B,G)}),[V,G,B]);var te=(0,m.Z)(f);return(0,o.useEffect)((function(){k&&te!==f&&U(f)}),[k,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:N}),(0,p.jsx)(d.Z,{breadcrumbs:ne,menuItems:I,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,p.jsxs)(s.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,p.jsx)(s.lm,{children:(0,p.jsx)(v.Z,{navigationItems:D})}),(0,p.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(h.Z,{after:t,afterHeightOffset:j.Mz,afterHidden:r,afterMousedownActive:R,afterWidth:F,before:Z,beforeHeightOffset:j.Mz,beforeMousedownActive:V,beforeWidth:s.k1+(Z?G:0),hideAfterCompletely:!0,leftOffset:Z?s.k1:null,mainContainerRef:T,setAfterMousedownActive:J,setAfterWidth:U,setBeforeMousedownActive:K,setBeforeWidth:L,children:[M&&(0,p.jsx)(b,{children:M}),C]})})]}),S&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,p.jsx)(l.Z,w(w({},S),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(1210),u=t(34744),a=t(28358),d=t(67971),s=t(87372),p=t(86673),f=t(82531),b=t(9518),h=t(23831),v=t(73942),g=t(49125),m=b.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],v.n_,3*g.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||h.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),j=t(3055),O=t(95354),x=t(24141),y=t(28598);function k(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 w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n=e.after,t=e.afterHidden,r=e.afterWidth,b=e.before,h=e.beforeWidth,v=e.breadcrumbs,k=e.buildSidekick,Z=e.children,P=e.errors,_=e.headline,C=e.pageName,S=e.pipeline,I=e.setErrors,D=e.subheader,E=e.subheaderBackground,M=e.subheaderBackgroundImage,N=e.subheaderButton,q=e.subheaderText,H=e.title,W=e.uuid,B=(0,x.i)().height,T=S.uuid,A=f.ZP.pipelines.detail(T,{includes_outputs:!1},{revalidateOnFocus:!1}).data,F=null===A||void 0===A?void 0:A.pipeline,U=(0,o.useMemo)((function(){return n||(k?k({height:B,heightOffset:j.Mz,pipeline:F}):null)}),[n,k,B,F]),z=r||(U?50*g.iI:null),R=(0,o.useMemo)((function(){var e=[];return F&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),v?(e.push({label:function(){return F.uuid},linkProps:{as:"/pipelines/".concat(T,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(v)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return F.name}})),e}),[v,F,T]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(l.Z,{after:U,afterHidden:t,afterWidth:z,before:b,beforeWidth:h,breadcrumbs:R,navigationItems:(0,O.H)(C,F),subheaderChildren:"undefined"!==typeof D&&D,title:F?H?H(F):F.name:null,uuid:W,children:[(N||q)&&(0,y.jsx)(p.Z,{mb:g.Mq,mt:g.cd,mx:g.cd,children:(0,y.jsx)(m,{background:E,backgroundImage:M,children:(0,y.jsxs)(d.Z,{alignItems:"center",children:[N,q&&(0,y.jsx)(p.Z,{ml:3}),q]})})}),_&&(0,y.jsx)(p.Z,{p:g.cd,children:(0,y.jsxs)(p.Z,{mt:g.cd,px:g.cd,children:[(0,y.jsx)(s.Z,{level:5,children:_}),(0,y.jsx)(u.Z,{light:!0,mt:g.cd,short:!0})]})}),Z]}),P&&(0,y.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===I||void 0===I?void 0:I(null)},children:(0,y.jsx)(a.Z,w(w({},P),{},{onClose:function(){return null===I||void 0===I?void 0:I(null)}}))})]})}},38341:function(e,n,t){"use strict";var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(9518)),l=t(67971),u=t(86673),a=t(19711),d=t(23831),s=t(10503),p=t(73942),f=t(49125),b=t(28598),h=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function v(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 g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),j=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),O=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||d.Z.content).disabled,"\n border-color: ").concat((e.theme.content||d.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),x=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||d.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||d.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||d.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||d.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||d.Z.content).disabled,";\n border-color: ").concat((e.theme.content||d.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||d.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||d.Z.interactive).defaultBorder,"\n ")})),y=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,d=e.label,p=e.labelDescription,v=e.large,k=e.meta,w=e.monospace,Z=void 0!==w&&w,P=e.onClick,_=e.required,C=e.small,S=void 0!==C&&C,I=e.warning,D=e.xsmall,E=void 0!==D&&D,M=(0,o.Z)(e,h),N=I||!!(c||k&&k.touched&&k.error);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(y,{onClick:function(e){e.preventDefault(),P&&!i&&P(e)},children:[(0,b.jsxs)(m,{children:[(0,b.jsx)(O,g(g({},M),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,b.jsx)(x,{checked:t,disabled:i,large:v,required:_,warning:N,children:(0,b.jsx)(s.Jr,{size:f.iI*(v?3:2)})})]}),n&&(0,b.jsx)(u.Z,{ml:1,children:(0,b.jsx)(l.Z,{children:n})}),d&&(0,b.jsxs)(u.Z,{pl:1,children:["string"===typeof d&&(0,b.jsx)(a.ZP,{disabled:i,lineThrough:i,monospace:Z,small:S,xsmall:E,children:d}),"string"!==typeof d&&d,p&&(0,b.jsx)(a.ZP,{muted:!0,small:!0,children:p})]})]}),(c||k&&k.touched&&k.error)&&(0,b.jsx)(j,{children:(0,b.jsx)(a.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):k.error})})]})}},70814:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return D}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),l=t.n(c),u=t(60547),a=t(41788),d=t(82684),s=t(60328),p=t(38341),f=t(67971),b=t(86673),h=t(82944),v=t(11366),g=t(49125),m=t(91427),j=t(90211),O=t(28598);function x(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 y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=function(e){var n=e.isPipelineUpdating,t=e.pipeline,r=e.updatePipeline,i=null===t||void 0===t?void 0:t.uuid,c=(0,d.useMemo)((function(){return(null===t||void 0===t?void 0:t.blocks)||[]}),[t]),l=(0,d.useState)((null===t||void 0===t?void 0:t.name)||""),u=l[0],a=l[1],x="".concat(v.g6,"_").concat(i),k=(0,d.useState)({}),w=k[0],Z=k[1],P=(0,d.useCallback)((function(e){Z((function(n){var t=e(n);return(0,m.t8)(x,JSON.stringify(t)),t}))}),[x,Z]);(0,d.useEffect)((function(){var e=(0,m.U2)(x);e&&(0,j.Pb)(e)&&Z(JSON.parse(e))}),[x,Z]);var _=(0,d.useMemo)((function(){return(null===c||void 0===c?void 0:c.filter((function(e){var n=e.uuid;return!(null===w||void 0===w||!w[n])}))).length===c.length}),[c,w]);return(0,O.jsxs)(b.Z,{p:g.cd,children:[(0,O.jsx)(h.Z,{label:"Pipeline name",onChange:function(e){return a(e.target.value)},primary:!0,required:!0,setContentOnMount:!0,value:u}),(0,O.jsx)(b.Z,{mt:5,children:(0,O.jsx)(f.Z,{children:(0,O.jsx)(s.Z,{disabled:u===(null===t||void 0===t?void 0:t.name),loading:n,onClick:function(){return r({name:u})},primary:!0,children:"Save pipeline settings"})})}),(0,O.jsx)(b.Z,{mt:5,children:(0,O.jsx)(p.Z,{checked:_,label:"Hide all blocks in notebook",onClick:function(){return P((function(){return _?{}:null===c||void 0===c?void 0:c.reduce((function(e,n){var t=n.uuid;return y(y({},e),{},(0,o.Z)({},t,!0))}),{})}))}})})]})},w=t(82531),Z=t(59920),P=t(83455),_=t(96510);function C(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?C(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function I(e){var n=e.pipeline,t=null===n||void 0===n?void 0:n.uuid,r=w.ZP.pipelines.detail(t).data,o=S(S({},null===r||void 0===r?void 0:r.pipeline),n),c=(0,P.Db)(w.ZP.pipelines.useUpdate(t,{update_content:!0}),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(e){if(null!==e&&void 0!==e&&e.pipeline){var n=e.pipeline.uuid;t!==n&&(window.location.href="/pipelines/".concat(n,"/settings"))}},onErrorCallback:function(e,n){return console.log({errors:n,response:e})}})}}),l=(0,i.Z)(c,2),a=l[0],d=l[1].isLoading;return(0,O.jsx)(u.Z,{breadcrumbs:[{label:function(){return"Settings"}}],pageName:Z.M.SETTINGS,pipeline:o,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(Z.M.SETTINGS,"_").concat(t),children:r&&(0,O.jsx)(k,{isPipelineUpdating:d,pipeline:o,updatePipeline:function(e){return a({pipeline:e})}})})}I.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t;return l().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 D=(0,a.Z)(I)},11366:function(e,n,t){"use strict";t.d(n,{H8:function(){return i},g6:function(){return o},kY:function(){return r}});var r="automatically_name_blocks",i="pipeline_edit_before_tab_selected",o="pipeline_edit_hidden_blocks"},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(70814)}])}},function(e){e.O(0,[3850,2083,2344,4506,6166,6214,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(49894),u=t(93461),a=t(57384),d=t(12344),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var b=o.forwardRef(f),h=t(32063),v=t(15270),g=t(82531),m=t(66166),j=t(3055),O=t(49125),x=t(91427),y=t(24141);function k(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 w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,k=e.afterWidthOverride,Z=e.before,P=e.beforeWidth,_=e.breadcrumbs,C=e.children,S=e.errors,I=e.headerMenuItems,D=e.navigationItems,E=e.setErrors,M=e.subheaderChildren,N=e.title,q=e.uuid,H=(0,y.i)().width,W="dashboard_after_width_".concat(q),B="dashboard_before_width_".concat(q),T=(0,o.useRef)(null),A=(0,o.useState)(k?f:(0,x.U2)(W,f)),F=A[0],U=A[1],z=(0,o.useState)(!1),R=z[0],J=z[1],Y=(0,o.useState)(Z?Math.max((0,x.U2)(B,P),13*O.iI):null),G=Y[0],L=Y[1],X=(0,o.useState)(!1),V=X[0],K=X[1],Q=(0,o.useState)(null)[1],$=g.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];_?ne.push.apply(ne,(0,i.Z)(_)):(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 N}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||R||V||null===Q||void 0===Q||Q(T.current.getBoundingClientRect().width)}),[R,F,V,G,T,Q,H]),(0,o.useEffect)((function(){R||(0,x.t8)(W,F)}),[r,R,F,W]),(0,o.useEffect)((function(){V||(0,x.t8)(B,G)}),[V,G,B]);var te=(0,m.Z)(f);return(0,o.useEffect)((function(){k&&te!==f&&U(f)}),[k,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:N}),(0,p.jsx)(d.Z,{breadcrumbs:ne,menuItems:I,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,p.jsxs)(s.Nk,{children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,p.jsx)(s.lm,{children:(0,p.jsx)(v.Z,{navigationItems:D})}),(0,p.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(h.Z,{after:t,afterHeightOffset:j.Mz,afterHidden:r,afterMousedownActive:R,afterWidth:F,before:Z,beforeHeightOffset:j.Mz,beforeMousedownActive:V,beforeWidth:s.k1+(Z?G:0),hideAfterCompletely:!0,leftOffset:Z?s.k1:null,mainContainerRef:T,setAfterMousedownActive:J,setAfterWidth:U,setBeforeMousedownActive:K,setBeforeWidth:L,children:[M&&(0,p.jsx)(b,{children:M}),C]})})]}),S&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,p.jsx)(l.Z,w(w({},S),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),l=t(1210),u=t(34744),a=t(49894),d=t(67971),s=t(87372),p=t(86673),f=t(82531),b=t(9518),h=t(23831),v=t(73942),g=t(49125),m=b.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],v.n_,3*g.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||h.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),j=t(3055),O=t(95354),x=t(24141),y=t(28598);function k(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 w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Z=function(e){var n=e.after,t=e.afterHidden,r=e.afterWidth,b=e.before,h=e.beforeWidth,v=e.breadcrumbs,k=e.buildSidekick,Z=e.children,P=e.errors,_=e.headline,C=e.pageName,S=e.pipeline,I=e.setErrors,D=e.subheader,E=e.subheaderBackground,M=e.subheaderBackgroundImage,N=e.subheaderButton,q=e.subheaderText,H=e.title,W=e.uuid,B=(0,x.i)().height,T=S.uuid,A=f.ZP.pipelines.detail(T,{includes_outputs:!1},{revalidateOnFocus:!1}).data,F=null===A||void 0===A?void 0:A.pipeline,U=(0,o.useMemo)((function(){return n||(k?k({height:B,heightOffset:j.Mz,pipeline:F}):null)}),[n,k,B,F]),z=r||(U?50*g.iI:null),R=(0,o.useMemo)((function(){var e=[];return F&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),v?(e.push({label:function(){return F.uuid},linkProps:{as:"/pipelines/".concat(T,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(v)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return F.name}})),e}),[v,F,T]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(l.Z,{after:U,afterHidden:t,afterWidth:z,before:b,beforeWidth:h,breadcrumbs:R,navigationItems:(0,O.H)(C,F),subheaderChildren:"undefined"!==typeof D&&D,title:F?H?H(F):F.name:null,uuid:W,children:[(N||q)&&(0,y.jsx)(p.Z,{mb:g.Mq,mt:g.cd,mx:g.cd,children:(0,y.jsx)(m,{background:E,backgroundImage:M,children:(0,y.jsxs)(d.Z,{alignItems:"center",children:[N,q&&(0,y.jsx)(p.Z,{ml:3}),q]})})}),_&&(0,y.jsx)(p.Z,{p:g.cd,children:(0,y.jsxs)(p.Z,{mt:g.cd,px:g.cd,children:[(0,y.jsx)(s.Z,{level:5,children:_}),(0,y.jsx)(u.Z,{light:!0,mt:g.cd,short:!0})]})}),Z]}),P&&(0,y.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===I||void 0===I?void 0:I(null)},children:(0,y.jsx)(a.Z,w(w({},P),{},{onClose:function(){return null===I||void 0===I?void 0:I(null)}}))})]})}},38341:function(e,n,t){"use strict";var r=t(21831),i=t(82394),o=t(26304),c=(t(82684),t(9518)),l=t(67971),u=t(86673),a=t(19711),d=t(23831),s=t(10503),p=t(73942),f=t(49125),b=t(28598),h=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];function v(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 g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),j=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),O=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||d.Z.content).disabled,"\n border-color: ").concat((e.theme.content||d.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),x=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||d.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||d.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||d.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||d.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||d.Z.content).disabled,";\n border-color: ").concat((e.theme.content||d.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||d.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||d.Z.interactive).defaultBorder,"\n ")})),y=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,i=e.disabled,c=e.errorMessage,d=e.label,p=e.labelDescription,v=e.large,k=e.meta,w=e.monospace,Z=void 0!==w&&w,P=e.onClick,_=e.required,C=e.small,S=void 0!==C&&C,I=e.warning,D=e.xsmall,E=void 0!==D&&D,M=(0,o.Z)(e,h),N=I||!!(c||k&&k.touched&&k.error);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(y,{onClick:function(e){e.preventDefault(),P&&!i&&P(e)},children:[(0,b.jsxs)(m,{children:[(0,b.jsx)(O,g(g({},M),{},{disabled:i?"disabled":void 0,notClickable:i})),(0,b.jsx)(x,{checked:t,disabled:i,large:v,required:_,warning:N,children:(0,b.jsx)(s.Jr,{size:f.iI*(v?3:2)})})]}),n&&(0,b.jsx)(u.Z,{ml:1,children:(0,b.jsx)(l.Z,{children:n})}),d&&(0,b.jsxs)(u.Z,{pl:1,children:["string"===typeof d&&(0,b.jsx)(a.ZP,{disabled:i,lineThrough:i,monospace:Z,small:S,xsmall:E,children:d}),"string"!==typeof d&&d,p&&(0,b.jsx)(a.ZP,{muted:!0,small:!0,children:p})]})]}),(c||k&&k.touched&&k.error)&&(0,b.jsx)(j,{children:(0,b.jsx)(a.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):k.error})})]})}},70814:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return D}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),l=t.n(c),u=t(60547),a=t(41788),d=t(82684),s=t(60328),p=t(38341),f=t(67971),b=t(86673),h=t(82944),v=t(11366),g=t(49125),m=t(91427),j=t(90211),O=t(28598);function x(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 y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=function(e){var n=e.isPipelineUpdating,t=e.pipeline,r=e.updatePipeline,i=null===t||void 0===t?void 0:t.uuid,c=(0,d.useMemo)((function(){return(null===t||void 0===t?void 0:t.blocks)||[]}),[t]),l=(0,d.useState)((null===t||void 0===t?void 0:t.name)||""),u=l[0],a=l[1],x="".concat(v.g6,"_").concat(i),k=(0,d.useState)({}),w=k[0],Z=k[1],P=(0,d.useCallback)((function(e){Z((function(n){var t=e(n);return(0,m.t8)(x,JSON.stringify(t)),t}))}),[x,Z]);(0,d.useEffect)((function(){var e=(0,m.U2)(x);e&&(0,j.Pb)(e)&&Z(JSON.parse(e))}),[x,Z]);var _=(0,d.useMemo)((function(){return(null===c||void 0===c?void 0:c.filter((function(e){var n=e.uuid;return!(null===w||void 0===w||!w[n])}))).length===c.length}),[c,w]);return(0,O.jsxs)(b.Z,{p:g.cd,children:[(0,O.jsx)(h.Z,{label:"Pipeline name",onChange:function(e){return a(e.target.value)},primary:!0,required:!0,setContentOnMount:!0,value:u}),(0,O.jsx)(b.Z,{mt:5,children:(0,O.jsx)(f.Z,{children:(0,O.jsx)(s.Z,{disabled:u===(null===t||void 0===t?void 0:t.name),loading:n,onClick:function(){return r({name:u})},primary:!0,children:"Save pipeline settings"})})}),(0,O.jsx)(b.Z,{mt:5,children:(0,O.jsx)(p.Z,{checked:_,label:"Hide all blocks in notebook",onClick:function(){return P((function(){return _?{}:null===c||void 0===c?void 0:c.reduce((function(e,n){var t=n.uuid;return y(y({},e),{},(0,o.Z)({},t,!0))}),{})}))}})})]})},w=t(82531),Z=t(59920),P=t(83455),_=t(96510);function C(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?C(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function I(e){var n=e.pipeline,t=null===n||void 0===n?void 0:n.uuid,r=w.ZP.pipelines.detail(t).data,o=S(S({},null===r||void 0===r?void 0:r.pipeline),n),c=(0,P.Db)(w.ZP.pipelines.useUpdate(t,{update_content:!0}),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(e){if(null!==e&&void 0!==e&&e.pipeline){var n=e.pipeline.uuid;t!==n&&(window.location.href="/pipelines/".concat(n,"/settings"))}},onErrorCallback:function(e,n){return console.log({errors:n,response:e})}})}}),l=(0,i.Z)(c,2),a=l[0],d=l[1].isLoading;return(0,O.jsx)(u.Z,{breadcrumbs:[{label:function(){return"Settings"}}],pageName:Z.M.SETTINGS,pipeline:o,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(Z.M.SETTINGS,"_").concat(t),children:r&&(0,O.jsx)(k,{isPipelineUpdating:d,pipeline:o,updatePipeline:function(e){return a({pipeline:e})}})})}I.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t;return l().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 D=(0,a.Z)(I)},11366:function(e,n,t){"use strict";t.d(n,{H8:function(){return i},g6:function(){return o},kY:function(){return r}});var r="automatically_name_blocks",i="pipeline_edit_before_tab_selected",o="pipeline_edit_hidden_blocks"},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(70814)}])}},function(e){e.O(0,[3850,5716,2344,4506,6166,6214,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{1210:function(e,n,r){"use strict";r.d(n,{Z:function(){return I}});var t=r(82394),i=r(21831),o=r(82684),l=r(47999),c=r(28358),u=r(93461),s=r(57384),d=r(12344),a=r(72454),f=r(28598);function v(e,n){var r=e.children;return(0,f.jsx)(a.HS,{ref:n,children:r})}var p=o.forwardRef(v),m=r(32063),h=r(15270),b=r(82531),j=r(66166),x=r(3055),g=r(49125),Z=r(91427),y=r(24141);function O(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function k(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?O(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var I=function(e){var n,r=e.after,t=e.afterHidden,v=e.afterWidth,O=e.afterWidthOverride,I=e.before,P=e.beforeWidth,_=e.breadcrumbs,w=e.children,N=e.errors,E=e.headerMenuItems,M=e.navigationItems,S=e.setErrors,C=e.subheaderChildren,D=e.title,A=e.uuid,L=(0,y.i)().width,V="dashboard_after_width_".concat(A),R="dashboard_before_width_".concat(A),T=(0,o.useRef)(null),F=(0,o.useState)(O?v:(0,Z.U2)(V,v)),U=F[0],B=F[1],z=(0,o.useState)(!1),W=z[0],G=z[1],H=(0,o.useState)(I?Math.max((0,Z.U2)(R,P),13*g.iI):null),Y=H[0],J=H[1],X=(0,o.useState)(!1),q=X[0],K=X[1],Q=(0,o.useState)(null)[1],$=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];_?ne.push.apply(ne,(0,i.Z)(_)):(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 D}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||W||q||null===Q||void 0===Q||Q(T.current.getBoundingClientRect().width)}),[W,U,q,Y,T,Q,L]),(0,o.useEffect)((function(){W||(0,Z.t8)(V,U)}),[t,W,U,V]),(0,o.useEffect)((function(){q||(0,Z.t8)(R,Y)}),[q,Y,R]);var re=(0,j.Z)(v);return(0,o.useEffect)((function(){O&&re!==v&&B(v)}),[O,v,re]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:D}),(0,f.jsx)(d.Z,{breadcrumbs:ne,menuItems:E,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)(a.Nk,{children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,f.jsx)(a.lm,{children:(0,f.jsx)(h.Z,{navigationItems:M})}),(0,f.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:r,afterHeightOffset:x.Mz,afterHidden:t,afterMousedownActive:W,afterWidth:U,before:I,beforeHeightOffset:x.Mz,beforeMousedownActive:q,beforeWidth:a.k1+(I?Y:0),hideAfterCompletely:!0,leftOffset:I?a.k1:null,mainContainerRef:T,setAfterMousedownActive:G,setAfterWidth:B,setBeforeMousedownActive:K,setBeforeWidth:J,children:[C&&(0,f.jsx)(p,{children:C}),w]})})]}),N&&(0,f.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===S||void 0===S?void 0:S(null)},children:(0,f.jsx)(c.Z,k(k({},N),{},{onClose:function(){return null===S||void 0===S?void 0:S(null)}}))})]})}},60547:function(e,n,r){"use strict";r.d(n,{Z:function(){return I}});var t=r(82394),i=r(21831),o=r(82684),l=r(47999),c=r(1210),u=r(34744),s=r(28358),d=r(67971),a=r(87372),f=r(86673),v=r(82531),p=r(9518),m=r(23831),h=r(73942),b=r(49125),j=p.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],h.n_,3*b.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||m.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),x=r(3055),g=r(95354),Z=r(24141),y=r(28598);function O(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function k(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?O(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var I=function(e){var n=e.after,r=e.afterHidden,t=e.afterWidth,p=e.before,m=e.beforeWidth,h=e.breadcrumbs,O=e.buildSidekick,I=e.children,P=e.errors,_=e.headline,w=e.pageName,N=e.pipeline,E=e.setErrors,M=e.subheader,S=e.subheaderBackground,C=e.subheaderBackgroundImage,D=e.subheaderButton,A=e.subheaderText,L=e.title,V=e.uuid,R=(0,Z.i)().height,T=N.uuid,F=v.ZP.pipelines.detail(T,{includes_outputs:!1},{revalidateOnFocus:!1}).data,U=null===F||void 0===F?void 0:F.pipeline,B=(0,o.useMemo)((function(){return n||(O?O({height:R,heightOffset:x.Mz,pipeline:U}):null)}),[n,O,R,U]),z=t||(B?50*b.iI:null),W=(0,o.useMemo)((function(){var e=[];return U&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),h?(e.push({label:function(){return U.uuid},linkProps:{as:"/pipelines/".concat(T,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(h)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return U.name}})),e}),[h,U,T]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(c.Z,{after:B,afterHidden:r,afterWidth:z,before:p,beforeWidth:m,breadcrumbs:W,navigationItems:(0,g.H)(w,U),subheaderChildren:"undefined"!==typeof M&&M,title:U?L?L(U):U.name:null,uuid:V,children:[(D||A)&&(0,y.jsx)(f.Z,{mb:b.Mq,mt:b.cd,mx:b.cd,children:(0,y.jsx)(j,{background:S,backgroundImage:C,children:(0,y.jsxs)(d.Z,{alignItems:"center",children:[D,A&&(0,y.jsx)(f.Z,{ml:3}),A]})})}),_&&(0,y.jsx)(f.Z,{p:b.cd,children:(0,y.jsxs)(f.Z,{mt:b.cd,px:b.cd,children:[(0,y.jsx)(a.Z,{level:5,children:_}),(0,y.jsx)(u.Z,{light:!0,mt:b.cd,short:!0})]})}),I]}),P&&(0,y.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,y.jsx)(s.Z,k(k({},P),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},66050:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running"}(t||(t={}))},47409:function(e,n,r){"use strict";r.d(n,{D:function(){return l},V:function(){return o}});var t,i=r(82394),o=r(66050).V,l=(t={},(0,i.Z)(t,o.CANCELLED,"Cancelled"),(0,i.Z)(t,o.COMPLETED,"Done"),(0,i.Z)(t,o.FAILED,"Failed"),(0,i.Z)(t,o.INITIAL,"Ready"),(0,i.Z)(t,o.RUNNING,"Running"),t)},89745:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return oe}});var t=r(77837),i=r(38860),o=r.n(i),l=r(82684),c=r(60547),u=r(41788),s=r(75582),d=r(82394),a=r(93461),f=r(67971),v=r(87372),p=r(47409),m=r(86673),h=r(54283),b=r(19711),j=r(23831),x=r(10503),g=r(9518),Z=r(73942),y=r(2005),O=r(49125),k=r(31012),I=g.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,O.cd*O.iI,(function(e){return"\n background-color: ".concat((e.theme.background||j.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||j.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||j.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||j.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).warning,";\n ")})),P=(0,g.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||j.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||j.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).warning,";\n ")})),_=g.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],P,k.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||j.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||j.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||j.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||j.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||j.Z.content).inverted,";\n ")})),w=g.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],P,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||j.Z.interactive).focusBackground,";\n ")})),N=r(90211),E=r(92083),M=r.n(E),S=r(66050),C=r(24224);function D(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function A(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},d=(null===e||void 0===e?void 0:e.block_runs)||[],a=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=L(e);return Object.entries(a).forEach((function(e){var n,r=(0,s.Z)(e,2),d=r[0],a=r[1];if(!t||t===d){var p,m=a||{},h=m.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,j=m.sources,x=void 0===j?{records:null}:j,g=v[d]||[];if(t&&t===d&&g.every((function(e){var n=e.status;return S.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[d])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[d])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==b&&void 0!==b&&b.records_updated?(null===l&&(l=0),l+=Number(b.records_updated),null===c&&(c=0),c+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===l&&(l=0),l+=Number(b.records_inserted),null===o&&(o=0),o+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===l&&(l=0),l+=Number(b.records_affected)),["destinations","sources"].forEach((function(e){var n=a[e]||{};null!==n&&void 0!==n&&n.error&&(u[d]||(u[d]={}),u[d][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===d||void 0===d||d.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(S.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function L(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),i=(t[0],t[1]);t[2];r[i]||(r[i]=[]),r[i].push(e)})),r}function V(e){var n=L(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return S.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,r=e.started_at,t=M().utc(n),i=M().utc(r);return t.diff(i,"second")})),c=o.length,u=i.length;r[t]={completed:c,runtime:l.length>=1?(0,C.Sm)(l)/l.length:null,total:u}})),r}function R(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return S.V.COMPLETED===n}))}(e).length||0;return t/r}function T(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,i=e.status;if(null===t||void 0===t||!t.length)return 0;var o=M().utc();if(n)o=M().utc(n);else if([p.V.CANCELLED,p.V.FAILED].includes(i)){var l=(0,C.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];o=M().utc(l.updated_at)}var c=M().utc(e.created_at);return o.diff(c,"second")}function F(e,n){var r,t,i,o,l,c=L(e),u=V(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},f=(d[n],a[n],u[n]||{completed:null,total:null}),v=f.completed,p=f.total,m=v&&p?v/p:0,h=c[n]||[],b=h.every((function(e){var n=e.status;return S.V.COMPLETED===n})),j=(0,C.YC)(h,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,C.YC)(h,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;b?t=null===(l=(0,C.YC)(h,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:j&&(o=null===j||void 0===j?void 0:j.updated_at);var g=b?M().utc(t||o):M().utc(),Z=M().utc(x);return{completed:v,completedAt:t,done:b,progress:m,runtime:i=g.diff(Z,"second"),startedAt:x,status:null===j||void 0===j?void 0:j.status,timeText:(0,N.zf)(i),total:p,updatedAt:o}}var U=r(28598);function B(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function z(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?B(Object(r),!0).forEach((function(n){(0,d.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var W=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,i=(r.block_runs,r.created_at),o=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),d=c.destination,g=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return A(r)}),[r]),k=y.errors,P=y.records,E=y.recordsProcessed,M=(0,l.useMemo)((function(){return R(r)}),[r]),S=(0,l.useMemo)((function(){return[p.V.COMPLETED].includes(o)}),[o]),C=(0,l.useMemo)((function(){return{danger:p.V.FAILED===o,default:p.V.INITIAL===o,primary:p.V.RUNNING===o,success:S,warning:p.V.CANCELLED===o}}),[S,o]),D=(0,l.useMemo)((function(){if(r){var e=T(r);return(0,N.zf)(e)}}),[r]);return(0,U.jsx)(I,z(z({},C),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,U.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,U.jsx)(w,z({},C)),(0,U.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(m.Z,{ml:3,py:3,children:[(0,U.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,U.jsx)(m.Z,{fullWidth:!1,mt:2,children:(0,U.jsx)(_,z(z({},C),{},{children:(0,U.jsxs)(f.Z,{alignItems:"center",children:[S&&(0,U.jsx)(x.Jr,{inverted:!0,size:2*O.iI}),[p.V.INITIAL,p.V.RUNNING].includes(o)&&(0,U.jsx)(h.Z,{color:p.V.INITIAL!==o?j.Z.monotone.white:null,inverted:p.V.INITIAL===o,small:!0}),"\xa0",p.V.RUNNING===o&&(0,U.jsxs)(U.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![p.V.INITIAL,p.V.RUNNING].includes(o)&&p.D[o],p.V.INITIAL===o&&"Starting"]})}))}),Object.values(k).length>=1&&(0,U.jsx)(m.Z,{mt:1,children:Object.entries(k).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,U.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,U.jsxs)(a.Z,{flex:1,children:[(0,U.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(m.Z,{ml:3,py:3,children:[(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,U.jsx)(b.ZP,{monospace:!0,children:E>=1?(0,N.x6)(E):"-"})]}),(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,U.jsx)(b.ZP,{monospace:!0,children:P>=1&&P>=E?(0,N.x6)(P-E):"-"})]}),p.V.RUNNING!==o&&(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,U.jsx)(b.ZP,{monospace:!0,children:D})]})]})}),(0,U.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(m.Z,{ml:3,py:3,children:[(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,U.jsx)(b.ZP,{monospace:!0,children:g||"-"})]}),(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,U.jsx)(b.ZP,{monospace:!0,children:d||"-"})]}),(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,U.jsx)(b.ZP,{monospace:!0,children:Z>=1?(0,N.x6)(Z):"-"})]})]})})]})]})}))},G=r(89565),H=r.n(G),Y=r(34376),J=r(60328),X=r(10919),q=r(58180),K=g.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*O.iI,"px;\n ")})),Q=r(66653);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,i=(0,Y.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],d=(0,l.useState)(null),a=d[0],h=d[1],j=(0,l.useMemo)((function(){return r?L(r):{}}),[r]),g=(0,l.useMemo)((function(){return r?V(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(g).forEach((function(t){var i=(0,s.Z)(t,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?r.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,C.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,i=n.total;e+=t*(i-r)})),e}),[g]),y=(0,l.useMemo)((function(){return t?g[t]:null}),[g,t]),k=(0,l.useMemo)((function(){if(t&&g){var e=g[t]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(r)return R(r);return 0}),[y,r,t]),I=(0,l.useMemo)((function(){return(0,U.jsx)(f.Z,{children:(0,C.w6)(101).map((function(e,n){return(0,U.jsx)(K,{even:n%2===0,fill:k>0&&Math.round(100*k)>=n},n)}))})}),[k]),P=(0,l.useMemo)((function(){if(t){var e=j[t]||[],n=e.every((function(e){var n=e.status;return S.V.COMPLETED===n})),i=(0,C.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([S.V.CANCELLED,S.V.FAILED].includes(o))return p.D[o];if(u&&s>=1){var d=Math.ceil(u*(s-c)/60);return"".concat((0,N._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.V.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([p.V.CANCELLED,p.V.FAILED].includes(null===r||void 0===r?void 0:r.status))return p.D[null===r||void 0===r?void 0:r.status];if(p.V.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var a=Math.ceil(Z/60);return"".concat((0,N._6)("minute",a,!0)," to completion")}return"Select a sync"}),[j,Z,y,r,t]),_=(0,l.useMemo)((function(){return r&&t?F(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=T(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&_){var n=(null===_||void 0===_?void 0:_.runtime)||0;h(n),e=setInterval((function(){return h((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,_]);var w=(0,l.useMemo)((function(){if(r){if(t)return null===_||void 0===_?void 0:_.timeText;var e=T(r);return(0,N.zf)(e)}}),[r,t,_]),E=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),M=(0,l.useMemo)((function(){var e=Math.floor(a%86400/3600),n=Math.floor(a%3600/60),r=Math.floor(a%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[a]),B=(0,l.useMemo)((function(){return r?A(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),z=B.errors,W=B.records,G=B.recordsInserted,$=B.recordsProcessed,ee=B.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?A(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:W,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:G,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,N.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===r?"-":(0,N.x6)(r)}):null!==n?o.push({label:"Rows inserted",value:(0,N.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,N.x6)(i)}),o.map((function(e){var n=e.label,r=e.value;return(0,U.jsxs)("div",{children:[(0,U.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,U.jsx)(b.ZP,{headline:!0,children:r})]},n)}))}),[W,ne,G,$,ee,w,E,status]),te=(0,l.useMemo)((function(){if(!r)return(0,U.jsx)("div",{});var e=D(r);return(0,U.jsx)(q.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=F(r,e),t=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,d=(n.total,!!z[e]);return[(0,U.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:e},"stream"),(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,U.jsx)(b.ZP,{default:!0,children:[S.V.INITIAL,S.V.RUNNING].includes(u)?"-":s},"runtime"),(0,U.jsxs)("div",{children:[o&&(0,U.jsx)(x.Jr,{default:!0,size:2*O.iI}),!o&&(0,U.jsx)(f.Z,{children:(0,C.w6)(51).map((function(e,n){return(0,U.jsx)(K,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,U.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,U.jsx)(x.B4,{default:!0,size:2*O.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[z,g,r,t]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,d;if(r&&t){var a=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===a||void 0===a||null===(e=a.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[t],v=null===a||void 0===a||null===(o=a.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(d=u.bookmarks)||void 0===d?void 0:d[t];if(f||v){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),m=[];p.forEach((function(e){var n=[(0,U.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,U.jsx)(b.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),m.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",f],[null===a||void 0===a?void 0:a.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&h.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(q.Z,{columnFlex:[null,1,1],columns:h,rows:m,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,a=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(d||a){var f=Object.keys(a||d||{}).sort(),v=[];f.forEach((function(e){var n=[(0,U.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[d,a].forEach((function(r,t){if(r){var i=r[e],o="object"===typeof i;n.push((0,U.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,U.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",d],[null===u||void 0===u?void 0:u.destination,"destination",a]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(q.Z,{columnFlex:[null,1,1],columns:p,rows:v.map((function(e){return e.map((function(e){return(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(m.Z,{p:3,children:[t&&(0,U.jsx)(m.Z,{mb:3,children:(0,U.jsxs)(f.Z,{alignItems:"center",children:[(0,U.jsx)(X.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,U.jsxs)(f.Z,{alignItems:"center",children:[(0,U.jsx)(x.Xd,{default:!0,size:1.5*O.iI}),(0,U.jsx)(m.Z,{mr:1}),(0,U.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,U.jsx)(m.Z,{mx:1,children:(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,U.jsx)(b.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,U.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(m.Z,{mr:2,my:1,children:(0,U.jsx)(v.Z,{level:5,muted:!r,children:P})}),r&&(0,U.jsx)(J.Z,{onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,U.jsx)(m.Z,{mt:2,children:I}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(m.Z,{mt:3,children:(0,U.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,U.jsxs)(b.ZP,{headline:!0,children:[t&&[S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&M,t&&![S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&(null===_||void 0===_?void 0:_.timeText),!t&&[p.V.INITIAL,p.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&E,!t&&![p.V.INITIAL,p.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w]})]}),re]})}),Object.values(z).length>=1&&(0,U.jsxs)(m.Z,{mt:3,children:[(0,U.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(z).map((function(e,n){var r=(0,s.Z)(e,2),i=r[0],o=r[1];return(!t||t===i)&&(0,U.jsx)(m.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],o=t.error,l=t.errors,c=t.message,u=Array.isArray(o)?o.join(" "):o;return(0,U.jsxs)("div",{children:[(0,U.jsx)(m.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,U.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!r&&(0,U.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,U.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,U.jsx)(H(),{children:u})})]})}),(0,U.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,U.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(r))}))},i)}))]})]})]}),r&&!t&&(0,U.jsx)(m.Z,{my:3,children:te}),r&&t&&(0,U.jsxs)(U.Fragment,{children:[le&&(0,U.jsx)(m.Z,{my:3,children:(0,U.jsxs)(m.Z,{px:3,children:[(0,U.jsx)(v.Z,{level:5,children:"Table name"}),(0,U.jsx)(m.Z,{mt:1,children:(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,U.jsxs)(m.Z,{my:3,children:[(0,U.jsx)(m.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,U.jsx)(m.Z,{px:1,children:ie})]}),oe&&(0,U.jsxs)(m.Z,{my:3,children:[(0,U.jsx)(m.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,U.jsx)(m.Z,{px:1,children:oe})]})]})]})},ee=r(82531),ne=r(59920),re=r(33766),te=r(59e3);function ie(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),o=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],d=u[1],a=(0,l.useState)(null),f=a[0],v=a[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?v(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):f&&v(null),null!==o&&void 0!==o&&o.stream?d(o.stream):s&&d(null)}),[i,o,f,s]);var p=(0,l.useCallback)((function(){var e=f?D(f):[];return(0,U.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:s===r?null:r})},pipelineRun:f,selectedStream:s})}),[f,s]),m=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");f&&(e="".concat(e,"?pipeline_run_id=").concat(f.id));var n=[{label:function(){return"Syncs"},linkProps:s?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return s&&n.push({label:function(){return s}}),n}),[r,f,s]);return(0,U.jsx)(c.Z,{breadcrumbs:m,buildSidekick:p,pageName:ne.M.SYNCS,pipeline:n,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:i.map((function(e){var n=(null===f||void 0===f?void 0:f.id)===e.id;return(0,U.jsx)(W,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,r){"use strict";r.d(n,{g_:function(){return f},u7:function(){return a}});var t=r(75582),i=r(82394),o=r(34376),l=r.n(o),c=r(59e3),u=r(24224);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.replaceParams,o=r.pushHistory,u=i?{}:(0,c.iV)();n=window.location.pathname;var s=o?l().push:l().replace,a=d(d({},u),e);Object.entries(e).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete a[r]}));var f=(0,c.uM)(a);f.length>=1&&(f="?".concat(f));var v="".concat(n.split("?")[0]).concat(f);return s(l().router.pathname,v,{shallow:!0})}function f(e,n,r){var i=r.addingMultipleValues,o=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,f=r.resetLimitParams,v=d({},e);i?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(r,"[]");v[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1],o=String(i),l="".concat(r,"[]"),c=v[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?v[l]=(0,u.Od)(c,(function(e){return e===o})):v[l]=c.concat(o):v[l]=[o]})):v=d(d({},v),n),f&&(v._limit=l||20,v._offset=0),a(v,{pushHistory:s})}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(e){e.O(0,[3850,2083,9565,2344,4506,6166,8180,6214,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{1210:function(e,n,r){"use strict";r.d(n,{Z:function(){return I}});var t=r(82394),i=r(21831),o=r(82684),l=r(47999),c=r(49894),u=r(93461),s=r(57384),d=r(12344),a=r(72454),f=r(28598);function v(e,n){var r=e.children;return(0,f.jsx)(a.HS,{ref:n,children:r})}var p=o.forwardRef(v),m=r(32063),h=r(15270),b=r(82531),j=r(66166),x=r(3055),g=r(49125),Z=r(91427),y=r(24141);function O(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function k(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?O(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var I=function(e){var n,r=e.after,t=e.afterHidden,v=e.afterWidth,O=e.afterWidthOverride,I=e.before,P=e.beforeWidth,_=e.breadcrumbs,w=e.children,N=e.errors,E=e.headerMenuItems,M=e.navigationItems,S=e.setErrors,C=e.subheaderChildren,D=e.title,A=e.uuid,L=(0,y.i)().width,V="dashboard_after_width_".concat(A),R="dashboard_before_width_".concat(A),T=(0,o.useRef)(null),F=(0,o.useState)(O?v:(0,Z.U2)(V,v)),U=F[0],B=F[1],z=(0,o.useState)(!1),W=z[0],G=z[1],H=(0,o.useState)(I?Math.max((0,Z.U2)(R,P),13*g.iI):null),Y=H[0],J=H[1],X=(0,o.useState)(!1),q=X[0],K=X[1],Q=(0,o.useState)(null)[1],$=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,ne=[];_?ne.push.apply(ne,(0,i.Z)(_)):(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 D}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||W||q||null===Q||void 0===Q||Q(T.current.getBoundingClientRect().width)}),[W,U,q,Y,T,Q,L]),(0,o.useEffect)((function(){W||(0,Z.t8)(V,U)}),[t,W,U,V]),(0,o.useEffect)((function(){q||(0,Z.t8)(R,Y)}),[q,Y,R]);var re=(0,j.Z)(v);return(0,o.useEffect)((function(){O&&re!==v&&B(v)}),[O,v,re]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.Z,{title:D}),(0,f.jsx)(d.Z,{breadcrumbs:ne,menuItems:E,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)(a.Nk,{children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,f.jsx)(a.lm,{children:(0,f.jsx)(h.Z,{navigationItems:M})}),(0,f.jsx)(u.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:r,afterHeightOffset:x.Mz,afterHidden:t,afterMousedownActive:W,afterWidth:U,before:I,beforeHeightOffset:x.Mz,beforeMousedownActive:q,beforeWidth:a.k1+(I?Y:0),hideAfterCompletely:!0,leftOffset:I?a.k1:null,mainContainerRef:T,setAfterMousedownActive:G,setAfterWidth:B,setBeforeMousedownActive:K,setBeforeWidth:J,children:[C&&(0,f.jsx)(p,{children:C}),w]})})]}),N&&(0,f.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===S||void 0===S?void 0:S(null)},children:(0,f.jsx)(c.Z,k(k({},N),{},{onClose:function(){return null===S||void 0===S?void 0:S(null)}}))})]})}},60547:function(e,n,r){"use strict";r.d(n,{Z:function(){return I}});var t=r(82394),i=r(21831),o=r(82684),l=r(47999),c=r(1210),u=r(34744),s=r(49894),d=r(67971),a=r(87372),f=r(86673),v=r(82531),p=r(9518),m=r(23831),h=r(73942),b=r(49125),j=p.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],h.n_,3*b.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||m.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),x=r(3055),g=r(95354),Z=r(24141),y=r(28598);function O(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function k(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?O(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var I=function(e){var n=e.after,r=e.afterHidden,t=e.afterWidth,p=e.before,m=e.beforeWidth,h=e.breadcrumbs,O=e.buildSidekick,I=e.children,P=e.errors,_=e.headline,w=e.pageName,N=e.pipeline,E=e.setErrors,M=e.subheader,S=e.subheaderBackground,C=e.subheaderBackgroundImage,D=e.subheaderButton,A=e.subheaderText,L=e.title,V=e.uuid,R=(0,Z.i)().height,T=N.uuid,F=v.ZP.pipelines.detail(T,{includes_outputs:!1},{revalidateOnFocus:!1}).data,U=null===F||void 0===F?void 0:F.pipeline,B=(0,o.useMemo)((function(){return n||(O?O({height:R,heightOffset:x.Mz,pipeline:U}):null)}),[n,O,R,U]),z=t||(B?50*b.iI:null),W=(0,o.useMemo)((function(){var e=[];return U&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),h?(e.push({label:function(){return U.uuid},linkProps:{as:"/pipelines/".concat(T,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(h)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return U.name}})),e}),[h,U,T]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(c.Z,{after:B,afterHidden:r,afterWidth:z,before:p,beforeWidth:m,breadcrumbs:W,navigationItems:(0,g.H)(w,U),subheaderChildren:"undefined"!==typeof M&&M,title:U?L?L(U):U.name:null,uuid:V,children:[(D||A)&&(0,y.jsx)(f.Z,{mb:b.Mq,mt:b.cd,mx:b.cd,children:(0,y.jsx)(j,{background:S,backgroundImage:C,children:(0,y.jsxs)(d.Z,{alignItems:"center",children:[D,A&&(0,y.jsx)(f.Z,{ml:3}),A]})})}),_&&(0,y.jsx)(f.Z,{p:b.cd,children:(0,y.jsxs)(f.Z,{mt:b.cd,px:b.cd,children:[(0,y.jsx)(a.Z,{level:5,children:_}),(0,y.jsx)(u.Z,{light:!0,mt:b.cd,short:!0})]})}),I]}),P&&(0,y.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,y.jsx)(s.Z,k(k({},P),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},66050:function(e,n,r){"use strict";var t;r.d(n,{V:function(){return t}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running"}(t||(t={}))},47409:function(e,n,r){"use strict";r.d(n,{D:function(){return l},V:function(){return o}});var t,i=r(82394),o=r(66050).V,l=(t={},(0,i.Z)(t,o.CANCELLED,"Cancelled"),(0,i.Z)(t,o.COMPLETED,"Done"),(0,i.Z)(t,o.FAILED,"Failed"),(0,i.Z)(t,o.INITIAL,"Ready"),(0,i.Z)(t,o.RUNNING,"Running"),t)},89745:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return oe}});var t=r(77837),i=r(38860),o=r.n(i),l=r(82684),c=r(60547),u=r(41788),s=r(75582),d=r(82394),a=r(93461),f=r(67971),v=r(87372),p=r(47409),m=r(86673),h=r(54283),b=r(19711),j=r(23831),x=r(10503),g=r(9518),Z=r(73942),y=r(2005),O=r(49125),k=r(31012),I=g.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,O.cd*O.iI,(function(e){return"\n background-color: ".concat((e.theme.background||j.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||j.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||j.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||j.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||j.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||j.Z.accent).warning,";\n ")})),P=(0,g.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||j.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||j.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||j.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).warning,";\n ")})),_=g.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],P,k.iD,Z.D7,y.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||j.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||j.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||j.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||j.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||j.Z.content).inverted,";\n ")})),w=g.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],P,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||j.Z.interactive).focusBackground,";\n ")})),N=r(90211),E=r(92083),M=r.n(E),S=r(66050),C=r(24224);function D(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function A(e){var n,r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},d=(null===e||void 0===e?void 0:e.block_runs)||[],a=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},f=(null===e||void 0===e||null===(r=e.metrics)||void 0===r?void 0:r.pipeline)||{},v=L(e);return Object.entries(a).forEach((function(e){var n,r=(0,s.Z)(e,2),d=r[0],a=r[1];if(!t||t===d){var p,m=a||{},h=m.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,j=m.sources,x=void 0===j?{records:null}:j,g=v[d]||[];if(t&&t===d&&g.every((function(e){var n=e.status;return S.V.COMPLETED===n}))&&null===i&&(i=0),null!==f&&void 0!==f&&null!==(n=f[d])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===f||void 0===f||null===(p=f[d])||void 0===p?void 0:p.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==b&&void 0!==b&&b.records_updated?(null===l&&(l=0),l+=Number(b.records_updated),null===c&&(c=0),c+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===l&&(l=0),l+=Number(b.records_inserted),null===o&&(o=0),o+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===l&&(l=0),l+=Number(b.records_affected)),["destinations","sources"].forEach((function(e){var n=a[e]||{};null!==n&&void 0!==n&&n.error&&(u[d]||(u[d]={}),u[d][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===d||void 0===d||d.forEach((function(e){var n=e.block_uuid,r=e.metrics,t=e.status;if(S.V.FAILED===t&&null!==r&&void 0!==r&&r.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=r.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function L(e){var n=e.block_runs,r={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),t=(0,s.Z)(n,3),i=(t[0],t[1]);t[2];r[i]||(r[i]=[]),r[i].push(e)})),r}function V(e){var n=L(e),r={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),t=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return S.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,r=e.started_at,t=M().utc(n),i=M().utc(r);return t.diff(i,"second")})),c=o.length,u=i.length;r[t]={completed:c,runtime:l.length>=1?(0,C.Sm)(l)/l.length:null,total:u}})),r}function R(e){var n=e.block_runs,r=(null===n||void 0===n?void 0:n.length)||1,t=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return S.V.COMPLETED===n}))}(e).length||0;return t/r}function T(e){var n=e.completed_at,r=e.block_runs,t=void 0===r?[]:r,i=e.status;if(null===t||void 0===t||!t.length)return 0;var o=M().utc();if(n)o=M().utc(n);else if([p.V.CANCELLED,p.V.FAILED].includes(i)){var l=(0,C.YC)(t,(function(e){return e.started_at}),{ascending:!1})[0];o=M().utc(l.updated_at)}var c=M().utc(e.created_at);return o.diff(c,"second")}function F(e,n){var r,t,i,o,l,c=L(e),u=V(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},f=(d[n],a[n],u[n]||{completed:null,total:null}),v=f.completed,p=f.total,m=v&&p?v/p:0,h=c[n]||[],b=h.every((function(e){var n=e.status;return S.V.COMPLETED===n})),j=(0,C.YC)(h,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(r=(0,C.YC)(h,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===r?void 0:r.started_at;b?t=null===(l=(0,C.YC)(h,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:j&&(o=null===j||void 0===j?void 0:j.updated_at);var g=b?M().utc(t||o):M().utc(),Z=M().utc(x);return{completed:v,completedAt:t,done:b,progress:m,runtime:i=g.diff(Z,"second"),startedAt:x,status:null===j||void 0===j?void 0:j.status,timeText:(0,N.zf)(i),total:p,updatedAt:o}}var U=r(28598);function B(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function z(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?B(Object(r),!0).forEach((function(n){(0,d.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var W=function(e){var n=e.onSelect,r=e.pipelineRun,t=e.selected,i=(r.block_runs,r.created_at),o=r.status,c=(0,l.useMemo)((function(){return(null===r||void 0===r?void 0:r.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[r]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),d=c.destination,g=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,l.useMemo)((function(){return A(r)}),[r]),k=y.errors,P=y.records,E=y.recordsProcessed,M=(0,l.useMemo)((function(){return R(r)}),[r]),S=(0,l.useMemo)((function(){return[p.V.COMPLETED].includes(o)}),[o]),C=(0,l.useMemo)((function(){return{danger:p.V.FAILED===o,default:p.V.INITIAL===o,primary:p.V.RUNNING===o,success:S,warning:p.V.CANCELLED===o}}),[S,o]),D=(0,l.useMemo)((function(){if(r){var e=T(r);return(0,N.zf)(e)}}),[r]);return(0,U.jsx)(I,z(z({},C),{},{onClick:function(){return n(t?null:r.id)},selected:t,children:(0,U.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,U.jsx)(w,z({},C)),(0,U.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(m.Z,{ml:3,py:3,children:[(0,U.jsx)(v.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,U.jsx)(m.Z,{fullWidth:!1,mt:2,children:(0,U.jsx)(_,z(z({},C),{},{children:(0,U.jsxs)(f.Z,{alignItems:"center",children:[S&&(0,U.jsx)(x.Jr,{inverted:!0,size:2*O.iI}),[p.V.INITIAL,p.V.RUNNING].includes(o)&&(0,U.jsx)(h.Z,{color:p.V.INITIAL!==o?j.Z.monotone.white:null,inverted:p.V.INITIAL===o,small:!0}),"\xa0",p.V.RUNNING===o&&(0,U.jsxs)(U.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![p.V.INITIAL,p.V.RUNNING].includes(o)&&p.D[o],p.V.INITIAL===o&&"Starting"]})}))}),Object.values(k).length>=1&&(0,U.jsx)(m.Z,{mt:1,children:Object.entries(k).map((function(e,n){var r=(0,s.Z)(e,2),t=r[0];r[1];return(0,U.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[t," stream failed"]},t)}))})]})}),(0,U.jsxs)(a.Z,{flex:1,children:[(0,U.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(m.Z,{ml:3,py:3,children:[(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,U.jsx)(b.ZP,{monospace:!0,children:E>=1?(0,N.x6)(E):"-"})]}),(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,U.jsx)(b.ZP,{monospace:!0,children:P>=1&&P>=E?(0,N.x6)(P-E):"-"})]}),p.V.RUNNING!==o&&(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,U.jsx)(b.ZP,{monospace:!0,children:D})]})]})}),(0,U.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,U.jsxs)(m.Z,{ml:3,py:3,children:[(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,U.jsx)(b.ZP,{monospace:!0,children:g||"-"})]}),(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,U.jsx)(b.ZP,{monospace:!0,children:d||"-"})]}),(0,U.jsxs)(m.Z,{mb:1,children:[(0,U.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,U.jsx)(b.ZP,{monospace:!0,children:Z>=1?(0,N.x6)(Z):"-"})]})]})})]})]})}))},G=r(89565),H=r.n(G),Y=r(34376),J=r(60328),X=r(10919),q=r(58180),K=g.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||j.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*O.iI,"px;\n ")})),Q=r(66653);var $=function(e){var n=e.onClickRow,r=e.pipelineRun,t=e.selectedStream,i=(0,Y.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],d=(0,l.useState)(null),a=d[0],h=d[1],j=(0,l.useMemo)((function(){return r?L(r):{}}),[r]),g=(0,l.useMemo)((function(){return r?V(r):{}}),[r]),Z=(0,l.useMemo)((function(){var e=0,n=[],r=[];if(Object.entries(g).forEach((function(t){var i=(0,s.Z)(t,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?r.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var t=(0,C.Sm)(n)/n.length;return r.forEach((function(n){var r=n.completed,i=n.total;e+=t*(i-r)})),e}),[g]),y=(0,l.useMemo)((function(){return t?g[t]:null}),[g,t]),k=(0,l.useMemo)((function(){if(t&&g){var e=g[t]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(r)return R(r);return 0}),[y,r,t]),I=(0,l.useMemo)((function(){return(0,U.jsx)(f.Z,{children:(0,C.w6)(101).map((function(e,n){return(0,U.jsx)(K,{even:n%2===0,fill:k>0&&Math.round(100*k)>=n},n)}))})}),[k]),P=(0,l.useMemo)((function(){if(t){var e=j[t]||[],n=e.every((function(e){var n=e.status;return S.V.COMPLETED===n})),i=(0,C.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=y||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(t);if([S.V.CANCELLED,S.V.FAILED].includes(o))return p.D[o];if(u&&s>=1){var d=Math.ceil(u*(s-c)/60);return"".concat((0,N._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(p.V.COMPLETED===(null===r||void 0===r?void 0:r.status))return"Sync complete";if(r){if([p.V.CANCELLED,p.V.FAILED].includes(null===r||void 0===r?void 0:r.status))return p.D[null===r||void 0===r?void 0:r.status];if(p.V.INITIAL===(null===r||void 0===r?void 0:r.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var a=Math.ceil(Z/60);return"".concat((0,N._6)("minute",a,!0)," to completion")}return"Select a sync"}),[j,Z,y,r,t]),_=(0,l.useMemo)((function(){return r&&t?F(r,t):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[r,t]);(0,l.useEffect)((function(){var e;if(r){var n=T(r);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r]),(0,l.useEffect)((function(){var e;if(r&&t&&_){var n=(null===_||void 0===_?void 0:_.runtime)||0;h(n),e=setInterval((function(){return h((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[r,t,_]);var w=(0,l.useMemo)((function(){if(r){if(t)return null===_||void 0===_?void 0:_.timeText;var e=T(r);return(0,N.zf)(e)}}),[r,t,_]),E=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),r=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[c]),M=(0,l.useMemo)((function(){var e=Math.floor(a%86400/3600),n=Math.floor(a%3600/60),r=Math.floor(a%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),r>=10?String(r):"0".concat(r)].join(":")}),[a]),B=(0,l.useMemo)((function(){return r?A(r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r]),z=B.errors,W=B.records,G=B.recordsInserted,$=B.recordsProcessed,ee=B.recordsUpdated,ne=(0,l.useMemo)((function(){return r&&t?A(r,t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[r,t]),re=(0,l.useMemo)((function(){var e=t?null===ne||void 0===ne?void 0:ne.records:W,n=t?null===ne||void 0===ne?void 0:ne.recordsInserted:G,r=t?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=t?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,N.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===r?"-":(0,N.x6)(r)}):null!==n?o.push({label:"Rows inserted",value:(0,N.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,N.x6)(i)}),o.map((function(e){var n=e.label,r=e.value;return(0,U.jsxs)("div",{children:[(0,U.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,U.jsx)(b.ZP,{headline:!0,children:r})]},n)}))}),[W,ne,G,$,ee,w,E,status]),te=(0,l.useMemo)((function(){if(!r)return(0,U.jsx)("div",{});var e=D(r);return(0,U.jsx)(q.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(n){return t&&t===e[n]},onClickRow:n,rows:e.map((function(e){var n=F(r,e),t=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,d=(n.total,!!z[e]);return[(0,U.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:e},"stream"),(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:t?t.split(".")[0]:"-"},"completed_at"),(0,U.jsx)(b.ZP,{default:!0,children:[S.V.INITIAL,S.V.RUNNING].includes(u)?"-":s},"runtime"),(0,U.jsxs)("div",{children:[o&&(0,U.jsx)(x.Jr,{default:!0,size:2*O.iI}),!o&&(0,U.jsx)(f.Z,{children:(0,C.w6)(51).map((function(e,n){return(0,U.jsx)(K,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,U.jsx)(J.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id)),(0,Q.j)(e)},children:(0,U.jsx)(x.B4,{default:!0,size:2*O.iI})},"logs")]})),uuid:"".concat(null===r||void 0===r?void 0:r.id,"-streams-table")})}),[z,g,r,t]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,d;if(r&&t){var a=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===a||void 0===a||null===(e=a.pipeline)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[t],v=null===a||void 0===a||null===(o=a.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(d=u.bookmarks)||void 0===d?void 0:d[t];if(f||v){var p=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(v||{})))).sort(),m=[];p.forEach((function(e){var n=[(0,U.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[f,v].forEach((function(r,t){r&&n.push((0,U.jsx)(b.ZP,{monospace:!0,small:!0,children:r[e]},"".concat(e,"-").concat(t)))})),m.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",f],[null===a||void 0===a?void 0:a.destination,"destination",v]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&h.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(q.Z,{columnFlex:[null,1,1],columns:h,rows:m,uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(r&&t){var u=(null===r||void 0===r?void 0:r.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[t])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,a=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[t])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(d||a){var f=Object.keys(a||d||{}).sort(),v=[];f.forEach((function(e){var n=[(0,U.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[d,a].forEach((function(r,t){if(r){var i=r[e],o="object"===typeof i;n.push((0,U.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,U.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(t)))}})),v.push(n)}));var p=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",d],[null===u||void 0===u?void 0:u.destination,"destination",a]].forEach((function(e){var n=(0,s.Z)(e,3),r=n[0],t=n[1];n[2]&&p.push({uuid:"".concat(r," (").concat(t,")")})})),(0,U.jsx)(q.Z,{columnFlex:[null,1,1],columns:p,rows:v.map((function(e){return e.map((function(e){return(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(t,"-bookmark-table")})}}}),[r,t]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===r||void 0===r||null===(e=r.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[t];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[r,t]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(m.Z,{p:3,children:[t&&(0,U.jsx)(m.Z,{mb:3,children:(0,U.jsxs)(f.Z,{alignItems:"center",children:[(0,U.jsx)(X.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/syncs?pipeline_run_id=").concat(r.id))},preventDefault:!0,children:(0,U.jsxs)(f.Z,{alignItems:"center",children:[(0,U.jsx)(x.Xd,{default:!0,size:1.5*O.iI}),(0,U.jsx)(m.Z,{mr:1}),(0,U.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,U.jsx)(m.Z,{mx:1,children:(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,U.jsx)(b.ZP,{bold:!0,monospace:!0,children:t})]})}),(0,U.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsx)(m.Z,{mr:2,my:1,children:(0,U.jsx)(v.Z,{level:5,muted:!r,children:P})}),r&&(0,U.jsx)(J.Z,{onClick:function(){return i.push("/pipelines/".concat(r.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(r.id))},small:!0,children:"Logs"})]}),(0,U.jsx)(m.Z,{mt:2,children:I}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(m.Z,{mt:3,children:(0,U.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,U.jsxs)(b.ZP,{headline:!0,children:[t&&[S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&M,t&&![S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&(null===_||void 0===_?void 0:_.timeText),!t&&[p.V.INITIAL,p.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&E,!t&&![p.V.INITIAL,p.V.RUNNING].includes(null===r||void 0===r?void 0:r.status)&&w]})]}),re]})}),Object.values(z).length>=1&&(0,U.jsxs)(m.Z,{mt:3,children:[(0,U.jsx)(v.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(z).map((function(e,n){var r=(0,s.Z)(e,2),i=r[0],o=r[1];return(!t||t===i)&&(0,U.jsx)(m.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),r=n[0],t=n[1],o=t.error,l=t.errors,c=t.message,u=Array.isArray(o)?o.join(" "):o;return(0,U.jsxs)("div",{children:[(0,U.jsx)(m.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,U.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!r&&(0,U.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",r,")"]}),": ",(0,U.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,U.jsx)(H(),{children:u})})]})}),(0,U.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,U.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(r))}))},i)}))]})]})]}),r&&!t&&(0,U.jsx)(m.Z,{my:3,children:te}),r&&t&&(0,U.jsxs)(U.Fragment,{children:[le&&(0,U.jsx)(m.Z,{my:3,children:(0,U.jsxs)(m.Z,{px:3,children:[(0,U.jsx)(v.Z,{level:5,children:"Table name"}),(0,U.jsx)(m.Z,{mt:1,children:(0,U.jsx)(b.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,U.jsxs)(m.Z,{my:3,children:[(0,U.jsx)(m.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Bookmarks"})}),(0,U.jsx)(m.Z,{px:1,children:ie})]}),oe&&(0,U.jsxs)(m.Z,{my:3,children:[(0,U.jsx)(m.Z,{px:3,children:(0,U.jsx)(v.Z,{level:5,children:"Sample row"})}),(0,U.jsx)(m.Z,{px:1,children:oe})]})]})]})},ee=r(82531),ne=r(59920),re=r(33766),te=r(59e3);function ie(e){var n=e.pipeline,r=n.uuid,t=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:r},{refreshInterval:5e3}).data,i=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.pipeline_runs)||[]}),[t]),o=(0,te.iV)(),u=(0,l.useState)(null),s=u[0],d=u[1],a=(0,l.useState)(null),f=a[0],v=a[1];(0,l.useEffect)((function(){null!==o&&void 0!==o&&o.pipeline_run_id?v(null===i||void 0===i?void 0:i.find((function(e){return e.id===Number(o.pipeline_run_id)}))):f&&v(null),null!==o&&void 0!==o&&o.stream?d(o.stream):s&&d(null)}),[i,o,f,s]);var p=(0,l.useCallback)((function(){var e=f?D(f):[];return(0,U.jsx)($,{onClickRow:function(n){var r=e[n];(0,re.u7)({stream:s===r?null:r})},pipelineRun:f,selectedStream:s})}),[f,s]),m=(0,l.useMemo)((function(){var e="/pipelines/".concat(r,"/syncs");f&&(e="".concat(e,"?pipeline_run_id=").concat(f.id));var n=[{label:function(){return"Syncs"},linkProps:s?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return s&&n.push({label:function(){return s}}),n}),[r,f,s]);return(0,U.jsx)(c.Z,{breadcrumbs:m,buildSidekick:p,pageName:ne.M.SYNCS,pipeline:n,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(r),children:i.map((function(e){var n=(null===f||void 0===f?void 0:f.id)===e.id;return(0,U.jsx)(W,{onSelect:function(e){return(0,re.u7)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,r){"use strict";r.d(n,{g_:function(){return f},u7:function(){return a}});var t=r(75582),i=r(82394),o=r(34376),l=r.n(o),c=r(59e3),u=r(24224);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function a(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.replaceParams,o=r.pushHistory,u=i?{}:(0,c.iV)();n=window.location.pathname;var s=o?l().push:l().replace,a=d(d({},u),e);Object.entries(e).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete a[r]}));var f=(0,c.uM)(a);f.length>=1&&(f="?".concat(f));var v="".concat(n.split("?")[0]).concat(f);return s(l().router.pathname,v,{shallow:!0})}function f(e,n,r){var i=r.addingMultipleValues,o=r.isList,l=r.itemsPerPage,c=r.pushHistory,s=void 0!==c&&c,f=r.resetLimitParams,v=d({},e);i?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(r,"[]");v[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,t.Z)(e,2),r=n[0],i=n[1],o=String(i),l="".concat(r,"[]"),c=v[l];c&&Array.isArray(c)?(c=c.map(String)).includes(o)?v[l]=(0,u.Od)(c,(function(e){return e===o})):v[l]=c.concat(o):v[l]=[o]})):v=d(d({},v),n),f&&(v._limit=l||20,v._offset=0),a(v,{pushHistory:s})}},59416:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return r(89745)}])}},function(e){e.O(0,[3850,5716,9565,2344,4506,6166,8180,6214,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|