mage-ai 0.8.97__py3-none-any.whl → 0.8.99__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/policies/AutocompleteItemPolicy.py +2 -1
- mage_ai/api/policies/BasePolicy.py +2 -2
- mage_ai/api/policies/BlockTemplatePolicy.py +2 -1
- mage_ai/api/policies/ClusterPolicy.py +2 -1
- mage_ai/api/policies/DataProviderPolicy.py +2 -1
- mage_ai/api/policies/EventRulePolicy.py +2 -1
- mage_ai/api/policies/ExtensionOptionPolicy.py +2 -1
- mage_ai/api/policies/FileVersionPolicy.py +2 -1
- mage_ai/api/policies/GitBranchPolicy.py +9 -0
- mage_ai/api/policies/KernelPolicy.py +2 -1
- mage_ai/api/policies/LogPolicy.py +2 -2
- mage_ai/api/policies/OauthPolicy.py +15 -0
- mage_ai/api/policies/OutputPolicy.py +2 -2
- mage_ai/api/policies/PipelinePolicy.py +2 -2
- mage_ai/api/policies/PipelineRunPolicy.py +2 -2
- mage_ai/api/policies/PipelineSchedulePolicy.py +2 -2
- mage_ai/api/policies/PullRequestPolicy.py +64 -0
- mage_ai/api/policies/SessionPolicy.py +4 -1
- mage_ai/api/policies/VariablePolicy.py +2 -2
- mage_ai/api/policies/WidgetPolicy.py +2 -2
- mage_ai/api/policies/WorkspacePolicy.py +3 -3
- mage_ai/api/presenters/PipelinePresenter.py +1 -0
- mage_ai/api/presenters/PullRequestPresenter.py +16 -0
- mage_ai/api/presenters/StatusPresenter.py +2 -0
- mage_ai/api/presenters/SyncPresenter.py +1 -0
- mage_ai/api/presenters/WorkspacePresenter.py +2 -0
- mage_ai/api/resources/GitBranchResource.py +81 -26
- mage_ai/api/resources/OauthResource.py +31 -4
- mage_ai/api/resources/PipelineResource.py +8 -1
- mage_ai/api/resources/PullRequestResource.py +87 -0
- mage_ai/api/resources/RoleResource.py +6 -3
- mage_ai/api/resources/SecretResource.py +2 -5
- mage_ai/api/resources/SessionResource.py +18 -0
- mage_ai/api/resources/StatusResource.py +7 -3
- mage_ai/api/resources/UserResource.py +11 -16
- mage_ai/api/resources/WorkspaceResource.py +83 -53
- mage_ai/authentication/oauth/active_directory.py +17 -0
- mage_ai/authentication/oauth/constants.py +9 -0
- mage_ai/authentication/oauth/utils.py +2 -1
- mage_ai/authentication/oauth2.py +9 -3
- mage_ai/cli/main.py +94 -51
- mage_ai/cluster_manager/kubernetes/workload_manager.py +141 -45
- mage_ai/data_preparation/git/__init__.py +86 -16
- mage_ai/data_preparation/git/api.py +175 -0
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +49 -14
- mage_ai/data_preparation/models/block/sql/__init__.py +3 -2
- mage_ai/data_preparation/models/pipeline.py +4 -1
- mage_ai/data_preparation/models/pipelines/integration_pipeline.py +7 -3
- mage_ai/data_preparation/preferences.py +4 -2
- mage_ai/data_preparation/repo_manager.py +41 -10
- mage_ai/data_preparation/shared/secrets.py +5 -6
- mage_ai/data_preparation/sync/__init__.py +2 -1
- mage_ai/data_preparation/sync/git_sync.py +2 -5
- mage_ai/data_preparation/templates/utils.py +2 -0
- mage_ai/orchestration/db/models/oauth.py +22 -4
- mage_ai/orchestration/pipeline_scheduler.py +19 -8
- mage_ai/orchestration/queue/process_queue.py +15 -12
- mage_ai/server/api/clusters.py +21 -11
- 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/WRxCTOtmZhTqQws_7OJZD/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1286-993725c925c56a98.js → 1286-b90bd4b7f8abfc3a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{1424-f475cae42f8a7fca.js → 1424-90c0f66ba2f86b88.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3883-c95563b9f60ae526.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/6694-c8f2a68074420906.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{9350-1ff50f1d7b9ee754.js → 9350-5191c83a8d0cf454.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-3527178abd99bc87.js → _app-171846e16d26855a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-e4e778f8f5e1bf2e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-c788c1b127999825.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-b4650224a19e8fe6.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-931eb719e3fae29c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-d3724bde0b186dd9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-af11f9cf94024ac0.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-3ec5eb9562e4bff4.js → [...slug]-34326db259f922d1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-503ecb7a72257b79.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7667080098731e30.js → [run]-2994b8ab7862c07b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-7b31b851e2544b42.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-e18058e13882b20d.js → [...slug]-4445619d4eabe065.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-6854c10d5589d394.js → triggers-b7db0b682fadb840.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-ee0931af3abb55b3.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f8a59d718751be9a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-90f8830890036eb2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-9f82673fc438ea83.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-a1871b8a537d823c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-48859b4e9c846212.js +1 -0
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +24 -0
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +24 -0
- mage_ai/server/frontend_dist/manage/users.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 +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/scheduler_manager.py +7 -2
- mage_ai/server/server.py +37 -3
- mage_ai/server/terminal_server.py +2 -2
- mage_ai/server/websocket_server.py +6 -2
- mage_ai/services/newrelic/__init__.py +21 -0
- mage_ai/settings/__init__.py +32 -0
- mage_ai/shared/hash.py +2 -0
- mage_ai/tests/api/test_utils.py +29 -2
- mage_ai/tests/data_preparation/models/test_pipeline.py +5 -0
- {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/METADATA +8 -3
- {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/RECORD +136 -127
- mage_ai/data_preparation/templates/main/projects/__init__.py +0 -0
- mage_ai/server/frontend_dist/_next/static/YLZRSrQ0aqtl-GGePfsMB/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3077-d58f18ed770e5137.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3714-b676173cd4d8d86c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-82b5409dac9564f4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-bb6aaa23e92a5add.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-c91ee702a4cd7a6f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-7961010cb0fb9abd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-7b8ce89f0d717465.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-5bd17a8f3f3d57ef.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-7d75e42d5f4936bb.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-8220c1200472bf70.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-b602fa9b6ffabd12.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users-3f9d5800f268a263.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/sign-in-2925c2c1b0c5559a.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5ffc663cfb0ec81e.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{YLZRSrQ0aqtl-GGePfsMB → WRxCTOtmZhTqQws_7OJZD}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{YLZRSrQ0aqtl-GGePfsMB → WRxCTOtmZhTqQws_7OJZD}/_ssgManifest.js +0 -0
- {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/LICENSE +0 -0
- {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/WHEEL +0 -0
- {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.8.97.dist-info → mage_ai-0.8.99.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{64155:function(e,n,t){"use strict";t.d(n,{Eh:function(){return s},ht:function(){return d},t0:function(){return a}});var r=t(38626),i=t(82386),u=t(1286),o=t(31012),c=t(37391),l=t(49125),s=(l.iI,u.O$+3*l.iI+o.dN),a=r.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-15ofupc-0"})([""," overflow:auto;position:absolute;width:100%;",""],c.w5,(function(e){return"\n height: calc(100vh - ".concat(i.uX,"px - ").concat(e.heightOffset,"px);\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-15ofupc-1"})(["padding:","px;",""],2*l.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}))},19395:function(e,n,t){"use strict";t.d(n,{IJ:function(){return a},Vx:function(){return p},eI:function(){return d},gU:function(){return v},tL:function(){return f},vJ:function(){return b}});var r,i,u=t(82394),o=t(92083),c=t.n(o);function l(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?l(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,i=n.started_at,o=n.status,l=null;i&&r&&(l=c()(r).valueOf()-c()(i).valueOf());return s(s({},e),{},(0,u.Z)({},t,{runtime:l,status:o}))}),{})}function d(e){if(!e)return null;var n=new Date(c()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function p(e){return"string"!==typeof e?e:d(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(i||(i={}));var f=(r={},(0,u.Z)(r,i.DAY,86400),(0,u.Z)(r,i.HOUR,3600),(0,u.Z)(r,i.MINUTE,60),(0,u.Z)(r,i.SECOND,1),r);function v(e){var n=i.SECOND,t=e;return e%86400===0?(t/=86400,n=i.DAY):e%3600===0?(t/=3600,n=i.HOUR):e%60===0&&(t/=60,n=i.MINUTE),{time:t,unit:n}}function b(e,n){return e*f[n]}},47409:function(e,n,t){"use strict";t.d(n,{Az:function(){return c},BF:function(){return o},Do:function(){return s},VO:function(){return u},sZ:function(){return l}});var r,i=t(82394),u=t(66050).V,o=[u.INITIAL,u.RUNNING],c=[u.CANCELLED,u.COMPLETED,u.FAILED],l="__mage_variables",s=(r={},(0,i.Z)(r,u.CANCELLED,"Cancelled"),(0,i.Z)(r,u.COMPLETED,"Done"),(0,i.Z)(r,u.FAILED,"Failed"),(0,i.Z)(r,u.INITIAL,"Ready"),(0,i.Z)(r,u.RUNNING,"Running"),r)},23588:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return V}});var r=t(77837),i=t(75582),u=t(82394),o=t(38860),c=t.n(o),l=t(82684),s=t(83455),a=t(27125),d=t(60328),p=t(34744),f=t(93461),v=t(67971),b=t(87372),h=t(60547),O=t(47409),g=t(98781),j=t(41788),y=t(86673),m=t(54283),x=t(19711),Z=t(82531),_=t(26304),P=t(32316),w=t(62976),D=t(73752),E=t(82635),k=t(49125),N=t(64155),I=t(56681),S=t(19395),T=t(90211),C=t(28598),R=["blockRuns","columns","dataType","height","heightOffset","loadingData","pipeline","renderColumnHeader","rows","selectedRun","selectedTab","setSelectedTab","textData"];function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function A(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M={uuid:"Dependency tree"},U={uuid:"Block output"},B=[U,M];var F=t(59920),H=t(96510),G=t(66653);function J(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?J(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function q(e){var n,t=e.pipeline,r=e.pipelineRun,u=(0,l.useState)(null),o=u[0],c=u[1],j=(0,l.useState)(B[0]),L=j[0],J=j[1],q=(0,l.useState)(null),V=q[0],X=q[1],z=t.uuid,$=Z.ZP.pipelines.detail(z,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,W=(0,l.useMemo)((function(){return Y(Y({},null===$||void 0===$?void 0:$.pipeline),{},{uuid:z})}),[$,z]),K=Z.ZP.pipeline_runs.detail(r.id,{},{refreshInterval:3e3,revalidateOnFocus:!0}).data,Q=(0,l.useMemo)((function(){return(null===K||void 0===K?void 0:K.pipeline_run)||{}}),[K]),ee=Q.block_runs,ne=Q.execution_date,te=Q.id,re=Q.status,ie=(0,s.Db)(Z.ZP.pipeline_runs.useUpdate(te),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){c(null)},onErrorCallback:function(e,n){return X({errors:n,response:e})}})}}),ue=(0,i.Z)(ie,2),oe=ue[0],ce=ue[1].isLoading,le=Z.ZP.outputs.block_runs.list(null===o||void 0===o?void 0:o.id),se=le.data,ae=le.loading,de=(null===se||void 0===se||null===(n=se.outputs)||void 0===n?void 0:n[0])||{},pe=de.sample_data,fe=de.text_data,ve=de.type;(0,l.useEffect)((function(){o||(null===L||void 0===L?void 0:L.uuid)!==U.uuid||J(M)}),[o,null===L||void 0===L?void 0:L.uuid]);var be=(0,l.useMemo)((function(){return ee||[]}),[Q]),he=((null===pe||void 0===pe?void 0:pe.columns)||[]).slice(0,40),Oe=(null===pe||void 0===pe?void 0:pe.rows)||[],ge=(0,l.useMemo)((function(){return(0,C.jsx)(a.Z,{blockRuns:be,onClickRow:function(e){c((function(n){var t=be[e],r=(null===n||void 0===n?void 0:n.id)!==t.id?t:null;return r&&J((function(e){return e!==U?U:e})),r}))},pipeline:W,selectedRun:o,setErrors:X})}),[be,W,o]),je=(null===W||void 0===W?void 0:W.type)!==g.qL.STREAMING&&re&&re!==O.VO.COMPLETED,ye=((null===W||void 0===W?void 0:W.type)===g.qL.PYTHON||(null===W||void 0===W?void 0:W.type)===g.qL.INTEGRATION)&&o&&O.Az.includes(re);return(0,C.jsxs)(h.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(z,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return ne}}],buildSidekick:function(e){return function(e){var n=e.blockRuns,t=e.columns,r=e.dataType,i=e.height,u=e.heightOffset,o=e.loadingData,c=e.pipeline,l=e.renderColumnHeader,s=e.rows,a=e.selectedRun,d=e.selectedTab,p=e.setSelectedTab,f=e.textData,b=A({},(0,_.Z)(e,R));b.blockStatus=(0,S.IJ)(n);var h=(0,C.jsx)(y.Z,{ml:2,children:(0,C.jsx)(x.ZP,{children:"This block run has no output."})}),O=s&&s.length>0?(0,C.jsx)(w.Z,{columnHeaderHeight:l?N.Eh:0,columns:t,height:i-u-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:l,rows:s}):h,g=(0,T.Pb)(f)?JSON.stringify(JSON.parse(f),null,2):f,j=f?(0,C.jsx)(y.Z,{ml:2,children:(0,C.jsx)(x.ZP,{monospace:!0,children:(0,C.jsx)("pre",{children:g})})}):h,Z=d&&p;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{style:{position:"fixed",top:"50px"},children:Z&&(0,C.jsx)(y.Z,{py:k.cd,children:(0,C.jsx)(P.Z,{onClickTab:p,selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:a?B:[M]})})}),(0,C.jsxs)("div",{style:{position:"relative",top:"75px"},children:[(!a||M.uuid===(null===d||void 0===d?void 0:d.uuid))&&(0,C.jsx)(D.Z,A(A({},b),{},{height:i,heightOffset:(u||0)+(Z?I.u$:0),pipeline:c})),a&&U.uuid===(null===d||void 0===d?void 0:d.uuid)&&(0,C.jsxs)(C.Fragment,{children:[o&&(0,C.jsx)(y.Z,{mt:2,children:(0,C.jsx)(v.Z,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,C.jsx)(m.Z,{color:"white",large:!0})})}),!o&&r===E.Gi.TABLE&&O,!o&&r!==E.Gi.TABLE&&j]})]})]})}(Y(Y({},e),{},{blockRuns:be,columns:he,dataType:ve,loadingData:ae,rows:Oe,selectedRun:o,selectedTab:L,setSelectedTab:J,showDynamicBlocks:!0,textData:fe}))},errors:V,pageName:F.M.RUNS,pipeline:W,setErrors:X,subheader:(je||ye)&&(0,C.jsxs)(v.Z,{alignItems:"center",children:[O.BF.includes(re)&&(0,C.jsxs)(f.Z,{children:[(0,C.jsx)(x.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline is running"}),(0,C.jsx)(y.Z,{mr:1}),(0,C.jsx)(m.Z,{inverted:!0}),(0,C.jsx)(y.Z,{mr:2})]}),je&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(d.Z,{danger:!0,loading:ce,onClick:function(e){(0,G.j)(e),oe({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),(0,C.jsx)(y.Z,{mr:2})]}),ye&&(0,C.jsxs)(d.Z,{loading:ce,onClick:function(e){(0,G.j)(e),oe({pipeline_run:{from_block_uuid:o.block_uuid,pipeline_run_action:"retry_blocks"}})},outline:!0,primary:!0,children:["Retry from selected block (",o.block_uuid,")"]})]}),title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(F.M.RUNS,"_").concat(z,"_").concat(te),children:[(0,C.jsx)(y.Z,{mt:k.cd,px:k.cd,children:(0,C.jsx)(b.Z,{level:5,children:"Block runs"})}),(0,C.jsx)(p.Z,{light:!0,mt:k.cd,short:!0}),ge]})}q.getInitialProps=function(){var e=(0,r.Z)(c().mark((function e(n){var t,r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query,r=t.pipeline,i=t.run,e.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var V=(0,j.Z)(q)},39525:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return t(23588)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,9350,5872,4259,1424,1005,7815,547,3714,3752,1286,4822,2786,9774,2888,179],(function(){return n=39525,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{64155:function(e,n,t){"use strict";t.d(n,{Eh:function(){return s},ht:function(){return d},t0:function(){return a}});var r=t(38626),i=t(82386),u=t(1286),o=t(31012),c=t(37391),l=t(49125),s=(l.iI,u.O$+3*l.iI+o.dN),a=r.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-15ofupc-0"})([""," overflow:auto;position:absolute;width:100%;",""],c.w5,(function(e){return"\n height: calc(100vh - ".concat(i.uX,"px - ").concat(e.heightOffset,"px);\n ")})),d=r.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-15ofupc-1"})(["padding:","px;",""],2*l.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}))},19395:function(e,n,t){"use strict";t.d(n,{IJ:function(){return a},Vx:function(){return p},eI:function(){return d},gU:function(){return v},tL:function(){return f},vJ:function(){return b}});var r,i,u=t(82394),o=t(92083),c=t.n(o);function l(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?l(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,i=n.started_at,o=n.status,l=null;i&&r&&(l=c()(r).valueOf()-c()(i).valueOf());return s(s({},e),{},(0,u.Z)({},t,{runtime:l,status:o}))}),{})}function d(e){if(!e)return null;var n=new Date(c()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function p(e){return"string"!==typeof e?e:d(e.split("+")[0]).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(i||(i={}));var f=(r={},(0,u.Z)(r,i.DAY,86400),(0,u.Z)(r,i.HOUR,3600),(0,u.Z)(r,i.MINUTE,60),(0,u.Z)(r,i.SECOND,1),r);function v(e){var n=i.SECOND,t=e;return e%86400===0?(t/=86400,n=i.DAY):e%3600===0?(t/=3600,n=i.HOUR):e%60===0&&(t/=60,n=i.MINUTE),{time:t,unit:n}}function b(e,n){return e*f[n]}},47409:function(e,n,t){"use strict";t.d(n,{Az:function(){return c},BF:function(){return o},Do:function(){return s},VO:function(){return u},sZ:function(){return l}});var r,i=t(82394),u=t(66050).V,o=[u.INITIAL,u.RUNNING],c=[u.CANCELLED,u.COMPLETED,u.FAILED],l="__mage_variables",s=(r={},(0,i.Z)(r,u.CANCELLED,"Cancelled"),(0,i.Z)(r,u.COMPLETED,"Done"),(0,i.Z)(r,u.FAILED,"Failed"),(0,i.Z)(r,u.INITIAL,"Ready"),(0,i.Z)(r,u.RUNNING,"Running"),r)},23588:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return V}});var r=t(77837),i=t(75582),u=t(82394),o=t(38860),c=t.n(o),l=t(82684),s=t(83455),a=t(27125),d=t(60328),p=t(34744),f=t(93461),v=t(67971),b=t(87372),h=t(60547),O=t(47409),g=t(98781),j=t(41788),y=t(86673),m=t(54283),x=t(19711),Z=t(82531),_=t(26304),P=t(32316),w=t(62976),D=t(73752),E=t(82635),k=t(49125),N=t(64155),I=t(56681),S=t(19395),T=t(90211),C=t(28598),R=["blockRuns","columns","dataType","height","heightOffset","loadingData","pipeline","renderColumnHeader","rows","selectedRun","selectedTab","setSelectedTab","textData"];function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function A(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var M={uuid:"Dependency tree"},U={uuid:"Block output"},B=[U,M];var F=t(59920),H=t(96510),G=t(66653);function J(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?J(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function q(e){var n,t=e.pipeline,r=e.pipelineRun,u=(0,l.useState)(null),o=u[0],c=u[1],j=(0,l.useState)(B[0]),L=j[0],J=j[1],q=(0,l.useState)(null),V=q[0],X=q[1],z=t.uuid,$=Z.ZP.pipelines.detail(z,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,W=(0,l.useMemo)((function(){return Y(Y({},null===$||void 0===$?void 0:$.pipeline),{},{uuid:z})}),[$,z]),K=Z.ZP.pipeline_runs.detail(r.id,{},{refreshInterval:3e3,revalidateOnFocus:!0}).data,Q=(0,l.useMemo)((function(){return(null===K||void 0===K?void 0:K.pipeline_run)||{}}),[K]),ee=Q.block_runs,ne=Q.execution_date,te=Q.id,re=Q.status,ie=(0,s.Db)(Z.ZP.pipeline_runs.useUpdate(te),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(){c(null)},onErrorCallback:function(e,n){return X({errors:n,response:e})}})}}),ue=(0,i.Z)(ie,2),oe=ue[0],ce=ue[1].isLoading,le=Z.ZP.outputs.block_runs.list(null===o||void 0===o?void 0:o.id),se=le.data,ae=le.loading,de=(null===se||void 0===se||null===(n=se.outputs)||void 0===n?void 0:n[0])||{},pe=de.sample_data,fe=de.text_data,ve=de.type;(0,l.useEffect)((function(){o||(null===L||void 0===L?void 0:L.uuid)!==U.uuid||J(M)}),[o,null===L||void 0===L?void 0:L.uuid]);var be=(0,l.useMemo)((function(){return ee||[]}),[Q]),he=((null===pe||void 0===pe?void 0:pe.columns)||[]).slice(0,40),Oe=(null===pe||void 0===pe?void 0:pe.rows)||[],ge=(0,l.useMemo)((function(){return(0,C.jsx)(a.Z,{blockRuns:be,onClickRow:function(e){c((function(n){var t=be[e],r=(null===n||void 0===n?void 0:n.id)!==t.id?t:null;return r&&J((function(e){return e!==U?U:e})),r}))},pipeline:W,selectedRun:o,setErrors:X})}),[be,W,o]),je=(null===W||void 0===W?void 0:W.type)!==g.qL.STREAMING&&re&&re!==O.VO.COMPLETED,ye=((null===W||void 0===W?void 0:W.type)===g.qL.PYTHON||(null===W||void 0===W?void 0:W.type)===g.qL.INTEGRATION)&&o&&O.Az.includes(re);return(0,C.jsxs)(h.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(z,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return ne}}],buildSidekick:function(e){return function(e){var n=e.blockRuns,t=e.columns,r=e.dataType,i=e.height,u=e.heightOffset,o=e.loadingData,c=e.pipeline,l=e.renderColumnHeader,s=e.rows,a=e.selectedRun,d=e.selectedTab,p=e.setSelectedTab,f=e.textData,b=A({},(0,_.Z)(e,R));b.blockStatus=(0,S.IJ)(n);var h=(0,C.jsx)(y.Z,{ml:2,children:(0,C.jsx)(x.ZP,{children:"This block run has no output."})}),O=s&&s.length>0?(0,C.jsx)(w.Z,{columnHeaderHeight:l?N.Eh:0,columns:t,height:i-u-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:l,rows:s}):h,g=(0,T.Pb)(f)?JSON.stringify(JSON.parse(f),null,2):f,j=f?(0,C.jsx)(y.Z,{ml:2,children:(0,C.jsx)(x.ZP,{monospace:!0,children:(0,C.jsx)("pre",{children:g})})}):h,Z=d&&p;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{style:{position:"fixed",top:"50px"},children:Z&&(0,C.jsx)(y.Z,{py:k.cd,children:(0,C.jsx)(P.Z,{onClickTab:p,selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:a?B:[M]})})}),(0,C.jsxs)("div",{style:{position:"relative",top:"75px"},children:[(!a||M.uuid===(null===d||void 0===d?void 0:d.uuid))&&(0,C.jsx)(D.Z,A(A({},b),{},{height:i,heightOffset:(u||0)+(Z?I.u$:0),pipeline:c})),a&&U.uuid===(null===d||void 0===d?void 0:d.uuid)&&(0,C.jsxs)(C.Fragment,{children:[o&&(0,C.jsx)(y.Z,{mt:2,children:(0,C.jsx)(v.Z,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,C.jsx)(m.Z,{color:"white",large:!0})})}),!o&&r===E.Gi.TABLE&&O,!o&&r!==E.Gi.TABLE&&j]})]})]})}(Y(Y({},e),{},{blockRuns:be,columns:he,dataType:ve,loadingData:ae,rows:Oe,selectedRun:o,selectedTab:L,setSelectedTab:J,showDynamicBlocks:!0,textData:fe}))},errors:V,pageName:F.M.RUNS,pipeline:W,setErrors:X,subheader:(je||ye)&&(0,C.jsxs)(v.Z,{alignItems:"center",children:[O.BF.includes(re)&&(0,C.jsxs)(f.Z,{children:[(0,C.jsx)(x.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline is running"}),(0,C.jsx)(y.Z,{mr:1}),(0,C.jsx)(m.Z,{inverted:!0}),(0,C.jsx)(y.Z,{mr:2})]}),je&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(d.Z,{danger:!0,loading:ce,onClick:function(e){(0,G.j)(e),oe({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),(0,C.jsx)(y.Z,{mr:2})]}),ye&&(0,C.jsxs)(d.Z,{loading:ce,onClick:function(e){(0,G.j)(e),oe({pipeline_run:{from_block_uuid:o.block_uuid,pipeline_run_action:"retry_blocks"}})},outline:!0,primary:!0,children:["Retry from selected block (",o.block_uuid,")"]})]}),title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(F.M.RUNS,"_").concat(z,"_").concat(te),children:[(0,C.jsx)(y.Z,{mt:k.cd,px:k.cd,children:(0,C.jsx)(b.Z,{level:5,children:"Block runs"})}),(0,C.jsx)(p.Z,{light:!0,mt:k.cd,short:!0}),ge]})}q.getInitialProps=function(){var e=(0,r.Z)(c().mark((function e(n){var t,r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query,r=t.pipeline,i=t.run,e.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var V=(0,j.Z)(q)},39525:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return t(23588)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,9350,5872,4259,1424,1005,7815,547,6694,3752,1286,4822,2786,9774,2888,179],(function(){return n=39525,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-7b31b851e2544b42.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244],{59739:function(n,e,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,n.exports=function(){function n(n,e,t,i,o,c){if(c!==r){var u=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 u.name="Invariant Violation",u}}function e(){return n}n.isRequired=n;var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return t.PropTypes=t,t}},47329:function(n,e,t){n.exports=t(59739)()},56669:function(n){"use strict";n.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},44162:function(n,e,t){"use strict";t.d(e,{HC:function(){return g},Kf:function(){return d},Nk:function(){return p},PY:function(){return f},gE:function(){return b},jv:function(){return v},nz:function(){return h},oh:function(){return l},qn:function(){return s},t1:function(){return m},y9:function(){return A}});var r=t(38626),i=t(23831),o=t(86422),c=t(73942),u=t(49125),a=t(90880),l=68;function s(n,e){var t,r,c=((null===e||void 0===e||null===(t=e.theme)||void 0===t?void 0:t.borders)||i.Z.borders).light,u=((null===e||void 0===e||null===(r=e.theme)||void 0===r?void 0:r.monotone)||i.Z.monotone).grey500,a=e||{},l=a.blockColor,s=a.isSelected,d=a.theme;return s?c=(d||i.Z).content.active:o.tf.TRANSFORMER===n||l===o.Lq.PURPLE?(c=(d||i.Z).accent.purple,u=(d||i.Z).accent.purpleLight):o.tf.DATA_EXPORTER===n||l===o.Lq.YELLOW?(c=(d||i.Z).accent.yellow,u=(d||i.Z).accent.yellowLight):o.tf.DATA_LOADER===n||l===o.Lq.BLUE?(c=(d||i.Z).accent.blue,u=(d||i.Z).accent.blueLight):o.tf.MARKDOWN===n?(c=(d||i.Z).accent.sky,u=(d||i.Z).accent.skyLight):o.tf.SENSOR===n||l===o.Lq.PINK?(c=(d||i.Z).accent.pink,u=(d||i.Z).accent.pinkLight):o.tf.DBT===n?(c=(d||i.Z).accent.dbt,u=(d||i.Z).accent.dbtLight):o.tf.EXTENSION===n||l===o.Lq.TEAL?(c=((null===d||void 0===d?void 0:d.accent)||i.Z.accent).teal,u=((null===d||void 0===d?void 0:d.accent)||i.Z.accent).tealLight):o.tf.CALLBACK===n?(c=((null===d||void 0===d?void 0:d.accent)||i.Z.accent).rose,u=((null===d||void 0===d?void 0:d.accent)||i.Z.accent).roseLight):(o.tf.CONDITIONAL===n||o.tf.SCRATCHPAD===n||l===o.Lq.GREY||o.tf.CUSTOM===n&&!l)&&(c=(d||i.Z).content.default,u=(d||i.Z).accent.contentDefaultTransparent),{accent:c,accentLight:u}}var d=(0,r.css)([""," "," "," "," "," "," ",""],(0,a.eR)(),(function(n){return!n.selected&&!n.hasError&&"\n border-color: ".concat(s(n.blockType,n).accentLight,";\n ")}),(function(n){return n.selected&&!n.hasError&&"\n border-color: ".concat(s(n.blockType,n).accent,";\n ")}),(function(n){return!n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.accent||i.Z.accent).negativeTransparent,";\n ")}),(function(n){return n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.borders||i.Z.borders).danger,";\n ")}),(function(n){return n.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(n){return n.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),p=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),f=r.default.div.withConfig({displayName:"indexstyle__HiddenBlockContainerStyle",componentId:"sc-s5rj34-1"})([""," border-radius:","px;border-style:",";border-width:","px;",""],d,c.n_,c.M8,c.mP,(function(n){return"\n background-color: ".concat((n.theme||i.Z).background.content,";\n\n &:hover {\n border-color: ").concat(s(n.blockType,n).accent,";\n }\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-2"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding:","px;position:sticky;top:-5px;"," "," ",""],d,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,u.iI,(function(n){return"\n background-color: ".concat((n.theme||i.Z).background.content,";\n ")}),(function(n){return n.bottomBorder&&"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((n.theme||i.Z).borders.medium2,";\n ")}),(function(n){return n.zIndex&&"\n z-index: ".concat(6+(n.zIndex||0),";\n ")})),v=r.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-3"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;position:relative;"," "," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],d,c.M8,c.mP,c.M8,c.mP,u.iI,u.iI,(function(n){return"\n background-color: ".concat((n.theme.background||i.Z.background).codeTextarea,";\n ")}),(function(n){return n.lightBackground&&"\n background-color: ".concat((n.theme||i.Z).background.content,";\n ")}),(function(n){return!n.hasOutput&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n ")})),b=r.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-4"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;bottom:","px;&:hover{"," .block-divider-inner{","}}"],2*u.iI,.5*u.iI,(function(n){return n.additionalZIndex>0&&"\n z-index: ".concat(8+n.additionalZIndex,";\n ")}),(function(n){return"\n background-color: ".concat((n.theme.text||i.Z.text).fileBrowser,";\n ")})),m=r.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-5"})(["height 1px;width:100%;position:absolute;z-index:-1;top:","px;"],1.5*u.iI),A=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-6"})(["margin-bottom:","px;padding-bottom:","px;",""],1*u.iI,1*u.iI,(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||i.Z.borders).medium,";\n padding-left: ").concat(n.normalPadding?u.iI:l,"px;\n ")})),g=r.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-7"})(["bottom:","px;left:","px;position:absolute;"],1*u.iI,l)},60701:function(n,e,t){"use strict";t.d(e,{Qq:function(){return p},Z7:function(){return f},cH:function(){return i},du:function(){return s},fp:function(){return l},j5:function(){return d},uM:function(){return a}});var r,i,o=t(82394),c=t(10503),u=t(24224),a="sideview",l=90;!function(n){n.ADDON_BLOCKS="addon_blocks",n.CALLBACKS="callbacks",n.CHARTS="charts",n.DATA="data",n.EXTENSIONS="power_ups",n.FILE_VERSIONS="file_versions",n.GRAPHS="graphs",n.REPORTS="reports",n.SECRETS="secrets",n.SETTINGS="settings",n.TERMINAL="terminal",n.TREE="tree",n.VARIABLES="variables"}(i||(i={}));i.CALLBACKS,i.CHARTS,i.DATA,i.EXTENSIONS,i.REPORTS,i.TREE;var s=[i.DATA,i.REPORTS,i.GRAPHS],d=[{key:i.TREE,label:"Tree"},{buildLabel:function(n){var e=(n.pipeline||{}).widgets,t=void 0===e?[]:e;return(null===t||void 0===t?void 0:t.length)>=1?"Charts (".concat(t.length,")"):"Charts"},key:i.CHARTS},{buildLabel:function(n){var e=n.variables;return(null===e||void 0===e?void 0:e.length)>=1?"Variables (".concat(e.length,")"):"Variables"},key:i.VARIABLES},{buildLabel:function(n){var e=n.secrets;return(null===e||void 0===e?void 0:e.length)>=1?"Secrets (".concat(e.length,")"):"Secrets"},key:i.SECRETS},{buildLabel:function(n){n.pipeline;return"Add-on blocks"},key:i.ADDON_BLOCKS},{buildLabel:function(n){var e=(n.pipeline||{}).extensions,t=void 0===e?{}:e,r=0;return Object.values(t).forEach((function(n){var e=n.blocks;r+=(null===e||void 0===e?void 0:e.length)||0})),r>=1?"Power ups (".concat(r,")"):"Power ups"},key:i.EXTENSIONS},{key:i.DATA,label:"Data"},{key:i.TERMINAL,label:"Terminal"}],p=(0,u.HK)(d,(function(n){return n.key})),f=(r={},(0,o.Z)(r,i.ADDON_BLOCKS,c.EJ),(0,o.Z)(r,i.CALLBACKS,c.AQ),(0,o.Z)(r,i.CHARTS,c.GQ),(0,o.Z)(r,i.DATA,c.iA),(0,o.Z)(r,i.EXTENSIONS,c.Bf),(0,o.Z)(r,i.GRAPHS,c.GQ),(0,o.Z)(r,i.REPORTS,c.Do),(0,o.Z)(r,i.SECRETS,c.Yo),(0,o.Z)(r,i.SETTINGS,c.Zr),(0,o.Z)(r,i.TERMINAL,c.oI),(0,o.Z)(r,i.TREE,c.mp),(0,o.Z)(r,i.VARIABLES,c.LO),r)},86422:function(n,e,t){"use strict";t.d(e,{$W:function(){return h},DA:function(){return f},HX:function(){return m},J8:function(){return b},L8:function(){return c},Lq:function(){return d},M5:function(){return p},Qj:function(){return A},Ut:function(){return O},V4:function(){return E},VZ:function(){return v},dO:function(){return s},f2:function(){return R},iZ:function(){return g},t6:function(){return u},tf:function(){return l}});var r,i,o,c,u,a=t(82394);!function(n){n.CONDITION="condition",n.DBT_SNAPSHOT="snapshot",n.DYNAMIC="dynamic",n.DYNAMIC_CHILD="dynamic_child",n.REDUCE_OUTPUT="reduce_output",n.REPLICA="replica"}(c||(c={})),function(n){n.MARKDOWN="markdown",n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(u||(u={}));var l,s=(r={},(0,a.Z)(r,u.MARKDOWN,"MD"),(0,a.Z)(r,u.PYTHON,"PY"),(0,a.Z)(r,u.R,"R"),(0,a.Z)(r,u.SQL,"SQL"),(0,a.Z)(r,u.YAML,"YAML"),r);!function(n){n.CALLBACK="callback",n.CHART="chart",n.CONDITIONAL="conditional",n.CUSTOM="custom",n.DATA_EXPORTER="data_exporter",n.DATA_LOADER="data_loader",n.DBT="dbt",n.EXTENSION="extension",n.SCRATCHPAD="scratchpad",n.SENSOR="sensor",n.MARKDOWN="markdown",n.TRANSFORMER="transformer"}(l||(l={}));var d,p=[l.CALLBACK,l.CONDITIONAL,l.EXTENSION];!function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(d||(d={}));var f,h=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN,l.TRANSFORMER],v=[l.DATA_EXPORTER,l.DATA_LOADER],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],m=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],A=[l.CHART,l.SCRATCHPAD,l.SENSOR,l.MARKDOWN],g=[l.CALLBACK,l.CHART,l.EXTENSION,l.SCRATCHPAD,l.MARKDOWN];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(f||(f={}));var R=[l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],E=(i={},(0,a.Z)(i,l.CALLBACK,"Callback"),(0,a.Z)(i,l.CUSTOM,"Custom"),(0,a.Z)(i,l.DATA_EXPORTER,"Data exporter"),(0,a.Z)(i,l.DATA_LOADER,"Data loader"),(0,a.Z)(i,l.EXTENSION,"Extension"),(0,a.Z)(i,l.SCRATCHPAD,"Scratchpad"),(0,a.Z)(i,l.SENSOR,"Sensor"),(0,a.Z)(i,l.MARKDOWN,"Markdown"),(0,a.Z)(i,l.TRANSFORMER,"Transformer"),i),O=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];o={},(0,a.Z)(o,l.DATA_EXPORTER,"DE"),(0,a.Z)(o,l.DATA_LOADER,"DL"),(0,a.Z)(o,l.SCRATCHPAD,"SP"),(0,a.Z)(o,l.SENSOR,"SR"),(0,a.Z)(o,l.MARKDOWN,"MD"),(0,a.Z)(o,l.TRANSFORMER,"TF")},32316:function(n,e,t){"use strict";t.d(e,{Z:function(){return b}});var r=t(82684),i=t(60328),o=t(67971),c=t(882),u=t(86673),a=t(19711),l=t(99994),s=t(38626),d=t(49125),p=t(37391),f=s.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),v=t(28598);var b=function(n){var e=n.allowScroll,t=n.compact,s=n.contained,p=n.noPadding,b=n.onClickTab,m=n.selectedTabUUID,A=n.small,g=n.tabs,R=(0,r.useMemo)((function(){var n=g.length,e=[];return g.forEach((function(r,s){var p=r.Icon,f=r.IconSelected,g=r.label,R=r.uuid,E=R===m,O=E&&f||p,T=g?g():R,S=(0,v.jsxs)(o.Z,{alignItems:"center",children:[O&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(O,{default:!E,size:2*d.iI}),(0,v.jsx)(u.Z,{mr:1})]}),(0,v.jsx)(a.ZP,{bold:!0,default:!E,noWrapping:!0,small:!0,children:T})]});s>=1&&n>=2&&e.push((0,v.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(R))),E?e.push((0,v.jsx)(c.Z,{backgroundGradient:l.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||A,onClick:function(n){(0,h.j)(n),b(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:A,children:S},R)):e.push((0,v.jsx)("div",{style:{padding:2},children:(0,v.jsx)(i.Z,{borderLess:!0,compact:t||A,default:!0,onClick:function(n){(0,h.j)(n),b(r)},outline:!0,small:A,children:S})},"button-tab-".concat(R)))})),e}),[t,b,m,A,g]),E=(0,v.jsx)(o.Z,{alignItems:"center",children:R});return s?E:(0,v.jsx)(f,{allowScroll:e,noPadding:p,children:E})}},21135:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return W}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),a=t(82684),l=t(83455),s=t(34376),d=t(28598);var p=function(n){var e=n.size;return(0,d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,d.jsx)("defs",{children:(0,d.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(27125),h=t(60328),v=t(32316),b=t(67971),m=t(38626),A=t(23831),g=m.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:2;",""],(function(n){return"\n background-color: ".concat(n.backgroundColor||(n.theme.background||A.Z.background).page,";\n border-bottom: 1px solid ").concat((n.theme.borders||A.Z.borders).medium,";\n ")})),R=t(51099),E=t(60547);var O=function(n){var e=n.size;return(0,d.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("g",{"clip-path":"url(#clip0_3007_70027)",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,d.jsxs)("defs",{children:[(0,d.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,d.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,d.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,d.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,d.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},T=t(47409),S=t(97496),y=t(41788),x=t(55378),C=t(86673),_=t(54283),Z=t(82531),D=t(56681),P=t(66166),N=t(10503),L=t(33766),j=t(59920),I=t(98781),k=t(66050),w=t(49125),M=t(7715),H=t(96510),B=t(59e3);function U(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function V(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?U(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var K={Icon:N.mR,IconSelected:O,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},X={Icon:N.Re,IconSelected:p,label:function(){return"Block runs"},uuid:"block_runs"},F=[K,X];function z(n){var e,t,r=n.pipeline,o=(0,s.useRouter)(),c=(0,a.useState)(null),u=c[0],p=c[1],m=(0,a.useState)(K),A=m[0],O=m[1],y=(0,a.useState)(D.G7[0]),N=y[0],U=y[1],z=(0,a.useState)({}),W=z[0],Y=z[1],G=(0,a.useState)(null),q=G[0],Q=G[1],J=(0,a.useMemo)((function(){return K.uuid===(null===A||void 0===A?void 0:A.uuid)}),[null===A||void 0===A?void 0:A.uuid]),$=r.uuid,nn=Z.ZP.pipelines.detail($,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,en=(0,a.useMemo)((function(){return V(V({},null===nn||void 0===nn?void 0:nn.pipeline),{},{uuid:$})}),[nn,$]),tn=(0,a.useState)(),rn=tn[0],on=tn[1],cn=(0,B.iV)(),un=(0,P.Z)(cn),an=null!==cn&&void 0!==cn&&cn.page?cn.page:0;(0,a.useEffect)((function(){var n=cn.pipeline_run_id,e=cn.status;if(!(0,M.Xy)(cn,un)){var t=V(V({},un),cn);n?t.pipeline_run_id=n:t.pipeline_uuid=$,e?t.status=e:delete t.status,Q(t),Y({})}}),[$,cn,un]);var ln={_limit:30,_offset:30*an,pipeline_uuid:$},sn=(0,M.gR)(V(V({},q),ln),["tab","page"]);J&&(sn=(0,M.gR)(sn,[L.O2]));var dn=Z.ZP.block_runs.list(sn,{},{pauseFetch:!q}).data,pn=(0,a.useMemo)((function(){return(null===dn||void 0===dn?void 0:dn.block_runs)||[]}),[dn]),fn=V({},ln);null!==cn&&void 0!==cn&&cn.status&&(fn.status=cn.status),J||(fn=(0,M.gR)(fn,[L.O2]));var hn=Z.ZP.pipeline_runs.list(fn,{refreshInterval:5e3}),vn=hn.data,bn=hn.mutate,mn=(0,a.useMemo)((function(){return(null===vn||void 0===vn?void 0:vn.pipeline_runs)||[]}),[vn]),An=(0,a.useMemo)((function(){var n,e;return J?(null===vn||void 0===vn||null===(n=vn.metadata)||void 0===n?void 0:n.count)||[]:(null===dn||void 0===dn||null===(e=dn.metadata)||void 0===e?void 0:e.count)||[]}),[null===dn||void 0===dn||null===(e=dn.metadata)||void 0===e?void 0:e.count,null===vn||void 0===vn||null===(t=vn.metadata)||void 0===t?void 0:t.count,J]),gn=(0,a.useMemo)((function(){return mn.some((function(n){var e=n.status;return e===k.V.INITIAL||e===k.V.RUNNING}))}),[mn]),Rn=(0,a.useMemo)((function(){return Object.values(W||{}).filter((function(n){return null!==n}))}),[W]),En=(0,l.Db)(Z.ZP.pipelines.useUpdate($),{onSuccess:function(n){return(0,H.wD)(n,{callback:function(){Y({}),bn()},onErrorCallback:function(n,e){return p({errors:e,response:n})}})}}),On=(0,i.Z)(En,2),Tn=On[0],Sn=On[1].isLoading,yn=(0,P.Z)(A);(0,a.useEffect)((function(){var n=cn.tab;n&&O(F.find((function(e){return e.uuid===n})))}),[cn,A,yn]);var xn=(0,a.useMemo)((function(){return(0,d.jsx)(C.Z,{p:2,children:(0,d.jsx)(R.Z,{maxPages:9,onUpdate:function(n){var e=Number(n),t=V(V({},cn),{},{page:e>=0?e:0});o.push("/pipelines/[pipeline]/runs","/pipelines/".concat($,"/runs?").concat((0,B.uM)(t)))},page:Number(an),totalPages:Math.ceil(An/30)})})}),[an,$,cn,o,An]),Cn=(0,a.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(S.Z,{allowBulkSelect:(null===en||void 0===en?void 0:en.type)!==I.qL.STREAMING,fetchPipelineRuns:bn,onClickRow:function(n){return on((function(e){var t=mn[n];return(null===e||void 0===e?void 0:e.id)!==t.id?t:null}))},pipelineRuns:mn,selectedRun:rn,selectedRuns:W,setErrors:p,setSelectedRuns:Y}),xn]})}),[bn,xn,null===en||void 0===en?void 0:en.type,mn,rn,W]),_n=(0,a.useMemo)((function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Z,{blockRuns:pn,pipeline:en}),xn]})}),[pn,xn,en]);return(0,d.jsxs)(E.Z,{afterHidden:J&&!rn,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:J?function(n){return(0,D.ZP)(V(V({},n),{},{selectedRun:rn,selectedTab:N,setSelectedTab:U}))}:function(n){return(0,D.ZP)(n)},errors:u,pageName:j.M.RUNS,pipeline:en,setErrors:p,title:function(n){var e=n.name;return"".concat(e," runs")},uuid:"".concat(j.M.RUNS,"_").concat($),children:[(0,d.jsx)(g,{children:(0,d.jsx)(C.Z,{py:1,children:(0,d.jsxs)(b.Z,{alignItems:"center",children:[gn&&J&&(0,d.jsx)(C.Z,{pl:2,children:(0,d.jsx)(h.Z,{danger:!0,loading:Sn,onClick:function(){Tn({pipeline:{status:k.V.CANCELLED}})},outline:!0,children:"Cancel running pipeline runs"})}),Rn.length>0&&(0,d.jsx)(C.Z,{pl:2,children:(0,d.jsxs)(h.Z,{loading:Sn,onClick:function(){Tn({pipeline:{pipeline_runs:Rn,status:I.QK.RETRY}})},primary:!0,children:["Retry selected runs (",Rn.length,")"]})}),(0,d.jsx)(v.Z,{onClickTab:function(n){var e=n.uuid;Q(null),(0,L.u7)({tab:e},{replaceParams:!0})},selectedTabUUID:null===A||void 0===A?void 0:A.uuid,tabs:F}),J&&(0,d.jsxs)(x.Z,{compact:!0,defaultColor:!0,onChange:function(n){n.preventDefault(),"all"===n.target.value?(Q(null),(0,L.u7)({tab:K.uuid},{replaceParams:!0})):(0,L.u7)({page:0,status:n.target.value})},paddingRight:4*w.iI,placeholder:"Select run status",value:null===q||void 0===q?void 0:q.status,children:[(0,d.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(k.V).map((function(n){return(0,d.jsx)("option",{value:n,children:T.Do[n]},n)}))]})]})})}),vn||dn?(0,d.jsxs)(d.Fragment,{children:[J&&Cn,X.uuid===(null===A||void 0===A?void 0:A.uuid)&&_n]}):(0,d.jsx)(C.Z,{m:3,children:(0,d.jsx)(_.Z,{inverted:!0})})]})}z.getInitialProps=function(){var n=(0,r.Z)(u().mark((function n(e){var t;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var W=(0,y.Z)(z)},33766:function(n,e,t){"use strict";t.d(e,{O2:function(){return d},g_:function(){return f},u7:function(){return p}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),a=t(24224);function l(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function s(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?l(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var d="_offset";function p(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.preserveParams,i=e.pushHistory,o=e.replaceParams,a=(0,u.iV)(),l={};t&&t.forEach((function(n){a[n]&&(l[n]=a[n])}));var d,p=o?l:a;d=window.location.pathname;var f=i?c().push:c().replace,h=s(s({},p),n);Object.entries(n).forEach((function(n){var e=(0,r.Z)(n,2),t=e[0],i=e[1];"undefined"!==typeof i&&null!==i||delete h[t]}));var v=(0,u.uM)(h);v.length>=1&&(v="?".concat(v));var b="".concat(d.split("?")[0]).concat(v);return f(c().router.pathname,b,{shallow:!0})}function f(n,e,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,l=void 0!==u&&u,f=t.resetLimitParams,h=s({},n);i?Object.entries(e).forEach((function(n){var e=(0,r.Z)(n,2),t=e[0],i=e[1];if(Array.isArray(i)){var o="".concat(t,"[]");h[o]=i.map(String)}})):o?Object.entries(e).forEach((function(n){var e=(0,r.Z)(n,2),t=e[0],i=e[1],o=String(i),c="".concat(t,"[]"),u=h[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?h[c]=(0,a.Od)(u,(function(n){return n===o})):h[c]=u.concat(o):h[c]=[o]})):h=s(s({},h),e),f&&(h._limit=c||20,h[d]=0),p(h,{pushHistory:l})}},79897:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(21135)}])}},function(n){n.O(0,[844,7607,4804,1774,9350,1424,1005,7815,547,3752,8312,2786,9774,2888,179],(function(){return e=79897,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(v(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},70543:function(e,n,t){"use strict";t.d(n,{IY:function(){return o},Jf:function(){return i},NR:function(){return l},b7:function(){return r}});var r="edit",i={uuid:"All files"},o={uuid:"Files in pipeline"},l=[i,o]},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return Z},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(73752),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),m=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(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 j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,b={uuid:"Run details"},y={uuid:"Dependency tree"},Z=[y,b];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,O=e.selectedTab,_=e.setSelectedTab,P=j({},(0,o.Z)(e,v));g?P.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):P.noStatus=!0;var w=(0,h.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},S=null===g||void 0===g?void 0:g.event_variables;if(S&&(0,h.Kn)(S)&&!(0,h.Qr)(S))if((0,h.Kn)(w)&&w.hasOwnProperty("event")){var C=(0,h.Kn)(w.event)?w.event:{};w.event=j(j({},C),S)}else w.event=j({},S);var I=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){I.push(" ".concat(e))}));var k=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,m.jsx)(c.Z,{language:"json",small:!0,source:I.join("\n")},"variable_value")]],E=g&&(0,m.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,m.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:k.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],o=t[1];return[(0,m.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,m.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:o},"val_".concat(n))]})),uuid:"LogDetail"})}),D=O&&_;return(0,m.jsxs)(m.Fragment,{children:[D&&(0,m.jsx)(u.Z,{py:p.cd,children:(0,m.jsx)(l.Z,{onClickTab:_,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:Z})}),(!D||y.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,m.jsx)(s.Z,j(j({},P),{},{height:n,heightOffset:(t||0)+(D?x:0),pipeline:i})),b.uuid===(null===O||void 0===O?void 0:O.uuid)&&E]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return v},e7:function(){return g},v0:function(){return p},wx:function(){return m}});var r=t(75582),i=t(82394),o=t(43313),l=t(93348),c=t(1286),s=t(90211),u=t(84779);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n=e.statistics,t=Object.keys(n),r=Array(o.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(o.Dy.includes(e)){var t=o.CC[e],i=n[e],l=i,c=!1,s=[2,3],a=o.Ub[e],d=o.oH[e],p=o.OD[e];if(o.y_.includes(e))c=!0,s=[2,1,2];else if(e in o.Sq){i=(0,u.Jw)(i,0);var f=o.Sq[e];l=n[f]}var h={columnFlexNumbers:s,name:t,progress:c,rate:l,successDirection:d,warning:p};o.y_.includes(e)||(h.value=i),r[a]=h}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var l=Object.values(t),u=l.length,a=[];a.push({name:"Column count",successDirection:o.oH.column_count,value:(0,s.x6)(u)}),i.forEach((function(e){if(o.Zu.includes(e)){var n=o.CC[e],t=r[e],i=o.OD[e];a.push({name:n,successDirection:o.oH[e],value:(0,s.x6)(t),warning:i})}}));var d=(0,c.QO)(l),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return a.push({name:"Categorical Features",rate:p/u,value:(0,s.x6)(p)},{name:"Numerical Features",rate:h/u,value:(0,s.x6)(h)},{name:"Datetime Features",rate:f/u,value:(0,s.x6)(f)}),a}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function m(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function v(e,n){return n===l.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===l.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function g(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],l=t[1],c=l;try{c=JSON.parse(l)}catch(s){}return d(d({},e),{},(0,i.Z)({},o,c))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(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 h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),o=t(31811),l=t(38626),c=t(65292),s=t(23831),u=t(2005),a=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,m=e.wrapLines,v=(0,r.useContext)(l.ThemeContext);function g(e){var r=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:u.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(g,{value:n})}},children:h})}},65730:function(e,n,t){"use strict";var r,i=t(82394),o=(t(82684),t(64866)),l=t(21764),c=t(67971),s=t(10919),u=t(86673),a=t(19711),d=t(46261),p=t(10503),f=t(49125),h=t(28598);function m(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 v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(r||(r={})),n.Z=function(e){var n,t=e.children,i=e.copiedText,m=e.iconPosition,g=void 0===m?r.LEFT:m,j=e.inverted,x=e.linkProps,b=e.linkText,y=e.monospace,Z=e.muted,O=e.small,_=e.toastMessage,P=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):P&&(n=(0,h.jsx)(s.Z,v(v({href:"#",inline:!0,muted:Z,preventDefault:!0,sameColorAsText:!0,small:O},x),{},{children:(0,h.jsxs)(c.Z,{alignItems:"center",children:[g===r.LEFT&&(0,h.jsx)(u.Z,{mr:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z,size:2*f.iI})})}),b&&(0,h.jsx)(a.ZP,{inverted:j,monospace:y,muted:Z,small:O,children:b}),g===r.RIGHT&&(0,h.jsx)(u.Z,{ml:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(_||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:i})},text:i,children:n})})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),o=t(67971),l=t(882),c=t(86673),s=t(19711),u=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),m=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,a=e.contained,p=e.noPadding,v=e.onClickTab,g=e.selectedTabUUID,j=e.small,x=e.tabs,b=(0,r.useMemo)((function(){var e=x.length,n=[];return x.forEach((function(r,a){var p=r.Icon,f=r.IconSelected,x=r.label,b=r.uuid,y=b===g,Z=y&&f||p,O=x?x():b,_=(0,m.jsxs)(o.Z,{alignItems:"center",children:[Z&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Z,{default:!y,size:2*d.iI}),(0,m.jsx)(c.Z,{mr:1})]}),(0,m.jsx)(s.ZP,{bold:!0,default:!y,noWrapping:!0,small:!0,children:O})]});a>=1&&e>=2&&n.push((0,m.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(b))),y?n.push((0,m.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||j,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:j,children:_},b)):n.push((0,m.jsx)("div",{style:{padding:2},children:(0,m.jsx)(i.Z,{borderLess:!0,compact:t||j,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:j,children:_})},"button-tab-".concat(b)))})),n}),[t,v,g,j,x]),y=(0,m.jsx)(o.Z,{alignItems:"center",children:b});return a?y:(0,m.jsx)(f,{allowScroll:n,noPadding:p,children:y})}},70422:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Re}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),v=t(51099),g=t(60547),j=t(97496),x=t(47409),b=t(93348),y=t(52769),Z=t(55378),O=t(86673),_=t(87815),P=t(19711),w=t(46261),S=t(82531),C=t(56681),I=t(2850),k=t(86422),E=t(10503),D=t(49125),T=t(59920),N=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var M=[{label:function(){return"AWS"},uuid:r.AWS}],A=(0,N.HK)(M,(function(e){return e.uuid})),R=t(66050),F=t(58122),U=t(19395),H=t(25958),z=t(33766),L=t(7715),q=t(9736),V=t(96510),W=t(66653),X=t(59e3),J=t(28598);function B(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 K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,l=e.setErrors,c=e.variables,s=(0,d.useRouter)(),N=(0,q.Ct)(),M=(r||{}).uuid,B=o||{},G=B.id,Y=B.event_matchers,Q=B.name,$=B.schedule_interval,ee=B.schedule_type,ne=B.settings,te=B.sla,re=B.start_time,ie=B.status,oe=B.variables,le=void 0===oe?{}:oe,ce=(0,X.iV)(),se={_limit:30,_offset:30*(null!==ce&&void 0!==ce&&ce.page?ce.page:0)};null!==ce&&void 0!==ce&&ce.status&&(se.status=ce.status);var ue=S.ZP.pipeline_runs.pipeline_schedules.list(G,se,{refreshInterval:3e3,revalidateOnFocus:!0}),ae=ue.data,de=ue.mutate,pe=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.pipeline_runs)||[]}),[ae]),fe=(0,u.useMemo)((function(){var e;return(null===ae||void 0===ae||null===(e=ae.metadata)||void 0===e?void 0:e.count)||[]}),[ae]),he=(0,u.useState)(null),me=he[0],ve=he[1],ge=(0,u.useMemo)((function(){var e=null!==ce&&void 0!==ce&&ce.page?ce.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(j.Z,{fetchPipelineRuns:de,onClickRow:function(e){return ve((function(n){var t=pe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:pe,selectedRun:me,setErrors:l}),(0,J.jsx)(O.Z,{p:2,children:(0,J.jsx)(v.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=K(K({},ce),{},{page:n>=0?n:0});s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(G,"?").concat((0,X.uM)(t)))},page:Number(e),totalPages:Math.ceil(fe/30)})})]})}),[de,r,pe,me]),je=(0,u.useState)(C.G7[0]),xe=je[0],be=je[1],ye=(0,a.Db)((function(e){return S.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,L.gR)(e,["id"])})}),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Ze=(0,i.Z)(ye,2),Oe=Ze[0],_e=Ze[1].isLoading,Pe=(0,u.useMemo)((function(){return b.fq.ACTIVE===ie}),[ie]),we=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*D.iI},r=[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.VW,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:null===(e=b.Z4[ee])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.rs,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,J.jsx)(P.ZP,{danger:!Pe,monospace:!0,success:Pe,children:ie},"trigger_status")]];if(te){var i=(0,U.gU)(te),o=i.time,l=i.unit,c=1===o?l:"".concat(l,"s");r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.kI,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:"".concat(o," ").concat(c)},"trigger_sla")])}($&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.Pf,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:$.replace("@","")},"trigger_frequency")]),re&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.aw,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:re},"trigger_start_date")]),null!==ne&&void 0!==ne&&ne.skip_if_previous_running)&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(w.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*D.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,J.jsx)(P.ZP,{monospace:!0,children:null===(n=ne.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==ne&&void 0!==ne&&ne.allow_blocks_to_fail&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(w.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*D.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,J.jsx)(P.ZP,{monospace:!0,children:ne.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:r})}),[Pe,$,ee,ne,te,re,ie]),Se=(0,u.useMemo)((function(){return le||{}}),[le]),Ce=(0,u.useMemo)((function(){var e,n=[];return(0,L.Qr)(Se)?n=(0,F.wx)(c,(function(e){return e.uuid===y.C})):Object.entries(Se).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];x.sZ!==r&&n.push({uuid:r,value:(0,F.FS)(o)})})),"undefined"!==typeof(n=(0,F.JZ)(n||[],ee))&&null!==(e=n)&&void 0!==e&&e.length?(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,J.jsx)(P.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(P.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[ee,Se,c]),Ie=(0,u.useMemo)((function(){var e,n,t=[],i=null===Se||void 0===Se||null===(e=Se[x.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(k.tf.DBT===n){var o,l=(null===i||void 0===i||null===(o=i[r])||void 0===o?void 0:o.configuration)||{},c=l.flags,s=l.prefix,u=l.suffix,a=(0,H.IU)(e).name;(c||s||u)&&t.push({flags:c,prefix:s,suffix:u,uuid:a})}})),"undefined"!==typeof t&&null!==t&&void 0!==t&&t.length?(0,J.jsx)(_.Z,{columnFlex:[1,null],rows:t.map((function(e){var n=e.flags,t=e.prefix,r=e.suffix,i=e.uuid;return[(0,J.jsxs)(P.ZP,{monospace:!0,small:!0,children:[t&&(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t}),i,r&&(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(i)),(0,J.jsx)(P.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(i))]}))}):null}),[r,Se]),ke=(0,u.useMemo)((function(){return(0,J.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===Y||void 0===Y?void 0:Y.map((function(e,n){var t=e.event_type,r=e.name;return[(0,J.jsx)(P.ZP,{default:!0,monospace:!0,children:A[t].label()},"".concat(t,"_").concat(n,"_label")),(0,J.jsx)(P.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[Y]);return(0,J.jsxs)(g.Z,{afterHidden:!me,before:(0,J.jsxs)(I.M,{children:[(0,J.jsxs)(O.Z,{mb:D.HN,pt:D.cd,px:D.cd,children:[(0,J.jsxs)(O.Z,{mb:D.cd,children:[b.Xm.TIME===ee&&(0,J.jsx)(E.kO,{size:5*D.iI}),b.Xm.EVENT===ee&&(0,J.jsx)(E.Jp,{size:5*D.iI}),b.Xm.API===ee&&(0,J.jsx)(E.Bf,{size:5*D.iI}),!ee&&(0,J.jsx)(E.VW,{size:5*D.iI})]}),(0,J.jsx)(m.Z,{children:Q})]}),(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),we,(null===Y||void 0===Y?void 0:Y.length)>=1&&(0,J.jsxs)(O.Z,{my:D.HN,children:[(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Events"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),ke]}),Ce&&(0,J.jsxs)(O.Z,{my:D.HN,children:[(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ce]}),Ie&&(0,J.jsxs)(O.Z,{my:D.HN,children:[(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"dbt runtime settings"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie]})]}),beforeWidth:I.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(M,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return Q},linkProps:{as:"/pipelines/".concat(M,"/triggers/").concat(G),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,C.ZP)(K(K({},e),{},{selectedRun:me,selectedTab:xe,setSelectedTab:be}))},errors:n,pageName:T.M.TRIGGERS,pipeline:r,setErrors:l,subheader:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(p.Z,{beforeIcon:Pe?(0,J.jsx)(E.dz,{size:2*D.iI}):(0,J.jsx)(E.Py,{inverted:!N,size:2*D.iI}),danger:Pe&&!N,loading:_e,onClick:function(e){(0,W.j)(e),Oe({id:G,status:Pe?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!Pe&&!N,children:Pe?"Pause trigger":"Start trigger"}),(0,J.jsx)(O.Z,{mr:D.cd}),!N&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(M,"/triggers/").concat(G,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,J.jsx)(O.Z,{mr:D.cd})]}),(0,J.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(G)):(0,z.u7)({page:0,status:e.target.value})},paddingRight:4*D.iI,placeholder:"Select run status",value:(null===ce||void 0===ce?void 0:ce.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(R.V).map((function(e){return(0,J.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return Q},uuid:"triggers/detail",children:[(0,J.jsx)(O.Z,{mt:D.cd,px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,J.jsx)(f.Z,{light:!0,mt:D.cd,short:!0}),ge]})},Y=t(21831),Q=t(21764),$=t(2713),ee=t(38341),ne=t(47999),te=t(22673),re=t(65730),ie=t(38626),oe=t(16634),le=t(82944),ce=t(44162);function se(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 ue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ae=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,i=(0,u.useContext)(ie.ThemeContext),o=(0,u.useCallback)((function(e,n){return t((function(){var t=(null===r||void 0===r?void 0:r.__mage_variables)||{},i=(null===t||void 0===t?void 0:t.blocks)||{},o=i[e]||{},c=(null===o||void 0===o?void 0:o.configuration)||{};return ue(ue({},r),{},{__mage_variables:ue(ue({},t),{},{blocks:ue(ue({},i),{},(0,l.Z)({},e,ue(ue({},o),{},{configuration:ue(ue({},c),n)})))})})}))}),[t,r]);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(m.Z,{children:"dbt runtime settings"}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(_.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,l,c=e.type,s=e.uuid,u=(0,H.IU)(e).name,a=(0,ce.qn)(c,{blockColor:e.color,theme:i}).accent,d=null===r||void 0===r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(l=t[s])||void 0===l?void 0:l.configuration,p=d||{},f=p.prefix,m=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],g=!(null===v||void 0===v||!v.includes(H.Dy));return[(0,J.jsx)(w.Z,{block:!0,label:(0,J.jsx)(P.ZP,{monospace:!0,small:!0,children:s}),size:null,widthFitContent:!0,children:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(oe.Z,{color:a,size:1.5*D.iI,square:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsxs)(P.ZP,{monospace:!0,small:!0,children:[f&&(0,J.jsx)(P.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),u,m&&(0,J.jsx)(P.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:m})]})]})},"uuid-".concat(s)),(0,J.jsx)(h.Z,{alignItems:"center",children:(0,J.jsx)(ee.Z,{checked:g,label:H.Dy,monospace:!0,onClick:function(){return o(s,{flags:g?(0,N.Od)(v,(function(e){return H.Dy===e})):v.concat(H.Dy)})},small:!0})},"flags-".concat(s)),(0,J.jsx)(le.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*D.iI},"prefix-".concat(s)),(0,J.jsx)(le.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:m,width:10*D.iI},"suffix-".concat(s))]}))})})]})},de=t(93461),pe=t(10919),fe=t(26304),he=t(23831),me=t(2005),ve=t(31012),ge=["children","large","lineHeight","ordered"];function je(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 xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?je(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var be=(0,ie.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||he.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||he.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||he.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(me.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(me.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ve.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ve.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ve.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),ye=ie.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],be),Ze=ie.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],be),Oe=ie.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*D.iI,"px;\n ")}));var _e=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,fe.Z)(e,ge),l=i?Ze:ye;return(0,J.jsx)(l,xe(xe({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){var r;return(0,J.jsx)(Oe,xe(xe({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},Pe=t(98781),we=t(70902),Se=t(18025);function Ce(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 Ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:b.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:b.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:b.Xm.API}];return e?n.slice(0,1):n};var Ee=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,c=e.setErrors,s=e.variables,v=(0,d.useRouter)(),j=null===r||void 0===r?void 0:r.uuid,w=null===o||void 0===o?void 0:o.id,C=(null===r||void 0===r?void 0:r.type)===Pe.qL.STREAMING,I=(0,u.useState)([]),A=I[0],R=I[1],H=(0,u.useState)(!1),z=H[0],q=H[1],W=(0,u.useState)(!1),X=W[0],B=W[1],K=(0,u.useState)(),G=K[0],ie=K[1],oe=(0,u.useState)({}),ce=oe[0],se=oe[1],ue=(0,u.useState)(o),fe=ue[0],he=ue[1],me=(0,u.useState)(!1),ve=me[0],ge=me[1],je=(0,u.useState)(null),xe=je[0],be=je[1],ye=(0,u.useMemo)((function(){return(0,F.wx)(s,(function(e){return e.uuid===y.C}))}),[s]),Ze=fe||{},Oe=Ze.name,Ce=Ze.schedule_interval,Ee=Ze.schedule_type,De=Ze.settings,Te=void 0===De?{}:De,Ne=Ze.sla,Me=Ze.start_time,Ae=Ze.variables,Re=void 0===Ae?{}:Ae;(0,u.useEffect)((function(){Te&&ie(Te)}),[Te]);var Fe=(0,u.useState)(null),Ue=Fe[0],He=Fe[1],ze=(0,u.useState)({hour:"00",minute:"00"}),Le=ze[0],qe=ze[1],Ve=S.ZP.event_rules.detail("aws").data,We=(0,u.useMemo)((function(){var e;return(null===Ve||void 0===Ve||null===(e=Ve.event_rule)||void 0===e?void 0:e.rules)||[]}),[Ve]),Xe=(0,u.useMemo)((function(){return(0,N.HK)(We,(function(e){return e.name}))}),[We]),Je=(0,a.Db)(S.ZP.pipeline_schedules.useUpdate(w),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){t(),v.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(j,"/triggers/").concat(w))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Be=(0,i.Z)(Je,2),Ke=Be[0],Ge=Be[1].isLoading,Ye=(0,u.useMemo)((function(){return Re||{}}),[Re]);(0,u.useEffect)((function(){if(Me){var e=Me.split(" ")[1];He((0,U.eI)(Me)),qe({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;He(n),qe({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[Me]),(0,u.useEffect)((function(){Ye&&Object.keys(Ye).length>0&&q(!0)}),[Ye]),(0,u.useEffect)((function(){se(z?null===ye||void 0===ye?void 0:ye.reduce((function(e,n){var t=n.uuid,r=n.value;return Ie(Ie({},e),{},(0,l.Z)({},t,Ye[t]||r))}),{}):null)}),[ye,z]),(0,u.useEffect)((function(){if(o&&(R(o.event_matchers),$e?(he(Ie(Ie({},o),{},{schedule_interval:"custom"})),be(Ce)):he(C?Ie(Ie({},o),{},{schedule_interval:b.U5.ONCE}):o),o.sla)){B(!0);var e=(0,U.gU)(Ne),n=e.time,t=e.unit;he((function(e){return Ie(Ie({},e),{},{slaAmount:n,slaUnit:t})}))}}),[o]);var Qe=(0,u.useCallback)((function(){var e=Ie(Ie({},(0,L.GL)(fe,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,F.e7)(ce)});if(b.Xm.EVENT===fe.schedule_type?e.event_matchers=A:(e.schedule_interval=$e?xe:fe.schedule_interval,e.start_time=Ue&&null!==Le&&void 0!==Le&&Le.hour&&null!==Le&&void 0!==Le&&Le.minute?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===Le||void 0===Le?void 0:Le.hour,":").concat(null===Le||void 0===Le?void 0:Le.minute,":00"):null),X){var n=null===fe||void 0===fe?void 0:fe.slaAmount,t=null===fe||void 0===fe?void 0:fe.slaUnit;if(!n||isNaN(n)||!t)return void Q.Am.error("Please enter a valid SLA",{position:Q.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,U.vJ)(n,t)}else null!==o&&void 0!==o&&o.sla&&(e.sla=0);e.settings=G,Ke({pipeline_schedule:e})}),[xe,Ue,X,A,o,ce,fe,G,Le,Ke]),$e=(0,u.useMemo)((function(){return Ce&&!Object.values(b.U5).includes(Ce)}),[Ce]),en=(0,u.useMemo)((function(){var e=[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.KJ,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_detail")],[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.Pf,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,J.jsxs)("div",{children:[(0,J.jsxs)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;he((function(e){return Ie(Ie({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Ce,children:[Object.values(b.U5).map((function(e){return(0,J.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,J.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,J.jsx)(O.Z,{mt:1,p:1,children:(0,J.jsxs)(P.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")],[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.aw,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,J.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!ve&&(0,J.jsx)(le.Z,{monospace:!0,onClick:function(){return ge((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ue?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===Le||void 0===Le?void 0:Le.hour,":").concat(null===Le||void 0===Le?void 0:Le.minute):""}),(0,J.jsx)("div",{style:{width:"400px"},children:(0,J.jsx)(ne.Z,{disableEscape:!0,onClickOutside:function(){return ge(!1)},open:ve,style:{position:"relative"},children:(0,J.jsx)($.Z,{selectedDate:Ue,selectedTime:Le,setSelectedDate:He,setSelectedTime:qe,topPosition:!0})})})]},"start_time_input")]];return C&&e.splice(1,1),$e&&e.splice(2,0,[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.EK,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,J.jsxs)("div",{children:[(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),be(e.target.value)},placeholder:"* * * * *",value:xe}),(0,J.jsxs)(O.Z,{mt:1,p:1,children:[(0,J.jsxs)(P.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,J.jsxs)(P.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,J.jsx)(pe.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:2,px:D.cd,children:(0,J.jsx)(m.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Ue,$e,C,Oe,Ce,ve,Le]),nn=(0,u.useCallback)((function(e,n){R((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,Y.Z)(t)}))}),[R]),tn=(0,u.useMemo)((function(){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:D.cd,px:D.cd,children:(0,J.jsx)(m.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.KJ,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_event")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Events"}),(0,J.jsxs)(P.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,J.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,J.jsxs)(O.Z,{mt:D.Mq,children:[(0,J.jsx)(P.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,J.jsxs)(P.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,J.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,J.jsx)(pe.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsxs)(_e,{monospace:!0,ordered:!0,children:[(0,J.jsx)(P.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,J.jsx)(P.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,J.jsx)(P.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(null===A||void 0===A?void 0:A.length)>=1&&(0,J.jsx)(_.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===A||void 0===A?void 0:A.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,J.jsx)(Z.Z,{monospace:!0,onChange:function(e){return nn(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:M.map((function(e){var n=e.label,t=e.uuid;return(0,J.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,J.jsx)(Z.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Xe[r])||void 0===t?void 0:t.event_pattern;nn(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:We.map((function(e){var n=e.name;return(0,J.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),i&&(0,J.jsx)(te.Z,{language:"json",small:!0,source:l.join("\n")}),(0,J.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return R((function(e){return(0,N.oM)(e,n)}))},children:(0,J.jsx)(E.rF,{default:!0,size:2*D.iI})},"remove_event")]}))}),(0,J.jsx)(O.Z,{p:D.cd,children:(0,J.jsx)(p.Z,{beforeIcon:(0,J.jsx)(E.mm,{size:2*D.iI}),onClick:function(){return R((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[A,We,Xe,Oe,nn]),rn=!0,on=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===o||void 0===o?void 0:o.id,"/pipeline_runs"),null!==o&&void 0!==o&&o.token&&(n="".concat(n,"/").concat(o.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:D.cd,px:D.cd,children:(0,J.jsx)(m.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.KJ,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_api")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Endpoint"}),(0,J.jsxs)(P.ZP,{muted:!0,children:["Make a ",(0,J.jsx)(P.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(re.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Payload"}),(0,J.jsx)(P.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(re.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,J.jsx)(te.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Sample cURL command"}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(te.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[Oe,o,rn]),ln=!Ee||b.Xm.TIME===Ee&&!(C&&Ue||!C&&Ue&&Ce)||b.Xm.EVENT===Ee&&(!(null!==A&&void 0!==A&&A.length)||!A.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),cn=(0,u.useMemo)((function(){var e;return(null===r||void 0===r||null===(e=r.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return k.tf.DBT===n})))||[]}),[r]),sn=(0,u.useMemo)((function(){return(0,J.jsxs)(O.Z,{p:D.cd,children:[(0,J.jsxs)(O.Z,{mb:D.HN,children:[(0,J.jsx)(m.Z,{children:"Pipeline run settings"}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(h.Z,{alignItems:"center",children:(0,J.jsx)(ee.Z,{checked:null===G||void 0===G?void 0:G.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return ie((function(e){return Ie(Ie({},e),{},{allow_blocks_to_fail:!(null!==G&&void 0!==G&&G.allow_blocks_to_fail)})}))}})})}),b.Xm.TIME===Ee&&(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(h.Z,{alignItems:"center",children:(0,J.jsx)(ee.Z,{checked:null===G||void 0===G?void 0:G.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return ie((function(e){return Ie(Ie({},e),{},{skip_if_previous_running:!(null!==G&&void 0!==G&&G.skip_if_previous_running)})}))}})})}),(0,J.jsxs)(O.Z,{mt:D.Mq,children:[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(we.Z,{checked:X,onCheck:function(e){B(e),e||he((function(e){return Ie(Ie({},e),{},{slaAmount:0})}))}})}),(0,J.jsx)(P.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),X&&(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.aw,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,J.jsxs)(h.Z,{children:[(0,J.jsx)(de.Z,{flex:1,children:(0,J.jsx)(le.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===fe||void 0===fe?void 0:fe.slaAmount})}),(0,J.jsx)(de.Z,{flex:1,children:(0,J.jsx)(Z.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===fe||void 0===fe?void 0:fe.slaUnit,children:Object.keys(U.tL).map((function(e){return(0,J.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]})]}),(0,J.jsxs)(O.Z,{mb:D.HN,children:[(0,J.jsx)(m.Z,{children:"Runtime variables"}),!(0,L.Qr)(ye)&&(0,J.jsxs)(O.Z,{mt:D.Mq,children:[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(we.Z,{checked:z,onCheck:q})}),(0,J.jsx)(P.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),z&&ce&&Object.entries(ce).length>0&&(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(ce).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return x.sZ===r?e:e.concat([[(0,J.jsx)(P.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),(0,J.jsx)(le.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),se((function(n){return Ie(Ie({},n),{},(0,l.Z)({},r,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:o},"variable_uuid_input_".concat(r))]])}),[])})})]})]}),(null===cn||void 0===cn?void 0:cn.length)>=1&&(0,J.jsx)(O.Z,{mb:D.HN,children:(0,J.jsx)(ae,{blocks:cn,updateVariables:se,variables:Ie(Ie({},Ye),ce)})})]})}),[cn,X,ye,z,ce,fe,Ee,Ye,B,q,se,G]);return(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(g.Z,{after:sn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(j,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===o||void 0===o?void 0:o.name},linkProps:{as:"/pipelines/".concat(j,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:n,pageName:T.M.TRIGGERS,pipeline:r,setErrors:c,subheader:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(p.Z,{disabled:ln,loading:Ge,onClick:Qe,outline:!0,primary:!0,children:"Save changes"}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(j,"/triggers/").concat(w)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===o||void 0===o?void 0:o.name)},uuid:"triggers/edit",children:[(0,J.jsxs)(O.Z,{p:D.cd,children:[(0,J.jsxs)(O.Z,{mb:2,children:[(0,J.jsx)(m.Z,{children:"Trigger type"}),(0,J.jsx)(P.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,J.jsx)(h.Z,{children:ke(C).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=Ee===r,o=Ee&&!i;return(0,J.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){b.Xm.EVENT!==r||null!==A&&void 0!==A&&A.length||R([{}]),he((function(e){return Ie(Ie({},e),{},{schedule_type:r})}))},children:(0,J.jsx)(Se.U,{selected:i,children:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(de.Z,{children:(0,J.jsx)("input",{checked:i,type:"radio"})}),(0,J.jsx)(O.Z,{mr:D.cd}),(0,J.jsxs)(de.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,J.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,J.jsx)(P.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,J.jsxs)(O.Z,{mt:5,children:[b.Xm.TIME===Ee&&en,b.Xm.EVENT===Ee&&tn,b.Xm.API===Ee&&on]})]})})},De=t(41788),Te=t(70543);function Ne(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 Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ae(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),o=i[0],l=i[1],c=S.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=null===c||void 0===c?void 0:c.variables,a=S.ZP.pipeline_schedules.detail(n),d=a.data,p=a.mutate,f=null===d||void 0===d?void 0:d.pipeline_schedule,h=S.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,m=Me(Me({},null===h||void 0===h?void 0:h.pipeline),{},{uuid:t});return Te.b7===r?(0,J.jsx)(Ee,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s}):(0,J.jsx)(G,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s})}Ae.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Re=(0,De.Z)(Ae)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(70422)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,9350,5872,4495,1424,1005,7815,547,3714,3752,1286,8312,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(v(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},70543:function(e,n,t){"use strict";t.d(n,{IY:function(){return o},Jf:function(){return i},NR:function(){return l},b7:function(){return r}});var r="edit",i={uuid:"All files"},o={uuid:"Files in pipeline"},l=[i,o]},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},56681:function(e,n,t){"use strict";t.d(n,{G7:function(){return Z},ZP:function(){return O},u$:function(){return x}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(73752),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(7715),m=t(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(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 j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x=76,b={uuid:"Run details"},y={uuid:"Dependency tree"},Z=[y,b];function O(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,O=e.selectedTab,_=e.setSelectedTab,P=j({},(0,o.Z)(e,v));g?P.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):P.noStatus=!0;var w=(0,h.Kn)(null===g||void 0===g?void 0:g.variables)?j({},null===g||void 0===g?void 0:g.variables):(null===g||void 0===g?void 0:g.variables)||{},S=null===g||void 0===g?void 0:g.event_variables;if(S&&(0,h.Kn)(S)&&!(0,h.Qr)(S))if((0,h.Kn)(w)&&w.hasOwnProperty("event")){var C=(0,h.Kn)(w.event)?w.event:{};w.event=j(j({},C),S)}else w.event=j({},S);var I=[];w&&JSON.stringify(w,null,2).split("\n").forEach((function(e){I.push(" ".concat(e))}));var k=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,m.jsx)(c.Z,{language:"json",small:!0,source:I.join("\n")},"variable_value")]],E=g&&(0,m.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,m.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:k.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],o=t[1];return[(0,m.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,m.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:o},"val_".concat(n))]})),uuid:"LogDetail"})}),D=O&&_;return(0,m.jsxs)(m.Fragment,{children:[D&&(0,m.jsx)(u.Z,{py:p.cd,children:(0,m.jsx)(l.Z,{onClickTab:_,selectedTabUUID:null===O||void 0===O?void 0:O.uuid,tabs:Z})}),(!D||y.uuid===(null===O||void 0===O?void 0:O.uuid))&&(0,m.jsx)(s.Z,j(j({},P),{},{height:n,heightOffset:(t||0)+(D?x:0),pipeline:i})),b.uuid===(null===O||void 0===O?void 0:O.uuid)&&E]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return v},e7:function(){return g},v0:function(){return p},wx:function(){return m}});var r=t(75582),i=t(82394),o=t(43313),l=t(93348),c=t(1286),s=t(90211),u=t(84779);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n=e.statistics,t=Object.keys(n),r=Array(o.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(o.Dy.includes(e)){var t=o.CC[e],i=n[e],l=i,c=!1,s=[2,3],a=o.Ub[e],d=o.oH[e],p=o.OD[e];if(o.y_.includes(e))c=!0,s=[2,1,2];else if(e in o.Sq){i=(0,u.Jw)(i,0);var f=o.Sq[e];l=n[f]}var h={columnFlexNumbers:s,name:t,progress:c,rate:l,successDirection:d,warning:p};o.y_.includes(e)||(h.value=i),r[a]=h}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var l=Object.values(t),u=l.length,a=[];a.push({name:"Column count",successDirection:o.oH.column_count,value:(0,s.x6)(u)}),i.forEach((function(e){if(o.Zu.includes(e)){var n=o.CC[e],t=r[e],i=o.OD[e];a.push({name:n,successDirection:o.oH[e],value:(0,s.x6)(t),warning:i})}}));var d=(0,c.QO)(l),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return a.push({name:"Categorical Features",rate:p/u,value:(0,s.x6)(p)},{name:"Numerical Features",rate:h/u,value:(0,s.x6)(h)},{name:"Datetime Features",rate:f/u,value:(0,s.x6)(f)}),a}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function m(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function v(e,n){return n===l.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===l.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function g(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],l=t[1],c=l;try{c=JSON.parse(l)}catch(s){}return d(d({},e),{},(0,i.Z)({},o,c))}),{}):e}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(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 h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},22673:function(e,n,t){"use strict";var r=t(82684),i=t(68792),o=t(31811),l=t(38626),c=t(65292),s=t(23831),u=t(2005),a=t(49125),d=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,p=e.showLineNumbers,f=e.small,h=e.source,m=e.wrapLines,v=(0,r.useContext)(l.ThemeContext);function g(e){var r=e.value;return(0,d.jsx)(o.Z,{customStyle:{backgroundColor:(v.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:u.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,maxWidth:t,paddingBottom:2*a.iI,paddingTop:2*a.iI},language:n,lineNumberStyle:{color:(v.content||s.Z.content).muted},showLineNumbers:p,style:c._4,useInlineStyles:!0,wrapLines:m,children:r})}return(0,d.jsx)(i.D,{components:{code:function(e){var n=e.children;return(0,d.jsx)(g,{value:n})}},children:h})}},65730:function(e,n,t){"use strict";var r,i=t(82394),o=(t(82684),t(64866)),l=t(21764),c=t(67971),s=t(10919),u=t(86673),a=t(19711),d=t(46261),p=t(10503),f=t(49125),h=t(28598);function m(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 v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.LEFT="left",e.RIGHT="right"}(r||(r={})),n.Z=function(e){var n,t=e.children,i=e.copiedText,m=e.iconPosition,g=void 0===m?r.LEFT:m,j=e.inverted,x=e.linkProps,b=e.linkText,y=e.monospace,Z=e.muted,O=e.small,_=e.toastMessage,P=e.withCopyIcon;return t?n=(0,h.jsx)("span",{children:t}):P&&(n=(0,h.jsx)(s.Z,v(v({href:"#",inline:!0,muted:Z,preventDefault:!0,sameColorAsText:!0,small:O},x),{},{children:(0,h.jsxs)(c.Z,{alignItems:"center",children:[g===r.LEFT&&(0,h.jsx)(u.Z,{mr:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z,size:2*f.iI})})}),b&&(0,h.jsx)(a.ZP,{inverted:j,monospace:y,muted:Z,small:O,children:b}),g===r.RIGHT&&(0,h.jsx)(u.Z,{ml:b?1:0,children:(0,h.jsx)(c.Z,{alignItems:"center",children:(0,h.jsx)(p.CK,{inverted:j,muted:Z})})})]})}))),(0,h.jsx)(d.Z,{block:!0,label:"Copy",size:null,widthFitContent:!0,children:(0,h.jsx)(o.CopyToClipboard,{onCopy:function(){return l.Am.success(_||"Successfully copied to clipboard.",{position:l.Am.POSITION.BOTTOM_RIGHT,toastId:i})},text:i,children:n})})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return v}});var r=t(82684),i=t(60328),o=t(67971),l=t(882),c=t(86673),s=t(19711),u=t(99994),a=t(38626),d=t(49125),p=t(37391),f=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],d.cd*d.iI,d.cd*d.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),p.w5),h=t(66653),m=t(28598);var v=function(e){var n=e.allowScroll,t=e.compact,a=e.contained,p=e.noPadding,v=e.onClickTab,g=e.selectedTabUUID,j=e.small,x=e.tabs,b=(0,r.useMemo)((function(){var e=x.length,n=[];return x.forEach((function(r,a){var p=r.Icon,f=r.IconSelected,x=r.label,b=r.uuid,y=b===g,Z=y&&f||p,O=x?x():b,_=(0,m.jsxs)(o.Z,{alignItems:"center",children:[Z&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Z,{default:!y,size:2*d.iI}),(0,m.jsx)(c.Z,{mr:1})]}),(0,m.jsx)(s.ZP,{bold:!0,default:!y,noWrapping:!0,small:!0,children:O})]});a>=1&&e>=2&&n.push((0,m.jsx)("div",{style:{marginLeft:1.5*d.iI}},"spacing-".concat(b))),y?n.push((0,m.jsx)(l.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:t||j,onClick:function(e){(0,h.j)(e),v(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:j,children:_},b)):n.push((0,m.jsx)("div",{style:{padding:2},children:(0,m.jsx)(i.Z,{borderLess:!0,compact:t||j,default:!0,onClick:function(e){(0,h.j)(e),v(r)},outline:!0,small:j,children:_})},"button-tab-".concat(b)))})),n}),[t,v,g,j,x]),y=(0,m.jsx)(o.Z,{alignItems:"center",children:b});return a?y:(0,m.jsx)(f,{allowScroll:n,noPadding:p,children:y})}},70422:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Re}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),v=t(51099),g=t(60547),j=t(97496),x=t(47409),b=t(93348),y=t(52769),Z=t(55378),O=t(86673),_=t(87815),P=t(19711),w=t(46261),S=t(82531),C=t(56681),I=t(2850),k=t(86422),E=t(10503),D=t(49125),T=t(59920),N=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var M=[{label:function(){return"AWS"},uuid:r.AWS}],A=(0,N.HK)(M,(function(e){return e.uuid})),R=t(66050),F=t(58122),U=t(19395),H=t(25958),z=t(33766),L=t(7715),q=t(9736),V=t(96510),W=t(66653),X=t(59e3),J=t(28598);function B(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 K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?B(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):B(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,l=e.setErrors,c=e.variables,s=(0,d.useRouter)(),N=(0,q.Ct)(),M=(r||{}).uuid,B=o||{},G=B.id,Y=B.event_matchers,Q=B.name,$=B.schedule_interval,ee=B.schedule_type,ne=B.settings,te=B.sla,re=B.start_time,ie=B.status,oe=B.variables,le=void 0===oe?{}:oe,ce=(0,X.iV)(),se={_limit:30,_offset:30*(null!==ce&&void 0!==ce&&ce.page?ce.page:0)};null!==ce&&void 0!==ce&&ce.status&&(se.status=ce.status);var ue=S.ZP.pipeline_runs.pipeline_schedules.list(G,se,{refreshInterval:3e3,revalidateOnFocus:!0}),ae=ue.data,de=ue.mutate,pe=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.pipeline_runs)||[]}),[ae]),fe=(0,u.useMemo)((function(){var e;return(null===ae||void 0===ae||null===(e=ae.metadata)||void 0===e?void 0:e.count)||[]}),[ae]),he=(0,u.useState)(null),me=he[0],ve=he[1],ge=(0,u.useMemo)((function(){var e=null!==ce&&void 0!==ce&&ce.page?ce.page:0;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(j.Z,{fetchPipelineRuns:de,onClickRow:function(e){return ve((function(n){var t=pe[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:pe,selectedRun:me,setErrors:l}),(0,J.jsx)(O.Z,{p:2,children:(0,J.jsx)(v.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),t=K(K({},ce),{},{page:n>=0?n:0});s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(G,"?").concat((0,X.uM)(t)))},page:Number(e),totalPages:Math.ceil(fe/30)})})]})}),[de,r,pe,me]),je=(0,u.useState)(C.G7[0]),xe=je[0],be=je[1],ye=(0,a.Db)((function(e){return S.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,L.gR)(e,["id"])})}),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){t()},onErrorCallback:function(e,n){return l({errors:n,response:e})}})}}),Ze=(0,i.Z)(ye,2),Oe=Ze[0],_e=Ze[1].isLoading,Pe=(0,u.useMemo)((function(){return b.fq.ACTIVE===ie}),[ie]),we=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*D.iI},r=[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.VW,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:null===(e=b.Z4[ee])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.rs,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,J.jsx)(P.ZP,{danger:!Pe,monospace:!0,success:Pe,children:ie},"trigger_status")]];if(te){var i=(0,U.gU)(te),o=i.time,l=i.unit,c=1===o?l:"".concat(l,"s");r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.kI,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:"".concat(o," ").concat(c)},"trigger_sla")])}($&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.Pf,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:$.replace("@","")},"trigger_frequency")]),re&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.aw,K({},t)),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,J.jsx)(P.ZP,{monospace:!0,children:re},"trigger_start_date")]),null!==ne&&void 0!==ne&&ne.skip_if_previous_running)&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(w.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*D.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,J.jsx)(P.ZP,{monospace:!0,children:null===(n=ne.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==ne&&void 0!==ne&&ne.allow_blocks_to_fail&&r.push([(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(w.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*D.iI,widthFitContent:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,J.jsx)(P.ZP,{monospace:!0,children:ne.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:r})}),[Pe,$,ee,ne,te,re,ie]),Se=(0,u.useMemo)((function(){return le||{}}),[le]),Ce=(0,u.useMemo)((function(){var e,n=[];return(0,L.Qr)(Se)?n=(0,F.wx)(c,(function(e){return e.uuid===y.C})):Object.entries(Se).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];x.sZ!==r&&n.push({uuid:r,value:(0,F.FS)(o)})})),"undefined"!==typeof(n=(0,F.JZ)(n||[],ee))&&null!==(e=n)&&void 0!==e&&e.length?(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,J.jsx)(P.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,J.jsx)(P.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[ee,Se,c]),Ie=(0,u.useMemo)((function(){var e,n,t=[],i=null===Se||void 0===Se||null===(e=Se[x.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(k.tf.DBT===n){var o,l=(null===i||void 0===i||null===(o=i[r])||void 0===o?void 0:o.configuration)||{},c=l.flags,s=l.prefix,u=l.suffix,a=(0,H.IU)(e).name;(c||s||u)&&t.push({flags:c,prefix:s,suffix:u,uuid:a})}})),"undefined"!==typeof t&&null!==t&&void 0!==t&&t.length?(0,J.jsx)(_.Z,{columnFlex:[1,null],rows:t.map((function(e){var n=e.flags,t=e.prefix,r=e.suffix,i=e.uuid;return[(0,J.jsxs)(P.ZP,{monospace:!0,small:!0,children:[t&&(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t}),i,r&&(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:r})]},"settings_variable_label_".concat(i)),(0,J.jsx)(P.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(i))]}))}):null}),[r,Se]),ke=(0,u.useMemo)((function(){return(0,J.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===Y||void 0===Y?void 0:Y.map((function(e,n){var t=e.event_type,r=e.name;return[(0,J.jsx)(P.ZP,{default:!0,monospace:!0,children:A[t].label()},"".concat(t,"_").concat(n,"_label")),(0,J.jsx)(P.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[Y]);return(0,J.jsxs)(g.Z,{afterHidden:!me,before:(0,J.jsxs)(I.M,{children:[(0,J.jsxs)(O.Z,{mb:D.HN,pt:D.cd,px:D.cd,children:[(0,J.jsxs)(O.Z,{mb:D.cd,children:[b.Xm.TIME===ee&&(0,J.jsx)(E.kO,{size:5*D.iI}),b.Xm.EVENT===ee&&(0,J.jsx)(E.Jp,{size:5*D.iI}),b.Xm.API===ee&&(0,J.jsx)(E.Bf,{size:5*D.iI}),!ee&&(0,J.jsx)(E.VW,{size:5*D.iI})]}),(0,J.jsx)(m.Z,{children:Q})]}),(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),we,(null===Y||void 0===Y?void 0:Y.length)>=1&&(0,J.jsxs)(O.Z,{my:D.HN,children:[(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Events"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),ke]}),Ce&&(0,J.jsxs)(O.Z,{my:D.HN,children:[(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ce]}),Ie&&(0,J.jsxs)(O.Z,{my:D.HN,children:[(0,J.jsx)(O.Z,{px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"dbt runtime settings"})}),(0,J.jsx)(f.Z,{light:!0,mt:1,short:!0}),Ie]})]}),beforeWidth:I.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(M,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return Q},linkProps:{as:"/pipelines/".concat(M,"/triggers/").concat(G),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,C.ZP)(K(K({},e),{},{selectedRun:me,selectedTab:xe,setSelectedTab:be}))},errors:n,pageName:T.M.TRIGGERS,pipeline:r,setErrors:l,subheader:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(p.Z,{beforeIcon:Pe?(0,J.jsx)(E.dz,{size:2*D.iI}):(0,J.jsx)(E.Py,{inverted:!N,size:2*D.iI}),danger:Pe&&!N,loading:_e,onClick:function(e){(0,W.j)(e),Oe({id:G,status:Pe?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!Pe&&!N,children:Pe?"Pause trigger":"Start trigger"}),(0,J.jsx)(O.Z,{mr:D.cd}),!N&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(M,"/triggers/").concat(G,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,J.jsx)(O.Z,{mr:D.cd})]}),(0,J.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?s.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(M,"/triggers/").concat(G)):(0,z.u7)({page:0,status:e.target.value})},paddingRight:4*D.iI,placeholder:"Select run status",value:(null===ce||void 0===ce?void 0:ce.status)||"all",children:[(0,J.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(R.V).map((function(e){return(0,J.jsx)("option",{value:e,children:x.Do[e]},e)}))]})]}),title:function(){return Q},uuid:"triggers/detail",children:[(0,J.jsx)(O.Z,{mt:D.cd,px:D.cd,children:(0,J.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,J.jsx)(f.Z,{light:!0,mt:D.cd,short:!0}),ge]})},Y=t(21831),Q=t(21764),$=t(2713),ee=t(38341),ne=t(47999),te=t(22673),re=t(65730),ie=t(38626),oe=t(16634),le=t(82944),ce=t(44162);function se(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 ue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ae=function(e){var n=e.blocks,t=e.updateVariables,r=e.variables,i=(0,u.useContext)(ie.ThemeContext),o=(0,u.useCallback)((function(e,n){return t((function(){var t=(null===r||void 0===r?void 0:r.__mage_variables)||{},i=(null===t||void 0===t?void 0:t.blocks)||{},o=i[e]||{},c=(null===o||void 0===o?void 0:o.configuration)||{};return ue(ue({},r),{},{__mage_variables:ue(ue({},t),{},{blocks:ue(ue({},i),{},(0,l.Z)({},e,ue(ue({},o),{},{configuration:ue(ue({},c),n)})))})})}))}),[t,r]);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(m.Z,{children:"dbt runtime settings"}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(_.Z,{columnFlex:[1,null,null,null],columns:[{uuid:"Block"},{uuid:"Flags"},{uuid:"Prefix"},{uuid:"Suffix"}],compact:!0,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,l,c=e.type,s=e.uuid,u=(0,H.IU)(e).name,a=(0,ce.qn)(c,{blockColor:e.color,theme:i}).accent,d=null===r||void 0===r||null===(n=r.__mage_variables)||void 0===n||null===(t=n.blocks)||void 0===t||null===(l=t[s])||void 0===l?void 0:l.configuration,p=d||{},f=p.prefix,m=p.suffix,v=(null===d||void 0===d?void 0:d.flags)||[],g=!(null===v||void 0===v||!v.includes(H.Dy));return[(0,J.jsx)(w.Z,{block:!0,label:(0,J.jsx)(P.ZP,{monospace:!0,small:!0,children:s}),size:null,widthFitContent:!0,children:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(oe.Z,{color:a,size:1.5*D.iI,square:!0}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsxs)(P.ZP,{monospace:!0,small:!0,children:[f&&(0,J.jsx)(P.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:f}),u,m&&(0,J.jsx)(P.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:m})]})]})},"uuid-".concat(s)),(0,J.jsx)(h.Z,{alignItems:"center",children:(0,J.jsx)(ee.Z,{checked:g,label:H.Dy,monospace:!0,onClick:function(){return o(s,{flags:g?(0,N.Od)(v,(function(e){return H.Dy===e})):v.concat(H.Dy)})},small:!0})},"flags-".concat(s)),(0,J.jsx)(le.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{prefix:e.target.value})},placeholder:"N+, +",small:!0,value:f,width:10*D.iI},"prefix-".concat(s)),(0,J.jsx)(le.Z,{compact:!0,monospace:!0,onChange:function(e){return o(s,{suffix:e.target.value})},placeholder:"+, +N",small:!0,value:m,width:10*D.iI},"suffix-".concat(s))]}))})})]})},de=t(93461),pe=t(10919),fe=t(26304),he=t(23831),me=t(2005),ve=t(31012),ge=["children","large","lineHeight","ordered"];function je(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 xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?je(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var be=(0,ie.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||he.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||he.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||he.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(me.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(me.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ve.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ve.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ve.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),ye=ie.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],be),Ze=ie.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],be),Oe=ie.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*D.iI,"px;\n ")}));var _e=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,fe.Z)(e,ge),l=i?Ze:ye;return(0,J.jsx)(l,xe(xe({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){var r;return(0,J.jsx)(Oe,xe(xe({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),(null===(r=e.props)||void 0===r?void 0:r.key)||n)}))}))},Pe=t(98781),we=t(70902),Se=t(18025);function Ce(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 Ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:b.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:b.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:b.Xm.API}];return e?n.slice(0,1):n};var Ee=function(e){var n=e.errors,t=e.fetchPipelineSchedule,r=e.pipeline,o=e.pipelineSchedule,c=e.setErrors,s=e.variables,v=(0,d.useRouter)(),j=null===r||void 0===r?void 0:r.uuid,w=null===o||void 0===o?void 0:o.id,C=(null===r||void 0===r?void 0:r.type)===Pe.qL.STREAMING,I=(0,u.useState)([]),A=I[0],R=I[1],H=(0,u.useState)(!1),z=H[0],q=H[1],W=(0,u.useState)(!1),X=W[0],B=W[1],K=(0,u.useState)(),G=K[0],ie=K[1],oe=(0,u.useState)({}),ce=oe[0],se=oe[1],ue=(0,u.useState)(o),fe=ue[0],he=ue[1],me=(0,u.useState)(!1),ve=me[0],ge=me[1],je=(0,u.useState)(null),xe=je[0],be=je[1],ye=(0,u.useMemo)((function(){return(0,F.wx)(s,(function(e){return e.uuid===y.C}))}),[s]),Ze=fe||{},Oe=Ze.name,Ce=Ze.schedule_interval,Ee=Ze.schedule_type,De=Ze.settings,Te=void 0===De?{}:De,Ne=Ze.sla,Me=Ze.start_time,Ae=Ze.variables,Re=void 0===Ae?{}:Ae;(0,u.useEffect)((function(){Te&&ie(Te)}),[Te]);var Fe=(0,u.useState)(null),Ue=Fe[0],He=Fe[1],ze=(0,u.useState)({hour:"00",minute:"00"}),Le=ze[0],qe=ze[1],Ve=S.ZP.event_rules.detail("aws").data,We=(0,u.useMemo)((function(){var e;return(null===Ve||void 0===Ve||null===(e=Ve.event_rule)||void 0===e?void 0:e.rules)||[]}),[Ve]),Xe=(0,u.useMemo)((function(){return(0,N.HK)(We,(function(e){return e.name}))}),[We]),Je=(0,a.Db)(S.ZP.pipeline_schedules.useUpdate(w),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){t(),v.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(j,"/triggers/").concat(w))},onErrorCallback:function(e,n){return c({errors:n,response:e})}})}}),Be=(0,i.Z)(Je,2),Ke=Be[0],Ge=Be[1].isLoading,Ye=(0,u.useMemo)((function(){return Re||{}}),[Re]);(0,u.useEffect)((function(){if(Me){var e=Me.split(" ")[1];He((0,U.eI)(Me)),qe({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;He(n),qe({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[Me]),(0,u.useEffect)((function(){Ye&&Object.keys(Ye).length>0&&q(!0)}),[Ye]),(0,u.useEffect)((function(){se(z?null===ye||void 0===ye?void 0:ye.reduce((function(e,n){var t=n.uuid,r=n.value;return Ie(Ie({},e),{},(0,l.Z)({},t,Ye[t]||r))}),{}):null)}),[ye,z]),(0,u.useEffect)((function(){if(o&&(R(o.event_matchers),$e?(he(Ie(Ie({},o),{},{schedule_interval:"custom"})),be(Ce)):he(C?Ie(Ie({},o),{},{schedule_interval:b.U5.ONCE}):o),o.sla)){B(!0);var e=(0,U.gU)(Ne),n=e.time,t=e.unit;he((function(e){return Ie(Ie({},e),{},{slaAmount:n,slaUnit:t})}))}}),[o]);var Qe=(0,u.useCallback)((function(){var e=Ie(Ie({},(0,L.GL)(fe,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,F.e7)(ce)});if(b.Xm.EVENT===fe.schedule_type?e.event_matchers=A:(e.schedule_interval=$e?xe:fe.schedule_interval,e.start_time=Ue&&null!==Le&&void 0!==Le&&Le.hour&&null!==Le&&void 0!==Le&&Le.minute?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===Le||void 0===Le?void 0:Le.hour,":").concat(null===Le||void 0===Le?void 0:Le.minute,":00"):null),X){var n=null===fe||void 0===fe?void 0:fe.slaAmount,t=null===fe||void 0===fe?void 0:fe.slaUnit;if(!n||isNaN(n)||!t)return void Q.Am.error("Please enter a valid SLA",{position:Q.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,U.vJ)(n,t)}else null!==o&&void 0!==o&&o.sla&&(e.sla=0);e.settings=G,Ke({pipeline_schedule:e})}),[xe,Ue,X,A,o,ce,fe,G,Le,Ke]),$e=(0,u.useMemo)((function(){return Ce&&!Object.values(b.U5).includes(Ce)}),[Ce]),en=(0,u.useMemo)((function(){var e=[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.KJ,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_detail")],[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.Pf,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,J.jsxs)("div",{children:[(0,J.jsxs)(Z.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;he((function(e){return Ie(Ie({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Ce,children:[Object.values(b.U5).map((function(e){return(0,J.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,J.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,J.jsx)(O.Z,{mt:1,p:1,children:(0,J.jsxs)(P.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")],[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.aw,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,J.jsxs)("div",{style:{minHeight:"".concat(5.75*D.iI,"px")},children:[!ve&&(0,J.jsx)(le.Z,{monospace:!0,onClick:function(){return ge((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ue?"".concat(Ue.toISOString().split("T")[0]," ").concat(null===Le||void 0===Le?void 0:Le.hour,":").concat(null===Le||void 0===Le?void 0:Le.minute):""}),(0,J.jsx)("div",{style:{width:"400px"},children:(0,J.jsx)(ne.Z,{disableEscape:!0,onClickOutside:function(){return ge(!1)},open:ve,style:{position:"relative"},children:(0,J.jsx)($.Z,{selectedDate:Ue,selectedTime:Le,setSelectedDate:He,setSelectedTime:qe,topPosition:!0})})})]},"start_time_input")]];return C&&e.splice(1,1),$e&&e.splice(2,0,[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.EK,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,J.jsxs)("div",{children:[(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),be(e.target.value)},placeholder:"* * * * *",value:xe}),(0,J.jsxs)(O.Z,{mt:1,p:1,children:[(0,J.jsxs)(P.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,J.jsx)(P.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,J.jsxs)(P.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,J.jsx)(pe.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:2,px:D.cd,children:(0,J.jsx)(m.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:e})]})}),[xe,Ue,$e,C,Oe,Ce,ve,Le]),nn=(0,u.useCallback)((function(e,n){R((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,Y.Z)(t)}))}),[R]),tn=(0,u.useMemo)((function(){return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:D.cd,px:D.cd,children:(0,J.jsx)(m.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.KJ,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_event")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Events"}),(0,J.jsxs)(P.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,J.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,J.jsxs)(O.Z,{mt:D.Mq,children:[(0,J.jsx)(P.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,J.jsxs)(P.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,J.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,J.jsx)(pe.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsxs)(_e,{monospace:!0,ordered:!0,children:[(0,J.jsx)(P.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,J.jsx)(P.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,J.jsx)(P.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(null===A||void 0===A?void 0:A.length)>=1&&(0,J.jsx)(_.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===A||void 0===A?void 0:A.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,J.jsx)(Z.Z,{monospace:!0,onChange:function(e){return nn(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:M.map((function(e){var n=e.label,t=e.uuid;return(0,J.jsx)("option",{value:t,children:n()},t)}))},"event-provider-".concat(o)),(0,J.jsx)(Z.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Xe[r])||void 0===t?void 0:t.event_pattern;nn(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:We.map((function(e){var n=e.name;return(0,J.jsx)("option",{value:n,children:n},n)}))},"event-name-".concat(o)),i&&(0,J.jsx)(te.Z,{language:"json",small:!0,source:l.join("\n")}),(0,J.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return R((function(e){return(0,N.oM)(e,n)}))},children:(0,J.jsx)(E.rF,{default:!0,size:2*D.iI})},"remove_event")]}))}),(0,J.jsx)(O.Z,{p:D.cd,children:(0,J.jsx)(p.Z,{beforeIcon:(0,J.jsx)(E.mm,{size:2*D.iI}),onClick:function(){return R((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[A,We,Xe,Oe,nn]),rn=!0,on=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===o||void 0===o?void 0:o.id,"/pipeline_runs"),null!==o&&void 0!==o&&o.token&&(n="".concat(n,"/").concat(o.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(O.Z,{mb:D.cd,px:D.cd,children:(0,J.jsx)(m.Z,{children:"Settings"})}),(0,J.jsx)(f.Z,{light:!0,short:!0}),(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.KJ,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,J.jsx)(le.Z,{monospace:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:Oe},"trigger_name_input_api")]]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Endpoint"}),(0,J.jsxs)(P.ZP,{muted:!0,children:["Make a ",(0,J.jsx)(P.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(re.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Payload"}),(0,J.jsx)(P.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(re.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,J.jsx)(te.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,J.jsxs)(O.Z,{mb:2,mt:5,px:D.cd,children:[(0,J.jsx)(m.Z,{children:"Sample cURL command"}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(te.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[Oe,o,rn]),ln=!Ee||b.Xm.TIME===Ee&&!(C&&Ue||!C&&Ue&&Ce)||b.Xm.EVENT===Ee&&(!(null!==A&&void 0!==A&&A.length)||!A.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),cn=(0,u.useMemo)((function(){var e;return(null===r||void 0===r||null===(e=r.blocks)||void 0===e?void 0:e.filter((function(e){var n=e.type;return k.tf.DBT===n})))||[]}),[r]),sn=(0,u.useMemo)((function(){return(0,J.jsxs)(O.Z,{p:D.cd,children:[(0,J.jsxs)(O.Z,{mb:D.HN,children:[(0,J.jsx)(m.Z,{children:"Pipeline run settings"}),(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(h.Z,{alignItems:"center",children:(0,J.jsx)(ee.Z,{checked:null===G||void 0===G?void 0:G.allow_blocks_to_fail,label:"Keep running pipeline even if blocks fail",onClick:function(){return ie((function(e){return Ie(Ie({},e),{},{allow_blocks_to_fail:!(null!==G&&void 0!==G&&G.allow_blocks_to_fail)})}))}})})}),b.Xm.TIME===Ee&&(0,J.jsx)(O.Z,{mt:D.Mq,children:(0,J.jsx)(h.Z,{alignItems:"center",children:(0,J.jsx)(ee.Z,{checked:null===G||void 0===G?void 0:G.skip_if_previous_running,label:"Skip run if previous run still in progress",onClick:function(){return ie((function(e){return Ie(Ie({},e),{},{skip_if_previous_running:!(null!==G&&void 0!==G&&G.skip_if_previous_running)})}))}})})}),(0,J.jsxs)(O.Z,{mt:D.Mq,children:[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(we.Z,{checked:X,onCheck:function(e){B(e),e||he((function(e){return Ie(Ie({},e),{},{slaAmount:0})}))}})}),(0,J.jsx)(P.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),X&&(0,J.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(E.aw,{default:!0,size:1.5*D.iI}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(P.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,J.jsxs)(h.Z,{children:[(0,J.jsx)(de.Z,{flex:1,children:(0,J.jsx)(le.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===fe||void 0===fe?void 0:fe.slaAmount})}),(0,J.jsx)(de.Z,{flex:1,children:(0,J.jsx)(Z.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),he((function(n){return Ie(Ie({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===fe||void 0===fe?void 0:fe.slaUnit,children:Object.keys(U.tL).map((function(e){return(0,J.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})]})]}),(0,J.jsxs)(O.Z,{mb:D.HN,children:[(0,J.jsx)(m.Z,{children:"Runtime variables"}),!(0,L.Qr)(ye)&&(0,J.jsxs)(O.Z,{mt:D.Mq,children:[(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(O.Z,{mr:2,children:(0,J.jsx)(we.Z,{checked:z,onCheck:q})}),(0,J.jsx)(P.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),z&&ce&&Object.entries(ce).length>0&&(0,J.jsx)(O.Z,{mt:1,children:(0,J.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(ce).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return x.sZ===r?e:e.concat([[(0,J.jsx)(P.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),(0,J.jsx)(le.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),se((function(n){return Ie(Ie({},n),{},(0,l.Z)({},r,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:o},"variable_uuid_input_".concat(r))]])}),[])})})]})]}),(null===cn||void 0===cn?void 0:cn.length)>=1&&(0,J.jsx)(O.Z,{mb:D.HN,children:(0,J.jsx)(ae,{blocks:cn,updateVariables:se,variables:Ie(Ie({},Ye),ce)})})]})}),[cn,X,ye,z,ce,fe,Ee,Ye,B,q,se,G]);return(0,J.jsx)(J.Fragment,{children:(0,J.jsxs)(g.Z,{after:sn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(j,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===o||void 0===o?void 0:o.name},linkProps:{as:"/pipelines/".concat(j,"/triggers/").concat(w),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:n,pageName:T.M.TRIGGERS,pipeline:r,setErrors:c,subheader:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(p.Z,{disabled:ln,loading:Ge,onClick:Qe,outline:!0,primary:!0,children:"Save changes"}),(0,J.jsx)(O.Z,{mr:1}),(0,J.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(j,"/triggers/").concat(w)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===o||void 0===o?void 0:o.name)},uuid:"triggers/edit",children:[(0,J.jsxs)(O.Z,{p:D.cd,children:[(0,J.jsxs)(O.Z,{mb:2,children:[(0,J.jsx)(m.Z,{children:"Trigger type"}),(0,J.jsx)(P.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,J.jsx)(h.Z,{children:ke(C).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=Ee===r,o=Ee&&!i;return(0,J.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){b.Xm.EVENT!==r||null!==A&&void 0!==A&&A.length||R([{}]),he((function(e){return Ie(Ie({},e),{},{schedule_type:r})}))},children:(0,J.jsx)(Se.U,{selected:i,children:(0,J.jsxs)(h.Z,{alignItems:"center",children:[(0,J.jsx)(de.Z,{children:(0,J.jsx)("input",{checked:i,type:"radio"})}),(0,J.jsx)(O.Z,{mr:D.cd}),(0,J.jsxs)(de.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,J.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,J.jsx)(P.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,J.jsxs)(O.Z,{mt:5,children:[b.Xm.TIME===Ee&&en,b.Xm.EVENT===Ee&&tn,b.Xm.API===Ee&&on]})]})})},De=t(41788),Te=t(70543);function Ne(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 Me(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ne(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ae(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=(0,u.useState)(null),o=i[0],l=i[1],c=S.ZP.variables.pipelines.list(t,{},{revalidateOnFocus:!1}).data,s=null===c||void 0===c?void 0:c.variables,a=S.ZP.pipeline_schedules.detail(n),d=a.data,p=a.mutate,f=null===d||void 0===d?void 0:d.pipeline_schedule,h=S.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,m=Me(Me({},null===h||void 0===h?void 0:h.pipeline),{},{uuid:t});return Te.b7===r?(0,J.jsx)(Ee,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s}):(0,J.jsx)(G,{errors:o,fetchPipelineSchedule:p,pipeline:m,pipelineSchedule:f,setErrors:l,variables:s})}Ae.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Re=(0,De.Z)(Ae)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(70422)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,9350,5872,4495,1424,1005,7815,547,6694,3752,1286,8312,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return v},e7:function(){return m},v0:function(){return p},wx:function(){return g}});var r=t(75582),i=t(82394),c=t(43313),u=t(93348),o=t(1286),l=t(90211),a=t(84779);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n=e.statistics,t=Object.keys(n),r=Array(c.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(c.Dy.includes(e)){var t=c.CC[e],i=n[e],u=i,o=!1,l=[2,3],s=c.Ub[e],d=c.oH[e],p=c.OD[e];if(c.y_.includes(e))o=!0,l=[2,1,2];else if(e in c.Sq){i=(0,a.Jw)(i,0);var f=c.Sq[e];u=n[f]}var h={columnFlexNumbers:l,name:t,progress:o,rate:u,successDirection:d,warning:p};c.y_.includes(e)||(h.value=i),r[s]=h}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var u=Object.values(t),a=u.length,s=[];s.push({name:"Column count",successDirection:c.oH.column_count,value:(0,l.x6)(a)}),i.forEach((function(e){if(c.Zu.includes(e)){var n=c.CC[e],t=r[e],i=c.OD[e];s.push({name:n,successDirection:c.oH[e],value:(0,l.x6)(t),warning:i})}}));var d=(0,o.QO)(u),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return s.push({name:"Categorical Features",rate:p/a,value:(0,l.x6)(p)},{name:"Numerical Features",rate:h/a,value:(0,l.x6)(h)},{name:"Datetime Features",rate:f/a,value:(0,l.x6)(f)}),s}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function g(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function v(e,n){return n===u.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===u.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function m(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),c=t[0],u=t[1],o=u;try{o=JSON.parse(u)}catch(l){}return d(d({},e),{},(0,i.Z)({},c,o))}),{}):e}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),c=t.n(i),u=t(82684),o=t(83455),l=t(34376),a=t(60328),s=t(47999),d=t(67971),p=t(10919),f=t(93348),h=t(62609),g=t(86673),v=t(87815),m=t(19711),b=t(82531),x=t(10503),j=t(49125),Z=t(45838),y=t(9736),_=t(96510),P=t(66653),O=t(28598);n.Z=function(e){var n=e.fetchPipelineSchedules,t=e.highlightRowOnHover,i=e.includeCreatedAtColumn,k=e.includePipelineColumn,w=e.pipeline,C=e.pipelineSchedules,S=e.selectedSchedule,I=e.setErrors,E=e.setSelectedSchedule,T=e.stickyHeader,D=null===w||void 0===w?void 0:w.uuid,A=(0,l.useRouter)(),N=(0,u.useRef)({}),H=(0,u.useState)(null),V=H[0],M=H[1],R=(0,u.useState)(0),F=R[0],Y=R[1],B=(0,u.useState)(0),L=B[0],W=B[1],q=(0,o.Db)((function(e){return b.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){n()},onErrorCallback:function(e,n){return I({errors:n,response:e})}})}}),z=(0,r.Z)(q,1)[0],J=(0,o.Db)((function(e){return b.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){n(),D?A.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(D,"/triggers")):n()},onErrorCallback:function(e,n){return I({errors:n,response:e})}})}}),U=(0,r.Z)(J,1)[0],Q=[{label:function(){return""},uuid:"action"},{uuid:"Status"},{uuid:"Type"},{uuid:"Name"},{uuid:"Frequency"},{uuid:"Runs"},{uuid:"Latest run status"},{uuid:"Logs"}];(0,y.Ct)()||Q.push({label:function(){return""},uuid:"edit/delete"});var X=[null,1,1,3,1,null,null,null,null];return k&&(Q.splice(2,0,{uuid:"Pipeline"}),X.splice(2,0,2)),i&&(Q.splice(3,0,{uuid:"Created at"}),X.splice(3,0,null)),(0,O.jsx)(Z.cl,{overflowVisible:!0,children:0===C.length?(0,O.jsx)(g.Z,{px:3,py:1,children:(0,O.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,O.jsx)(v.Z,{columnFlex:X,columns:Q,highlightRowOnHover:t,isSelectedRow:function(e){return C[e].id===(null===S||void 0===S?void 0:S.id)},onClickRow:E?function(e){return null===E||void 0===E?void 0:E(C[e])}:null,rowVerticalPadding:6,rows:C.map((function(e,n){var t,r=e.id,o=e.created_at,l=e.pipeline_runs_count,v=e.pipeline_uuid,b=e.last_pipeline_run_status,Z=e.name,_=e.schedule_interval,w=e.status,C=D||v;N.current[r]=(0,u.createRef)();var S=[(0,O.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,P.j)(n),z({id:e.id,status:f.fq.ACTIVE===w?f.fq.INACTIVE:f.fq.ACTIVE})},children:f.fq.ACTIVE===w?(0,O.jsx)(x.dz,{muted:!0,size:2*j.iI}):(0,O.jsx)(x.Py,{default:!0,size:2*j.iI})},"toggle_trigger_".concat(n)),(0,O.jsx)(m.ZP,{default:f.fq.INACTIVE===w,monospace:!0,success:f.fq.ACTIVE===w,children:w},"trigger_status_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:null===(t=f.Z4[e.schedule_type])||void 0===t?void 0:t.call(f.Z4)},"trigger_type_".concat(n)),(0,O.jsx)(c(),{as:"/pipelines/".concat(C,"/triggers/").concat(r),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,O.jsx)(p.Z,{bold:!0,onClick:function(e){(0,P.j)(e),A.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(C,"/triggers/").concat(r))},sameColorAsText:!0,children:Z})},"trigger_name_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:_},"trigger_frequency_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:b||"N/A"},"latest_run_status_".concat(n)),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(C,"/logs?pipeline_schedule_id[]=").concat(r))},children:(0,O.jsx)(x.B4,{default:!0,size:2*j.iI})},"logs_button_".concat(n))];return(0,y.Ct)()||S.push((0,O.jsxs)(d.Z,{children:[(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(C,"/triggers/").concat(r,"/edit"))},title:"Edit",children:(0,O.jsx)(x.I8,{default:!0,size:2*j.iI})}),(0,O.jsx)(g.Z,{mr:1}),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,i;M(r),Y((null===(e=N.current[r])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),W((null===(t=N.current[r])||void 0===t||null===(i=t.current)||void 0===i?void 0:i.offsetLeft)||0)},ref:N.current[r],title:"Delete",children:(0,O.jsx)(x.rF,{default:!0,size:2*j.iI})}),(0,O.jsx)(s.Z,{onClickOutside:function(){return M(null)},open:V===r,children:(0,O.jsx)(h.Z,{danger:!0,left:(L||0)-286,onCancel:function(){return M(null)},onClick:function(){M(null),U(r)},title:"Are you sure you want to delete the trigger ".concat(Z,"?"),top:(F||0)-(n<=1?40:96),width:40*j.iI})})]},"edit_delete_buttons_".concat(n))),k&&S.splice(2,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:C},"pipeline_name_".concat(n))),i&&S.splice(3,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:o},"created_at_".concat(n))),S})),stickyHeader:T,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),i=t(67971),c=t(86673),u=t(10503),o=t(73899),l=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.Z,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(u.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&o.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(c.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(u.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return c},Z4:function(){return s},fq:function(){return o},kJ:function(){return a}});var r,i,c,u=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(c||(c={}));var o,l,a,s=(r={},(0,u.Z)(r,c.API,(function(){return"API"})),(0,u.Z)(r,c.EVENT,(function(){return"event"})),(0,u.Z)(r,c.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(o||(o={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(i={},(0,u.Z)(i,a.CREATED_AT,"Created at"),(0,u.Z)(i,a.NAME,"Name"),(0,u.Z)(i,a.PIPELINE,"Pipeline"),(0,u.Z)(i,a.STATUS,"Status"),(0,u.Z)(i,a.TYPE,"Type"),i)},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),c=t(86673),u=t(19711),o=t(23831),l=t(73942),a=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||o.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||o.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||o.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||o.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,o=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,m=e.fullWidth,b=void 0===m||m,x=e.header,j=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,_=e.headerTitle,P=e.maxHeight,O=e.maxWidth,k=e.minWidth,w=e.noPadding,C=e.overflowVisible,S=e.subtitle,I=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:b,maxHeight:P,maxWidth:O,minWidth:k,overflowVisible:C,ref:r,success:I,children:[(x||_)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:j,children:[x&&x,_&&(0,d.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.Z,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(c.Z,{ml:Z?1:0,children:(0,d.jsx)(u.ZP,{bold:!0,default:!0,children:_})})]})})]}),(0,d.jsxs)(g,{maxHeight:P,noPadding:w,overflowVisible:C,ref:o,children:[S&&(0,d.jsx)(c.Z,{mb:2,children:(0,d.jsx)(u.ZP,{default:!0,children:S})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return de}});var r=t(77837),i=t(82394),c=t(75582),u=t(38860),o=t.n(u),l=t(12691),a=t.n(l),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(73752),g=t(34744),v=t(67971),m=t(87372),b=t(11135),x=t(10919),j=t(51099),Z=t(60547),y=t(93348),_=t(41788),P=t(29237),O=t(86673),k=t(87815),w=t(19711),C=t(38435),S=t(82944),I=t(70902),E=t(23831),T=t(38626),D=t(73942),A=t(49125),N=T.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*A.iI,2*A.iI,D.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||E.Z).borders.light,";\n background-color: ").concat((e.theme||E.Z).background.popup,";\n ")})),H=t(90211),V=t(58122),M=t(28598);function R(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 F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y="".concat(A.iI,"px ").concat(3*A.iI,"px");var B=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,u=e.variables,o=(0,s.useState)(!1),l=o[0],a=o[1],d=(0,s.useState)({}),p=d[0],h=d[1],g=(0,s.useState)(u||{}),b=g[0],x=g[1],j=(0,s.useMemo)((function(){return F(F({},n),{},{name:(0,H.Y6)(),variables:l?(0,V.e7)(b):null})}),[n,l,b]),Z=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),x((function(t){return F(F({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,M.jsx)(C.Z,F(F({},t),{},{rows:1,value:n})):(0,M.jsx)(S.Z,F({},t))};return(0,s.useEffect)((function(){var e=Object.entries(b).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0],u=t[1],o=(0,H.Pb)(u)&&"object"===typeof JSON.parse(u)&&!Array.isArray(JSON.parse(u))&&null!==JSON.parse(u);return F(F({},e),{},(0,i.Z)({},r,o))}),{});h(e)}),[]),(0,M.jsxs)(P.Z,{footer:(0,M.jsxs)(v.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,M.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:Y,primaryAlternate:!0,children:"Run now"}),(0,M.jsx)(O.Z,{mr:1}),(0,M.jsx)(f.Z,{borderColor:E.Z.background.page,onClick:t,padding:Y,secondary:!0,children:"Cancel"})]}),header:(0,M.jsx)(m.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*A.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,M.jsx)(N,{children:(0,M.jsxs)(v.Z,{alignItems:"center",children:[(0,M.jsx)(O.Z,{mr:2,children:(0,M.jsx)(I.Z,{checked:l,onCheck:a})}),(0,M.jsx)(w.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&b&&Object.entries(b).length>0&&(0,M.jsx)(O.Z,{mt:2,children:(0,M.jsx)(k.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(b).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,M.jsx)(w.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),Z(t,r)]}))})})]})},L=t(37391),W=T.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],E.Z.borders.medium,A.tr),q=T.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],L.w5),z=T.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],E.Z.background.output,D.n_,A.iI,A.tr),J=t(73899);var U=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,u=[];return Object.entries(r).forEach((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1],o=null===i||void 0===i?void 0:i[t];u.push({uuid:t,value:(0,V.FS)(o||r)})})),(0,V.JZ)(u,t),(0,M.jsxs)(W,{children:[(0,M.jsx)(O.Z,{mb:2,children:(0,M.jsxs)(w.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,M.jsx)(q,{noScrollbarTrackBackground:!0,children:r&&u.map((function(e){var n=e.uuid,t=e.value;return(0,M.jsxs)(z,{children:[(0,M.jsx)(w.ZP,{monospace:!0,small:!0,children:n}),(0,M.jsx)(w.ZP,{color:J.Or,monospace:!0,small:!0,children:(0,V.FS)(t)})]})}))})]})},Q=t(54283),X=t(46261),G=t(97225),$=t(82531),K=t(10503),ee=t(52769),ne=t(59920),te=t(42305),re=t(7715),ie=t(9736),ce=t(96510),ue=t(59e3),oe=t(99497);function le(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 ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?le(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function se(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ie.Ct)(),u=n.uuid,o=(0,s.useState)(null),l=o[0],_=o[1],P=$.ZP.variables.pipelines.list(u,{},{revalidateOnFocus:!1}).data,k=null===P||void 0===P?void 0:P.variables,C=(0,ue.iV)(),S=null!==C&&void 0!==C&&C.page?C.page:0,I=$.ZP.pipeline_schedules.pipelines.list(u,{_limit:j.Q,_offset:(null!==C&&void 0!==C&&C.page?C.page:0)*j.Q},{refreshInterval:7500}),E=I.data,T=I.mutate,D=(0,s.useMemo)((function(){return(null===E||void 0===E?void 0:E.pipeline_schedules)||[]}),[E]),N=function(e){return(0,d.Db)($.ZP.pipeline_schedules.pipelines.useCreate(u),{onSuccess:function(n){return(0,ce.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}})},R=N((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),F=(0,c.Z)(R,2),Y=F[0],L=F[1].isLoading,W=N(T),q=(0,c.Z)(W,2),z=q[0],J=q[1].isLoading,le=(0,s.useMemo)((function(){var e;return null===(e=(0,V.wx)(k,(function(e){return e.uuid===ee.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return ae(ae({},e),{},(0,i.Z)({},t,r))}),{})}),[k]),se={name:(0,H.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},de=(0,oe.dd)((function(){return(0,M.jsx)(B,{initialPipelineSchedulePayload:se,onCancel:he,onSuccess:z,variables:le})}),{},[k,le],{background:!0,uuid:"run_pipeline_now_popup"}),pe=(0,c.Z)(de,2),fe=pe[0],he=pe[1],ge=(0,s.useState)(),ve=ge[0],me=ge[1],be=(0,s.useMemo)((function(){var e=null===ve||void 0===ve?void 0:ve.variables,n=!(0,re.Qr)(e),t=n?null===ve||void 0===ve?void 0:ve.variables:(0,re.Qr)(le)?null:le;return function(i){var c=i.height-(t?151:80);return(0,M.jsxs)(M.Fragment,{children:[t&&(0,M.jsx)(U,{hasOverride:n,scheduleType:null===ve||void 0===ve?void 0:ve.schedule_type,variables:le,variablesOverride:e}),!t&&(0,M.jsxs)(O.Z,{p:A.cd,children:[(0,M.jsx)(w.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,M.jsxs)(O.Z,{mt:1,children:[(0,M.jsx)(a(),{as:"/pipelines/".concat(u,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,M.jsx)(x.Z,{primary:!0,children:"Click here"})})," ",(0,M.jsx)(w.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,M.jsx)(h.Z,ae(ae({},i),{},{height:c,noStatus:!0}))]})}}),[r,u,null===ve||void 0===ve?void 0:ve.schedule_type,null===ve||void 0===ve?void 0:ve.variables,le]),xe=(0,s.useMemo)((function(){var e;return(null===E||void 0===E||null===(e=E.metadata)||void 0===e?void 0:e.count)||[]}),[E]);return(0,M.jsxs)(Z.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:be,errors:l,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:_,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,M.jsx)(b.ZP,{beforeElement:(0,M.jsx)(K.mm,{size:2.5*A.iI}),blackBorder:!0,inline:!0,loading:L,noHoverUnderline:!0,onClick:function(){return Y({pipeline_schedule:{name:(0,H.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,M.jsx)(w.ZP,{bold:!0,large:!0,children:"Run this pipeline using a schedule, event, or API."}),title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ne.M.TRIGGERS,"_").concat(u),children:[(0,M.jsx)(O.Z,{mt:A.cd,px:A.cd,children:(0,M.jsxs)(v.Z,{justifyContent:"space-between",children:[(0,M.jsx)(m.Z,{level:5,children:"Pipeline triggers"}),(0,M.jsx)(X.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,M.jsx)(f.Z,{beforeIcon:(0,M.jsx)(K.JM,{inverted:!0,size:2*A.iI}),disabled:r,loading:J,onClick:(0,re.Qr)(le)?function(){return z({pipeline_schedule:se})}:fe,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,M.jsx)(g.Z,{light:!0,mt:A.cd,short:!0}),E?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(G.Z,{fetchPipelineSchedules:T,pipeline:n,pipelineSchedules:D,selectedSchedule:ve,setErrors:_,setSelectedSchedule:me}),(0,M.jsx)(O.Z,{p:2,children:(0,M.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=ae(ae({},C),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(u,"/triggers?").concat((0,ue.uM)(r)))},page:Number(S),totalPages:Math.ceil(xe/j.Q)})})]}):(0,M.jsx)(O.Z,{m:2,children:(0,M.jsx)(Q.Z,{inverted:!0})})]})}se.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().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 de=(0,_.Z)(se)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return p},AY:function(){return f},BP:function(){return d},JX:function(){return s},OC:function(){return c},Pc:function(){return h},Tz:function(){return a},d$:function(){return l},lJ:function(){return g},n1:function(){return o}});var r=t(92083),i=t.n(r),c="YYYY-MM-DD HH:mm:ss",u="YYYY-MM-DD HH:mm",o="YYYY-MM-DD";function l(e,n){var t=n.dayAgo,r=n.includeSeconds,o=n.utcFormat,l=i()(e),a=u;return o&&(l=l.utc()),t&&(l=l.subtract(1,"days")),r&&(a=c),l.format(a)}function a(e){var n=l((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?c:u)}function d(e,n,t){return i()(e).utc().hours(+n).minutes(+t).format()}function p(e){return i()(e).unix()}function f(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function h(e){var n=i().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function g(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,5872,1424,1005,7815,547,3714,3752,1286,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return v},e7:function(){return m},v0:function(){return p},wx:function(){return g}});var r=t(75582),i=t(82394),c=t(43313),u=t(93348),o=t(1286),l=t(90211),a=t(84779);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n=e.statistics,t=Object.keys(n),r=Array(c.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(c.Dy.includes(e)){var t=c.CC[e],i=n[e],u=i,o=!1,l=[2,3],s=c.Ub[e],d=c.oH[e],p=c.OD[e];if(c.y_.includes(e))o=!0,l=[2,1,2];else if(e in c.Sq){i=(0,a.Jw)(i,0);var f=c.Sq[e];u=n[f]}var h={columnFlexNumbers:l,name:t,progress:o,rate:u,successDirection:d,warning:p};c.y_.includes(e)||(h.value=i),r[s]=h}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var u=Object.values(t),a=u.length,s=[];s.push({name:"Column count",successDirection:c.oH.column_count,value:(0,l.x6)(a)}),i.forEach((function(e){if(c.Zu.includes(e)){var n=c.CC[e],t=r[e],i=c.OD[e];s.push({name:n,successDirection:c.oH[e],value:(0,l.x6)(t),warning:i})}}));var d=(0,o.QO)(u),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return s.push({name:"Categorical Features",rate:p/a,value:(0,l.x6)(p)},{name:"Numerical Features",rate:h/a,value:(0,l.x6)(h)},{name:"Datetime Features",rate:f/a,value:(0,l.x6)(f)}),s}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function g(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function v(e,n){return n===u.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===u.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function m(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),c=t[0],u=t[1],o=u;try{o=JSON.parse(u)}catch(l){}return d(d({},e),{},(0,i.Z)({},c,o))}),{}):e}},97225:function(e,n,t){"use strict";var r=t(75582),i=t(12691),c=t.n(i),u=t(82684),o=t(83455),l=t(34376),a=t(60328),s=t(47999),d=t(67971),p=t(10919),f=t(93348),h=t(62609),g=t(86673),v=t(87815),m=t(19711),b=t(82531),x=t(10503),j=t(49125),Z=t(45838),y=t(9736),_=t(96510),P=t(66653),O=t(28598);n.Z=function(e){var n=e.fetchPipelineSchedules,t=e.highlightRowOnHover,i=e.includeCreatedAtColumn,k=e.includePipelineColumn,w=e.pipeline,C=e.pipelineSchedules,S=e.selectedSchedule,I=e.setErrors,E=e.setSelectedSchedule,T=e.stickyHeader,D=null===w||void 0===w?void 0:w.uuid,A=(0,l.useRouter)(),N=(0,u.useRef)({}),H=(0,u.useState)(null),V=H[0],M=H[1],R=(0,u.useState)(0),F=R[0],Y=R[1],B=(0,u.useState)(0),L=B[0],W=B[1],q=(0,o.Db)((function(e){return b.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){n()},onErrorCallback:function(e,n){return I({errors:n,response:e})}})}}),z=(0,r.Z)(q,1)[0],J=(0,o.Db)((function(e){return b.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,_.wD)(e,{callback:function(){n(),D?A.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(D,"/triggers")):n()},onErrorCallback:function(e,n){return I({errors:n,response:e})}})}}),U=(0,r.Z)(J,1)[0],Q=[{label:function(){return""},uuid:"action"},{uuid:"Status"},{uuid:"Type"},{uuid:"Name"},{uuid:"Frequency"},{uuid:"Runs"},{uuid:"Latest run status"},{uuid:"Logs"}];(0,y.Ct)()||Q.push({label:function(){return""},uuid:"edit/delete"});var X=[null,1,1,3,1,null,null,null,null];return k&&(Q.splice(2,0,{uuid:"Pipeline"}),X.splice(2,0,2)),i&&(Q.splice(3,0,{uuid:"Created at"}),X.splice(3,0,null)),(0,O.jsx)(Z.cl,{overflowVisible:!0,children:0===C.length?(0,O.jsx)(g.Z,{px:3,py:1,children:(0,O.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,O.jsx)(v.Z,{columnFlex:X,columns:Q,highlightRowOnHover:t,isSelectedRow:function(e){return C[e].id===(null===S||void 0===S?void 0:S.id)},onClickRow:E?function(e){return null===E||void 0===E?void 0:E(C[e])}:null,rowVerticalPadding:6,rows:C.map((function(e,n){var t,r=e.id,o=e.created_at,l=e.pipeline_runs_count,v=e.pipeline_uuid,b=e.last_pipeline_run_status,Z=e.name,_=e.schedule_interval,w=e.status,C=D||v;N.current[r]=(0,u.createRef)();var S=[(0,O.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,P.j)(n),z({id:e.id,status:f.fq.ACTIVE===w?f.fq.INACTIVE:f.fq.ACTIVE})},children:f.fq.ACTIVE===w?(0,O.jsx)(x.dz,{muted:!0,size:2*j.iI}):(0,O.jsx)(x.Py,{default:!0,size:2*j.iI})},"toggle_trigger_".concat(n)),(0,O.jsx)(m.ZP,{default:f.fq.INACTIVE===w,monospace:!0,success:f.fq.ACTIVE===w,children:w},"trigger_status_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:null===(t=f.Z4[e.schedule_type])||void 0===t?void 0:t.call(f.Z4)},"trigger_type_".concat(n)),(0,O.jsx)(c(),{as:"/pipelines/".concat(C,"/triggers/").concat(r),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,O.jsx)(p.Z,{bold:!0,onClick:function(e){(0,P.j)(e),A.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(C,"/triggers/").concat(r))},sameColorAsText:!0,children:Z})},"trigger_name_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:_},"trigger_frequency_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:l},"trigger_run_count_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:b||"N/A"},"latest_run_status_".concat(n)),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(C,"/logs?pipeline_schedule_id[]=").concat(r))},children:(0,O.jsx)(x.B4,{default:!0,size:2*j.iI})},"logs_button_".concat(n))];return(0,y.Ct)()||S.push((0,O.jsxs)(d.Z,{children:[(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(C,"/triggers/").concat(r,"/edit"))},title:"Edit",children:(0,O.jsx)(x.I8,{default:!0,size:2*j.iI})}),(0,O.jsx)(g.Z,{mr:1}),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,i;M(r),Y((null===(e=N.current[r])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),W((null===(t=N.current[r])||void 0===t||null===(i=t.current)||void 0===i?void 0:i.offsetLeft)||0)},ref:N.current[r],title:"Delete",children:(0,O.jsx)(x.rF,{default:!0,size:2*j.iI})}),(0,O.jsx)(s.Z,{onClickOutside:function(){return M(null)},open:V===r,children:(0,O.jsx)(h.Z,{danger:!0,left:(L||0)-286,onCancel:function(){return M(null)},onClick:function(){M(null),U(r)},title:"Are you sure you want to delete the trigger ".concat(Z,"?"),top:(F||0)-(n<=1?40:96),width:40*j.iI})})]},"edit_delete_buttons_".concat(n))),k&&S.splice(2,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:C},"pipeline_name_".concat(n))),i&&S.splice(3,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:o},"created_at_".concat(n))),S})),stickyHeader:T,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),i=t(67971),c=t(86673),u=t(10503),o=t(73899),l=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(i.Z,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(u.Hd,{size:1.5*l.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&o.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(c.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(c.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(u.Kw,{size:1.5*l.iI,stroke:"#AEAEAE"})})]})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return l},Xm:function(){return c},Z4:function(){return s},fq:function(){return o},kJ:function(){return a}});var r,i,c,u=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(c||(c={}));var o,l,a,s=(r={},(0,u.Z)(r,c.API,(function(){return"API"})),(0,u.Z)(r,c.EVENT,(function(){return"event"})),(0,u.Z)(r,c.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(o||(o={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(i={},(0,u.Z)(i,a.CREATED_AT,"Created at"),(0,u.Z)(i,a.NAME,"Name"),(0,u.Z)(i,a.PIPELINE,"Pipeline"),(0,u.Z)(i,a.STATUS,"Status"),(0,u.Z)(i,a.TYPE,"Type"),i)},52769:function(e,n,t){"use strict";t.d(n,{C:function(){return r}});var r="global"},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),c=t(86673),u=t(19711),o=t(23831),l=t(73942),a=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||o.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||o.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||o.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||o.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,o=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,p=void 0===s||s,m=e.fullWidth,b=void 0===m||m,x=e.header,j=e.headerHeight,Z=e.headerIcon,y=e.headerPaddingVertical,_=e.headerTitle,P=e.maxHeight,O=e.maxWidth,k=e.minWidth,w=e.noPadding,C=e.overflowVisible,S=e.subtitle,I=e.success;return(0,d.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:b,maxHeight:P,maxWidth:O,minWidth:k,overflowVisible:C,ref:r,success:I,children:[(x||_)&&(0,d.jsxs)(h,{headerPaddingVertical:y,height:j,children:[x&&x,_&&(0,d.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.Z,{alignItems:"center",children:[Z&&Z,(0,d.jsx)(c.Z,{ml:Z?1:0,children:(0,d.jsx)(u.ZP,{bold:!0,default:!0,children:_})})]})})]}),(0,d.jsxs)(g,{maxHeight:P,noPadding:w,overflowVisible:C,ref:o,children:[S&&(0,d.jsx)(c.Z,{mb:2,children:(0,d.jsx)(u.ZP,{default:!0,children:S})}),t]}),a&&(0,d.jsx)(v,{children:a})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return de}});var r=t(77837),i=t(82394),c=t(75582),u=t(38860),o=t.n(u),l=t(12691),a=t.n(l),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(73752),g=t(34744),v=t(67971),m=t(87372),b=t(11135),x=t(10919),j=t(51099),Z=t(60547),y=t(93348),_=t(41788),P=t(29237),O=t(86673),k=t(87815),w=t(19711),C=t(38435),S=t(82944),I=t(70902),E=t(23831),T=t(38626),D=t(73942),A=t(49125),N=T.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*A.iI,2*A.iI,D.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||E.Z).borders.light,";\n background-color: ").concat((e.theme||E.Z).background.popup,";\n ")})),H=t(90211),V=t(58122),M=t(28598);function R(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 F(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y="".concat(A.iI,"px ").concat(3*A.iI,"px");var B=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,u=e.variables,o=(0,s.useState)(!1),l=o[0],a=o[1],d=(0,s.useState)({}),p=d[0],h=d[1],g=(0,s.useState)(u||{}),b=g[0],x=g[1],j=(0,s.useMemo)((function(){return F(F({},n),{},{name:(0,H.Y6)(),variables:l?(0,V.e7)(b):null})}),[n,l,b]),Z=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),x((function(t){return F(F({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,M.jsx)(C.Z,F(F({},t),{},{rows:1,value:n})):(0,M.jsx)(S.Z,F({},t))};return(0,s.useEffect)((function(){var e=Object.entries(b).reduce((function(e,n){var t=(0,c.Z)(n,2),r=t[0],u=t[1],o=(0,H.Pb)(u)&&"object"===typeof JSON.parse(u)&&!Array.isArray(JSON.parse(u))&&null!==JSON.parse(u);return F(F({},e),{},(0,i.Z)({},r,o))}),{});h(e)}),[]),(0,M.jsxs)(P.Z,{footer:(0,M.jsxs)(v.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,M.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:Y,primaryAlternate:!0,children:"Run now"}),(0,M.jsx)(O.Z,{mr:1}),(0,M.jsx)(f.Z,{borderColor:E.Z.background.page,onClick:t,padding:Y,secondary:!0,children:"Cancel"})]}),header:(0,M.jsx)(m.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*A.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,M.jsx)(N,{children:(0,M.jsxs)(v.Z,{alignItems:"center",children:[(0,M.jsx)(O.Z,{mr:2,children:(0,M.jsx)(I.Z,{checked:l,onCheck:a})}),(0,M.jsx)(w.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),l&&b&&Object.entries(b).length>0&&(0,M.jsx)(O.Z,{mt:2,children:(0,M.jsx)(k.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(b).map((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1];return[(0,M.jsx)(w.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),Z(t,r)]}))})})]})},L=t(37391),W=T.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],E.Z.borders.medium,A.tr),q=T.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],L.w5),z=T.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],E.Z.background.output,D.n_,A.iI,A.tr),J=t(73899);var U=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,u=[];return Object.entries(r).forEach((function(e){var n=(0,c.Z)(e,2),t=n[0],r=n[1],o=null===i||void 0===i?void 0:i[t];u.push({uuid:t,value:(0,V.FS)(o||r)})})),(0,V.JZ)(u,t),(0,M.jsxs)(W,{children:[(0,M.jsx)(O.Z,{mb:2,children:(0,M.jsxs)(w.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,M.jsx)(q,{noScrollbarTrackBackground:!0,children:r&&u.map((function(e){var n=e.uuid,t=e.value;return(0,M.jsxs)(z,{children:[(0,M.jsx)(w.ZP,{monospace:!0,small:!0,children:n}),(0,M.jsx)(w.ZP,{color:J.Or,monospace:!0,small:!0,children:(0,V.FS)(t)})]})}))})]})},Q=t(54283),X=t(46261),G=t(97225),$=t(82531),K=t(10503),ee=t(52769),ne=t(59920),te=t(42305),re=t(7715),ie=t(9736),ce=t(96510),ue=t(59e3),oe=t(99497);function le(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 ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?le(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function se(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ie.Ct)(),u=n.uuid,o=(0,s.useState)(null),l=o[0],_=o[1],P=$.ZP.variables.pipelines.list(u,{},{revalidateOnFocus:!1}).data,k=null===P||void 0===P?void 0:P.variables,C=(0,ue.iV)(),S=null!==C&&void 0!==C&&C.page?C.page:0,I=$.ZP.pipeline_schedules.pipelines.list(u,{_limit:j.Q,_offset:(null!==C&&void 0!==C&&C.page?C.page:0)*j.Q},{refreshInterval:7500}),E=I.data,T=I.mutate,D=(0,s.useMemo)((function(){return(null===E||void 0===E?void 0:E.pipeline_schedules)||[]}),[E]),N=function(e){return(0,d.Db)($.ZP.pipeline_schedules.pipelines.useCreate(u),{onSuccess:function(n){return(0,ce.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return _({errors:n,response:e})}})}})},R=N((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),F=(0,c.Z)(R,2),Y=F[0],L=F[1].isLoading,W=N(T),q=(0,c.Z)(W,2),z=q[0],J=q[1].isLoading,le=(0,s.useMemo)((function(){var e;return null===(e=(0,V.wx)(k,(function(e){return e.uuid===ee.C})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return ae(ae({},e),{},(0,i.Z)({},t,r))}),{})}),[k]),se={name:(0,H.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},de=(0,oe.dd)((function(){return(0,M.jsx)(B,{initialPipelineSchedulePayload:se,onCancel:he,onSuccess:z,variables:le})}),{},[k,le],{background:!0,uuid:"run_pipeline_now_popup"}),pe=(0,c.Z)(de,2),fe=pe[0],he=pe[1],ge=(0,s.useState)(),ve=ge[0],me=ge[1],be=(0,s.useMemo)((function(){var e=null===ve||void 0===ve?void 0:ve.variables,n=!(0,re.Qr)(e),t=n?null===ve||void 0===ve?void 0:ve.variables:(0,re.Qr)(le)?null:le;return function(i){var c=i.height-(t?151:80);return(0,M.jsxs)(M.Fragment,{children:[t&&(0,M.jsx)(U,{hasOverride:n,scheduleType:null===ve||void 0===ve?void 0:ve.schedule_type,variables:le,variablesOverride:e}),!t&&(0,M.jsxs)(O.Z,{p:A.cd,children:[(0,M.jsx)(w.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,M.jsxs)(O.Z,{mt:1,children:[(0,M.jsx)(a(),{as:"/pipelines/".concat(u,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,M.jsx)(x.Z,{primary:!0,children:"Click here"})})," ",(0,M.jsx)(w.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,M.jsx)(h.Z,ae(ae({},i),{},{height:c,noStatus:!0}))]})}}),[r,u,null===ve||void 0===ve?void 0:ve.schedule_type,null===ve||void 0===ve?void 0:ve.variables,le]),xe=(0,s.useMemo)((function(){var e;return(null===E||void 0===E||null===(e=E.metadata)||void 0===e?void 0:e.count)||[]}),[E]);return(0,M.jsxs)(Z.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:be,errors:l,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:_,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,M.jsx)(b.ZP,{beforeElement:(0,M.jsx)(K.mm,{size:2.5*A.iI}),blackBorder:!0,inline:!0,loading:L,noHoverUnderline:!0,onClick:function(){return Y({pipeline_schedule:{name:(0,H.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,M.jsx)(w.ZP,{bold:!0,large:!0,children:"Run this pipeline using a schedule, event, or API."}),title:function(e){var n=e.name;return"".concat(n," triggers")},uuid:"".concat(ne.M.TRIGGERS,"_").concat(u),children:[(0,M.jsx)(O.Z,{mt:A.cd,px:A.cd,children:(0,M.jsxs)(v.Z,{justifyContent:"space-between",children:[(0,M.jsx)(m.Z,{level:5,children:"Pipeline triggers"}),(0,M.jsx)(X.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,M.jsx)(f.Z,{beforeIcon:(0,M.jsx)(K.JM,{inverted:!0,size:2*A.iI}),disabled:r,loading:J,onClick:(0,re.Qr)(le)?function(){return z({pipeline_schedule:se})}:fe,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,M.jsx)(g.Z,{light:!0,mt:A.cd,short:!0}),E?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(G.Z,{fetchPipelineSchedules:T,pipeline:n,pipelineSchedules:D,selectedSchedule:ve,setErrors:_,setSelectedSchedule:me}),(0,M.jsx)(O.Z,{p:2,children:(0,M.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=ae(ae({},C),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(u,"/triggers?").concat((0,ue.uM)(r)))},page:Number(S),totalPages:Math.ceil(xe/j.Q)})})]}):(0,M.jsx)(O.Z,{m:2,children:(0,M.jsx)(Q.Z,{inverted:!0})})]})}se.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().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 de=(0,_.Z)(se)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return p},AY:function(){return f},BP:function(){return d},JX:function(){return s},OC:function(){return c},Pc:function(){return h},Tz:function(){return a},d$:function(){return l},lJ:function(){return g},n1:function(){return o}});var r=t(92083),i=t.n(r),c="YYYY-MM-DD HH:mm:ss",u="YYYY-MM-DD HH:mm",o="YYYY-MM-DD";function l(e,n){var t=n.dayAgo,r=n.includeSeconds,o=n.utcFormat,l=i()(e),a=u;return o&&(l=l.utc()),t&&(l=l.subtract(1,"days")),r&&(a=c),l.format(a)}function a(e){var n=l((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?c:u)}function d(e,n,t){return i()(e).utc().hours(+n).minutes(+t).format()}function p(e){return i()(e).unix()}function f(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function h(e){var n=i().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function g(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,7607,5896,4804,1774,5872,1424,1005,7815,547,6694,3752,1286,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-ee0931af3abb55b3.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6308],{2850:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},79585:function(e,n,t){"use strict";t.d(n,{DQ:function(){return s},HY:function(){return c},SA:function(){return l},WH:function(){return o},eC:function(){return d},fF:function(){return u},tC:function(){return a}});var r=t(81132),i=t(9736),o="Workspace",c="Preferences",u="Git settings",d="Users",a="Account",s="Profile",l=function(e){var n=e.owner,t=e.roles,l=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];(n||t===r.No.ADMIN||0!==(2&l))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:d}),(!(0,i.YB)()||t<=r.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:u});var h=[{items:f,uuid:o}];return(0,i.YB)()?h.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:s}],uuid:a}]):h}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(1210),i=t(82394),o=t(12691),c=t.n(o),u=t(10919),d=t(86673),a=t(19711),s=t(38626),l=t(23831),f=t(49125),h=t(90880),p=(f.iI,s.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),g=s.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,h.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||l.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||l.Z.background).codeTextarea,";\n ")})),b=t(28598),m=t(82684);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 v(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,i.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 y=function(e){var n=e.isItemSelected,t=e.sections;return(0,b.jsx)(d.Z,{py:f.Gg,children:null===t||void 0===t?void 0:t.map((function(e){var t=e.items,r=e.title,i=e.uuid;return(0,b.jsxs)(d.Z,{children:[(0,b.jsx)(p,{children:(0,b.jsx)(a.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:r?r():i})}),null===t||void 0===t?void 0:t.map((function(e){var t=e.label,r=e.linkProps,o=e.onClick,d=e.uuid,a=t?t():d,s=(0,b.jsx)(g,{selected:null===n||void 0===n?void 0:n(v(v({},e),{},{uuidWorkspace:i})),children:a});return r?(0,m.createElement)(c(),v(v({},r),{},{key:d,passHref:!0}),(0,b.jsx)(u.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:s})):(0,b.jsx)(u.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:s},d)}))]},i)}))})},k=t(2850),w=t(79585),j=t(9736);var P=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,u=(0,j.PR)()||{};return(0,b.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,b.jsx)(k.M,{children:(0,b.jsx)(y,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,w.SA)(u)})}),beforeWidth:k.W,title:"Settings",uuid:"settings/index",children:i})}},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),o=t(86673),c=t(19711),u=t(23831),d=t(73942),a=t(37391),s=t(49125),l=t(28598),f=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),h=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),p=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,a.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),b=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,d=e.dark,a=e.footer,s=e.fullHeight,f=void 0===s||s,m=e.fullWidth,x=void 0===m||m,v=e.header,y=e.headerHeight,k=e.headerIcon,w=e.headerPaddingVertical,j=e.headerTitle,P=e.maxHeight,_=e.maxWidth,Z=e.minWidth,I=e.noPadding,O=e.overflowVisible,W=e.subtitle,S=e.success;return(0,l.jsxs)(h,{borderless:n,dark:d,fullHeight:f,fullWidth:x,maxHeight:P,maxWidth:_,minWidth:Z,overflowVisible:O,ref:r,success:S,children:[(v||j)&&(0,l.jsxs)(p,{headerPaddingVertical:w,height:y,children:[v&&v,j&&(0,l.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,l.jsxs)(i.Z,{alignItems:"center",children:[k&&k,(0,l.jsx)(o.Z,{ml:k?1:0,children:(0,l.jsx)(c.ZP,{bold:!0,default:!0,children:j})})]})})]}),(0,l.jsxs)(g,{maxHeight:P,noPadding:I,overflowVisible:O,ref:u,children:[W&&(0,l.jsx)(o.Z,{mb:2,children:(0,l.jsx)(c.ZP,{default:!0,children:W})}),t]}),a&&(0,l.jsx)(b,{children:a})]})}},96283:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),c=t(82684),u=t(29237),d=t(41788),a=t(30775),s=t(86673),l=t(20582),f=t(82531),h=t(49125),p=t(79585),g=t(9736),b=t(28598);function m(){var e=((0,g.PR)()||{}).id,n=f.ZP.users.detail(e),t=n.data,r=n.mutate,i=f.ZP.statuses.list().data,o=(0,c.useMemo)((function(){var e;return(null===i||void 0===i||null===(e=i.statuses)||void 0===e?void 0:e[0])||{}}),[i]),d=o.project_type,m=o.project_uuid,x=null===t||void 0===t?void 0:t.user;return(0,b.jsx)(a.Z,{uuidItemSelected:p.DQ,uuidWorkspaceSelected:p.tC,children:(0,b.jsx)(s.Z,{p:h.cd,children:(0,b.jsx)(u.Z,{children:(0,b.jsx)(l.Z,{disabledFields:["roles"],entity:"sub"===d?"project":"global",entityID:"sub"===d&&m,onSaveSuccess:r,user:x})})})})}m.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,d.Z)(m)},10736:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/account/profile",function(){return t(96283)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},99177:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}function i(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&r(e,n)}t.d(n,{Z:function(){return i}})},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(12539),i=t(80022);function o(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}}},function(e){e.O(0,[844,1424,1005,3883,9774,2888,179],(function(){return n=10736,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|