mage-ai 0.8.4__py3-none-any.whl → 0.8.6__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.

Files changed (94) hide show
  1. mage_ai/api/policies/BlockPolicy.py +2 -0
  2. mage_ai/api/policies/PipelinePolicy.py +1 -0
  3. mage_ai/api/presenters/BlockPresenter.py +1 -0
  4. mage_ai/api/presenters/OutputPresenter.py +1 -0
  5. mage_ai/api/presenters/PipelinePresenter.py +6 -1
  6. mage_ai/data_preparation/models/block/__init__.py +18 -4
  7. mage_ai/data_preparation/models/block/dbt/__init__.py +50 -1
  8. mage_ai/data_preparation/models/block/dbt/utils/__init__.py +136 -60
  9. mage_ai/data_preparation/models/block/utils.py +2 -1
  10. mage_ai/data_preparation/models/pipeline.py +5 -3
  11. mage_ai/data_preparation/repo_manager.py +1 -1
  12. mage_ai/data_preparation/storage/local_storage.py +1 -1
  13. mage_ai/data_preparation/templates/custom/python/default.jinja +1 -1
  14. mage_ai/data_preparation/templates/data_exporters/default.jinja +2 -4
  15. mage_ai/data_preparation/templates/data_exporters/pyspark/default.jinja +2 -2
  16. mage_ai/data_preparation/templates/data_loaders/api.py +1 -1
  17. mage_ai/data_preparation/templates/data_loaders/default.jinja +1 -1
  18. mage_ai/data_preparation/templates/data_loaders/file.py +1 -0
  19. mage_ai/data_preparation/templates/data_loaders/pyspark/default.jinja +1 -1
  20. mage_ai/data_preparation/templates/testable.jinja +2 -2
  21. mage_ai/data_preparation/templates/transformers/data_warehouse_transformer.jinja +2 -0
  22. mage_ai/data_preparation/templates/transformers/default.jinja +4 -6
  23. mage_ai/data_preparation/templates/transformers/default_pyspark.jinja +4 -4
  24. mage_ai/data_preparation/templates/transformers/transformer_actions/action.jinja +2 -0
  25. mage_ai/io/base.py +11 -1
  26. mage_ai/io/postgres.py +10 -5
  27. mage_ai/server/constants.py +1 -1
  28. mage_ai/server/frontend_dist/404.html +2 -2
  29. mage_ai/server/frontend_dist/404.html.html +2 -2
  30. mage_ai/server/frontend_dist/_next/static/chunks/{2249-84de2142241f4925.js → 2249-70929b8c547bbc18.js} +1 -1
  31. mage_ai/server/frontend_dist/_next/static/chunks/4846-58b7e138009c98a2.js +1 -0
  32. mage_ai/server/frontend_dist/_next/static/chunks/{5944-9488f2ddf3543b08.js → 5944-757b7898608a65e1.js} +1 -1
  33. mage_ai/server/frontend_dist/_next/static/chunks/{6641-fb7a8be8444f2dd4.js → 6641-a0ed2bd8f5dc777b.js} +1 -1
  34. mage_ai/server/frontend_dist/_next/static/chunks/8961-7a2143c4424c9217.js +1 -0
  35. mage_ai/server/frontend_dist/_next/static/chunks/{9140-836abb2721055e82.js → 9140-6f67e0879394373d.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/9898-51ca6a904b7a2382.js +1 -0
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a1e8869ed201ce7e.js +1 -0
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-0678cf63c79072a7.js +1 -0
  39. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-5ccc75887776efb0.js +1 -0
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a6dbd67285ecc5a5.js → block-runs-8f23f7ca9efcb069.js} +1 -1
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d2bbafbb5b2c09e7.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-b0b91245d3299bdf.js +1 -0
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-5d7c45bb058a3f20.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-dbce4f85a95ea336.js → triggers-e0172c422c95eda9.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/{0jln56azuIZflrR1CXt9U → okm8eXXn0kUptL5A1B7a6}/_buildManifest.js +1 -1
  46. mage_ai/server/frontend_dist/index.html +2 -2
  47. mage_ai/server/frontend_dist/manage.html +2 -2
  48. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  49. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  50. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  51. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  52. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  53. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  54. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  55. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  56. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  57. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  58. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  59. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  60. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  61. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  62. mage_ai/server/frontend_dist/pipelines.html +2 -2
  63. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  64. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  65. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  66. mage_ai/server/frontend_dist/settings.html +2 -2
  67. mage_ai/server/frontend_dist/sign-in.html +13 -13
  68. mage_ai/server/frontend_dist/terminal.html +2 -2
  69. mage_ai/server/frontend_dist/test.html +2 -2
  70. mage_ai/server/frontend_dist/triggers.html +2 -2
  71. mage_ai/server/server.py +1 -0
  72. mage_ai/server/utils/output_display.py +7 -0
  73. mage_ai/server/websocket_server.py +2 -2
  74. mage_ai/services/datadog/__init__.py +123 -0
  75. mage_ai/tests/data_preparation/test_templates.py +34 -86
  76. mage_ai/tests/services/datadog/__init__.py +0 -0
  77. mage_ai/tests/services/datadog/test_datadog.py +69 -0
  78. {mage_ai-0.8.4.dist-info → mage_ai-0.8.6.dist-info}/METADATA +2 -1
  79. {mage_ai-0.8.4.dist-info → mage_ai-0.8.6.dist-info}/RECORD +85 -82
  80. mage_ai/server/frontend_dist/_next/static/chunks/4846-64f9afc02d45293c.js +0 -1
  81. mage_ai/server/frontend_dist/_next/static/chunks/8961-e25997bc088e0d19.js +0 -1
  82. mage_ai/server/frontend_dist/_next/static/chunks/9898-91c6384c9bd33ca7.js +0 -1
  83. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-688184bd8b4d4f5c.js +0 -1
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-c6dfcc4f231cfa5a.js +0 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-abce05c25bee218d.js +0 -1
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-a056c0e384d39c9b.js +0 -1
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-6a8545f96cc7b8f2.js +0 -1
  88. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-1734d248ec2b6c24.js +0 -1
  89. /mage_ai/server/frontend_dist/_next/static/{0jln56azuIZflrR1CXt9U → okm8eXXn0kUptL5A1B7a6}/_middlewareManifest.js +0 -0
  90. /mage_ai/server/frontend_dist/_next/static/{0jln56azuIZflrR1CXt9U → okm8eXXn0kUptL5A1B7a6}/_ssgManifest.js +0 -0
  91. {mage_ai-0.8.4.dist-info → mage_ai-0.8.6.dist-info}/LICENSE +0 -0
  92. {mage_ai-0.8.4.dist-info → mage_ai-0.8.6.dist-info}/WHEEL +0 -0
  93. {mage_ai-0.8.4.dist-info → mage_ai-0.8.6.dist-info}/entry_points.txt +0 -0
  94. {mage_ai-0.8.4.dist-info → mage_ai-0.8.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{59739:function(e,n,t){"use strict";var r=t(56669);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,i,c){if(c!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},38341:function(e,n,t){"use strict";var r=t(21831),o=t(82394),i=t(26304),c=(t(82684),t(9518)),l=t(67971),u=t(86673),a=t(19711),s=t(23831),d=t(10503),p=t(73942),f=t(49125),h=t(28598),m=["beforeIcon","checked","disabled","errorMessage","label","labelDescription","large","meta","monospace","onClick","required","small","warning","xsmall"];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 b(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,o.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 v=c.default.div.withConfig({displayName:"Checkbox__CheckboxContainer",componentId:"sc-ujqx42-0"})(["display:inline-block;vertical-align:middle;cursor:pointer;"]),j=c.default.div.withConfig({displayName:"Checkbox__ErrorContainer",componentId:"sc-ujqx42-1"})(["margin-top:4px;"]),x=c.default.input.withConfig({displayName:"Checkbox__HiddenCheckbox",componentId:"sc-ujqx42-2"})(["border:0;clip:rect(0 0 0 0);clippath:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;",""],(function(e){return e.notClickable&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,"\n border-color: ").concat((e.theme.content||s.Z.content).disabled,"\n\n &:hover {\n cursor: not-allowed;\n }\n ")})),O=c.default.div.withConfig({displayName:"Checkbox__StyledCheckbox",componentId:"sc-ujqx42-3"})(["border-radius:","px;height:","px;transition:all 150ms;width:","px;svg{position:relative;visibility:",";}"," "," "," "," input[disabled]{cursor:default;}"," ",""],.5*f.iI,2*f.iI,2*f.iI,(function(e){return e.checked||e.required?"visible":"hidden"}),(function(e){return e.large&&"\n svg {\n left: -4px;\n top: -8px;\n }\n "}),(function(e){return!e.checked&&"\n background-color: ".concat((e.theme.background||s.Z.background).popup,";\n border: ").concat(p.PV,"px ").concat(p.M8," ").concat((e.theme.content||s.Z.content).muted,";\n ")}),(function(e){return e.checked&&"\n background-color: ".concat((e.theme.interactive||s.Z.interactive).checked,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.required&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border: ").concat(p.YF,"px ").concat(p.M8," transparent;\n ")}),(function(e){return e.disabled&&"\n background-color: ".concat((e.theme.content||s.Z.content).disabled,";\n border-color: ").concat((e.theme.content||s.Z.content).disabled,";\n\n &:hover {\n cursor: not-allowed;\n }\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||s.Z.accent).warning,";\n border-color: ").concat((e.theme.interactive||s.Z.interactive).defaultBorder,"\n ")})),y=c.default.label.withConfig({displayName:"Checkbox__LabelStyle",componentId:"sc-ujqx42-4"})(["-ms-flex-direction:column;align-items:center;display:flex;flex-direction:column;flex-direction:row;&:hover{cursor:pointer;}"]);n.Z=function(e){var n=e.beforeIcon,t=e.checked,o=e.disabled,c=e.errorMessage,s=e.label,p=e.labelDescription,g=e.large,Z=e.meta,_=e.monospace,k=void 0!==_&&_,P=e.onClick,w=e.required,C=e.small,S=void 0!==C&&C,I=e.warning,D=e.xsmall,L=void 0!==D&&D,A=(0,i.Z)(e,m),E=I||!!(c||Z&&Z.touched&&Z.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(y,{onClick:function(e){e.preventDefault(),P&&P(e)},children:[(0,h.jsxs)(v,{children:[(0,h.jsx)(x,b(b({},A),{},{disabled:o?"disabled":void 0,notClickable:o})),(0,h.jsx)(O,{checked:t,disabled:o,large:g,required:w,warning:E,children:(0,h.jsx)(d.Jr,{size:f.iI*(g?3:2)})})]}),n&&(0,h.jsx)(u.Z,{ml:1,children:(0,h.jsx)(l.Z,{children:n})}),s&&(0,h.jsxs)(u.Z,{pl:1,children:["string"===typeof s&&(0,h.jsx)(a.ZP,{disabled:o,lineThrough:o,monospace:k,small:S,xsmall:L,children:s}),"string"!==typeof s&&s,p&&(0,h.jsx)(a.ZP,{muted:!0,small:!0,children:p})]})]}),(c||Z&&Z.touched&&Z.error)&&(0,h.jsx)(j,{children:(0,h.jsx)(a.ZP,{small:!0,warning:!0,children:c?(0,r.Z)(c):Z.error})})]})}},55378:function(e,n,t){"use strict";var r=t(82394),o=t(26304),i=t(82684),c=t(9518),l=t(69898),u=t(31969),a=t(49125),s=t(28598),d=["beforeIcon","children","label","multiple","placeholder"];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 f(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 h=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})(["",' background-image:url("data:image/svg+xml;utf8,','");background-repeat:no-repeat;background-position:-webkit-calc(100% - ',"px) center;background-position:calc(100% - ","px) center;padding-right:","px;&:hover{cursor:pointer;}"," "," "," ",""],l.p,"\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",a.iI,a.iI,2.5*a.iI,(function(e){return!e.hasContent&&!e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).inverted,";\n ")})),m=function(e,n){var t=e.beforeIcon,r=e.children,i=e.label,c=e.multiple,u=e.placeholder,a=(0,o.Z)(e,d);return(0,s.jsx)(l.Z,f(f({},a),{},{beforeIcon:t,input:(0,s.jsxs)(h,f(f({multiple:c},a),{},{children:[(i||u)&&(0,s.jsx)("option",{disabled:!0,selected:!0,value:"",children:i||u}),r]})),label:i,placeholder:u,ref:n,setContentOnMount:!0,showLabelRequirement:function(e){return!!e.content}}))};n.Z=i.forwardRef(m)},44613:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return qe}});var r,o=t(77837),i=t(82394),c=t(38860),l=t.n(c),u=t(89565),a=t.n(u),s=t(12691),d=t.n(s),p=t(9518),f=t(4804),h=t(82684),m=t(86422),g=t(16634),b=t(34744),v=t(75582),j=t(60328),x=t(38341),O=t(67971),y=t(86673),Z=t(19711),_=t(2850),k=t(49125),P=p.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],k.iI/2,k.iI/2);!function(e){e.CRITICAL="CRITICAL",e.DEBUG="DEBUG",e.ERROR="ERROR",e.EXCEPTION="EXCEPTION",e.INFO="INFO",e.LOG="LOG",e.WARNING="WARNING"}(r||(r={}));var w,C,S=[r.CRITICAL,r.DEBUG,r.ERROR,r.EXCEPTION,r.INFO,r.LOG,r.WARNING];!function(e){e.LAST_HOUR="Last hour",e.LAST_DAY="Last day",e.LAST_WEEK="Last week",e.LAST_30_DAYS="Last 30 days",e.CUSTOM_RANGE="Custom range"}(w||(w={}));var I="_limit",D="_offset",L=20,A=[w.LAST_HOUR,w.LAST_DAY,w.LAST_WEEK,w.LAST_30_DAYS],E=(C={},(0,i.Z)(C,w.LAST_HOUR,3600),(0,i.Z)(C,w.LAST_DAY,86400),(0,i.Z)(C,w.LAST_WEEK,604800),(0,i.Z)(C,w.LAST_30_DAYS,2592e3),C),T=t(73942),R=t(73899);var N=(0,p.css)(["",""],(function(e){return"\n background-color: ".concat(function(e){var n=e.critical,t=e.debug,r=e.error,o=e.exception,i=e.info,c=e.log,l=e.warning;return n?R.Zl:t?R.EG:r?R.hl:o?R.hM:i?R.gN:c?R.Wd:l?R.$R:"transparent"}(e),";\n ")})),B=p.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],N,T.n_),M=t(90211),Y=t(44162),q=t(33766),W=t(24224),F=t(28598);function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?J(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):J(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.blocks,t=e.query,r=(0,h.useContext)(p.ThemeContext),o=(0,h.useCallback)((function(e,n){var r=n.isList,o=n.resetLimitParams,i=H({},t);r?Object.entries(e).forEach((function(e){var n=(0,v.Z)(e,2),t=n[0],r=n[1],o=String(r),c="".concat(t,"[]"),l=i[c];l&&Array.isArray(l)?(l=l.map(String)).includes(o)?i[c]=(0,W.Od)(l,(function(e){return e===o})):i[c]=l.concat(o):i[c]=[o]})):i=H(H({},i),e),o&&(i._limit=L,i._offset=0),(0,q.u)(i)}),[t]),c=(0,h.useMemo)((function(){return t["level[]"]}),[t]),l=(0,h.useMemo)((function(){return t["block_type[]"]}),[t]),u=(0,h.useMemo)((function(){return t["block_uuid[]"]}),[t]),a=(0,h.useMemo)((function(){return t["pipeline_schedule_id[]"]}),[t]),s=(0,h.useMemo)((function(){return t["pipeline_run_id[]"]}),[t]),d=(0,h.useMemo)((function(){return t["block_run_id[]"]}),[t]);return(0,F.jsx)(_.M,{children:(0,F.jsxs)(y.Z,{p:k.cd,children:[(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),S.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({level:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e)))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(B,H({},(0,i.Z)({},e.toLowerCase(),!0))),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,children:(0,M.kC)(e.toLowerCase())})]})})},e)}))]}),(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Block type"})}),[m.tf.DATA_LOADER,m.tf.TRANSFORMER,m.tf.DATA_EXPORTER].map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({block_type:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(g.Z,{color:(0,Y.qn)(e,{theme:r}).accent,size:1.5*k.iI,square:!0}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Block"})}),n.filter((function(e){var n=e.type;return m.tf.SCRATCHPAD!==n})).map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(u)&&(null===u||void 0===u?void 0:u.includes(String(e.uuid)))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(g.Z,{color:(0,Y.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*k.iI,square:!0}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===a||void 0===a?void 0:a.length)&&(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),a.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({pipeline_schedule_id:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(a)&&(null===a||void 0===a?void 0:a.includes(e))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===s||void 0===s?void 0:s.length)&&(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),s.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({pipeline_run_id:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(s)&&(null===s||void 0===s?void 0:s.includes(e))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===d||void 0===d?void 0:d.length)&&(0,F.jsxs)(y.Z,{mb:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),d.map((function(e){return(0,F.jsx)(j.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return o({block_run_id:e},{isList:!0})},children:(0,F.jsx)(P,{children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(x.Z,{checked:Array.isArray(d)&&(null===d||void 0===d?void 0:d.includes(e))}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},U=t(93461),X=t(11135),z=t(10919),V=t(32316),K=t(87815),Q=p.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],N,.5*k.iI),$=p.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],N,T.BG,.25*k.iI,.5*k.iI),ee=t(10503),ne=t(92083),te=t.n(ne);function re(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?re(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ie=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function ce(e){var n=e.content.trim().split(ie),t=[],r=[];return n.forEach((function(e){"\n"===e?(r.length>=1&&t.push(r.join(" ").trim()),r=[]):r.filter((function(e){return e})).length<=1&&r.push(e.trim())})),t.push(r.join(" ").trim()),t.map((function(n){return function(e){var n=e.content.trim().match(ie),t=null===n||void 0===n?void 0:n[1],r=null===n||void 0===n?void 0:n[2],o={};return r&&(0,M.Pb)(r)&&(o=JSON.parse(r)),oe(oe({},e),{},{createdAt:t,data:o})}(oe(oe({},e),{},{content:n}))}))}function le(e){return e&&te().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS")}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,i.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 se=["error","error_stack","error_stacktrace"],de={uuid:"Details"},pe={uuid:"Errors"};var fe,he,me=function(e){var n=e.log,t=e.onClose,r=(0,h.useState)(de),o=r[0],c=r[1],l=(0,h.useState)(!1),u=l[0],a=l[1],s=n.data,d=n.name,p=n.path,f=s||{},m=f.error,g=f.error_stack,x=f.error_stacktrace,_=f.level,P=f.timestamp,w=(0,i.Z)({},_.toLowerCase(),!0),C=(0,h.useMemo)((function(){var e=[["file name",d],["file path",p]];return Object.entries(s).forEach((function(n){var t=(0,v.Z)(n,2),r=t[0],o=t[1];se.includes(r)||e.push([r,o])})),x&&e.push(["error",x]),(0,W.YC)(e,(function(e){var n=(0,v.Z)(e,2),t=n[0];n[1];return t}))}),[s,x,d,p]),S=(0,h.useMemo)((function(){var e=[de];return m&&e.push(pe),(0,F.jsx)(V.Z,{onClickTab:c,selectedTabUUID:null===o||void 0===o?void 0:o.uuid,tabs:e})}),[m,g,x,o,c]);return(0,F.jsxs)("div",{children:[(0,F.jsx)(Q,ae({},w)),(0,F.jsx)(y.Z,{p:k.cd,children:(0,F.jsxs)(O.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsxs)(U.Z,{alignItems:"center",children:[(0,F.jsx)($,ae(ae({},w),{},{children:(0,F.jsx)(Z.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:_})})),(0,F.jsx)(y.Z,{mr:k.cd}),(0,F.jsx)(Z.ZP,{monospace:!0,children:le(P)})]}),(0,F.jsx)(j.Z,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,F.jsx)(ee.x8,{size:1.5*k.iI})})]})}),(0,F.jsx)(b.Z,{medium:!0}),(0,F.jsx)(y.Z,{py:k.cd,children:S}),de.uuid===(null===o||void 0===o?void 0:o.uuid)&&(0,F.jsx)(K.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===C||void 0===C?void 0:C.map((function(e,n){var t=(0,v.Z)(e,2),r=t[0],o=t[1],i="message"===r,c="tags"===r,l=o,s=o;return c?s=l=(0,M.Pb)(o)?JSON.parse(JSON.stringify(o,null,2)):JSON.stringify(o,null,2):i&&u&&(0,M.Pb)(o)&&(s=JSON.stringify(JSON.parse(o),null,2),l=(0,F.jsx)("pre",{children:s})),[(0,F.jsx)(Z.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Z.ZP,{monospace:!0,textOverflow:!0,title:s,whiteSpaceNormal:i&&u||c,wordBreak:i&&u||c,children:[!c&&l,c&&(0,F.jsx)("pre",{children:l})]},"".concat(r,"_").concat(n,"_val")),i&&(0,F.jsx)(z.Z,{muted:!0,onClick:function(){return a((function(e){return!e}))},children:u?"Click to hide log":"Click to show full log message"})]})]})),uuid:"LogDetail"}),pe.uuid===(null===o||void 0===o?void 0:o.uuid)&&(0,F.jsxs)(y.Z,{mb:5,px:k.cd,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,children:"Error"})}),null===m||void 0===m?void 0:m.map((function(e){return e.split("\n").map((function(e){return e.split("\\n").map((function(e){return(0,F.jsx)(Z.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),g&&(0,F.jsxs)(y.Z,{mt:3,children:[(0,F.jsx)(y.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,children:"Stack trace"})}),null===g||void 0===g?void 0:g.map((function(e){return null===e||void 0===e?void 0:e.map((function(e){return(0,F.jsx)(Z.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},ge=t(2626),be=t(98781),ve=t(41788),je=t(54283),xe=t(2713),Oe=t(47999),ye=t(55378),Ze=t(82944),_e=t(66166),ke=t(84779),Pe=t(42305),we=t(7715),Ce=t(59e3);function Se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Se(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.START="start_timestamp",e.END="end_timestamp"}(he||(he={}));var De=(fe={},(0,i.Z)(fe,I,L),(0,i.Z)(fe,D,0),fe);var Le=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,o=e.selectedRange,c=e.setSelectedRange,l=(0,h.useState)(null),u=l[0],a=l[1],s=(0,h.useState)(null),d=s[0],p=s[1],f=(0,h.useState)({hour:"00",minute:"00"}),m=f[0],g=f[1],b=(0,h.useState)(new Date),v=b[0],x=b[1],_=(0,h.useState)({hour:(0,Pe.lJ)(String((new Date).getUTCHours())),minute:(0,Pe.lJ)(String((new Date).getUTCMinutes()))}),P=_[0],C=_[1],S=(0,Ce.iV)(),I=(0,_e.Z)(S);return(0,h.useEffect)((function(){if(!(0,we.Xy)(S,I)){var e=S.start_timestamp,n=S.end_timestamp;if(e){var t=(0,Pe.Pc)(e),r=t.date,o=t.hour,i=t.minute;p(r),g({hour:(0,Pe.lJ)(o),minute:(0,Pe.lJ)(i)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-E[w.LAST_DAY])<=60&&c(w.LAST_DAY)}if(n){var u=(0,Pe.Pc)(n),a=u.date,s=u.hour,d=u.minute;x(a),C({hour:(0,Pe.lJ)(s),minute:(0,Pe.lJ)(d)})}}}),[S,I]),(0,F.jsx)(y.Z,{py:1,children:(0,F.jsxs)(O.Z,{alignItems:"center",children:[(0,F.jsx)(X.ZP,{blackBorder:!0,disabled:n,inline:!0,onClick:r,paddingBottom:.75*k.iI,paddingTop:.75*k.iI,uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(X.ZP,{blackBorder:!0,disabled:(null===S||void 0===S?void 0:S._offset)<=0,inline:!0,onClick:t,paddingBottom:.75*k.iI,paddingTop:.75*k.iI,uuid:"logs/load_newer_logs",children:"Load newer logs"}),(0,F.jsx)(y.Z,{mr:2}),(0,F.jsx)(ye.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(c(n),A.includes(n)){var t,r=(0,ke.JI)(E[n]);(0,q.u)(Ie((t={},(0,i.Z)(t,he.START,r),(0,i.Z)(t,he.END,null),t),De))}},paddingRight:4*k.iI,placeholder:"Select time range",value:o,children:Object.values(w).map((function(e){return(0,F.jsx)("option",{value:e,children:e},e)}))}),(0,F.jsx)(y.Z,{mr:1}),o===w.CUSTOM_RANGE&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ze.Z,{compact:!0,defaultColor:!0,onClick:function(){return a(0)},paddingRight:0,placeholder:"Start",value:d?(0,Pe.AY)(d,null===m||void 0===m?void 0:m.hour,null===m||void 0===m?void 0:m.minute):""}),(0,F.jsx)(Oe.Z,{onClickOutside:function(){return a(null)},open:0===u,style:{position:"relative"},children:(0,F.jsx)(xe.Z,{selectedDate:d,selectedTime:m,setSelectedDate:p,setSelectedTime:g})}),(0,F.jsx)(y.Z,{px:1,children:(0,F.jsx)(Z.ZP,{children:"to"})}),(0,F.jsx)(Ze.Z,{compact:!0,defaultColor:!0,onClick:function(){return a(1)},paddingRight:0,placeholder:"End",value:v?(0,Pe.AY)(v,null===P||void 0===P?void 0:P.hour,null===P||void 0===P?void 0:P.minute):""}),(0,F.jsx)(Oe.Z,{onClickOutside:function(){return a(null)},open:1===u,style:{position:"relative"},children:(0,F.jsx)(xe.Z,{selectedDate:v,selectedTime:P,setSelectedDate:x,setSelectedTime:C})}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsx)(j.Z,{borderRadius:k.iI/2,onClick:function(){var e,n=(0,Pe.BP)(d,m.hour,m.minute),t=(0,Pe.BP)(v,P.hour,P.minute);(0,q.u)(Ie((e={},(0,i.Z)(e,he.START,(0,Pe.A5)(n)),(0,i.Z)(e,he.END,(0,Pe.A5)(t)),e),De))},padding:"".concat(k.iI/2,"px"),primary:!0,children:"Search"})]})]})})},Ae=t(82531),Ee=t(59920);function Te(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 Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Te(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Te(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ne="log_uuid",Be="pipeline_run_id[]",Me="block_run_id[]";function Ye(e){var n=e.pipeline,t=(0,h.useContext)(p.ThemeContext),r=(0,h.useRef)(null),o=n.uuid,c=(0,h.useState)(null),l=c[0],u=c[1],s=(0,h.useState)(null),v=s[0],j=s[1],x=(0,h.useState)(null),_=x[0],P=x[1],C=(0,h.useState)(!1),S=C[0],A=C[1],T=Ae.ZP.pipelines.detail(o,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,R=(0,h.useMemo)((function(){return Re(Re({},null===T||void 0===T?void 0:T.pipeline),{},{uuid:o})}),[T,o]),N=(null===R||void 0===R?void 0:R.type)===be.q.INTEGRATION,J=(0,h.useMemo)((function(){return R.blocks||[]}),[R]),H=(0,h.useMemo)((function(){var e=(0,W.HK)(J,(function(e){return e.uuid}));if(N){var n,t=(0,W.sE)(J,(function(e){var n=e.type;return m.tf.DATA_LOADER===n})),r=t?(0,f.Qc)(t.content):{},o=((null===r||void 0===r||null===(n=r.catalog)||void 0===n?void 0:n.streams)||[]).reduce((function(e,n){var t=n.tap_stream_id,r={};return J.forEach((function(e){var n=e.uuid,o=e.type,i="".concat(n,":").concat(t);r[i]={type:o}})),Re(Re({},e),r)}),{});e=Re(Re({},o),e)}return e}),[J,N]),V=(0,Ce.iV)(),Q=!(null!==V&&void 0!==V&&V.start_timestamp)&&!(null!==V&&void 0!==V&&V.hasOwnProperty(Be)||null!==V&&void 0!==V&&V.hasOwnProperty(Me)),$=(0,ke.JI)(E[w.LAST_DAY]),ne=Ae.ZP.logs.pipelines.list(l?o:null,(0,we.gR)(Q?Re(Re({},l),{},{start_timestamp:$}):l,[Ne]),{refreshInterval:5e3}),te=ne.data,re=ne.mutate,oe=!te,ie=(0,h.useMemo)((function(){var e;if(null!==te&&void 0!==te&&null!==(e=te.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=te.logs)||void 0===n?void 0:n[0])||{};return{blockRunLogs:t.block_run_logs,pipelineRunLogs:t.pipeline_run_logs,totalBlockRunLogCount:t.total_block_run_log_count,totalPipelineRunLogCount:t.total_pipeline_run_log_count}}return{blockRunLogs:[],pipelineRunLogs:[],totalBlockRunLogCount:0,totalPipelineRunLogCount:0}}),[te]),ue=ie.blockRunLogs,ae=ie.pipelineRunLogs,se=ie.totalBlockRunLogCount,de=ie.totalPipelineRunLogCount,pe=+(null===V||void 0===V?void 0:V._limit)>=se&&+(null===V||void 0===V?void 0:V._limit)>=de,fe=(0,h.useMemo)((function(){return(0,W.YC)(ue.concat(ae).reduce((function(e,n){return e.concat(ce(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ue,ae]),he=(0,h.useMemo)((function(){return fe.filter((function(e){var n=e.data,t=[];if(!l)return!0;if(l["level[]"]&&t.push(l["level[]"].includes(null===n||void 0===n?void 0:n.level)),l["block_type[]"]){var r,o,i=null===n||void 0===n?void 0:n.block_uuid;if(N)i=null===n||void 0===n||null===(o=n.block_uuid)||void 0===o?void 0:o.split(":").slice(0,2).join(":");t.push(l["block_type[]"].includes(null===(r=H[i])||void 0===r?void 0:r.type))}if(l["pipeline_run_id[]"]){var c=null===n||void 0===n?void 0:n.pipeline_run_id;t.push(l["pipeline_run_id[]"].includes(String(c)))}if(l["block_run_id[]"]){var u=null===n||void 0===n?void 0:n.block_run_id;t.push(l["block_run_id[]"].includes(String(u)))}return t.every((function(e){return e}))}))}),[H,N,fe,l]),ve=he.length,xe=(0,_e.Z)(V);(0,h.useEffect)((function(){var e;Q&&(0,q.u)((e={},(0,i.Z)(e,I,L),(0,i.Z)(e,D,0),(0,i.Z)(e,"start_timestamp",$),e))}),[Q]),(0,h.useEffect)((function(){(0,we.Xy)(V,xe)||u(V)}),[V,xe]);var Oe=(0,_e.Z)(v);(0,h.useEffect)((function(){var e=V.log_uuid;!e||v||Oe||j(fe.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[fe,V,v,Oe]),(0,h.useEffect)((function(){var e;S&&!oe&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(),A(!1))}),[S,oe]);var ye=V._limit,Ze=V._offset,Pe=+(ye||0),Se=+(Ze||0),Ie=Math.max(se,de),De=(0,h.useCallback)((function(){var e,n=Pe,t=Se;(se>Pe||de>Pe)&&(n=Math.min(Ie,Pe+L),t=Math.min(Se+L,Ie-Ie%L),(0,q.u)(Re(Re({},V),{},(e={},(0,i.Z)(e,I,n),(0,i.Z)(e,D,t),e))))}),[Ie,Pe,Se,V,se,de]),Te=(0,h.useCallback)((function(){var e,n=Pe,t=Se;Pe>=L&&(n=Math.max(L,Pe-L),Pe>=Ie&&Ie%L!==0&&(n=Ie-Ie%L),t=Math.max(0,Se-L),(0,q.u)(Re(Re({},V),{},(e={},(0,i.Z)(e,I,n),(0,i.Z)(e,D,t),e))))}),[Ie,Pe,Se,V]);return(0,F.jsxs)(ge.Z,{after:v&&(0,F.jsx)(me,{log:v,onClose:function(){(0,q.u)((0,i.Z)({},Ne,null)),j(null)}}),afterHidden:!v,afterWidth:80*k.iI,before:(0,F.jsx)(G,{blocks:J,query:l}),beforeWidth:20*k.iI,breadcrumbs:[{label:function(){return"Logs"}}],pageName:Ee.M.PIPELINE_LOGS,pipeline:R,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,F.jsx)(y.Z,{px:k.cd,py:1,children:(0,F.jsxs)(Z.ZP,{children:[!oe&&(0,F.jsxs)(F.Fragment,{children:[(0,M.x6)(ve)," logs found",(0,F.jsx)(Le,{allPastLogsLoaded:pe,loadNewerLogInterval:Te,loadPastLogInterval:De,selectedRange:_,setSelectedRange:P})]}),oe&&"Searching..."]})}),(0,F.jsx)(b.Z,{light:!0}),oe&&(0,F.jsx)(y.Z,{p:k.cd,children:(0,F.jsx)(je.Z,{})}),!oe&&he.length>=1&&(0,F.jsx)(K.Z,{columnFlex:[null,null,1,9,null],columnMaxWidth:function(e){return 3===e?"100px":null},columns:[{label:function(){return""},uuid:"!"},{uuid:"Date"},{uuid:"Block"},{uuid:"Message"},{label:function(){return""},uuid:">"}],compact:!0,onClickRow:function(e){var n,t=he[e],r=null===(n=t.data)||void 0===n?void 0:n.uuid;l.log_uuid===r&&(r=null),(0,q.u)((0,i.Z)({},Ne,r)),j(r?t:null)},rows:null===he||void 0===he?void 0:he.map((function(e){var n,r,c,l=e.content,u=(e.createdAt,e.data),s=e.name,p=u||{},f=p.block_uuid,h=p.level,m=p.message,b=(p.pipeline_uuid,p.timestamp),v=f||s.split(".log")[0],j=v.split(":");be.q.INTEGRATION===R.type&&(v=j[0],r=j[1],c=j[2]);var x=H[v];if(x||(x=H[j[0]]),x){var _=(0,Y.qn)(x.type,{blockColor:x.color,theme:t}).accent;n=(0,F.jsx)(O.Z,{alignItems:"center",children:(0,F.jsx)(d(),{as:"/pipelines/".concat(o,"/edit?block_uuid=").concat(v),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,F.jsxs)(z.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,F.jsx)(g.Z,{color:_,size:1.5*k.iI,square:!0}),(0,F.jsx)(y.Z,{mr:1}),(0,F.jsxs)(Z.ZP,{monospace:!0,children:[v,r&&": ",r&&(0,F.jsx)(Z.ZP,{default:!0,inline:!0,monospace:!0,children:r}),c>=0&&": ",c>=0&&(0,F.jsx)(Z.ZP,{default:!0,inline:!0,monospace:!0,children:c})]})]})})})}return[(0,F.jsx)(U.Z,{alignItems:"center",justifyContent:"center",children:(0,F.jsx)(B,Re({},(0,i.Z)({},null===h||void 0===h?void 0:h.toLowerCase(),!0)))},"log_type"),(0,F.jsx)(Z.ZP,{default:!0,monospace:!0,children:le(b)},"log_timestamp"),n,(0,F.jsx)(Z.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,title:m||l,children:(0,F.jsx)(a(),{children:m||l})},"log_message"),(0,F.jsx)(U.Z,{flex:1,justifyContent:"flex-end",children:(0,F.jsx)(ee._Q,{default:!0,size:2*k.iI})},"chevron_right_icon")]})),uuid:"logs"}),(0,F.jsx)(y.Z,{p:k.cd,ref:r,children:(0,F.jsx)(X.ZP,{blackBorder:!0,inline:!0,onClick:function(){A(!0),"0"===(null===V||void 0===V?void 0:V._offset)&&(null===V||void 0===V?void 0:V._limit)===String(L)?re(null):(0,q.u)({_limit:L,_offset:0})},paddingBottom:.75*k.iI,paddingTop:.75*k.iI,uuid:"logs/toolbar/load_newest",children:"Load latest logs"})})]})}Ye.getInitialProps=function(){var e=(0,o.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var qe=(0,ve.Z)(Ye)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return d},AY:function(){return p},BP:function(){return s},JX:function(){return a},OC:function(){return i},Pc:function(){return f},d$:function(){return u},lJ:function(){return h},n1:function(){return l}});var r=t(92083),o=t.n(r),i="YYYY-MM-DD HH:mm:SS",c="YYYY-MM-DD HH:mm",l="YYYY-MM-DD";function u(e,n){var t=n.utcFormat,r=n.dayAgo,i=o()(e);return t&&(i=i.utc()),r&&(i=i.subtract(1,"days")),i.format(c)}function a(e){return o().unix(e).format(c)}function s(e,n,t){return o()(e).utc().hours(+n).minutes(+t).format()}function d(e){return o()(e).unix()}function p(e,n,t){return"".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t)}function f(e){var n=o().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function h(e){return e.padStart(2,"0")}},84779:function(e,n,t){"use strict";t.d(n,{DU:function(){return c},JI:function(){return l},Jw:function(){return i}});var r=t(75582),o=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),o=t[0],i=t[1];return"".concat(o.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(i?".".concat(i):"")},i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,t=parseFloat(e).toFixed(n);return 0===e&&(t=parseFloat(e).toFixed(0)),o(t)};function c(e){if(void 0===e)return"";var n=1===e||0===e?100*e:(100*e).toFixed(2);return"".concat(n,"%")}function l(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}},33766:function(e,n,t){"use strict";t.d(n,{u:function(){return s}});var r=t(75582),o=t(82394),i=t(34376),c=t.n(i),l=t(59e3);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.replaceParams,i=t.pushHistory,u=o?{}:(0,l.iV)();n=window.location.pathname;var s=i?c().push:c().replace,d=a(a({},u),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],o=n[1];"undefined"!==typeof o&&null!==o||delete d[t]}));var p=(0,l.uM)(d);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return s(c().router.pathname,f,{shallow:!0})}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(44613)}])}},function(e){e.O(0,[3850,2083,4804,9565,4495,9767,6579,434,9898,1830,4463,8961,9774,2888,179],(function(){return n=62453,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([[5912],{44162:function(e,n,t){"use strict";t.d(n,{HC:function(){return g},Kf:function(){return s},Nk:function(){return p},gE:function(){return v},jv:function(){return b},nz:function(){return f},oh:function(){return a},qn:function(){return d},t1:function(){return h},y9:function(){return m}});var r=t(9518),o=t(23831),i=t(86422),c=t(73942),u=t(49125),l=t(90880),a=68;function d(e,n){var t,r,c=((null===n||void 0===n||null===(t=n.theme)||void 0===t?void 0:t.borders)||o.Z.borders).light,u=((null===n||void 0===n||null===(r=n.theme)||void 0===r?void 0:r.monotone)||o.Z.monotone).grey500,l=n||{},a=l.blockColor,d=l.isSelected,s=l.theme;return d?c=((null===s||void 0===s?void 0:s.content)||o.Z.content).active:i.tf.TRANSFORMER===e||a===i.Lq.PURPLE?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).purple,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).purpleLight):i.tf.DATA_EXPORTER===e||a===i.Lq.YELLOW?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).yellow,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).yellowLight):i.tf.DATA_LOADER===e||a===i.Lq.BLUE?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).blue,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).blueLight):i.tf.SENSOR===e||a===i.Lq.PINK?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).pink,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).pinkLight):i.tf.DBT===e?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).dbt,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).dbtLight):a===i.Lq.TEAL?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).teal,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).tealLight):(i.tf.SCRATCHPAD===e||a===i.Lq.GREY||i.tf.CUSTOM===e&&!a)&&(c=((null===s||void 0===s?void 0:s.content)||o.Z.content).default,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).contentDefaultTransparent),{accent:c,accentLight:u}}var s=(0,r.css)([""," "," "," "," "," "," ",""],(0,l.eR)(),(function(e){return!e.selected&&!e.hasError&&"\n border-color: ".concat(d(e.blockType,e).accentLight,";\n ")}),(function(e){return e.selected&&!e.hasError&&"\n border-color: ".concat(d(e.blockType,e).accent,";\n ")}),(function(e){return!e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.accent||o.Z.accent).negativeTransparent,";\n ")}),(function(e){return e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.borders||o.Z.borders).danger,";\n ")}),(function(e){return e.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(e){return e.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),p=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),f=r.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-1"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding:","px;position:sticky;top:-5px;"," ",""],s,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,u.iI,(function(e){return"\n background-color: ".concat((e.theme||o.Z).background.content,";\n ")}),(function(e){return e.zIndex&&"\n z-index: ".concat(6+(e.zIndex||0),";\n ")})),b=r.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-2"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;position:relative;"," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],s,c.M8,c.mP,c.M8,c.mP,u.iI,u.iI,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).codeTextarea,";\n ")}),(function(e){return!e.hasOutput&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n ")})),v=r.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-3"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;bottom:","px;&:hover{"," .block-divider-inner{","}}"],2*u.iI,.5*u.iI,(function(e){return e.additionalZIndex>0&&"\n z-index: ".concat(8+e.additionalZIndex,";\n ")}),(function(e){return"\n background-color: ".concat((e.theme.text||o.Z.text).fileBrowser,";\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-4"})(["height 1px;width:100%;position:absolute;z-index:-1;top:","px;"],1.5*u.iI),m=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-5"})(["margin-bottom:","px;padding-bottom:","px;",""],u.cd*u.iI,u.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||o.Z.borders).medium,";\n padding-left: ").concat(e.normalPadding?u.iI:a,"px;\n ")})),g=r.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-6"})(["bottom:","px;left:","px;position:absolute;"],1*u.iI,a)},43032:function(e,n,t){"use strict";t.d(n,{Cl:function(){return u},Nk:function(){return l},ZG:function(){return c}});var r=t(9518),o=t(23831),i=t(49125),c=1.5*i.iI,u=1*c+i.iI/2,l=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-uvd91-0"})([".row:hover{","}"],(function(e){return"\n background-color: ".concat((e.theme.interactive||o.Z.interactive).hoverBackground,";\n ")}))},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return p},DA:function(){return s},HX:function(){return v},J8:function(){return b},Lq:function(){return a},Qj:function(){return h},Ut:function(){return A},V4:function(){return O},VZ:function(){return f},dO:function(){return d},f2:function(){return g},iZ:function(){return m},t6:function(){return c},tf:function(){return l}});var r,o,i,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.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],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],v=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],h=[l.CHART,l.SCRATCHPAD,l.SENSOR],m=[l.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(s||(s={}));var g=[l.DATA_EXPORTER,l.TRANSFORMER],O=(o={},(0,u.Z)(o,l.CUSTOM,"Custom"),(0,u.Z)(o,l.DATA_EXPORTER,"Data exporter"),(0,u.Z)(o,l.DATA_LOADER,"Data loader"),(0,u.Z)(o,l.SCRATCHPAD,"Scratchpad"),(0,u.Z)(o,l.SENSOR,"Sensor"),(0,u.Z)(o,l.TRANSFORMER,"Transformer"),o),A=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER];i={},(0,u.Z)(i,l.DATA_EXPORTER,"DE"),(0,u.Z)(i,l.DATA_LOADER,"DL"),(0,u.Z)(i,l.SCRATCHPAD,"SP"),(0,u.Z)(i,l.SENSOR,"SR"),(0,u.Z)(i,l.TRANSFORMER,"TF")},55378:function(e,n,t){"use strict";var r=t(82394),o=t(26304),i=t(82684),c=t(9518),u=t(69898),l=t(31969),a=t(49125),d=t(28598),s=["beforeIcon","children","label","placeholder"];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 f(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 b=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})(["",' background-image:url("data:image/svg+xml;utf8,','");background-repeat:no-repeat;background-position:-webkit-calc(100% - ',"px) center;background-position:calc(100% - ","px) center;padding-right:","px;&:hover{cursor:pointer;}"," "," "," ",""],u.p,"\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",a.iI,a.iI,2.5*a.iI,(function(e){return!e.hasContent&&!e.showPlaceholder&&"\n color: ".concat((e.theme.content||l.Z.content).muted,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return e.showPlaceholder&&"\n color: ".concat((e.theme.content||l.Z.content).inverted,";\n ")})),v=function(e,n){var t=e.beforeIcon,r=e.children,i=e.label,c=e.placeholder,l=(0,o.Z)(e,s);return(0,d.jsx)(u.Z,f(f({},l),{},{beforeIcon:t,input:(0,d.jsxs)(b,f(f({},l),{},{children:[(i||c)&&(0,d.jsx)("option",{disabled:!0,selected:!0,value:"",children:i||c}),r]})),label:i,placeholder:c,ref:n,setContentOnMount:!0,showLabelRequirement:function(e){return!!e.content}}))};n.Z=i.forwardRef(v)},50094:function(e,n,t){"use strict";t.r(n);var r=t(77837),o=t(75582),i=t(82394),c=t(38860),u=t.n(c),l=t(82684),a=t(92083),d=t.n(a),s=t(9518),p=t(21679),f=t(16634),b=t(67971),v=t(87372),h=t(87465),m=t(41788),g=t(55378),O=t(86673),A=t(82531),R=t(23831),T=t(67400),E=t(43032),x=t(92953),y=t(44162),_=t(24224),Z=t(28598);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,i.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}function P(e){var n=e.pipeline,t=(0,l.useContext)(s.ThemeContext),r=(0,l.useState)(null),c=r[0],u=r[1],a=n.uuid,m=A.ZP.pipelines.detail(a,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,D=(0,l.useMemo)((function(){return S(S({},null===m||void 0===m?void 0:m.pipeline),{},{uuid:a})}),[m,a]),P=A.ZP.pipeline_schedules.pipelines.list(a).data,C=(0,l.useMemo)((function(){return null===P||void 0===P?void 0:P.pipeline_schedules}),[P]),w=(0,l.useMemo)((function(){return(0,_.HK)(null===D||void 0===D?void 0:D.blocks,(function(e){return e.uuid}))||{}}),[D]),L={pipeline_uuid:a};(c||0===c)&&(L.pipeline_schedule_id=Number(c));var j=A.ZP.monitor_stats.detail("block_run_count",L),k=j.data,I=j.mutate,N=((null===k||void 0===k?void 0:k.monitor_stat)||{}).stats,M=(0,l.useMemo)((function(){for(var e=new Date,n=[],t=0;t<90;t++)n.unshift(e.toISOString().split("T")[0]),e.setDate(e.getDate()-1);return n}),[]),B=(0,l.useMemo)((function(){if(N)return Object.entries(N).reduce((function(e,n){var t=(0,o.Z)(n,2),r=t[0],c=t[1].data,u=M.map((function(e){return S({date:e},c[e]||{})}));return S(S({},e),{},(0,i.Z)({},r,u))}),{})}),[M,N]),H=(0,l.useMemo)((function(){var e=[];return e.push({bold:!0,label:function(){return"Monitors"}}),e}),[D]);return(0,Z.jsx)(h.Z,{breadcrumbs:H,monitorType:x.a.BLOCK_RUNS,pipeline:D,subheader:(0,Z.jsx)(b.Z,{children:(0,Z.jsxs)(g.Z,{backgroundColor:R.Z.interactive.defaultBackground,label:"Trigger:",onChange:function(e){var n=e.target.value;"initial"!==n?(u(n),I(n)):(I(),u(null))},value:c||"initial",children:[(0,Z.jsx)("option",{value:"initial",children:"All"}),C&&C.map((function(e){return(0,Z.jsx)("option",{value:e.id,children:e.name})}))]})}),children:(0,Z.jsx)(O.Z,{mx:2,children:B&&Object.entries(B).map((function(e){var n,r,i=(0,o.Z)(e,2),c=i[0],u=i[1];return(0,Z.jsxs)(O.Z,{mt:3,children:[(0,Z.jsxs)(b.Z,{alignItems:"center",children:[(0,Z.jsx)(O.Z,{mx:1,children:(0,Z.jsx)(f.Z,{color:(0,y.qn)(null===(n=w[c])||void 0===n?void 0:n.type,{blockColor:null===(r=w[c])||void 0===r?void 0:r.color,theme:t}).accent,size:E.ZG,square:!0})}),(0,Z.jsx)(v.Z,{level:4,children:c})]}),(0,Z.jsx)(O.Z,{mt:1,children:(0,Z.jsx)(p.Z,{colors:T.BAR_STACK_COLORS,data:u,getXValue:function(e){return e.date},height:200,keys:T.BAR_STACK_STATUSES,margin:{bottom:30,left:35,right:0,top:10},xLabelFormat:function(e){return d()(e).format("MMM DD")}})})]},c)}))})})}P.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)}}(),n.default=(0,m.Z)(P)},83542:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors/block-runs",function(){return t(50094)}])}},function(e){e.O(0,[3850,2083,5896,2714,9767,6579,434,9898,1830,2249,7400,9774,2888,179],(function(){return n=83542,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5912],{44162:function(e,n,t){"use strict";t.d(n,{HC:function(){return g},Kf:function(){return s},Nk:function(){return p},gE:function(){return v},jv:function(){return b},nz:function(){return f},oh:function(){return a},qn:function(){return d},t1:function(){return h},y9:function(){return m}});var r=t(9518),o=t(23831),i=t(86422),c=t(73942),u=t(49125),l=t(90880),a=68;function d(e,n){var t,r,c=((null===n||void 0===n||null===(t=n.theme)||void 0===t?void 0:t.borders)||o.Z.borders).light,u=((null===n||void 0===n||null===(r=n.theme)||void 0===r?void 0:r.monotone)||o.Z.monotone).grey500,l=n||{},a=l.blockColor,d=l.isSelected,s=l.theme;return d?c=((null===s||void 0===s?void 0:s.content)||o.Z.content).active:i.tf.TRANSFORMER===e||a===i.Lq.PURPLE?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).purple,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).purpleLight):i.tf.DATA_EXPORTER===e||a===i.Lq.YELLOW?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).yellow,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).yellowLight):i.tf.DATA_LOADER===e||a===i.Lq.BLUE?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).blue,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).blueLight):i.tf.SENSOR===e||a===i.Lq.PINK?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).pink,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).pinkLight):i.tf.DBT===e?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).dbt,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).dbtLight):a===i.Lq.TEAL?(c=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).teal,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).tealLight):(i.tf.SCRATCHPAD===e||a===i.Lq.GREY||i.tf.CUSTOM===e&&!a)&&(c=((null===s||void 0===s?void 0:s.content)||o.Z.content).default,u=((null===s||void 0===s?void 0:s.accent)||o.Z.accent).contentDefaultTransparent),{accent:c,accentLight:u}}var s=(0,r.css)([""," "," "," "," "," "," ",""],(0,l.eR)(),(function(e){return!e.selected&&!e.hasError&&"\n border-color: ".concat(d(e.blockType,e).accentLight,";\n ")}),(function(e){return e.selected&&!e.hasError&&"\n border-color: ".concat(d(e.blockType,e).accent,";\n ")}),(function(e){return!e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.accent||o.Z.accent).negativeTransparent,";\n ")}),(function(e){return e.selected&&e.hasError&&"\n border-color: ".concat((e.theme.borders||o.Z.borders).danger,";\n ")}),(function(e){return e.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(e){return e.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),p=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),f=r.default.div.withConfig({displayName:"indexstyle__BlockHeaderStyle",componentId:"sc-s5rj34-1"})([""," border-top-left-radius:","px;border-top-right-radius:","px;border-top-style:",";border-top-width:","px;border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding:","px;position:sticky;top:-5px;"," ",""],s,c.n_,c.n_,c.M8,c.mP,c.M8,c.mP,c.M8,c.mP,u.iI,(function(e){return"\n background-color: ".concat((e.theme||o.Z).background.content,";\n ")}),(function(e){return e.zIndex&&"\n z-index: ".concat(6+(e.zIndex||0),";\n ")})),b=r.default.div.withConfig({displayName:"indexstyle__CodeContainerStyle",componentId:"sc-s5rj34-2"})([""," border-left-style:",";border-left-width:","px;border-right-style:",";border-right-width:","px;padding-bottom:","px;padding-top:","px;position:relative;"," "," .line-numbers{opacity:0;}&.selected{.line-numbers{opacity:1 !important;}}"],s,c.M8,c.mP,c.M8,c.mP,u.iI,u.iI,(function(e){return"\n background-color: ".concat((e.theme.background||o.Z.background).codeTextarea,";\n ")}),(function(e){return!e.hasOutput&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n ")})),v=r.default.div.withConfig({displayName:"indexstyle__BlockDivider",componentId:"sc-s5rj34-3"})(["align-items:center;display:flex;height:","px;justify-content:center;position:relative;z-index:8;bottom:","px;&:hover{"," .block-divider-inner{","}}"],2*u.iI,.5*u.iI,(function(e){return e.additionalZIndex>0&&"\n z-index: ".concat(8+e.additionalZIndex,";\n ")}),(function(e){return"\n background-color: ".concat((e.theme.text||o.Z.text).fileBrowser,";\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__BlockDividerInner",componentId:"sc-s5rj34-4"})(["height 1px;width:100%;position:absolute;z-index:-1;top:","px;"],1.5*u.iI),m=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-5"})(["margin-bottom:","px;padding-bottom:","px;",""],u.cd*u.iI,u.iI,(function(e){return"\n border-bottom: 1px solid ".concat((e.theme.borders||o.Z.borders).medium,";\n padding-left: ").concat(e.normalPadding?u.iI:a,"px;\n ")})),g=r.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-6"})(["bottom:","px;left:","px;position:absolute;"],1*u.iI,a)},43032:function(e,n,t){"use strict";t.d(n,{Cl:function(){return u},Nk:function(){return l},ZG:function(){return c}});var r=t(9518),o=t(23831),i=t(49125),c=1.5*i.iI,u=1*c+i.iI/2,l=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-uvd91-0"})([".row:hover{","}"],(function(e){return"\n background-color: ".concat((e.theme.interactive||o.Z.interactive).hoverBackground,";\n ")}))},86422:function(e,n,t){"use strict";t.d(n,{$W:function(){return p},DA:function(){return s},HX:function(){return v},J8:function(){return b},Lq:function(){return a},Qj:function(){return h},Ut:function(){return A},V4:function(){return O},VZ:function(){return f},dO:function(){return d},f2:function(){return g},iZ:function(){return m},t6:function(){return c},tf:function(){return l}});var r,o,i,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.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],b=[l.DATA_EXPORTER,l.DATA_LOADER,l.TRANSFORMER],v=[l.DATA_EXPORTER,l.DATA_LOADER,l.DBT,l.TRANSFORMER],h=[l.CHART,l.SCRATCHPAD,l.SENSOR],m=[l.SCRATCHPAD];!function(e){e.EXECUTED="executed",e.FAILED="failed",e.NOT_EXECUTED="not_executed",e.UPDATED="updated"}(s||(s={}));var g=[l.DATA_EXPORTER,l.TRANSFORMER],O=(o={},(0,u.Z)(o,l.CUSTOM,"Custom"),(0,u.Z)(o,l.DATA_EXPORTER,"Data exporter"),(0,u.Z)(o,l.DATA_LOADER,"Data loader"),(0,u.Z)(o,l.SCRATCHPAD,"Scratchpad"),(0,u.Z)(o,l.SENSOR,"Sensor"),(0,u.Z)(o,l.TRANSFORMER,"Transformer"),o),A=[l.DATA_LOADER,l.TRANSFORMER,l.DATA_EXPORTER];i={},(0,u.Z)(i,l.DATA_EXPORTER,"DE"),(0,u.Z)(i,l.DATA_LOADER,"DL"),(0,u.Z)(i,l.SCRATCHPAD,"SP"),(0,u.Z)(i,l.SENSOR,"SR"),(0,u.Z)(i,l.TRANSFORMER,"TF")},55378:function(e,n,t){"use strict";var r=t(82394),o=t(26304),i=t(82684),c=t(9518),u=t(69898),l=t(31969),a=t(49125),d=t(28598),s=["beforeIcon","children","label","multiple","placeholder"];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 f(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 b=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})(["",' background-image:url("data:image/svg+xml;utf8,','");background-repeat:no-repeat;background-position:-webkit-calc(100% - ',"px) center;background-position:calc(100% - ","px) center;padding-right:","px;&:hover{cursor:pointer;}"," "," "," ",""],u.p,"\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",a.iI,a.iI,2.5*a.iI,(function(e){return!e.hasContent&&!e.showPlaceholder&&"\n color: ".concat((e.theme.content||l.Z.content).muted,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return e.showPlaceholder&&"\n color: ".concat((e.theme.content||l.Z.content).inverted,";\n ")})),v=function(e,n){var t=e.beforeIcon,r=e.children,i=e.label,c=e.multiple,l=e.placeholder,a=(0,o.Z)(e,s);return(0,d.jsx)(u.Z,f(f({},a),{},{beforeIcon:t,input:(0,d.jsxs)(b,f(f({multiple:c},a),{},{children:[(i||l)&&(0,d.jsx)("option",{disabled:!0,selected:!0,value:"",children:i||l}),r]})),label:i,placeholder:l,ref:n,setContentOnMount:!0,showLabelRequirement:function(e){return!!e.content}}))};n.Z=i.forwardRef(v)},50094:function(e,n,t){"use strict";t.r(n);var r=t(77837),o=t(75582),i=t(82394),c=t(38860),u=t.n(c),l=t(82684),a=t(92083),d=t.n(a),s=t(9518),p=t(21679),f=t(16634),b=t(67971),v=t(87372),h=t(87465),m=t(41788),g=t(55378),O=t(86673),A=t(82531),R=t(23831),T=t(67400),E=t(43032),x=t(92953),y=t(44162),_=t(24224),Z=t(28598);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,i.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}function P(e){var n=e.pipeline,t=(0,l.useContext)(s.ThemeContext),r=(0,l.useState)(null),c=r[0],u=r[1],a=n.uuid,m=A.ZP.pipelines.detail(a,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,D=(0,l.useMemo)((function(){return S(S({},null===m||void 0===m?void 0:m.pipeline),{},{uuid:a})}),[m,a]),P=A.ZP.pipeline_schedules.pipelines.list(a).data,C=(0,l.useMemo)((function(){return null===P||void 0===P?void 0:P.pipeline_schedules}),[P]),w=(0,l.useMemo)((function(){return(0,_.HK)(null===D||void 0===D?void 0:D.blocks,(function(e){return e.uuid}))||{}}),[D]),L={pipeline_uuid:a};(c||0===c)&&(L.pipeline_schedule_id=Number(c));var j=A.ZP.monitor_stats.detail("block_run_count",L),k=j.data,I=j.mutate,N=((null===k||void 0===k?void 0:k.monitor_stat)||{}).stats,M=(0,l.useMemo)((function(){for(var e=new Date,n=[],t=0;t<90;t++)n.unshift(e.toISOString().split("T")[0]),e.setDate(e.getDate()-1);return n}),[]),B=(0,l.useMemo)((function(){if(N)return Object.entries(N).reduce((function(e,n){var t=(0,o.Z)(n,2),r=t[0],c=t[1].data,u=M.map((function(e){return S({date:e},c[e]||{})}));return S(S({},e),{},(0,i.Z)({},r,u))}),{})}),[M,N]),H=(0,l.useMemo)((function(){var e=[];return e.push({bold:!0,label:function(){return"Monitors"}}),e}),[D]);return(0,Z.jsx)(h.Z,{breadcrumbs:H,monitorType:x.a.BLOCK_RUNS,pipeline:D,subheader:(0,Z.jsx)(b.Z,{children:(0,Z.jsxs)(g.Z,{backgroundColor:R.Z.interactive.defaultBackground,label:"Trigger:",onChange:function(e){var n=e.target.value;"initial"!==n?(u(n),I(n)):(I(),u(null))},value:c||"initial",children:[(0,Z.jsx)("option",{value:"initial",children:"All"}),C&&C.map((function(e){return(0,Z.jsx)("option",{value:e.id,children:e.name})}))]})}),children:(0,Z.jsx)(O.Z,{mx:2,children:B&&Object.entries(B).map((function(e){var n,r,i=(0,o.Z)(e,2),c=i[0],u=i[1];return(0,Z.jsxs)(O.Z,{mt:3,children:[(0,Z.jsxs)(b.Z,{alignItems:"center",children:[(0,Z.jsx)(O.Z,{mx:1,children:(0,Z.jsx)(f.Z,{color:(0,y.qn)(null===(n=w[c])||void 0===n?void 0:n.type,{blockColor:null===(r=w[c])||void 0===r?void 0:r.color,theme:t}).accent,size:E.ZG,square:!0})}),(0,Z.jsx)(v.Z,{level:4,children:c})]}),(0,Z.jsx)(O.Z,{mt:1,children:(0,Z.jsx)(p.Z,{colors:T.BAR_STACK_COLORS,data:u,getXValue:function(e){return e.date},height:200,keys:T.BAR_STACK_STATUSES,margin:{bottom:30,left:35,right:0,top:10},xLabelFormat:function(e){return d()(e).format("MMM DD")}})})]},c)}))})})}P.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)}}(),n.default=(0,m.Z)(P)},83542:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors/block-runs",function(){return t(50094)}])}},function(e){e.O(0,[3850,2083,5896,2714,9767,6579,434,9898,1830,2249,7400,9774,2888,179],(function(){return n=83542,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7803],{59920:function(e,n,t){"use strict";var r;t.d(n,{M:function(){return r}}),function(e){e.BACKFILLS="backfills",e.BLOCK_RUNS="block_runs",e.EDIT="edit",e.MONITOR="monitor",e.PIPELINE_LOGS="pipeline_logs",e.PIPELINE_RUNS="pipeline_runs",e.RUNS="runs",e.SYNCS="syncs",e.TRIGGERS="triggers"}(r||(r={}))},2626:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var r=t(21831),i=t(75582),o=t(82684),l=t(83455),c=t(34376),u=t(28598);var s=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("g",{clipPath:"url(#clip0_7525_68660)",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.67625 7.82429C8.48671 8.13404 8.61933 8.53116 8.9436 8.69464C9.26787 8.85812 9.6606 8.72561 9.85513 8.41896C10.5416 7.33682 11.5276 6.47056 12.6997 5.92987C14.0715 5.29701 15.6173 5.14749 17.085 5.50568C18.5526 5.86388 19.8557 6.70866 20.7818 7.90233C21.7079 9.096 22.2023 10.5682 22.1845 12.0788C22.1667 13.5895 21.6377 15.0496 20.6837 16.2211C19.7298 17.3926 18.4071 18.2064 16.9314 18.5299C15.4557 18.8534 13.9139 18.6675 12.5573 18.0024C11.3984 17.4343 10.433 16.545 9.77227 15.447C9.58502 15.1358 9.19553 14.9941 8.86749 15.1499C8.53946 15.3057 8.39751 15.6995 8.5797 16.0137C9.37152 17.379 10.5525 18.4842 11.9785 19.1832C13.6018 19.9791 15.4469 20.2016 17.213 19.8145C18.979 19.4273 20.5619 18.4534 21.7035 17.0514C22.8451 15.6495 23.4781 13.9022 23.4994 12.0943C23.5208 10.2865 22.9291 8.52472 21.8208 7.09623C20.7126 5.66774 19.1532 4.65677 17.3968 4.22811C15.6403 3.79945 13.7905 3.97839 12.1488 4.73574C10.7068 5.40099 9.50004 6.47805 8.67625 7.82429ZM0.219185 12.5303C-0.0737079 12.2375 -0.0737079 11.7626 0.219185 11.4697L4.71918 6.96968C5.01208 6.67679 5.48695 6.67679 5.77985 6.96968C6.07274 7.26258 6.07274 7.73745 5.77985 8.03034L2.56017 11.25L15.7495 11.25C16.1637 11.25 16.4995 11.5858 16.4995 12C16.4995 12.4142 16.1637 12.75 15.7495 12.75L2.56017 12.75L5.77985 15.9697C6.07274 16.2626 6.07274 16.7375 5.77985 17.0303C5.48695 17.3232 5.01208 17.3232 4.71918 17.0303L0.219185 12.5303Z",fill:"url(#paint0_linear_7525_68660)"})}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_7525_68660",x1:"11.7498",y1:"4",x2:"11.7498",y2:"20",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},d=t(16953),a=t(61519);var p=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.25 1C23.25 0.585786 22.9142 0.25 22.5 0.25C22.0858 0.25 21.75 0.585786 21.75 1V15.5C21.75 15.9142 22.0858 16.25 22.5 16.25C22.9142 16.25 23.25 15.9142 23.25 15.5V1ZM5 4.25C5.41421 4.25 5.75 4.58579 5.75 5V15.5C5.75 15.9142 5.41421 16.25 5 16.25C4.58579 16.25 4.25 15.9142 4.25 15.5V5C4.25 4.58579 4.58579 4.25 5 4.25ZM1.5 7.25C1.91421 7.25 2.25 7.58579 2.25 8V15.5C2.25 15.9142 1.91421 16.25 1.5 16.25C1.08579 16.25 0.75 15.9142 0.75 15.5V8C0.75 7.58579 1.08579 7.25 1.5 7.25ZM9.25 7C9.25 6.58579 8.91421 6.25 8.5 6.25C8.08579 6.25 7.75 6.58579 7.75 7V15.5C7.75 15.9142 8.08579 16.25 8.5 16.25C8.91421 16.25 9.25 15.9142 9.25 15.5V7ZM12 8.75C12.4142 8.75 12.75 9.08579 12.75 9.5V15.5C12.75 15.9142 12.4142 16.25 12 16.25C11.5858 16.25 11.25 15.9142 11.25 15.5V9.5C11.25 9.08579 11.5858 8.75 12 8.75ZM16.25 11.5C16.25 11.0858 15.9142 10.75 15.5 10.75C15.0858 10.75 14.75 11.0858 14.75 11.5V15.5C14.75 15.9142 15.0858 16.25 15.5 16.25C15.9142 16.25 16.25 15.9142 16.25 15.5V11.5ZM19 9.25C19.4142 9.25 19.75 9.58579 19.75 10V15.5C19.75 15.9142 19.4142 16.25 19 16.25C18.5858 16.25 18.25 15.9142 18.25 15.5V10C18.25 9.58579 18.5858 9.25 19 9.25Z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(70434),m=t(34744),v=t(67971),h=t(87372),b=t(98781),g=t(29664),x=t(86673);var j=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 17c0 1.1046-.89543 2-2 2s-2-.8954-2-2 .89543-2 2-2 2 .8954 2 2zm1.5 0c0 1.933-1.567 3.5-3.5 3.5S1.5 18.933 1.5 17s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5zm2.25-.5c0-.4142.3358-.75.75-.75H22c.4142 0 .75.3358.75.75s-.3358.75-.75.75H11.5c-.4142 0-.75-.3358-.75-.75zM8.68946 4.29563c.16317-.38072-.0132-.82163-.39392-.9848-.38072-.16316-.82163.0132-.9848.39392L5.06418 8.94674c-.07952.18554-.3348.2052-.44179.03402L3.1361 6.60269c-.21953-.35125-.68225-.45803-1.0335-.2385-.35125.21954-.45803.68225-.2385 1.0335l1.48629 2.37807c.74892 1.19824 2.53587 1.06064 3.0925-.23814l2.24657-5.24199zM11.5 6.75c-.4142 0-.75.33579-.75.75s.3358.75.75.75H22c.4142 0 .75-.33579.75-.75s-.3358-.75-.75-.75H11.5z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},Z=t(82531),C=t(10503),y=t(9518),k=t(23831),w=t(73942),I=t(49125),_=y.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],w.n_,3*I.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||k.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 ')})),P=t(3055),N=t(59920),O=t(96510),M=t(90211),S=t(24141);var E=function(e){var n=e.after,t=e.afterHidden,y=e.afterWidth,k=e.before,w=e.beforeWidth,E=e.breadcrumbs,V=e.buildSidekick,L=e.children,R=e.headline,D=e.pageName,T=e.pipeline,A=e.subheader,B=e.subheaderBackground,H=e.subheaderBackgroundImage,z=e.subheaderButton,U=e.subheaderText,G=e.title,F=e.uuid,W=(0,c.useRouter)(),Y=(0,S.i)().height,q=T.uuid,K=Z.ZP.pipelines.detail(q,{includes_outputs:!1},{revalidateOnFocus:!1}).data,J=null===K||void 0===K?void 0:K.pipeline,X=(0,l.Db)(Z.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,O.wD)(e,{callback:function(e){var n=e.pipeline.uuid;W.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))}})}}),Q=(0,i.Z)(X,1)[0],$=(0,l.Db)((function(e){return Z.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,O.wD)(e,{callback:function(){W.push("/pipelines")}})}}),ee=(0,i.Z)($,1)[0],ne=[{label:function(){return"New standard pipeline"},onClick:function(){return Q({pipeline:{name:(0,M.Y6)()}})},uuid:"PipelineDetail/Header/new_standard_pipeline"},{label:function(){return"New streaming pipeline"},onClick:function(){return Q({pipeline:{name:(0,M.Y6)(),type:b.q.STREAMING}})},uuid:"PipelineDetail/Header/new_streaming_pipeline"},{label:function(){return"Delete current pipeline"},onClick:function(){return ee(q)},openConfirmationDialogue:!0,uuid:"PipelineDetail/Header/delete_pipeline"}],te=(0,o.useMemo)((function(){return n||(V?V({height:Y,heightOffset:P.Mz,pipeline:J}):null)}),[n,V,Y,J]),re=y||(te?50*I.iI:null),ie=(0,o.useMemo)((function(){var e=[];return J&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),E?(e.push({label:function(){return J.uuid},linkProps:{as:"/pipelines/".concat(q,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,r.Z)(E)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return J.name}})),e}),[E,J,q]),oe=[{Icon:C.Pf,IconSelected:g.Z,id:N.M.TRIGGERS,isSelected:function(){return N.M.TRIGGERS===D},label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(q,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{Icon:C.pd,IconSelected:a.Z,id:N.M.RUNS,isSelected:function(){return N.M.RUNS===D},label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(q,"/runs"),href:"/pipelines/[pipeline]/runs"}},{Icon:C.yg,IconSelected:s,id:N.M.BACKFILLS,isSelected:function(){return N.M.BACKFILLS===D},label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(q,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{Icon:C.B4,IconSelected:j,id:N.M.PIPELINE_LOGS,isSelected:function(){return N.M.PIPELINE_LOGS===D},label:function(){return"Logs"},linkProps:{as:"/pipelines/".concat(q,"/logs"),href:"/pipelines/[pipeline]/logs"}},{Icon:C.kL,IconSelected:p,id:N.M.MONITOR,isSelected:function(){return N.M.MONITOR===D},label:function(){return"Monitor"},linkProps:{as:"/pipelines/".concat(q,"/monitors"),href:"/pipelines/[pipeline]/monitors"}}];return b.q.INTEGRATION===(null===J||void 0===J?void 0:J.type)&&oe.unshift({Icon:C.Re,IconSelected:d.Z,id:N.M.SYNCS,isSelected:function(){return N.M.SYNCS===D},label:function(){return"Syncs"},linkProps:{as:"/pipelines/".concat(q,"/syncs"),href:"/pipelines/[pipeline]/syncs"}}),oe.unshift({Icon:null,IconSelected:null,id:N.M.EDIT,label:function(){return"Edit pipeline"},linkProps:{as:"/pipelines/".concat(q,"/edit"),href:"/pipelines/[pipeline]/edit"}}),(0,u.jsxs)(f.Z,{after:te,afterHidden:t,afterWidth:re,before:k,beforeWidth:w,breadcrumbs:ie,headerMenuItems:ne,navigationItems:oe,subheaderChildren:"undefined"!==typeof A&&A,title:J?G?G(J):J.name:null,uuid:F,children:[(z||U)&&(0,u.jsx)(x.Z,{mb:I.Mq,mt:I.cd,mx:I.cd,children:(0,u.jsx)(_,{background:B,backgroundImage:H,children:(0,u.jsxs)(v.Z,{alignItems:"center",children:[z,U&&(0,u.jsx)(x.Z,{ml:3}),U]})})}),R&&(0,u.jsx)(x.Z,{p:I.cd,children:(0,u.jsxs)(x.Z,{mt:I.cd,px:I.cd,children:[(0,u.jsx)(h.Z,{level:5,children:R}),(0,u.jsx)(m.Z,{light:!0,mt:I.cd,short:!0})]})}),L]})}},45838:function(e,n,t){"use strict";t.d(n,{GZ:function(){return a},Vq:function(){return s},cE:function(){return p},cl:function(){return c},kA:function(){return u}});var r=t(9518),i=t(23831),o=t(37391),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-1wzfyed-0"})(["position:relative;overflow:auto;"," "," ",""],o.w5,(function(e){return e.minHeight&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),u=r.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-1wzfyed-1"})(["contain:size;width:100%;",""],(function(e){return(e.columnBorders||e.borderCollapseSeparate)&&"\n border-collapse: separate;\n "})),s=r.default.tr.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-1wzfyed-2"})([""," ",""],(function(e){return e.highlightOnHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||i.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(e){return!e.noHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||i.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")})),d=(0,r.css)(["text-overflow:ellipsis;white-space:nowrap;"," "," "," "," "," ",""],(function(e){return!e.alignTop&&"\n vertical-align: middle;\n "}),(function(e){return e.alignTop&&"\n vertical-align: top;\n "}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.compact&&"\n padding: ".concat(l.iI/2,"px ").concat(l.iI,"px;\n ")}),(function(e){return!e.compact&&"\n padding: ".concat(l.iI,"px ").concat(2*l.iI,"px;\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,";\n ")})),a=r.default.th.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-1wzfyed-3"})([""," "," "," ",""],d,(function(e){return e.columnBorders&&"\n border: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n border-right: none;\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.sticky&&"\n background-color: ".concat((e.theme||i.Z).background.panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||i.Z.borders).medium,";\n z-index: 2;\n position: sticky;\n top: 0;\n\n &:first-child {\n left: 0;\n z-index: 2;\n }\n ")})),p=r.default.td.withConfig({displayName:"indexstyle__TableDataStyle",componentId:"sc-1wzfyed-4"})([""," "," "," "," "," "," ",""],d,(function(e){return e.rowVerticalPadding&&"\n padding-top: ".concat(e.rowVerticalPadding,"px;\n padding-bottom: ").concat(e.rowVerticalPadding,"px;\n ")}),(function(e){return e.columnBorders&&"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.stickyFirstColumn&&"\n background-color: ".concat((e.theme||i.Z).background.panel,";\n z-index: 1;\n position: sticky;\n left: 0;\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).activeBorder,";\n ")}),(function(e){return e.wrapColumns&&"\n white-space: break-spaces;\n "}))},87815:function(e,n,t){"use strict";var r=t(82394),i=t(12691),o=t.n(i),l=t(82684),c=t(67971),u=t(10919),s=t(86673),d=t(19711),a=t(46261),p=t(45838),f=t(28598);function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.alignTop,t=e.borderCollapseSeparate,r=e.buildLinkProps,i=e.columnBorders,m=e.columnFlex,h=e.columnMaxWidth,b=e.columns,g=void 0===b?[]:b,x=e.compact,j=e.highlightRowOnHover,Z=e.isSelectedRow,C=e.noBorder,y=e.noHeader,k=e.onClickRow,w=e.rows,I=e.rowVerticalPadding,_=e.stickyFirstColumn,P=e.stickyHeader,N=e.uuid,O=e.wrapColumns,M=(0,l.useMemo)((function(){return m.reduce((function(e,n){return e+(n||0)}),0)}),m),S=(0,l.useCallback)((function(e){if(m[e]){var n=Math.round(m[e]/M*100);return"".concat(n,"%")}return null}),[]),E=(0,l.useMemo)((function(){return null===w||void 0===w?void 0:w.map((function(e,t){var c=null===r||void 0===r?void 0:r(t),s=e.map((function(r,o){return(0,f.jsx)(p.cE,{alignTop:n,columnBorders:i,compact:x,last:o===e.length-1,maxWidth:null===h||void 0===h?void 0:h(o),noBorder:C,rowVerticalPadding:I,selected:null===Z||void 0===Z?void 0:Z(t),stickyFirstColumn:_&&0===o,width:S(o),wrapColumns:O,children:r},"".concat(N,"-row-").concat(t,"-cell-").concat(o))})),d=(0,f.jsx)(p.Vq,{highlightOnHover:j,noHover:!(c||k),onClick:k?function(){return k(t)}:null,children:s},"".concat(N,"-row-").concat(t));return c?(0,l.createElement)(o(),v(v({},c),{},{key:"".concat(N,"-row-link-").concat(t),passHref:!0}),(0,f.jsx)(u.Z,{fullWidth:!0,noHoverUnderline:!0,noOutline:!0,style:{display:"table-row-group"},verticalAlignContent:!0,children:d})):d}))}),[n,r,S,h,g,x,Z,C,k,w]);return(0,f.jsxs)(p.kA,{borderCollapseSeparate:t,columnBorders:i,children:[(null===g||void 0===g?void 0:g.length)>=1&&!y&&(0,f.jsx)(p.Vq,{noHover:!0,children:g.map((function(e,n){return(0,f.jsx)(p.GZ,{columnBorders:i,compact:x,last:n===g.length-1,noBorder:C,sticky:P,children:(0,f.jsxs)(c.Z,{alignItems:"center",children:[(0,f.jsx)(d.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.label?e.label():e.uuid}),e.tooltipMessage&&(0,f.jsx)(s.Z,{ml:"4px",children:(0,f.jsx)(a.Z,{appearBefore:!0,label:(0,f.jsx)(d.ZP,{leftAligned:!0,children:e.tooltipMessage}),lightBackground:!0,primary:!0})})]})},"".concat(N,"-col-").concat(e.uuid,"-").concat(n))}))}),E]})}},66050:function(e,n,t){"use strict";var r;t.d(n,{V:function(){return r}}),function(e){e.CANCELLED="cancelled",e.COMPLETED="completed",e.FAILED="failed",e.INITIAL="initial",e.RUNNING="running"}(r||(r={}))},47409:function(e,n,t){"use strict";t.d(n,{D:function(){return l},V:function(){return o}});var r,i=t(82394),o=t(66050).V,l=(r={},(0,i.Z)(r,o.CANCELLED,"Cancelled"),(0,i.Z)(r,o.COMPLETED,"Done"),(0,i.Z)(r,o.FAILED,"Failed"),(0,i.Z)(r,o.INITIAL,"Ready"),(0,i.Z)(r,o.RUNNING,"Running"),r)},16953:function(e,n,t){"use strict";var r=t(28598);n.Z=function(e){var n=e.size;return(0,r.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,r.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,r.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})}},89745:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return oe}});var r=t(77837),i=t(38860),o=t.n(i),l=t(82684),c=t(2626),u=t(41788),s=t(75582),d=t(82394),a=t(93461),p=t(67971),f=t(87372),m=t(47409),v=t(86673),h=t(54283),b=t(19711),g=t(23831),x=t(10503),j=t(9518),Z=t(73942),C=t(2005),y=t(49125),k=t(31012),w=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,y.cd*y.iI,(function(e){return"\n background-color: ".concat((e.theme.background||g.Z.background).panel,";\n border: 1px solid ").concat((e.theme.borders||g.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&e.danger&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).negative,";\n ")}),(function(e){return e.selected&&e.primary&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.selected&&e.default&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).focusBackground,";\n ")}),(function(e){return e.selected&&e.success&&"\n border-color: ".concat((e.theme.background||g.Z.background).success,";\n ")}),(function(e){return e.selected&&e.warning&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).warning,";\n ")}),(function(e){return e.danger&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n border-color: ".concat((e.theme.interactive||g.Z.interactive).focusBackground,";\n ")}),(function(e){return e.success&&"\n border-color: ".concat((e.theme.background||g.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n border-color: ".concat((e.theme.accent||g.Z.accent).warning,";\n ")})),I=(0,j.css)([""," "," "," "," ",""],(function(e){return e.danger&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).negative,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.interactive||g.Z.interactive).linkPrimary,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||g.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||g.Z.background).success,";\n ")}),(function(e){return e.warning&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).warning,";\n ")})),_=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],I,k.iD,Z.D7,C.ry,(function(e){return e.danger&&"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")}),(function(e){return e.primary&&"\n color: ".concat((e.theme.content||g.Z.content).active,";\n ")}),(function(e){return(e.default||e.success)&&"\n "}),(function(e){return e.default&&"\n color: ".concat((e.theme.content||g.Z.content).default,";\n ")}),(function(e){return e.success&&"\n color: ".concat((e.theme.content||g.Z.content).inverted,";\n ")}),(function(e){return e.warning&&"\n color: ".concat((e.theme.content||g.Z.content).inverted,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],I,(function(e){return e.default&&"\n background-color: ".concat((e.theme.interactive||g.Z.interactive).focusBackground,";\n ")})),N=t(90211),O=t(92083),M=t.n(O),S=t(66050),E=t(24224);function V(e){var n;return Object.keys((null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{}).sort()}function L(e){var n,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null,o=null,l=null,c=null,u={},d=(null===e||void 0===e?void 0:e.block_runs)||[],a=(null===e||void 0===e||null===(n=e.metrics)||void 0===n?void 0:n.blocks)||{},p=(null===e||void 0===e||null===(t=e.metrics)||void 0===t?void 0:t.pipeline)||{},f=R(e);return Object.entries(a).forEach((function(e){var n,t=(0,s.Z)(e,2),d=t[0],a=t[1];if(!r||r===d){var m,v=a||{},h=v.destinations,b=void 0===h?{records_affected:null,records_inserted:null,records_updated:null}:h,g=v.sources,x=void 0===g?{records:null}:g,j=f[d]||[];if(r&&r===d&&j.every((function(e){var n=e.status;return S.V.COMPLETED===n}))&&null===i&&(i=0),null!==p&&void 0!==p&&null!==(n=p[d])&&void 0!==n&&n.record_counts)null===i&&(i=0),i+=Number(null===p||void 0===p||null===(m=p[d])||void 0===m?void 0:m.record_counts);else null!==x&&void 0!==x&&x.records&&(null===i&&(i=0),i+=Number(x.records));null!==b&&void 0!==b&&b.records_updated?(null===l&&(l=0),l+=Number(b.records_updated),null===c&&(c=0),c+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===l&&(l=0),l+=Number(b.records_inserted),null===o&&(o=0),o+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===l&&(l=0),l+=Number(b.records_affected)),["destinations","sources"].forEach((function(e){var n=a[e]||{};null!==n&&void 0!==n&&n.error&&(u[d]||(u[d]={}),u[d][e]={error:null===n||void 0===n?void 0:n.error,errors:null===n||void 0===n?void 0:n.errors,message:null===n||void 0===n?void 0:n.message})}))}})),null===d||void 0===d||d.forEach((function(e){var n=e.block_uuid,t=e.metrics,r=e.status;if(S.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&n){var i=n.split(":"),o=(0,s.Z)(i,3),l=(o[0],o[1]);o[2];u[l]||(u[l]={}),u[l][""]=t.error}})),{errors:u,records:i,recordsInserted:o,recordsProcessed:l,recordsUpdated:c}}function R(e){var n=e.block_runs,t={};return null===n||void 0===n||n.forEach((function(e){var n=e.block_uuid.split(":"),r=(0,s.Z)(n,3),i=(r[0],r[1]);r[2];t[i]||(t[i]=[]),t[i].push(e)})),t}function D(e){var n=R(e),t={};return Object.entries(n).forEach((function(e){var n=(0,s.Z)(e,2),r=n[0],i=n[1],o=i.filter((function(e){var n=e.status;return S.V.COMPLETED===n})),l=o.map((function(e){var n=e.completed_at,t=e.started_at,r=M().utc(n),i=M().utc(t);return r.diff(i,"second")})),c=o.length,u=i.length;t[r]={completed:c,runtime:l.length>=1?(0,E.Sm)(l)/l.length:null,total:u}})),t}function T(e){var n=e.block_runs,t=(null===n||void 0===n?void 0:n.length)||1,r=function(e){var n=(null===e||void 0===e?void 0:e.block_runs)||[];return null===n||void 0===n?void 0:n.filter((function(e){var n=e.status;return S.V.COMPLETED===n}))}(e).length||0;return r/t}function A(e){var n=e.completed_at,t=e.block_runs,r=void 0===t?[]:t,i=e.status;if(null===r||void 0===r||!r.length)return 0;var o=M().utc();if(n)o=M().utc(n);else if([m.V.CANCELLED,m.V.FAILED].includes(i)){var l=(0,E.YC)(r,(function(e){return e.started_at}),{ascending:!1})[0];o=M().utc(l.updated_at)}var c=M().utc(e.created_at);return o.diff(c,"second")}function B(e,n){var t,r,i,o,l,c=R(e),u=D(e),s=(null===e||void 0===e?void 0:e.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},p=(d[n],a[n],u[n]||{completed:null,total:null}),f=p.completed,m=p.total,v=f&&m?f/m:0,h=c[n]||[],b=h.every((function(e){var n=e.status;return S.V.COMPLETED===n})),g=(0,E.YC)(h,(function(e){return e.updated_at}),{ascending:!1})[0],x=null===(t=(0,E.YC)(h,(function(e){return e.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;b?r=null===(l=(0,E.YC)(h,(function(e){return e.completed_at}),{ascending:!1})[0])||void 0===l?void 0:l.completed_at:g&&(o=null===g||void 0===g?void 0:g.updated_at);var j=b?M().utc(r||o):M().utc(),Z=M().utc(x);return{completed:f,completedAt:r,done:b,progress:v,runtime:i=j.diff(Z,"second"),startedAt:x,status:null===g||void 0===g?void 0:g.status,timeText:(0,N.zf)(i),total:m,updatedAt:o}}var H=t(28598);function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function U(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?z(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var G=function(e){var n=e.onSelect,t=e.pipelineRun,r=e.selected,i=(t.block_runs,t.created_at),o=t.status,c=(0,l.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),u=((0,l.useMemo)((function(){return c.blocks||{}}),[c]),(0,l.useMemo)((function(){return c.pipeline||{}}),[c])),d=c.destination,j=c.source,Z=(0,l.useMemo)((function(){return Object.keys(u).length}),[u]),C=(0,l.useMemo)((function(){return L(t)}),[t]),k=C.errors,I=C.records,O=C.recordsProcessed,M=(0,l.useMemo)((function(){return T(t)}),[t]),S=(0,l.useMemo)((function(){return[m.V.COMPLETED].includes(o)}),[o]),E=(0,l.useMemo)((function(){return{danger:m.V.FAILED===o,default:m.V.INITIAL===o,primary:m.V.RUNNING===o,success:S,warning:m.V.CANCELLED===o}}),[S,o]),V=(0,l.useMemo)((function(){if(t){var e=A(t);return(0,N.zf)(e)}}),[t]);return(0,H.jsx)(w,U(U({},E),{},{onClick:function(){return n(r?null:t.id)},selected:r,children:(0,H.jsxs)(p.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,H.jsx)(P,U({},E)),(0,H.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsx)(f.Z,{bold:!0,level:5,monospace:!0,children:i}),(0,H.jsx)(v.Z,{fullWidth:!1,mt:2,children:(0,H.jsx)(_,U(U({},E),{},{children:(0,H.jsxs)(p.Z,{alignItems:"center",children:[S&&(0,H.jsx)(x.Jr,{inverted:!0,size:2*y.iI}),[m.V.INITIAL,m.V.RUNNING].includes(o)&&(0,H.jsx)(h.Z,{color:m.V.INITIAL!==o?g.Z.monotone.white:null,inverted:m.V.INITIAL===o,small:!0}),"\xa0",m.V.RUNNING===o&&(0,H.jsxs)(H.Fragment,{children:["\xa0",Math.round(100*M),"%"]}),![m.V.INITIAL,m.V.RUNNING].includes(o)&&m.D[o],m.V.INITIAL===o&&"Starting"]})}))}),Object.values(k).length>=1&&(0,H.jsx)(v.Z,{mt:1,children:Object.entries(k).map((function(e,n){var t=(0,s.Z)(e,2),r=t[0];t[1];return(0,H.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[r," stream failed"]},r)}))})]})}),(0,H.jsxs)(a.Z,{flex:1,children:[(0,H.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,H.jsx)(b.ZP,{monospace:!0,children:O>=1?(0,N.x6)(O):"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,H.jsx)(b.ZP,{monospace:!0,children:I>=1&&I>=O?(0,N.x6)(I-O):"-"})]}),m.V.RUNNING!==o&&(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,H.jsx)(b.ZP,{monospace:!0,children:V})]})]})}),(0,H.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,H.jsxs)(v.Z,{ml:3,py:3,children:[(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,H.jsx)(b.ZP,{monospace:!0,children:j||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,H.jsx)(b.ZP,{monospace:!0,children:d||"-"})]}),(0,H.jsxs)(v.Z,{mb:1,children:[(0,H.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,H.jsx)(b.ZP,{monospace:!0,children:Z>=1?(0,N.x6)(Z):"-"})]})]})})]})]})}))},F=t(89565),W=t.n(F),Y=t(34376),q=t(60328),K=t(10919),J=t(87815),X=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(e){return e.even&&e.fill&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).cyan,";\n ")}),(function(e){return e.even&&!e.fill&&"\n background-color: ".concat((e.theme.accent||g.Z.accent).cyanTransparent,";\n ")}),(function(e){return"\n height: ".concat((e.small?1:2)*y.iI,"px;\n ")})),Q=t(66653);var $=function(e){var n=e.onClickRow,t=e.pipelineRun,r=e.selectedStream,i=(0,Y.useRouter)(),o=(0,l.useState)(null),c=o[0],u=o[1],d=(0,l.useState)(null),a=d[0],h=d[1],g=(0,l.useMemo)((function(){return t?R(t):{}}),[t]),j=(0,l.useMemo)((function(){return t?D(t):{}}),[t]),Z=(0,l.useMemo)((function(){var e=0,n=[],t=[];if(Object.entries(j).forEach((function(r){var i=(0,s.Z)(r,2),o=(i[0],i[1]),l=o.completed,c=o.runtime,u=o.total;null===c?t.push(o):(n.push(c),e+=c*(u-l))})),0===n.length)return null;var r=(0,E.Sm)(n)/n.length;return t.forEach((function(n){var t=n.completed,i=n.total;e+=r*(i-t)})),e}),[j]),C=(0,l.useMemo)((function(){return r?j[r]:null}),[j,r]),k=(0,l.useMemo)((function(){if(r&&j){var e=j[r]||{},n=e.completed,i=e.total;if(i>=1)return n/i}else if(t)return T(t);return 0}),[C,t,r]),w=(0,l.useMemo)((function(){return(0,H.jsx)(p.Z,{children:(0,E.w6)(101).map((function(e,n){return(0,H.jsx)(X,{fill:k>0&&Math.round(100*k)>=n,even:n%2===0},n)}))})}),[k]),I=(0,l.useMemo)((function(){if(r){var e=g[r]||[],n=e.every((function(e){var n=e.status;return S.V.COMPLETED===n})),i=(0,E.YC)(e,(function(e){return e.updated_at}),{ascending:!1})[0],o=null===i||void 0===i?void 0:i.status,l=C||{},c=l.completed,u=l.runtime,s=l.total;if(n)return"Sync complete for ".concat(r);if([S.V.CANCELLED,S.V.FAILED].includes(o))return m.D[o];if(u&&s>=1){var d=Math.ceil(u*(s-c)/60);return"".concat((0,N._6)("minute",d,!0)," to completion")}return"Estimating time remaining for stream..."}if(m.V.COMPLETED===(null===t||void 0===t?void 0:t.status))return"Sync complete";if(t){if([m.V.CANCELLED,m.V.FAILED].includes(null===t||void 0===t?void 0:t.status))return m.D[null===t||void 0===t?void 0:t.status];if(m.V.INITIAL===(null===t||void 0===t?void 0:t.status))return"Initializing sync (this can take several minutes)";if(null===Z)return"Estimating time remaining...";var a=Math.ceil(Z/60);return"".concat((0,N._6)("minute",a,!0)," to completion")}return"Select a sync"}),[g,Z,C,t,r]),_=(0,l.useMemo)((function(){return t&&r?B(t,r):{completed:null,completedAt:null,done:null,progress:null,runtime:null,startedAt:null,status:null,timeText:null,total:null,updatedAt:null}}),[t,r]);(0,l.useEffect)((function(){var e;if(t){var n=A(t);u(n),e=setInterval((function(){return u((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t]),(0,l.useEffect)((function(){var e;if(t&&r&&_){var n=null===_||void 0===_?void 0:_.runtime;h(n),e=setInterval((function(){return h((function(e){return e+1}))}),1e3)}return function(){return clearInterval(e)}}),[t,r,_]);var P=(0,l.useMemo)((function(){if(t){if(r)return null===_||void 0===_?void 0:_.timeText;var e=A(t);return(0,N.zf)(e)}}),[t,r,_]),O=(0,l.useMemo)((function(){var e=Math.floor(c%86400/3600),n=Math.floor(c%3600/60),t=Math.floor(c%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[c]),M=(0,l.useMemo)((function(){var e=Math.floor(a%86400/3600),n=Math.floor(a%3600/60),t=Math.floor(a%60/1);return[e>=10?String(e):"0".concat(e),n>=10?String(n):"0".concat(n),t>=10?String(t):"0".concat(t)].join(":")}),[a]),z=(0,l.useMemo)((function(){return t?L(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),U=z.errors,G=z.records,F=z.recordsInserted,$=z.recordsProcessed,ee=z.recordsUpdated,ne=(0,l.useMemo)((function(){return t&&r?L(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),te=(0,l.useMemo)((function(){var e=r?null===ne||void 0===ne?void 0:ne.records:G,n=r?null===ne||void 0===ne?void 0:ne.recordsInserted:F,t=r?null===ne||void 0===ne?void 0:ne.recordsProcessed:$,i=r?null===ne||void 0===ne?void 0:ne.recordsUpdated:ee,o=[{label:"Rows fetched",value:null===e?"-":(0,N.x6)(e)}];return null===n&&null===i?o.push({label:"Rows processed",value:null===t?"-":(0,N.x6)(t)}):null!==n?o.push({label:"Rows inserted",value:(0,N.x6)(n)}):null!==i&&o.push({label:"Rows updated",value:(0,N.x6)(i)}),o.map((function(e){var n=e.label,t=e.value;return(0,H.jsxs)("div",{children:[(0,H.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:n}),(0,H.jsx)(b.ZP,{headline:!0,children:t})]},n)}))}),[G,ne,F,$,ee,P,O,status]),re=(0,l.useMemo)((function(){if(!t)return(0,H.jsx)("div",{});var e=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,pipeline:null},o=(e.blocks,e.pipeline,V(t));return(0,H.jsx)(J.Z,{columnFlex:[null,null,null,null,null,null],columns:[{uuid:"Stream"},{uuid:"Start"},{uuid:"End"},{uuid:"Time"},{uuid:"Progress"},{uuid:"Logs"}],isSelectedRow:function(e){return r&&r===o[e]},onClickRow:n,rows:o.map((function(e){var n=B(t,e),r=(n.completed,n.completedAt),o=n.done,l=n.progress,c=n.startedAt,u=n.status,s=n.timeText,d=(n.total,!!U[e]);return[(0,H.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:e},"stream"),(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:c?c.split(".")[0]:"-"},"started_at"),(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:r?r.split(".")[0]:"-"},"completed_at"),(0,H.jsx)(b.ZP,{default:!0,children:[S.V.INITIAL,S.V.RUNNING].includes(u)?"-":s},"runtime"),(0,H.jsxs)("div",{children:[o&&(0,H.jsx)(x.Jr,{default:!0,size:2*y.iI}),!o&&(0,H.jsx)(p.Z,{children:(0,E.w6)(51).map((function(e,n){return(0,H.jsx)(X,{fill:l>0&&Math.round(50*l)>=n,even:n%2===0,small:!0},n)}))})]},"progress"),(0,H.jsx)(q.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(e){i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,Q.j)(e)},children:(0,H.jsx)(x.B4,{default:!0,size:2*y.iI})},"logs")]})),uuid:"{pipelineRun?.id}-streams-table"})}),[U,j,t,r]),ie=(0,l.useMemo)((function(){var e,n,i,o,l,c,u,d;if(t&&r){var a=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},p=null===a||void 0===a||null===(e=a.pipeline)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.bookmarks)||void 0===i?void 0:i[r],f=null===a||void 0===a||null===(o=a.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c||null===(u=c.state)||void 0===u||null===(d=u.bookmarks)||void 0===d?void 0:d[r];if(p||f){var m=Array.from(new Set(Object.keys(p||{}).concat(Object.keys(f||{})))).sort(),v=[];m.forEach((function(e){var n=[(0,H.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[p,f].forEach((function(t,r){t&&n.push((0,H.jsx)(b.ZP,{monospace:!0,small:!0,children:t[e]},"".concat(e,"-").concat(r)))})),v.push(n)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",p],[null===a||void 0===a?void 0:a.destination,"destination",f]].forEach((function(e){var n=(0,s.Z)(e,3),t=n[0],r=n[1];n[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(J.Z,{columnFlex:[null,1,1],columns:h,rows:v,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),oe=(0,l.useMemo)((function(){var e,n,i,o,l,c;if(t&&r){var u=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},d=null===u||void 0===u||null===(e=u.blocks)||void 0===e||null===(n=e[r])||void 0===n||null===(i=n.sources)||void 0===i?void 0:i.record,a=null===u||void 0===u||null===(o=u.blocks)||void 0===o||null===(l=o[r])||void 0===l||null===(c=l.destinations)||void 0===c?void 0:c.record;if(d||a){var p=Object.keys(a||d||{}).sort(),f=[];p.forEach((function(e){var n=[(0,H.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:e},e)];[d,a].forEach((function(t,r){if(t){var i=t[e],o="object"===typeof i;n.push((0,H.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[o&&(0,H.jsx)("pre",{children:JSON.stringify(i,null,2)}),!o&&i]},"".concat(e,"-").concat(r)))}})),f.push(n)}));var m=[{label:function(){return""},uuid:"column"}];return[[null===u||void 0===u?void 0:u.source,"source",d],[null===u||void 0===u?void 0:u.destination,"destination",a]].forEach((function(e){var n=(0,s.Z)(e,3),t=n[0],r=n[1];n[2]&&m.push({uuid:"".concat(t," (").concat(r,")")})})),(0,H.jsx)(J.Z,{columnFlex:[null,1,1],columns:m,rows:f.map((function(e){return e.map((function(e){return(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:e},e)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),le=(0,l.useMemo)((function(){var e,n,i,o,l,c,u=null===t||void 0===t||null===(e=t.metrics)||void 0===e||null===(n=e.blocks)||void 0===n?void 0:n[r];return(null===u||void 0===u||null===(i=u.sources)||void 0===i||null===(o=i.block_tags)||void 0===o?void 0:o.destination_table)||(null===u||void 0===u||null===(l=u.destinations)||void 0===l||null===(c=l.block_tags)||void 0===c?void 0:c.destination_table)}),[t,r]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(v.Z,{p:3,children:[r&&(0,H.jsx)(v.Z,{mb:3,children:(0,H.jsxs)(p.Z,{alignItems:"center",children:[(0,H.jsx)(K.Z,{block:!0,onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,H.jsxs)(p.Z,{alignItems:"center",children:[(0,H.jsx)(x.Xd,{default:!0,size:1.5*y.iI}),(0,H.jsx)(v.Z,{mr:1}),(0,H.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,H.jsx)(v.Z,{mx:1,children:(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,H.jsx)(b.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,H.jsxs)(p.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsx)(v.Z,{my:1,mr:2,children:(0,H.jsx)(f.Z,{level:5,muted:!t,children:I})}),t&&(0,H.jsx)(q.Z,{small:!0,onClick:function(){return i.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},children:"Logs"})]}),(0,H.jsx)(v.Z,{mt:2,children:w}),t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(v.Z,{mt:3,children:(0,H.jsxs)(p.Z,{justifyContent:"space-between",children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,H.jsxs)(b.ZP,{headline:!0,children:[r&&[S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&M,r&&![S.V.INITIAL,S.V.RUNNING].includes(null===_||void 0===_?void 0:_.status)&&(null===_||void 0===_?void 0:_.timeText),!r&&[m.V.INITIAL,m.V.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&O,!r&&![m.V.INITIAL,m.V.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&P]})]}),te]})}),Object.values(U).length>=1&&(0,H.jsxs)(v.Z,{mt:3,children:[(0,H.jsx)(f.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(U).map((function(e,n){var t=(0,s.Z)(e,2),i=t[0],o=t[1];return(!r||r===i)&&(0,H.jsx)(v.Z,{mt:n>=1?1:0,children:Object.entries(o).map((function(e){var n=(0,s.Z)(e,2),t=n[0],r=n[1],o=r.error,l=r.errors,c=r.message,u=Array.isArray(o)?o.join(" "):o;return(0,H.jsxs)("div",{children:[(0,H.jsx)(v.Z,{mb:c||(null===l||void 0===l?void 0:l.length)>=1?2:0,children:(0,H.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[i,!!t&&(0,H.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,H.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,H.jsx)(W(),{children:u})})]})}),(0,H.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:c}),l.map((function(e){return(0,H.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))]},"".concat(i,"-").concat(t))}))},i)}))]})]})]}),t&&!r&&(0,H.jsx)(v.Z,{my:3,children:re}),t&&r&&(0,H.jsxs)(H.Fragment,{children:[le&&(0,H.jsx)(v.Z,{my:3,children:(0,H.jsxs)(v.Z,{px:3,children:[(0,H.jsx)(f.Z,{level:5,children:"Table name"}),(0,H.jsx)(v.Z,{mt:1,children:(0,H.jsx)(b.ZP,{default:!0,monospace:!0,children:le})})]})}),ie&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(f.Z,{level:5,children:"Bookmarks"})}),(0,H.jsx)(v.Z,{px:1,children:ie})]}),oe&&(0,H.jsxs)(v.Z,{my:3,children:[(0,H.jsx)(v.Z,{px:3,children:(0,H.jsx)(f.Z,{level:5,children:"Sample row"})}),(0,H.jsx)(v.Z,{px:1,children:oe})]})]})]})},ee=t(82531),ne=t(59920),te=t(33766),re=t(59e3);function ie(e){var n=e.pipeline,t=n.uuid,r=ee.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}),i=r.data,o=(r.mutate,(0,l.useMemo)((function(){return(null===i||void 0===i?void 0:i.pipeline_runs)||[]}),[i])),u=(0,re.iV)(),s=(0,l.useState)(null),d=s[0],a=s[1],p=(0,l.useState)(null),f=p[0],m=p[1];(0,l.useEffect)((function(){null!==u&&void 0!==u&&u.pipeline_run_id?m(null===o||void 0===o?void 0:o.find((function(e){return e.id===Number(u.pipeline_run_id)}))):f&&m(null),null!==u&&void 0!==u&&u.stream?a(u.stream):d&&a(null)}),[o,u,f,d]);var v=(0,l.useCallback)((function(){var e=f?V(f):[];return(0,H.jsx)($,{onClickRow:function(n){var t=e[n];(0,te.u)({stream:d===t?null:t})},pipelineRun:f,selectedStream:d})}),[f,d]),h=(0,l.useMemo)((function(){var e="/pipelines/".concat(t,"/syncs");f&&(e="".concat(e,"?pipeline_run_id=").concat(f.id));var n=[{label:function(){return"Syncs"},linkProps:d?{as:e,href:"/pipelines/[pipeline]/syncs"}:null}];return d&&n.push({label:function(){return d}}),n}),[f,d]);return(0,H.jsx)(c.Z,{breadcrumbs:h,buildSidekick:v,pageName:ne.M.SYNCS,pipeline:n,title:function(e){var n=e.name;return"".concat(n," syncs")},uuid:"".concat(ne.M.SYNCS,"_").concat(t),children:o.map((function(e){var n=(null===f||void 0===f?void 0:f.id)===e.id;return(0,H.jsx)(G,{onSelect:function(e){return(0,te.u)({pipeline_run_id:e,stream:null})},pipelineRun:e,selected:n},e.id)}))})}ie.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var oe=(0,u.Z)(ie)},33766:function(e,n,t){"use strict";t.d(n,{u:function(){return d}});var r=t(75582),i=t(82394),o=t(34376),l=t.n(o),c=t(59e3);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function d(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.replaceParams,o=t.pushHistory,u=i?{}:(0,c.iV)();n=window.location.pathname;var d=o?l().push:l().replace,a=s(s({},u),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 a[t]}));var p=(0,c.uM)(a);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return d(l().router.pathname,f,{shallow:!0})}},59416:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(89745)}])}},function(e){e.O(0,[3850,2083,9565,9767,6579,434,1830,9774,2888,179],(function(){return n=59416,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4249],{59920:function(e,n,t){"use strict";var i;t.d(n,{M:function(){return i}}),function(e){e.BACKFILLS="backfills",e.BLOCK_RUNS="block_runs",e.EDIT="edit",e.MONITOR="monitor",e.PIPELINE_LOGS="pipeline_logs",e.PIPELINE_RUNS="pipeline_runs",e.RUNS="runs",e.SYNCS="syncs",e.TRIGGERS="triggers"}(i||(i={}))},2626:function(e,n,t){"use strict";t.d(n,{Z:function(){return T}});var i=t(21831),r=t(75582),o=t(82684),c=t(83455),l=t(34376),u=t(28598);var s=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("g",{clipPath:"url(#clip0_7525_68660)",children:(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.67625 7.82429C8.48671 8.13404 8.61933 8.53116 8.9436 8.69464C9.26787 8.85812 9.6606 8.72561 9.85513 8.41896C10.5416 7.33682 11.5276 6.47056 12.6997 5.92987C14.0715 5.29701 15.6173 5.14749 17.085 5.50568C18.5526 5.86388 19.8557 6.70866 20.7818 7.90233C21.7079 9.096 22.2023 10.5682 22.1845 12.0788C22.1667 13.5895 21.6377 15.0496 20.6837 16.2211C19.7298 17.3926 18.4071 18.2064 16.9314 18.5299C15.4557 18.8534 13.9139 18.6675 12.5573 18.0024C11.3984 17.4343 10.433 16.545 9.77227 15.447C9.58502 15.1358 9.19553 14.9941 8.86749 15.1499C8.53946 15.3057 8.39751 15.6995 8.5797 16.0137C9.37152 17.379 10.5525 18.4842 11.9785 19.1832C13.6018 19.9791 15.4469 20.2016 17.213 19.8145C18.979 19.4273 20.5619 18.4534 21.7035 17.0514C22.8451 15.6495 23.4781 13.9022 23.4994 12.0943C23.5208 10.2865 22.9291 8.52472 21.8208 7.09623C20.7126 5.66774 19.1532 4.65677 17.3968 4.22811C15.6403 3.79945 13.7905 3.97839 12.1488 4.73574C10.7068 5.40099 9.50004 6.47805 8.67625 7.82429ZM0.219185 12.5303C-0.0737079 12.2375 -0.0737079 11.7626 0.219185 11.4697L4.71918 6.96968C5.01208 6.67679 5.48695 6.67679 5.77985 6.96968C6.07274 7.26258 6.07274 7.73745 5.77985 8.03034L2.56017 11.25L15.7495 11.25C16.1637 11.25 16.4995 11.5858 16.4995 12C16.4995 12.4142 16.1637 12.75 15.7495 12.75L2.56017 12.75L5.77985 15.9697C6.07274 16.2626 6.07274 16.7375 5.77985 17.0303C5.48695 17.3232 5.01208 17.3232 4.71918 17.0303L0.219185 12.5303Z",fill:"url(#paint0_linear_7525_68660)"})}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_7525_68660",x1:"11.7498",y1:"4",x2:"11.7498",y2:"20",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},a=t(16953),d=t(61519);var p=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.25 1C23.25 0.585786 22.9142 0.25 22.5 0.25C22.0858 0.25 21.75 0.585786 21.75 1V15.5C21.75 15.9142 22.0858 16.25 22.5 16.25C22.9142 16.25 23.25 15.9142 23.25 15.5V1ZM5 4.25C5.41421 4.25 5.75 4.58579 5.75 5V15.5C5.75 15.9142 5.41421 16.25 5 16.25C4.58579 16.25 4.25 15.9142 4.25 15.5V5C4.25 4.58579 4.58579 4.25 5 4.25ZM1.5 7.25C1.91421 7.25 2.25 7.58579 2.25 8V15.5C2.25 15.9142 1.91421 16.25 1.5 16.25C1.08579 16.25 0.75 15.9142 0.75 15.5V8C0.75 7.58579 1.08579 7.25 1.5 7.25ZM9.25 7C9.25 6.58579 8.91421 6.25 8.5 6.25C8.08579 6.25 7.75 6.58579 7.75 7V15.5C7.75 15.9142 8.08579 16.25 8.5 16.25C8.91421 16.25 9.25 15.9142 9.25 15.5V7ZM12 8.75C12.4142 8.75 12.75 9.08579 12.75 9.5V15.5C12.75 15.9142 12.4142 16.25 12 16.25C11.5858 16.25 11.25 15.9142 11.25 15.5V9.5C11.25 9.08579 11.5858 8.75 12 8.75ZM16.25 11.5C16.25 11.0858 15.9142 10.75 15.5 10.75C15.0858 10.75 14.75 11.0858 14.75 11.5V15.5C14.75 15.9142 15.0858 16.25 15.5 16.25C15.9142 16.25 16.25 15.9142 16.25 15.5V11.5ZM19 9.25C19.4142 9.25 19.75 9.58579 19.75 10V15.5C19.75 15.9142 19.4142 16.25 19 16.25C18.5858 16.25 18.25 15.9142 18.25 15.5V10C18.25 9.58579 18.5858 9.25 19 9.25Z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},f=t(70434),h=t(34744),g=t(67971),b=t(87372),v=t(98781),x=t(29664),m=t(86673);var j=function(e){var n=e.size;return(0,u.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 17c0 1.1046-.89543 2-2 2s-2-.8954-2-2 .89543-2 2-2 2 .8954 2 2zm1.5 0c0 1.933-1.567 3.5-3.5 3.5S1.5 18.933 1.5 17s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5zm2.25-.5c0-.4142.3358-.75.75-.75H22c.4142 0 .75.3358.75.75s-.3358.75-.75.75H11.5c-.4142 0-.75-.3358-.75-.75zM8.68946 4.29563c.16317-.38072-.0132-.82163-.39392-.9848-.38072-.16316-.82163.0132-.9848.39392L5.06418 8.94674c-.07952.18554-.3348.2052-.44179.03402L3.1361 6.60269c-.21953-.35125-.68225-.45803-1.0335-.2385-.35125.21954-.45803.68225-.2385 1.0335l1.48629 2.37807c.74892 1.19824 2.53587 1.06064 3.0925-.23814l2.24657-5.24199zM11.5 6.75c-.4142 0-.75.33579-.75.75s.3358.75.75.75H22c.4142 0 .75-.33579.75-.75s-.3358-.75-.75-.75H11.5z",fill:"url(#paint0_linear_2919_69883)"}),(0,u.jsx)("defs",{children:(0,u.jsxs)("linearGradient",{id:"paint0_linear_2919_69883",x1:"1.5",y1:"11.875",x2:"22.75",y2:"11.875",gradientUnits:"userSpaceOnUse",children:[(0,u.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,u.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})},y=t(82531),C=t(10503),O=t(9518),Z=t(23831),w=t(73942),_=t(49125),P=O.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],w.n_,3*_.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||Z.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 ')})),S=t(3055),k=t(59920),I=t(96510),E=t(90211),D=t(24141);var T=function(e){var n=e.after,t=e.afterHidden,O=e.afterWidth,Z=e.before,w=e.beforeWidth,T=e.breadcrumbs,N=e.buildSidekick,M=e.children,H=e.headline,R=e.pageName,V=e.pipeline,A=e.subheader,B=e.subheaderBackground,L=e.subheaderBackgroundImage,Y=e.subheaderButton,F=e.subheaderText,z=e.title,U=e.uuid,G=(0,l.useRouter)(),q=(0,D.i)().height,J=V.uuid,W=y.ZP.pipelines.detail(J,{includes_outputs:!1},{revalidateOnFocus:!1}).data,X=null===W||void 0===W?void 0:W.pipeline,K=(0,c.Db)(y.ZP.pipelines.useCreate(),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(e){var n=e.pipeline.uuid;G.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n,"/edit"))}})}}),Q=(0,r.Z)(K,1)[0],$=(0,c.Db)((function(e){return y.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,I.wD)(e,{callback:function(){G.push("/pipelines")}})}}),ee=(0,r.Z)($,1)[0],ne=[{label:function(){return"New standard pipeline"},onClick:function(){return Q({pipeline:{name:(0,E.Y6)()}})},uuid:"PipelineDetail/Header/new_standard_pipeline"},{label:function(){return"New streaming pipeline"},onClick:function(){return Q({pipeline:{name:(0,E.Y6)(),type:v.q.STREAMING}})},uuid:"PipelineDetail/Header/new_streaming_pipeline"},{label:function(){return"Delete current pipeline"},onClick:function(){return ee(J)},openConfirmationDialogue:!0,uuid:"PipelineDetail/Header/delete_pipeline"}],te=(0,o.useMemo)((function(){return n||(N?N({height:q,heightOffset:S.Mz,pipeline:X}):null)}),[n,N,q,X]),ie=O||(te?50*_.iI:null),re=(0,o.useMemo)((function(){var e=[];return X&&(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),T?(e.push({label:function(){return X.uuid},linkProps:{as:"/pipelines/".concat(J,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(T)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return X.name}})),e}),[T,X,J]),oe=[{Icon:C.Pf,IconSelected:x.Z,id:k.M.TRIGGERS,isSelected:function(){return k.M.TRIGGERS===R},label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(J,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{Icon:C.pd,IconSelected:d.Z,id:k.M.RUNS,isSelected:function(){return k.M.RUNS===R},label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(J,"/runs"),href:"/pipelines/[pipeline]/runs"}},{Icon:C.yg,IconSelected:s,id:k.M.BACKFILLS,isSelected:function(){return k.M.BACKFILLS===R},label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(J,"/backfills"),href:"/pipelines/[pipeline]/backfills"}},{Icon:C.B4,IconSelected:j,id:k.M.PIPELINE_LOGS,isSelected:function(){return k.M.PIPELINE_LOGS===R},label:function(){return"Logs"},linkProps:{as:"/pipelines/".concat(J,"/logs"),href:"/pipelines/[pipeline]/logs"}},{Icon:C.kL,IconSelected:p,id:k.M.MONITOR,isSelected:function(){return k.M.MONITOR===R},label:function(){return"Monitor"},linkProps:{as:"/pipelines/".concat(J,"/monitors"),href:"/pipelines/[pipeline]/monitors"}}];return v.q.INTEGRATION===(null===X||void 0===X?void 0:X.type)&&oe.unshift({Icon:C.Re,IconSelected:a.Z,id:k.M.SYNCS,isSelected:function(){return k.M.SYNCS===R},label:function(){return"Syncs"},linkProps:{as:"/pipelines/".concat(J,"/syncs"),href:"/pipelines/[pipeline]/syncs"}}),oe.unshift({Icon:null,IconSelected:null,id:k.M.EDIT,label:function(){return"Edit pipeline"},linkProps:{as:"/pipelines/".concat(J,"/edit"),href:"/pipelines/[pipeline]/edit"}}),(0,u.jsxs)(f.Z,{after:te,afterHidden:t,afterWidth:ie,before:Z,beforeWidth:w,breadcrumbs:re,headerMenuItems:ne,navigationItems:oe,subheaderChildren:"undefined"!==typeof A&&A,title:X?z?z(X):X.name:null,uuid:U,children:[(Y||F)&&(0,u.jsx)(m.Z,{mb:_.Mq,mt:_.cd,mx:_.cd,children:(0,u.jsx)(P,{background:B,backgroundImage:L,children:(0,u.jsxs)(g.Z,{alignItems:"center",children:[Y,F&&(0,u.jsx)(m.Z,{ml:3}),F]})})}),H&&(0,u.jsx)(m.Z,{p:_.cd,children:(0,u.jsxs)(m.Z,{mt:_.cd,px:_.cd,children:[(0,u.jsx)(b.Z,{level:5,children:H}),(0,u.jsx)(h.Z,{light:!0,mt:_.cd,short:!0})]})}),M]})}},58122:function(e,n,t){"use strict";t.d(n,{CL:function(){return f},FS:function(){return h},JZ:function(){return b},e7:function(){return v},v0:function(){return p},wx:function(){return g}});var i=t(75582),r=t(82394),o=t(43313),c=t(93348),l=t(1286),u=t(90211),s=t(84779);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,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}function p(e){var n=e.statistics,t=Object.keys(n),i=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],r=n[e],c=r,l=!1,u=[2,3],a=o.Ub[e],d=o.oH[e],p=o.OD[e];if(o.y_.includes(e))l=!0,u=[2,1,2];else if(e in o.Sq){r=(0,s.Jw)(r,0);var f=o.Sq[e];c=n[f]}var h={columnFlexNumbers:u,name:t,progress:l,rate:c,successDirection:d,warning:p};o.y_.includes(e)||(h.value=r),i[a]=h}})),i)}function f(e){var n=e.columnTypes,t=void 0===n?{}:n,i=e.statistics,r=Object.keys(i);if(0===r.length)return null;var c=Object.values(t),s=c.length,a=[];a.push({name:"Column count",successDirection:o.oH.column_count,value:(0,u.x6)(s)}),r.forEach((function(e){if(o.Zu.includes(e)){var n=o.CC[e],t=i[e],r=o.OD[e];a.push({name:n,successDirection:o.oH[e],value:(0,u.x6)(t),warning:r})}}));var d=(0,l.QO)(c),p=d.countCategory,f=d.countDatetime,h=d.countNumerical;return a.push({name:"Categorical Features",rate:p/s,value:(0,u.x6)(p)},{name:"Numerical Features",rate:h/s,value:(0,u.x6)(h)},{name:"Datetime Features",rate:f/s,value:(0,u.x6)(f)}),a}function h(e){return"string"===typeof e?e:JSON.stringify(e)}function g(e,n){var t,i;return null===e||void 0===e||null===(t=e.find((function(e){var t=e.block;return n(t)})))||void 0===t||null===(i=t.variables)||void 0===i?void 0:i.map((function(e){var n=e.value;return d(d({},e),{},{value:h(n)})}))}function b(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,i.Z)(n,2),o=t[0],c=t[1],l=c;try{l=JSON.parse(c)}catch(u){}return d(d({},e),{},(0,r.Z)({},o,l))}),{}):e}},97225:function(e,n,t){"use strict";var i=t(75582),r=t(12691),o=t.n(r),c=t(82684),l=t(83455),u=t(34376),s=t(60328),a=t(47999),d=t(67971),p=t(10919),f=t(93348),h=t(62609),g=t(86673),b=t(87815),v=t(19711),x=t(82531),m=t(10503),j=t(49125),y=t(45838),C=t(96510),O=t(66653),Z=t(28598);n.Z=function(e){var n=e.fetchPipelineSchedules,t=e.highlightRowOnHover,r=e.includeCreatedAtColumn,w=e.includePipelineColumn,_=e.pipeline,P=e.pipelineSchedules,S=e.selectedSchedule,k=e.setSelectedSchedule,I=e.stickyHeader,E=null===_||void 0===_?void 0:_.uuid,D=(0,u.useRouter)(),T=(0,c.useRef)({}),N=(0,c.useState)(null),M=N[0],H=N[1],R=(0,c.useState)(0),V=R[0],A=R[1],B=(0,c.useState)(0),L=B[0],Y=B[1],F=(0,l.Db)((function(e){return x.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){n()},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.message;console.log(t,i)}})}}),z=(0,i.Z)(F,1)[0],U=(0,l.Db)((function(e){return x.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,C.wD)(e,{callback:function(){n(),E?D.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(E,"/triggers")):n()}})}}),G=(0,i.Z)(U,1)[0],q=[{label:function(){return""},uuid:"action"},{uuid:"Status"},{uuid:"Type"},{uuid:"Name"},{uuid:"Frequency"},{uuid:"Runs"},{uuid:"Latest run status"},{uuid:"Logs"},{label:function(){return""},uuid:"edit/delete"}],J=[null,1,1,3,1,null,null,null,null];return w&&(q.splice(2,0,{uuid:"Pipeline"}),J.splice(2,0,2)),r&&(q.splice(3,0,{uuid:"Created at"}),J.splice(3,0,null)),(0,Z.jsx)(y.cl,{overflowVisible:!0,children:0===P.length?(0,Z.jsx)(g.Z,{px:3,py:1,children:(0,Z.jsx)(v.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,Z.jsx)(b.Z,{columnFlex:J,columns:q,highlightRowOnHover:t,isSelectedRow:function(e){return P[e].id===(null===S||void 0===S?void 0:S.id)},onClickRow:k?function(e){return null===k||void 0===k?void 0:k(P[e])}:null,rowVerticalPadding:6,rows:P.map((function(e,n){var t,i=e.id,l=e.created_at,u=e.pipeline_runs_count,b=e.pipeline_uuid,x=e.last_pipeline_run_status,y=e.name,C=e.schedule_interval,_=e.status,P=E||b;T.current[i]=(0,c.createRef)();var S=[(0,Z.jsx)(s.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,O.j)(n),z({id:e.id,status:f.fq.ACTIVE===_?f.fq.INACTIVE:f.fq.ACTIVE})},children:f.fq.ACTIVE===_?(0,Z.jsx)(m.dz,{muted:!0,size:2*j.iI}):(0,Z.jsx)(m.Py,{default:!0,size:2*j.iI})},"toggle_trigger_".concat(n)),(0,Z.jsx)(v.ZP,{default:f.fq.INACTIVE===_,monospace:!0,success:f.fq.ACTIVE===_,children:_},"trigger_status_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:null===(t=f.Z4[e.schedule_type])||void 0===t?void 0:t.call(f.Z4)},"trigger_type_".concat(n)),(0,Z.jsx)(o(),{as:"/pipelines/".concat(P,"/triggers/").concat(i),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,Z.jsx)(p.Z,{bold:!0,onClick:function(e){(0,O.j)(e),D.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(P,"/triggers/").concat(i))},sameColorAsText:!0,children:y})},"trigger_name_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:C},"trigger_frequency_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:u},"trigger_run_count_".concat(n)),(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:x||"N/A"},"latest_run_status_".concat(n)),(0,Z.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return D.push("/pipelines/".concat(P,"/logs?pipeline_schedule_id[]=").concat(i))},children:(0,Z.jsx)(m.B4,{default:!0,size:2*j.iI})},"logs_button_".concat(n)),(0,Z.jsxs)(d.Z,{children:[(0,Z.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return D.push("/pipelines/".concat(P,"/triggers/").concat(i,"/edit"))},title:"Edit",children:(0,Z.jsx)(m.I8,{default:!0,size:2*j.iI})}),(0,Z.jsx)(g.Z,{mr:1}),(0,Z.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,r;H(i),A((null===(e=T.current[i])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),Y((null===(t=T.current[i])||void 0===t||null===(r=t.current)||void 0===r?void 0:r.offsetLeft)||0)},ref:T.current[i],title:"Delete",children:(0,Z.jsx)(m.rF,{default:!0,size:2*j.iI})}),(0,Z.jsx)(a.Z,{onClickOutside:function(){return H(null)},open:M===i,children:(0,Z.jsx)(h.Z,{danger:!0,left:(L||0)-286,onCancel:function(){return H(null)},onClick:function(){H(null),G(i)},title:"Are you sure you want to delete the trigger ".concat(y,"?"),top:(V||0)-(n<=1?40:96),width:40*j.iI})})]},"edit_delete_buttons_".concat(n))];return w&&S.splice(2,0,(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:P},"pipeline_name_".concat(n))),r&&S.splice(3,0,(0,Z.jsx)(v.ZP,{default:!0,monospace:!0,children:l},"created_at_".concat(n))),S})),stickyHeader:I,uuid:"pipeline-triggers"})})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return u},Xm:function(){return o},Z4:function(){return a},fq:function(){return l},kJ:function(){return s}});var i,r,o,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var l,u,s,a=(i={},(0,c.Z)(i,o.API,(function(){return"API"})),(0,c.Z)(i,o.EVENT,(function(){return"event"})),(0,c.Z)(i,o.TIME,(function(){return"schedule"})),i);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(u||(u={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(s||(s={}));var d=(r={},(0,c.Z)(r,s.CREATED_AT,"Created at"),(0,c.Z)(r,s.NAME,"Name"),(0,c.Z)(r,s.PIPELINE,"Pipeline"),(0,c.Z)(r,s.STATUS,"Status"),(0,c.Z)(r,s.TYPE,"Type"),r)},29237:function(e,n,t){"use strict";var i=t(9518),r=t(67971),o=t(86673),c=t(19711),l=t(31969),u=t(73942),s=t(37391),a=t(49125),d=t(28598),p=1.75,f=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],p*a.iI,1.5*a.iI,1.5*a.iI),h=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," "," "," ",""],u.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n border: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\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.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 "})),g=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," ",""],u.n_,u.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),f),b=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],p*a.iI,s.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*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),v=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],u.M8,u.YF,p*a.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,l=e.contentContainerRef,u=e.footer,s=e.fullHeight,a=void 0===s||s,p=e.header,f=e.headerHeight,x=e.headerIcon,m=e.headerTitle,j=e.maxHeight,y=e.noPadding,C=e.overflowVisible,O=e.subtitle,Z=e.minWidth;return(0,d.jsxs)(h,{borderless:n,fullHeight:a,maxHeight:j,minWidth:Z,overflowVisible:C,ref:i,children:[(p||m)&&(0,d.jsxs)(g,{height:f,children:[p&&p,m&&(0,d.jsx)(r.Z,{alignItems:"center",justifyContent:"space-between",children:(0,d.jsxs)(r.Z,{alignItems:"center",children:[x&&x,(0,d.jsx)(o.Z,{ml:x?1:0,children:(0,d.jsx)(c.ZP,{bold:!0,default:!0,children:m})})]})})]}),(0,d.jsxs)(b,{maxHeight:j,noPadding:y,overflowVisible:C,ref:l,children:[O&&(0,d.jsx)(o.Z,{mb:2,children:(0,d.jsx)(c.ZP,{default:!0,children:O})}),t]}),u&&(0,d.jsx)(v,{children:u})]})}},82944:function(e,n,t){"use strict";var i=t(82394),r=t(91835),o=t(82684),c=t(9518),l=t(69898),u=t(28598);function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function a(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}var d=c.default.input.withConfig({displayName:"TextInput__TextInputStyle",componentId:"sc-1ii4qtc-0"})(["",""],l.p),p=function(e,n){var t=(0,r.Z)({},e);return(0,u.jsx)(l.Z,a(a({},t),{},{input:(0,u.jsx)(d,a({},t)),ref:n}))};n.Z=o.forwardRef(p)},70902:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=t(82684),c=t(9518),l=t(69898),u=t(23831),s=t(28598),a=["checked","onCheck"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function 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,i.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);}',""],l.p,46,46,26,(function(e){return e.disabled?"not-allowed":"pointer"}),(function(e){return e.disabled?u.Z.monotone.white:u.Z.monotone.black}),(function(e){return e.disabled&&"border: 1px solid ".concat(u.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(u.Z.monotone.white,";\n }\n ")})),h=function(e,n){var t=e.checked,i=e.onCheck,o=(0,r.Z)(e,a);return(0,s.jsx)(l.Z,p(p({},o),{},{input:(0,s.jsxs)(f,p(p({},o),{},{noBackground:!0,noBorder:!0,children:[(0,s.jsx)("input",{checked:t,type:"checkbox"}),(0,s.jsx)("span",{onClick:function(){return i((function(e){return!e}))}})]})),noBackground:!0,ref:n}))};n.Z=o.forwardRef(h)},16953:function(e,n,t){"use strict";var i=t(28598);n.Z=function(e){var n=e.size;return(0,i.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 8.5H15.5V3.5H20.5V8.5ZM14 9V3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10H15C14.4477 10 14 9.55229 14 9ZM2 5V12.5V14V21.5C2 22.0523 2.44772 22.5 3 22.5H10.5H12H19.5C20.0523 22.5 20.5 22.0523 20.5 21.5V13.5C20.5 12.9477 20.0523 12.5 19.5 12.5H12V5C12 4.44772 11.5523 4 11 4H3C2.44772 4 2 4.44772 2 5ZM10.5 14V21H3.5V14H10.5ZM19 14V21H12V14H19ZM10.5 5.5V12.5H3.5V5.5H10.5Z",fill:"url(#paint0_linear_2842_55048)"}),(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{id:"paint0_linear_2842_55048",x1:"2",y1:"12.25",x2:"22",y2:"12.25",gradientUnits:"userSpaceOnUse",children:[(0,i.jsx)("stop",{offset:"0.28125",stopColor:"#7D55EC"}),(0,i.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]})})]})}},56312:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return fe}});var i=t(77837),r=t(82394),o=t(75582),c=t(38860),l=t.n(c),u=t(12691),s=t.n(u),a=t(82684),d=t(83455),p=t(34376),f=t(60328),h=t(86532),g=t(34744),b=t(67971),v=t(87372),x=t(11135),m=t(10919),j=t(2626),y=t(93348),C=t(41788),O=t(29237),Z=t(86673),w=t(87815),_=t(19711),P=t(26304),S=t(9518),k=t(69898),I=t(28598),E=["rows"];function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function T(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 N=S.default.textarea.withConfig({displayName:"TextArea__TextInputStyle",componentId:"sc-112wx63-0"})(["",""],k.p),M=function(e,n){var t=e.rows,i=void 0===t?3:t,r=(0,P.Z)(e,E);return(0,I.jsx)(k.Z,T(T({},r),{},{input:(0,I.jsx)(N,T({rows:i},r)),ref:n}))},H=a.forwardRef(M),R=t(82944),V=t(70902),A=t(23831),B=t(73942),L=t(49125),Y=S.default.div.withConfig({displayName:"indexstyle__ToggleStyle",componentId:"sc-f9kt7n-0"})(["padding:","px ","px;border-radius:","px;",""],1.5*L.iI,2*L.iI,B.n_,(function(e){return"\n border: 1px solid ".concat((e.theme||A.Z).borders.light,";\n background-color: ").concat((e.theme||A.Z).background.popup,";\n ")})),F=t(90211),z=t(58122);function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?U(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):U(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var q="".concat(L.iI,"px ").concat(3*L.iI,"px");var J=function(e){var n=e.initialPipelineSchedulePayload,t=e.onCancel,i=e.onSuccess,c=e.variables,l=(0,a.useState)(!1),u=l[0],s=l[1],d=(0,a.useState)({}),p=d[0],h=d[1],g=(0,a.useState)(c||{}),x=g[0],m=g[1],j=(0,a.useMemo)((function(){return G(G({},n),{},{name:(0,F.Y6)(),variables:u?(0,z.e7)(x):null})}),[n,u,x]),y=function(e,n){var t={borderless:!0,key:"variable_uuid_input_".concat(e),monospace:!0,onChange:function(n){n.preventDefault(),m((function(t){return G(G({},t),{},(0,r.Z)({},e,n.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:n};return p[e]?(0,I.jsx)(H,G(G({},t),{},{rows:1,value:n})):(0,I.jsx)(R.Z,G({},t))};return(0,a.useEffect)((function(){var e=Object.entries(x).reduce((function(e,n){var t=(0,o.Z)(n,2),i=t[0],c=t[1],l=(0,F.Pb)(c)&&"object"===typeof JSON.parse(c)&&!Array.isArray(JSON.parse(c))&&null!==JSON.parse(c);return G(G({},e),{},(0,r.Z)({},i,l))}),{});h(e)}),[]),(0,I.jsxs)(O.Z,{footer:(0,I.jsxs)(b.Z,{alignItems:"center",fullWidth:!0,justifyContent:"flex-end",children:[(0,I.jsx)(f.Z,{onClick:function(){i({pipeline_schedule:j}),t()},padding:q,primaryAlternate:!0,children:"Run now"}),(0,I.jsx)(Z.Z,{mr:1}),(0,I.jsx)(f.Z,{borderColor:A.Z.background.page,onClick:t,padding:q,secondary:!0,children:"Cancel"})]}),header:(0,I.jsx)(v.Z,{level:5,children:"Run pipeline now"}),maxHeight:"90vh",minWidth:85*L.iI,subtitle:"Creates a new trigger and immediately runs the current pipeline once.",children:[(0,I.jsx)(Y,{children:(0,I.jsxs)(b.Z,{alignItems:"center",children:[(0,I.jsx)(Z.Z,{mr:2,children:(0,I.jsx)(V.Z,{checked:u,onCheck:s})}),(0,I.jsx)(_.ZP,{bold:!0,large:!0,children:"Overwrite runtime variables"})]})}),u&&x&&Object.entries(x).length>0&&(0,I.jsx)(Z.Z,{mt:2,children:(0,I.jsx)(w.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(x).map((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1];return[(0,I.jsx)(_.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),y(t,i)]}))})})]})},W=t(37391),X=S.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1xgfh62-0"})(["border-bottom:1px solid ",";padding:","px;"],A.Z.borders.medium,L.tr),K=S.default.div.withConfig({displayName:"indexstyle__CardsStyle",componentId:"sc-1xgfh62-1"})([""," height:80px;display:flex;overflow-x:scroll;"],W.w5),Q=S.default.div.withConfig({displayName:"indexstyle__VariableCardStyle",componentId:"sc-1xgfh62-2"})(["background-color:",";border-radius:","px;flex-shrink:0;margin-right:","px;padding:","px;"],A.Z.background.output,B.n_,L.iI,L.tr),$=t(73899);var ee=function(e){var n=e.hasOverride,t=e.scheduleType,i=e.variables,r=e.variablesOverride,c=[];return Object.entries(i).forEach((function(e){var n=(0,o.Z)(e,2),t=n[0],i=n[1],l=null===r||void 0===r?void 0:r[t];c.push({uuid:t,value:(0,z.FS)(l||i)})})),(0,z.JZ)(c,t),(0,I.jsxs)(X,{children:[(0,I.jsx)(Z.Z,{mb:2,children:(0,I.jsxs)(_.ZP,{bold:!0,large:!0,monospace:!0,muted:!0,children:["Runtime variables",n&&" (override)"]})}),(0,I.jsx)(K,{noScrollbarTrackBackground:!0,children:i&&c.map((function(e){var n=e.uuid,t=e.value;return(0,I.jsxs)(Q,{children:[(0,I.jsx)(_.ZP,{monospace:!0,small:!0,children:n}),(0,I.jsx)(_.ZP,{color:$.Or,monospace:!0,small:!0,children:(0,z.FS)(t)})]})}))})]})},ne=t(46261),te=t(97225),ie=t(82531),re=t(10503),oe=t(59920),ce=t(42305),le=t(7715),ue=t(96510),se=t(83608);function ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function de(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function pe(e){var n=e.pipeline,t=(0,p.useRouter)(),i=n.uuid,c=ie.ZP.variables.pipelines.list(i).data,l=null===c||void 0===c?void 0:c.variables,u=ie.ZP.pipeline_schedules.pipelines.list(i,{},{refreshInterval:7500}),C=u.data,O=u.mutate,w=(0,a.useMemo)((function(){return(null===C||void 0===C?void 0:C.pipeline_schedules)||[]}),[C]),P=function(e){return(0,d.Db)(ie.ZP.pipeline_schedules.pipelines.useCreate(i),{onSuccess:function(n){return(0,ue.wD)(n,{callback:function(n){var t=n.pipeline_schedule.id;null===e||void 0===e||e(t)},onErrorCallback:function(e){var n=e.error,t=n.errors,i=n.message;console.log(t,i)}})}})},S=P((function(e){return t.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(null===n||void 0===n?void 0:n.uuid,"/triggers/").concat(e,"/edit"))})),k=(0,o.Z)(S,2),E=k[0],D=k[1].isLoading,T=P(O),N=(0,o.Z)(T,2),M=N[0],H=N[1].isLoading,R=(0,a.useMemo)((function(){var e;return null===(e=(0,z.wx)(l,(function(e){return"global"===e.uuid})))||void 0===e?void 0:e.reduce((function(e,n){var t=n.uuid,i=n.value;return de(de({},e),{},(0,r.Z)({},t,i))}),{})}),[l]),V={name:(0,F.Y6)(),schedule_interval:y.U5.ONCE,schedule_type:y.Xm.TIME,start_time:(0,ce.d$)((new Date).toISOString(),{dayAgo:!0,utcFormat:!0}),status:y.fq.ACTIVE},A=(0,se.dd)((function(){return(0,I.jsx)(J,{initialPipelineSchedulePayload:V,onCancel:U,onSuccess:M,variables:R})}),{},[l,R],{background:!0,uuid:"run_pipeline_now_popup"}),B=(0,o.Z)(A,2),Y=B[0],U=B[1],G=(0,a.useState)(),q=G[0],W=G[1],X=(0,a.useMemo)((function(){var e=null===q||void 0===q?void 0:q.variables,n=!(0,le.Qr)(e),t=n?null===q||void 0===q?void 0:q.variables:(0,le.Qr)(R)?null:R;return function(r){var o=r.height-(t?151:0);return(0,I.jsxs)(I.Fragment,{children:[t&&(0,I.jsx)(ee,{hasOverride:n,scheduleType:null===q||void 0===q?void 0:q.schedule_type,variables:R,variablesOverride:e}),!t&&(0,I.jsxs)(Z.Z,{p:L.cd,children:[(0,I.jsx)(_.ZP,{children:"This pipeline has no runtime variables."}),(0,I.jsxs)(Z.Z,{mt:1,children:[(0,I.jsx)(s(),{as:"/pipelines/".concat(i,"/edit?sideview=variables"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,I.jsx)(m.Z,{children:"Click here"})})," ",(0,I.jsx)(_.ZP,{inline:!0,children:"to add variables to this pipeline."})]})]}),(0,I.jsx)(h.Z,de(de({},r),{},{height:o,noStatus:!0}))]})}}),[l,q]);return(0,I.jsxs)(j.Z,{breadcrumbs:[{label:function(){return"Triggers"}}],buildSidekick:X,pageName:oe.M.TRIGGERS,pipeline:n,subheaderBackgroundImage:"/images/banner-shape-purple-peach.jpg",subheaderButton:(0,I.jsx)(x.ZP,{beforeElement:(0,I.jsx)(re.mm,{size:2.5*L.iI}),blackBorder:!0,inline:!0,loading:D,noHoverUnderline:!0,onClick:function(){return E({pipeline_schedule:{name:(0,F.Y6)()}})},sameColorAsText:!0,uuid:"PipelineDetailPage/add_new_schedule",children:"Create new trigger"}),subheaderText:(0,I.jsx)(_.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(oe.M.TRIGGERS,"_").concat(i),children:[(0,I.jsx)(Z.Z,{mt:L.cd,px:L.cd,children:(0,I.jsxs)(b.Z,{justifyContent:"space-between",children:[(0,I.jsx)(v.Z,{level:5,children:"Pipeline triggers"}),(0,I.jsx)(ne.Z,{appearBefore:!0,default:!0,fullSize:!0,label:"Creates an @once trigger and runs pipeline immediately",widthFitContent:!0,children:(0,I.jsx)(f.Z,{beforeIcon:(0,I.jsx)(re.JM,{inverted:!0,size:2*L.iI}),loading:H,onClick:(0,le.Qr)(R)?function(){return M({pipeline_schedule:V})}:Y,outline:!0,success:!0,children:"Run pipeline now"})})]})}),(0,I.jsx)(g.Z,{light:!0,mt:L.cd,short:!0}),(0,I.jsx)(te.Z,{fetchPipelineSchedules:O,pipeline:n,pipelineSchedules:w,selectedSchedule:q,setSelectedSchedule:W})]})}pe.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var fe=(0,C.Z)(pe)},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return d},AY:function(){return p},BP:function(){return a},JX:function(){return s},OC:function(){return o},Pc:function(){return f},d$:function(){return u},lJ:function(){return h},n1:function(){return l}});var i=t(92083),r=t.n(i),o="YYYY-MM-DD HH:mm:SS",c="YYYY-MM-DD HH:mm",l="YYYY-MM-DD";function u(e,n){var t=n.utcFormat,i=n.dayAgo,o=r()(e);return t&&(o=o.utc()),i&&(o=o.subtract(1,"days")),o.format(c)}function s(e){return r().unix(e).format(c)}function a(e,n,t){return r()(e).utc().hours(+n).minutes(+t).format()}function d(e){return r()(e).unix()}function p(e,n,t){return"".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t)}function f(e){var n=r().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function h(e){return e.padStart(2,"0")}},40183:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers",function(){return t(56312)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,9767,6579,434,9898,1830,4463,6532,1286,9774,2888,179],(function(){return n=40183,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{33699:function(n,t,e){"use strict";e.d(t,{y:function(){return O},Z:function(){return X}});var r=e(89565),i=e.n(r),o=e(56085),a=e(82684),c=e(35490),u=e(47999),l=e(67971),s=e(82635),d=e(86673),f=e(54283),p=e(19711),h=e(9518),g=e(23831),y=e(49125),v=e(37391),m=(0,h.css)([""," ",""],(function(n){return!n.width&&"\n width: 100%;\n "}),(function(n){return n.width&&"\n width: ".concat(n.width,"px;\n ")})),b=h.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-11d4rgl-0"})([""," "," height:100%;overflow:auto;position:absolute;",""],m,v.w5,(function(n){return"\n background-color: ".concat((n.theme.background||g.Z.background).codeTextarea,";\n ")})),x=h.default.div.withConfig({displayName:"indexstyle__InnerStyle",componentId:"sc-11d4rgl-1"})([""," padding:","px;"],m,y.cd*y.iI),w=h.default.div.withConfig({displayName:"indexstyle__LineStyle",componentId:"sc-11d4rgl-2"})(["height:","px;"],20),S=(0,h.css)(["@keyframes cursor-blink{0%{opacity:0;}}::before{","}::after{","}"],(function(n){return n.focusBeginning&&"\n position: absolute;\n background-color: ".concat((n.theme.accent||g.Z.accent).warning,';\n content: "";\n display: inline-block;\n height: ').concat(20,"px;\n width: ").concat(y.iI,"px;\n opacity: 0.3;\n ")}),(function(n){return n.focused&&"\n background-color: ".concat((n.theme.accent||g.Z.accent).warning,';\n content: "";\n display: inline-block;\n height: ').concat(20,"px;\n width: ").concat(y.iI,"px;\n opacity: 0.3;\n ")})),T=h.default.div.withConfig({displayName:"indexstyle__InputStyle",componentId:"sc-11d4rgl-3"})(["align-items:center;display:flex;gap:2px;",""],S),k=h.default.span.withConfig({displayName:"indexstyle__CharacterStyle",componentId:"sc-11d4rgl-4"})([""," ::after{","}"],S,(function(n){return n.focused&&"\n position: absolute;\n "})),_=e(16115),P=e(94353),E=e(28799),I=e(51504),j=e(66653),Z=e(41150),A=e(28598);function N(n,t){var e="undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,t){if(!n)return;if("string"===typeof n)return C(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return C(n,t)}(n))||t&&n&&"number"===typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return a=n.done,n},e:function(n){c=!0,o=n},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw o}}}}function C(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}var O="terminal";var X=function(n){var t=n.interruptKernel,e=n.onFocus,r=n.uuid,h=void 0===r?O:r,g=n.width,y=(0,a.useRef)(null),v=(0,a.useRef)(null),m=(0,a.useState)(!1),S=m[0],C=m[1],X=(0,a.useState)(""),M=X[0],R=X[1],D=(0,a.useState)(0),U=D[0],F=D[1],G=(0,a.useState)(0),L=G[0],Y=G[1],K=(0,a.useState)([]),B=K[0],Q=K[1],z=(0,a.useState)(!1),H=z[0],q=z[1],J=(0,a.useState)([]),V=J[0],W=J[1],$=(0,o.ZP)((0,E.Ib)(),{shouldReconnect:function(){return!0}}),nn=$.lastMessage,tn=($.readyState,$.sendMessage);(0,a.useEffect)((function(){if(nn){var n=null!==nn&&void 0!==nn&&nn.data?JSON.parse(nn.data):null;(null===n||void 0===n?void 0:n.uuid)===h&&(s.uF.BUSY===(null===n||void 0===n?void 0:n.execution_state)?C(!0):s.uF.IDLE===(null===n||void 0===n?void 0:n.execution_state)&&C(!1),W((function(t){return n?t.concat(n):t})))}}),[nn,C,W,h]),(0,a.useEffect)((function(){if(y.current&&v.current){var n=v.current.getBoundingClientRect().height;y.current.scrollTo(0,n)}}),[V,y,v]);var en=(0,Z.y)(),rn=en.registerOnKeyDown,on=en.setDisableGlobalKeyboardShortcuts,an=en.unregisterOnKeyDown;(0,a.useEffect)((function(){return function(){an(h)}}),[an,h]);var cn=(0,a.useCallback)((function(){Y((function(n){return n>0?n-1:n}))}),[]),un=(0,a.useCallback)((function(){Y((function(n){return n<=M.length?n+1:n}))}),[M]);return rn(h,(function(n,e,r){var i=n.code,o=n.key;if(H)if((0,j.j)(n),(0,I.y)([_.PQ,_.VS],e))C(!1),W((function(n){var t;return n.concat({command:!0,data:(null===M||void 0===M||null===(t=M.trim())||void 0===t?void 0:t.length)>=1?M:"\n",type:s.Gi.TEXT})})),R(""),t();else if(!S)if(_.Qj!==i||e[_.zX])if((0,I.y)([_.QK],e))cn();else if((0,I.y)([_.DY],e))un();else if((0,I.y)([_.Bu],e)){if(B.length>=1){var a=Math.max(0,U-1);R(B[a]),F(a),Y(B[a].length)}}else if((0,I.y)([_.kD],e)){if(B.length>=1){var u=Math.min(B.length,U+1),l=B[u]||"";R(l),F(u),Y(l.length)}}else if((0,I.y)([_.Uq],e))(null===M||void 0===M?void 0:M.length)>=1&&(C(!0),tn(JSON.stringify({api_key:P.l,code:"!".concat(M),token:(new c.Z).decodedToken.token,uuid:h})),F(B.length+1),Q((function(n){return n.concat(M)})),Y(0)),W((function(n){var t;return n.concat({command:!0,data:(null===M||void 0===M||null===(t=M.trim())||void 0===t?void 0:t.length)>=1?M:"\n",type:s.Gi.TEXT})})),R("");else if((0,I.y)([_.zX,_.VS],e))navigator.clipboard.writeText(window.getSelection().toString());else if((0,I.y)([_.zX,_.Pd],e)||(0,I.y)([_.PQ,_.Pd],e)){var d,f,p;"undefined"===typeof(null===(d=navigator)||void 0===d?void 0:d.clipboard)?alert('Clipboard pasting is not allowed in insecure contexts. If your Mage deployment is not secure but you still want to use clipboard paste, you can override this setting (which should only be done temporarily) on Chrome browsers by going to "chrome://flags/#unsafely-treat-insecure-origin-as-secure", adding your origin to "Insecure origins treated as secure", and enabling that setting.'):null!==(f=navigator)&&void 0!==f&&null!==(p=f.clipboard)&&void 0!==p&&p.readText?navigator.clipboard.readText().then((function(n){R((function(t){return t+n})),Y(M.length+n.length)})).catch((function(n){return alert("".concat(n,'\n For Chrome, users need to allow clipboard permissions for this site under "Privacy and security" -> "Site settings".\n For Safari, users need to allow the clipboard paste by clicking "Paste" in the context menu that appears.'))})):navigator.clipboard.read().then((function(n){var t,e=N(n);try{for(e.s();!(t=e.n()).done;){var r,i=t.value,o=N(i.types);try{for(o.s();!(r=o.n()).done;){var a=r.value;if("text/plain"===a)return i.getType(a)}}catch(c){o.e(c)}finally{o.f()}}}catch(c){e.e(c)}finally{e.f()}})).then((function(n){return n.text()})).then((function(n){R((function(t){return t+n})),Y(M.length+n.length)})).catch((function(n){return alert("".concat(n,'\n For Firefox, users need to allow clipboard paste by setting the "dom.events.asyncClipboard.read" preference in "about:config" to "true" and clicking "Paste" in the context menu that appears.'))}))}else e[_.zX]||e[_.PQ]||1!==o.length||(R((function(n){return n.slice(0,L)+o+n.slice(L)})),un());else{var g=Math.max(0,L-1);R((function(n){return n.slice(0,g)+n.slice(L)})),Y((function(n){return Math.max(0,n-1)}))}}),[S,M,B,U,H,t,C,R,Q,F,W,h]),(0,A.jsx)(b,{ref:y,width:g,children:(0,A.jsx)(u.Z,{isOpen:!0,onClick:function(){null===e||void 0===e||e(),q(!0),on(!0)},onClickOutside:function(){q(!1),on(!1)},style:{minHeight:"100%"},children:(0,A.jsxs)(x,{ref:v,width:g,children:[null===V||void 0===V?void 0:V.reduce((function(n,t,e){var r=t||{},o=r.command,a=r.data,c=r.type,u=[];u=(u=Array.isArray(a)?a:[a]).filter((function(n){return n}));var d=[];return u.forEach((function(n,t){var r;if(s.jU.includes(c)&&(r=(0,A.jsxs)(p.ZP,{monospace:!0,noWrapping:!0,pre:!0,children:[n&&(0,A.jsx)(i(),{children:n}),!n&&(0,A.jsx)(A.Fragment,{children:"\xa0"})]})),r){var a="command-".concat(e,"-").concat(t,"-").concat(n);o?d.push((0,A.jsx)(w,{children:(0,A.jsxs)(l.Z,{alignItems:"center",children:[(0,A.jsx)(p.ZP,{inline:!0,monospace:!0,warning:!0,children:"\u2192\xa0"}),r]})},a)):d.push((0,A.jsx)(w,{children:r},a))}})),n.concat(d)}),[]),S&&(0,A.jsx)(d.Z,{mt:1,children:(0,A.jsx)(f.Z,{})}),!S&&(0,A.jsx)(T,{focused:H&&(0===M.length||L>M.length),children:(0,A.jsxs)(p.ZP,{monospace:!0,children:[(0,A.jsx)(p.ZP,{inline:!0,monospace:!0,warning:!0,children:"\u2192\xa0"}),null===M||void 0===M?void 0:M.split("").map((function(n,t){return(0,A.jsxs)(k,{focusBeginning:H&&0===L&&0===t,focused:H&&L===t+1,children:[" "===n&&(0,A.jsx)(A.Fragment,{children:"\xa0"})," "!==n&&n]},"command-".concat(t,"-").concat(n))}))]})})]})})})}},82635:function(n,t,e){"use strict";var r,i;e.d(t,{Gi:function(){return i},jU:function(){return a},uF:function(){return r}}),function(n){n.BUSY="busy",n.IDLE="idle",n.QUEUED="queued"}(r||(r={})),function(n){n.IMAGE_PNG="image/png",n.PROGRESS="progress",n.TABLE="table",n.TEXT="text",n.TEXT_HTML="text/html",n.TEXT_PLAIN="text/plain"}(i||(i={}));var o,a=[i.TEXT,i.TEXT_PLAIN];!function(n){n.DISPLAY_DATA="display_data",n.STATUS="status",n.STREAM="stream",n.STREAM_PIPELINE="stream_pipeline"}(o||(o={}))},98781:function(n,t,e){"use strict";e.d(t,{a:function(){return a},q:function(){return i}});var r,i,o=e(82394);!function(n){n.INTEGRATION="integration",n.PYTHON="python",n.PYSPARK="pyspark",n.STREAMING="streaming"}(i||(i={}));var a=(r={},(0,o.Z)(r,i.PYTHON,"python3"),(0,o.Z)(r,i.PYSPARK,"pysparkkernel"),r)},72433:function(n,t,e){"use strict";e.r(t);var r=e(77837),i=e(75582),o=e(38860),a=e.n(o),c=e(82684),u=e(83455),l=e(70434),s=e(41788),d=e(33699),f=e(82531),p=e(98781),h=e(96510),g=e(28598);function y(){var n=(0,u.Db)(f.ZP.kernels.useUpdate(p.a[p.q.PYTHON]),{onSuccess:function(n){return(0,h.wD)(n,{onErrorCallback:function(n,t){console.log(n),alert(t)}})}}),t=(0,i.Z)(n,1)[0],e=(0,c.useCallback)((function(){return t({kernel:{action_type:"interrupt"}})}),[t]);return(0,g.jsx)(l.Z,{title:"Terminal",uuid:"terminal/index",children:(0,g.jsx)(d.Z,{interruptKernel:e})})}y.getInitialProps=(0,r.Z)(a().mark((function n(){return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",{});case 1:case"end":return n.stop()}}),n)}))),t.default=(0,s.Z)(y)},51504:function(n,t,e){"use strict";e.d(t,{y:function(){return o}});var r=e(75582),i=e(16115);function o(n,t){var e=n.map((function(n){return String(n)})),o=n.includes(i.PQ),a=n.includes(i.zX),c=n.includes(i.XR),u=i.xU.map((function(n){return String(n)})),l=i.vk.map((function(n){return String(n)})),s=i.Tr.map((function(n){return String(n)})),d=Object.entries(t).find((function(n){var t=(0,r.Z)(n,2),i=t[0];return t[1]&&!e.includes(String(i))&&(!a||!l.includes(String(i)))&&(!o||!u.includes(String(i)))&&(!c||!s.includes(String(i)))}));return n.every((function(n){return t[n]}))&&!d}},27271:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return e(72433)}])}},function(n){n.O(0,[3850,9565,6085,9767,6579,434,9774,2888,179],(function(){return t=27271,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{97225:function(e,n,t){"use strict";var r=t(75582),o=t(12691),i=t.n(o),c=t(82684),l=t(83455),u=t(34376),a=t(60328),s=t(47999),d=t(67971),p=t(10919),f=t(93348),h=t(62609),g=t(86673),b=t(87815),m=t(19711),v=t(82531),j=t(10503),x=t(49125),y=t(45838),w=t(96510),Z=t(66653),O=t(28598);n.Z=function(e){var n=e.fetchPipelineSchedules,t=e.highlightRowOnHover,o=e.includeCreatedAtColumn,k=e.includePipelineColumn,P=e.pipeline,_=e.pipelineSchedules,C=e.selectedSchedule,E=e.setSelectedSchedule,I=e.stickyHeader,T=null===P||void 0===P?void 0:P.uuid,A=(0,u.useRouter)(),S=(0,c.useRef)({}),B=(0,c.useState)(null),D=B[0],N=B[1],H=(0,c.useState)(0),R=H[0],V=H[1],L=(0,c.useState)(0),M=L[0],z=L[1],q=(0,l.Db)((function(e){return v.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){n()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),F=(0,r.Z)(q,1)[0],U=(0,l.Db)((function(e){return v.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){n(),T?A.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(T,"/triggers")):n()}})}}),W=(0,r.Z)(U,1)[0],Y=[{label:function(){return""},uuid:"action"},{uuid:"Status"},{uuid:"Type"},{uuid:"Name"},{uuid:"Frequency"},{uuid:"Runs"},{uuid:"Latest run status"},{uuid:"Logs"},{label:function(){return""},uuid:"edit/delete"}],Q=[null,1,1,3,1,null,null,null,null];return k&&(Y.splice(2,0,{uuid:"Pipeline"}),Q.splice(2,0,2)),o&&(Y.splice(3,0,{uuid:"Created at"}),Q.splice(3,0,null)),(0,O.jsx)(y.cl,{overflowVisible:!0,children:0===_.length?(0,O.jsx)(g.Z,{px:3,py:1,children:(0,O.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,O.jsx)(b.Z,{columnFlex:Q,columns:Y,highlightRowOnHover:t,isSelectedRow:function(e){return _[e].id===(null===C||void 0===C?void 0:C.id)},onClickRow:E?function(e){return null===E||void 0===E?void 0:E(_[e])}:null,rowVerticalPadding:6,rows:_.map((function(e,n){var t,r=e.id,l=e.created_at,u=e.pipeline_runs_count,b=e.pipeline_uuid,v=e.last_pipeline_run_status,y=e.name,w=e.schedule_interval,P=e.status,_=T||b;S.current[r]=(0,c.createRef)();var C=[(0,O.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,Z.j)(n),F({id:e.id,status:f.fq.ACTIVE===P?f.fq.INACTIVE:f.fq.ACTIVE})},children:f.fq.ACTIVE===P?(0,O.jsx)(j.dz,{muted:!0,size:2*x.iI}):(0,O.jsx)(j.Py,{default:!0,size:2*x.iI})},"toggle_trigger_".concat(n)),(0,O.jsx)(m.ZP,{default:f.fq.INACTIVE===P,monospace:!0,success:f.fq.ACTIVE===P,children:P},"trigger_status_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:null===(t=f.Z4[e.schedule_type])||void 0===t?void 0:t.call(f.Z4)},"trigger_type_".concat(n)),(0,O.jsx)(i(),{as:"/pipelines/".concat(_,"/triggers/").concat(r),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,O.jsx)(p.Z,{bold:!0,onClick:function(e){(0,Z.j)(e),A.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(_,"/triggers/").concat(r))},sameColorAsText:!0,children:y})},"trigger_name_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:w},"trigger_frequency_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:u},"trigger_run_count_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:v||"N/A"},"latest_run_status_".concat(n)),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(_,"/logs?pipeline_schedule_id[]=").concat(r))},children:(0,O.jsx)(j.B4,{default:!0,size:2*x.iI})},"logs_button_".concat(n)),(0,O.jsxs)(d.Z,{children:[(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(_,"/triggers/").concat(r,"/edit"))},title:"Edit",children:(0,O.jsx)(j.I8,{default:!0,size:2*x.iI})}),(0,O.jsx)(g.Z,{mr:1}),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,o;N(r),V((null===(e=S.current[r])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),z((null===(t=S.current[r])||void 0===t||null===(o=t.current)||void 0===o?void 0:o.offsetLeft)||0)},ref:S.current[r],title:"Delete",children:(0,O.jsx)(j.rF,{default:!0,size:2*x.iI})}),(0,O.jsx)(s.Z,{onClickOutside:function(){return N(null)},open:D===r,children:(0,O.jsx)(h.Z,{danger:!0,left:(M||0)-286,onCancel:function(){return N(null)},onClick:function(){N(null),W(r)},title:"Are you sure you want to delete the trigger ".concat(y,"?"),top:(R||0)-(n<=1?40:96),width:40*x.iI})})]},"edit_delete_buttons_".concat(n))];return k&&C.splice(2,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:_},"pipeline_name_".concat(n))),o&&C.splice(3,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:l},"created_at_".concat(n))),C})),stickyHeader:I,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),o=t(67971),i=t(86673),c=t(10503),l=t(73899),u=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(o.Z,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(c.Hd,{size:1.5*u.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&l.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(i.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(c.Kw,{size:1.5*u.iI,stroke:"#AEAEAE"})})]})})}},45838:function(e,n,t){"use strict";t.d(n,{GZ:function(){return d},Vq:function(){return a},cE:function(){return p},cl:function(){return l},kA:function(){return u}});var r=t(9518),o=t(23831),i=t(37391),c=t(49125),l=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-1wzfyed-0"})(["position:relative;overflow:auto;"," "," ",""],i.w5,(function(e){return e.minHeight&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),u=r.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-1wzfyed-1"})(["contain:size;width:100%;",""],(function(e){return(e.columnBorders||e.borderCollapseSeparate)&&"\n border-collapse: separate;\n "})),a=r.default.tr.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-1wzfyed-2"})([""," ",""],(function(e){return e.highlightOnHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||o.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(e){return!e.noHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||o.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")})),s=(0,r.css)(["text-overflow:ellipsis;white-space:nowrap;"," "," "," "," "," ",""],(function(e){return!e.alignTop&&"\n vertical-align: middle;\n "}),(function(e){return e.alignTop&&"\n vertical-align: top;\n "}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.compact&&"\n padding: ".concat(c.iI/2,"px ").concat(c.iI,"px;\n ")}),(function(e){return!e.compact&&"\n padding: ".concat(c.iI,"px ").concat(2*c.iI,"px;\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,";\n ")})),d=r.default.th.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-1wzfyed-3"})([""," "," "," ",""],s,(function(e){return e.columnBorders&&"\n border: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n border-right: none;\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.sticky&&"\n background-color: ".concat((e.theme||o.Z).background.panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||o.Z.borders).medium,";\n z-index: 2;\n position: sticky;\n top: 0;\n\n &:first-child {\n left: 0;\n z-index: 2;\n }\n ")})),p=r.default.td.withConfig({displayName:"indexstyle__TableDataStyle",componentId:"sc-1wzfyed-4"})([""," "," "," "," "," "," ",""],s,(function(e){return e.rowVerticalPadding&&"\n padding-top: ".concat(e.rowVerticalPadding,"px;\n padding-bottom: ").concat(e.rowVerticalPadding,"px;\n ")}),(function(e){return e.columnBorders&&"\n border-left: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.stickyFirstColumn&&"\n background-color: ".concat((e.theme||o.Z).background.panel,";\n z-index: 1;\n position: sticky;\n left: 0;\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||o.Z.interactive).activeBorder,";\n ")}),(function(e){return e.wrapColumns&&"\n white-space: break-spaces;\n "}))},87815:function(e,n,t){"use strict";var r=t(82394),o=t(12691),i=t.n(o),c=t(82684),l=t(67971),u=t(10919),a=t(86673),s=t(19711),d=t(46261),p=t(45838),f=t(28598);function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.alignTop,t=e.borderCollapseSeparate,r=e.buildLinkProps,o=e.columnBorders,h=e.columnFlex,b=e.columnMaxWidth,m=e.columns,v=void 0===m?[]:m,j=e.compact,x=e.highlightRowOnHover,y=e.isSelectedRow,w=e.noBorder,Z=e.noHeader,O=e.onClickRow,k=e.rows,P=e.rowVerticalPadding,_=e.stickyFirstColumn,C=e.stickyHeader,E=e.uuid,I=e.wrapColumns,T=(0,c.useMemo)((function(){return h.reduce((function(e,n){return e+(n||0)}),0)}),h),A=(0,c.useCallback)((function(e){if(h[e]){var n=Math.round(h[e]/T*100);return"".concat(n,"%")}return null}),[]),S=(0,c.useMemo)((function(){return null===k||void 0===k?void 0:k.map((function(e,t){var l=null===r||void 0===r?void 0:r(t),a=e.map((function(r,i){return(0,f.jsx)(p.cE,{alignTop:n,columnBorders:o,compact:j,last:i===e.length-1,maxWidth:null===b||void 0===b?void 0:b(i),noBorder:w,rowVerticalPadding:P,selected:null===y||void 0===y?void 0:y(t),stickyFirstColumn:_&&0===i,width:A(i),wrapColumns:I,children:r},"".concat(E,"-row-").concat(t,"-cell-").concat(i))})),s=(0,f.jsx)(p.Vq,{highlightOnHover:x,noHover:!(l||O),onClick:O?function(){return O(t)}:null,children:a},"".concat(E,"-row-").concat(t));return l?(0,c.createElement)(i(),g(g({},l),{},{key:"".concat(E,"-row-link-").concat(t),passHref:!0}),(0,f.jsx)(u.Z,{fullWidth:!0,noHoverUnderline:!0,noOutline:!0,style:{display:"table-row-group"},verticalAlignContent:!0,children:s})):s}))}),[n,r,A,b,v,j,y,w,O,k]);return(0,f.jsxs)(p.kA,{borderCollapseSeparate:t,columnBorders:o,children:[(null===v||void 0===v?void 0:v.length)>=1&&!Z&&(0,f.jsx)(p.Vq,{noHover:!0,children:v.map((function(e,n){return(0,f.jsx)(p.GZ,{columnBorders:o,compact:j,last:n===v.length-1,noBorder:w,sticky:C,children:(0,f.jsxs)(l.Z,{alignItems:"center",children:[(0,f.jsx)(s.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.label?e.label():e.uuid}),e.tooltipMessage&&(0,f.jsx)(a.Z,{ml:"4px",children:(0,f.jsx)(d.Z,{appearBefore:!0,label:(0,f.jsx)(s.ZP,{leftAligned:!0,children:e.tooltipMessage}),lightBackground:!0,primary:!0})})]})},"".concat(E,"-col-").concat(e.uuid,"-").concat(n))}))}),S]})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return u},Xm:function(){return i},Z4:function(){return s},fq:function(){return l},kJ:function(){return a}});var r,o,i,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(i||(i={}));var l,u,a,s=(r={},(0,c.Z)(r,i.API,(function(){return"API"})),(0,c.Z)(r,i.EVENT,(function(){return"event"})),(0,c.Z)(r,i.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(u||(u={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(o={},(0,c.Z)(o,a.CREATED_AT,"Created at"),(0,c.Z)(o,a.NAME,"Name"),(0,c.Z)(o,a.PIPELINE,"Pipeline"),(0,c.Z)(o,a.STATUS,"Status"),(0,c.Z)(o,a.TYPE,"Type"),o)},55378:function(e,n,t){"use strict";var r=t(82394),o=t(26304),i=t(82684),c=t(9518),l=t(69898),u=t(31969),a=t(49125),s=t(28598),d=["beforeIcon","children","label","placeholder"];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 f(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 h=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})(["",' background-image:url("data:image/svg+xml;utf8,','");background-repeat:no-repeat;background-position:-webkit-calc(100% - ',"px) center;background-position:calc(100% - ","px) center;padding-right:","px;&:hover{cursor:pointer;}"," "," "," ",""],l.p,"\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",a.iI,a.iI,2.5*a.iI,(function(e){return!e.hasContent&&!e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).inverted,";\n ")})),g=function(e,n){var t=e.beforeIcon,r=e.children,i=e.label,c=e.placeholder,u=(0,o.Z)(e,d);return(0,s.jsx)(l.Z,f(f({},u),{},{beforeIcon:t,input:(0,s.jsxs)(h,f(f({},u),{},{children:[(i||c)&&(0,s.jsx)("option",{disabled:!0,selected:!0,value:"",children:i||c}),r]})),label:i,placeholder:c,ref:n,setContentOnMount:!0,showLabelRequirement:function(e){return!!e.content}}))};n.Z=i.forwardRef(g)},46756:function(e,n,t){"use strict";t.r(n);var r=t(77837),o=t(82394),i=t(75582),c=t(38860),l=t.n(c),u=t(82684),a=t(34376),s=t(70434),d=t(67971),p=t(51099),f=t(41788),h=t(55378),g=t(86673),b=t(19711),m=t(97225),v=t(82531),j=t(93348),x=t(49125),y=t(33766),w=t(59e3),Z=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(){var e=(0,a.useRouter)(),n=(0,w.iV)(),t=null!==n&&void 0!==n&&n.page?n.page:0,r=(null===n||void 0===n?void 0:n.order_by)||j.kJ.CREATED_AT,o={_limit:p.Q,_offset:t*p.Q,order_by:r},c=v.ZP.pipeline_schedules.list(o,{refreshInterval:7500,revalidateOnFocus:!0}),l=c.data,f=c.mutate,O=(0,u.useMemo)((function(){return(null===l||void 0===l?void 0:l.pipeline_schedules)||[]}),[l]),P=(0,u.useMemo)((function(){var e;return(null===l||void 0===l||null===(e=l.metadata)||void 0===e?void 0:e.count)||[]}),[l]);return(0,Z.jsxs)(s.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,Z.jsx)(g.Z,{mx:2,my:1,children:(0,Z.jsxs)(d.Z,{alignItems:"center",children:[(0,Z.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,Z.jsx)(g.Z,{mr:1}),(0,Z.jsx)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,y.u)({order_by:e.target.value,page:0})},paddingRight:4*x.iI,placeholder:"Select column",value:r||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,Z.jsx)("option",{value:t,children:r},t)}))})]})}),(0,Z.jsx)(m.Z,{fetchPipelineSchedules:f,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:O,stickyHeader:!0}),(0,Z.jsx)(g.Z,{p:2,children:(0,Z.jsx)(p.Z,{maxPages:9,onUpdate:function(t){var r=Number(t),o=k(k({},n),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,w.uM)(o)))},page:Number(t),totalPages:Math.ceil(P/p.Q)})})]})}P.getInitialProps=(0,r.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,f.Z)(P)},33766:function(e,n,t){"use strict";t.d(n,{u:function(){return s}});var r=t(75582),o=t(82394),i=t(34376),c=t.n(i),l=t(59e3);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.replaceParams,i=t.pushHistory,u=o?{}:(0,l.iV)();n=window.location.pathname;var s=i?c().push:c().replace,d=a(a({},u),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],o=n[1];"undefined"!==typeof o&&null!==o||delete d[t]}));var p=(0,l.uM)(d);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return s(c().router.pathname,f,{shallow:!0})}},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(46756)}])}},function(e){e.O(0,[3850,9767,6579,434,9898,9774,2888,179],(function(){return n=59733,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{97225:function(e,n,t){"use strict";var r=t(75582),o=t(12691),i=t.n(o),c=t(82684),l=t(83455),u=t(34376),a=t(60328),s=t(47999),d=t(67971),p=t(10919),f=t(93348),h=t(62609),g=t(86673),b=t(87815),m=t(19711),v=t(82531),j=t(10503),x=t(49125),y=t(45838),w=t(96510),Z=t(66653),O=t(28598);n.Z=function(e){var n=e.fetchPipelineSchedules,t=e.highlightRowOnHover,o=e.includeCreatedAtColumn,k=e.includePipelineColumn,P=e.pipeline,_=e.pipelineSchedules,C=e.selectedSchedule,E=e.setSelectedSchedule,I=e.stickyHeader,T=null===P||void 0===P?void 0:P.uuid,A=(0,u.useRouter)(),S=(0,c.useRef)({}),B=(0,c.useState)(null),D=B[0],N=B[1],H=(0,c.useState)(0),R=H[0],V=H[1],L=(0,c.useState)(0),M=L[0],z=L[1],q=(0,l.Db)((function(e){return v.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:e})}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){n()},onErrorCallback:function(e){var n=e.error,t=n.errors,r=n.message;console.log(t,r)}})}}),F=(0,r.Z)(q,1)[0],U=(0,l.Db)((function(e){return v.ZP.pipeline_schedules.useDelete(e)()}),{onSuccess:function(e){return(0,w.wD)(e,{callback:function(){n(),T?A.push("/pipelines/[pipeline]/triggers","/pipelines/".concat(T,"/triggers")):n()}})}}),W=(0,r.Z)(U,1)[0],Y=[{label:function(){return""},uuid:"action"},{uuid:"Status"},{uuid:"Type"},{uuid:"Name"},{uuid:"Frequency"},{uuid:"Runs"},{uuid:"Latest run status"},{uuid:"Logs"},{label:function(){return""},uuid:"edit/delete"}],Q=[null,1,1,3,1,null,null,null,null];return k&&(Y.splice(2,0,{uuid:"Pipeline"}),Q.splice(2,0,2)),o&&(Y.splice(3,0,{uuid:"Created at"}),Q.splice(3,0,null)),(0,O.jsx)(y.cl,{overflowVisible:!0,children:0===_.length?(0,O.jsx)(g.Z,{px:3,py:1,children:(0,O.jsx)(m.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No triggers available"})}):(0,O.jsx)(b.Z,{columnFlex:Q,columns:Y,highlightRowOnHover:t,isSelectedRow:function(e){return _[e].id===(null===C||void 0===C?void 0:C.id)},onClickRow:E?function(e){return null===E||void 0===E?void 0:E(_[e])}:null,rowVerticalPadding:6,rows:_.map((function(e,n){var t,r=e.id,l=e.created_at,u=e.pipeline_runs_count,b=e.pipeline_uuid,v=e.last_pipeline_run_status,y=e.name,w=e.schedule_interval,P=e.status,_=T||b;S.current[r]=(0,c.createRef)();var C=[(0,O.jsx)(a.Z,{iconOnly:!0,noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,Z.j)(n),F({id:e.id,status:f.fq.ACTIVE===P?f.fq.INACTIVE:f.fq.ACTIVE})},children:f.fq.ACTIVE===P?(0,O.jsx)(j.dz,{muted:!0,size:2*x.iI}):(0,O.jsx)(j.Py,{default:!0,size:2*x.iI})},"toggle_trigger_".concat(n)),(0,O.jsx)(m.ZP,{default:f.fq.INACTIVE===P,monospace:!0,success:f.fq.ACTIVE===P,children:P},"trigger_status_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:null===(t=f.Z4[e.schedule_type])||void 0===t?void 0:t.call(f.Z4)},"trigger_type_".concat(n)),(0,O.jsx)(i(),{as:"/pipelines/".concat(_,"/triggers/").concat(r),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,O.jsx)(p.Z,{bold:!0,onClick:function(e){(0,Z.j)(e),A.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(_,"/triggers/").concat(r))},sameColorAsText:!0,children:y})},"trigger_name_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:w},"trigger_frequency_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:u},"trigger_run_count_".concat(n)),(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:v||"N/A"},"latest_run_status_".concat(n)),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(_,"/logs?pipeline_schedule_id[]=").concat(r))},children:(0,O.jsx)(j.B4,{default:!0,size:2*x.iI})},"logs_button_".concat(n)),(0,O.jsxs)(d.Z,{children:[(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A.push("/pipelines/".concat(_,"/triggers/").concat(r,"/edit"))},title:"Edit",children:(0,O.jsx)(j.I8,{default:!0,size:2*x.iI})}),(0,O.jsx)(g.Z,{mr:1}),(0,O.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){var e,n,t,o;N(r),V((null===(e=S.current[r])||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetTop)||0),z((null===(t=S.current[r])||void 0===t||null===(o=t.current)||void 0===o?void 0:o.offsetLeft)||0)},ref:S.current[r],title:"Delete",children:(0,O.jsx)(j.rF,{default:!0,size:2*x.iI})}),(0,O.jsx)(s.Z,{onClickOutside:function(){return N(null)},open:D===r,children:(0,O.jsx)(h.Z,{danger:!0,left:(M||0)-286,onCancel:function(){return N(null)},onClick:function(){N(null),W(r)},title:"Are you sure you want to delete the trigger ".concat(y,"?"),top:(R||0)-(n<=1?40:96),width:40*x.iI})})]},"edit_delete_buttons_".concat(n))];return k&&C.splice(2,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:_},"pipeline_name_".concat(n))),o&&C.splice(3,0,(0,O.jsx)(m.ZP,{default:!0,monospace:!0,children:l},"created_at_".concat(n))),C})),stickyHeader:I,uuid:"pipeline-triggers"})})}},51099:function(e,n,t){"use strict";t.d(n,{Q:function(){return s}});t(82684);var r=t(60328),o=t(67971),i=t(86673),c=t(10503),l=t(73899),u=t(49125),a=t(28598),s=22;n.Z=function(e){var n=e.page,t=e.maxPages,s=e.onUpdate,d=e.totalPages,p=[],f=t;if(f>d)p=Array.from({length:d},(function(e,n){return n}));else{var h=Math.floor(f/2),g=n-h;n+h>=d?(g=d-f+2,f-=2):n-h<=0?(g=0,f-=2):(f-=4,g=n-Math.floor(f/2)),p=Array.from({length:f},(function(e,n){return n+g}))}return(0,a.jsx)(a.Fragment,{children:d>0&&(0,a.jsxs)(o.Z,{alignItems:"center",children:[(0,a.jsx)(r.Z,{disabled:0===n,onClick:function(){return s(n-1)},children:(0,a.jsx)(c.Hd,{size:1.5*u.iI,stroke:"#AEAEAE"})}),!p.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(0)},borderLess:!0,noBackground:!0,children:1})},0),!p.includes(1)&&(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0)]}),p.map((function(e){return(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){e!==n&&s(e)},notClickable:e===n,backgroundColor:e===n&&l.a$,borderLess:!0,noBackground:!0,children:e+1})},e)})),!p.includes(d-1)&&(0,a.jsxs)(a.Fragment,{children:[!p.includes(d-2)&&(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{notClickable:!0,noBackground:!0,noPadding:!0,children:"..."})},0),(0,a.jsx)(i.Z,{ml:1,children:(0,a.jsx)(r.Z,{onClick:function(){return s(d-1)},borderLess:!0,noBackground:!0,children:d})},d-1)]}),(0,a.jsx)(i.Z,{ml:1}),(0,a.jsx)(r.Z,{disabled:n===d-1,onClick:function(){return s(n+1)},children:(0,a.jsx)(c.Kw,{size:1.5*u.iI,stroke:"#AEAEAE"})})]})})}},45838:function(e,n,t){"use strict";t.d(n,{GZ:function(){return d},Vq:function(){return a},cE:function(){return p},cl:function(){return l},kA:function(){return u}});var r=t(9518),o=t(23831),i=t(37391),c=t(49125),l=r.default.div.withConfig({displayName:"indexstyle__TableContainerStyle",componentId:"sc-1wzfyed-0"})(["position:relative;overflow:auto;"," "," ",""],i.w5,(function(e){return e.minHeight&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),u=r.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-1wzfyed-1"})(["contain:size;width:100%;",""],(function(e){return(e.columnBorders||e.borderCollapseSeparate)&&"\n border-collapse: separate;\n "})),a=r.default.tr.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-1wzfyed-2"})([""," ",""],(function(e){return e.highlightOnHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||o.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(e){return!e.noHover&&"\n &:hover {\n background: ".concat((e.theme.interactive||o.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")})),s=(0,r.css)(["text-overflow:ellipsis;white-space:nowrap;"," "," "," "," "," ",""],(function(e){return!e.alignTop&&"\n vertical-align: middle;\n "}),(function(e){return e.alignTop&&"\n vertical-align: top;\n "}),(function(e){return!e.noBorder&&"\n border-bottom: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.compact&&"\n padding: ".concat(c.iI/2,"px ").concat(c.iI,"px;\n ")}),(function(e){return!e.compact&&"\n padding: ".concat(c.iI,"px ").concat(2*c.iI,"px;\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,";\n ")})),d=r.default.th.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-1wzfyed-3"})([""," "," "," ",""],s,(function(e){return e.columnBorders&&"\n border: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n border-right: none;\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.sticky&&"\n background-color: ".concat((e.theme||o.Z).background.panel,";\n border-bottom: 1px solid ").concat((e.theme.borders||o.Z.borders).medium,";\n z-index: 2;\n position: sticky;\n top: 0;\n\n &:first-child {\n left: 0;\n z-index: 2;\n }\n ")})),p=r.default.td.withConfig({displayName:"indexstyle__TableDataStyle",componentId:"sc-1wzfyed-4"})([""," "," "," "," "," "," ",""],s,(function(e){return e.rowVerticalPadding&&"\n padding-top: ".concat(e.rowVerticalPadding,"px;\n padding-bottom: ").concat(e.rowVerticalPadding,"px;\n ")}),(function(e){return e.columnBorders&&"\n border-left: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.columnBorders&&e.last&&"\n border-right: 1px solid ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.stickyFirstColumn&&"\n background-color: ".concat((e.theme||o.Z).background.panel,";\n z-index: 1;\n position: sticky;\n left: 0;\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||o.Z.interactive).activeBorder,";\n ")}),(function(e){return e.wrapColumns&&"\n white-space: break-spaces;\n "}))},87815:function(e,n,t){"use strict";var r=t(82394),o=t(12691),i=t.n(o),c=t(82684),l=t(67971),u=t(10919),a=t(86673),s=t(19711),d=t(46261),p=t(45838),f=t(28598);function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?h(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.alignTop,t=e.borderCollapseSeparate,r=e.buildLinkProps,o=e.columnBorders,h=e.columnFlex,b=e.columnMaxWidth,m=e.columns,v=void 0===m?[]:m,j=e.compact,x=e.highlightRowOnHover,y=e.isSelectedRow,w=e.noBorder,Z=e.noHeader,O=e.onClickRow,k=e.rows,P=e.rowVerticalPadding,_=e.stickyFirstColumn,C=e.stickyHeader,E=e.uuid,I=e.wrapColumns,T=(0,c.useMemo)((function(){return h.reduce((function(e,n){return e+(n||0)}),0)}),h),A=(0,c.useCallback)((function(e){if(h[e]){var n=Math.round(h[e]/T*100);return"".concat(n,"%")}return null}),[]),S=(0,c.useMemo)((function(){return null===k||void 0===k?void 0:k.map((function(e,t){var l=null===r||void 0===r?void 0:r(t),a=e.map((function(r,i){return(0,f.jsx)(p.cE,{alignTop:n,columnBorders:o,compact:j,last:i===e.length-1,maxWidth:null===b||void 0===b?void 0:b(i),noBorder:w,rowVerticalPadding:P,selected:null===y||void 0===y?void 0:y(t),stickyFirstColumn:_&&0===i,width:A(i),wrapColumns:I,children:r},"".concat(E,"-row-").concat(t,"-cell-").concat(i))})),s=(0,f.jsx)(p.Vq,{highlightOnHover:x,noHover:!(l||O),onClick:O?function(){return O(t)}:null,children:a},"".concat(E,"-row-").concat(t));return l?(0,c.createElement)(i(),g(g({},l),{},{key:"".concat(E,"-row-link-").concat(t),passHref:!0}),(0,f.jsx)(u.Z,{fullWidth:!0,noHoverUnderline:!0,noOutline:!0,style:{display:"table-row-group"},verticalAlignContent:!0,children:s})):s}))}),[n,r,A,b,v,j,y,w,O,k]);return(0,f.jsxs)(p.kA,{borderCollapseSeparate:t,columnBorders:o,children:[(null===v||void 0===v?void 0:v.length)>=1&&!Z&&(0,f.jsx)(p.Vq,{noHover:!0,children:v.map((function(e,n){return(0,f.jsx)(p.GZ,{columnBorders:o,compact:j,last:n===v.length-1,noBorder:w,sticky:C,children:(0,f.jsxs)(l.Z,{alignItems:"center",children:[(0,f.jsx)(s.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.label?e.label():e.uuid}),e.tooltipMessage&&(0,f.jsx)(a.Z,{ml:"4px",children:(0,f.jsx)(d.Z,{appearBefore:!0,label:(0,f.jsx)(s.ZP,{leftAligned:!0,children:e.tooltipMessage}),lightBackground:!0,primary:!0})})]})},"".concat(E,"-col-").concat(e.uuid,"-").concat(n))}))}),S]})}},93348:function(e,n,t){"use strict";t.d(n,{TR:function(){return d},U5:function(){return u},Xm:function(){return i},Z4:function(){return s},fq:function(){return l},kJ:function(){return a}});var r,o,i,c=t(82394);!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(i||(i={}));var l,u,a,s=(r={},(0,c.Z)(r,i.API,(function(){return"API"})),(0,c.Z)(r,i.EVENT,(function(){return"event"})),(0,c.Z)(r,i.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly"}(u||(u={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(a||(a={}));var d=(o={},(0,c.Z)(o,a.CREATED_AT,"Created at"),(0,c.Z)(o,a.NAME,"Name"),(0,c.Z)(o,a.PIPELINE,"Pipeline"),(0,c.Z)(o,a.STATUS,"Status"),(0,c.Z)(o,a.TYPE,"Type"),o)},55378:function(e,n,t){"use strict";var r=t(82394),o=t(26304),i=t(82684),c=t(9518),l=t(69898),u=t(31969),a=t(49125),s=t(28598),d=["beforeIcon","children","label","multiple","placeholder"];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 f(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 h=c.default.select.withConfig({displayName:"Select__SelectStyle",componentId:"sc-q6ezu2-0"})(["",' background-image:url("data:image/svg+xml;utf8,','");background-repeat:no-repeat;background-position:-webkit-calc(100% - ',"px) center;background-position:calc(100% - ","px) center;padding-right:","px;&:hover{cursor:pointer;}"," "," "," ",""],l.p,"\n <svg width='12' height='12' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'>\n <path\n clip-rule='evenodd'\n d='M8.0015 11.7109L14.0022 5.71017L12.588 4.29597L7.99485 8.88914L3.40754 4.34482L2 5.76567L8.0015 11.7109Z'\n fill='%23B4B8C0'\n fill-rule='evenodd'\n />\n </svg>",a.iI,a.iI,2.5*a.iI,(function(e){return!e.hasContent&&!e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).muted,";\n ")}),(function(e){return e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return e.showPlaceholder&&"\n color: ".concat((e.theme.content||u.Z.content).inverted,";\n ")})),g=function(e,n){var t=e.beforeIcon,r=e.children,i=e.label,c=e.multiple,u=e.placeholder,a=(0,o.Z)(e,d);return(0,s.jsx)(l.Z,f(f({},a),{},{beforeIcon:t,input:(0,s.jsxs)(h,f(f({multiple:c},a),{},{children:[(i||u)&&(0,s.jsx)("option",{disabled:!0,selected:!0,value:"",children:i||u}),r]})),label:i,placeholder:u,ref:n,setContentOnMount:!0,showLabelRequirement:function(e){return!!e.content}}))};n.Z=i.forwardRef(g)},46756:function(e,n,t){"use strict";t.r(n);var r=t(77837),o=t(82394),i=t(75582),c=t(38860),l=t.n(c),u=t(82684),a=t(34376),s=t(70434),d=t(67971),p=t(51099),f=t(41788),h=t(55378),g=t(86673),b=t(19711),m=t(97225),v=t(82531),j=t(93348),x=t(49125),y=t(33766),w=t(59e3),Z=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function P(){var e=(0,a.useRouter)(),n=(0,w.iV)(),t=null!==n&&void 0!==n&&n.page?n.page:0,r=(null===n||void 0===n?void 0:n.order_by)||j.kJ.CREATED_AT,o={_limit:p.Q,_offset:t*p.Q,order_by:r},c=v.ZP.pipeline_schedules.list(o,{refreshInterval:7500,revalidateOnFocus:!0}),l=c.data,f=c.mutate,O=(0,u.useMemo)((function(){return(null===l||void 0===l?void 0:l.pipeline_schedules)||[]}),[l]),P=(0,u.useMemo)((function(){var e;return(null===l||void 0===l||null===(e=l.metadata)||void 0===e?void 0:e.count)||[]}),[l]);return(0,Z.jsxs)(s.Z,{title:"Triggers",uuid:"triggers/index",children:[(0,Z.jsx)(g.Z,{mx:2,my:1,children:(0,Z.jsxs)(d.Z,{alignItems:"center",children:[(0,Z.jsx)(b.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,Z.jsx)(g.Z,{mr:1}),(0,Z.jsx)(h.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,y.u)({order_by:e.target.value,page:0})},paddingRight:4*x.iI,placeholder:"Select column",value:r||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return(0,Z.jsx)("option",{value:t,children:r},t)}))})]})}),(0,Z.jsx)(m.Z,{fetchPipelineSchedules:f,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:O,stickyHeader:!0}),(0,Z.jsx)(g.Z,{p:2,children:(0,Z.jsx)(p.Z,{maxPages:9,onUpdate:function(t){var r=Number(t),o=k(k({},n),{},{page:r>=0?r:0});e.push("/triggers","/triggers?".concat((0,w.uM)(o)))},page:Number(t),totalPages:Math.ceil(P/p.Q)})})]})}P.getInitialProps=(0,r.Z)(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,f.Z)(P)},33766:function(e,n,t){"use strict";t.d(n,{u:function(){return s}});var r=t(75582),o=t(82394),i=t(34376),c=t.n(i),l=t(59e3);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.replaceParams,i=t.pushHistory,u=o?{}:(0,l.iV)();n=window.location.pathname;var s=i?c().push:c().replace,d=a(a({},u),e);Object.entries(e).forEach((function(e){var n=(0,r.Z)(e,2),t=n[0],o=n[1];"undefined"!==typeof o&&null!==o||delete d[t]}));var p=(0,l.uM)(d);p.length>=1&&(p="?".concat(p));var f="".concat(n.split("?")[0]).concat(p);return s(c().router.pathname,f,{shallow:!0})}},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(46756)}])}},function(e){e.O(0,[3850,9767,6579,434,9898,9774,2888,179],(function(){return n=59733,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(s,e,i,n,p,c,t,a,l,u,r,b,f,k,g,d,h,j,o,_,m,E,O,A,B,L,w,D,T,C,I,F){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/datasets",destination:E},{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_",destination:E}],fallback:[]},"/":["static/chunks/pages/index-e34a68d2f6fe16f2.js"],"/_error":["static/chunks/pages/_error-235304e5badb19eb.js"],"/manage":[s,p,O,e,i,n,c,"static/chunks/pages/manage-d82bfa6f3e761f4c.js"],"/pipeline-runs":[s,p,e,i,n,c,g,"static/chunks/pages/pipeline-runs-21fe37061bdaaaea.js"],"/pipelines":[s,p,e,i,n,"static/chunks/pages/pipelines-12dc02ae431a6305.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-ca9457e1a6bced4b.js"],"/pipelines/[pipeline]/backfills":[s,p,e,i,n,t,"static/chunks/pages/pipelines/[pipeline]/backfills-688184bd8b4d4f5c.js"],"/pipelines/[pipeline]/backfills/[...slug]":[s,p,a,l,r,f,d,o,e,i,n,c,t,u,b,k,g,_,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-949a1d5a8ddc652d.js"],"/pipelines/[pipeline]/edit":[A,s,p,a,l,r,f,d,h,j,B,L,w,O,"static/chunks/704-4de8946d753a578a.js",e,i,c,t,u,b,k,D,T,"static/chunks/pages/pipelines/[pipeline]/edit-c6dfcc4f231cfa5a.js"],"/pipelines/[pipeline]/logs":[s,p,l,h,o,e,i,n,c,t,u,_,"static/chunks/pages/pipelines/[pipeline]/logs-abce05c25bee218d.js"],"/pipelines/[pipeline]/monitors":[s,p,a,j,e,i,n,t,m,C,"static/chunks/pages/pipelines/[pipeline]/monitors-8b08ec1aef4af4f2.js"],"/pipelines/[pipeline]/monitors/block-runs":[s,p,a,j,e,i,n,c,t,m,C,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-a6dbd67285ecc5a5.js"],"/pipelines/[pipeline]/monitors/block-runtime":[A,s,p,a,j,"static/chunks/9832-c8b8970bb522f302.js",e,i,n,c,t,m,T,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f83ab9de4094e1b0.js"],"/pipelines/[pipeline]/runs":[s,p,l,r,d,e,i,n,c,t,u,b,g,I,"static/chunks/pages/pipelines/[pipeline]/runs-2eb8b1a432f84d75.js"],"/pipelines/[pipeline]/runs/[run]":[s,p,a,l,r,f,B,e,i,n,t,u,b,k,I,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-73ced07cc98a4968.js"],"/pipelines/[pipeline]/syncs":[s,p,h,e,i,n,t,"static/chunks/pages/pipelines/[pipeline]/syncs-a056c0e384d39c9b.js"],"/pipelines/[pipeline]/triggers":[s,p,a,l,r,f,e,i,n,c,t,u,b,k,"static/chunks/pages/pipelines/[pipeline]/triggers-6a8545f96cc7b8f2.js"],"/pipelines/[pipeline]/triggers/[...slug]":[s,p,a,l,r,f,d,o,e,i,n,c,t,u,b,k,g,_,D,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ae970171cfe98c51.js"],"/settings":["static/chunks/pages/settings-d594a66a568306da.js"],"/settings/account/profile":[s,e,i,n,c,F,"static/chunks/pages/settings/account/profile-acd7ee47219fee3d.js"],"/settings/workspace/preferences":[s,e,i,n,"static/chunks/pages/settings/workspace/preferences-07bda506f68974fb.js"],"/settings/workspace/users":[s,e,i,n,c,F,"static/chunks/pages/settings/workspace/users-c128672e053a4c30.js"],"/sign-in":[s,e,c,"static/chunks/pages/sign-in-b4e1eb529a184c60.js"],"/terminal":[s,h,w,e,i,n,"static/chunks/pages/terminal-1734d248ec2b6c24.js"],"/test":[L,"static/chunks/pages/test-f567bdfcc1276249.js"],"/triggers":[s,e,i,n,c,"static/chunks/pages/triggers-dbce4f85a95ea336.js"],sortedPages:["/","/_app","/_error","/manage","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/settings","/settings/account/profile","/settings/workspace/preferences","/settings/workspace/users","/sign-in","/terminal","/test","/triggers"]}}("static/chunks/3850-6395783d820def1c.js","static/chunks/9767-599ba5464d0bf65a.js","static/chunks/6579-0bf2380344587a96.js","static/chunks/434-69ddfacd3e93f2db.js","static/chunks/2083-78a438dbdc57d1e4.js","static/chunks/9898-91c6384c9bd33ca7.js","static/chunks/1830-cb1bbbf9a9c54649.js","static/chunks/5896-f84e336fb8877027.js","static/chunks/4804-01a10103ebe26ca8.js","static/chunks/4463-1b9ce74c6e1bb14e.js","static/chunks/1774-aa51ef1da7217ff9.js","static/chunks/6532-0439f38fc89e0a96.js","static/chunks/5872-103815a4a043489b.js","static/chunks/1286-a62050b3f897c6be.js","static/chunks/4846-64f9afc02d45293c.js","static/chunks/2524-6aeb9419acf5d1b4.js","static/chunks/9565-28e1c30511c95c2d.js","static/chunks/2714-1e79e9f2e998b544.js","static/chunks/4495-4f0340aa82e0c623.js","static/chunks/8961-e25997bc088e0d19.js","static/chunks/2249-84de2142241f4925.js","/datasets","static/chunks/8789-4f858e520d46973b.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/2125-0b537dc53fe71b18.js","static/chunks/7011-81dd8269c4806d26.js","static/chunks/6085-692d2f784c0504f2.js","static/chunks/2426-004ebe7d53484174.js","static/chunks/6641-fb7a8be8444f2dd4.js","static/chunks/7400-1430ec3874c1fdee.js","static/chunks/5944-9488f2ddf3543b08.js","static/chunks/9140-836abb2721055e82.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(s,e,i,n,p,c,t,a,l,u,r,f,b,k,g,d,h,j,o,_,m,E,O,A,B,L,w,D,T,C,I,F){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_/datasets",destination:E},{source:"/CLOUD_NOTEBOOK_BASE_PATH_PLACEHOLDER_",destination:E}],fallback:[]},"/":["static/chunks/pages/index-e34a68d2f6fe16f2.js"],"/_error":["static/chunks/pages/_error-235304e5badb19eb.js"],"/manage":[s,p,O,e,i,n,c,"static/chunks/pages/manage-d82bfa6f3e761f4c.js"],"/pipeline-runs":[s,p,e,i,n,c,g,"static/chunks/pages/pipeline-runs-21fe37061bdaaaea.js"],"/pipelines":[s,p,e,i,n,"static/chunks/pages/pipelines-12dc02ae431a6305.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-ca9457e1a6bced4b.js"],"/pipelines/[pipeline]/backfills":[s,p,e,i,n,t,"static/chunks/pages/pipelines/[pipeline]/backfills-a1e8869ed201ce7e.js"],"/pipelines/[pipeline]/backfills/[...slug]":[s,p,a,l,r,b,d,o,e,i,n,c,t,u,f,k,g,_,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-949a1d5a8ddc652d.js"],"/pipelines/[pipeline]/edit":[A,s,p,a,l,r,b,d,h,j,B,L,w,O,"static/chunks/704-4de8946d753a578a.js",e,i,c,t,u,f,k,D,T,"static/chunks/pages/pipelines/[pipeline]/edit-0678cf63c79072a7.js"],"/pipelines/[pipeline]/logs":[s,p,l,h,o,e,i,n,c,t,u,_,"static/chunks/pages/pipelines/[pipeline]/logs-5ccc75887776efb0.js"],"/pipelines/[pipeline]/monitors":[s,p,a,j,e,i,n,t,m,C,"static/chunks/pages/pipelines/[pipeline]/monitors-8b08ec1aef4af4f2.js"],"/pipelines/[pipeline]/monitors/block-runs":[s,p,a,j,e,i,n,c,t,m,C,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-8f23f7ca9efcb069.js"],"/pipelines/[pipeline]/monitors/block-runtime":[A,s,p,a,j,"static/chunks/9832-c8b8970bb522f302.js",e,i,n,c,t,m,T,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f83ab9de4094e1b0.js"],"/pipelines/[pipeline]/runs":[s,p,l,r,d,e,i,n,c,t,u,f,g,I,"static/chunks/pages/pipelines/[pipeline]/runs-2eb8b1a432f84d75.js"],"/pipelines/[pipeline]/runs/[run]":[s,p,a,l,r,b,B,e,i,n,t,u,f,k,I,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-73ced07cc98a4968.js"],"/pipelines/[pipeline]/syncs":[s,p,h,e,i,n,t,"static/chunks/pages/pipelines/[pipeline]/syncs-d2bbafbb5b2c09e7.js"],"/pipelines/[pipeline]/triggers":[s,p,a,l,r,b,e,i,n,c,t,u,f,k,"static/chunks/pages/pipelines/[pipeline]/triggers-b0b91245d3299bdf.js"],"/pipelines/[pipeline]/triggers/[...slug]":[s,p,a,l,r,b,d,o,e,i,n,c,t,u,f,k,g,_,D,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ae970171cfe98c51.js"],"/settings":["static/chunks/pages/settings-d594a66a568306da.js"],"/settings/account/profile":[s,e,i,n,c,F,"static/chunks/pages/settings/account/profile-acd7ee47219fee3d.js"],"/settings/workspace/preferences":[s,e,i,n,"static/chunks/pages/settings/workspace/preferences-07bda506f68974fb.js"],"/settings/workspace/users":[s,e,i,n,c,F,"static/chunks/pages/settings/workspace/users-c128672e053a4c30.js"],"/sign-in":[s,e,c,"static/chunks/pages/sign-in-b4e1eb529a184c60.js"],"/terminal":[s,h,w,e,i,n,"static/chunks/pages/terminal-5d7c45bb058a3f20.js"],"/test":[L,"static/chunks/pages/test-f567bdfcc1276249.js"],"/triggers":[s,e,i,n,c,"static/chunks/pages/triggers-e0172c422c95eda9.js"],sortedPages:["/","/_app","/_error","/manage","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/settings","/settings/account/profile","/settings/workspace/preferences","/settings/workspace/users","/sign-in","/terminal","/test","/triggers"]}}("static/chunks/3850-6395783d820def1c.js","static/chunks/9767-599ba5464d0bf65a.js","static/chunks/6579-0bf2380344587a96.js","static/chunks/434-69ddfacd3e93f2db.js","static/chunks/2083-78a438dbdc57d1e4.js","static/chunks/9898-51ca6a904b7a2382.js","static/chunks/1830-cb1bbbf9a9c54649.js","static/chunks/5896-f84e336fb8877027.js","static/chunks/4804-01a10103ebe26ca8.js","static/chunks/4463-1b9ce74c6e1bb14e.js","static/chunks/1774-aa51ef1da7217ff9.js","static/chunks/6532-0439f38fc89e0a96.js","static/chunks/5872-103815a4a043489b.js","static/chunks/1286-a62050b3f897c6be.js","static/chunks/4846-58b7e138009c98a2.js","static/chunks/2524-6aeb9419acf5d1b4.js","static/chunks/9565-28e1c30511c95c2d.js","static/chunks/2714-1e79e9f2e998b544.js","static/chunks/4495-4f0340aa82e0c623.js","static/chunks/8961-7a2143c4424c9217.js","static/chunks/2249-70929b8c547bbc18.js","/datasets","static/chunks/8789-4f858e520d46973b.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/2125-0b537dc53fe71b18.js","static/chunks/7011-81dd8269c4806d26.js","static/chunks/6085-692d2f784c0504f2.js","static/chunks/2426-004ebe7d53484174.js","static/chunks/6641-a0ed2bd8f5dc777b.js","static/chunks/7400-1430ec3874c1fdee.js","static/chunks/5944-757b7898608a65e1.js","static/chunks/9140-6f67e0879394373d.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();