mage-ai 0.8.47__py3-none-any.whl → 0.8.49__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/api/resources/DataProviderResource.py +13 -1
- mage_ai/data_preparation/git/__init__.py +1 -1
- mage_ai/data_preparation/models/block/__init__.py +5 -0
- mage_ai/data_preparation/models/block/sql/__init__.py +68 -8
- mage_ai/data_preparation/models/block/sql/clickhouse.py +38 -0
- mage_ai/data_preparation/models/block/utils.py +4 -2
- mage_ai/data_preparation/models/file.py +4 -3
- mage_ai/data_preparation/models/pipeline.py +36 -3
- mage_ai/data_preparation/templates/repo/io_config.yaml +12 -0
- mage_ai/io/base.py +1 -0
- mage_ai/io/clickhouse.py +237 -0
- mage_ai/io/config.py +19 -0
- mage_ai/io/io_config.py +1 -0
- mage_ai/io/snowflake.py +0 -1
- mage_ai/io/sql.py +4 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/404.html.html +2 -2
- mage_ai/server/frontend_dist/_next/static/I2bRLK9B7Lap2LvCicTKv/_buildManifest.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{2249-50d2156ae3ce5933.js → 2249-59feb0a0585ef7c1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2407-35c362852abff411.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/2524-ecbe3dd70d06cbe4.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{3014-26ba07eb6a78e31c.js → 3014-a01e16bc067500ad.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{4506-ce5fa63b65f6fa5f.js → 4506-a3c53b0033972626.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4741-5fbecd08232ba3f9.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5477-793cd2120261d023.js → 5477-b439f211b6146a11.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/5716-c5952e5ca9c8e139.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/{5872-103815a4a043489b.js → 5872-1767c45ee6690ae5.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{5896-f84e336fb8877027.js → 5896-10a676bcc86978cc.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{6166-5fc2768ef661e7da.js → 6166-97cb3cc7d00d645c.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{6532-b0fd357eb359c127.js → 6532-5f86e9e1f32adf3a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{7400-acab00d6265bd4dc.js → 7400-033fb12e7c46f62e.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/{9832-c8b8970bb522f302.js → 9832-f97919376d52e3bf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-96c89b2a2689f80c.js → manage-8a7b2b707c7038fb.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-294eccc0163c80a1.js → pipeline-runs-832218136947bf56.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-c48a45cea6df6192.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-dd637dcb042ff771.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-5541c3e13297ddbc.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-0e6935a2b7f8e1ed.js → logs-caa9fade2bc783b9.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-0e02bcdfcd533830.js → block-runs-1b44f28966826dbe.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runtime-baf8bb6da01976db.js → block-runtime-44029312dc580504.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-d42158676a75b451.js → monitors-9b46466e066d6372.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-4049561456ea2314.js → [run]-5f78885afc7758df.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-bebeee2854c734fc.js → runs-43f2c1658cd3d03d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-b95afd173fb265df.js → settings-8fb53eb8dd0267e1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-e46a9b03e0fff91a.js → syncs-c92351b1a81f7a13.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-6a95567766a1d00e.js → [...slug]-ca76f5938bdff8a7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-c259bd9d385404fa.js → triggers-4e9518882c8730b1.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-0900be641ce4e6ec.js → pipelines-c46347f0308ab09a.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{preferences-25735fdf80f95015.js → preferences-45c40fb24c8a5139.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-abfaa2b15eef72a0.js → sync-data-6e80afa0c9b90cdf.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-5d0c51213b9bba8e.js → users-12a90f932ff4fc9d.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-24eb5df948cc9a7e.js → terminal-cc54b4d4e5295101.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-bd801bde63db7c9e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-6ff85ea842bde8c2.js → triggers-08774e473ea4a96b.js} +1 -1
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +3 -3
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/utils/output_display.py +1 -3
- mage_ai/server/websocket_server.py +0 -1
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/METADATA +4 -1
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/RECORD +92 -90
- mage_ai/server/frontend_dist/_next/static/chunks/2083-78a438dbdc57d1e4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/2524-6aeb9419acf5d1b4.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4538-8a3c3e47be976ede.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/4741-acfe40cf3b06659e.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-e512333242e02c60.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-774dd41941497640.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c6179a9e737009c9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/test-85cf18ae78ff535c.js +0 -1
- mage_ai/server/frontend_dist/_next/static/xTScbs8HLliQCDHzVPx5E/_buildManifest.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{xTScbs8HLliQCDHzVPx5E → I2bRLK9B7Lap2LvCicTKv}/_middlewareManifest.js +0 -0
- /mage_ai/server/frontend_dist/_next/static/{xTScbs8HLliQCDHzVPx5E → I2bRLK9B7Lap2LvCicTKv}/_ssgManifest.js +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/LICENSE +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/WHEEL +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.8.47.dist-info → mage_ai-0.8.49.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(g(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return l}});var r=t(9518),i=t(23831),o=t(3055),l=34*t(49125).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),l=t(47999),c=t(1210),s=t(34744),u=t(28358),a=t(67971),d=t(87372),p=t(86673),f=t(82531),h=t(9518),m=t(23831),g=t(73942),v=t(49125),j=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],g.n_,3*v.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||m.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),x=t(3055),b=t(95354),y=t(24141),Z=t(28598);function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n=e.after,t=e.afterHidden,r=e.afterWidth,h=e.before,m=e.beforeWidth,g=e.breadcrumbs,_=e.buildSidekick,P=e.children,w=e.errors,S=e.headline,k=e.pageName,I=e.pipeline,C=e.setErrors,E=e.subheader,D=e.subheaderBackground,T=e.subheaderBackgroundImage,M=e.subheaderButton,N=e.subheaderText,A=e.title,R=e.uuid,U=(0,y.i)().height,F=I.uuid,H=f.ZP.pipelines.detail(F,{includes_outputs:!1},{revalidateOnFocus:!1}).data,z=null===H||void 0===H?void 0:H.pipeline,W=(0,o.useMemo)((function(){return n||(_?_({height:U,heightOffset:x.Mz,pipeline:z}):null)}),[n,_,U,z]),q=r||(W?50*v.iI:null),L=(0,o.useMemo)((function(){var e=[];return z&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),g?(e.push({label:function(){return z.uuid},linkProps:{as:"/pipelines/".concat(F,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(g)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return z.name}})),e}),[g,z,F]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(c.Z,{after:W,afterHidden:t,afterWidth:q,before:h,beforeWidth:m,breadcrumbs:L,navigationItems:(0,b.H)(k,z),subheaderChildren:"undefined"!==typeof E&&E,title:z?A?A(z):z.name:null,uuid:R,children:[(M||N)&&(0,Z.jsx)(p.Z,{mb:v.Mq,mt:v.cd,mx:v.cd,children:(0,Z.jsx)(j,{background:D,backgroundImage:T,children:(0,Z.jsxs)(a.Z,{alignItems:"center",children:[M,N&&(0,Z.jsx)(p.Z,{ml:3}),N]})})}),S&&(0,Z.jsx)(p.Z,{p:v.cd,children:(0,Z.jsxs)(p.Z,{mt:v.cd,px:v.cd,children:[(0,Z.jsx)(d.Z,{level:5,children:S}),(0,Z.jsx)(s.Z,{light:!0,mt:v.cd,short:!0})]})}),P]}),w&&(0,Z.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===C||void 0===C?void 0:C(null)},children:(0,Z.jsx)(u.Z,O(O({},w),{},{onClose:function(){return null===C||void 0===C?void 0:C(null)}}))})]})}},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return b},Z:function(){return y}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(86532),u=t(86673),a=t(19711),d=t(58180),p=t(49125),f=t(19395),h=t(28598),m=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j={uuid:"Run details"},x={uuid:"Dependency tree"},b=[x,j];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,y=e.selectedTab,Z=e.setSelectedTab,_=v({},(0,o.Z)(e,m));g?_.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):_.noStatus=!0;var O=(null===g||void 0===g?void 0:g.variables)||{};null!==g&&void 0!==g&&g.event_variables&&(O.event=g.event_variables);var P=[];O&&JSON.stringify(O,null,2).split("\n").forEach((function(e){P.push(" ".concat(e))}));var w=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,h.jsx)(c.Z,{language:"json",small:!0,source:P.join("\n")})]],S=g&&(0,h.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:w.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:i})]})),uuid:"LogDetail"})}),k=y&&Z;return(0,h.jsxs)(h.Fragment,{children:[k&&(0,h.jsx)(u.Z,{py:p.cd,children:(0,h.jsx)(l.Z,{onClickTab:Z,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:b})}),(!k||x.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(s.Z,v(v({},_),{},{height:n,heightOffset:(t||0)+(k?76:0),pipeline:i})),j.uuid===(null===y||void 0===y?void 0:y.uuid)&&S]})}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(9518),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},54183:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ie}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),g=t(51099),v=t(60547),j=t(97496),x=t(47409),b=t(93348),y=t(55378),Z=t(86673),_=t(58180),O=t(19711),P=t(46261),w=t(82531),S=t(56681),k=t(2850),I=t(10503),C=t(49125),E=t(59920),D=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var T=[{label:function(){return"AWS"},uuid:r.AWS}],M=(0,D.HK)(T,(function(e){return e.uuid})),N=t(66050),A=t(58122),R=t(19395),U=t(33766),F=t(7715),H=t(9736),z=t(96510),W=t(66653),q=t(59e3),L=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 X(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,l.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 B=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,o=e.variables,l=(0,d.useRouter)(),c=(0,H.Ct)(),s=(0,u.useState)(null),D=s[0],T=s[1],V=(t||{}).uuid,B=r||{},J=B.id,G=B.event_matchers,K=B.name,Y=B.schedule_interval,Q=B.schedule_type,$=B.settings,ee=B.sla,ne=B.start_time,te=B.status,re=B.variables,ie=void 0===re?{}:re,oe=(0,q.iV)(),le={_limit:30,_offset:30*(null!==oe&&void 0!==oe&&oe.page?oe.page:0)};null!==oe&&void 0!==oe&&oe.status&&(le.status=oe.status);var ce=w.ZP.pipeline_runs.pipeline_schedules.list(J,le,{refreshInterval:3e3,revalidateOnFocus:!0}),se=ce.data,ue=ce.mutate,ae=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.pipeline_runs)||[]}),[se]),de=(0,u.useMemo)((function(){var e;return(null===se||void 0===se||null===(e=se.metadata)||void 0===e?void 0:e.count)||[]}),[se]),pe=(0,u.useState)(null),fe=pe[0],he=pe[1],me=(0,u.useMemo)((function(){var e=null!==oe&&void 0!==oe&&oe.page?oe.page:0;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(j.Z,{fetchPipelineRuns:ue,onClickRow:function(e){return he((function(n){var t=ae[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ae,selectedRun:fe}),(0,L.jsx)(Z.Z,{p:2,children:(0,L.jsx)(g.Z,{page:Number(e),maxPages:9,onUpdate:function(e){var n=Number(e),t=X(X({},oe),{},{page:n>=0?n:0});l.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(V,"/triggers/").concat(J,"?").concat((0,q.uM)(t)))},totalPages:Math.ceil(de/30)})})]})}),[ue,t,ae,fe]),ge=(0,u.useState)(S.G[0]),ve=ge[0],je=ge[1],xe=(0,a.Db)((function(e){return w.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,F.gR)(e,["id"])})}),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(){n()},onErrorCallback:function(e,n){return T({errors:n,response:e})}})}}),be=(0,i.Z)(xe,2),ye=be[0],Ze=be[1].isLoading,_e=(0,u.useMemo)((function(){return b.fq.ACTIVE===te}),[te]),Oe=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*C.iI},r=[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.VW,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:null===(e=b.Z4[Q])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.rs,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,L.jsx)(O.ZP,{danger:!_e,monospace:!0,success:_e,children:te},"trigger_status")]];if(ee){var i=(0,R.gU)(ee),o=i.time,l=i.unit,c=1===o?l:"".concat(l,"s");r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.kI,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:"".concat(o," ").concat(c)},"trigger_sla")])}(Y&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.Pf,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:Y.replace("@","")},"trigger_frequency")]),ne&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.aw,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:ne},"trigger_start_date")]),null!==$&&void 0!==$&&$.skip_if_previous_running)&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(P.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*C.iI,widthFitContent:!0}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,L.jsx)(O.ZP,{monospace:!0,children:null===(n=$.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==$&&void 0!==$&&$.allow_blocks_to_fail&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(P.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*C.iI,widthFitContent:!0}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,L.jsx)(O.ZP,{monospace:!0,children:$.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:r})}),[_e,Y,$,ee,ne,Q]),Pe=(0,u.useMemo)((function(){return ie||{}}),[ie]),we=(0,u.useMemo)((function(){var e,n=[];return(0,F.Qr)(Pe)?n=(0,A.wx)(o,(function(e){return"global"===e.uuid})):Object.entries(Pe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];n.push({uuid:r,value:(0,A.FS)(o)})})),"undefined"!==typeof(n=(0,A.JZ)(n||[],Q))&&null!==(e=n)&&void 0!==e&&e.length?(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,L.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Q,ie,o]),Se=(0,u.useMemo)((function(){return(0,L.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===G||void 0===G?void 0:G.map((function(e,n){var t=e.event_type,r=e.name;return[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:M[t].label()},"".concat(t,"_").concat(n,"_label")),(0,L.jsx)(O.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[G]);return(0,L.jsxs)(v.Z,{afterHidden:!fe,before:(0,L.jsxs)(k.M,{children:[(0,L.jsxs)(Z.Z,{mb:C.HN,pt:C.cd,px:C.cd,children:[(0,L.jsxs)(Z.Z,{mb:C.cd,children:[b.Xm.TIME===Q&&(0,L.jsx)(I.kO,{size:5*C.iI}),b.Xm.EVENT===Q&&(0,L.jsx)(I.Jp,{size:5*C.iI}),!Q&&(0,L.jsx)(I.VW,{size:5*C.iI})]}),(0,L.jsx)(m.Z,{children:K})]}),(0,L.jsx)(Z.Z,{px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,mt:1,short:!0}),Oe,(null===G||void 0===G?void 0:G.length)>=1&&(0,L.jsxs)(Z.Z,{my:C.HN,children:[(0,L.jsx)(Z.Z,{px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Events"})}),(0,L.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se]}),we&&(0,L.jsxs)(Z.Z,{my:C.HN,children:[(0,L.jsx)(Z.Z,{px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,L.jsx)(f.Z,{light:!0,mt:1,short:!0}),we]})]}),beforeWidth:k.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(V,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return K},linkProps:{as:"/pipelines/".concat(V,"/triggers/").concat(J),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,S.Z)(X(X({},e),{},{selectedRun:fe,selectedTab:ve,setSelectedTab:je}))},errors:D,pageName:E.M.TRIGGERS,pipeline:t,setErrors:T,subheader:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(p.Z,{beforeIcon:_e?(0,L.jsx)(I.dz,{size:2*C.iI}):(0,L.jsx)(I.Py,{inverted:!c,size:2*C.iI}),danger:_e&&!c,loading:Ze,onClick:function(e){(0,W.j)(e),ye({id:J,status:_e?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!_e&&!c,children:_e?"Pause trigger":"Start trigger"}),(0,L.jsx)(Z.Z,{mr:C.cd}),!c&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(V,"/triggers/").concat(J,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,L.jsx)(Z.Z,{mr:C.cd})]}),(0,L.jsxs)(y.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?l.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(V,"/triggers/").concat(J)):(0,U.u7)({page:0,status:e.target.value})},paddingRight:4*C.iI,placeholder:"Select run status",value:(null===oe||void 0===oe?void 0:oe.status)||"all",children:[(0,L.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(N.V).map((function(e){return(0,L.jsx)("option",{value:e,children:x.D[e]},e)}))]})]}),title:function(){return K},uuid:"triggers/detail",children:[(0,L.jsx)(Z.Z,{mt:C.cd,px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,L.jsx)(f.Z,{light:!0,mt:C.cd,short:!0}),me]})},J=t(21831),G=t(21764),K=t(2713),Y=t(38341),Q=t(47999),$=t(22673),ee=t(65730),ne=t(93461),te=t(10919),re=t(26304),ie=t(9518),oe=t(23831),le=t(2005),ce=t(31012),se=["children","large","lineHeight","ordered"];function ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var de=(0,ie.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||oe.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||oe.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||oe.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(le.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(le.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ce.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ce.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ce.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),pe=ie.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],de),fe=ie.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],de),he=ie.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*C.iI,"px;\n ")}));var me=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,re.Z)(e,se),l=i?fe:pe;return(0,L.jsx)(l,ae(ae({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){return(0,L.jsx)(he,ae(ae({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),e.props.key)}))}))},ge=t(98781),ve=t(82944),je=t(70902),xe=t(18025);function be(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 ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?be(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:b.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:b.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:b.Xm.API}];return e?n.slice(0,1):n};var _e=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,o=e.variables,c=(0,d.useRouter)(),s=null===t||void 0===t?void 0:t.uuid,g=null===r||void 0===r?void 0:r.id,j=(null===t||void 0===t?void 0:t.type)===ge.qL.STREAMING,x=(0,u.useState)(null),P=x[0],S=x[1],k=(0,u.useState)([]),M=k[0],N=k[1],U=(0,u.useState)(!1),H=U[0],W=U[1],q=(0,u.useState)(!1),V=q[0],X=q[1],B=(0,u.useState)(),re=B[0],ie=B[1],oe=(0,u.useState)({}),le=oe[0],ce=oe[1],se=(0,u.useState)(r),ue=se[0],ae=se[1],de=(0,u.useState)(!1),pe=de[0],fe=de[1],he=(0,u.useState)(null),be=he[0],_e=he[1],Oe=(0,u.useMemo)((function(){return(0,A.wx)(o,(function(e){return"global"===e.uuid}))}),[o]),Pe=ue||{},we=Pe.name,Se=Pe.schedule_interval,ke=Pe.schedule_type,Ie=Pe.settings,Ce=void 0===Ie?{}:Ie,Ee=Pe.sla,De=Pe.start_time,Te=(Pe.token,Pe.variables),Me=void 0===Te?{}:Te;(0,u.useEffect)((function(){Ce&&ie(Ce)}),[Ce]);var Ne=(0,u.useState)(null),Ae=Ne[0],Re=Ne[1],Ue=(0,u.useState)({hour:"00",minute:"00"}),Fe=Ue[0],He=Ue[1],ze=w.ZP.event_rules.detail("aws").data,We=(0,u.useMemo)((function(){var e;return(null===ze||void 0===ze||null===(e=ze.event_rule)||void 0===e?void 0:e.rules)||[]}),[ze]),qe=(0,u.useMemo)((function(){return(0,D.HK)(We,(function(e){return e.name}))}),[We]),Le=(0,a.Db)(w.ZP.pipeline_schedules.useUpdate(g),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(){n(),c.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(s,"/triggers/").concat(g))},onErrorCallback:function(e,n){return S({errors:n,response:e})}})}}),Ve=(0,i.Z)(Le,2),Xe=Ve[0],Be=Ve[1].isLoading,Je=(0,u.useMemo)((function(){return Me||{}}),[Me]);(0,u.useEffect)((function(){if(De){var e=De.split(" ")[1];Re((0,R.eI)(De)),He({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;Re(n),He({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[De]),(0,u.useEffect)((function(){Je&&Object.keys(Je).length>0&&W(!0)}),[Je]),(0,u.useEffect)((function(){ce(H?null===Oe||void 0===Oe?void 0:Oe.reduce((function(e,n){var t=n.uuid,r=n.value;return ye(ye({},e),{},(0,l.Z)({},t,Je[t]||r))}),{}):null)}),[Oe,H]),(0,u.useEffect)((function(){if(r&&(N(r.event_matchers),Ke?(ae(ye(ye({},r),{},{schedule_interval:"custom"})),_e(Se)):ae(j?ye(ye({},r),{},{schedule_interval:b.U5.ONCE}):r),r.sla)){X(!0);var e=(0,R.gU)(Ee),n=e.time,t=e.unit;ae((function(e){return ye(ye({},e),{},{slaAmount:n,slaUnit:t})}))}}),[r]);var Ge=(0,u.useCallback)((function(){var e=ye(ye({},(0,F.GL)(ue,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,A.e7)(le)});if(b.Xm.EVENT===ue.schedule_type?e.event_matchers=M:(e.schedule_interval=Ke?be:ue.schedule_interval,e.start_time=Ae&&null!==Fe&&void 0!==Fe&&Fe.hour&&null!==Fe&&void 0!==Fe&&Fe.minute?"".concat(Ae.toISOString().split("T")[0]," ").concat(null===Fe||void 0===Fe?void 0:Fe.hour,":").concat(null===Fe||void 0===Fe?void 0:Fe.minute,":00"):null),V){var n=null===ue||void 0===ue?void 0:ue.slaAmount,t=null===ue||void 0===ue?void 0:ue.slaUnit;if(!n||isNaN(n)||!t)return void G.Am.error("Please enter a valid SLA",{position:G.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,R.vJ)(n,t)}else null!==r&&void 0!==r&&r.sla&&(e.sla=0);e.settings=re,Xe({pipeline_schedule:e})}),[be,Ae,V,M,r,le,ue,re,Fe,Xe]),Ke=(0,u.useMemo)((function(){return Se&&!Object.values(b.U5).includes(Se)}),[Se]),Ye=(0,u.useMemo)((function(){var e=[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.KJ,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_detail")],[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.Pf,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsxs)(y.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;ae((function(e){return ye(ye({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Se,children:[!Se&&(0,L.jsx)("option",{value:""}),Object.values(b.U5).map((function(e){return(0,L.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,L.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,L.jsx)(Z.Z,{mt:1,p:1,children:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,L.jsx)(O.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")],[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.aw,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,L.jsxs)("div",{style:{minHeight:"".concat(5.75*C.iI,"px")},children:[!pe&&(0,L.jsx)(ve.Z,{monospace:!0,onClick:function(){return fe((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ae?"".concat(Ae.toISOString().split("T")[0]," ").concat(null===Fe||void 0===Fe?void 0:Fe.hour,":").concat(null===Fe||void 0===Fe?void 0:Fe.minute):""}),(0,L.jsx)("div",{style:{width:"400px"},children:(0,L.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return fe(!1)},open:pe,style:{position:"relative"},children:(0,L.jsx)(K.Z,{selectedDate:Ae,selectedTime:Fe,setSelectedDate:Re,setSelectedTime:He,topPosition:!0})})})]},"start_time_input")]];return j&&e.splice(1,1),Ke&&e.splice(2,0,[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.EK,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,L.jsxs)("div",{children:[(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),_e(e.target.value)},placeholder:"* * * * *",value:be}),(0,L.jsxs)(Z.Z,{mt:1,p:1,children:[(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,L.jsx)(O.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,L.jsx)(te.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Z.Z,{mb:2,px:C.cd,children:(0,L.jsx)(m.Z,{children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:e})]})}),[be,Ae,Ke,j,we,Se,pe,Fe]),Qe=(0,u.useCallback)((function(e,n){N((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,J.Z)(t)}))}),[N]),$e=(0,u.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Z.Z,{mb:C.cd,px:C.cd,children:(0,L.jsx)(m.Z,{children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.KJ,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_event")]]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Events"}),(0,L.jsxs)(O.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,L.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,L.jsxs)(Z.Z,{mt:C.Mq,children:[(0,L.jsx)(O.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,L.jsxs)(O.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,L.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,L.jsx)(te.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,L.jsx)(Z.Z,{mt:1,children:(0,L.jsxs)(me,{monospace:!0,ordered:!0,children:[(0,L.jsx)(O.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,L.jsx)(O.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,L.jsx)(O.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(null===M||void 0===M?void 0:M.length)>=1&&(0,L.jsx)(_.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===M||void 0===M?void 0:M.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,L.jsxs)(y.Z,{monospace:!0,onChange:function(e){return Qe(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:[!t&&(0,L.jsx)("option",{value:""}),T.map((function(e){var n=e.label,t=e.uuid;return(0,L.jsx)("option",{value:t,children:n()},t)}))]},"event-provider-".concat(o)),(0,L.jsxs)(y.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=qe[r])||void 0===t?void 0:t.event_pattern;Qe(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:[!r&&(0,L.jsx)("option",{value:""}),We.map((function(e){var n=e.name;return(0,L.jsx)("option",{value:n,children:n},n)}))]},"event-name-".concat(o)),i&&(0,L.jsx)($.Z,{language:"json",small:!0,source:l.join("\n")}),(0,L.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return N((function(e){return(0,D.oM)(e,n)}))},children:(0,L.jsx)(I.rF,{default:!0,size:2*C.iI})},"remove_event")]}))}),(0,L.jsx)(Z.Z,{p:C.cd,children:(0,L.jsx)(p.Z,{beforeIcon:(0,L.jsx)(I.mm,{size:2*C.iI}),onClick:function(){return N((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[M,We,we]),en=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===r||void 0===r?void 0:r.id,"/pipeline_runs"),null!==r&&void 0!==r&&r.token&&(n="".concat(n,"/").concat(r.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Z.Z,{mb:C.cd,px:C.cd,children:(0,L.jsx)(m.Z,{children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.KJ,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_api")]]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Endpoint"}),(0,L.jsxs)(O.ZP,{muted:!0,children:["Make a ",(0,L.jsx)(O.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,L.jsx)(Z.Z,{mt:C.Mq,children:(0,L.jsx)(ee.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Payload"}),(0,L.jsx)(O.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,L.jsx)(Z.Z,{mt:C.Mq,children:(0,L.jsx)(ee.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,L.jsx)($.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Sample cURL command"}),(0,L.jsx)(Z.Z,{mt:C.Mq,children:(0,L.jsx)($.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[we,r,"object"]),nn=!ke||b.Xm.TIME===ke&&!(j&&Ae||!j&&Ae&&Se)||b.Xm.EVENT===ke&&(!(null!==M&&void 0!==M&&M.length)||!M.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),tn=(0,u.useMemo)((function(){return(0,L.jsxs)(Z.Z,{p:C.cd,children:[!(0,F.Qr)(Oe)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Z.Z,{mr:2,children:(0,L.jsx)(je.Z,{checked:H,onCheck:W})}),(0,L.jsx)(O.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),H&&le&&Object.entries(le).length>0&&(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(le).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),(0,L.jsx)(ve.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ce((function(n){return ye(ye({},n),{},(0,l.Z)({},t,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:r},"variable_uuid_input_".concat(t))]}))})})]}),(0,L.jsxs)(Z.Z,{mt:2,children:[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Z.Z,{mr:2,children:(0,L.jsx)(je.Z,{checked:V,onCheck:function(e){X(e),e||ae((function(e){return ye(ye({},e),{},{slaAmount:0})}))}})}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),V&&(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.aw,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,L.jsxs)(h.Z,{children:[(0,L.jsx)(ne.Z,{flex:1,children:(0,L.jsx)(ve.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===ue||void 0===ue?void 0:ue.slaAmount})}),(0,L.jsx)(ne.Z,{flex:1,children:(0,L.jsx)(y.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===ue||void 0===ue?void 0:ue.slaUnit,children:Object.keys(R.tL).map((function(e){return(0,L.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})}),(0,L.jsxs)(Z.Z,{mt:2,children:[(0,L.jsx)(m.Z,{level:5,monospace:!0,children:"Additional settings"}),b.Xm.TIME===ke&&(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Y.Z,{checked:null===re||void 0===re?void 0:re.skip_if_previous_running,onClick:function(){return ie((function(e){return ye(ye({},e),{},{skip_if_previous_running:!(null!==re&&void 0!==re&&re.skip_if_previous_running)})}))}}),(0,L.jsx)(Z.Z,{ml:2}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:"Skip run if previous run still in progress"})]})}),(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Y.Z,{checked:null===re||void 0===re?void 0:re.allow_blocks_to_fail,onClick:function(){return ie((function(e){return ye(ye({},e),{},{allow_blocks_to_fail:!(null!==re&&void 0!==re&&re.allow_blocks_to_fail)})}))}}),(0,L.jsx)(Z.Z,{ml:2}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:"Keep running pipeline even if blocks fail"})]})})]})]})]})}),[V,Oe,H,le,ue,X,W,re]);return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(v.Z,{after:tn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(s,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===r||void 0===r?void 0:r.name},linkProps:{as:"/pipelines/".concat(s,"/triggers/").concat(g),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:P,pageName:E.M.TRIGGERS,pipeline:t,setErrors:S,subheader:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(p.Z,{disabled:nn,loading:Be,onClick:Ge,outline:!0,primary:!0,children:"Save changes"}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(s,"/triggers/").concat(g)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===r||void 0===r?void 0:r.name)},uuid:"triggers/edit",children:[(0,L.jsxs)(Z.Z,{p:C.cd,children:[(0,L.jsxs)(Z.Z,{mb:2,children:[(0,L.jsx)(m.Z,{children:"Trigger type"}),(0,L.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,L.jsx)(h.Z,{children:Ze(j).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=ke===r,o=ke&&!i;return(0,L.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){b.Xm.EVENT!==r||null!==M&&void 0!==M&&M.length||N([{}]),ae((function(e){return ye(ye({},e),{},{schedule_type:r})}))},children:(0,L.jsx)(xe.U,{selected:i,children:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(ne.Z,{children:(0,L.jsx)("input",{checked:i,type:"radio"})}),(0,L.jsx)(Z.Z,{mr:C.cd}),(0,L.jsxs)(ne.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,L.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,L.jsx)(O.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,L.jsxs)(Z.Z,{mt:5,children:[b.Xm.TIME===ke&&Ye,b.Xm.EVENT===ke&&$e,b.Xm.API===ke&&en]})]})})},Oe=t(41788),Pe=t(70543);function we(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?we(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):we(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ke(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=w.ZP.variables.pipelines.list(t).data,o=null===i||void 0===i?void 0:i.variables,l=w.ZP.pipeline_schedules.detail(n),c=l.data,s=l.mutate,u=null===c||void 0===c?void 0:c.pipeline_schedule,a=w.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=Se(Se({},null===a||void 0===a?void 0:a.pipeline),{},{uuid:t});return Pe.b7===r?(0,L.jsx)(_e,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:o}):(0,L.jsx)(B,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:o})}ke.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ie=(0,Oe.Z)(ke)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(54183)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2524,4495,2344,4506,6166,8180,6214,6532,1286,4741,3688,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(g(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return l}});var r=t(9518),i=t(23831),o=t(3055),l=34*t(49125).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(82394),i=t(21831),o=t(82684),l=t(47999),c=t(1210),s=t(34744),u=t(49894),a=t(67971),d=t(87372),p=t(86673),f=t(82531),h=t(9518),m=t(23831),g=t(73942),v=t(49125),j=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],g.n_,3*v.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||m.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),x=t(3055),b=t(95354),y=t(24141),Z=t(28598);function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var P=function(e){var n=e.after,t=e.afterHidden,r=e.afterWidth,h=e.before,m=e.beforeWidth,g=e.breadcrumbs,_=e.buildSidekick,P=e.children,w=e.errors,S=e.headline,k=e.pageName,I=e.pipeline,C=e.setErrors,E=e.subheader,D=e.subheaderBackground,T=e.subheaderBackgroundImage,M=e.subheaderButton,N=e.subheaderText,A=e.title,R=e.uuid,U=(0,y.i)().height,F=I.uuid,H=f.ZP.pipelines.detail(F,{includes_outputs:!1},{revalidateOnFocus:!1}).data,z=null===H||void 0===H?void 0:H.pipeline,W=(0,o.useMemo)((function(){return n||(_?_({height:U,heightOffset:x.Mz,pipeline:z}):null)}),[n,_,U,z]),q=r||(W?50*v.iI:null),L=(0,o.useMemo)((function(){var e=[];return z&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),g?(e.push({label:function(){return z.uuid},linkProps:{as:"/pipelines/".concat(F,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(g)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return z.name}})),e}),[g,z,F]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(c.Z,{after:W,afterHidden:t,afterWidth:q,before:h,beforeWidth:m,breadcrumbs:L,navigationItems:(0,b.H)(k,z),subheaderChildren:"undefined"!==typeof E&&E,title:z?A?A(z):z.name:null,uuid:R,children:[(M||N)&&(0,Z.jsx)(p.Z,{mb:v.Mq,mt:v.cd,mx:v.cd,children:(0,Z.jsx)(j,{background:D,backgroundImage:T,children:(0,Z.jsxs)(a.Z,{alignItems:"center",children:[M,N&&(0,Z.jsx)(p.Z,{ml:3}),N]})})}),S&&(0,Z.jsx)(p.Z,{p:v.cd,children:(0,Z.jsxs)(p.Z,{mt:v.cd,px:v.cd,children:[(0,Z.jsx)(d.Z,{level:5,children:S}),(0,Z.jsx)(s.Z,{light:!0,mt:v.cd,short:!0})]})}),P]}),w&&(0,Z.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===C||void 0===C?void 0:C(null)},children:(0,Z.jsx)(u.Z,O(O({},w),{},{onClose:function(){return null===C||void 0===C?void 0:C(null)}}))})]})}},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return b},Z:function(){return y}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(86532),u=t(86673),a=t(19711),d=t(58180),p=t(49125),f=t(19395),h=t(28598),m=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j={uuid:"Run details"},x={uuid:"Dependency tree"},b=[x,j];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,y=e.selectedTab,Z=e.setSelectedTab,_=v({},(0,o.Z)(e,m));g?_.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):_.noStatus=!0;var O=(null===g||void 0===g?void 0:g.variables)||{};null!==g&&void 0!==g&&g.event_variables&&(O.event=g.event_variables);var P=[];O&&JSON.stringify(O,null,2).split("\n").forEach((function(e){P.push(" ".concat(e))}));var w=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,h.jsx)(c.Z,{language:"json",small:!0,source:P.join("\n")})]],S=g&&(0,h.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:w.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:i})]})),uuid:"LogDetail"})}),k=y&&Z;return(0,h.jsxs)(h.Fragment,{children:[k&&(0,h.jsx)(u.Z,{py:p.cd,children:(0,h.jsx)(l.Z,{onClickTab:Z,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:b})}),(!k||x.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(s.Z,v(v({},_),{},{height:n,heightOffset:(t||0)+(k?76:0),pipeline:i})),j.uuid===(null===y||void 0===y?void 0:y.uuid)&&S]})}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(9518),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},54183:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ie}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),g=t(51099),v=t(60547),j=t(97496),x=t(47409),b=t(93348),y=t(55378),Z=t(86673),_=t(58180),O=t(19711),P=t(46261),w=t(82531),S=t(56681),k=t(2850),I=t(10503),C=t(49125),E=t(59920),D=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var T=[{label:function(){return"AWS"},uuid:r.AWS}],M=(0,D.HK)(T,(function(e){return e.uuid})),N=t(66050),A=t(58122),R=t(19395),U=t(33766),F=t(7715),H=t(9736),z=t(96510),W=t(66653),q=t(59e3),L=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 X(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,l.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 B=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,o=e.variables,l=(0,d.useRouter)(),c=(0,H.Ct)(),s=(0,u.useState)(null),D=s[0],T=s[1],V=(t||{}).uuid,B=r||{},J=B.id,G=B.event_matchers,K=B.name,Y=B.schedule_interval,Q=B.schedule_type,$=B.settings,ee=B.sla,ne=B.start_time,te=B.status,re=B.variables,ie=void 0===re?{}:re,oe=(0,q.iV)(),le={_limit:30,_offset:30*(null!==oe&&void 0!==oe&&oe.page?oe.page:0)};null!==oe&&void 0!==oe&&oe.status&&(le.status=oe.status);var ce=w.ZP.pipeline_runs.pipeline_schedules.list(J,le,{refreshInterval:3e3,revalidateOnFocus:!0}),se=ce.data,ue=ce.mutate,ae=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.pipeline_runs)||[]}),[se]),de=(0,u.useMemo)((function(){var e;return(null===se||void 0===se||null===(e=se.metadata)||void 0===e?void 0:e.count)||[]}),[se]),pe=(0,u.useState)(null),fe=pe[0],he=pe[1],me=(0,u.useMemo)((function(){var e=null!==oe&&void 0!==oe&&oe.page?oe.page:0;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(j.Z,{fetchPipelineRuns:ue,onClickRow:function(e){return he((function(n){var t=ae[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ae,selectedRun:fe}),(0,L.jsx)(Z.Z,{p:2,children:(0,L.jsx)(g.Z,{page:Number(e),maxPages:9,onUpdate:function(e){var n=Number(e),t=X(X({},oe),{},{page:n>=0?n:0});l.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(V,"/triggers/").concat(J,"?").concat((0,q.uM)(t)))},totalPages:Math.ceil(de/30)})})]})}),[ue,t,ae,fe]),ge=(0,u.useState)(S.G[0]),ve=ge[0],je=ge[1],xe=(0,a.Db)((function(e){return w.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,F.gR)(e,["id"])})}),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(){n()},onErrorCallback:function(e,n){return T({errors:n,response:e})}})}}),be=(0,i.Z)(xe,2),ye=be[0],Ze=be[1].isLoading,_e=(0,u.useMemo)((function(){return b.fq.ACTIVE===te}),[te]),Oe=(0,u.useMemo)((function(){var e,n,t={default:!0,size:1.5*C.iI},r=[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.VW,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:null===(e=b.Z4[Q])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.rs,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,L.jsx)(O.ZP,{danger:!_e,monospace:!0,success:_e,children:te},"trigger_status")]];if(ee){var i=(0,R.gU)(ee),o=i.time,l=i.unit,c=1===o?l:"".concat(l,"s");r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.kI,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:"".concat(o," ").concat(c)},"trigger_sla")])}(Y&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.Pf,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:Y.replace("@","")},"trigger_frequency")]),ne&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.aw,X({},t)),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,L.jsx)(O.ZP,{monospace:!0,children:ne},"trigger_start_date")]),null!==$&&void 0!==$&&$.skip_if_previous_running)&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(P.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:1.5*C.iI,widthFitContent:!0}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,L.jsx)(O.ZP,{monospace:!0,children:null===(n=$.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);return null!==$&&void 0!==$&&$.allow_blocks_to_fail&&r.push([(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(P.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:1.5*C.iI,widthFitContent:!0}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,L.jsx)(O.ZP,{monospace:!0,children:$.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:r})}),[_e,Y,$,ee,ne,Q]),Pe=(0,u.useMemo)((function(){return ie||{}}),[ie]),we=(0,u.useMemo)((function(){var e,n=[];return(0,F.Qr)(Pe)?n=(0,A.wx)(o,(function(e){return"global"===e.uuid})):Object.entries(Pe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];n.push({uuid:r,value:(0,A.FS)(o)})})),"undefined"!==typeof(n=(0,A.JZ)(n||[],Q))&&null!==(e=n)&&void 0!==e&&e.length?(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,L.jsx)(O.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Q,ie,o]),Se=(0,u.useMemo)((function(){return(0,L.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===G||void 0===G?void 0:G.map((function(e,n){var t=e.event_type,r=e.name;return[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:M[t].label()},"".concat(t,"_").concat(n,"_label")),(0,L.jsx)(O.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[G]);return(0,L.jsxs)(v.Z,{afterHidden:!fe,before:(0,L.jsxs)(k.M,{children:[(0,L.jsxs)(Z.Z,{mb:C.HN,pt:C.cd,px:C.cd,children:[(0,L.jsxs)(Z.Z,{mb:C.cd,children:[b.Xm.TIME===Q&&(0,L.jsx)(I.kO,{size:5*C.iI}),b.Xm.EVENT===Q&&(0,L.jsx)(I.Jp,{size:5*C.iI}),!Q&&(0,L.jsx)(I.VW,{size:5*C.iI})]}),(0,L.jsx)(m.Z,{children:K})]}),(0,L.jsx)(Z.Z,{px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,mt:1,short:!0}),Oe,(null===G||void 0===G?void 0:G.length)>=1&&(0,L.jsxs)(Z.Z,{my:C.HN,children:[(0,L.jsx)(Z.Z,{px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Events"})}),(0,L.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se]}),we&&(0,L.jsxs)(Z.Z,{my:C.HN,children:[(0,L.jsx)(Z.Z,{px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,L.jsx)(f.Z,{light:!0,mt:1,short:!0}),we]})]}),beforeWidth:k.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(V,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return K},linkProps:{as:"/pipelines/".concat(V,"/triggers/").concat(J),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,S.Z)(X(X({},e),{},{selectedRun:fe,selectedTab:ve,setSelectedTab:je}))},errors:D,pageName:E.M.TRIGGERS,pipeline:t,setErrors:T,subheader:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(p.Z,{beforeIcon:_e?(0,L.jsx)(I.dz,{size:2*C.iI}):(0,L.jsx)(I.Py,{inverted:!c,size:2*C.iI}),danger:_e&&!c,loading:Ze,onClick:function(e){(0,W.j)(e),ye({id:J,status:_e?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!_e&&!c,children:_e?"Pause trigger":"Start trigger"}),(0,L.jsx)(Z.Z,{mr:C.cd}),!c&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(V,"/triggers/").concat(J,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,L.jsx)(Z.Z,{mr:C.cd})]}),(0,L.jsxs)(y.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?l.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(V,"/triggers/").concat(J)):(0,U.u7)({page:0,status:e.target.value})},paddingRight:4*C.iI,placeholder:"Select run status",value:(null===oe||void 0===oe?void 0:oe.status)||"all",children:[(0,L.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(N.V).map((function(e){return(0,L.jsx)("option",{value:e,children:x.D[e]},e)}))]})]}),title:function(){return K},uuid:"triggers/detail",children:[(0,L.jsx)(Z.Z,{mt:C.cd,px:C.cd,children:(0,L.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,L.jsx)(f.Z,{light:!0,mt:C.cd,short:!0}),me]})},J=t(21831),G=t(21764),K=t(2713),Y=t(38341),Q=t(47999),$=t(22673),ee=t(65730),ne=t(93461),te=t(10919),re=t(26304),ie=t(9518),oe=t(23831),le=t(2005),ce=t(31012),se=["children","large","lineHeight","ordered"];function ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var de=(0,ie.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||oe.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||oe.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||oe.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(le.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(le.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ce.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ce.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ce.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),pe=ie.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],de),fe=ie.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],de),he=ie.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*C.iI,"px;\n ")}));var me=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,re.Z)(e,se),l=i?fe:pe;return(0,L.jsx)(l,ae(ae({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){return(0,L.jsx)(he,ae(ae({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),e.props.key)}))}))},ge=t(98781),ve=t(82944),je=t(70902),xe=t(18025);function be(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 ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?be(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:b.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:b.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:b.Xm.API}];return e?n.slice(0,1):n};var _e=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,o=e.variables,c=(0,d.useRouter)(),s=null===t||void 0===t?void 0:t.uuid,g=null===r||void 0===r?void 0:r.id,j=(null===t||void 0===t?void 0:t.type)===ge.qL.STREAMING,x=(0,u.useState)(null),P=x[0],S=x[1],k=(0,u.useState)([]),M=k[0],N=k[1],U=(0,u.useState)(!1),H=U[0],W=U[1],q=(0,u.useState)(!1),V=q[0],X=q[1],B=(0,u.useState)(),re=B[0],ie=B[1],oe=(0,u.useState)({}),le=oe[0],ce=oe[1],se=(0,u.useState)(r),ue=se[0],ae=se[1],de=(0,u.useState)(!1),pe=de[0],fe=de[1],he=(0,u.useState)(null),be=he[0],_e=he[1],Oe=(0,u.useMemo)((function(){return(0,A.wx)(o,(function(e){return"global"===e.uuid}))}),[o]),Pe=ue||{},we=Pe.name,Se=Pe.schedule_interval,ke=Pe.schedule_type,Ie=Pe.settings,Ce=void 0===Ie?{}:Ie,Ee=Pe.sla,De=Pe.start_time,Te=(Pe.token,Pe.variables),Me=void 0===Te?{}:Te;(0,u.useEffect)((function(){Ce&&ie(Ce)}),[Ce]);var Ne=(0,u.useState)(null),Ae=Ne[0],Re=Ne[1],Ue=(0,u.useState)({hour:"00",minute:"00"}),Fe=Ue[0],He=Ue[1],ze=w.ZP.event_rules.detail("aws").data,We=(0,u.useMemo)((function(){var e;return(null===ze||void 0===ze||null===(e=ze.event_rule)||void 0===e?void 0:e.rules)||[]}),[ze]),qe=(0,u.useMemo)((function(){return(0,D.HK)(We,(function(e){return e.name}))}),[We]),Le=(0,a.Db)(w.ZP.pipeline_schedules.useUpdate(g),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(){n(),c.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(s,"/triggers/").concat(g))},onErrorCallback:function(e,n){return S({errors:n,response:e})}})}}),Ve=(0,i.Z)(Le,2),Xe=Ve[0],Be=Ve[1].isLoading,Je=(0,u.useMemo)((function(){return Me||{}}),[Me]);(0,u.useEffect)((function(){if(De){var e=De.split(" ")[1];Re((0,R.eI)(De)),He({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;Re(n),He({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[De]),(0,u.useEffect)((function(){Je&&Object.keys(Je).length>0&&W(!0)}),[Je]),(0,u.useEffect)((function(){ce(H?null===Oe||void 0===Oe?void 0:Oe.reduce((function(e,n){var t=n.uuid,r=n.value;return ye(ye({},e),{},(0,l.Z)({},t,Je[t]||r))}),{}):null)}),[Oe,H]),(0,u.useEffect)((function(){if(r&&(N(r.event_matchers),Ke?(ae(ye(ye({},r),{},{schedule_interval:"custom"})),_e(Se)):ae(j?ye(ye({},r),{},{schedule_interval:b.U5.ONCE}):r),r.sla)){X(!0);var e=(0,R.gU)(Ee),n=e.time,t=e.unit;ae((function(e){return ye(ye({},e),{},{slaAmount:n,slaUnit:t})}))}}),[r]);var Ge=(0,u.useCallback)((function(){var e=ye(ye({},(0,F.GL)(ue,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,A.e7)(le)});if(b.Xm.EVENT===ue.schedule_type?e.event_matchers=M:(e.schedule_interval=Ke?be:ue.schedule_interval,e.start_time=Ae&&null!==Fe&&void 0!==Fe&&Fe.hour&&null!==Fe&&void 0!==Fe&&Fe.minute?"".concat(Ae.toISOString().split("T")[0]," ").concat(null===Fe||void 0===Fe?void 0:Fe.hour,":").concat(null===Fe||void 0===Fe?void 0:Fe.minute,":00"):null),V){var n=null===ue||void 0===ue?void 0:ue.slaAmount,t=null===ue||void 0===ue?void 0:ue.slaUnit;if(!n||isNaN(n)||!t)return void G.Am.error("Please enter a valid SLA",{position:G.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,R.vJ)(n,t)}else null!==r&&void 0!==r&&r.sla&&(e.sla=0);e.settings=re,Xe({pipeline_schedule:e})}),[be,Ae,V,M,r,le,ue,re,Fe,Xe]),Ke=(0,u.useMemo)((function(){return Se&&!Object.values(b.U5).includes(Se)}),[Se]),Ye=(0,u.useMemo)((function(){var e=[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.KJ,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_detail")],[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.Pf,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,L.jsxs)("div",{children:[(0,L.jsxs)(y.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;ae((function(e){return ye(ye({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Se,children:[!Se&&(0,L.jsx)("option",{value:""}),Object.values(b.U5).map((function(e){return(0,L.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,L.jsx)("option",{value:"custom",children:"custom"},"custom")]}),(0,L.jsx)(Z.Z,{mt:1,p:1,children:(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If you don\u2019t see the frequency option you need, select ",(0,L.jsx)(O.ZP,{inline:!0,monospace:!0,small:!0,children:"custom"})," and enter CRON syntax."]})})]},"frequency_input")],[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.aw,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,L.jsxs)("div",{style:{minHeight:"".concat(5.75*C.iI,"px")},children:[!pe&&(0,L.jsx)(ve.Z,{monospace:!0,onClick:function(){return fe((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Ae?"".concat(Ae.toISOString().split("T")[0]," ").concat(null===Fe||void 0===Fe?void 0:Fe.hour,":").concat(null===Fe||void 0===Fe?void 0:Fe.minute):""}),(0,L.jsx)("div",{style:{width:"400px"},children:(0,L.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return fe(!1)},open:pe,style:{position:"relative"},children:(0,L.jsx)(K.Z,{selectedDate:Ae,selectedTime:Fe,setSelectedDate:Re,setSelectedTime:He,topPosition:!0})})})]},"start_time_input")]];return j&&e.splice(1,1),Ke&&e.splice(2,0,[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.EK,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,L.jsxs)("div",{children:[(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),_e(e.target.value)},placeholder:"* * * * *",value:be}),(0,L.jsxs)(Z.Z,{mt:1,p:1,children:[(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["If you want this pipeline to trigger every 1 minute, the CRON syntax is ",(0,L.jsx)(O.ZP,{inline:!0,monospace:!0,small:!0,children:"*/1 * * * *"}),"."]}),(0,L.jsxs)(O.ZP,{muted:!0,small:!0,children:["For more CRON syntax examples, check out this ",(0,L.jsx)(te.Z,{href:"https://crontab.guru/",openNewWindow:!0,small:!0,children:"resource"}),"."]})]})]},"cron_expression_input")]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Z.Z,{mb:2,px:C.cd,children:(0,L.jsx)(m.Z,{children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:e})]})}),[be,Ae,Ke,j,we,Se,pe,Fe]),Qe=(0,u.useCallback)((function(e,n){N((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,J.Z)(t)}))}),[N]),$e=(0,u.useMemo)((function(){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Z.Z,{mb:C.cd,px:C.cd,children:(0,L.jsx)(m.Z,{children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.KJ,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_event")]]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Events"}),(0,L.jsxs)(O.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,L.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,L.jsxs)(Z.Z,{mt:C.Mq,children:[(0,L.jsx)(O.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,L.jsxs)(O.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,L.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,L.jsx)(te.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,L.jsx)(Z.Z,{mt:1,children:(0,L.jsxs)(me,{monospace:!0,ordered:!0,children:[(0,L.jsx)(O.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,L.jsx)(O.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,L.jsx)(O.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(null===M||void 0===M?void 0:M.length)>=1&&(0,L.jsx)(_.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===M||void 0===M?void 0:M.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,L.jsxs)(y.Z,{monospace:!0,onChange:function(e){return Qe(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:[!t&&(0,L.jsx)("option",{value:""}),T.map((function(e){var n=e.label,t=e.uuid;return(0,L.jsx)("option",{value:t,children:n()},t)}))]},"event-provider-".concat(o)),(0,L.jsxs)(y.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=qe[r])||void 0===t?void 0:t.event_pattern;Qe(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:[!r&&(0,L.jsx)("option",{value:""}),We.map((function(e){var n=e.name;return(0,L.jsx)("option",{value:n,children:n},n)}))]},"event-name-".concat(o)),i&&(0,L.jsx)($.Z,{language:"json",small:!0,source:l.join("\n")}),(0,L.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return N((function(e){return(0,D.oM)(e,n)}))},children:(0,L.jsx)(I.rF,{default:!0,size:2*C.iI})},"remove_event")]}))}),(0,L.jsx)(Z.Z,{p:C.cd,children:(0,L.jsx)(p.Z,{beforeIcon:(0,L.jsx)(I.mm,{size:2*C.iI}),onClick:function(){return N((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[M,We,we]),en=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===r||void 0===r?void 0:r.id,"/pipeline_runs"),null!==r&&void 0!==r&&r.token&&(n="".concat(n,"/").concat(r.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Z.Z,{mb:C.cd,px:C.cd,children:(0,L.jsx)(m.Z,{children:"Settings"})}),(0,L.jsx)(f.Z,{light:!0,short:!0}),(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.KJ,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,L.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_api")]]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Endpoint"}),(0,L.jsxs)(O.ZP,{muted:!0,children:["Make a ",(0,L.jsx)(O.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,L.jsx)(Z.Z,{mt:C.Mq,children:(0,L.jsx)(ee.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Payload"}),(0,L.jsx)(O.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,L.jsx)(Z.Z,{mt:C.Mq,children:(0,L.jsx)(ee.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,L.jsx)($.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,L.jsxs)(Z.Z,{mb:2,mt:5,px:C.cd,children:[(0,L.jsx)(m.Z,{children:"Sample cURL command"}),(0,L.jsx)(Z.Z,{mt:C.Mq,children:(0,L.jsx)($.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[we,r,"object"]),nn=!ke||b.Xm.TIME===ke&&!(j&&Ae||!j&&Ae&&Se)||b.Xm.EVENT===ke&&(!(null!==M&&void 0!==M&&M.length)||!M.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),tn=(0,u.useMemo)((function(){return(0,L.jsxs)(Z.Z,{p:C.cd,children:[!(0,F.Qr)(Oe)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Z.Z,{mr:2,children:(0,L.jsx)(je.Z,{checked:H,onCheck:W})}),(0,L.jsx)(O.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),H&&le&&Object.entries(le).length>0&&(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsx)(_.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(le).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),(0,L.jsx)(ve.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ce((function(n){return ye(ye({},n),{},(0,l.Z)({},t,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:r},"variable_uuid_input_".concat(t))]}))})})]}),(0,L.jsxs)(Z.Z,{mt:2,children:[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Z.Z,{mr:2,children:(0,L.jsx)(je.Z,{checked:V,onCheck:function(e){X(e),e||ae((function(e){return ye(ye({},e),{},{slaAmount:0})}))}})}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),V&&(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsx)(_.Z,{columnFlex:[null,1],rows:[[(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(I.aw,{default:!0,size:1.5*C.iI}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(O.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,L.jsxs)(h.Z,{children:[(0,L.jsx)(ne.Z,{flex:1,children:(0,L.jsx)(ve.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===ue||void 0===ue?void 0:ue.slaAmount})}),(0,L.jsx)(ne.Z,{flex:1,children:(0,L.jsx)(y.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===ue||void 0===ue?void 0:ue.slaUnit,children:Object.keys(R.tL).map((function(e){return(0,L.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})}),(0,L.jsxs)(Z.Z,{mt:2,children:[(0,L.jsx)(m.Z,{level:5,monospace:!0,children:"Additional settings"}),b.Xm.TIME===ke&&(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Y.Z,{checked:null===re||void 0===re?void 0:re.skip_if_previous_running,onClick:function(){return ie((function(e){return ye(ye({},e),{},{skip_if_previous_running:!(null!==re&&void 0!==re&&re.skip_if_previous_running)})}))}}),(0,L.jsx)(Z.Z,{ml:2}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:"Skip run if previous run still in progress"})]})}),(0,L.jsx)(Z.Z,{mt:2,children:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(Y.Z,{checked:null===re||void 0===re?void 0:re.allow_blocks_to_fail,onClick:function(){return ie((function(e){return ye(ye({},e),{},{allow_blocks_to_fail:!(null!==re&&void 0!==re&&re.allow_blocks_to_fail)})}))}}),(0,L.jsx)(Z.Z,{ml:2}),(0,L.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:"Keep running pipeline even if blocks fail"})]})})]})]})]})}),[V,Oe,H,le,ue,X,W,re]);return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(v.Z,{after:tn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(s,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===r||void 0===r?void 0:r.name},linkProps:{as:"/pipelines/".concat(s,"/triggers/").concat(g),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:P,pageName:E.M.TRIGGERS,pipeline:t,setErrors:S,subheader:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(p.Z,{disabled:nn,loading:Be,onClick:Ge,outline:!0,primary:!0,children:"Save changes"}),(0,L.jsx)(Z.Z,{mr:1}),(0,L.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(s,"/triggers/").concat(g)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===r||void 0===r?void 0:r.name)},uuid:"triggers/edit",children:[(0,L.jsxs)(Z.Z,{p:C.cd,children:[(0,L.jsxs)(Z.Z,{mb:2,children:[(0,L.jsx)(m.Z,{children:"Trigger type"}),(0,L.jsx)(O.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,L.jsx)(h.Z,{children:Ze(j).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=ke===r,o=ke&&!i;return(0,L.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){b.Xm.EVENT!==r||null!==M&&void 0!==M&&M.length||N([{}]),ae((function(e){return ye(ye({},e),{},{schedule_type:r})}))},children:(0,L.jsx)(xe.U,{selected:i,children:(0,L.jsxs)(h.Z,{alignItems:"center",children:[(0,L.jsx)(ne.Z,{children:(0,L.jsx)("input",{checked:i,type:"radio"})}),(0,L.jsx)(Z.Z,{mr:C.cd}),(0,L.jsxs)(ne.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,L.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,L.jsx)(O.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,L.jsxs)(Z.Z,{mt:5,children:[b.Xm.TIME===ke&&Ye,b.Xm.EVENT===ke&&$e,b.Xm.API===ke&&en]})]})})},Oe=t(41788),Pe=t(70543);function we(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?we(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):we(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ke(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=w.ZP.variables.pipelines.list(t).data,o=null===i||void 0===i?void 0:i.variables,l=w.ZP.pipeline_schedules.detail(n),c=l.data,s=l.mutate,u=null===c||void 0===c?void 0:c.pipeline_schedule,a=w.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=Se(Se({},null===a||void 0===a?void 0:a.pipeline),{},{uuid:t});return Pe.b7===r?(0,L.jsx)(_e,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:o}):(0,L.jsx)(B,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:o})}ke.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ie=(0,Oe.Z)(ke)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(54183)}])}},function(e){e.O(0,[3850,5716,5896,4804,1774,5872,2524,4495,2344,4506,6166,8180,6214,6532,1286,4741,3688,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{60547:function(e,n,r){"use strict";r.d(n,{Z:function(){return k}});var t=r(82394),i=r(21831),o=r(82684),c=r(47999),u=r(1210),a=r(34744),l=r(28358),s=r(67971),d=r(87372),p=r(86673),f=r(82531),h=r(9518),b=r(23831),g=r(73942),v=r(49125),m=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],g.n_,3*v.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||b.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),x=r(3055),j=r(95354),y=r(24141),O=r(28598);function w(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Z(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?w(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var k=function(e){var n=e.after,r=e.afterHidden,t=e.afterWidth,h=e.before,b=e.beforeWidth,g=e.breadcrumbs,w=e.buildSidekick,k=e.children,P=e.errors,S=e.headline,_=e.pageName,C=e.pipeline,I=e.setErrors,D=e.subheader,E=e.subheaderBackground,N=e.subheaderBackgroundImage,H=e.subheaderButton,T=e.subheaderText,M=e.title,W=e.uuid,F=(0,y.i)().height,Y=C.uuid,B=f.ZP.pipelines.detail(Y,{includes_outputs:!1},{revalidateOnFocus:!1}).data,V=null===B||void 0===B?void 0:B.pipeline,A=(0,o.useMemo)((function(){return n||(w?w({height:F,heightOffset:x.Mz,pipeline:V}):null)}),[n,w,F,V]),R=t||(A?50*v.iI:null),J=(0,o.useMemo)((function(){var e=[];return V&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),g?(e.push({label:function(){return V.uuid},linkProps:{as:"/pipelines/".concat(Y,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(g)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return V.name}})),e}),[g,V,Y]);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(u.Z,{after:A,afterHidden:r,afterWidth:R,before:h,beforeWidth:b,breadcrumbs:J,navigationItems:(0,j.H)(_,V),subheaderChildren:"undefined"!==typeof D&&D,title:V?M?M(V):V.name:null,uuid:W,children:[(H||T)&&(0,O.jsx)(p.Z,{mb:v.Mq,mt:v.cd,mx:v.cd,children:(0,O.jsx)(m,{background:E,backgroundImage:N,children:(0,O.jsxs)(s.Z,{alignItems:"center",children:[H,T&&(0,O.jsx)(p.Z,{ml:3}),T]})})}),S&&(0,O.jsx)(p.Z,{p:v.cd,children:(0,O.jsxs)(p.Z,{mt:v.cd,px:v.cd,children:[(0,O.jsx)(d.Z,{level:5,children:S}),(0,O.jsx)(a.Z,{light:!0,mt:v.cd,short:!0})]})}),k]}),P&&(0,O.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===I||void 0===I?void 0:I(null)},children:(0,O.jsx)(l.Z,Z(Z({},P),{},{onClose:function(){return null===I||void 0===I?void 0:I(null)}}))})]})}},58122:function(e,n,r){"use strict";r.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return g},e7:function(){return v},v0:function(){return p},wx:function(){return b}});var t=r(75582),i=r(82394),o=r(43313),c=r(93348),u=r(1286),a=r(90211),l=r(84779);function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function p(e){var n=e.statistics,r=Object.keys(n),t=Array(o.Dy.length).fill(0);return 0===r.length?null:(r.forEach((function(e){if(o.Dy.includes(e)){var r=o.CC[e],i=n[e],c=i,u=!1,a=[2,3],s=o.Ub[e],d=o.oH[e],p=o.OD[e];if(o.y_.includes(e))u=!0,a=[2,1,2];else if(e in o.Sq){i=(0,l.Jw)(i,0);var f=o.Sq[e];c=n[f]}var h={columnFlexNumbers:a,name:r,progress:u,rate:c,successDirection:d,warning:p};o.y_.includes(e)||(h.value=i),t[s]=h}})),t)}function f(e){var n=e.columnTypes,r=void 0===n?{}:n,t=e.statistics,i=Object.keys(t);if(0===i.length)return null;var c=Object.values(r),l=c.length,s=[];s.push({name:"Column count",successDirection:o.oH.column_count,value:(0,a.x6)(l)}),i.forEach((function(e){if(o.Zu.includes(e)){var n=o.CC[e],r=t[e],i=o.OD[e];s.push({name:n,successDirection:o.oH[e],value:(0,a.x6)(r),warning:i})}}));var d=(0,u.QO)(c),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return s.push({name:"Categorical Features",rate:p/l,value:(0,a.x6)(p)},{name:"Numerical Features",rate:h/l,value:(0,a.x6)(h)},{name:"Datetime Features",rate:f/l,value:(0,a.x6)(f)}),s}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function b(e,n){var r,t;return null===e||void 0===e||null===(r=e.find((function(e){var r=e.block;return n(r)})))||void 0===r||null===(t=r.variables)||void 0===t?void 0:t.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function g(e,n){return n===c.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===c.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function v(e){return e?Object.entries(e).reduce((function(e,n){var r=(0,t.Z)(n,2),o=r[0],c=r[1],u=c;try{u=JSON.parse(c)}catch(a){}return d(d({},e),{},(0,i.Z)({},o,u))}),{}):e}},29237:function(e,n,r){"use strict";var t=r(9518),i=r(67971),o=r(86673),c=r(19711),u=r(23831),a=r(73942),l=r(37391),s=r(49125),d=r(28598),p=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," ",""],a.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.dark&&"\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=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],a.n_,a.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),b=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.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*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),g=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],a.M8,a.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,r=e.children,t=e.containerRef,u=e.contentContainerRef,a=e.dark,l=e.footer,s=e.fullHeight,p=void 0===s||s,v=e.fullWidth,m=void 0===v||v,x=e.header,j=e.headerHeight,y=e.headerIcon,O=e.headerPaddingVertical,w=e.headerTitle,Z=e.maxHeight,k=e.maxWidth,P=e.minWidth,S=e.noPadding,_=e.overflowVisible,C=e.subtitle;return(0,d.jsxs)(f,{borderless:n,dark:a,fullHeight:p,fullWidth:m,maxHeight:Z,maxWidth:k,minWidth:P,overflowVisible:_,ref:t,children:[(x||w)&&(0,d.jsxs)(h,{headerPaddingVertical:O,height:j,children:[x&&x,w&&(0,d.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.Z,{alignItems:"center",children:[y&&y,(0,d.jsx)(o.Z,{ml:y?1:0,children:(0,d.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,d.jsxs)(b,{maxHeight:Z,noPadding:S,overflowVisible:_,ref:u,children:[C&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(c.ZP,{default:!0,children:C})}),r]}),l&&(0,d.jsx)(g,{children:l})]})}},38435:function(e,n,r){"use strict";var t=r(82394),i=r(26304),o=r(82684),c=r(9518),u=r(69898),a=r(28598),l=["rows"];function s(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?s(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var p=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],u.p),f=function(e,n){var r=e.rows,t=void 0===r?3:r,o=(0,i.Z)(e,l);return(0,a.jsx)(u.Z,d(d({},o),{},{input:(0,a.jsx)(p,d({rows:t},o)),ref:n}))};n.Z=o.forwardRef(f)},70902:function(e,n,r){"use strict";var t=r(82394),i=r(26304),o=r(82684),c=r(9518),u=r(69898),a=r(23831),l=r(28598),s=["checked","disabled","onCheck"];function d(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function p(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?d(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],u.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?a.Z.monotone.white:a.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(a.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(a.Z.monotone.white,";\n }\n ")})),h=function(e,n){var r=e.checked,t=e.disabled,o=e.onCheck,c=(0,i.Z)(e,s);return(0,l.jsx)(u.Z,p(p({},c),{},{disabled:t,input:(0,l.jsxs)(f,p(p({},c),{},{disabled:t,noBackground:!0,noBorder:!0,children:[(0,l.jsx)("input",{checked:r,type:"checkbox"}),(0,l.jsx)("span",{onClick:t?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},6087:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return ue}});var t=r(77837),i=r(82394),o=r(75582),c=r(38860),u=r.n(c),a=r(12691),l=r.n(a),s=r(82684),d=r(83455),p=r(34376),f=r(60328),h=r(86532),b=r(34744),g=r(67971),v=r(87372),m=r(11135),x=r(10919),j=r(60547),y=r(93348),O=r(41788),w=r(29237),Z=r(86673),k=r(58180),P=r(19711),S=r(38435),_=r(82944),C=r(70902),I=r(23831),D=r(9518),E=r(73942),N=r(49125),H=D.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*N.iI,2*N.iI,E.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||I.Z).borders.light,";\n background-color: ").concat((e.theme||I.Z).background.popup,";\n ")})),T=r(90211),M=r(58122),W=r(28598);function F(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?F(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var B="".concat(N.iI,"px ").concat(3*N.iI,"px");var V=function(e){var n=e.initialPipelineSchedulePayload,r=e.onCancel,t=e.onSuccess,c=e.variables,u=(0,s.useState)(!1),a=u[0],l=u[1],d=(0,s.useState)({}),p=d[0],h=d[1],b=(0,s.useState)(c||{}),m=b[0],x=b[1],j=(0,s.useMemo)((function(){return Y(Y({},n),{},{name:(0,T.Y6)(),variables:a?(0,M.e7)(m):null})}),[n,a,m]),y=function(e,n){var r={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),x((function(r){return Y(Y({},r),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,W.jsx)(S.Z,Y(Y({},r),{},{rows:1,value:n})):(0,W.jsx)(_.Z,Y({},r))};return(0,s.useEffect)((function(){var e=Object.entries(m).reduce((function(e,n){var r=(0,o.Z)(n,2),t=r[0],c=r[1],u=(0,T.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return Y(Y({},e),{},(0,i.Z)({},t,u))}),{});h(e)}),[]),(0,W.jsxs)(w.Z,{footer:(0,W.jsxs)(g.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,W.jsx)(f.Z,{onClick:function(){t({pipeline_schedule:j}),r()},padding:B,primaryAlternate:!0,children:"Run now"}),(0,W.jsx)(Z.Z,{mr:1}),(0,W.jsx)(f.Z,{borderColor:I.Z.background.page,onClick:r,padding:B,secondary:!0,children:"Cancel"})]}),header:(0,W.jsx)(v.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*N.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,W.jsx)(H,{children:(0,W.jsxs)(g.Z,{alignItems:"center",children:[(0,W.jsx)(Z.Z,{mr:2,children:(0,W.jsx)(C.Z,{checked:a,onCheck:l})}),(0,W.jsx)(P.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),a&&m&&Object.entries(m).length>0&&(0,W.jsx)(Z.Z,{mt:2,children:(0,W.jsx)(k.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(m).map((function(e){var n=(0,o.Z)(e,2),r=n[0],t=n[1];return[(0,W.jsx)(P.ZP,{default:!0,monospace:!0,children:r},"variable_".concat(r)),y(r,t)]}))})})]})},A=r(37391),R=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],I.Z.borders.medium,N.tr),J=D.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],A.w5),z=D.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],I.Z.background.output,E.n_,N.iI,N.tr),X=r(73899);var q=function(e){var n=e.hasOverride,r=e.scheduleType,t=e.variables,i=e.variablesOverride,c=[];return Object.entries(t).forEach((function(e){var n=(0,o.Z)(e,2),r=n[0],t=n[1],u=null===i||void 0===i?void 0:i[r];c.push({uuid:r,value:(0,M.FS)(u||t)})})),(0,M.JZ)(c,r),(0,W.jsxs)(R,{children:[(0,W.jsx)(Z.Z,{mb:2,children:(0,W.jsxs)(P.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,W.jsx)(J,{noScrollbarTrackBackground:!0,children:t&&c.map((function(e){var n=e.uuid,r=e.value;return(0,W.jsxs)(z,{children:[(0,W.jsx)(P.ZP,{monospace:!0,small:!0,children:n}),(0,W.jsx)(P.ZP,{color:X.Or,monospace:!0,small:!0,children:(0,M.FS)(r)})]})}))})]})},G=r(46261),Q=r(97225),L=r(82531),U=r(10503),$=r(59920),K=r(42305),ee=r(7715),ne=r(9736),re=r(96510),te=r(83608);function ie(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function oe(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(r),!0).forEach((function(n){(0,i.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function ce(e){var n=e.pipeline,r=(0,p.useRouter)(),t=(0,ne.Ct)(),c=n.uuid,u=(0,s.useState)(null),a=u[0],O=u[1],w=L.ZP.variables.pipelines.list(c).data,k=null===w||void 0===w?void 0:w.variables,S=L.ZP.pipeline_schedules.pipelines.list(c,{},{refreshInterval:7500}),_=S.data,C=S.mutate,I=(0,s.useMemo)((function(){return(null===_||void 0===_?void 0:_.pipeline_schedules)||[]}),[_]),D=function(e){return(0,d.Db)(L.ZP.pipeline_schedules.pipelines.useCreate(c),{onSuccess:function(n){return(0,re.wD)(n,{callback:function(n){var r=n.pipeline_schedule.id;null===e||void 0===e||e(r)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}})},E=D((function(e){return r.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),H=(0,o.Z)(E,2),F=H[0],Y=H[1].isLoading,B=D(C),A=(0,o.Z)(B,2),R=A[0],J=A[1].isLoading,z=(0,s.useMemo)((function(){var e;return null===(e=(0,M.wx)(k,(function(e){return"global"===e.uuid})))||void 0===e?void 0:e.reduce((function(e,n){var r=n.uuid,t=n.value;return oe(oe({},e),{},(0,i.Z)({},r,t))}),{})}),[k]),X={name:(0,T.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,K.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},ie=(0,te.dd)((function(){return(0,W.jsx)(V,{initialPipelineSchedulePayload:X,onCancel:ae,onSuccess:R,variables:z})}),{},[k,z],{background:!0,uuid:"run_pipeline_now_popup"}),ce=(0,o.Z)(ie,2),ue=ce[0],ae=ce[1],le=(0,s.useState)(),se=le[0],de=le[1],pe=(0,s.useMemo)((function(){var e=null===se||void 0===se?void 0:se.variables,n=!(0,ee.Qr)(e),r=n?null===se||void 0===se?void 0:se.variables:(0,ee.Qr)(z)?null:z;return function(i){var o=i.height-(r?151:0);return(0,W.jsxs)(W.Fragment,{children:[r&&(0,W.jsx)(q,{hasOverride:n,scheduleType:null===se||void 0===se?void 0:se.schedule_type,variables:z,variablesOverride:e}),!r&&(0,W.jsxs)(Z.Z,{p:N.cd,children:[(0,W.jsx)(P.ZP,{children:"This pipeline has no runtime variables."}),!t&&(0,W.jsxs)(Z.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)(P.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,W.jsx)(h.Z,oe(oe({},i),{},{height:o,noStatus:!0}))]})}}),[k,se]);return(0,W.jsxs)(j.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:pe,errors:a,pageName:$.M.TRIGGERS,pipeline:n,setErrors:O,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,W.jsx)(m.ZP,{beforeElement:(0,W.jsx)(U.mm,{size:2.5*N.iI}),blackBorder:!0,inline:!0,loading:Y,noHoverUnderline:!0,onClick:function(){return F({pipeline_schedule:{name:(0,T.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,W.jsx)(P.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($.M.TRIGGERS,"_").concat(c),children:[(0,W.jsx)(Z.Z,{mt:N.cd,px:N.cd,children:(0,W.jsxs)(g.Z,{justifyContent:"space-between",children:[(0,W.jsx)(v.Z,{level:5,children:"Pipeline triggers"}),(0,W.jsx)(G.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)(U.JM,{inverted:!0,size:2*N.iI}),disabled:t,loading:J,onClick:(0,ee.Qr)(z)?function(){return R({pipeline_schedule:X})}:ue,outline:!0,success:!t,children:"Run pipeline now"})})]})}),(0,W.jsx)(b.Z,{light:!0,mt:N.cd,short:!0}),(0,W.jsx)(Q.Z,{fetchPipelineSchedules:C,pipeline:n,pipelineSchedules:I,selectedSchedule:se,setErrors:O,setSelectedSchedule:de})]})}ce.getInitialProps=function(){var e=(0,t.Z)(u().mark((function e(n){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:r}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ue=(0,O.Z)(ce)},42305:function(e,n,r){"use strict";r.d(n,{A5:function(){return p},AY:function(){return f},BP:function(){return d},JX:function(){return s},OC:function(){return o},Pc:function(){return h},Tz:function(){return l},d$:function(){return a},lJ:function(){return b},n1:function(){return u}});var t=r(92083),i=r.n(t),o="YYYY-MM-DD HH:mm:ss",c="YYYY-MM-DD HH:mm",u="YYYY-MM-DD";function a(e,n){var r=n.dayAgo,t=n.includeSeconds,u=n.utcFormat,a=i()(e),l=c;return u&&(a=a.utc()),r&&(a=a.subtract(1,"days")),t&&(l=o),a.format(l)}function l(e){var n=a((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?o:c)}function d(e,n,r){return i()(e).utc().hours(+n).minutes(+r).format()}function p(e){return i()(e).unix()}function f(e,n,r){return"".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(r)}function h(e){var n=i().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function b(e){return e.padStart(2,"0")}},40183:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return r(6087)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2344,4506,6166,8180,6214,6532,1286,3014,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],{60547:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(1210),a=t(34744),l=t(49894),s=t(67971),d=t(87372),p=t(86673),f=t(82531),h=t(9518),b=t(23831),g=t(73942),v=t(49125),m=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],g.n_,3*v.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||b.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),x=t(3055),j=t(95354),y=t(24141),O=t(28598);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 k=function(e){var n=e.after,t=e.afterHidden,r=e.afterWidth,h=e.before,b=e.beforeWidth,g=e.breadcrumbs,w=e.buildSidekick,k=e.children,P=e.errors,S=e.headline,_=e.pageName,C=e.pipeline,I=e.setErrors,D=e.subheader,E=e.subheaderBackground,N=e.subheaderBackgroundImage,H=e.subheaderButton,T=e.subheaderText,M=e.title,W=e.uuid,F=(0,y.i)().height,Y=C.uuid,B=f.ZP.pipelines.detail(Y,{includes_outputs:!1},{revalidateOnFocus:!1}).data,V=null===B||void 0===B?void 0:B.pipeline,A=(0,o.useMemo)((function(){return n||(w?w({height:F,heightOffset:x.Mz,pipeline:V}):null)}),[n,w,F,V]),R=r||(A?50*v.iI:null),J=(0,o.useMemo)((function(){var e=[];return V&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),g?(e.push({label:function(){return V.uuid},linkProps:{as:"/pipelines/".concat(Y,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(g)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return V.name}})),e}),[g,V,Y]);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(u.Z,{after:A,afterHidden:t,afterWidth:R,before:h,beforeWidth:b,breadcrumbs:J,navigationItems:(0,j.H)(_,V),subheaderChildren:"undefined"!==typeof D&&D,title:V?M?M(V):V.name:null,uuid:W,children:[(H||T)&&(0,O.jsx)(p.Z,{mb:v.Mq,mt:v.cd,mx:v.cd,children:(0,O.jsx)(m,{background:E,backgroundImage:N,children:(0,O.jsxs)(s.Z,{alignItems:"center",children:[H,T&&(0,O.jsx)(p.Z,{ml:3}),T]})})}),S&&(0,O.jsx)(p.Z,{p:v.cd,children:(0,O.jsxs)(p.Z,{mt:v.cd,px:v.cd,children:[(0,O.jsx)(d.Z,{level:5,children:S}),(0,O.jsx)(a.Z,{light:!0,mt:v.cd,short:!0})]})}),k]}),P&&(0,O.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===I||void 0===I?void 0:I(null)},children:(0,O.jsx)(l.Z,Z(Z({},P),{},{onClose:function(){return null===I||void 0===I?void 0:I(null)}}))})]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return g},e7:function(){return v},v0:function(){return p},wx:function(){return b}});var r=t(75582),i=t(82394),o=t(43313),c=t(93348),u=t(1286),a=t(90211),l=t(84779);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function p(e){var n=e.statistics,t=Object.keys(n),r=Array(o.Dy.length).fill(0);return 0===t.length?null:(t.forEach((function(e){if(o.Dy.includes(e)){var t=o.CC[e],i=n[e],c=i,u=!1,a=[2,3],s=o.Ub[e],d=o.oH[e],p=o.OD[e];if(o.y_.includes(e))u=!0,a=[2,1,2];else if(e in o.Sq){i=(0,l.Jw)(i,0);var f=o.Sq[e];c=n[f]}var h={columnFlexNumbers:a,name:t,progress:u,rate:c,successDirection:d,warning:p};o.y_.includes(e)||(h.value=i),r[s]=h}})),r)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,r=e.statistics,i=Object.keys(r);if(0===i.length)return null;var c=Object.values(t),l=c.length,s=[];s.push({name:"Column count",successDirection:o.oH.column_count,value:(0,a.x6)(l)}),i.forEach((function(e){if(o.Zu.includes(e)){var n=o.CC[e],t=r[e],i=o.OD[e];s.push({name:n,successDirection:o.oH[e],value:(0,a.x6)(t),warning:i})}}));var d=(0,u.QO)(c),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return s.push({name:"Categorical Features",rate:p/l,value:(0,a.x6)(p)},{name:"Numerical Features",rate:h/l,value:(0,a.x6)(h)},{name:"Datetime Features",rate:f/l,value:(0,a.x6)(f)}),s}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function b(e,n){var t,r;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(r=t.variables)||void 0===r?void 0:r.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function g(e,n){return n===c.Xm.TIME?e.push({uuid:"execution_date",value:"<run datetime>"}):n===c.Xm.EVENT&&e.push({uuid:"event",value:"<trigger event>"}),e}function v(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(a){}return d(d({},e),{},(0,i.Z)({},o,u))}),{}):e}},29237:function(e,n,t){"use strict";var r=t(9518),i=t(67971),o=t(86673),c=t(19711),u=t(23831),a=t(73942),l=t(37391),s=t(49125),d=t(28598),p=(0,r.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=r.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," ",""],a.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.dark&&"\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;"," "," "," ",""],a.n_,a.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),b=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.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*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;"],a.M8,a.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,a=e.dark,l=e.footer,s=e.fullHeight,p=void 0===s||s,v=e.fullWidth,m=void 0===v||v,x=e.header,j=e.headerHeight,y=e.headerIcon,O=e.headerPaddingVertical,w=e.headerTitle,Z=e.maxHeight,k=e.maxWidth,P=e.minWidth,S=e.noPadding,_=e.overflowVisible,C=e.subtitle;return(0,d.jsxs)(f,{borderless:n,dark:a,fullHeight:p,fullWidth:m,maxHeight:Z,maxWidth:k,minWidth:P,overflowVisible:_,ref:r,children:[(x||w)&&(0,d.jsxs)(h,{headerPaddingVertical:O,height:j,children:[x&&x,w&&(0,d.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(i.Z,{alignItems:"center",children:[y&&y,(0,d.jsx)(o.Z,{ml:y?1:0,children:(0,d.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,d.jsxs)(b,{maxHeight:Z,noPadding:S,overflowVisible:_,ref:u,children:[C&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(c.ZP,{default:!0,children:C})}),t]}),l&&(0,d.jsx)(g,{children:l})]})}},38435:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),a=t(28598),l=["rows"];function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],u.p),f=function(e,n){var t=e.rows,r=void 0===t?3:t,o=(0,i.Z)(e,l);return(0,a.jsx)(u.Z,d(d({},o),{},{input:(0,a.jsx)(p,d({rows:r},o)),ref:n}))};n.Z=o.forwardRef(f)},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),a=t(23831),l=t(28598),s=["checked","disabled","onCheck"];function d(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?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],u.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?a.Z.monotone.white:a.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(a.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(a.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,s);return(0,l.jsx)(u.Z,p(p({},c),{},{disabled:r,input:(0,l.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,l.jsx)("input",{checked:t,type:"checkbox"}),(0,l.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},6087:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ue}});var r=t(77837),i=t(82394),o=t(75582),c=t(38860),u=t.n(c),a=t(12691),l=t.n(a),s=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(86532),b=t(34744),g=t(67971),v=t(87372),m=t(11135),x=t(10919),j=t(60547),y=t(93348),O=t(41788),w=t(29237),Z=t(86673),k=t(58180),P=t(19711),S=t(38435),_=t(82944),C=t(70902),I=t(23831),D=t(9518),E=t(73942),N=t(49125),H=D.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*N.iI,2*N.iI,E.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||I.Z).borders.light,";\n background-color: ").concat((e.theme||I.Z).background.popup,";\n ")})),T=t(90211),M=t(58122),W=t(28598);function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B="".concat(N.iI,"px ").concat(3*N.iI,"px");var V=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,r=e.onSuccess,c=e.variables,u=(0,s.useState)(!1),a=u[0],l=u[1],d=(0,s.useState)({}),p=d[0],h=d[1],b=(0,s.useState)(c||{}),m=b[0],x=b[1],j=(0,s.useMemo)((function(){return Y(Y({},n),{},{name:(0,T.Y6)(),variables:a?(0,M.e7)(m):null})}),[n,a,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 Y(Y({},t),{},(0,i.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,W.jsx)(S.Z,Y(Y({},t),{},{rows:1,value:n})):(0,W.jsx)(_.Z,Y({},t))};return(0,s.useEffect)((function(){var e=Object.entries(m).reduce((function(e,n){var t=(0,o.Z)(n,2),r=t[0],c=t[1],u=(0,T.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return Y(Y({},e),{},(0,i.Z)({},r,u))}),{});h(e)}),[]),(0,W.jsxs)(w.Z,{footer:(0,W.jsxs)(g.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,W.jsx)(f.Z,{onClick:function(){r({pipeline_schedule:j}),t()},padding:B,primaryAlternate:!0,children:"Run now"}),(0,W.jsx)(Z.Z,{mr:1}),(0,W.jsx)(f.Z,{borderColor:I.Z.background.page,onClick:t,padding:B,secondary:!0,children:"Cancel"})]}),header:(0,W.jsx)(v.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*N.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,W.jsx)(H,{children:(0,W.jsxs)(g.Z,{alignItems:"center",children:[(0,W.jsx)(Z.Z,{mr:2,children:(0,W.jsx)(C.Z,{checked:a,onCheck:l})}),(0,W.jsx)(P.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),a&&m&&Object.entries(m).length>0&&(0,W.jsx)(Z.Z,{mt:2,children:(0,W.jsx)(k.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)(P.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),y(t,r)]}))})})]})},A=t(37391),R=D.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],I.Z.borders.medium,N.tr),J=D.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],A.w5),z=D.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],I.Z.background.output,E.n_,N.iI,N.tr),X=t(73899);var q=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],u=null===i||void 0===i?void 0:i[t];c.push({uuid:t,value:(0,M.FS)(u||r)})})),(0,M.JZ)(c,t),(0,W.jsxs)(R,{children:[(0,W.jsx)(Z.Z,{mb:2,children:(0,W.jsxs)(P.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,W.jsx)(J,{noScrollbarTrackBackground:!0,children:r&&c.map((function(e){var n=e.uuid,t=e.value;return(0,W.jsxs)(z,{children:[(0,W.jsx)(P.ZP,{monospace:!0,small:!0,children:n}),(0,W.jsx)(P.ZP,{color:X.Or,monospace:!0,small:!0,children:(0,M.FS)(t)})]})}))})]})},G=t(46261),Q=t(97225),L=t(82531),U=t(10503),$=t(59920),K=t(42305),ee=t(7715),ne=t(9736),te=t(96510),re=t(83608);function ie(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 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,i.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}function ce(e){var n=e.pipeline,t=(0,p.useRouter)(),r=(0,ne.Ct)(),c=n.uuid,u=(0,s.useState)(null),a=u[0],O=u[1],w=L.ZP.variables.pipelines.list(c).data,k=null===w||void 0===w?void 0:w.variables,S=L.ZP.pipeline_schedules.pipelines.list(c,{},{refreshInterval:7500}),_=S.data,C=S.mutate,I=(0,s.useMemo)((function(){return(null===_||void 0===_?void 0:_.pipeline_schedules)||[]}),[_]),D=function(e){return(0,d.Db)(L.ZP.pipeline_schedules.pipelines.useCreate(c),{onSuccess:function(n){return(0,te.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}})},E=D((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),H=(0,o.Z)(E,2),F=H[0],Y=H[1].isLoading,B=D(C),A=(0,o.Z)(B,2),R=A[0],J=A[1].isLoading,z=(0,s.useMemo)((function(){var e;return null===(e=(0,M.wx)(k,(function(e){return"global"===e.uuid})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,r=n.value;return oe(oe({},e),{},(0,i.Z)({},t,r))}),{})}),[k]),X={name:(0,T.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,K.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},ie=(0,re.dd)((function(){return(0,W.jsx)(V,{initialPipelineSchedulePayload:X,onCancel:ae,onSuccess:R,variables:z})}),{},[k,z],{background:!0,uuid:"run_pipeline_now_popup"}),ce=(0,o.Z)(ie,2),ue=ce[0],ae=ce[1],le=(0,s.useState)(),se=le[0],de=le[1],pe=(0,s.useMemo)((function(){var e=null===se||void 0===se?void 0:se.variables,n=!(0,ee.Qr)(e),t=n?null===se||void 0===se?void 0:se.variables:(0,ee.Qr)(z)?null:z;return function(i){var o=i.height-(t?151:0);return(0,W.jsxs)(W.Fragment,{children:[t&&(0,W.jsx)(q,{hasOverride:n,scheduleType:null===se||void 0===se?void 0:se.schedule_type,variables:z,variablesOverride:e}),!t&&(0,W.jsxs)(Z.Z,{p:N.cd,children:[(0,W.jsx)(P.ZP,{children:"This pipeline has no runtime variables."}),!r&&(0,W.jsxs)(Z.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)(P.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,W.jsx)(h.Z,oe(oe({},i),{},{height:o,noStatus:!0}))]})}}),[k,se]);return(0,W.jsxs)(j.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:pe,errors:a,pageName:$.M.TRIGGERS,pipeline:n,setErrors:O,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,W.jsx)(m.ZP,{beforeElement:(0,W.jsx)(U.mm,{size:2.5*N.iI}),blackBorder:!0,inline:!0,loading:Y,noHoverUnderline:!0,onClick:function(){return F({pipeline_schedule:{name:(0,T.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,W.jsx)(P.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($.M.TRIGGERS,"_").concat(c),children:[(0,W.jsx)(Z.Z,{mt:N.cd,px:N.cd,children:(0,W.jsxs)(g.Z,{justifyContent:"space-between",children:[(0,W.jsx)(v.Z,{level:5,children:"Pipeline triggers"}),(0,W.jsx)(G.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)(U.JM,{inverted:!0,size:2*N.iI}),disabled:r,loading:J,onClick:(0,ee.Qr)(z)?function(){return R({pipeline_schedule:X})}:ue,outline:!0,success:!r,children:"Run pipeline now"})})]})}),(0,W.jsx)(b.Z,{light:!0,mt:N.cd,short:!0}),(0,W.jsx)(Q.Z,{fetchPipelineSchedules:C,pipeline:n,pipelineSchedules:I,selectedSchedule:se,setErrors:O,setSelectedSchedule:de})]})}ce.getInitialProps=function(){var e=(0,r.Z)(u().mark((function e(n){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ue=(0,O.Z)(ce)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return p},AY:function(){return f},BP:function(){return d},JX:function(){return s},OC:function(){return o},Pc:function(){return h},Tz:function(){return l},d$:function(){return a},lJ:function(){return b},n1:function(){return u}});var r=t(92083),i=t.n(r),o="YYYY-MM-DD HH:mm:ss",c="YYYY-MM-DD HH:mm",u="YYYY-MM-DD";function a(e,n){var t=n.dayAgo,r=n.includeSeconds,u=n.utcFormat,a=i()(e),l=c;return u&&(a=a.utc()),t&&(a=a.subtract(1,"days")),r&&(l=o),a.format(l)}function l(e){var n=a((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?o:c)}function d(e,n,t){return i()(e).utc().hours(+n).minutes(+t).format()}function p(e){return i()(e).unix()}function f(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function h(e){var n=i().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function b(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,[3850,5716,5896,4804,1774,5872,2344,4506,6166,8180,6214,6532,1286,3014,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(28358),l=t(93461),a=t(57384),d=t(12344),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var h=o.forwardRef(f),b=t(32063),g=t(15270),v=t(82531),m=t(66166),O=t(3055),j=t(49125),x=t(91427),y=t(24141);function P(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?P(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,P=e.afterWidthOverride,k=e.before,w=e.beforeWidth,E=e.breadcrumbs,C=e.children,T=e.errors,S=e.headerMenuItems,A=e.navigationItems,R=e.setErrors,D=e.subheaderChildren,I=e.title,_=e.uuid,N=(0,y.i)().width,M="dashboard_after_width_".concat(_),L="dashboard_before_width_".concat(_),H=(0,o.useRef)(null),B=(0,o.useState)(P?f:(0,x.U2)(M,f)),Y=B[0],V=B[1],U=(0,o.useState)(!1),W=U[0],F=U[1],G=(0,o.useState)(k?Math.max((0,x.U2)(L,w),13*j.iI):null),X=G[0],q=G[1],z=(0,o.useState)(!1),K=z[0],Q=z[1],$=(0,o.useState)(null)[1],J=v.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===J||void 0===J?void 0:J.projects,ne=[];E?ne.push.apply(ne,(0,i.Z)(E)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===H||void 0===H||!H.current||W||K||null===$||void 0===$||$(H.current.getBoundingClientRect().width)}),[W,Y,K,X,H,$,N]),(0,o.useEffect)((function(){W||(0,x.t8)(M,Y)}),[r,W,Y,M]),(0,o.useEffect)((function(){K||(0,x.t8)(L,X)}),[K,X,L]);var te=(0,m.Z)(f);return(0,o.useEffect)((function(){P&&te!==f&&V(f)}),[P,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:I}),(0,p.jsx)(d.Z,{breadcrumbs:ne,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(s.Nk,{children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,p.jsx)(s.lm,{children:(0,p.jsx)(g.Z,{navigationItems:A})}),(0,p.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(b.Z,{after:t,afterHeightOffset:O.Mz,afterHidden:r,afterMousedownActive:W,afterWidth:Y,before:k,beforeHeightOffset:O.Mz,beforeMousedownActive:K,beforeWidth:s.k1+(k?X:0),hideAfterCompletely:!0,leftOffset:k?s.k1:null,mainContainerRef:H,setAfterMousedownActive:F,setAfterWidth:V,setBeforeMousedownActive:Q,setBeforeWidth:q,children:[D&&(0,p.jsx)(h,{children:D}),C]})})]}),T&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===R||void 0===R?void 0:R(null)},children:(0,p.jsx)(u.Z,Z(Z({},T),{},{onClose:function(){return null===R||void 0===R?void 0:R(null)}}))})]})}},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return p},DA:function(){return s},HX:function(){return b},J8:function(){return h},Lq:function(){return a},Qj:function(){return g},Ut:function(){return j},V4:function(){return O},VZ:function(){return f},dO:function(){return d},f2:function(){return m},iZ:function(){return v},t6:function(){return c},tf:function(){return l}});var r,i,o,c,u=t(82394);!function(e){e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(c||(c={}));var l,a,d=(r={},(0,u.Z)(r,c.PYTHON,"PY"),(0,u.Z)(r,c.R,"R"),(0,u.Z)(r,c.SQL,"SQL"),(0,u.Z)(r,c.YAML,"YAML"),r);!function(e){e.CHART="chart",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.TRANSFORMER="transformer"}(l||(l={})),function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(a||(a={}));var s,p=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.TRANSFORMER],f=[l.DATA_EXPORTER,l.DATA_LOADER],h=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],g=[l.CHART,l.SCRATCHPAD,l.SENSOR],v=[l.EXTENSION,l.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(s||(s={}));var m=[l.CUSTOM,l.DATA_EXPORTER,l.TRANSFORMER],O=(i={},(0,u.Z)(i,l.CUSTOM,"Custom"),(0,u.Z)(i,l.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,l.DATA_LOADER,"Data loader"),(0,u.Z)(i,l.EXTENSION,"Extension"),(0,u.Z)(i,l.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,l.SENSOR,"Sensor"),(0,u.Z)(i,l.TRANSFORMER,"Transformer"),i),j=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];o={},(0,u.Z)(o,l.DATA_EXPORTER,"DE"),(0,u.Z)(o,l.DATA_LOADER,"DL"),(0,u.Z)(o,l.SCRATCHPAD,"SP"),(0,u.Z)(o,l.SENSOR,"SR"),(0,u.Z)(o,l.TRANSFORMER,"TF")},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return s},U5:function(){return l},Xm:function(){return o},Z4:function(){return d},fq:function(){return u},kJ:function(){return a}});var r,i,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.API,(function(){return"API"})),(0,c.Z)(r,o.EVENT,(function(){return"event"})),(0,c.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var s=(i={},(0,c.Z)(i,a.CREATED_AT,"Created at"),(0,c.Z)(i,a.NAME,"Name"),(0,c.Z)(i,a.PIPELINE,"Pipeline"),(0,c.Z)(i,a.STATUS,"Status"),(0,c.Z)(i,a.TYPE,"Type"),i)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return l},G7:function(){return d},QK:function(){return u},a_:function(){return s},qL:function(){return o},r0:function(){return a}});var r,i,o,c=t(82394);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.INTEGRATION,"Integration"),(0,c.Z)(r,o.PYTHON,"Standard"),(0,c.Z)(r,o.PYSPARK,"PySpark"),(0,c.Z)(r,o.STREAMING,"Streaming"),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules"}(u||(u={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TYPE="type[]"}(l||(l={})),function(e){e.STATUS="status",e.TYPE="type"}(a||(a={}));var s=(i={},(0,c.Z)(i,o.PYTHON,"python3"),(0,c.Z)(i,o.PYSPARK,"pysparkkernel"),i)},18283:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(9518)),c=t(23831),u=t(73942),l=t(2005),a=t(49125),d=t(31012),s=t(28598),p=["children"];function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var b=o.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;",";"," ",";",";"," "," "," "," "," ",""],u.BG,l.ry,d.iD,(function(e){return e.small&&"\n ".concat(d.HC,";\n ")}),(function(e){return!e.regular&&"\n padding: 2px 4px;\n "}),(function(e){return e.regular&&"\n padding: ".concat(1*a.iI,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(e){return!e.disabled&&"\n background-color: ".concat((e.theme||c.Z).background.row,";\n color: ").concat((e.theme||c.Z).content.muted,";\n ")}),(function(e){return e.cyan&&"\n background-color: ".concat((e.theme||c.Z).accent.cyan,";\n color: ").concat((e.theme||c.Z).monotone.black,";\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme||c.Z).feature.disabled,";\n color: ").concat((e.theme||c.Z).content.disabled,";\n ")}),(function(e){return e.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}),(function(e){return e.monospace&&"\n font-family: ".concat(l.Vp,";\n word-break: break-all;\n ")}));n.Z=function(e){var n=e.children,t=(0,i.Z)(e,p);return(0,s.jsx)(b,h(h({},t),{},{children:n}))}},30264:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(47999)),c=t(62084),u=t(28598),l=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,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.items,r=e.open,a=e.onClickCallback,s=e.onClickOutside,p=e.parentRef,f=e.uuid,h=(0,i.Z)(e,l),b=(0,u.jsxs)("div",{style:{position:"relative",zIndex:s?3:2},children:[(0,u.jsx)("div",{ref:p,children:n}),(0,u.jsx)(c.Z,d(d({},h),{},{items:t,onClickCallback:a,open:r,parentRef:p,uuid:f}))]});return s?(0,u.jsx)(o.Z,{onClickOutside:s,open:!0,children:b}):b}},29237:function(e,n,t){"use strict";var r=t(9518),i=t(67971),o=t(86673),c=t(19711),u=t(23831),l=t(73942),a=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;"," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),b=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*d.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*d.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*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,d=e.fullHeight,p=void 0===d||d,v=e.fullWidth,m=void 0===v||v,O=e.header,j=e.headerHeight,x=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,Z=e.maxHeight,k=e.maxWidth,w=e.minWidth,E=e.noPadding,C=e.overflowVisible,T=e.subtitle;return(0,s.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:m,maxHeight:Z,maxWidth:k,minWidth:w,overflowVisible:C,ref:r,children:[(O||P)&&(0,s.jsxs)(h,{headerPaddingVertical:y,height:j,children:[O&&O,P&&(0,s.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Z,{alignItems:"center",children:[x&&x,(0,s.jsx)(o.Z,{ml:x?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,s.jsxs)(b,{maxHeight:Z,noPadding:E,overflowVisible:C,ref:u,children:[T&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:T})}),t]}),a&&(0,s.jsx)(g,{children:a})]})}},38435:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(28598),a=["rows"];function d(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?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],u.p),f=function(e,n){var t=e.rows,r=void 0===t?3:t,o=(0,i.Z)(e,a);return(0,l.jsx)(u.Z,s(s({},o),{},{input:(0,l.jsx)(p,s({rows:r},o)),ref:n}))};n.Z=o.forwardRef(f)},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(23831),a=t(28598),d=["checked","disabled","onCheck"];function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],u.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?l.Z.monotone.white:l.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(l.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(l.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,d);return(0,a.jsx)(u.Z,p(p({},c),{},{disabled:r,input:(0,a.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,a.jsx)("input",{checked:t,type:"checkbox"}),(0,a.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},46614:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return we}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),l=t(12691),a=t.n(l),d=t(83455),s=t(82684),p=t(34376),f=t(60328),h=t(1210),b=t(93461),g=t(67971),v=t(11135),m=t(29237),O=t(86673),j=t(19711),x=t(38435),y=t(82944),P=t(28598);var Z=function(e){var n=e.description,t=e.isLoading,r=e.maxWidth,i=e.minWidth,o=e.noEmptyValue,c=e.onClose,u=e.onSave,l=e.textArea,a=e.title,d=e.value,p=(0,s.useRef)(null),h=(0,s.useState)(d),b=h[0],Z=h[1],k=l?x.Z:y.Z;return(0,s.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,P.jsxs)(m.Z,{maxWidth:r,minWidth:i,children:[(0,P.jsx)(j.ZP,{bold:!0,children:a}),(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(k,{monospace:!0,onChange:function(e){return Z(e.target.value)},ref:p,rows:l?7:null,value:b})}),n&&(0,P.jsx)(O.Z,{mt:2,children:(0,P.jsx)(j.ZP,{muted:!0,small:!0,children:n})}),(0,P.jsx)(O.Z,{mt:3,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(v.ZP,{bold:!0,inline:!0,loading:t,onClick:function(){b===d||o&&!b?c():u(b)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(f.Z,{onClick:c,children:"Cancel"})]})})]})},k=t(10919),w=t(98781),E=t(41788),C=t(54283),T=t(58180),S=t(18283),A=t(47999),R=t(30264),D=t(62609),I=t(70902),_=t(9518),N=t(23831),M=t(73942),L=t(37391),H=t(49125),B=74*H.iI,Y=48*H.iI,V=_.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-18n432u-0"})(["position:absolute;border-radius:","px;overflow:hidden;width:","px;display:none;"," "," "," "," ",""],M.n_,B,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.panel,";\n border: ").concat(M.mP,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n box-shadow: ").concat((e.theme.shadow||N.Z.shadow).window,";\n ")}),(function(e){return e.display&&"\n display: block;\n "}),(function(e){return e.compact&&"\n width: ".concat(.75*B,"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 ")})),U=_.default.div.withConfig({displayName:"indexstyle__MainStyle",componentId:"sc-18n432u-1"})(["display:flex;border-radius:","px;overflow:hidden;height:","px;"," ",""],M.n_,Y,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.content,";\n border: ").concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(Y/2,"px;\n ")})),W=_.default.aside.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-18n432u-2"})(["width:100%;overflow:auto;"," ",""],L.w5,(function(e){return"\n border-right: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).background.panel,";\n ")})),F=_.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-18n432u-3"})(["width:100%;overflow:auto;",""],L.w5),G=(0,_.css)(["display:flex;align-items:center;justify-content:space-between;padding:","px ","px;"],H.iI,2*H.iI),X=_.default.div.withConfig({displayName:"indexstyle__OptionStyle",componentId:"sc-18n432u-4"})([""," padding-top:","px;padding-bottom:","px;&:hover{cursor:pointer;","}",""],G,1.5*H.iI,1.5*H.iI,(function(e){return"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")})),q=_.default.div.withConfig({displayName:"indexstyle__ToggleValueStyle",componentId:"sc-18n432u-5"})([""," ",""],G,(function(e){return"\n border-bottom: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).borders.medium2,";\n ")})),z=t(10503),K=t(33766),Q=t(90211);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee,ne=function(e){var n,t,r,c=e.children,u=e.compact,l=e.onClickCallback,a=e.onClickOutside,d=e.onSecondaryClick,p=e.open,h=e.options,v=void 0===h?{}:h,m=e.parentRef,x=e.query,y=e.setOpen,Z=e.toggleValueMapping,k=(0,s.useState)(null),w=k[0],E=k[1],C=(0,s.useState)(v),T=C[0],S=C[1];(0,s.useEffect)((function(){S(v)}),[v]);var R=((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,D=void 0===R?0:R,_=Object.keys(v);return(0,P.jsxs)(A.Z,{onClickOutside:a,open:!0,children:[(0,P.jsx)("div",{ref:m,children:c}),(0,P.jsxs)(V,{compact:u,display:p,top:D-5,children:[(0,P.jsxs)(U,{compact:u,children:[(0,P.jsx)(b.Z,{flex:"1",children:(0,P.jsx)(W,{children:_.map((function(e){return(0,P.jsxs)(X,{highlighted:w===e,onMouseEnter:function(){return E(e)},children:[(0,P.jsx)(j.ZP,{children:(0,Q.kC)(e)}),(0,P.jsx)(z._Q,{})]},e)}))})}),(0,P.jsx)(b.Z,{flex:"2",children:(0,P.jsx)(F,{children:w&&Object.entries((null===(r=T||v)||void 0===r?void 0:r[w])||{}).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,P.jsxs)(q,{children:[(0,P.jsx)(j.ZP,{children:(null===Z||void 0===Z?void 0:Z[t])||(0,Q.J3)((0,Q.kC)(t))}),(0,P.jsx)(I.Z,{checked:r,onCheck:function(){return S((function(e){return J(J({},e),{},(0,o.Z)({},w,J(J({},null===e||void 0===e?void 0:e[w]),{},(0,o.Z)({},t,!r))))}))}})]},t)}))})})]}),(0,P.jsx)(O.Z,{m:1,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(f.Z,{onClick:function(){var e=Object.entries(T).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1],c=[];return Object.entries(o).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0];return n[1]&&c.push(t)})),e[r]=c,e}),{});null===l||void 0===l||l(),(0,K.g_)(x,e,{addingMultipleValues:!0,pushHistory:!0})},secondary:!0,children:"Apply"}),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,{noBackground:!0,onClick:function(){y(!1),null===d||void 0===d||d()},children:"Defaults"})]})})]})]})},te=t(46261),re=t(99994),ie="".concat(1.5*H.iI,"px"),oe=40*H.iI,ce={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};!function(e){e[e.SECONDARY=1]="SECONDARY",e[e.DELETE=2]="DELETE"}(ee||(ee={}));var ue={autoHide:!0,size:null,widthFitContent:!0},le=t(7715),ae=t(9736);function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){(0,o.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 pe=function(e){var n=e.addButtonProps,t=e.deleteRowProps,r=e.filterOptions,o=void 0===r?{}:r,c=e.filterValueLabelMapping,u=e.groupButtonProps,l=e.moreActionsMenuItems,a=e.query,d=void 0===a?{}:a,f=e.searchProps,h=e.secondaryActionButtonProps,m=e.selectedRowId,x=e.setSelectedRow,Z=(0,ae.Ct)(),k=(0,p.useRouter)(),w=(0,s.useRef)(null),E=(0,s.useRef)(null),C=(0,s.useRef)(null),T=(0,s.useRef)(null),I=(0,s.useRef)(null),_=(0,s.useState)(!1),N=_[0],L=_[1],B=(0,s.useState)(!1),Y=B[0],V=B[1],U=(0,s.useState)(!1),W=U[0],F=U[1],G=(0,s.useState)(!1),X=G[0],q=G[1],K=(0,s.useState)(null),Q=K[0],$=K[1],J=!m,de=(0,s.useCallback)((function(){return L(!1)}),[]),pe=(0,s.useCallback)((function(){return V(!1)}),[]),fe=(0,s.useCallback)((function(){return F(!1)}),[]),he=(0,s.useCallback)((function(){return q(null)}),[]),be=(0,s.useCallback)((function(){return $(null)}),[]),ge=h||{},ve=ge.Icon,me=ge.confirmationDescription,Oe=ge.confirmationMessage,je=ge.isLoading,xe=ge.label,ye=ge.onClick,Pe=ge.openConfirmationDialogue,Ze=ge.tooltip,ke=t||{},we=ke.confirmationMessage,Ee=ke.isLoading,Ce=ke.item,Te=ke.onDelete,Se=f||{},Ae=Se.placeholder,Re=Se.onChange,De=Se.value,Ie=(0,s.useMemo)((function(){return Object.entries(o).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return e[r]={},o.forEach((function(n){var t,i=(null===(t=d["".concat(r,"[]")])||void 0===t?void 0:t.includes(n))||!1;e[r][n]=i})),e}),{})}),[o,d]),_e=n||{},Ne=_e.label,Me=_e.menuItems,Le=_e.isLoading,He=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:Me,onClickCallback:de,onClickOutside:de,open:N,parentRef:w,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{background:re.eW,beforeElement:(0,P.jsx)(z.mm,{size:2.5*H.iI}),loading:Le,onClick:function(e){e.preventDefault(),L((function(e){return!e}))},uuid:"Table/Toolbar/AddButton",children:Ne}))})}),[Ne,Me,N,de,Le]),Be=(0,s.useMemo)((function(){return(0,le.dw)(Ie)}),[Ie]),Ye=(0,s.useMemo)((function(){return(0,P.jsx)(ne,{compact:!0,onClickCallback:pe,onClickOutside:pe,onSecondaryClick:function(){return k.push("/pipelines")},open:Y,options:Ie,parentRef:E,query:d,setOpen:V,toggleValueMapping:c,children:(0,P.jsx)(v.ZP,se(se({},ce),{},{afterElement:Be>0?(0,P.jsx)(S.Z,{cyan:!0,noVerticalPadding:!0,children:(0,P.jsx)(j.ZP,{bold:!0,inverted:!0,children:Be})}):null,beforeElement:(0,P.jsx)(z.wn,{size:2*H.iI}),onClick:function(){return V((function(e){return!e}))},uuid:"Table/Toolbar/FilterButton",children:"Filter"}))})}),[pe,Y,Ie,c,Be,d,k]),Ve=u||{},Ue=Ve.groupByLabel,We=Ve.menuItems,Fe=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:We,onClickCallback:fe,onClickOutside:fe,open:W,parentRef:C,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/GroupMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{beforeElement:(0,P.jsx)(z.ZA,{size:2.5*H.iI}),onClick:function(){F((function(e){return!e}))},uuid:"Table/Toolbar/GroupButton",children:Ue?"Grouped by ".concat(Ue):"Group"}))})}),[fe,W,We]),Ge=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:l,onClickCallback:he,onClickOutside:he,open:X,parentRef:T,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/MoreActionsMenu",children:(0,P.jsx)(te.Z,se(se({},ue),{},{label:"More actions",children:(0,P.jsx)(v.ZP,{Icon:z.mH,bold:!0,disabled:J,greyBorder:!0,onClick:function(){return q((function(e){return!e}))},smallIcon:!0,uuid:"Table/Toolbar/MoreActionsButton"})}))})}),[he,J,X,l]);return(0,P.jsxs)(g.Z,{alignItems:"center",children:[He,(0,P.jsx)(O.Z,{mr:ie}),Ye,(null===We||void 0===We?void 0:We.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Fe}),!Z&&ye&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:Ze,children:(0,P.jsx)(v.ZP,{Icon:!je&&ve,bold:!0,disabled:J,greyBorder:!0,loading:je,onClick:Pe?function(){return $(ee.SECONDARY)}:ye,smallIcon:!0,uuid:"Table/Toolbar/SecondaryActionButton",children:xe})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.SECONDARY,children:(0,P.jsx)(D.Z,{onCancel:be,onClick:function(){ye(),be(),x(null)},subtitle:me,title:Oe,top:58,width:oe})})]}),!Z&&Te&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:"Delete ".concat(Ce),children:(0,P.jsx)(v.ZP,{Icon:!Ee&&z.rF,bold:!0,disabled:J,greyBorder:!0,loading:Ee,onClick:function(){return $(ee.DELETE)},smallIcon:!0,uuid:"Table/Toolbar/DeleteButton"})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.DELETE,children:(0,P.jsx)(D.Z,{danger:!0,onCancel:be,onClick:function(){Te(m),be(),x(null)},subtitle:we,title:"Are you sure you want to delete the ".concat(Ce," ").concat(m,"?"),top:58,width:oe})})]}),!Z&&(null===l||void 0===l?void 0:l.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Ge}),Re&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(O.Z,{ml:ie}),(0,P.jsx)(b.Z,{flex:1,children:(0,P.jsx)(y.Z,{afterIcon:De?(0,P.jsx)(z.x8,{}):null,afterIconClick:function(){var e;Re(""),null===I||void 0===I||null===(e=I.current)||void 0===e||e.focus()},afterIconSize:1.5*H.iI,beforeIcon:(0,P.jsx)(z.HN,{}),borderRadius:M.n_,defaultColor:!0,fullWidth:!0,greyBorder:!0,maxWidth:60*H.iI,onChange:function(e){return Re(e.target.value)},paddingVertical:9,placeholder:Ae||null,ref:I,value:De})})]})]})},fe=t(82531),he=t(86422),be=t(93348),ge=t(3055),ve=t(45838),me=t(59e3),Oe=t(96510),je=t(66653),xe=t(83608);function ye(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 Pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ye(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ye(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze={borderRadius:M.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function ke(){var e=(0,p.useRouter)(),n=(0,s.useState)(null),t=n[0],r=n[1],c=(0,s.useState)(null),u=c[0],l=c[1],g=(0,s.useState)({}),v=g[0],m=g[1],x=(0,s.useState)(null),y=x[0],E=x[1],S=(0,me.iV)(),A=(0,me.DQ)(S,[w.$1.STATUS,w.$1.TYPE]),R=null===S||void 0===S?void 0:S[w.$1.GROUP],D=fe.ZP.pipelines.list(Pe(Pe({},A),{},{include_schedules:1})),I=D.data,_=D.mutate,M=(0,s.useMemo)((function(){var e=(null===I||void 0===I?void 0:I.pipelines)||[];if(u){var n=u.toLowerCase();e=e.filter((function(e){var t=e.name,r=e.description,i=e.uuid;return(null===t||void 0===t?void 0:t.toLowerCase().includes(n))||(null===i||void 0===i?void 0:i.toLowerCase().includes(n))||(null===r||void 0===r?void 0:r.toLowerCase().includes(n))}))}return e}),[null===I||void 0===I?void 0:I.pipelines,u]),L=function(e){return(0,d.Db)(fe.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var t=n.pipeline.uuid;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return E({errors:n,response:e})}})}})},B=L((function(n){return e.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))})),Y=(0,i.Z)(B,2),V=Y[0],U=Y[1].isLoading,W=L((function(){return null===_||void 0===_?void 0:_()})),F=(0,i.Z)(W,2),G=F[0],X=F[1].isLoading,q=(0,d.Db)((function(e){return fe.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(e){var n=e.pipeline.uuid;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!1))})),_(),null===le||void 0===le||le(),r(null)},onErrorCallback:function(e,n){var t,r=null===e||void 0===e||null===(t=e.url_parameters)||void 0===t?void 0:t.pk;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},r,!1))})),E({errors:n,response:e})}})}}),$=(0,i.Z)(q,2),J=$[0],ee=$[1].isLoading,ne=(0,d.Db)((function(e){return fe.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(){null===_||void 0===_||_()},onErrorCallback:function(e,n){return E({errors:n,response:e})}})}}),te=(0,i.Z)(ne,2),re=te[0],ie=te[1].isLoading,oe=(0,xe.dd)((function(e){var n=e.pipelineDescription,r=e.pipelineName;return(0,P.jsx)(Z,{isLoading:ee,minWidth:55*H.iI,noEmptyValue:!!r,onClose:le,onSave:function(e){if(t){var n=t.uuid,i={uuid:n};r?i.name=e:i.description=e,m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!0))})),J(i)}},textArea:!r,title:r?"Rename pipeline":"Edit description",value:r||n})}),{},[ee,t],{background:!0,uuid:"rename_pipeline_and_save"}),ce=(0,i.Z)(oe,2),ue=ce[0],le=ce[1],ae=(0,s.useMemo)((function(){return(0,P.jsx)(pe,{addButtonProps:{isLoading:U,label:"New",menuItems:[{label:function(){return"Standard (batch)"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{label:function(){return"Data integration"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{label:function(){return"Streaming"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}]},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:ie,item:"pipeline",onDelete:function(){return re(null===t||void 0===t?void 0:t.uuid)}},filterOptions:{status:Object.values(w.QK),type:Object.values(w.qL)},filterValueLabelMapping:w.G7,groupButtonProps:{groupByLabel:R,menuItems:[{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.STATUS?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.STATUS)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.STATUS?null:w.r0.STATUS),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.TYPE?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.TYPE)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.TYPE?null:w.r0.TYPE),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return ue({pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return ue({pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],query:A,searchProps:{onChange:l,value:u},secondaryActionButtonProps:{Icon:z.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===t||void 0===t?void 0:t.uuid,"?"),isLoading:X,onClick:function(){return G({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},selectedRowId:null===t||void 0===t?void 0:t.uuid,setSelectedRow:r})}),[G,V,re,R,X,U,ie,A,u,null===t||void 0===t?void 0:t.description,null===t||void 0===t?void 0:t.name,null===t||void 0===t?void 0:t.uuid,ue]);return(0,P.jsx)(h.Z,{errors:y,setErrors:E,subheaderChildren:ae,title:"Pipelines",uuid:"pipelines/index",children:0===(null===M||void 0===M?void 0:M.length)?(0,P.jsx)(O.Z,{px:3,py:1,children:I?(0,P.jsx)(j.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,P.jsx)(C.Z,{inverted:!0,large:!0})}):(0,P.jsx)(ve.cl,{includePadding:!!R,maxHeight:"calc(100vh - ".concat(ge.Mz+74,"px)"),children:(0,P.jsx)(T.Z,{columnFlex:[null,1,3,4,1,1,1,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,Q.kC)(w.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,Q.kC)(w.r0.TYPE)},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,uuid:"Actions"}],grouping:{column:(0,Q.kC)(R),columnIndex:R===w.r0.STATUS?1:R===w.r0.TYPE?4:null,values:R===w.r0.STATUS?Object.values(w.QK).map((function(e){return(0,Q.J3)(e)})):R===w.r0.TYPE?Object.values(w.qL).map((function(e){return w.G7[e]})):[]},isSelectedRow:function(e){var n;return(null===(n=M[e])||void 0===n?void 0:n.uuid)===(null===t||void 0===t?void 0:t.uuid)},onClickRow:function(e){return r((function(n){var t=M[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]","/pipelines/".concat(M[n].uuid))},rows:M.map((function(n,t){var r=n.blocks,i=n.description,c=n.schedules,u=n.type,l=n.uuid,d=r.filter((function(e){var n=e.type;return he.tf.SCRATCHPAD!==n})).length,s=c.length,p=c.find((function(e){var n=e.status;return be.fq.ACTIVE===n}));return[s>=1||v[l]?(0,P.jsx)(f.Z,{iconOnly:!0,loading:!!v[l],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,je.j)(e),m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},l,!0))})),J(Pe(Pe({},n),{},{status:p?be.fq.INACTIVE:be.fq.ACTIVE}))},children:p?(0,P.jsx)(z.dz,{muted:!0,size:2*H.iI}):(0,P.jsx)(z.Py,{default:!0,size:2*H.iI})}):null,(0,P.jsx)(j.ZP,{default:!p,monospace:!0,success:!!p,children:p?be.fq.ACTIVE:s>=1?be.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(t)),(0,P.jsx)(a(),{as:"/pipelines/".concat(l),href:"/pipelines/[pipeline]",passHref:!0,children:(0,P.jsx)(k.Z,{sameColorAsText:!0,children:l})},"pipeline_name_".concat(t)),(0,P.jsx)(j.ZP,{default:!0,title:i,width:90*H.iI,children:i},"pipeline_description_".concat(t)),(0,P.jsx)(j.ZP,{children:w.G7[u]},"pipeline_type_".concat(t)),(0,P.jsx)(j.ZP,{default:0===d,monospace:!0,children:d},"pipeline_block_count_".concat(t)),(0,P.jsx)(j.ZP,{default:0===s,monospace:!0,children:s},"pipeline_trigger_count_".concat(t)),(0,P.jsxs)(b.Z,{flex:1,justifyContent:"flex-end",children:[(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]","/pipelines/".concat(l))},title:"Detail",children:(0,P.jsx)(z.UY,{default:!0,size:2*H.iI})})),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]/logs","/pipelines/".concat(l,"/logs"))},title:"Logs",children:(0,P.jsx)(z.$B,{default:!0,size:2*H.iI})}))]},"chevron_icon_".concat(t))]})),stickyHeader:!0})})})}ke.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var we=(0,E.Z)(ke)},33766:function(e,n,t){"use strict";t.d(n,{g_:function(){return p},u7:function(){return s}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),l=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,o=t.pushHistory,l=i?{}:(0,u.iV)();n=window.location.pathname;var a=o?c().push:c().replace,s=d(d({},l),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete s[t]}));var p=(0,u.uM)(s);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return a(c().router.pathname,f,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,a=void 0!==u&&u,p=t.resetLimitParams,f=d({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");f[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),c="".concat(t,"[]"),u=f[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?f[c]=(0,l.Od)(u,(function(e){return e===o})):f[c]=u.concat(o):f[c]=[o]})):f=d(d({},f),n),p&&(f._limit=c||20,f._offset=0),s(f,{pushHistory:a})}},79274:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return t(46614)}])}},function(e){e.O(0,[3850,2083,2344,4506,6166,8180,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{1210:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var r=t(82394),i=t(21831),o=t(82684),c=t(47999),u=t(49894),l=t(93461),a=t(57384),d=t(12344),s=t(72454),p=t(28598);function f(e,n){var t=e.children;return(0,p.jsx)(s.HS,{ref:n,children:t})}var h=o.forwardRef(f),b=t(32063),g=t(15270),v=t(82531),m=t(66166),O=t(3055),j=t(49125),x=t(91427),y=t(24141);function P(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?P(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=function(e){var n,t=e.after,r=e.afterHidden,f=e.afterWidth,P=e.afterWidthOverride,k=e.before,w=e.beforeWidth,E=e.breadcrumbs,C=e.children,T=e.errors,S=e.headerMenuItems,A=e.navigationItems,R=e.setErrors,D=e.subheaderChildren,I=e.title,_=e.uuid,N=(0,y.i)().width,M="dashboard_after_width_".concat(_),L="dashboard_before_width_".concat(_),H=(0,o.useRef)(null),B=(0,o.useState)(P?f:(0,x.U2)(M,f)),Y=B[0],V=B[1],U=(0,o.useState)(!1),W=U[0],F=U[1],G=(0,o.useState)(k?Math.max((0,x.U2)(L,w),13*j.iI):null),X=G[0],q=G[1],z=(0,o.useState)(!1),K=z[0],Q=z[1],$=(0,o.useState)(null)[1],J=v.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===J||void 0===J?void 0:J.projects,ne=[];E?ne.push.apply(ne,(0,i.Z)(E)):(null===ee||void 0===ee?void 0:ee.length)>=1&&ne.push.apply(ne,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return I}}]),(0,o.useEffect)((function(){null===H||void 0===H||!H.current||W||K||null===$||void 0===$||$(H.current.getBoundingClientRect().width)}),[W,Y,K,X,H,$,N]),(0,o.useEffect)((function(){W||(0,x.t8)(M,Y)}),[r,W,Y,M]),(0,o.useEffect)((function(){K||(0,x.t8)(L,X)}),[K,X,L]);var te=(0,m.Z)(f);return(0,o.useEffect)((function(){P&&te!==f&&V(f)}),[P,f,te]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:I}),(0,p.jsx)(d.Z,{breadcrumbs:ne,menuItems:S,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(n=ee[0])||void 0===n?void 0:n.version}),(0,p.jsxs)(s.Nk,{children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,p.jsx)(s.lm,{children:(0,p.jsx)(g.Z,{navigationItems:A})}),(0,p.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(b.Z,{after:t,afterHeightOffset:O.Mz,afterHidden:r,afterMousedownActive:W,afterWidth:Y,before:k,beforeHeightOffset:O.Mz,beforeMousedownActive:K,beforeWidth:s.k1+(k?X:0),hideAfterCompletely:!0,leftOffset:k?s.k1:null,mainContainerRef:H,setAfterMousedownActive:F,setAfterWidth:V,setBeforeMousedownActive:Q,setBeforeWidth:q,children:[D&&(0,p.jsx)(h,{children:D}),C]})})]}),T&&(0,p.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===R||void 0===R?void 0:R(null)},children:(0,p.jsx)(u.Z,Z(Z({},T),{},{onClose:function(){return null===R||void 0===R?void 0:R(null)}}))})]})}},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return p},DA:function(){return s},HX:function(){return b},J8:function(){return h},Lq:function(){return a},Qj:function(){return g},Ut:function(){return j},V4:function(){return O},VZ:function(){return f},dO:function(){return d},f2:function(){return m},iZ:function(){return v},t6:function(){return c},tf:function(){return l}});var r,i,o,c,u=t(82394);!function(e){e.PYTHON="python",e.R="r",e.SQL="sql",e.YAML="yaml"}(c||(c={}));var l,a,d=(r={},(0,u.Z)(r,c.PYTHON,"PY"),(0,u.Z)(r,c.R,"R"),(0,u.Z)(r,c.SQL,"SQL"),(0,u.Z)(r,c.YAML,"YAML"),r);!function(e){e.CHART="chart",e.CUSTOM="custom",e.DATA_EXPORTER="data_exporter",e.DATA_LOADER="data_loader",e.DBT="dbt",e.EXTENSION="extension",e.SCRATCHPAD="scratchpad",e.SENSOR="sensor",e.TRANSFORMER="transformer"}(l||(l={})),function(e){e.BLUE="blue",e.GREY="grey",e.PINK="pink",e.PURPLE="purple",e.TEAL="teal",e.YELLOW="yellow"}(a||(a={}));var s,p=[l.CHART,l.CUSTOM,l.DATA_EXPORTER,l.DATA_LOADER,l.SCRATCHPAD,l.SENSOR,l.TRANSFORMER],f=[l.DATA_EXPORTER,l.DATA_LOADER],h=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],g=[l.CHART,l.SCRATCHPAD,l.SENSOR],v=[l.EXTENSION,l.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(s||(s={}));var m=[l.CUSTOM,l.DATA_EXPORTER,l.TRANSFORMER],O=(i={},(0,u.Z)(i,l.CUSTOM,"Custom"),(0,u.Z)(i,l.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,l.DATA_LOADER,"Data loader"),(0,u.Z)(i,l.EXTENSION,"Extension"),(0,u.Z)(i,l.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,l.SENSOR,"Sensor"),(0,u.Z)(i,l.TRANSFORMER,"Transformer"),i),j=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER,l.SENSOR];o={},(0,u.Z)(o,l.DATA_EXPORTER,"DE"),(0,u.Z)(o,l.DATA_LOADER,"DL"),(0,u.Z)(o,l.SCRATCHPAD,"SP"),(0,u.Z)(o,l.SENSOR,"SR"),(0,u.Z)(o,l.TRANSFORMER,"TF")},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return s},U5:function(){return l},Xm:function(){return o},Z4:function(){return d},fq:function(){return u},kJ:function(){return a}});var r,i,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.API,(function(){return"API"})),(0,c.Z)(r,o.EVENT,(function(){return"event"})),(0,c.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(u||(u={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(l||(l={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var s=(i={},(0,c.Z)(i,a.CREATED_AT,"Created at"),(0,c.Z)(i,a.NAME,"Name"),(0,c.Z)(i,a.PIPELINE,"Pipeline"),(0,c.Z)(i,a.STATUS,"Status"),(0,c.Z)(i,a.TYPE,"Type"),i)},98781:function(e,n,t){"use strict";t.d(n,{$1:function(){return l},G7:function(){return d},QK:function(){return u},a_:function(){return s},qL:function(){return o},r0:function(){return a}});var r,i,o,c=t(82394);!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(o||(o={}));var u,l,a,d=(r={},(0,c.Z)(r,o.INTEGRATION,"Integration"),(0,c.Z)(r,o.PYTHON,"Standard"),(0,c.Z)(r,o.PYSPARK,"PySpark"),(0,c.Z)(r,o.STREAMING,"Streaming"),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules"}(u||(u={})),function(e){e.GROUP="group_by",e.STATUS="status[]",e.TYPE="type[]"}(l||(l={})),function(e){e.STATUS="status",e.TYPE="type"}(a||(a={}));var s=(i={},(0,c.Z)(i,o.PYTHON,"python3"),(0,c.Z)(i,o.PYSPARK,"pysparkkernel"),i)},18283:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(9518)),c=t(23831),u=t(73942),l=t(2005),a=t(49125),d=t(31012),s=t(28598),p=["children"];function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var b=o.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;",";"," ",";",";"," "," "," "," "," ",""],u.BG,l.ry,d.iD,(function(e){return e.small&&"\n ".concat(d.HC,";\n ")}),(function(e){return!e.regular&&"\n padding: 2px 4px;\n "}),(function(e){return e.regular&&"\n padding: ".concat(1*a.iI,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(e){return!e.disabled&&"\n background-color: ".concat((e.theme||c.Z).background.row,";\n color: ").concat((e.theme||c.Z).content.muted,";\n ")}),(function(e){return e.cyan&&"\n background-color: ".concat((e.theme||c.Z).accent.cyan,";\n color: ").concat((e.theme||c.Z).monotone.black,";\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme||c.Z).feature.disabled,";\n color: ").concat((e.theme||c.Z).content.disabled,";\n ")}),(function(e){return e.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}),(function(e){return e.monospace&&"\n font-family: ".concat(l.Vp,";\n word-break: break-all;\n ")}));n.Z=function(e){var n=e.children,t=(0,i.Z)(e,p);return(0,s.jsx)(b,h(h({},t),{},{children:n}))}},30264:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(47999)),c=t(62084),u=t(28598),l=["children","items","open","onClickCallback","onClickOutside","parentRef","uuid"];function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,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.items,r=e.open,a=e.onClickCallback,s=e.onClickOutside,p=e.parentRef,f=e.uuid,h=(0,i.Z)(e,l),b=(0,u.jsxs)("div",{style:{position:"relative",zIndex:s?3:2},children:[(0,u.jsx)("div",{ref:p,children:n}),(0,u.jsx)(c.Z,d(d({},h),{},{items:t,onClickCallback:a,open:r,parentRef:p,uuid:f}))]});return s?(0,u.jsx)(o.Z,{onClickOutside:s,open:!0,children:b}):b}},29237:function(e,n,t){"use strict";var r=t(9518),i=t(67971),o=t(86673),c=t(19711),u=t(23831),l=t(73942),a=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;"," "," "," "," "," "," "," "," "," ",""],l.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return!e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||u.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=r.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],l.n_,l.n_,(function(e){return"\n background-color: ".concat((e.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),b=r.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*d.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*d.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*d.iI);n.Z=function(e){var n=e.borderless,t=e.children,r=e.containerRef,u=e.contentContainerRef,l=e.dark,a=e.footer,d=e.fullHeight,p=void 0===d||d,v=e.fullWidth,m=void 0===v||v,O=e.header,j=e.headerHeight,x=e.headerIcon,y=e.headerPaddingVertical,P=e.headerTitle,Z=e.maxHeight,k=e.maxWidth,w=e.minWidth,E=e.noPadding,C=e.overflowVisible,T=e.subtitle;return(0,s.jsxs)(f,{borderless:n,dark:l,fullHeight:p,fullWidth:m,maxHeight:Z,maxWidth:k,minWidth:w,overflowVisible:C,ref:r,children:[(O||P)&&(0,s.jsxs)(h,{headerPaddingVertical:y,height:j,children:[O&&O,P&&(0,s.jsx)(i.Z,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.Z,{alignItems:"center",children:[x&&x,(0,s.jsx)(o.Z,{ml:x?1:0,children:(0,s.jsx)(c.ZP,{bold:!0,default:!0,children:P})})]})})]}),(0,s.jsxs)(b,{maxHeight:Z,noPadding:E,overflowVisible:C,ref:u,children:[T&&(0,s.jsx)(o.Z,{mb:2,children:(0,s.jsx)(c.ZP,{default:!0,children:T})}),t]}),a&&(0,s.jsx)(g,{children:a})]})}},38435:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(28598),a=["rows"];function d(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?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var p=c.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],u.p),f=function(e,n){var t=e.rows,r=void 0===t?3:t,o=(0,i.Z)(e,a);return(0,l.jsx)(u.Z,s(s({},o),{},{input:(0,l.jsx)(p,s({rows:r},o)),ref:n}))};n.Z=o.forwardRef(f)},70902:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(9518),u=t(69898),l=t(23831),a=t(28598),d=["checked","disabled","onCheck"];function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=c.default.label.withConfig({displayName:"ToggleSwitch__ToggleSwitchStyle",componentId:"sc-179r5zs-0"})([""," position:relative;display:inline-block;width:","px;min-width:","px;height:",'px;& input[type="checkbox"]{display:none;}& span{position:absolute;cursor:',";background-color:",";border-radius:13px;",';top:0;right:0;bottom:0;left:0;transition:background-color 0.2s ease;}& span::before{position:absolute;content:"";left:2px;top:2px;width:22px;height:22px;background-color:#787A85;border-radius:50%;transition:transform 0.3s ease;}& input[type="checkbox"]:checked + span::before{transform:translateX(20px);}',""],u.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?l.Z.monotone.white:l.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(l.Z.monotone.grey200)}),(function(e){return!e.disabled&&'\n & input[type="checkbox"]:checked + span {\n background-color: #6AA1E0;\n }\n\n & input[type="checkbox"]:checked + span::before {\n background-color: '.concat(l.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,r=e.disabled,o=e.onCheck,c=(0,i.Z)(e,d);return(0,a.jsx)(u.Z,p(p({},c),{},{disabled:r,input:(0,a.jsxs)(f,p(p({},c),{},{disabled:r,noBackground:!0,noBorder:!0,children:[(0,a.jsx)("input",{checked:t,type:"checkbox"}),(0,a.jsx)("span",{onClick:r?null:function(){return null===o||void 0===o?void 0:o((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},46614:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return we}});var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),l=t(12691),a=t.n(l),d=t(83455),s=t(82684),p=t(34376),f=t(60328),h=t(1210),b=t(93461),g=t(67971),v=t(11135),m=t(29237),O=t(86673),j=t(19711),x=t(38435),y=t(82944),P=t(28598);var Z=function(e){var n=e.description,t=e.isLoading,r=e.maxWidth,i=e.minWidth,o=e.noEmptyValue,c=e.onClose,u=e.onSave,l=e.textArea,a=e.title,d=e.value,p=(0,s.useRef)(null),h=(0,s.useState)(d),b=h[0],Z=h[1],k=l?x.Z:y.Z;return(0,s.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,P.jsxs)(m.Z,{maxWidth:r,minWidth:i,children:[(0,P.jsx)(j.ZP,{bold:!0,children:a}),(0,P.jsx)(O.Z,{mt:1,children:(0,P.jsx)(k,{monospace:!0,onChange:function(e){return Z(e.target.value)},ref:p,rows:l?7:null,value:b})}),n&&(0,P.jsx)(O.Z,{mt:2,children:(0,P.jsx)(j.ZP,{muted:!0,small:!0,children:n})}),(0,P.jsx)(O.Z,{mt:3,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(v.ZP,{bold:!0,inline:!0,loading:t,onClick:function(){b===d||o&&!b?c():u(b)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,P.jsx)(O.Z,{ml:1}),(0,P.jsx)(f.Z,{onClick:c,children:"Cancel"})]})})]})},k=t(10919),w=t(98781),E=t(41788),C=t(54283),T=t(58180),S=t(18283),A=t(47999),R=t(30264),D=t(62609),I=t(70902),_=t(9518),N=t(23831),M=t(73942),L=t(37391),H=t(49125),B=74*H.iI,Y=48*H.iI,V=_.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-18n432u-0"})(["position:absolute;border-radius:","px;overflow:hidden;width:","px;display:none;"," "," "," "," ",""],M.n_,B,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.panel,";\n border: ").concat(M.mP,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n box-shadow: ").concat((e.theme.shadow||N.Z.shadow).window,";\n ")}),(function(e){return e.display&&"\n display: block;\n "}),(function(e){return e.compact&&"\n width: ".concat(.75*B,"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 ")})),U=_.default.div.withConfig({displayName:"indexstyle__MainStyle",componentId:"sc-18n432u-1"})(["display:flex;border-radius:","px;overflow:hidden;height:","px;"," ",""],M.n_,Y,(function(e){return"\n background-color: ".concat((e.theme||N.Z).background.content,";\n border: ").concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).interactive.defaultBackground,";\n ")}),(function(e){return e.compact&&"\n height: ".concat(Y/2,"px;\n ")})),W=_.default.aside.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-18n432u-2"})(["width:100%;overflow:auto;"," ",""],L.w5,(function(e){return"\n border-right: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).background.panel,";\n ")})),F=_.default.div.withConfig({displayName:"indexstyle__ContentStyle",componentId:"sc-18n432u-3"})(["width:100%;overflow:auto;",""],L.w5),G=(0,_.css)(["display:flex;align-items:center;justify-content:space-between;padding:","px ","px;"],H.iI,2*H.iI),X=_.default.div.withConfig({displayName:"indexstyle__OptionStyle",componentId:"sc-18n432u-4"})([""," padding-top:","px;padding-bottom:","px;&:hover{cursor:pointer;","}",""],G,1.5*H.iI,1.5*H.iI,(function(e){return"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")}),(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme||N.Z).monotone.black,";\n ")})),q=_.default.div.withConfig({displayName:"indexstyle__ToggleValueStyle",componentId:"sc-18n432u-5"})([""," ",""],G,(function(e){return"\n border-bottom: ".concat(M.YF,"px ").concat(M.M8," ").concat((e.theme||N.Z).borders.medium2,";\n ")})),z=t(10503),K=t(33766),Q=t(90211);function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function J(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ee,ne=function(e){var n,t,r,c=e.children,u=e.compact,l=e.onClickCallback,a=e.onClickOutside,d=e.onSecondaryClick,p=e.open,h=e.options,v=void 0===h?{}:h,m=e.parentRef,x=e.query,y=e.setOpen,Z=e.toggleValueMapping,k=(0,s.useState)(null),w=k[0],E=k[1],C=(0,s.useState)(v),T=C[0],S=C[1];(0,s.useEffect)((function(){S(v)}),[v]);var R=((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,D=void 0===R?0:R,_=Object.keys(v);return(0,P.jsxs)(A.Z,{onClickOutside:a,open:!0,children:[(0,P.jsx)("div",{ref:m,children:c}),(0,P.jsxs)(V,{compact:u,display:p,top:D-5,children:[(0,P.jsxs)(U,{compact:u,children:[(0,P.jsx)(b.Z,{flex:"1",children:(0,P.jsx)(W,{children:_.map((function(e){return(0,P.jsxs)(X,{highlighted:w===e,onMouseEnter:function(){return E(e)},children:[(0,P.jsx)(j.ZP,{children:(0,Q.kC)(e)}),(0,P.jsx)(z._Q,{})]},e)}))})}),(0,P.jsx)(b.Z,{flex:"2",children:(0,P.jsx)(F,{children:w&&Object.entries((null===(r=T||v)||void 0===r?void 0:r[w])||{}).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,P.jsxs)(q,{children:[(0,P.jsx)(j.ZP,{children:(null===Z||void 0===Z?void 0:Z[t])||(0,Q.J3)((0,Q.kC)(t))}),(0,P.jsx)(I.Z,{checked:r,onCheck:function(){return S((function(e){return J(J({},e),{},(0,o.Z)({},w,J(J({},null===e||void 0===e?void 0:e[w]),{},(0,o.Z)({},t,!r))))}))}})]},t)}))})})]}),(0,P.jsx)(O.Z,{m:1,children:(0,P.jsxs)(g.Z,{children:[(0,P.jsx)(f.Z,{onClick:function(){var e=Object.entries(T).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1],c=[];return Object.entries(o).forEach((function(e){var n=(0,i.Z)(e,2),t=n[0];return n[1]&&c.push(t)})),e[r]=c,e}),{});null===l||void 0===l||l(),(0,K.g_)(x,e,{addingMultipleValues:!0,pushHistory:!0})},secondary:!0,children:"Apply"}),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,{noBackground:!0,onClick:function(){y(!1),null===d||void 0===d||d()},children:"Defaults"})]})})]})]})},te=t(46261),re=t(99994),ie="".concat(1.5*H.iI,"px"),oe=40*H.iI,ce={bold:!0,greyBorder:!0,paddingBottom:9,paddingTop:9};!function(e){e[e.SECONDARY=1]="SECONDARY",e[e.DELETE=2]="DELETE"}(ee||(ee={}));var ue={autoHide:!0,size:null,widthFitContent:!0},le=t(7715),ae=t(9736);function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){(0,o.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 pe=function(e){var n=e.addButtonProps,t=e.deleteRowProps,r=e.filterOptions,o=void 0===r?{}:r,c=e.filterValueLabelMapping,u=e.groupButtonProps,l=e.moreActionsMenuItems,a=e.query,d=void 0===a?{}:a,f=e.searchProps,h=e.secondaryActionButtonProps,m=e.selectedRowId,x=e.setSelectedRow,Z=(0,ae.Ct)(),k=(0,p.useRouter)(),w=(0,s.useRef)(null),E=(0,s.useRef)(null),C=(0,s.useRef)(null),T=(0,s.useRef)(null),I=(0,s.useRef)(null),_=(0,s.useState)(!1),N=_[0],L=_[1],B=(0,s.useState)(!1),Y=B[0],V=B[1],U=(0,s.useState)(!1),W=U[0],F=U[1],G=(0,s.useState)(!1),X=G[0],q=G[1],K=(0,s.useState)(null),Q=K[0],$=K[1],J=!m,de=(0,s.useCallback)((function(){return L(!1)}),[]),pe=(0,s.useCallback)((function(){return V(!1)}),[]),fe=(0,s.useCallback)((function(){return F(!1)}),[]),he=(0,s.useCallback)((function(){return q(null)}),[]),be=(0,s.useCallback)((function(){return $(null)}),[]),ge=h||{},ve=ge.Icon,me=ge.confirmationDescription,Oe=ge.confirmationMessage,je=ge.isLoading,xe=ge.label,ye=ge.onClick,Pe=ge.openConfirmationDialogue,Ze=ge.tooltip,ke=t||{},we=ke.confirmationMessage,Ee=ke.isLoading,Ce=ke.item,Te=ke.onDelete,Se=f||{},Ae=Se.placeholder,Re=Se.onChange,De=Se.value,Ie=(0,s.useMemo)((function(){return Object.entries(o).reduce((function(e,n){var t=(0,i.Z)(n,2),r=t[0],o=t[1];return e[r]={},o.forEach((function(n){var t,i=(null===(t=d["".concat(r,"[]")])||void 0===t?void 0:t.includes(n))||!1;e[r][n]=i})),e}),{})}),[o,d]),_e=n||{},Ne=_e.label,Me=_e.menuItems,Le=_e.isLoading,He=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:Me,onClickCallback:de,onClickOutside:de,open:N,parentRef:w,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/NewItemMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{background:re.eW,beforeElement:(0,P.jsx)(z.mm,{size:2.5*H.iI}),loading:Le,onClick:function(e){e.preventDefault(),L((function(e){return!e}))},uuid:"Table/Toolbar/AddButton",children:Ne}))})}),[Ne,Me,N,de,Le]),Be=(0,s.useMemo)((function(){return(0,le.dw)(Ie)}),[Ie]),Ye=(0,s.useMemo)((function(){return(0,P.jsx)(ne,{compact:!0,onClickCallback:pe,onClickOutside:pe,onSecondaryClick:function(){return k.push("/pipelines")},open:Y,options:Ie,parentRef:E,query:d,setOpen:V,toggleValueMapping:c,children:(0,P.jsx)(v.ZP,se(se({},ce),{},{afterElement:Be>0?(0,P.jsx)(S.Z,{cyan:!0,noVerticalPadding:!0,children:(0,P.jsx)(j.ZP,{bold:!0,inverted:!0,children:Be})}):null,beforeElement:(0,P.jsx)(z.wn,{size:2*H.iI}),onClick:function(){return V((function(e){return!e}))},uuid:"Table/Toolbar/FilterButton",children:"Filter"}))})}),[pe,Y,Ie,c,Be,d,k]),Ve=u||{},Ue=Ve.groupByLabel,We=Ve.menuItems,Fe=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:We,onClickCallback:fe,onClickOutside:fe,open:W,parentRef:C,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/GroupMenu",children:(0,P.jsx)(v.ZP,se(se({},ce),{},{beforeElement:(0,P.jsx)(z.ZA,{size:2.5*H.iI}),onClick:function(){F((function(e){return!e}))},uuid:"Table/Toolbar/GroupButton",children:Ue?"Grouped by ".concat(Ue):"Group"}))})}),[fe,W,We]),Ge=(0,s.useMemo)((function(){return(0,P.jsx)(R.Z,{disableKeyboardShortcuts:!0,items:l,onClickCallback:he,onClickOutside:he,open:X,parentRef:T,roundedStyle:!0,topOffset:1,uuid:"Table/Toolbar/MoreActionsMenu",children:(0,P.jsx)(te.Z,se(se({},ue),{},{label:"More actions",children:(0,P.jsx)(v.ZP,{Icon:z.mH,bold:!0,disabled:J,greyBorder:!0,onClick:function(){return q((function(e){return!e}))},smallIcon:!0,uuid:"Table/Toolbar/MoreActionsButton"})}))})}),[he,J,X,l]);return(0,P.jsxs)(g.Z,{alignItems:"center",children:[He,(0,P.jsx)(O.Z,{mr:ie}),Ye,(null===We||void 0===We?void 0:We.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Fe}),!Z&&ye&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:Ze,children:(0,P.jsx)(v.ZP,{Icon:!je&&ve,bold:!0,disabled:J,greyBorder:!0,loading:je,onClick:Pe?function(){return $(ee.SECONDARY)}:ye,smallIcon:!0,uuid:"Table/Toolbar/SecondaryActionButton",children:xe})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.SECONDARY,children:(0,P.jsx)(D.Z,{onCancel:be,onClick:function(){ye(),be(),x(null)},subtitle:me,title:Oe,top:58,width:oe})})]}),!Z&&Te&&(0,P.jsxs)(O.Z,{ml:ie,children:[(0,P.jsx)(te.Z,se(se({},ue),{},{label:"Delete ".concat(Ce),children:(0,P.jsx)(v.ZP,{Icon:!Ee&&z.rF,bold:!0,disabled:J,greyBorder:!0,loading:Ee,onClick:function(){return $(ee.DELETE)},smallIcon:!0,uuid:"Table/Toolbar/DeleteButton"})})),(0,P.jsx)(A.Z,{onClickOutside:be,open:Q===ee.DELETE,children:(0,P.jsx)(D.Z,{danger:!0,onCancel:be,onClick:function(){Te(m),be(),x(null)},subtitle:we,title:"Are you sure you want to delete the ".concat(Ce," ").concat(m,"?"),top:58,width:oe})})]}),!Z&&(null===l||void 0===l?void 0:l.length)>0&&(0,P.jsx)(O.Z,{ml:ie,children:Ge}),Re&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(O.Z,{ml:ie}),(0,P.jsx)(b.Z,{flex:1,children:(0,P.jsx)(y.Z,{afterIcon:De?(0,P.jsx)(z.x8,{}):null,afterIconClick:function(){var e;Re(""),null===I||void 0===I||null===(e=I.current)||void 0===e||e.focus()},afterIconSize:1.5*H.iI,beforeIcon:(0,P.jsx)(z.HN,{}),borderRadius:M.n_,defaultColor:!0,fullWidth:!0,greyBorder:!0,maxWidth:60*H.iI,onChange:function(e){return Re(e.target.value)},paddingVertical:9,placeholder:Ae||null,ref:I,value:De})})]})]})},fe=t(82531),he=t(86422),be=t(93348),ge=t(3055),ve=t(45838),me=t(59e3),Oe=t(96510),je=t(66653),xe=t(83608);function ye(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 Pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ye(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ye(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze={borderRadius:M.BG,iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function ke(){var e=(0,p.useRouter)(),n=(0,s.useState)(null),t=n[0],r=n[1],c=(0,s.useState)(null),u=c[0],l=c[1],g=(0,s.useState)({}),v=g[0],m=g[1],x=(0,s.useState)(null),y=x[0],E=x[1],S=(0,me.iV)(),A=(0,me.DQ)(S,[w.$1.STATUS,w.$1.TYPE]),R=null===S||void 0===S?void 0:S[w.$1.GROUP],D=fe.ZP.pipelines.list(Pe(Pe({},A),{},{include_schedules:1})),I=D.data,_=D.mutate,M=(0,s.useMemo)((function(){var e=(null===I||void 0===I?void 0:I.pipelines)||[];if(u){var n=u.toLowerCase();e=e.filter((function(e){var t=e.name,r=e.description,i=e.uuid;return(null===t||void 0===t?void 0:t.toLowerCase().includes(n))||(null===i||void 0===i?void 0:i.toLowerCase().includes(n))||(null===r||void 0===r?void 0:r.toLowerCase().includes(n))}))}return e}),[null===I||void 0===I?void 0:I.pipelines,u]),L=function(e){return(0,d.Db)(fe.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,Oe.wD)(n,{callback:function(n){var t=n.pipeline.uuid;null===e||void 0===e||e(t)},onErrorCallback:function(e,n){return E({errors:n,response:e})}})}})},B=L((function(n){return e.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))})),Y=(0,i.Z)(B,2),V=Y[0],U=Y[1].isLoading,W=L((function(){return null===_||void 0===_?void 0:_()})),F=(0,i.Z)(W,2),G=F[0],X=F[1].isLoading,q=(0,d.Db)((function(e){return fe.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(e){var n=e.pipeline.uuid;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!1))})),_(),null===le||void 0===le||le(),r(null)},onErrorCallback:function(e,n){var t,r=null===e||void 0===e||null===(t=e.url_parameters)||void 0===t?void 0:t.pk;m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},r,!1))})),E({errors:n,response:e})}})}}),$=(0,i.Z)(q,2),J=$[0],ee=$[1].isLoading,ne=(0,d.Db)((function(e){return fe.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,Oe.wD)(e,{callback:function(){null===_||void 0===_||_()},onErrorCallback:function(e,n){return E({errors:n,response:e})}})}}),te=(0,i.Z)(ne,2),re=te[0],ie=te[1].isLoading,oe=(0,xe.dd)((function(e){var n=e.pipelineDescription,r=e.pipelineName;return(0,P.jsx)(Z,{isLoading:ee,minWidth:55*H.iI,noEmptyValue:!!r,onClose:le,onSave:function(e){if(t){var n=t.uuid,i={uuid:n};r?i.name=e:i.description=e,m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},n,!0))})),J(i)}},textArea:!r,title:r?"Rename pipeline":"Edit description",value:r||n})}),{},[ee,t],{background:!0,uuid:"rename_pipeline_and_save"}),ce=(0,i.Z)(oe,2),ue=ce[0],le=ce[1],ae=(0,s.useMemo)((function(){return(0,P.jsx)(pe,{addButtonProps:{isLoading:U,label:"New",menuItems:[{label:function(){return"Standard (batch)"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)()}})},uuid:"Pipelines/NewPipelineMenu/standard"},{label:function(){return"Data integration"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.INTEGRATION}})},uuid:"Pipelines/NewPipelineMenu/integration"},{label:function(){return"Streaming"},onClick:function(){return V({pipeline:{name:(0,Q.Y6)(),type:w.qL.STREAMING}})},uuid:"Pipelines/NewPipelineMenu/streaming"}]},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:ie,item:"pipeline",onDelete:function(){return re(null===t||void 0===t?void 0:t.uuid)}},filterOptions:{status:Object.values(w.QK),type:Object.values(w.qL)},filterValueLabelMapping:w.G7,groupButtonProps:{groupByLabel:R,menuItems:[{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.STATUS?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.STATUS)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.STATUS?null:w.r0.STATUS),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:(0,P.jsx)(z.Jr,{fill:R===w.r0.TYPE?N.Z.content.default:N.Z.interactive.transparent,size:2*H.iI}),label:function(){return(0,Q.kC)(w.r0.TYPE)},onClick:function(){return(0,K.u7)((0,o.Z)({},w.$1.GROUP,R===w.r0.TYPE?null:w.r0.TYPE),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return ue({pipelineName:null===t||void 0===t?void 0:t.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return ue({pipelineDescription:null===t||void 0===t?void 0:t.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],query:A,searchProps:{onChange:l,value:u},secondaryActionButtonProps:{Icon:z.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===t||void 0===t?void 0:t.uuid,"?"),isLoading:X,onClick:function(){return G({pipeline:{clone_pipeline_uuid:null===t||void 0===t?void 0:t.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},selectedRowId:null===t||void 0===t?void 0:t.uuid,setSelectedRow:r})}),[G,V,re,R,X,U,ie,A,u,null===t||void 0===t?void 0:t.description,null===t||void 0===t?void 0:t.name,null===t||void 0===t?void 0:t.uuid,ue]);return(0,P.jsx)(h.Z,{errors:y,setErrors:E,subheaderChildren:ae,title:"Pipelines",uuid:"pipelines/index",children:0===(null===M||void 0===M?void 0:M.length)?(0,P.jsx)(O.Z,{px:3,py:1,children:I?(0,P.jsx)(j.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,P.jsx)(C.Z,{inverted:!0,large:!0})}):(0,P.jsx)(ve.cl,{includePadding:!!R,maxHeight:"calc(100vh - ".concat(ge.Mz+74,"px)"),children:(0,P.jsx)(T.Z,{columnFlex:[null,1,3,4,1,1,1,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,Q.kC)(w.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,Q.kC)(w.r0.TYPE)},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,uuid:"Actions"}],grouping:{column:(0,Q.kC)(R),columnIndex:R===w.r0.STATUS?1:R===w.r0.TYPE?4:null,values:R===w.r0.STATUS?Object.values(w.QK).map((function(e){return(0,Q.J3)(e)})):R===w.r0.TYPE?Object.values(w.qL).map((function(e){return w.G7[e]})):[]},isSelectedRow:function(e){var n;return(null===(n=M[e])||void 0===n?void 0:n.uuid)===(null===t||void 0===t?void 0:t.uuid)},onClickRow:function(e){return r((function(n){var t=M[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]","/pipelines/".concat(M[n].uuid))},rows:M.map((function(n,t){var r=n.blocks,i=n.description,c=n.schedules,u=n.type,l=n.uuid,d=r.filter((function(e){var n=e.type;return he.tf.SCRATCHPAD!==n})).length,s=c.length,p=c.find((function(e){var n=e.status;return be.fq.ACTIVE===n}));return[s>=1||v[l]?(0,P.jsx)(f.Z,{iconOnly:!0,loading:!!v[l],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(e){(0,je.j)(e),m((function(e){return Pe(Pe({},e),{},(0,o.Z)({},l,!0))})),J(Pe(Pe({},n),{},{status:p?be.fq.INACTIVE:be.fq.ACTIVE}))},children:p?(0,P.jsx)(z.dz,{muted:!0,size:2*H.iI}):(0,P.jsx)(z.Py,{default:!0,size:2*H.iI})}):null,(0,P.jsx)(j.ZP,{default:!p,monospace:!0,success:!!p,children:p?be.fq.ACTIVE:s>=1?be.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(t)),(0,P.jsx)(a(),{as:"/pipelines/".concat(l),href:"/pipelines/[pipeline]",passHref:!0,children:(0,P.jsx)(k.Z,{sameColorAsText:!0,children:l})},"pipeline_name_".concat(t)),(0,P.jsx)(j.ZP,{default:!0,title:i,width:90*H.iI,children:i},"pipeline_description_".concat(t)),(0,P.jsx)(j.ZP,{children:w.G7[u]},"pipeline_type_".concat(t)),(0,P.jsx)(j.ZP,{default:0===d,monospace:!0,children:d},"pipeline_block_count_".concat(t)),(0,P.jsx)(j.ZP,{default:0===s,monospace:!0,children:s},"pipeline_trigger_count_".concat(t)),(0,P.jsxs)(b.Z,{flex:1,justifyContent:"flex-end",children:[(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]","/pipelines/".concat(l))},title:"Detail",children:(0,P.jsx)(z.UY,{default:!0,size:2*H.iI})})),(0,P.jsx)(O.Z,{mr:1}),(0,P.jsx)(f.Z,Pe(Pe({},Ze),{},{onClick:function(){e.push("/pipelines/[pipeline]/logs","/pipelines/".concat(l,"/logs"))},title:"Logs",children:(0,P.jsx)(z.$B,{default:!0,size:2*H.iI})}))]},"chevron_icon_".concat(t))]})),stickyHeader:!0})})})}ke.getInitialProps=(0,r.Z)(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var we=(0,E.Z)(ke)},33766:function(e,n,t){"use strict";t.d(n,{g_:function(){return p},u7:function(){return s}});var r=t(75582),i=t(82394),o=t(34376),c=t.n(o),u=t(59e3),l=t(24224);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,o=t.pushHistory,l=i?{}:(0,u.iV)();n=window.location.pathname;var a=o?c().push:c().replace,s=d(d({},l),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];"undefined"!==typeof i&&null!==i||delete s[t]}));var p=(0,u.uM)(s);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return a(c().router.pathname,f,{shallow:!0})}function p(e,n,t){var i=t.addingMultipleValues,o=t.isList,c=t.itemsPerPage,u=t.pushHistory,a=void 0!==u&&u,p=t.resetLimitParams,f=d({},e);i?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];if(Array.isArray(i)){var o="".concat(t,"[]");f[o]=i.map(String)}})):o?Object.entries(n).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1],o=String(i),c="".concat(t,"[]"),u=f[c];u&&Array.isArray(u)?(u=u.map(String)).includes(o)?f[c]=(0,l.Od)(u,(function(e){return e===o})):f[c]=u.concat(o):f[c]=[o]})):f=d(d({},f),n),p&&(f._limit=c||20,f._offset=0),s(f,{pushHistory:a})}},79274:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return t(46614)}])}},function(e){e.O(0,[3850,5716,2344,4506,6166,8180,9774,2888,179],(function(){return n=79274,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|