mage-ai 0.9.8__py3-none-any.whl → 0.9.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/ai/constants.py +1 -0
- mage_ai/ai/generator.py +6 -0
- mage_ai/ai/{gen_doc_for_pipeline.py → generator_cmds.py} +5 -0
- mage_ai/ai/llm_pipeline_wizard.py +108 -3
- mage_ai/api/policies/BlockPolicy.py +1 -0
- mage_ai/api/policies/BlockTemplatePolicy.py +9 -0
- mage_ai/api/policies/LlmPolicy.py +3 -2
- mage_ai/api/policies/OauthAccessTokenPolicy.py +31 -0
- mage_ai/api/policies/PipelinePolicy.py +1 -0
- mage_ai/api/policies/ProjectPolicy.py +9 -0
- mage_ai/api/policies/SearchResultPolicy.py +32 -0
- mage_ai/api/policies/VariablePolicy.py +8 -0
- mage_ai/api/presenters/BlockTemplatePresenter.py +1 -0
- mage_ai/api/presenters/OauthAccessTokenPresenter.py +9 -0
- mage_ai/api/presenters/ProjectPresenter.py +2 -0
- mage_ai/api/presenters/SearchResultPresenter.py +73 -0
- mage_ai/api/resources/BlockResource.py +43 -4
- mage_ai/api/resources/BlockTemplateResource.py +15 -2
- mage_ai/api/resources/CustomTemplateResource.py +15 -3
- mage_ai/api/resources/FileContentResource.py +8 -1
- mage_ai/api/resources/FileResource.py +22 -2
- mage_ai/api/resources/OauthAccessTokenResource.py +24 -0
- mage_ai/api/resources/PipelineResource.py +70 -2
- mage_ai/api/resources/ProjectResource.py +15 -1
- mage_ai/api/resources/SearchResultResource.py +68 -0
- mage_ai/api/resources/VariableResource.py +25 -14
- mage_ai/cache/base.py +3 -0
- mage_ai/cache/block_action_object/__init__.py +282 -0
- mage_ai/cache/block_action_object/constants.py +4 -0
- mage_ai/cache/constants.py +1 -0
- mage_ai/data_integrations/destinations/constants.py +2 -0
- mage_ai/data_preparation/executors/k8s_pipeline_executor.py +1 -1
- mage_ai/data_preparation/models/block/__init__.py +20 -1
- mage_ai/data_preparation/models/block/dbt/utils/__init__.py +1 -0
- mage_ai/data_preparation/models/custom_templates/custom_block_template.py +8 -3
- mage_ai/data_preparation/models/custom_templates/utils.py +6 -3
- mage_ai/data_preparation/models/file.py +3 -0
- mage_ai/data_preparation/models/pipeline.py +10 -1
- mage_ai/data_preparation/models/{project.py → project/__init__.py} +17 -0
- mage_ai/data_preparation/models/project/constants.py +5 -0
- mage_ai/data_preparation/repo_manager.py +9 -6
- mage_ai/data_preparation/templates/constants.py +478 -1
- mage_ai/data_preparation/templates/template.py +9 -1
- mage_ai/orchestration/db/__init__.py +25 -0
- mage_ai/orchestration/pipeline_scheduler.py +23 -0
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/OwvTROmputQCA1Z9HEGDv/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{1005-ce36fe7ed460d006.js → 1005-16c1a6678de5311e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1424-e22139f33196c5c1.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/1484-a76b2c31e4808379.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2485-b569baad92049d6b.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{2786-d8b593e5d7c42665.js → 2786-acce6ea0d9b4898e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3654-573457b62efff6e2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/3881-0eb04f7f7a244347.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{4317-b112fe7bb532b998.js → 4317-3fe63fc9401685d6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4822-52d9d661b6bd1ae9.js → 4822-045cc7cdd7c95163.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{547-14029bdacc0ed267.js → 547-4ad2cdae967055b6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6299-cf188c1b7a1bc33c.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{7815-6dc55b5fd5d1f48a.js → 7815-fbd99c8f259d9e8b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{8312-cdc4d6c3b9f53099.js → 8312-c88a3b1012e5448b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{8952-492bf0e29d215ddd.js → 8952-e94a7334fcd5c68b.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/9055-d0d25298cb5f4e45.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-c7557dc9e725825e.js → _app-fa38a24707c76411.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-b9dac983c75798f2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/{settings-17bb362b9683079c.js → settings-453aaa7bf78f8101.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{[user]-bfa53c0ee79920a0.js → [user]-3b502aa6d1a04cad.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/{new-2f7e6bf8e2a37380.js → new-dd41d718cbb5990c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-ec748f838b7b8fad.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-bcc24120f5911f76.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-8ffbc4b0e8a43266.js → overview-6f20b9e9cbec91d6.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-373f6b8c9161e819.js → [...slug]-55212dfc15881ef2.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{backfills-226bf0c5c1bfe004.js → backfills-6b4a82cd0516e121.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-0705c99df236ec8a.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-4ade07836fd577c9.js → logs-c294f5d74bd2d50f.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-fd9eb711e89425e9.js → monitors-1b9e4abc54842cdf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-027666ed18d3151e.js → runs-17ebe87e94242ae5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-48b60ca236a26818.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-de58e6b91e5e4552.js → syncs-5153f4665aaf8b17.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-432843576e1ed09e.js → [...slug]-1306e85191f6b47c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-ae31b1d0d8a4634d.js → triggers-2e731d343a26d46a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-0fab737dbc9074fc.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-b2354688508b0755.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4f01b5c429757cc.js → users-6522c963087f18e8.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{sign-in-1140f8ee7e89381a.js → sign-in-7dcd1257ca9660bb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/{[...slug]-f59b3f04c5a49351.js → [...slug]-78a07e7fe8973811.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-dbb209ce131390a9.js → templates-19df643f52679d5a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-a1cf445565b68809.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 +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +16 -16
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/server.py +5 -0
- mage_ai/services/search/__init__.py +0 -0
- mage_ai/services/search/block_action_objects.py +33 -0
- mage_ai/services/search/constants.py +1 -0
- mage_ai/shared/array.py +7 -0
- mage_ai/shared/parsers.py +11 -2
- mage_ai/tests/shared/test_parsers.py +73 -0
- mage_ai/usage_statistics/constants.py +1 -0
- mage_ai/usage_statistics/logger.py +19 -1
- {mage_ai-0.9.8.dist-info → mage_ai-0.9.9.dist-info}/METADATA +9 -7
- {mage_ai-0.9.8.dist-info → mage_ai-0.9.9.dist-info}/RECORD +142 -129
- mage_ai/server/frontend_dist/_next/static/RcIgkp9pBXE1Rb4tOGR1L/_buildManifest.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1424-de97c5aa0477894b.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/1484-c9d6bc33227070dd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2485-86c97f516c1abb9f.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3215-c2f5f19b650f9a50.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3654-bff4740b63cf280c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/3881-7f121dbbe6e273cd.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/6299-97f283be01adf6a8.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/files-0df5a20d6f1aa606.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-1f6cb7656299cbd1.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4894eabb442a039c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-a9bd86bee73b5762.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-cf51793c2112915c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-f1131ffe0d2a4a06.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-170943ca00445486.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-2ecda1f1437013f2.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{RcIgkp9pBXE1Rb4tOGR1L → OwvTROmputQCA1Z9HEGDv}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{RcIgkp9pBXE1Rb4tOGR1L → OwvTROmputQCA1Z9HEGDv}/_ssgManifest.js +0 -0
- {mage_ai-0.9.8.dist-info → mage_ai-0.9.9.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.8.dist-info → mage_ai-0.9.9.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.8.dist-info → mage_ai-0.9.9.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.8.dist-info → mage_ai-0.9.9.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return u},JZ:function(){return d},e7:function(){return s},wx:function(){return l}});var r=t(75582),i=t(82394),o=t(93348);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e){return"string"===typeof e?e:JSON.stringify(e)}function l(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 a(a({},e),{},{value:u(n)})}))}function d(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function s(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],c=t[1],u=c;try{u=JSON.parse(c)}catch(l){}return a(a({},e),{},(0,i.Z)({},o,u))}),{}):e}},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),o=t(86673),c=t(19711),a=t(23831),u=t(73942),l=t(37391),d=t(49125),s=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*d.iI,1.5*d.iI,1.5*d.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],u.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||a.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||a.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;"," "," "," ",""],u.n_,u.n_,(function(e){return"\n background-color: ".concat((e.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||a.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*d.iI,l.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*d.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;"],u.M8,u.YF,1.75*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,a=e.contentContainerRef,u=e.dark,l=e.footer,d=e.fullHeight,p=void 0===d||d,b=e.fullWidth,m=void 0===b||b,x=e.header,j=e.headerHeight,y=e.headerIcon,O=e.headerPaddingVertical,Z=e.headerTitle,w=e.maxHeight,P=e.maxWidth,_=e.minWidth,S=e.noPadding,k=e.overflowVisible,C=e.subtitle,I=e.success;return(0,s.jsxs)(f,{borderless:n,dark:u,fullHeight:p,fullWidth:m,maxHeight:w,maxWidth:P,minWidth:_,overflowVisible:k,ref:r,success:I,children:[(x||Z)&&(0,s.jsxs)(h,{headerPaddingVertical:O,height:j,children:[x&&x,Z&&(0,s.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Z,{alignItems:"center",children:[y&&y,(0,s.jsx)(o.Z,{ml:y?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,s.jsxs)(g,{maxHeight:w,noPadding:S,overflowVisible:k,ref:a,children:[C&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:C})}),t]}),l&&(0,s.jsx)(v,{children:l})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return pe}});var r=t(77837),i=t(82394),o=t(75582),c=t(38860),a=t.n(c),u=t(12691),l=t.n(u),d=t(82684),s=t(83455),p=t(34376),f=t(60328),h=t(48952),g=t(34744),v=t(67971),b=t(87372),m=t(11135),x=t(10919),j=t(51099),y=t(60547),O=t(93348),Z=t(41788),w=t(29237),P=t(86673),_=t(87815),S=t(19711),k=t(38435),C=t(82944),I=t(70902),D=t(23831),E=t(38626),T=t(73942),M=t(49125),N=E.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*M.iI,2*M.iI,T.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||D.Z).borders.light,";\n background-color: ").concat((e.theme||D.Z).background.popup,";\n ")})),H=t(90211),Y=t(58122),W=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function A(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F="".concat(M.iI,"px ").concat(3*M.iI,"px");var R=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,c=e.variables,a=(0,d.useState)(!1),u=a[0],l=a[1],s=(0,d.useState)({}),p=s[0],h=s[1],g=(0,d.useState)(c||{}),m=g[0],x=g[1],j=(0,d.useMemo)((function(){return A(A({},n),{},{name:(0,H.Y6)(),variables:u?(0,Y.e7)(m):null})}),[n,u,m]),y=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),x((function(t){return A(A({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,W.jsx)(k.Z,A(A({},t),{},{rows:1,value:n})):(0,W.jsx)(C.Z,A({},t))};return(0,d.useEffect)((function(){var e=Object.entries(m).reduce((function(e,n){var t=(0,o.Z)(n,2),r=t[0],c=t[1],a=(0,H.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return A(A({},e),{},(0,i.Z)({},r,a))}),{});h(e)}),[]),(0,W.jsxs)(w.Z,{footer:(0,W.jsxs)(v.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,W.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:F,primaryAlternate:!0,children:"Run now"}),(0,W.jsx)(P.Z,{mr:1}),(0,W.jsx)(f.Z,{borderColor:D.Z.background.page,onClick:t,padding:F,secondary:!0,children:"Cancel"})]}),header:(0,W.jsx)(b.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*M.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,W.jsx)(N,{children:(0,W.jsxs)(v.Z,{alignItems:"center",children:[(0,W.jsx)(P.Z,{mr:2,children:(0,W.jsx)(I.Z,{checked:u,onCheck:l})}),(0,W.jsx)(S.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),u&&m&&Object.entries(m).length>0&&(0,W.jsx)(P.Z,{mt:2,children:(0,W.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(m).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return[(0,W.jsx)(S.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),y(t,r)]}))})})]})},B=t(37391),J=E.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],D.Z.borders.medium,M.tr),K=E.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],B.w5),Q=E.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],D.Z.background.output,T.n_,M.iI,M.tr),X=t(73899);var z=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,c=[];return Object.entries(r).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1],a=null===i||void 0===i?void 0:i[t];c.push({uuid:t,value:(0,Y.FS)(a||r)})})),(0,Y.JZ)(c,t),(0,W.jsxs)(J,{children:[(0,W.jsx)(P.Z,{mb:2,children:(0,W.jsxs)(S.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,W.jsx)(K,{noScrollbarTrackBackground:!0,children:r&&c.map((function(e){var n=e.uuid,t=e.value;return(0,W.jsxs)(Q,{children:[(0,W.jsx)(S.ZP,{monospace:!0,small:!0,children:n}),(0,W.jsx)(S.ZP,{color:X.Or,monospace:!0,small:!0,children:(0,Y.FS)(t)})]})}))})]})},G=t(54283),L=t(46261),U=t(97225),q=t(82531),$=t(10503),ee=t(52769),ne=t(59920),te=t(42305),re=t(24224),ie=t(7715),oe=t(9736),ce=t(96510),ae=t(59e3),ue=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 de(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,oe.Ct)(),c=n.uuid,a=(0,d.useState)(null),u=a[0],Z=a[1],w=q.ZP.variables.pipelines.list(c,{},{revalidateOnFocus:!1}).data,_=null===w||void 0===w?void 0:w.variables,k=(0,ae.iV)(),C=null!==k&&void 0!==k&&k.page?k.page:0,I=q.ZP.pipeline_schedules.pipelines.list(c,{_limit:j.Q,_offset:(null!==k&&void 0!==k&&k.page?k.page:0)*j.Q},{refreshInterval:7500}),D=I.data,E=I.mutate,T=(0,d.useMemo)((function(){return(null===D||void 0===D?void 0:D.pipeline_schedules)||[]}),[D]),N=function(e){return(0,s.Db)(q.ZP.pipeline_schedules.pipelines.useCreate(c),{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 Z({errors:n,response:e})}})}})},V=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"))})),A=(0,o.Z)(V,2),F=A[0],B=A[1].isLoading,J=N(E),K=(0,o.Z)(J,2),Q=K[0],X=K[1].isLoading,le=(0,d.useMemo)((function(){var e;return null===(e=(0,Y.wx)(_,(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 de(de({},e),{},(0,i.Z)({},t,r))}),{})}),[_]),se={name:(0,H.Y6)(),schedule_interval:O.U5.ONCE,schedule_type:O.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:O.fq.ACTIVE},pe=(0,ue.dd)((function(){return(0,W.jsx)(R,{initialPipelineSchedulePayload:se,onCancel:ge,onSuccess:Q,variables:le})}),{},[_,le],{background:!0,uuid:"run_pipeline_now_popup"}),fe=(0,o.Z)(pe,2),he=fe[0],ge=fe[1],ve=(0,d.useState)(),be=ve[0],me=ve[1],xe=(0,d.useMemo)((function(){var e=null===be||void 0===be?void 0:be.variables,n=!(0,ie.Qr)(e),t=n?null===be||void 0===be?void 0:be.variables:(0,ie.Qr)(le)?null:le;return function(i){var o=i.height-(t?151:80);return(0,W.jsxs)(W.Fragment,{children:[t&&(0,W.jsx)(z,{hasOverride:n,scheduleType:null===be||void 0===be?void 0:be.schedule_type,variables:le,variablesOverride:e}),!t&&(0,W.jsxs)(P.Z,{p:M.cd,children:[(0,W.jsx)(S.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,W.jsxs)(P.Z,{mt:1,children:[(0,W.jsx)(l(),{as:"/pipelines/".concat(c,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,W.jsx)(x.Z,{primary:!0,children:"Click here"})})," ",(0,W.jsx)(S.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,W.jsx)(h.Z,de(de({},i),{},{height:o,noStatus:!0}))]})}}),[r,c,null===be||void 0===be?void 0:be.schedule_type,null===be||void 0===be?void 0:be.variables,le]),je=(0,d.useMemo)((function(){var e;return(null===D||void 0===D||null===(e=D.metadata)||void 0===e?void 0:e.count)||[]}),[D]),ye=q.ZP.pipeline_triggers.pipelines.list(c),Oe=ye.data,Ze=(ye.mutate,(0,d.useMemo)((function(){return(0,re.HK)((null===Oe||void 0===Oe?void 0:Oe.pipeline_triggers)||[],(function(e){return e.name}))}),[Oe]));return(0,W.jsxs)(y.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:xe,errors:u,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:Z,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,W.jsx)(m.ZP,{beforeElement:(0,W.jsx)($.mm,{size:2.5*M.iI}),blackBorder:!0,inline:!0,loading:B,noHoverUnderline:!0,onClick:function(){return F({pipeline_schedule:{name:(0,H.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,W.jsx)(S.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(c),children:[(0,W.jsx)(P.Z,{mt:M.cd,px:M.cd,children:(0,W.jsxs)(v.Z,{justifyContent:"space-between",children:[(0,W.jsx)(b.Z,{level:5,children:"Pipeline triggers"}),(0,W.jsx)(L.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,W.jsx)(f.Z,{beforeIcon:(0,W.jsx)($.JM,{inverted:!0,size:2*M.iI}),disabled:r,loading:X,onClick:(0,ie.Qr)(le)?function(){return Q({pipeline_schedule:se})}:he,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,W.jsx)(g.Z,{light:!0,mt:M.cd,short:!0}),D?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(U.Z,{fetchPipelineSchedules:E,pipeline:n,pipelineSchedules:T,pipelineTriggersByName:Ze,selectedSchedule:be,setErrors:Z,setSelectedSchedule:me}),(0,W.jsx)(P.Z,{p:2,children:(0,W.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=de(de({},k),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(c,"/triggers?").concat((0,ae.uM)(r)))},page:Number(C),totalPages:Math.ceil(je/j.Q)})})]}):(0,W.jsx)(P.Z,{m:2,children:(0,W.jsx)(G.Z,{inverted:!0})})]})}se.getInitialProps=function(){var e=(0,r.Z)(a().mark((function e(n){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var pe=(0,Z.Z)(se)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return x},AY:function(){return j},BP:function(){return m},JX:function(){return b},OC:function(){return s},Pc:function(){return y},Ro:function(){return O},Tz:function(){return v},Y_:function(){return w},d$:function(){return g},jV:function(){return Z},lJ:function(){return P},n1:function(){return f},s8:function(){return l},vk:function(){return o},yD:function(){return d}});var r,i,o,c=t(82394),a=t(92083),u=t.n(a);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(o||(o={}));var l=(r={},(0,c.Z)(r,o.TODAY,"today"),(0,c.Z)(r,o.WEEK,"last 7 days"),(0,c.Z)(r,o.MONTH,"last 30 days"),r),d=(i={},(0,c.Z)(i,o.TODAY,0),(0,c.Z)(i,o.WEEK,6),(0,c.Z)(i,o.MONTH,29),i),s="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function g(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,o=u()(e),c=p;return i&&(o=o.utc()),t&&(o=o.subtract(1,"days")),r&&(c=s),o.format(c)}function v(e){var n=g((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?s:p)}function m(e,n,t){return u()(e).utc().hours(+n).minutes(+t).format()}function x(e){return u()(e).unix()}function j(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function y(e){var n=u().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function O(e,n){var t=u().utc(),r=u().utc();null!==n&&void 0!==n&&n.localTime&&(t=u()().local(),r=u()().local());var i=(t=t.subtract(e,"days")).format(h),o=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?o:"".concat(i," - ").concat(o)}function Z(e,n){var t=null!==n&&void 0!==n&&n.localTime?u()().local():u().utc();if(e===o.WEEK){var r=d[o.WEEK];t=t.subtract(r,"days")}else if(e===o.MONTH){var i=d[o.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(s)}function w(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function P(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,9902,426,1774,1424,1005,7815,3654,547,8952,4317,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{58122:function(e,n,t){"use strict";t.d(n,{FS:function(){return u},JZ:function(){return d},e7:function(){return s},wx:function(){return l}});var r=t(75582),i=t(82394),o=t(93348);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e){return"string"===typeof e?e:JSON.stringify(e)}function l(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 a(a({},e),{},{value:u(n)})}))}function d(e,n){return n===o.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===o.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function s(e){return e?Object.entries(e).reduce((function(e,n){var t=(0,r.Z)(n,2),o=t[0],c=t[1],u=c;try{u=JSON.parse(c)}catch(l){}return a(a({},e),{},(0,i.Z)({},o,u))}),{}):e}},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),o=t(86673),c=t(19711),a=t(23831),u=t(73942),l=t(37391),d=t(49125),s=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*d.iI,1.5*d.iI,1.5*d.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],u.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||a.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||a.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||a.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||a.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;"," "," "," ",""],u.n_,u.n_,(function(e){return"\n background-color: ".concat((e.theme.background||a.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||a.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*d.iI,l.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*d.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;"],u.M8,u.YF,1.75*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,a=e.contentContainerRef,u=e.dark,l=e.footer,d=e.fullHeight,p=void 0===d||d,b=e.fullWidth,m=void 0===b||b,x=e.header,j=e.headerHeight,y=e.headerIcon,O=e.headerPaddingVertical,Z=e.headerTitle,w=e.maxHeight,P=e.maxWidth,_=e.minWidth,S=e.noPadding,k=e.overflowVisible,C=e.subtitle,I=e.success;return(0,s.jsxs)(f,{borderless:n,dark:u,fullHeight:p,fullWidth:m,maxHeight:w,maxWidth:P,minWidth:_,overflowVisible:k,ref:r,success:I,children:[(x||Z)&&(0,s.jsxs)(h,{headerPaddingVertical:O,height:j,children:[x&&x,Z&&(0,s.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Z,{alignItems:"center",children:[y&&y,(0,s.jsx)(o.Z,{ml:y?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:Z})})]})})]}),(0,s.jsxs)(g,{maxHeight:w,noPadding:S,overflowVisible:k,ref:a,children:[C&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:C})}),t]}),l&&(0,s.jsx)(v,{children:l})]})}},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return pe}});var r=t(77837),i=t(82394),o=t(75582),c=t(38860),a=t.n(c),u=t(12691),l=t.n(u),d=t(82684),s=t(83455),p=t(34376),f=t(60328),h=t(48952),g=t(34744),v=t(67971),b=t(87372),m=t(11135),x=t(10919),j=t(51099),y=t(60547),O=t(93348),Z=t(41788),w=t(29237),P=t(86673),_=t(87815),S=t(19711),k=t(38435),C=t(82944),I=t(70902),D=t(23831),E=t(38626),T=t(73942),M=t(49125),N=E.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*M.iI,2*M.iI,T.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||D.Z).borders.light,";\n background-color: ").concat((e.theme||D.Z).background.popup,";\n ")})),H=t(90211),Y=t(58122),W=t(28598);function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function A(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?V(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):V(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F="".concat(M.iI,"px ").concat(3*M.iI,"px");var R=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,c=e.variables,a=(0,d.useState)(!1),u=a[0],l=a[1],s=(0,d.useState)({}),p=s[0],h=s[1],g=(0,d.useState)(c||{}),m=g[0],x=g[1],j=(0,d.useMemo)((function(){return A(A({},n),{},{name:(0,H.Y6)(),variables:u?(0,Y.e7)(m):null})}),[n,u,m]),y=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),x((function(t){return A(A({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,W.jsx)(k.Z,A(A({},t),{},{rows:1,value:n})):(0,W.jsx)(C.Z,A({},t))};return(0,d.useEffect)((function(){var e=Object.entries(m).reduce((function(e,n){var t=(0,o.Z)(n,2),r=t[0],c=t[1],a=(0,H.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return A(A({},e),{},(0,i.Z)({},r,a))}),{});h(e)}),[]),(0,W.jsxs)(w.Z,{footer:(0,W.jsxs)(v.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,W.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:F,primaryAlternate:!0,children:"Run now"}),(0,W.jsx)(P.Z,{mr:1}),(0,W.jsx)(f.Z,{borderColor:D.Z.background.page,onClick:t,padding:F,secondary:!0,children:"Cancel"})]}),header:(0,W.jsx)(b.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*M.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,W.jsx)(N,{children:(0,W.jsxs)(v.Z,{alignItems:"center",children:[(0,W.jsx)(P.Z,{mr:2,children:(0,W.jsx)(I.Z,{checked:u,onCheck:l})}),(0,W.jsx)(S.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),u&&m&&Object.entries(m).length>0&&(0,W.jsx)(P.Z,{mt:2,children:(0,W.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(m).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return[(0,W.jsx)(S.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),y(t,r)]}))})})]})},B=t(37391),J=E.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],D.Z.borders.medium,M.tr),K=E.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],B.w5),Q=E.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],D.Z.background.output,T.n_,M.iI,M.tr),X=t(73899);var z=function(e){var n=e.hasOverride,t=e.scheduleType,r=e.variables,i=e.variablesOverride,c=[];return Object.entries(r).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1],a=null===i||void 0===i?void 0:i[t];c.push({uuid:t,value:(0,Y.FS)(a||r)})})),(0,Y.JZ)(c,t),(0,W.jsxs)(J,{children:[(0,W.jsx)(P.Z,{mb:2,children:(0,W.jsxs)(S.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,W.jsx)(K,{noScrollbarTrackBackground:!0,children:r&&c.map((function(e){var n=e.uuid,t=e.value;return(0,W.jsxs)(Q,{children:[(0,W.jsx)(S.ZP,{monospace:!0,small:!0,children:n}),(0,W.jsx)(S.ZP,{color:X.Or,monospace:!0,small:!0,children:(0,Y.FS)(t)})]})}))})]})},G=t(54283),L=t(46261),U=t(97225),q=t(82531),$=t(22341),ee=t(52769),ne=t(59920),te=t(42305),re=t(24224),ie=t(7715),oe=t(9736),ce=t(96510),ae=t(59e3),ue=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 de(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,oe.Ct)(),c=n.uuid,a=(0,d.useState)(null),u=a[0],Z=a[1],w=q.ZP.variables.pipelines.list(c,{global_only:!0},{revalidateOnFocus:!1}).data,_=null===w||void 0===w?void 0:w.variables,k=(0,ae.iV)(),C=null!==k&&void 0!==k&&k.page?k.page:0,I=q.ZP.pipeline_schedules.pipelines.list(c,{_limit:j.Q,_offset:(null!==k&&void 0!==k&&k.page?k.page:0)*j.Q},{refreshInterval:7500}),D=I.data,E=I.mutate,T=(0,d.useMemo)((function(){return(null===D||void 0===D?void 0:D.pipeline_schedules)||[]}),[D]),N=function(e){return(0,s.Db)(q.ZP.pipeline_schedules.pipelines.useCreate(c),{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 Z({errors:n,response:e})}})}})},V=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"))})),A=(0,o.Z)(V,2),F=A[0],B=A[1].isLoading,J=N(E),K=(0,o.Z)(J,2),Q=K[0],X=K[1].isLoading,le=(0,d.useMemo)((function(){var e;return null===(e=(0,Y.wx)(_,(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 de(de({},e),{},(0,i.Z)({},t,r))}),{})}),[_]),se={name:(0,H.Y6)(),schedule_interval:O.U5.ONCE,schedule_type:O.Xm.TIME,start_time:(0,te.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:O.fq.ACTIVE},pe=(0,ue.dd)((function(){return(0,W.jsx)(R,{initialPipelineSchedulePayload:se,onCancel:ge,onSuccess:Q,variables:le})}),{},[_,le],{background:!0,uuid:"run_pipeline_now_popup"}),fe=(0,o.Z)(pe,2),he=fe[0],ge=fe[1],ve=(0,d.useState)(),be=ve[0],me=ve[1],xe=(0,d.useMemo)((function(){var e=null===be||void 0===be?void 0:be.variables,n=!(0,ie.Qr)(e),t=n?null===be||void 0===be?void 0:be.variables:(0,ie.Qr)(le)?null:le;return function(i){var o=i.height-(t?151:80);return(0,W.jsxs)(W.Fragment,{children:[t&&(0,W.jsx)(z,{hasOverride:n,scheduleType:null===be||void 0===be?void 0:be.schedule_type,variables:le,variablesOverride:e}),!t&&(0,W.jsxs)(P.Z,{p:M.cd,children:[(0,W.jsx)(S.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,W.jsxs)(P.Z,{mt:1,children:[(0,W.jsx)(l(),{as:"/pipelines/".concat(c,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,W.jsx)(x.Z,{primary:!0,children:"Click here"})})," ",(0,W.jsx)(S.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,W.jsx)(h.Z,de(de({},i),{},{height:o,noStatus:!0}))]})}}),[r,c,null===be||void 0===be?void 0:be.schedule_type,null===be||void 0===be?void 0:be.variables,le]),je=(0,d.useMemo)((function(){var e;return(null===D||void 0===D||null===(e=D.metadata)||void 0===e?void 0:e.count)||[]}),[D]),ye=q.ZP.pipeline_triggers.pipelines.list(c),Oe=ye.data,Ze=(ye.mutate,(0,d.useMemo)((function(){return(0,re.HK)((null===Oe||void 0===Oe?void 0:Oe.pipeline_triggers)||[],(function(e){return e.name}))}),[Oe]));return(0,W.jsxs)(y.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:xe,errors:u,pageName:ne.M.TRIGGERS,pipeline:n,setErrors:Z,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,W.jsx)(m.ZP,{beforeElement:(0,W.jsx)($.mm,{size:2.5*M.iI}),blackBorder:!0,inline:!0,loading:B,noHoverUnderline:!0,onClick:function(){return F({pipeline_schedule:{name:(0,H.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,W.jsx)(S.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(c),children:[(0,W.jsx)(P.Z,{mt:M.cd,px:M.cd,children:(0,W.jsxs)(v.Z,{justifyContent:"space-between",children:[(0,W.jsx)(b.Z,{level:5,children:"Pipeline triggers"}),(0,W.jsx)(L.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,W.jsx)(f.Z,{beforeIcon:(0,W.jsx)($.JM,{inverted:!0,size:2*M.iI}),disabled:r,loading:X,onClick:(0,ie.Qr)(le)?function(){return Q({pipeline_schedule:se})}:he,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,W.jsx)(g.Z,{light:!0,mt:M.cd,short:!0}),D?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(U.Z,{fetchPipelineSchedules:E,pipeline:n,pipelineSchedules:T,pipelineTriggersByName:Ze,selectedSchedule:be,setErrors:Z,setSelectedSchedule:me}),(0,W.jsx)(P.Z,{p:2,children:(0,W.jsx)(j.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),r=de(de({},k),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(c,"/triggers?").concat((0,ae.uM)(r)))},page:Number(C),totalPages:Math.ceil(je/j.Q)})})]}):(0,W.jsx)(P.Z,{m:2,children:(0,W.jsx)(G.Z,{inverted:!0})})]})}se.getInitialProps=function(){var e=(0,r.Z)(a().mark((function e(n){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var pe=(0,Z.Z)(se)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return x},AY:function(){return j},BP:function(){return m},JX:function(){return b},OC:function(){return s},Pc:function(){return y},Ro:function(){return O},Tz:function(){return v},Y_:function(){return w},d$:function(){return g},jV:function(){return Z},lJ:function(){return P},n1:function(){return f},s8:function(){return l},vk:function(){return o},yD:function(){return d}});var r,i,o,c=t(82394),a=t(92083),u=t.n(a);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(o||(o={}));var l=(r={},(0,c.Z)(r,o.TODAY,"today"),(0,c.Z)(r,o.WEEK,"last 7 days"),(0,c.Z)(r,o.MONTH,"last 30 days"),r),d=(i={},(0,c.Z)(i,o.TODAY,0),(0,c.Z)(i,o.WEEK,6),(0,c.Z)(i,o.MONTH,29),i),s="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function g(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,o=u()(e),c=p;return i&&(o=o.utc()),t&&(o=o.subtract(1,"days")),r&&(c=s),o.format(c)}function v(e){var n=g((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?s:p)}function m(e,n,t){return u()(e).utc().hours(+n).minutes(+t).format()}function x(e){return u()(e).unix()}function j(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function y(e){var n=u().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function O(e,n){var t=u().utc(),r=u().utc();null!==n&&void 0!==n&&n.localTime&&(t=u()().local(),r=u()().local());var i=(t=t.subtract(e,"days")).format(h),o=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?o:"".concat(i," - ").concat(o)}function Z(e,n){var t=null!==n&&void 0!==n&&n.localTime?u()().local():u().utc();if(e===o.WEEK){var r=d[o.WEEK];t=t.subtract(r,"days")}else if(e===o.MONTH){var i=d[o.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(s)}function w(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function P(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(6087)}])}},function(e){e.O(0,[844,9902,426,1774,1424,1005,7815,3654,547,8952,4317,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var i=t(82394),o=t(21831),r=t(82684),u=t(47999),l=t(49894),c=t(93461),s=t(57384),a=t(41424),d=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(d.HS,{ref:n,children:t})}var h=r.forwardRef(f),v=t(32063),m=t(85019),b=t(82531),j=t(66166),g=t(3055),x=t(49125),y=t(91427),Z=t(24141);function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,i=e.after,f=e.afterHidden,w=e.afterWidth,O=e.afterWidthOverride,k=e.before,P=e.beforeWidth,E=e.breadcrumbs,I=e.children,T=e.errors,_=e.headerMenuItems,S=e.headerOffset,A=e.mainContainerHeader,M=e.navigationItems,D=e.setErrors,R=e.subheaderChildren,B=e.title,N=e.uuid,L=(0,Z.i)().width,G="dashboard_after_width_".concat(N),Y="dashboard_before_width_".concat(N),H=(0,r.useRef)(null),U=(0,r.useState)(O?w:(0,y.U2)(G,w)),V=U[0],z=U[1],W=(0,r.useState)(!1),F=W[0],q=W[1],Q=(0,r.useState)(k?Math.max((0,y.U2)(Y,P),13*x.iI):null),K=Q[0],$=Q[1],J=(0,r.useState)(!1),X=J[0],ee=J[1],ne=(0,r.useState)(null)[1],te=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,ie=null===te||void 0===te?void 0:te.projects,oe={label:function(){var e;return null===ie||void 0===ie||null===(e=ie[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},re=[];E?(t&&re.push(oe),re.push.apply(re,(0,o.Z)(E))):(null===ie||void 0===ie?void 0:ie.length)>=1&&re.push.apply(re,[oe,{bold:!0,label:function(){return B}}]),(0,r.useEffect)((function(){null===H||void 0===H||!H.current||F||X||null===ne||void 0===ne||ne(H.current.getBoundingClientRect().width)}),[F,V,X,K,H,ne,L]),(0,r.useEffect)((function(){F||(0,y.t8)(G,V)}),[f,F,V,G]),(0,r.useEffect)((function(){X||(0,y.t8)(Y,K)}),[X,K,Y]);var ue=(0,j.Z)(w);return(0,r.useEffect)((function(){O&&ue!==w&&z(w)}),[O,w,ue]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.Z,{title:B}),(0,p.jsx)(a.Z,{breadcrumbs:re,menuItems:_,project:null===ie||void 0===ie?void 0:ie[0],version:null===ie||void 0===ie||null===(n=ie[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(d.Nk,{children:[0!==(null===M||void 0===M?void 0:M.length)&&(0,p.jsx)(d.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:M,showMore:!0})}),(0,p.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:i,afterHeightOffset:g.Mz,afterHidden:f,afterMousedownActive:F,afterWidth:V,before:k,beforeHeightOffset:g.Mz,beforeMousedownActive:X,beforeWidth:d.k1+(k?K:0),headerOffset:S,hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerHeader:A,mainContainerRef:H,setAfterMousedownActive:q,setAfterWidth:z,setBeforeMousedownActive:ee,setBeforeWidth:$,children:[R&&(0,p.jsx)(h,{children:R}),I]})})]}),T&&(0,p.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,p.jsx)(l.Z,C(C({},T),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}},64651:function(e,n,t){"use strict";t.d(n,{d:function(){return r}});var i=t(98781),o=t(90211),r=function(e,n){var t=[{label:function(){return"Standard (batch)"},onClick:function(){return e({pipeline:{name:(0,o.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{label:function(){return"Data integration"},onClick:function(){return e({pipeline:{name:(0,o.Y6)(),type:i.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{label:function(){return"Streaming"},onClick:function(){return e({pipeline:{name:(0,o.Y6)(),type:i.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}];return null!==n&&void 0!==n&&n.showBrowseTemplates&&t.push({label:function(){return"From a template"},onClick:function(){var e;return null===n||void 0===n||null===(e=n.showBrowseTemplates)||void 0===e?void 0:e.call(n)},uuid:"Pipelines/NewPipelineMenu/custom_template"}),t}},50316:function(e,n,t){"use strict";t.d(n,{B:function(){return p}});var i=t(82394),o=t(30264),r=t(11135),u=t(22341),l=t(99994),c=t(49125),s=t(28598);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function 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}var p={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};n.Z=function(e){var n=e.addButtonMenuOpen,t=e.addButtonMenuRef,i=e.isLoading,a=e.label,f=e.menuItems,h=e.onClick,v=e.onClickCallback;return(0,s.jsx)(o.Z,{disableKeyboardShortcuts:!0,items:f,onClickCallback:v,onClickOutside:v,open:n,parentRef:t,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,s.jsx)(r.ZP,d(d({},p),{},{background:l.eW,beforeElement:(0,s.jsx)(u.mm,{size:2.5*c.iI}),loading:i,onClick:function(e){e.preventDefault(),null===h||void 0===h||h()},uuid:"shared/AddButton/index",children:a}))})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return c},Xm:function(){return r},Z4:function(){return a},fq:function(){return l},kJ:function(){return s}});var i,o,r,u=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(r||(r={}));var l,c,s,a=(i={},(0,u.Z)(i,r.API,(function(){return"API"})),(0,u.Z)(i,r.EVENT,(function(){return"event"})),(0,u.Z)(i,r.TIME,(function(){return"schedule"})),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(c||(c={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(s||(s={}));var d=(o={},(0,u.Z)(o,s.CREATED_AT,"Created at"),(0,u.Z)(o,s.NAME,"Name"),(0,u.Z)(o,s.PIPELINE,"Pipeline"),(0,u.Z)(o,s.STATUS,"Status"),(0,u.Z)(o,s.TYPE,"Type"),o)},12257:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Le}});var i=t(77837),o=t(75582),r=t(82394),u=t(38860),l=t.n(u),c=t(12691),s=t.n(c),a=t(83455),d=t(82684),p=t(34376),f=t(2485),h=t(60328),v=t(79891),m=t(1210),b=t(93461),j=t(67971),g=t(87372),x=t(11135),y=t(29237),Z=t(86673),w=t(19711),C=t(38435),O=t(82944),k=t(28598);var P=function(e){var n=e.description,t=e.isLoading,i=e.maxWidth,o=e.minWidth,r=e.noEmptyValue,u=e.onClose,l=e.onSave,c=e.textArea,s=e.title,a=e.value,p=(0,d.useRef)(null),f=(0,d.useState)(a),v=f[0],m=f[1],b=c?C.Z:O.Z;return(0,d.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,k.jsxs)(y.Z,{maxWidth:i,minWidth:o,children:[(0,k.jsx)(w.ZP,{bold:!0,children:s}),(0,k.jsx)(Z.Z,{mt:1,children:(0,k.jsx)(b,{monospace:!0,onChange:function(e){return m(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,k.jsx)(Z.Z,{mt:2,children:(0,k.jsx)(w.ZP,{muted:!0,small:!0,children:n})}),(0,k.jsx)(Z.Z,{mt:3,children:(0,k.jsxs)(j.Z,{children:[(0,k.jsx)(x.ZP,{bold:!0,inline:!0,loading:t,onClick:function(){v===a||r&&!v?u():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,k.jsx)(Z.Z,{ml:1}),(0,k.jsx)(h.Z,{onClick:u,children:"Cancel"})]})})]})},E=t(10919),I=t(98781),T=t(41788),_=t(54283),S=t(87815),A=t(55264),M=t(70902),D=t(50316),R=t(18283),B=t(47999),N=t(30264),L=t(62609),G=t(38626),Y=t(23831),H=t(73942),U=t(37391),V=t(49125),z=74*V.iI,W=48*V.iI,F=G.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-18n432u-0"})(["position:absolute;border-radius:","px;overflow:hidden;width:","px;display:none;"," "," "," "," ",""],H.n_,z,(function(e){return"\n background-color: ".concat((e.theme||Y.Z).background.panel,";\n border: ").concat(H.mP,"px ").concat(H.M8," ").concat((e.theme||Y.Z).interactive.defaultBackground,";\n box-shadow: ").concat((e.theme.shadow||Y.Z.shadow).window,";\n ")}),(function(e){return e.display&&"\n display: block;\n "}),(function(e){return e.compact&&"\n width: ".concat(.75*z,"px;\n ")}),(function(e){return"undefined"!==typeof e.left&&"\n left: ".concat(e.left,"px;\n ")}),(function(e){return"undefined"!==typeof e.top&&"\n top: ".concat(e.top,"px;\n ")})),q=G.default.div.withConfig({displayName:"indexstyle__MainStyle",componentId:"sc-18n432u-1"})(["display:flex;border-radius:","px;overflow:hidden;height:","px;"," ",""],H.n_,W,(function(e){return"\n background-color: ".concat((e.theme||Y.Z).background.content,";\n border: ").concat(H.YF,"px ").concat(H.M8," ").concat((e.theme||Y.Z).interactive.defaultBackground,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(W/2,"px;\n ")})),Q=G.default.aside.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-18n432u-2"})(["width:100%;overflow:auto;"," ",""],U.w5,(function(e){return"\n border-right: ".concat(H.YF,"px ").concat(H.M8," ").concat((e.theme||Y.Z).background.panel,";\n ")})),K=G.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-18n432u-3"})(["width:100%;overflow:auto;",""],U.w5),$=(0,G.css)(["display:flex;align-items:center;justify-content:space-between;padding:","px ","px;"],V.iI,2*V.iI),J=G.default.div.withConfig({displayName:"indexstyle__OptionStyle",componentId:"sc-18n432u-4"})([""," padding-top:","px;padding-bottom:","px;&:hover{cursor:pointer;","}",""],$,1.5*V.iI,1.5*V.iI,(function(e){return"\n background-color: ".concat((e.theme||Y.Z).monotone.black,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme||Y.Z).monotone.black,";\n ")})),X=G.default.div.withConfig({displayName:"indexstyle__ToggleValueStyle",componentId:"sc-18n432u-5"})([""," ",""],$,(function(e){return"\n border-bottom: ".concat(H.YF,"px ").concat(H.M8," ").concat((e.theme||Y.Z).borders.medium2,";\n ")})),ee=t(22341),ne=t(33766),te=t(90211);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var re,ue=function(e){var n,t,i,u=e.children,l=e.compact,c=e.onClickCallback,s=e.onClickOutside,a=e.onSecondaryClick,p=e.open,f=e.options,v=void 0===f?{}:f,m=e.parentRef,g=e.query,x=e.setOpen,y=e.toggleValueMapping,C=(0,d.useState)(null),O=C[0],P=C[1],E=(0,d.useState)(v),I=E[0],T=E[1];(0,d.useEffect)((function(){T(v)}),[v]);var _=((null===m||void 0===m||null===(n=m.current)||void 0===n||null===(t=n.getBoundingClientRect)||void 0===t?void 0:t.call(n))||{}).top,S=void 0===_?0:_,A=Object.keys(v);return(0,k.jsxs)(B.Z,{onClickOutside:s,open:!0,children:[(0,k.jsx)("div",{ref:m,children:u}),(0,k.jsxs)(F,{compact:l,display:p,top:S-5,children:[(0,k.jsxs)(q,{compact:l,children:[(0,k.jsx)(b.Z,{flex:"1",children:(0,k.jsx)(Q,{children:A.map((function(e){return(0,k.jsxs)(J,{highlighted:O===e,onMouseEnter:function(){return P(e)},children:[(0,k.jsx)(w.ZP,{children:(0,te.kC)(e)}),(0,k.jsx)(ee._Q,{})]},e)}))})}),(0,k.jsx)(b.Z,{flex:"2",children:(0,k.jsx)(K,{children:O&&Object.entries((null===(i=I||v)||void 0===i?void 0:i[O])||{}).map((function(e){var n,t=(0,o.Z)(e,2),i=t[0],u=t[1];return(0,k.jsxs)(X,{children:[(0,k.jsx)(w.ZP,{children:(null===y||void 0===y||null===(n=y[O])||void 0===n?void 0:n[i])||(0,te.J3)((0,te.kC)(i))}),(0,k.jsx)(M.Z,{checked:u,onCheck:function(){return T((function(e){return oe(oe({},e),{},(0,r.Z)({},O,oe(oe({},null===e||void 0===e?void 0:e[O]),{},(0,r.Z)({},i,!u))))}))}})]},i)}))})})]}),(0,k.jsx)(Z.Z,{m:1,children:(0,k.jsxs)(j.Z,{children:[(0,k.jsx)(h.Z,{onClick:function(){var e=Object.entries(I).reduce((function(e,n){var t=(0,o.Z)(n,2),i=t[0],r=t[1],u=[];return Object.entries(r).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0];return n[1]&&u.push(t)})),e[i]=u,e}),{});null===c||void 0===c||c(g,e),(0,ne.g_)(g,e,{addingMultipleValues:!0,pushHistory:!0})},secondary:!0,children:"Apply"}),(0,k.jsx)(Z.Z,{mr:1}),(0,k.jsx)(h.Z,{noBackground:!0,onClick:function(){x(!1),null===a||void 0===a||a()},children:"Defaults"})]})})]})]})},le=t(46261),ce="".concat(1.5*V.iI,"px"),se=40*V.iI;!function(e){e[e.SECONDARY=1]="SECONDARY",e[e.DELETE=2]="DELETE"}(re||(re={}));var ae={autoHide:!0,size:null,widthFitContent:!0},de=t(7715),pe=t(9736),fe=t(91427),he="pipeline_list_filters",ve="pipeline_list_group_bys";function me(e){return(0,fe.t8)(he,e),e}function be(e){return(0,fe.t8)(ve,e),e}function je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ge(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,r.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 xe=function(e){var n=e.addButtonProps,t=e.deleteRowProps,i=e.filterOptions,r=void 0===i?{}:i,u=e.filterValueLabelMapping,l=e.groupButtonProps,c=e.moreActionsMenuItems,s=e.onFilterApply,a=e.query,f=void 0===a?{}:a,h=e.searchProps,v=e.secondaryActionButtonProps,m=e.selectedRowId,g=e.setSelectedRow,y=(0,pe.Ct)(),C=(0,p.useRouter)(),P=(0,d.useRef)(null),E=(0,d.useRef)(null),I=(0,d.useRef)(null),T=(0,d.useRef)(null),_=(0,d.useRef)(null),S=(0,d.useState)(!1),A=S[0],M=S[1],G=(0,d.useState)(!1),Y=G[0],U=G[1],z=(0,d.useState)(!1),W=z[0],F=z[1],q=(0,d.useState)(!1),Q=q[0],K=q[1],$=(0,d.useState)(null),J=$[0],X=$[1],ne=!m,te=(0,d.useCallback)((function(){return M(!1)}),[]),ie=(0,d.useCallback)((function(){return U(!1)}),[]),oe=(0,d.useCallback)((function(){return F(!1)}),[]),fe=(0,d.useCallback)((function(){return K(null)}),[]),he=(0,d.useCallback)((function(){return X(null)}),[]),ve=v||{},be=ve.Icon,je=ve.confirmationDescription,xe=ve.confirmationMessage,ye=ve.isLoading,Ze=ve.label,we=ve.onClick,Ce=ve.openConfirmationDialogue,Oe=ve.tooltip,ke=t||{},Pe=ke.confirmationMessage,Ee=ke.isLoading,Ie=ke.item,Te=ke.onDelete,_e=h||{},Se=_e.placeholder,Ae=_e.onChange,Me=_e.value,De=(0,d.useMemo)((function(){return Object.entries(r).reduce((function(e,n){var t=(0,o.Z)(n,2),i=t[0],r=t[1];return e[i]={},r.forEach((function(n){var t,o=(null===(t=f["".concat(i,"[]")])||void 0===t?void 0:t.includes(n))||!1;e[i][n]=o})),e}),{})}),[r,f]),Re=n||{},Be=Re.label,Ne=Re.menuItems,Le=Re.isLoading,Ge=(0,d.useMemo)((function(){return(0,k.jsx)(D.Z,{addButtonMenuOpen:A,addButtonMenuRef:P,isLoading:Le,label:Be,menuItems:Ne,onClick:function(){return M((function(e){return!e}))},onClickCallback:te})}),[Be,Ne,A,te,Le]),Ye=(0,d.useMemo)((function(){return(0,de.dw)(De)}),[De]),He=(0,d.useMemo)((function(){return(0,k.jsx)(ue,{compact:!0,onClickCallback:function(e,n){s&&(null===s||void 0===s||s(e,n)),ie&&(null===ie||void 0===ie||ie())},onClickOutside:ie,onSecondaryClick:function(){me({}),C.push("/pipelines")},open:Y,options:De,parentRef:E,query:f,setOpen:U,toggleValueMapping:u,children:(0,k.jsx)(x.ZP,ge(ge({},D.B),{},{afterElement:Ye>0?(0,k.jsx)(R.Z,{cyan:!0,noVerticalPadding:!0,children:(0,k.jsx)(w.ZP,{bold:!0,inverted:!0,children:Ye})}):null,beforeElement:(0,k.jsx)(ee.wn,{size:2*V.iI}),onClick:function(){return U((function(e){return!e}))},uuid:"Table/Toolbar/FilterButton",children:"Filter"}))})}),[ie,Y,De,u,Ye,s,f,C]),Ue=l||{},Ve=Ue.groupByLabel,ze=Ue.menuItems,We=(0,d.useMemo)((function(){return(0,k.jsx)(N.Z,{disableKeyboardShortcuts:!0,items:ze,onClickCallback:oe,onClickOutside:oe,open:W,parentRef:I,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/GroupMenu",children:(0,k.jsx)(x.ZP,ge(ge({},D.B),{},{beforeElement:(0,k.jsx)(ee.ZA,{size:2.5*V.iI}),onClick:function(){F((function(e){return!e}))},uuid:"Table/Toolbar/GroupButton",children:Ve?"Grouped by ".concat(Ve):"Group"}))})}),[oe,W,Ve,ze]),Fe=(0,d.useMemo)((function(){return(0,k.jsx)(N.Z,{disableKeyboardShortcuts:!0,items:c,onClickCallback:fe,onClickOutside:fe,open:Q,parentRef:T,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/MoreActionsMenu",children:(0,k.jsx)(le.Z,ge(ge({},ae),{},{label:"More actions",children:(0,k.jsx)(x.ZP,{Icon:ee.mH,bold:!0,disabled:ne,greyBorder:!0,onClick:function(){return K((function(e){return!e}))},smallIcon:!0,uuid:"Table/Toolbar/MoreActionsButton"})}))})}),[fe,ne,Q,c]);return(0,k.jsxs)(j.Z,{alignItems:"center",children:[Ge,(0,k.jsx)(Z.Z,{mr:ce}),He,(null===ze||void 0===ze?void 0:ze.length)>0&&(0,k.jsx)(Z.Z,{ml:ce,children:We}),!y&&we&&(0,k.jsxs)(Z.Z,{ml:ce,children:[(0,k.jsx)(le.Z,ge(ge({},ae),{},{label:Oe,children:(0,k.jsx)(x.ZP,{Icon:!ye&&be,bold:!0,disabled:ne,greyBorder:!0,loading:ye,onClick:Ce?function(){return X(re.SECONDARY)}:we,smallIcon:!0,uuid:"Table/Toolbar/SecondaryActionButton",children:Ze})})),(0,k.jsx)(B.Z,{onClickOutside:he,open:J===re.SECONDARY,children:(0,k.jsx)(L.Z,{onCancel:he,onClick:function(){we(),he(),g(null)},subtitle:je,title:xe,top:58,width:se})})]}),!y&&Te&&(0,k.jsxs)(Z.Z,{ml:ce,children:[(0,k.jsx)(le.Z,ge(ge({},ae),{},{label:"Delete ".concat(Ie),children:(0,k.jsx)(x.ZP,{Icon:!Ee&&ee.rF,bold:!0,disabled:ne,greyBorder:!0,loading:Ee,onClick:function(){return X(re.DELETE)},smallIcon:!0,uuid:"Table/Toolbar/DeleteButton"})})),(0,k.jsx)(B.Z,{onClickOutside:he,open:J===re.DELETE,children:(0,k.jsx)(L.Z,{danger:!0,onCancel:he,onClick:function(){Te(m),he(),g(null)},subtitle:Pe,title:"Are you sure you want to delete the ".concat(Ie," ").concat(m,"?"),top:58,width:se})})]}),!y&&(null===c||void 0===c?void 0:c.length)>0&&(0,k.jsx)(Z.Z,{ml:ce,children:Fe}),Ae&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Z.Z,{ml:ce}),(0,k.jsx)(b.Z,{flex:1,children:(0,k.jsx)(O.Z,{afterIcon:Me?(0,k.jsx)(ee.x8,{}):null,afterIconClick:function(){var e;Ae(""),null===_||void 0===_||null===(e=_.current)||void 0===e||e.focus()},afterIconSize:1.5*V.iI,beforeIcon:(0,k.jsx)(ee.HN,{}),borderRadius:H.n_,defaultColor:!0,fullWidth:!0,greyBorder:!0,maxWidth:60*V.iI,onChange:function(e){return Ae(e.target.value)},paddingVertical:9,placeholder:Se||null,ref:_,value:Me})})]})]})},ye=t(82531),Ze=t(86422),we=t(9728),Ce=t(3055),Oe=t(27337),ke=t(18908),Pe=t(93348),Ee=t(45838),Ie=t(96510),Te=t(59e3),_e=t(64651),Se=t(66653),Ae=t(24224),Me=t(99497);function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?De(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Be={borderRadius:H.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Ne(){var e=(0,p.useRouter)(),n=(0,d.useRef)(null),t=(0,d.useState)(null),i=t[0],u=t[1],l=(0,d.useState)(null),c=l[0],x=l[1],C=(0,d.useState)({}),O=C[0],T=C[1],D=(0,d.useState)(null),R=D[0],B=D[1],N=(0,Te.iV)(),L=(0,Te.DQ)(N,[I.$1.STATUS,I.$1.TAG,I.$1.TYPE]),G=ye.ZP.pipelines.list(Re(Re({},L),{},{include_schedules:1})),H=G.data,U=G.mutate,z=(0,d.useMemo)((function(){var e=(null===H||void 0===H?void 0:H.pipelines)||[];if(c){var n=c.toLowerCase();e=e.filter((function(e){var t=e.name,i=e.description,o=e.uuid;return(null===t||void 0===t?void 0:t.toLowerCase().includes(n))||(null===o||void 0===o?void 0:o.toLowerCase().includes(n))||(null===i||void 0===i?void 0:i.toLowerCase().includes(n))}))}return e}),[null===H||void 0===H?void 0:H.pipelines,c]),W=ye.ZP.projects.list(),F=W.data,q=W.mutate,Q=(0,d.useMemo)((function(){var e;return null===F||void 0===F||null===(e=F.projects)||void 0===e?void 0:e[0]}),[F]),K=null===N||void 0===N?void 0:N[I.$1.GROUP];(0,d.useEffect)((function(){var e={};if(K)be((0,r.Z)({},K,!0));else{var n,t=(0,fe.U2)(ve,{});t&&Object.entries(t).forEach((function(e){var t=(0,o.Z)(e,2),i=t[0],r=t[1];!n&&r&&(n=i)})),n&&(e[I.$1.GROUP]=n)}if((0,de.Qr)(L)){var i={},u=(0,fe.U2)(he,{});u&&Object.entries(u).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];i[t]=[],Object.entries(r).forEach((function(e){var n=(0,o.Z)(e,2),r=n[0];n[1]&&i[t].push(r)}))})),(0,de.Qr)(i)||(e=Re(Re({},e),i))}else{var l={};Object.entries(L).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1];l[t]={};var r,u=i;(Array.isArray(u)||(u=[u]),u&&Array.isArray(u))&&(null===(r=u)||void 0===r||r.forEach((function(e){l[t][e]=!0})))})),me(l)}(0,de.Qr)(e)||(0,ne.u7)(e,{pushHistory:!1})}),[K,L]),(0,d.useEffect)((function(){(0,Ie.bB)(H,B)}),[H]);var $=function(e){return(0,a.Db)(ye.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,Ie.wD)(n,{callback:function(n){var t=n.pipeline.uuid;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return B({errors:n,response:e})}})}})},J=$((function(n){return e.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))})),X=(0,o.Z)(J,2),ie=X[0],oe=X[1].isLoading,re=$((function(){return null===U||void 0===U?void 0:U()})),ue=(0,o.Z)(re,2),le=ue[0],ce=ue[1].isLoading,se=(0,a.Db)((function(e){return ye.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,Ie.wD)(e,{callback:function(e){var n=e.pipeline.uuid;T((function(e){return Re(Re({},e),{},(0,r.Z)({},n,!1))})),U(),null===Ue||void 0===Ue||Ue(),u(null)},onErrorCallback:function(e,n){var t,i=null===e||void 0===e||null===(t=e.url_parameters)||void 0===t?void 0:t.pk;T((function(e){return Re(Re({},e),{},(0,r.Z)({},i,!1))})),B({errors:n,response:e})}})}}),ae=(0,o.Z)(se,2),pe=ae[0],je=ae[1].isLoading,ge=(0,a.Db)((function(e){return ye.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,Ie.wD)(e,{callback:function(){null===U||void 0===U||U()},onErrorCallback:function(e,n){return B({errors:n,response:e})}})}}),De=(0,o.Z)(ge,2),Ne=De[0],Le=De[1].isLoading,Ge=(0,Me.dd)((function(e){var n=e.pipeline,t=e.pipelineDescription,o=e.pipelineName;return(0,k.jsx)(P,{isLoading:je,minWidth:55*V.iI,noEmptyValue:!!o,onClose:Ue,onSave:function(e){var t=n||i;if(t){var u=t.uuid,l={uuid:u};o?l.name=e:l.description=e,T((function(e){return Re(Re({},e),{},(0,r.Z)({},u,!0))})),pe(l)}},textArea:!o,title:o?"Rename pipeline":"Edit description",value:o||t})}),{},[je,i],{background:!0,uuid:"rename_pipeline_and_save"}),Ye=(0,o.Z)(Ge,2),He=Ye[0],Ue=Ye[1],Ve=(0,Me.dd)((function(){return(0,k.jsx)(we.BC,{children:(0,k.jsx)(f.Z,{contained:!0,onClickCustomTemplate:function(e){ie({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,te.Y6)()}}).then((function(){Fe()}))},showBreadcrumbs:!0,tabs:[Oe.A2]})})}),{},[],{background:!0,uuid:"browse_templates"}),ze=(0,o.Z)(Ve,2),We=ze[0],Fe=ze[1],qe=(0,d.useMemo)((function(){return(0,_e.d)(ie,{showBrowseTemplates:We})}),[ie,We]),Qe=ye.ZP.tags.list().data,Ke=(0,d.useMemo)((function(){return(0,Ae.YC)((null===Qe||void 0===Qe?void 0:Qe.tags)||[],(function(e){return e.uuid}))}),[Qe]),$e=(0,d.useMemo)((function(){return(0,k.jsx)(xe,{addButtonProps:{isLoading:oe,label:"New",menuItems:qe},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:Le,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===i||void 0===i?void 0:i.uuid,"?"))&&Ne(null===i||void 0===i?void 0:i.uuid)}},filterOptions:{status:Object.values(I.QK),tag:Ke.map((function(e){return e.uuid})),type:Object.values(I.qL)},filterValueLabelMapping:{tag:Ke.reduce((function(e,n){var t=n.uuid;return Re(Re({},e),{},(0,r.Z)({},t,t))}),{}),type:I.G7},groupButtonProps:{groupByLabel:K,menuItems:[{beforeIcon:K===I.r0.STATUS?(0,k.jsx)(ee.Jr,{fill:Y.Z.content.default,size:1.5*V.iI}):(0,k.jsx)(ee.Cd,{muted:!0,size:1.5*V.iI}),label:function(){return(0,te.kC)(I.r0.STATUS)},onClick:function(){var e=K===I.r0.STATUS?null:I.r0.STATUS;e||be({}),(0,ne.u7)((0,r.Z)({},I.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:K===I.r0.TAG?(0,k.jsx)(ee.Jr,{fill:Y.Z.content.default,size:1.5*V.iI}):(0,k.jsx)(ee.Cd,{muted:!0,size:1.5*V.iI}),label:function(){return(0,te.kC)(I.r0.TAG)},onClick:function(){var e=K===I.r0.TAG?null:I.r0.TAG;e||be({}),(0,ne.u7)((0,r.Z)({},I.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:K===I.r0.TYPE?(0,k.jsx)(ee.Jr,{fill:Y.Z.content.default,size:1.5*V.iI}):(0,k.jsx)(ee.Cd,{muted:!0,size:1.5*V.iI}),label:function(){return(0,te.kC)(I.r0.TYPE)},onClick:function(){var e=K===I.r0.TYPE?null:I.r0.TYPE;e||be({}),(0,ne.u7)((0,r.Z)({},I.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return He({pipelineName:null===i||void 0===i?void 0:i.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return He({pipelineDescription:null===i||void 0===i?void 0:i.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&me({})},query:L,searchProps:{onChange:x,value:c},secondaryActionButtonProps:{Icon:ee.oX,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===i||void 0===i?void 0:i.uuid,"?"),isLoading:ce,onClick:function(){return le({pipeline:{clone_pipeline_uuid:null===i||void 0===i?void 0:i.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},selectedRowId:null===i||void 0===i?void 0:i.uuid,setSelectedRow:u})}),[le,Ne,K,ce,oe,Le,qe,L,c,null===i||void 0===i?void 0:i.description,null===i||void 0===i?void 0:i.name,null===i||void 0===i?void 0:i.uuid,He,Ke]),Je=(0,we.VI)(null,{},[],{uuid:"pipelines/list"}),Xe=(0,o.Z)(Je,1)[0],en=(0,a.Db)(ye.ZP.projects.useUpdate(null===Q||void 0===Q?void 0:Q.name),{onSuccess:function(e){return(0,Ie.wD)(e,{callback:function(){q()},onErrorCallback:function(e,n){return Xe({errors:n,response:e})}})}}),nn=(0,o.Z)(en,2),tn=nn[0],on=nn[1].isLoading,rn=(0,d.useCallback)((function(e){return tn({project:e})}),[tn]),un=(0,Me.dd)((function(){return(0,k.jsxs)(y.Z,{maxWidth:60*V.iI,children:[(0,k.jsx)(Z.Z,{mb:1,children:(0,k.jsx)(g.Z,{children:"Help improve Mage"})}),(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsx)(w.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsx)(y.Z,{success:!0,children:(0,k.jsxs)(j.Z,{alignItems:"center",children:[(0,k.jsx)(ee.Yo,{size:5*V.iI,success:!0}),(0,k.jsx)(Z.Z,{mr:1}),(0,k.jsx)(b.Z,{children:(0,k.jsx)(w.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsxs)(w.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,k.jsx)(E.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,k.jsx)(E.Z,{href:"https://www.mage.ai/chat",openNewWindow:!0,children:"Magers"}),") learn what\u2019s going wrong with the tool and what improvements can be made."]})}),(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsx)(w.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsxs)(j.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,k.jsx)(w.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,k.jsx)(Z.Z,{mr:V.cd}),(0,k.jsx)(M.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&rn({help_improve_mage:!1}).then((function(){return sn()}))}})]})}),on&&(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsx)(_.Z,{inverted:!0})}),(0,k.jsx)(Z.Z,{mb:V.cd,children:(0,k.jsxs)(w.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,k.jsx)(E.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,k.jsx)(h.Z,{onClick:function(){return rn({help_improve_mage:!0}).then((function(){return sn()}))},secondary:!0,children:"Close"})]})}),{},[Q],{background:!0,hideCallback:function(){rn({help_improve_mage:!0})},uuid:"help_mage"}),ln=(0,o.Z)(un,2),cn=ln[0],sn=ln[1];(0,d.useEffect)((function(){Q&&null===(null===Q||void 0===Q?void 0:Q.help_improve_mage)&&cn()}),[Q,cn]);var an=(0,d.useMemo)((function(){var e={};null===z||void 0===z||z.forEach((function(n,t){var i=n[K];if(I.r0.STATUS===K){var o=n.schedules,r=void 0===o?[]:o,u=r.length;i=r.find((function(e){var n=e.status;return Pe.fq.ACTIVE===n}))?I.QK.ACTIVE:u>=1?I.QK.INACTIVE:I.QK.NO_SCHEDULES}else if(I.r0.TAG===K){i=(null===n||void 0===n?void 0:n.tags)?(0,Ae.YC)(n.tags,(function(e){return e})).join(", "):""}e[i]||(e[i]=[]),e[i].push(t)}));var n=[],t=[];return I.r0.STATUS===K?Object.values(I.QK).forEach((function(i){n.push(e[i]),t.push((0,te.vg)(i))})):I.r0.TAG===K?(0,Ae.YC)(Object.keys(e),(function(e){return e})).forEach((function(i){n.push(e[i]),i?t.push(i.split(", ").map((function(e,n){return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,k.jsx)(v.Z,{small:!0,children:(0,k.jsx)(w.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):I.r0.TYPE===K&&Object.values(I.qL).forEach((function(i){n.push(e[i]),t.push(I.G7[i])})),{rowGroupHeaders:t,rowsGroupedByIndex:n}}),[K,z]),dn=an.rowGroupHeaders,pn=an.rowsGroupedByIndex;return(0,k.jsx)(m.Z,{errors:R,setErrors:B,subheaderChildren:$e,title:"Pipelines",uuid:"pipelines/index",children:0===(null===z||void 0===z?void 0:z.length)?(0,k.jsx)(Z.Z,{px:3,py:1,children:H?(0,k.jsx)(w.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,k.jsx)(_.Z,{inverted:!0,large:!0})}):(0,k.jsx)(Ee.cl,{includePadding:!!K,maxHeight:"calc(100vh - ".concat(Ce.Mz+74,"px)"),children:(0,k.jsx)(S.Z,{columnFlex:[null,null,null,2,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,te.kC)(I.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,te.kC)(I.r0.TYPE)},{uuid:"Updated at"},{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],isSelectedRow:function(e){var n;return(null===(n=z[e])||void 0===n?void 0:n.uuid)===(null===i||void 0===i?void 0:i.uuid)},onClickRow:function(e){return u((function(n){var t=z[e];return(null===n||void 0===n?void 0:n.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(n){e.push("/pipelines/[pipeline]/edit","/pipelines/".concat(z[n].uuid,"/edit"))},ref:n,renderRightClickMenuItems:function(n){var t=z[n];return[{label:function(){return"Edit description"},onClick:function(){return He({pipeline:t,pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return He({pipeline:t,pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return le({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},uuid:"clone"},{label:function(){return"Add/Remove tags"},onClick:function(){e.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null===t||void 0===t?void 0:t.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){e.push("/templates?object_type=".concat(ke.R,"&new=1&pipeline_uuid=").concat(null===t||void 0===t?void 0:t.uuid))},uuid:"create_custom_template"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===t||void 0===t?void 0:t.uuid,"?"))&&Ne(null===t||void 0===t?void 0:t.uuid)},uuid:"delete"}]},rowGroupHeaders:dn,rows:z.map((function(n,t){var i=n.blocks,o=n.description,u=n.schedules,l=n.tags,c=n.type,a=n.updated_at,d=n.uuid,p=i.filter((function(e){var n=e.type;return Ze.tf.SCRATCHPAD!==n})).length,f=u.length,v=u.find((function(e){var n=e.status;return Pe.fq.ACTIVE===n})),m=(0,k.jsx)("div",{children:(0,k.jsx)(A.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(t));return[f>=1||O[d]?(0,k.jsx)(h.Z,{iconOnly:!0,loading:!!O[d],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,Se.j)(e),T((function(e){return Re(Re({},e),{},(0,r.Z)({},d,!0))})),pe(Re(Re({},n),{},{status:v?Pe.fq.INACTIVE:Pe.fq.ACTIVE}))},children:v?(0,k.jsx)(ee.dz,{muted:!0,size:2*V.iI}):(0,k.jsx)(ee.Py,{default:!0,size:2*V.iI})}):null,(0,k.jsx)(w.ZP,{default:!v,monospace:!0,success:!!v,children:v?Pe.fq.ACTIVE:f>=1?Pe.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(t)),(0,k.jsx)(s(),{as:"/pipelines/".concat(d),href:"/pipelines/[pipeline]",passHref:!0,children:(0,k.jsx)(E.Z,{sameColorAsText:!0,children:d})},"pipeline_name_".concat(t)),(0,k.jsx)(w.ZP,{default:!0,title:o,width:90*V.iI,children:o},"pipeline_description_".concat(t)),(0,k.jsx)(w.ZP,{children:I.G7[c]},"pipeline_type_".concat(t)),(0,k.jsx)(w.ZP,{monospace:!0,title:a,children:a?a.slice(0,-3):(0,k.jsx)(k.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(t)),m,(0,k.jsx)(w.ZP,{default:0===p,monospace:!0,children:p},"pipeline_block_count_".concat(t)),(0,k.jsx)(w.ZP,{default:0===f,monospace:!0,children:f},"pipeline_trigger_count_".concat(t)),(0,k.jsxs)(b.Z,{flex:1,justifyContent:"flex-end",children:[(0,k.jsx)(h.Z,Re(Re({},Be),{},{onClick:function(){e.push("/pipelines/[pipeline]","/pipelines/".concat(d))},title:"Detail",children:(0,k.jsx)(ee.UY,{default:!0,size:2*V.iI})})),(0,k.jsx)(Z.Z,{mr:1}),(0,k.jsx)(h.Z,Re(Re({},Be),{},{onClick:function(){e.push("/pipelines/[pipeline]/logs","/pipelines/".concat(d,"/logs"))},title:"Logs",children:(0,k.jsx)(ee.$B,{default:!0,size:2*V.iI})}))]},"chevron_icon_".concat(t))]})),rowsGroupedByIndex:pn,stickyHeader:!0})})})}Ne.getInitialProps=(0,i.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Le=(0,T.Z)(Ne)},79274:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return t(12257)}])}},function(e){e.O(0,[844,9902,426,1774,8792,8789,4259,9055,1424,1005,7815,3654,8952,7722,4822,1484,2485,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(49894),l=t(93461),a=t(57384),s=t(41424),d=t(72454),f=t(28598);function p(e,n){var t=e.children;return(0,f.jsx)(d.HS,{ref:n,children:t})}var h=o.forwardRef(p),m=t(32063),g=t(85019),b=t(82531),j=t(66166),v=t(3055),y=t(49125),x=t(91427),O=t(24141);function w(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 Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?w(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n,t=e.addProjectBreadcrumbToCustomBreadcrumbs,r=e.after,p=e.afterHidden,w=e.afterWidth,P=e.afterWidthOverride,_=e.before,k=e.beforeWidth,I=e.breadcrumbs,S=e.children,C=e.errors,H=e.headerMenuItems,N=e.headerOffset,D=e.mainContainerHeader,W=e.navigationItems,E=e.setErrors,z=e.subheaderChildren,M=e.title,A=e.uuid,B=(0,O.i)().width,R="dashboard_after_width_".concat(A),F="dashboard_before_width_".concat(A),T=(0,o.useRef)(null),L=(0,o.useState)(P?w:(0,x.U2)(R,w)),V=L[0],U=L[1],Y=(0,o.useState)(!1),Q=Y[0],X=Y[1],G=(0,o.useState)(_?Math.max((0,x.U2)(F,k),13*y.iI):null),J=G[0],q=G[1],K=(0,o.useState)(!1),$=K[0],ee=K[1],ne=(0,o.useState)(null)[1],te=b.ZP.projects.list({},{revalidateOnFocus:!1}).data,re=null===te||void 0===te?void 0:te.projects,ie={label:function(){var e;return null===re||void 0===re||null===(e=re[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];I?(t&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(I))):(null===re||void 0===re?void 0:re.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return M}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||Q||$||null===ne||void 0===ne||ne(T.current.getBoundingClientRect().width)}),[Q,V,$,J,T,ne,B]),(0,o.useEffect)((function(){Q||(0,x.t8)(R,V)}),[p,Q,V,R]),(0,o.useEffect)((function(){$||(0,x.t8)(F,J)}),[$,J,F]);var ce=(0,j.Z)(w);return(0,o.useEffect)((function(){P&&ce!==w&&U(w)}),[P,w,ce]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:M}),(0,f.jsx)(s.Z,{breadcrumbs:oe,menuItems:H,project:null===re||void 0===re?void 0:re[0],version:null===re||void 0===re||null===(n=re[0])||void 0===n?void 0:n.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===W||void 0===W?void 0:W.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(g.Z,{navigationItems:W,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(m.Z,{after:r,afterHeightOffset:v.Mz,afterHidden:p,afterMousedownActive:Q,afterWidth:V,before:_,beforeHeightOffset:v.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(_?J:0),headerOffset:N,hideAfterCompletely:!0,leftOffset:_?d.k1:null,mainContainerHeader:D,mainContainerRef:T,setAfterMousedownActive:X,setAfterWidth:U,setBeforeMousedownActive:ee,setBeforeWidth:q,children:[z&&(0,f.jsx)(h,{children:z}),S]})})]}),C&&(0,f.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===E||void 0===E?void 0:E(null)},children:(0,f.jsx)(u.Z,Z(Z({},C),{},{onClose:function(){return null===E||void 0===E?void 0:E(null)}}))})]})}},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 d},WH:function(){return o},eC:function(){return l},fF:function(){return u},tC:function(){return a}});var r=t(81132),i=t(9736),o="Workspace",c="Preferences",u="Git settings",l="Users",a="Account",s="Profile",d=function(e){var n=e.owner,t=e.roles,d=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:c}];(n||t===r.No.ADMIN||0!==(2&d))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:l}),(!(0,i.YB)()||t<=r.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:u});var p=[{items:f,uuid:o}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:s}],uuid:a}]):p}},30775:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(1210),i=t(82394),o=t(12691),c=t.n(o),u=t(10919),l=t(86673),a=t(19711),s=t(38626),d=t(23831),f=t(49125),p=t(90880),h=(f.iI,s.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),m=s.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||d.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||d.Z.background).codeTextarea,";\n ")})),g=t(28598),b=t(82684);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 v(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,i.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}var y=function(e){var n=e.isItemSelected,t=e.sections;return(0,g.jsx)(l.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,g.jsxs)(l.Z,{children:[(0,g.jsx)(h,{children:(0,g.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,l=e.uuid,a=t?t():l,s=(0,g.jsx)(m,{selected:null===n||void 0===n?void 0:n(v(v({},e),{},{uuidWorkspace:i})),children:a});return r?(0,b.createElement)(c(),v(v({},r),{},{key:l,passHref:!0}),(0,g.jsx)(u.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:s})):(0,g.jsx)(u.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:o,preventDefault:!0,sameColorAsText:!0,children:s},l)}))]},i)}))})},x=t(2850),O=t(79585),w=t(9736);var Z=function(e){var n=e.after,t=e.afterHidden,i=e.children,o=e.uuidItemSelected,c=e.uuidWorkspaceSelected,u=(0,w.PR)()||{};return(0,g.jsx)(r.Z,{after:n,afterHidden:!n||t,afterWidth:n?50*f.iI:0,afterWidthOverride:!0,before:(0,g.jsx)(x.M,{children:(0,g.jsx)(y,{isItemSelected:function(e){var n=e.uuid,t=e.uuidWorkspace;return c===t&&o===n},sections:(0,O.SA)(u)})}),beforeWidth:x.W,title:"Settings",uuid:"settings/index",children:i})}},21853:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var r=t(82394),i=t(75582),o=t(82684),c=t(83455),u=t(60328),l=t(34744),a=t(93461),s=t(67971),d=t(87372),f=t(10919),p=t(29237),h=t(86673),m=t(19711),g=t(82944),b=t(70902),j=t(82531),v=t(38626),y=t(23831),x=t(73942),O=t(49125),w=v.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],x.n_,O.cd*O.iI,(function(e){return"\n background-color: ".concat((e.theme.background||y.Z.background).codeArea,";\n ")})),Z=t(96510),P=t(9728),_=t(28598);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var S=function(e){var n=e.cancelButtonText,t=e.contained,v=e.header,y=e.onCancel,x=e.onSaveSuccess,k=(0,P.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),S=(0,i.Z)(k,1)[0],C=(0,o.useState)(null),H=C[0],N=C[1],D=j.ZP.projects.list(),W=D.data,E=D.mutate,z=(0,o.useMemo)((function(){var e;return null===W||void 0===W||null===(e=W.projects)||void 0===e?void 0:e[0]}),[W]),M=z||{},A=M.name,B=M.project_uuid;(0,o.useEffect)((function(){H||N(z)}),[z,H]);var R=(0,c.Db)(j.ZP.projects.useUpdate(A),{onSuccess:function(e){return(0,Z.wD)(e,{callback:function(e){var n=e.project;E(),N(n),x&&(null===x||void 0===x||x(n))},onErrorCallback:function(e,n){return S({errors:n,response:e})}})}}),F=(0,i.Z)(R,2),T=F[0],L=F[1].isLoading,V=(0,o.useCallback)((function(e){return T({project:e})}),[T]),U=(0,_.jsxs)(_.Fragment,{children:[v,(0,_.jsxs)(p.Z,{noPadding:!0,children:[(0,_.jsxs)(h.Z,{p:O.cd,children:[(0,_.jsx)(h.Z,{mb:1,children:(0,_.jsx)(d.Z,{level:5,children:"Project name"})}),(0,_.jsx)(m.ZP,{default:!0,monospace:!0,children:A})]}),(0,_.jsx)(l.Z,{light:!0}),(0,_.jsxs)(h.Z,{p:O.cd,children:[(0,_.jsx)(h.Z,{mb:1,children:(0,_.jsx)(d.Z,{level:5,children:"Project UUID"})}),(0,_.jsx)(m.ZP,{default:!!B,monospace:!0,muted:!B,children:B||"Not required"})]}),(0,_.jsx)(l.Z,{light:!0}),(0,_.jsx)(h.Z,{p:O.cd,children:(0,_.jsxs)(s.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,_.jsxs)(a.Z,{flexDirection:"column",children:[(0,_.jsx)(h.Z,{mb:1,children:(0,_.jsx)(d.Z,{level:5,children:"Help improve Mage"})}),(0,_.jsxs)(m.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,_.jsx)(f.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,_.jsx)(h.Z,{mr:O.cd}),(0,_.jsx)(b.Z,{checked:null===H||void 0===H?void 0:H.help_improve_mage,onCheck:function(){return N((function(e){return I(I({},e),{},{help_improve_mage:!(null!==H&&void 0!==H&&H.help_improve_mage)})}))}})]})})]}),(0,_.jsx)(h.Z,{mt:O.HN}),(0,_.jsx)(p.Z,{noPadding:!0,children:(0,_.jsxs)(h.Z,{p:O.cd,children:[(0,_.jsx)(h.Z,{mb:1,children:(0,_.jsx)(d.Z,{level:5,children:"Features"})}),Object.entries((null===H||void 0===H?void 0:H.features)||{}).map((function(e){var n=(0,i.Z)(e,2),t=n[0],o=n[1];return(0,_.jsxs)(s.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,_.jsx)(m.ZP,{default:!0,monospace:!0,children:t}),(0,_.jsx)(h.Z,{mr:O.cd}),(0,_.jsx)(b.Z,{checked:!!o,onCheck:function(){return N((function(e){return I(I({},e),{},{features:I(I({},null===H||void 0===H?void 0:H.features),{},(0,r.Z)({},t,!o))})}))}})]},t)}))]})}),(0,_.jsx)(h.Z,{mt:O.HN}),(0,_.jsx)(p.Z,{noPadding:!0,children:(0,_.jsxs)(h.Z,{p:O.cd,children:[(0,_.jsx)(h.Z,{mb:1,children:(0,_.jsx)(d.Z,{level:5,children:"OpenAI"})}),(0,_.jsx)(g.Z,{label:"API key",monospace:!0,onChange:function(e){return N((function(n){return I(I({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===H||void 0===H?void 0:H.openai_api_key)||""})]})}),(0,_.jsx)(h.Z,{mt:O.HN}),(0,_.jsxs)(s.Z,{alignItems:"center",children:[(0,_.jsx)(u.Z,{loading:L,onClick:function(){V({features:null===H||void 0===H?void 0:H.features,help_improve_mage:null===H||void 0===H?void 0:H.help_improve_mage,openai_api_key:null===H||void 0===H?void 0:H.openai_api_key})},primary:!0,children:"Save project settings"}),y&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(h.Z,{mr:O.cd}),(0,_.jsx)(u.Z,{onClick:y,secondary:!0,children:n||"Cancel"})]})]})]});return t?(0,_.jsx)(w,{children:U}):U}},76096:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),u=["children","fullHeight","gutter","style"];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,r.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}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,l=e.style,s=void 0===l?{}:l,d=(0,i.Z)(e,u),f=a({},s);return r&&(f.paddingLeft=r,f.paddingRight=f.paddingLeft),t&&(f.height="100%"),(0,c.jsx)(o.Col,a(a({},d),{},{style:f,children:n}))}},97361:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),u=t(28598),l=["children","fullHeight","gutter","justifyContent","style"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.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}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,a=e.justifyContent,d=e.style,f=void 0===d?{}:d,p=(0,i.Z)(e,l),h=s({},f);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,u.jsx)(c.Row,s(s({},p),{},{justifyContent:a,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},29237:function(e,n,t){"use strict";var r=t(38626),i=t(67971),o=t(86673),c=t(19711),u=t(23831),l=t(73942),a=t(37391),s=t(49125),d=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),p=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||u.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),m=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 "})),g=r.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],l.M8,l.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,s=e.fullHeight,f=void 0===s||s,b=e.fullWidth,j=void 0===b||b,v=e.header,y=e.headerHeight,x=e.headerIcon,O=e.headerPaddingVertical,w=e.headerTitle,Z=e.maxHeight,P=e.maxWidth,_=e.minWidth,k=e.noPadding,I=e.overflowVisible,S=e.subtitle,C=e.success;return(0,d.jsxs)(p,{borderless:n,dark:l,fullHeight:f,fullWidth:j,maxHeight:Z,maxWidth:P,minWidth:_,overflowVisible:I,ref:r,success:C,children:[(v||w)&&(0,d.jsxs)(h,{headerPaddingVertical:O,height:y,children:[v&&v,w&&(0,d.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.Z,{alignItems:"center",children:[x&&x,(0,d.jsx)(o.Z,{ml:x?1:0,children:(0,d.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,d.jsxs)(m,{maxHeight:Z,noPadding:k,overflowVisible:I,ref:u,children:[S&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(c.ZP,{default:!0,children:S})}),t]}),a&&(0,d.jsx)(g,{children:a})]})}},87372:function(e,n,t){"use strict";var r,i,o,c,u,l,a,s,d=t(82394),f=t(26304),p=t(26653),h=t(38626),m=t(33591),g=t(23831),b=t(2005),j=t(31012),v=t(19711),y=t(49125),x=t(86673),O=t(28598),w=["children","condensed","inline","level","marketing","spacingBelow"];function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],v.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||g.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(b.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(b.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(b.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(b.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(b.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),k=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")})),I=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,m.media.md(r||(r=(0,p.Z)(["\n ","\n "])),j.aQ),m.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),j.aQ),m.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),j.aQ)),S=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,j.MJ),C=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,m.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.sm(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.md(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.lg(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI),m.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*y.iI,7*y.iI)),H=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,j.BL),N=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),D=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),W=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(j.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(j.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),z=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,u=e.spacingBelow,l=(0,f.Z)(e,w);i?n=E:0===Number(o)?n=I:1===Number(o)?n=c?C:S:2===Number(o)?n=H:3===Number(o)?n=N:4===Number(o)?n=D:5===Number(o)&&(n=W);var a=(0,O.jsxs)(n,P(P({},l),{},{level:o,children:[u&&(0,O.jsx)(x.Z,{mb:r?2:3,children:t}),!u&&t]}));return i?a:(0,O.jsx)(k,{children:a})};z.defaultProps={level:3,weightStyle:6},n.Z=z},42949:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),c=t(76096),u=t(21853),l=t(41788),a=t(97361),s=t(30775),d=t(86673),f=t(49125),p=t(79585),h=t(28598);function m(){return(0,h.jsx)(s.Z,{uuidItemSelected:p.HY,uuidWorkspaceSelected:p.WH,children:(0,h.jsx)(d.Z,{p:f.cd,children:(0,h.jsx)(a.Z,{justifyContent:"center",children:(0,h.jsx)(c.Z,{xl:8,xxl:6,children:(0,h.jsx)(u.Z,{})})})})})}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,l.Z)(m)},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(42949)}])},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,9774,2888,179],(function(){return n=33323,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([[2287],{2850:function(e,r,n){"use strict";n.d(r,{M:function(){return o},W:function(){return u}});var t=n(38626),i=n(3055),u=34*n(49125).iI,o=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},79585:function(e,r,n){"use strict";n.d(r,{DQ:function(){return l},HY:function(){return o},SA:function(){return a},WH:function(){return u},eC:function(){return s},fF:function(){return c},tC:function(){return d}});var t=n(81132),i=n(9736),u="Workspace",o="Preferences",c="Git settings",s="Users",d="Account",l="Profile",a=function(e){var r=e.owner,n=e.roles,a=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:o}];(r||n===t.No.ADMIN||0!==(2&a))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:s}),(!(0,i.YB)()||n<=t.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:c});var p=[{items:f,uuid:u}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:l}],uuid:d}]):p}},30775:function(e,r,n){"use strict";n.d(r,{Z:function(){return P}});var t=n(1210),i=n(82394),u=n(12691),o=n.n(u),c=n(10919),s=n(86673),d=n(19711),l=n(38626),a=n(23831),f=n(49125),p=n(90880),v=(f.iI,l.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),h=l.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||a.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||a.Z.background).codeTextarea,";\n ")})),O=n(28598),b=n(82684);function j(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function m(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?j(Object(n),!0).forEach((function(r){(0,i.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=function(e){var r=e.isItemSelected,n=e.sections;return(0,O.jsx)(s.Z,{py:f.Gg,children:null===n||void 0===n?void 0:n.map((function(e){var n=e.items,t=e.title,i=e.uuid;return(0,O.jsxs)(s.Z,{children:[(0,O.jsx)(v,{children:(0,O.jsx)(d.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:t?t():i})}),null===n||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.linkProps,u=e.onClick,s=e.uuid,d=n?n():s,l=(0,O.jsx)(h,{selected:null===r||void 0===r?void 0:r(m(m({},e),{},{uuidWorkspace:i})),children:d});return t?(0,b.createElement)(o(),m(m({},t),{},{key:s,passHref:!0}),(0,O.jsx)(c.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:l})):(0,O.jsx)(c.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:u,preventDefault:!0,sameColorAsText:!0,children:l},s)}))]},i)}))})},w=n(2850),g=n(79585),_=n(9736);var P=function(e){var r=e.after,n=e.afterHidden,i=e.children,u=e.uuidItemSelected,o=e.uuidWorkspaceSelected,c=(0,_.PR)()||{};return(0,O.jsx)(t.Z,{after:r,afterHidden:!r||n,afterWidth:r?50*f.iI:0,afterWidthOverride:!0,before:(0,O.jsx)(w.M,{children:(0,O.jsx)(y,{isItemSelected:function(e){var r=e.uuid,n=e.uuidWorkspace;return o===n&&u===r},sections:(0,g.SA)(c)})}),beforeWidth:w.W,title:"Settings",uuid:"settings/index",children:i})}},60921:function(e,r,n){"use strict";n.r(r);var t=n(77837),i=n(82394),u=n(38860),o=n.n(u),c=n(82684),s=n(34376),d=n(60328),l=n(87372),a=n(41788),f=n(30775),p=n(86673),v=n(87815),h=n(19711),O=n(20582),b=n(82531),j=n(66166),m=n(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{2850:function(e,r,n){"use strict";n.d(r,{M:function(){return o},W:function(){return u}});var t=n(38626),i=n(3055),u=34*n(49125).iI,o=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},79585:function(e,r,n){"use strict";n.d(r,{DQ:function(){return l},HY:function(){return o},SA:function(){return a},WH:function(){return u},eC:function(){return s},fF:function(){return c},tC:function(){return d}});var t=n(81132),i=n(9736),u="Workspace",o="Preferences",c="Git settings",s="Users",d="Account",l="Profile",a=function(e){var r=e.owner,n=e.roles,a=e.project_access,f=[{linkProps:{href:"/settings/workspace/preferences"},uuid:o}];(r||n===t.No.ADMIN||0!==(2&a))&&f.push({linkProps:{href:"/settings/workspace/users"},uuid:s}),(!(0,i.YB)()||n<=t.No.EDITOR)&&f.push({linkProps:{href:"/settings/workspace/sync-data"},uuid:c});var p=[{items:f,uuid:u}];return(0,i.YB)()?p.concat([{items:[{linkProps:{href:"/settings/account/profile"},uuid:l}],uuid:d}]):p}},30775:function(e,r,n){"use strict";n.d(r,{Z:function(){return P}});var t=n(1210),i=n(82394),u=n(12691),o=n.n(u),c=n(10919),s=n(86673),d=n(19711),l=n(38626),a=n(23831),f=n(49125),p=n(90880),v=(f.iI,l.default.div.withConfig({displayName:"indexstyle__SectionTitleStyle",componentId:"sc-1y8dyue-0"})(["padding:","px ","px;"],1*f.iI,2.5*f.iI)),h=l.default.div.withConfig({displayName:"indexstyle__ItemStyle",componentId:"sc-1y8dyue-1"})([""," padding:","px ","px;"," ",""],(0,p.eR)(),1.5*f.iI,2.5*f.iI,(function(e){return!e.selected&&"\n &:hover {\n background-color: ".concat((e.theme.background||a.Z.background).codeArea,";\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.background||a.Z.background).codeTextarea,";\n ")})),O=n(28598),b=n(82684);function j(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function m(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?j(Object(n),!0).forEach((function(r){(0,i.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=function(e){var r=e.isItemSelected,n=e.sections;return(0,O.jsx)(s.Z,{py:f.Gg,children:null===n||void 0===n?void 0:n.map((function(e){var n=e.items,t=e.title,i=e.uuid;return(0,O.jsxs)(s.Z,{children:[(0,O.jsx)(v,{children:(0,O.jsx)(d.ZP,{bold:!0,muted:!0,small:!0,uppercase:!0,children:t?t():i})}),null===n||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.linkProps,u=e.onClick,s=e.uuid,d=n?n():s,l=(0,O.jsx)(h,{selected:null===r||void 0===r?void 0:r(m(m({},e),{},{uuidWorkspace:i})),children:d});return t?(0,b.createElement)(o(),m(m({},t),{},{key:s,passHref:!0}),(0,O.jsx)(c.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,sameColorAsText:!0,children:l})):(0,O.jsx)(c.Z,{block:!0,noHoverUnderline:!0,noOutline:!0,onClick:u,preventDefault:!0,sameColorAsText:!0,children:l},s)}))]},i)}))})},w=n(2850),g=n(79585),_=n(9736);var P=function(e){var r=e.after,n=e.afterHidden,i=e.children,u=e.uuidItemSelected,o=e.uuidWorkspaceSelected,c=(0,_.PR)()||{};return(0,O.jsx)(t.Z,{after:r,afterHidden:!r||n,afterWidth:r?50*f.iI:0,afterWidthOverride:!0,before:(0,O.jsx)(w.M,{children:(0,O.jsx)(y,{isItemSelected:function(e){var r=e.uuid,n=e.uuidWorkspace;return o===n&&u===r},sections:(0,g.SA)(c)})}),beforeWidth:w.W,title:"Settings",uuid:"settings/index",children:i})}},60921:function(e,r,n){"use strict";n.r(r);var t=n(77837),i=n(82394),u=n(38860),o=n.n(u),c=n(82684),s=n(34376),d=n(60328),l=n(87372),a=n(41788),f=n(30775),p=n(86673),v=n(87815),h=n(19711),O=n(20582),b=n(82531),j=n(66166),m=n(22341),y=n(49125),w=n(79585),g=n(63153),_=n(9736),P=n(33766),x=n(7715),k=n(59e3),Z=n(28598);function S(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function E(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?S(Object(n),!0).forEach((function(r){(0,i.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function I(){var e=(0,s.useRouter)(),r=(0,_.PR)()||{},n=r.id,t=r.owner,i=(0,c.useState)(null),u=i[0],o=i[1],a=b.ZP.users.list({},{revalidateOnFocus:!1}),S=a.data,I=a.mutate,D=(0,c.useMemo)((function(){return(null===S||void 0===S?void 0:S.users)||[]}),[null===S||void 0===S?void 0:S.users]),C=b.ZP.users.detail(null===u||void 0===u?void 0:u.user_id,{},{revalidateOnFocus:!1}),A=C.data,H=C.mutate,W=null===A||void 0===A?void 0:A.user,N=(0,k.iV)(),M=(0,j.Z)(N);(0,c.useEffect)((function(){var e=N.add_new_user,r=N.user_id;if(!(0,x.Xy)(N,M)){var n=E(E({},M),N);r?n.user_id=r:delete n.user_id,e?n.add_new_user=e:delete n.add_new_user,o(n)}}),[N,M]);var R=null===u||void 0===u?void 0:u.add_new_user,T=(0,c.useMemo)((function(){return R?(0,Z.jsx)(p.Z,{p:y.cd,children:(0,Z.jsx)(O.Z,{newUser:!0,onSaveSuccess:function(){(0,P.u7)({add_new_user:null,user_id:null}),I()},title:"Add new user",user:{}})}):W?(0,Z.jsx)(p.Z,{p:y.cd,children:(0,Z.jsx)(O.Z,{hideFields:[g.s7],onDeleteSuccess:function(){(0,P.u7)({add_new_user:null,user_id:null}),I()},onSaveSuccess:function(){(0,P.u7)({add_new_user:null,user_id:null}),H(),I()},showDelete:!0,title:"Edit user",user:W})}):null}),[H,I,R,W]);return(0,Z.jsxs)(f.Z,{after:T,afterHidden:!W&&!R,uuidItemSelected:w.eC,uuidWorkspaceSelected:w.WH,children:[t&&(0,Z.jsx)(p.Z,{p:y.cd,children:(0,Z.jsx)(d.Z,{beforeIcon:(0,Z.jsx)(m.mm,{}),onClick:function(){return(0,P.u7)({add_new_user:1,user_id:null})},primary:!0,children:"Add new user"})}),(0,Z.jsx)(p.Z,{p:y.cd,children:(0,Z.jsx)(l.Z,{children:"Users"})}),(0,Z.jsx)(v.Z,{columnFlex:[1,1,1],columns:[{uuid:"Username"},{uuid:"Email"},{uuid:"Role"}],isSelectedRow:function(e){var r;return(null===(r=D[e])||void 0===r?void 0:r.id)===(null===W||void 0===W?void 0:W.id)},onClickRow:function(r){var t,i=null===(t=D[r])||void 0===t?void 0:t.id;i===n?e.push("/settings/account/profile"):+(null===u||void 0===u?void 0:u.user_id)===i?(0,P.u7)({user_id:null}):(0,P.u7)({add_new_user:null,user_id:i})},rows:D.map((function(e){var r=e.email,n=e.roles_display,t=e.roles_new,i=e.username,u=t||[];return u.sort((function(e,r){return e.id-r.id})),[(0,Z.jsx)(h.ZP,{bold:!0,children:i},"username"),(0,Z.jsx)(h.ZP,{default:!0,children:r},"email"),(0,Z.jsx)(h.ZP,{default:!0,children:u.length>0?u[0].name:n},"roles")]})),uuid:"pipeline-runs"})]})}I.getInitialProps=(0,t.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)}))),r.default=(0,a.Z)(I)},33766:function(e,r,n){"use strict";n.d(r,{O2:function(){return a},g_:function(){return p},u7:function(){return f}});var t=n(75582),i=n(82394),u=n(34376),o=n.n(u),c=n(59e3),s=n(24224);function d(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){(0,i.Z)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var a="_offset";function f(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preserveParams,i=r.pushHistory,u=r.replaceParams,s=(0,c.iV)(),d={};n&&n.forEach((function(e){s[e]&&(d[e]=s[e])}));var a,f=u?d:s;a=window.location.pathname;var p=i?o().push:o().replace,v=l(l({},f),e);Object.entries(e).forEach((function(e){var r=(0,t.Z)(e,2),n=r[0],i=r[1];"undefined"!==typeof i&&null!==i||delete v[n]}));var h=(0,c.uM)(v);h.length>=1&&(h="?".concat(h));var O="".concat(a.split("?")[0]).concat(h);return p(o().router.pathname,O,{shallow:!0})}function p(e,r,n){var i=n.addingMultipleValues,u=n.isList,o=n.itemsPerPage,c=n.pushHistory,d=void 0!==c&&c,p=n.resetLimitParams,v=l({},e);i?Object.entries(r).forEach((function(e){var r=(0,t.Z)(e,2),n=r[0],i=r[1];if(Array.isArray(i)){var u="".concat(n,"[]");v[u]=i.map(String)}})):u?Object.entries(r).forEach((function(e){var r=(0,t.Z)(e,2),n=r[0],i=r[1],u=String(i),o="".concat(n,"[]"),c=v[o];c&&Array.isArray(c)?(c=c.map(String)).includes(u)?v[o]=(0,s.Od)(c,(function(e){return e===u})):v[o]=c.concat(u):v[o]=[u]})):v=l(l({},v),r),p&&(v._limit=o||20,v[a]=0),f(v,{pushHistory:d})}},48673:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/users",function(){return n(60921)}])}},function(e){e.O(0,[844,1424,1005,7815,3881,9774,2888,179],(function(){return r=48673,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{76096:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];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 u(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,r.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}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,a=e.style,s=void 0===a?{}:a,f=(0,i.Z)(e,l),d=u({},s);return r&&(d.paddingLeft=r,d.paddingRight=d.paddingLeft),t&&(d.height="100%"),(0,c.jsx)(o.Col,u(u({},f),{},{style:d,children:n}))}},97361:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function u(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?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,u=e.justifyContent,f=e.style,d=void 0===f?{}:f,p=(0,i.Z)(e,a),h=s({},d);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},p),{},{justifyContent:u,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},55022:function(e,n,t){"use strict";var r;t.d(n,{G:function(){return r}}),function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github"}(r||(r={}))},87372:function(e,n,t){"use strict";var r,i,o,c,l,a,u,s,f=t(82394),d=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(23831),y=t(2005),b=t(31012),j=t(19711),O=t(49125),w=t(86673),x=t(28598),v=["children","condensed","inline","level","marketing","spacingBelow"];function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,f.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(y.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(y.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(y.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),C=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),S=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,g.media.md(r||(r=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),b.aQ)),k=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,b.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.sm(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.md(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.lg(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,b.BL),z=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),H=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(b.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(b.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),M=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,d.Z)(e,v);i?n=E:0===Number(o)?n=S:1===Number(o)?n=c?I:k:2===Number(o)?n=N:3===Number(o)?n=z:4===Number(o)?n=H:5===Number(o)&&(n=D);var u=(0,x.jsxs)(n,P(P({},a),{},{level:o,children:[l&&(0,x.jsx)(w.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?u:(0,x.jsx)(C,{children:u})};M.defaultProps={level:3,weightStyle:6},n.Z=M},71208:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return $}});var r=t(77837),i=t(38860),o=t.n(i),c=t(82394),l=t(57384),a=t(41424),u=t(33591),s=t(86673),f=t(49125),d=t(28598);var p=function(e){var n=e.children,t=e.width,r=void 0===t?12:t;return(0,d.jsx)(s.Z,{px:f.zC,children:(0,d.jsx)(u.Row,{children:(0,d.jsx)(u.Col,{lg:r,md:Math.min(12,Math.round(1.5*(12-r))),sm:Math.min(12,Math.round(1.75*(12-r))),xs:12,children:n})})})},h=t(38626),g=t(3055),m=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],g.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=e.children,t=e.headerProps,r=e.title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Z,{title:r}),(0,d.jsx)(a.Z,b({},t)),(0,d.jsx)(p,{children:(0,d.jsx)(m,{fullHeight:!0,children:n})})]})},O=t(75582),w=t(82684),x=t(83455),v=t(34376),Z=t(35490),P=t(67971),_=t(87372),C=t(11135),S=t(19711),k=t(82944),I=t(82531),N=t(23831),z=t(73942),H=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],z.TR,21*f.iI,f.Vj,f.Vj,f.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).panel,";\n ")})),D=h.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],z.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),E=t(76096),M=t(97361),R=E.Z,L=M.Z,T=t(16115),V=t(7715),F=t(96510),B=t(51504),G=t(59e3),U=t(9736),X=t(10503),A=t(55022);function Q(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?Q(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J="email",W="password";var q=function(e){var n=e.title,t=(0,v.useRouter)(),r=(0,w.useState)(null),i=r[0],o=r[1],l=(0,w.useState)({}),a=l[0],u=l[1],p=(0,x.Db)(I.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.session,r=n.token,i=n.user;(0,U.av)(i),Z.Z.storeToken(r,(function(){var e="/",n=(0,G.iV)(window.location.href);if(n.redirect_url){var r=(0,G.uM)((0,V.gR)(n,["redirect_url","access_token","provider"]));e="".concat(n.redirect_url,"?").concat(r)}t.push(e)}))},onErrorCallback:function(e){var n=e.error;o(n)}})}}),h=(0,O.Z)(p,2),g=h[0],m=h[1].isLoading,y=(0,w.useCallback)((function(e){return Z.Z.logout((function(){return g(e)}))}),[g]),b=I.ZP.oauths.detail(A.G.ACTIVE_DIRECTORY,{redirect_uri:encodeURIComponent(window.location.href)}).data,j=(0,w.useMemo)((function(){var e;return null===b||void 0===b||null===(e=b.oauth)||void 0===e?void 0:e.url}),[b]),N=(0,G.iV)()||{},z=N.access_token,E=N.provider;return(0,w.useEffect)((function(){var e;z&&E&&g({session:(e={},(0,c.Z)(e,"provider",E),(0,c.Z)(e,"token",z),e)})}),[z,g,E]),(0,d.jsxs)(L,{fullHeight:!0,children:[(0,d.jsx)(R,{lg:6,md:12,children:(0,d.jsx)(P.Z,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,d.jsx)(s.Z,{px:{xl:5*f.zC,xs:f.zC},py:f.zC,children:(0,d.jsxs)(H,{children:[(0,d.jsx)(_.Z,{yellow:!0,children:n}),(0,d.jsxs)("form",{children:[(0,d.jsxs)(s.Z,{mt:3,children:[(0,d.jsx)(k.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},J,e.target.value))}))},primary:!i,value:a.email}),(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(k.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},W,e.target.value))}))},primary:!i,type:"password",value:a.password})})]}),i&&(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(S.ZP,{danger:!0,children:i.message})}),(0,d.jsx)(s.Z,{mt:3,children:(0,d.jsx)(C.ZP,{bold:!0,inline:!0,keyTextGroups:[[T.Lz]],keyboardShortcutValidation:function(e){var n=e.keyMapping;return(0,B.y)([T.Uq],n)},large:!0,loading:m,noHoverUnderline:!0,onClick:function(){return y({session:a})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),j&&(0,d.jsx)(s.Z,{mt:4,children:(0,d.jsx)(C.ZP,{beforeElement:(0,d.jsx)(X.Dg,{size:2*f.iI}),bold:!0,inline:!0,onClick:function(){return Z.Z.logout((function(){return t.push(j)}))},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})]})]})})})}),(0,d.jsx)(R,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,d.jsx)(s.Z,{fullHeight:!0,fullWidth:!0,px:f.zC,py:f.zC+8,children:(0,d.jsx)(D,{src:"/images/sessions/abstract.png",children:"Sign in abstract image"})})})]})};function K(){return(0,d.jsx)(j,{title:"Sign in",children:(0,d.jsx)(q,{title:"\ud83d\udc4b Sign in"})})}K.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var $=K},6821:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return t(71208)}])}},function(e){e.O(0,[844,1424,9774,2888,179],(function(){return n=6821,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1312],{76096:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];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 u(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,r.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}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,a=e.style,s=void 0===a?{}:a,f=(0,i.Z)(e,l),d=u({},s);return r&&(d.paddingLeft=r,d.paddingRight=d.paddingLeft),t&&(d.height="100%"),(0,c.jsx)(o.Col,u(u({},f),{},{style:d,children:n}))}},97361:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function u(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?u(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,u=e.justifyContent,f=e.style,d=void 0===f?{}:f,p=(0,i.Z)(e,a),h=s({},d);return r&&(h.marginLeft=-1*r,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},p),{},{justifyContent:u,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},55022:function(e,n,t){"use strict";var r;t.d(n,{G:function(){return r}}),function(e){e.ACTIVE_DIRECTORY="active_directory",e.GITHUB="github"}(r||(r={}))},87372:function(e,n,t){"use strict";var r,i,o,c,l,a,u,s,f=t(82394),d=t(26304),p=t(26653),h=t(38626),g=t(33591),m=t(23831),y=t(2005),b=t(31012),j=t(19711),O=t(49125),w=t(86673),x=t(28598),v=["children","condensed","inline","level","marketing","spacingBelow"];function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,f.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," ",""],j.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(y.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(y.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(y.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(y.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(y.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "})),C=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),S=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,g.media.md(r||(r=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.lg(i||(i=(0,p.Z)(["\n ","\n "])),b.aQ),g.media.xl(o||(o=(0,p.Z)(["\n ","\n "])),b.aQ)),k=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,b.MJ),I=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,g.media.xs(c||(c=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.sm(l||(l=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.md(a||(a=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.lg(u||(u=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI),g.media.xl(s||(s=(0,p.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*O.iI,7*O.iI)),N=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,b.BL),z=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),H=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(b.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(b.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),M=function(e){var n,t=e.children,r=e.condensed,i=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,d.Z)(e,v);i?n=E:0===Number(o)?n=S:1===Number(o)?n=c?I:k:2===Number(o)?n=N:3===Number(o)?n=z:4===Number(o)?n=H:5===Number(o)&&(n=D);var u=(0,x.jsxs)(n,P(P({},a),{},{level:o,children:[l&&(0,x.jsx)(w.Z,{mb:r?2:3,children:t}),!l&&t]}));return i?u:(0,x.jsx)(C,{children:u})};M.defaultProps={level:3,weightStyle:6},n.Z=M},71208:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return $}});var r=t(77837),i=t(38860),o=t.n(i),c=t(82394),l=t(57384),a=t(41424),u=t(33591),s=t(86673),f=t(49125),d=t(28598);var p=function(e){var n=e.children,t=e.width,r=void 0===t?12:t;return(0,d.jsx)(s.Z,{px:f.zC,children:(0,d.jsx)(u.Row,{children:(0,d.jsx)(u.Col,{lg:r,md:Math.min(12,Math.round(1.5*(12-r))),sm:Math.min(12,Math.round(1.75*(12-r))),xs:12,children:n})})})},h=t(38626),g=t(3055),m=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-jcgu5l-0"})(["padding-top:","px;",""],g.Mz,(function(e){return e.fullHeight&&"\n height: calc(100vh);\n "}));function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j=function(e){var n=e.children,t=e.headerProps,r=e.title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Z,{title:r}),(0,d.jsx)(a.Z,b({},t)),(0,d.jsx)(p,{children:(0,d.jsx)(m,{fullHeight:!0,children:n})})]})},O=t(75582),w=t(82684),x=t(83455),v=t(34376),Z=t(35490),P=t(67971),_=t(87372),C=t(11135),S=t(19711),k=t(82944),I=t(82531),N=t(23831),z=t(73942),H=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-641xul-0"})(["border-radius:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;width:100%;",""],z.TR,21*f.iI,f.Vj,f.Vj,f.Vj,(function(e){return"\n background-color: ".concat((e.theme.background||N.Z.background).panel,";\n ")})),D=h.default.div.withConfig({displayName:"indexstyle__BackgroundImageStyle",componentId:"sc-641xul-1"})(["border-radius:","px;font-size:0;overflow:hidden;",""],z.D7,(function(e){return e.src&&"\n background-image: url(".concat(e.src,");\n background-size: cover;\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n ")})),E=t(76096),M=t(97361),R=E.Z,L=M.Z,T=t(16115),V=t(7715),F=t(96510),B=t(51504),G=t(59e3),U=t(9736),X=t(22341),A=t(55022);function Q(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?Q(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J="email",W="password";var q=function(e){var n=e.title,t=(0,v.useRouter)(),r=(0,w.useState)(null),i=r[0],o=r[1],l=(0,w.useState)({}),a=l[0],u=l[1],p=(0,x.Db)(I.ZP.sessions.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.session,r=n.token,i=n.user;(0,U.av)(i),Z.Z.storeToken(r,(function(){var e="/",n=(0,G.iV)(window.location.href);if(n.redirect_url){var r=(0,G.uM)((0,V.gR)(n,["redirect_url","access_token","provider"]));e="".concat(n.redirect_url,"?").concat(r)}t.push(e)}))},onErrorCallback:function(e){var n=e.error;o(n)}})}}),h=(0,O.Z)(p,2),g=h[0],m=h[1].isLoading,y=(0,w.useCallback)((function(e){return Z.Z.logout((function(){return g(e)}))}),[g]),b=I.ZP.oauths.detail(A.G.ACTIVE_DIRECTORY,{redirect_uri:encodeURIComponent(window.location.href)}).data,j=(0,w.useMemo)((function(){var e;return null===b||void 0===b||null===(e=b.oauth)||void 0===e?void 0:e.url}),[b]),N=(0,G.iV)()||{},z=N.access_token,E=N.provider;return(0,w.useEffect)((function(){var e;z&&E&&g({session:(e={},(0,c.Z)(e,"provider",E),(0,c.Z)(e,"token",z),e)})}),[z,g,E]),(0,d.jsxs)(L,{fullHeight:!0,children:[(0,d.jsx)(R,{lg:6,md:12,children:(0,d.jsx)(P.Z,{flexDirection:"column",fullHeight:!0,fullWidth:!0,justifyContent:"center",children:(0,d.jsx)(s.Z,{px:{xl:5*f.zC,xs:f.zC},py:f.zC,children:(0,d.jsxs)(H,{children:[(0,d.jsx)(_.Z,{yellow:!0,children:n}),(0,d.jsxs)("form",{children:[(0,d.jsxs)(s.Z,{mt:3,children:[(0,d.jsx)(k.Z,{autoComplete:"username",label:"Email",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},J,e.target.value))}))},primary:!i,value:a.email}),(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(k.Z,{autoComplete:"current-password",label:"Password",large:!0,meta:{error:" ",touched:!!i},onChange:function(e){return u((function(n){return Y(Y({},n),{},(0,c.Z)({},W,e.target.value))}))},primary:!i,type:"password",value:a.password})})]}),i&&(0,d.jsx)(s.Z,{mt:2,children:(0,d.jsx)(S.ZP,{danger:!0,children:i.message})}),(0,d.jsx)(s.Z,{mt:3,children:(0,d.jsx)(C.ZP,{bold:!0,inline:!0,keyTextGroups:[[T.Lz]],keyboardShortcutValidation:function(e){var n=e.keyMapping;return(0,B.y)([T.Uq],n)},large:!0,loading:m,noHoverUnderline:!0,onClick:function(){return y({session:a})},selected:!0,uuid:"SignForm/action",wind:!0,children:"Sign into Mage"})}),j&&(0,d.jsx)(s.Z,{mt:4,children:(0,d.jsx)(C.ZP,{beforeElement:(0,d.jsx)(X.Dg,{size:2*f.iI}),bold:!0,inline:!0,onClick:function(){return Z.Z.logout((function(){return t.push(j)}))},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})]})]})})})}),(0,d.jsx)(R,{hiddenLgDown:!0,lg:6,style:{flex:1},children:(0,d.jsx)(s.Z,{fullHeight:!0,fullWidth:!0,px:f.zC,py:f.zC+8,children:(0,d.jsx)(D,{src:"/images/sessions/abstract.png",children:"Sign in abstract image"})})})]})};function K(){return(0,d.jsx)(j,{title:"Sign in",children:(0,d.jsx)(q,{title:"\ud83d\udc4b Sign in"})})}K.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var $=K},6821:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sign-in",function(){return t(71208)}])}},function(e){e.O(0,[844,1424,9774,2888,179],(function(){return n=6821,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([[6568],{1210:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),i=r(21831),o=r(82684),u=r(47999),s=r(49894),l=r(93461),c=r(57384),a=r(41424),d=r(72454),f=r(28598);function p(e,t){var r=e.children;return(0,f.jsx)(d.HS,{ref:t,children:r})}var h=o.forwardRef(p),v=r(32063),b=r(85019),j=r(82531),m=r(66166),O=r(3055),w=r(49125),_=r(91427),x=r(24141);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Z=function(e){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,n=e.after,p=e.afterHidden,g=e.afterWidth,Z=e.afterWidthOverride,P=e.before,C=e.beforeWidth,k=e.breadcrumbs,E=e.children,M=e.errors,S=e.headerMenuItems,T=e.headerOffset,A=e.mainContainerHeader,B=e.navigationItems,H=e.setErrors,I=e.subheaderChildren,R=e.title,W=e.uuid,D=(0,x.i)().width,N="dashboard_after_width_".concat(W),F="dashboard_before_width_".concat(W),U=(0,o.useRef)(null),z=(0,o.useState)(Z?g:(0,_.U2)(N,g)),X=z[0],q=z[1],V=(0,o.useState)(!1),G=V[0],J=V[1],K=(0,o.useState)(P?Math.max((0,_.U2)(F,C),13*w.iI):null),L=K[0],Q=K[1],Y=(0,o.useState)(!1),$=Y[0],ee=Y[1],te=(0,o.useState)(null)[1],re=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ne=null===re||void 0===re?void 0:re.projects,ie={label:function(){var e;return null===ne||void 0===ne||null===(e=ne[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];k?(r&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(k))):(null===ne||void 0===ne?void 0:ne.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return R}}]),(0,o.useEffect)((function(){null===U||void 0===U||!U.current||G||$||null===te||void 0===te||te(U.current.getBoundingClientRect().width)}),[G,X,$,L,U,te,D]),(0,o.useEffect)((function(){G||(0,_.t8)(N,X)}),[p,G,X,N]),(0,o.useEffect)((function(){$||(0,_.t8)(F,L)}),[$,L,F]);var ue=(0,m.Z)(g);return(0,o.useEffect)((function(){Z&&ue!==g&&q(g)}),[Z,g,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.Z,{title:R}),(0,f.jsx)(a.Z,{breadcrumbs:oe,menuItems:S,project:null===ne||void 0===ne?void 0:ne[0],version:null===ne||void 0===ne||null===(t=ne[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:B,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:n,afterHeightOffset:O.Mz,afterHidden:p,afterMousedownActive:G,afterWidth:X,before:P,beforeHeightOffset:O.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(P?L:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:P?d.k1:null,mainContainerHeader:A,mainContainerRef:U,setAfterMousedownActive:J,setAfterWidth:q,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[I&&(0,f.jsx)(h,{children:I}),E]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,f.jsx)(s.Z,y(y({},M),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}},37980:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),s=r(18908),l=r(1210),c=r(49666),a=r(41788),d=r(86673),f=r(54283),p=r(62749),h=r(82531),v=r(49125),b=r(59e3),j=r(28598);function m(e){var t,r=e.objectType,n=e.slug,i=(0,b.iV)().object_type,o=(0,u.useState)(null),a=o[0],m=o[1],O=i||r||s.Z,w=s.R===O,_=h.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:O}).data;return(0,u.useEffect)((function(){_&&m(null===_||void 0===_?void 0:_.custom_template)}),[_]),(0,j.jsxs)(l.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:w?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!_&&(0,j.jsx)(d.Z,{p:v.cd,children:(0,j.jsx)(f.Z,{inverted:!0})}),a&&(0,j.jsxs)(j.Fragment,{children:[(!O||s.Z===O)&&(0,j.jsx)(p.Z,{template:a},null===a||void 0===a||null===(t=a.content)||void 0===t?void 0:t.slice(0,40)),w&&(0,j.jsx)(c.Z,{template:a})]})]})}m.getInitialProps=function(){var e=(0,n.Z)(o().mark((function e(t){var r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,i=r.slug,e.abrupt("return",{objectType:n,slug:i});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,a.Z)(m)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(37980)}])}},function(e){e.O(0,[844,9902,426,1774,8792,8789,4259,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6568],{1210:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(82394),i=r(21831),o=r(82684),u=r(47999),s=r(49894),l=r(93461),c=r(57384),a=r(41424),d=r(72454),f=r(28598);function p(e,t){var r=e.children;return(0,f.jsx)(d.HS,{ref:t,children:r})}var h=o.forwardRef(p),v=r(32063),b=r(85019),j=r(82531),m=r(66166),O=r(3055),w=r(49125),_=r(91427),x=r(24141);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Z=function(e){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,n=e.after,p=e.afterHidden,g=e.afterWidth,Z=e.afterWidthOverride,P=e.before,C=e.beforeWidth,k=e.breadcrumbs,E=e.children,M=e.errors,S=e.headerMenuItems,T=e.headerOffset,A=e.mainContainerHeader,B=e.navigationItems,H=e.setErrors,I=e.subheaderChildren,R=e.title,W=e.uuid,D=(0,x.i)().width,N="dashboard_after_width_".concat(W),F="dashboard_before_width_".concat(W),U=(0,o.useRef)(null),z=(0,o.useState)(Z?g:(0,_.U2)(N,g)),X=z[0],q=z[1],V=(0,o.useState)(!1),G=V[0],J=V[1],K=(0,o.useState)(P?Math.max((0,_.U2)(F,C),13*w.iI):null),L=K[0],Q=K[1],Y=(0,o.useState)(!1),$=Y[0],ee=Y[1],te=(0,o.useState)(null)[1],re=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ne=null===re||void 0===re?void 0:re.projects,ie={label:function(){var e;return null===ne||void 0===ne||null===(e=ne[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];k?(r&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(k))):(null===ne||void 0===ne?void 0:ne.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return R}}]),(0,o.useEffect)((function(){null===U||void 0===U||!U.current||G||$||null===te||void 0===te||te(U.current.getBoundingClientRect().width)}),[G,X,$,L,U,te,D]),(0,o.useEffect)((function(){G||(0,_.t8)(N,X)}),[p,G,X,N]),(0,o.useEffect)((function(){$||(0,_.t8)(F,L)}),[$,L,F]);var ue=(0,m.Z)(g);return(0,o.useEffect)((function(){Z&&ue!==g&&q(g)}),[Z,g,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.Z,{title:R}),(0,f.jsx)(a.Z,{breadcrumbs:oe,menuItems:S,project:null===ne||void 0===ne?void 0:ne[0],version:null===ne||void 0===ne||null===(t=ne[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===B||void 0===B?void 0:B.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:B,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:n,afterHeightOffset:O.Mz,afterHidden:p,afterMousedownActive:G,afterWidth:X,before:P,beforeHeightOffset:O.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(P?L:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:P?d.k1:null,mainContainerHeader:A,mainContainerRef:U,setAfterMousedownActive:J,setAfterWidth:q,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[I&&(0,f.jsx)(h,{children:I}),E]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,f.jsx)(s.Z,y(y({},M),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}},37980:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),s=r(18908),l=r(1210),c=r(49666),a=r(41788),d=r(86673),f=r(54283),p=r(62749),h=r(82531),v=r(49125),b=r(59e3),j=r(28598);function m(e){var t,r=e.objectType,n=e.slug,i=(0,b.iV)().object_type,o=(0,u.useState)(null),a=o[0],m=o[1],O=i||r||s.Z,w=s.R===O,_=h.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:O}).data;return(0,u.useEffect)((function(){_&&m(null===_||void 0===_?void 0:_.custom_template)}),[_]),(0,j.jsxs)(l.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:w?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!_&&(0,j.jsx)(d.Z,{p:v.cd,children:(0,j.jsx)(f.Z,{inverted:!0})}),a&&(0,j.jsxs)(j.Fragment,{children:[(!O||s.Z===O)&&(0,j.jsx)(p.Z,{template:a},null===a||void 0===a||null===(t=a.content)||void 0===t?void 0:t.slice(0,40)),w&&(0,j.jsx)(c.Z,{template:a})]})]})}m.getInitialProps=function(){var e=(0,n.Z)(o().mark((function e(t){var r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,i=r.slug,e.abrupt("return",{objectType:n,slug:i});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,a.Z)(m)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(37980)}])}},function(e){e.O(0,[844,9902,426,1774,8792,8789,4259,9055,1424,1005,7815,3654,8952,7722,4822,1484,9774,2888,179],(function(){return t=45082,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5240],{1210:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),i=r(21831),o=r(82684),u=r(47999),s=r(49894),l=r(93461),a=r(57384),c=r(41424),d=r(72454),f=r(28598);function h(e,t){var r=e.children;return(0,f.jsx)(d.HS,{ref:t,children:r})}var p=o.forwardRef(h),v=r(32063),b=r(85019),m=r(82531),j=r(66166),w=r(3055),O=r(49125),_=r(91427),x=r(24141);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P=function(e){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,n=e.after,h=e.afterHidden,g=e.afterWidth,P=e.afterWidthOverride,Z=e.before,k=e.beforeWidth,C=e.breadcrumbs,E=e.children,M=e.errors,S=e.headerMenuItems,T=e.headerOffset,A=e.mainContainerHeader,N=e.navigationItems,B=e.setErrors,H=e.subheaderChildren,I=e.title,W=e.uuid,D=(0,x.i)().width,R="dashboard_after_width_".concat(W),U="dashboard_before_width_".concat(W),z=(0,o.useRef)(null),F=(0,o.useState)(P?g:(0,_.U2)(R,g)),X=F[0],V=F[1],q=(0,o.useState)(!1),G=q[0],J=q[1],K=(0,o.useState)(Z?Math.max((0,_.U2)(U,k),13*O.iI):null),L=K[0],Q=K[1],Y=(0,o.useState)(!1),$=Y[0],ee=Y[1],te=(0,o.useState)(null)[1],re=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ne=null===re||void 0===re?void 0:re.projects,ie={label:function(){var e;return null===ne||void 0===ne||null===(e=ne[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];C?(r&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(C))):(null===ne||void 0===ne?void 0:ne.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||G||$||null===te||void 0===te||te(z.current.getBoundingClientRect().width)}),[G,X,$,L,z,te,D]),(0,o.useEffect)((function(){G||(0,_.t8)(R,X)}),[h,G,X,R]),(0,o.useEffect)((function(){$||(0,_.t8)(U,L)}),[$,L,U]);var ue=(0,j.Z)(g);return(0,o.useEffect)((function(){P&&ue!==g&&V(g)}),[P,g,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:I}),(0,f.jsx)(c.Z,{breadcrumbs:oe,menuItems:S,project:null===ne||void 0===ne?void 0:ne[0],version:null===ne||void 0===ne||null===(t=ne[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===N||void 0===N?void 0:N.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:N,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:n,afterHeightOffset:w.Mz,afterHidden:h,afterMousedownActive:G,afterWidth:X,before:Z,beforeHeightOffset:w.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(Z?L:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:Z?d.k1:null,mainContainerHeader:A,mainContainerRef:z,setAfterMousedownActive:J,setAfterWidth:V,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[H&&(0,f.jsx)(p,{children:H}),E]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,f.jsx)(s.Z,y(y({},M),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}},23478:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),s=r(2485),l=r(1210),a=r(41788),c=r(27337),d=r(18908),f=r(59e3),h=r(28598);function p(){var e=(0,u.useState)(!1),t=e[0],r=e[1],n=(0,u.useState)(null),i=n[0],o=n[1],a=(0,u.useState)(null),p=a[0],v=a[1],b=(0,f.iV)();(0,u.useEffect)((function(){var e=b.new,t=b.object_type,n=b.pipeline_uuid;t&&o(t),n&&v(n),r(!!e)}),[b]);var m=(0,u.useMemo)((function(){var e=[t?"New":"Browse"];return i&&e.push(i),p&&e.push(p),e}),[t,i,p]),j=(0,u.useMemo)((function(){return d.R===i}),[i]);return(0,h.jsx)(l.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Templates"},linkProps:{href:j?"/templates?object_type=".concat(d.R):"/templates"}},{bold:!0,label:function(){return"New"}}]:null,title:"Templates",uuid:"Templates/index",children:(0,h.jsx)(s.Z,{defaultTab:j?c.A2:null,objectType:i,pipelineUUID:p,showAddingNewTemplates:t},m.join("_"))})}p.getInitialProps=(0,n.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,a.Z)(p)},87710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates",function(){return r(23478)}])}},function(e){e.O(0,[844,9902,426,1774,8792,8789,4259,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5240],{1210:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),i=r(21831),o=r(82684),u=r(47999),s=r(49894),l=r(93461),a=r(57384),c=r(41424),d=r(72454),f=r(28598);function h(e,t){var r=e.children;return(0,f.jsx)(d.HS,{ref:t,children:r})}var p=o.forwardRef(h),v=r(32063),b=r(85019),m=r(82531),j=r(66166),w=r(3055),O=r(49125),_=r(91427),x=r(24141);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P=function(e){var t,r=e.addProjectBreadcrumbToCustomBreadcrumbs,n=e.after,h=e.afterHidden,g=e.afterWidth,P=e.afterWidthOverride,Z=e.before,k=e.beforeWidth,C=e.breadcrumbs,E=e.children,M=e.errors,S=e.headerMenuItems,T=e.headerOffset,A=e.mainContainerHeader,N=e.navigationItems,B=e.setErrors,H=e.subheaderChildren,I=e.title,W=e.uuid,D=(0,x.i)().width,R="dashboard_after_width_".concat(W),U="dashboard_before_width_".concat(W),z=(0,o.useRef)(null),F=(0,o.useState)(P?g:(0,_.U2)(R,g)),X=F[0],V=F[1],q=(0,o.useState)(!1),G=q[0],J=q[1],K=(0,o.useState)(Z?Math.max((0,_.U2)(U,k),13*O.iI):null),L=K[0],Q=K[1],Y=(0,o.useState)(!1),$=Y[0],ee=Y[1],te=(0,o.useState)(null)[1],re=m.ZP.projects.list({},{revalidateOnFocus:!1}).data,ne=null===re||void 0===re?void 0:re.projects,ie={label:function(){var e;return null===ne||void 0===ne||null===(e=ne[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},oe=[];C?(r&&oe.push(ie),oe.push.apply(oe,(0,i.Z)(C))):(null===ne||void 0===ne?void 0:ne.length)>=1&&oe.push.apply(oe,[ie,{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||G||$||null===te||void 0===te||te(z.current.getBoundingClientRect().width)}),[G,X,$,L,z,te,D]),(0,o.useEffect)((function(){G||(0,_.t8)(R,X)}),[h,G,X,R]),(0,o.useEffect)((function(){$||(0,_.t8)(U,L)}),[$,L,U]);var ue=(0,j.Z)(g);return(0,o.useEffect)((function(){P&&ue!==g&&V(g)}),[P,g,ue]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:I}),(0,f.jsx)(c.Z,{breadcrumbs:oe,menuItems:S,project:null===ne||void 0===ne?void 0:ne[0],version:null===ne||void 0===ne||null===(t=ne[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===N||void 0===N?void 0:N.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:N,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:n,afterHeightOffset:w.Mz,afterHidden:h,afterMousedownActive:G,afterWidth:X,before:Z,beforeHeightOffset:w.Mz,beforeMousedownActive:$,beforeWidth:d.k1+(Z?L:0),headerOffset:T,hideAfterCompletely:!0,leftOffset:Z?d.k1:null,mainContainerHeader:A,mainContainerRef:z,setAfterMousedownActive:J,setAfterWidth:V,setBeforeMousedownActive:ee,setBeforeWidth:Q,children:[H&&(0,f.jsx)(p,{children:H}),E]})})]}),M&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,f.jsx)(s.Z,y(y({},M),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}},23478:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),s=r(2485),l=r(1210),a=r(41788),c=r(27337),d=r(18908),f=r(59e3),h=r(28598);function p(){var e=(0,u.useState)(!1),t=e[0],r=e[1],n=(0,u.useState)(null),i=n[0],o=n[1],a=(0,u.useState)(null),p=a[0],v=a[1],b=(0,f.iV)();(0,u.useEffect)((function(){var e=b.new,t=b.object_type,n=b.pipeline_uuid;t&&o(t),n&&v(n),r(!!e)}),[b]);var m=(0,u.useMemo)((function(){var e=[t?"New":"Browse"];return i&&e.push(i),p&&e.push(p),e}),[t,i,p]),j=(0,u.useMemo)((function(){return d.R===i}),[i]);return(0,h.jsx)(l.Z,{addProjectBreadcrumbToCustomBreadcrumbs:t,breadcrumbs:t?[{label:function(){return"Templates"},linkProps:{href:j?"/templates?object_type=".concat(d.R):"/templates"}},{bold:!0,label:function(){return"New"}}]:null,title:"Templates",uuid:"Templates/index",children:(0,h.jsx)(s.Z,{defaultTab:j?c.A2:null,objectType:i,pipelineUUID:p,showAddingNewTemplates:t},m.join("_"))})}p.getInitialProps=(0,n.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,a.Z)(p)},87710:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates",function(){return r(23478)}])}},function(e){e.O(0,[844,9902,426,1774,8792,8789,4259,9055,1424,1005,7815,3654,8952,7722,4822,1484,2485,9774,2888,179],(function(){return t=87710,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|