mage-ai 0.8.11__py3-none-any.whl → 0.8.13__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 (120) hide show
  1. mage_ai/api/policies/BackfillPolicy.py +4 -1
  2. mage_ai/api/policies/BlockPolicy.py +13 -0
  3. mage_ai/api/policies/SyncPolicy.py +30 -0
  4. mage_ai/api/presenters/BlockPresenter.py +12 -1
  5. mage_ai/api/presenters/SyncPresenter.py +11 -0
  6. mage_ai/api/resources/BlockResource.py +8 -1
  7. mage_ai/api/resources/SyncResource.py +43 -0
  8. mage_ai/data_preparation/executors/pipeline_executor.py +9 -0
  9. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +3 -1
  10. mage_ai/data_preparation/models/block/__init__.py +5 -3
  11. mage_ai/data_preparation/models/block/integration/__init__.py +59 -0
  12. mage_ai/data_preparation/models/constants.py +1 -0
  13. mage_ai/data_preparation/preferences.py +43 -0
  14. mage_ai/data_preparation/sync/__init__.py +17 -0
  15. mage_ai/data_preparation/sync/base_sync.py +7 -0
  16. mage_ai/data_preparation/sync/git_sync.py +26 -0
  17. mage_ai/data_preparation/templates/data_loaders/streaming/kafka.yaml +5 -0
  18. mage_ai/io/export_utils.py +1 -0
  19. mage_ai/io/postgres.py +46 -4
  20. mage_ai/orchestration/db/models.py +14 -0
  21. mage_ai/orchestration/pipeline_scheduler.py +12 -4
  22. mage_ai/server/constants.py +1 -1
  23. mage_ai/server/frontend_dist/404.html +2 -2
  24. mage_ai/server/frontend_dist/404.html.html +2 -2
  25. mage_ai/server/frontend_dist/_next/static/UuQKenirO2LDcepWvj6S9/_buildManifest.js +1 -0
  26. mage_ai/server/frontend_dist/_next/static/chunks/{1830-c3f709c7ca7f32ab.js → 1830-fbc03130dc8507d5.js} +1 -1
  27. mage_ai/server/frontend_dist/_next/static/chunks/2626-74904ade5b462127.js +1 -0
  28. mage_ai/server/frontend_dist/_next/static/chunks/3573-9b7b57411a327efa.js +1 -0
  29. mage_ai/server/frontend_dist/_next/static/chunks/434-b1cbc39e987f22cd.js +1 -0
  30. mage_ai/server/frontend_dist/_next/static/chunks/4846-688b5f0a015a543a.js +1 -0
  31. mage_ai/server/frontend_dist/_next/static/chunks/5477-4d9bab807c386355.js +1 -0
  32. mage_ai/server/frontend_dist/_next/static/chunks/7281-99f836e410857a68.js +1 -0
  33. mage_ai/server/frontend_dist/_next/static/chunks/7400-26ce25ec46728ef7.js +1 -0
  34. mage_ai/server/frontend_dist/_next/static/chunks/9767-30e239ed26aa848a.js +1 -0
  35. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-44766f29c8c5b4ce.js → _app-169f9cc923ae39a5.js} +1 -1
  36. mage_ai/server/frontend_dist/_next/static/chunks/pages/{manage-14c743a0e2549486.js → manage-91c4fd203b4ac0e2.js} +1 -1
  37. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipeline-runs-21fe37061bdaaaea.js → pipeline-runs-10d54d54bfd9b39c.js} +1 -1
  38. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-971ea5bb26d66155.js +1 -0
  39. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-393cec015b843dd8.js +1 -0
  40. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-2963c971fdefd159.js +1 -0
  41. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d1490dc3ea4f2e61.js +1 -0
  42. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-8f23f7ca9efcb069.js → block-runs-f513df1d43ba48f0.js} +1 -1
  43. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-393fa626a8873f74.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-8b08ec1aef4af4f2.js → monitors-d45f982e19978552.js} +1 -1
  45. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-463347405cafa133.js +1 -0
  46. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-a33f6fd5d91cd123.js +1 -0
  47. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-d4df695d51e01232.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-d83cf90749c8cd56.js +1 -0
  49. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-f6ee40bebf427cfa.js +1 -0
  50. mage_ai/server/frontend_dist/_next/static/chunks/pages/{pipelines-1c0627627c21667f.js → pipelines-db2903bdeeeae791.js} +1 -1
  51. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-19a5aa2de681b54a.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-e1b34b9a44fc4688.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync_data-4ae244876881cfe1.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-c128672e053a4c30.js → users-b8aeca222449e041.js} +1 -1
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/{terminal-6feb9848233a6c6e.js → terminal-482bd79cb26b8f73.js} +1 -1
  56. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-81b7327ed8e015a4.js +1 -0
  57. mage_ai/server/frontend_dist/index.html +2 -2
  58. mage_ai/server/frontend_dist/manage.html +4 -4
  59. mage_ai/server/frontend_dist/pipeline-runs.html +5 -5
  60. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  61. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +5 -5
  62. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  63. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +5 -5
  64. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  65. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  66. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +5 -5
  67. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +5 -5
  68. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +5 -5
  69. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +5 -5
  70. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  71. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +5 -5
  72. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  73. mage_ai/server/frontend_dist/pipelines.html +5 -5
  74. mage_ai/server/frontend_dist/settings/account/profile.html +5 -5
  75. mage_ai/server/frontend_dist/settings/workspace/preferences.html +5 -5
  76. mage_ai/server/frontend_dist/settings/workspace/sync_data.html +20 -0
  77. mage_ai/server/frontend_dist/settings/workspace/users.html +5 -5
  78. mage_ai/server/frontend_dist/settings.html +2 -2
  79. mage_ai/server/frontend_dist/sign-in.html +4 -4
  80. mage_ai/server/frontend_dist/terminal.html +5 -5
  81. mage_ai/server/frontend_dist/test.html +3 -3
  82. mage_ai/server/frontend_dist/triggers.html +5 -5
  83. mage_ai/server/server.py +1 -0
  84. mage_ai/server/websocket_server.py +1 -1
  85. mage_ai/shared/config.py +4 -1
  86. mage_ai/streaming/sources/kafka.py +49 -3
  87. mage_ai/tests/data_preparation/test_templates.py +5 -0
  88. mage_ai/tests/streaming/sources/test_kafka.py +17 -0
  89. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/METADATA +3 -1
  90. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/RECORD +96 -89
  91. mage_ai/server/frontend_dist/_next/static/Bmwp0WdXRDJpCFVPOVdc9/_buildManifest.js +0 -1
  92. mage_ai/server/frontend_dist/_next/static/chunks/2249-70929b8c547bbc18.js +0 -1
  93. mage_ai/server/frontend_dist/_next/static/chunks/2426-115f8871a2e28f8c.js +0 -1
  94. mage_ai/server/frontend_dist/_next/static/chunks/434-69ddfacd3e93f2db.js +0 -1
  95. mage_ai/server/frontend_dist/_next/static/chunks/4846-b4ced91dc0e9fba9.js +0 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/5944-757b7898608a65e1.js +0 -1
  97. mage_ai/server/frontend_dist/_next/static/chunks/6579-2b5d8d39472d85c0.js +0 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/7400-1430ec3874c1fdee.js +0 -1
  99. mage_ai/server/frontend_dist/_next/static/chunks/8961-697fe5d4db44d909.js +0 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/9140-6f67e0879394373d.js +0 -1
  101. mage_ai/server/frontend_dist/_next/static/chunks/9767-3f852fd90cf7857f.js +0 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-678569cf24a2e10d.js +0 -1
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-0ed0d70bc659c236.js +0 -1
  104. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-f96da0174abb54b5.js +0 -1
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-5ccc75887776efb0.js +0 -1
  106. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f83ab9de4094e1b0.js +0 -1
  107. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-73ced07cc98a4968.js +0 -1
  108. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs-67d23509a0c9a1b8.js +0 -1
  109. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/syncs-4084a44baf91f30e.js +0 -1
  110. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-ae970171cfe98c51.js +0 -1
  111. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers-b0b91245d3299bdf.js +0 -1
  112. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/profile-acd7ee47219fee3d.js +0 -1
  113. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-07bda506f68974fb.js +0 -1
  114. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-e0172c422c95eda9.js +0 -1
  115. /mage_ai/server/frontend_dist/_next/static/{Bmwp0WdXRDJpCFVPOVdc9 → UuQKenirO2LDcepWvj6S9}/_middlewareManifest.js +0 -0
  116. /mage_ai/server/frontend_dist/_next/static/{Bmwp0WdXRDJpCFVPOVdc9 → UuQKenirO2LDcepWvj6S9}/_ssgManifest.js +0 -0
  117. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/LICENSE +0 -0
  118. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/WHEEL +0 -0
  119. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.dist-info}/entry_points.txt +0 -0
  120. {mage_ai-0.8.11.dist-info → mage_ai-0.8.13.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"},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return c}});var r=t(9518),o=t(23831),i=t(3055),c=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],i.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||o.Z.borders).medium,";\n ")}))},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return l}});var r=t(9518),o=t(23831),i=t(73942),c=t(49125),l=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],i.TR,14*c.iI,c.cd*c.iI,c.cd*c.iI,40*c.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||o.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||o.Z.interactive).linkPrimary,";\n ")})),u=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],i.n_,c.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||o.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*c.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*c.iI,"px;\n ")}))},2713:function(e,n,t){"use strict";var r=t(82394),o=t(44495),i=t(67971),c=t(55378),l=t(86673),u=t(19711),a=t(18025),s=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(a.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(o.ZP,{onChange:r,value:n}),(0,p.jsx)(l.Z,{mb:2}),(0,p.jsxs)(i.Z,{alignItems:"center",children:[(0,p.jsx)(u.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(l.Z,{pr:2}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*s.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(l.Z,{px:1,children:(0,p.jsx)(u.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(c.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*s.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var r=t(82684),o=t(60328),i=t(67971),c=t(882),l=t(86673),u=t(99994),a=t(9518),s=t(49125),d=t(37391),p=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],s.cd*s.iI,s.cd*s.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),h=t(28598);var m=function(e){var n=e.allowScroll,t=e.contained,a=e.noPadding,d=e.onClickTab,m=e.selectedTabUUID,g=e.small,b=e.tabs,v=(0,r.useMemo)((function(){var e=b.length,n=[];return b.forEach((function(t,r){var a=t.Icon,p=t.IconSelected,b=t.label,v=t.uuid,j=v===m,x=j&&p||a,y=b?b():v,O=(0,h.jsxs)(i.Z,{alignItems:"center",children:[x&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(x,{default:!j,size:2*s.iI}),(0,h.jsx)(l.Z,{mr:1})]}),y]});r>=1&&e>=2&&n.push((0,h.jsx)("div",{style:{marginLeft:1.5*s.iI}},"spacing-".concat(v))),j?n.push((0,h.jsx)(c.Z,{backgroundGradient:u.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:g,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:g,children:O},v)):n.push((0,h.jsx)("div",{style:{padding:4},children:(0,h.jsx)(o.Z,{borderLess:!0,compact:g,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:g,children:O},"button-tab-".concat(v))}))})),n}),[d,m,b]),j=(0,h.jsx)(i.Z,{alignItems:"center",children:v});return t?j:(0,h.jsx)(p,{allowScroll:n,noPadding:a,children:j})}},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 ")})),y=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 ")})),O=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,P=void 0!==_&&_,k=e.onClick,w=e.required,S=e.small,C=void 0!==S&&S,I=e.warning,D=e.xsmall,L=void 0!==D&&D,E=(0,i.Z)(e,m),T=I||!!(c||Z&&Z.touched&&Z.error);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(O,{onClick:function(e){e.preventDefault(),k&&k(e)},children:[(0,h.jsxs)(v,{children:[(0,h.jsx)(x,b(b({},E),{},{disabled:o?"disabled":void 0,notClickable:o})),(0,h.jsx)(y,{checked:t,disabled:o,large:g,required:w,warning:T,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:P,small:C,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)},82944:function(e,n,t){"use strict";var r=t(82394),o=t(91835),i=t(82684),c=t(9518),l=t(69898),u=t(28598);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var d=c.default.input.withConfig({displayName:"TextInput__TextInputStyle",componentId:"sc-1ii4qtc-0"})(["",""],l.p),p=function(e,n){var t=(0,o.Z)({},e);return(0,u.jsx)(l.Z,s(s({},t),{},{input:(0,u.jsx)(d,s({},t)),ref:n}))};n.Z=i.forwardRef(p)},44613:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return We}});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),y=t(67971),O=t(86673),Z=t(19711),_=t(2850),P=t(49125),k=p.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],P.iI/2,P.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,S,C=[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,E=[w.LAST_HOUR,w.LAST_DAY,w.LAST_WEEK,w.LAST_30_DAYS],T=(S={},(0,i.Z)(S,w.LAST_HOUR,3600),(0,i.Z)(S,w.LAST_DAY,86400),(0,i.Z)(S,w.LAST_WEEK,604800),(0,i.Z)(S,w.LAST_30_DAYS,2592e3),S),A=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 ")})),M=p.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],N,A.n_),B=t(90211),Y=t(44162),W=t(33766),q=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 U(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 H=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=U({},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,q.Od)(l,(function(e){return e===o})):i[c]=l.concat(o):i[c]=[o]})):i=U(U({},i),e),o&&(i._limit=L,i._offset=0),(0,W.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)(O.Z,{p:P.cd,children:[(0,F.jsxs)(O.Z,{mb:3,children:[(0,F.jsx)(O.Z,{mb:1,children:(0,F.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),C.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)(k,{children:(0,F.jsxs)(y.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)(O.Z,{mr:1}),(0,F.jsx)(M,U({},(0,i.Z)({},e.toLowerCase(),!0))),(0,F.jsx)(O.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,children:(0,B.kC)(e.toLowerCase())})]})})},e)}))]}),(0,F.jsxs)(O.Z,{mb:3,children:[(0,F.jsx)(O.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)(k,{children:(0,F.jsxs)(y.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)(O.Z,{mr:1}),(0,F.jsx)(g.Z,{color:(0,Y.qn)(e,{theme:r}).accent,size:1.5*P.iI,square:!0}),(0,F.jsx)(O.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,F.jsxs)(O.Z,{mb:3,children:[(0,F.jsx)(O.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)(k,{children:(0,F.jsxs)(y.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)(O.Z,{mr:1}),(0,F.jsx)(g.Z,{color:(0,Y.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*P.iI,square:!0}),(0,F.jsx)(O.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)(O.Z,{mb:3,children:[(0,F.jsx)(O.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)(k,{children:(0,F.jsxs)(y.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)(O.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)(O.Z,{mb:3,children:[(0,F.jsx)(O.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)(k,{children:(0,F.jsxs)(y.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)(O.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)(O.Z,{mb:3,children:[(0,F.jsx)(O.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)(k,{children:(0,F.jsxs)(y.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)(O.Z,{mr:1}),(0,F.jsx)(Z.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},G=t(93461),z=t(11135),X=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*P.iI),$=p.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],N,A.BG,.25*P.iI,.5*P.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,B.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,k=f.timestamp,w=(0,i.Z)({},_.toLowerCase(),!0),S=(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,q.YC)(e,(function(e){var n=(0,v.Z)(e,2),t=n[0];n[1];return t}))}),[s,x,d,p]),C=(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)(O.Z,{p:P.cd,children:(0,F.jsxs)(y.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,F.jsxs)(G.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)(O.Z,{mr:P.cd}),(0,F.jsx)(Z.ZP,{monospace:!0,children:le(k)})]}),(0,F.jsx)(j.Z,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,F.jsx)(ee.x8,{size:1.5*P.iI})})]})}),(0,F.jsx)(b.Z,{medium:!0}),(0,F.jsx)(O.Z,{py:P.cd,children:C}),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===S||void 0===S?void 0:S.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,B.Pb)(o)?JSON.parse(JSON.stringify(o,null,2)):JSON.stringify(o,null,2):i&&u&&(0,B.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)(X.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)(O.Z,{mb:5,px:P.cd,children:[(0,F.jsx)(O.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)(O.Z,{mt:3,children:[(0,F.jsx)(O.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),ye=t(47999),Oe=t(55378),Ze=t(82944),_e=t(66166),Pe=t(84779),ke=t(42305),we=t(7715),Se=t(59e3);function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ie(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!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,ke.lJ)(String((new Date).getUTCHours())),minute:(0,ke.lJ)(String((new Date).getUTCMinutes()))}),k=_[0],S=_[1],C=(0,Se.iV)(),I=(0,_e.Z)(C);return(0,h.useEffect)((function(){if(!(0,we.Xy)(C,I)){var e=C.start_timestamp,n=C.end_timestamp;if(e){var t=(0,ke.Pc)(e),r=t.date,o=t.hour,i=t.minute;p(r),g({hour:(0,ke.lJ)(o),minute:(0,ke.lJ)(i)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-T[w.LAST_DAY])<=60&&c(w.LAST_DAY)}if(n){var u=(0,ke.Pc)(n),a=u.date,s=u.hour,d=u.minute;x(a),S({hour:(0,ke.lJ)(s),minute:(0,ke.lJ)(d)})}}}),[C,I]),(0,F.jsx)(O.Z,{py:1,children:(0,F.jsxs)(y.Z,{alignItems:"center",children:[(0,F.jsx)(z.ZP,{blackBorder:!0,disabled:n,inline:!0,onClick:r,paddingBottom:.75*P.iI,paddingTop:.75*P.iI,uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"}),(0,F.jsx)(O.Z,{mr:1}),(0,F.jsx)(z.ZP,{blackBorder:!0,disabled:(null===C||void 0===C?void 0:C._offset)<=0,inline:!0,onClick:t,paddingBottom:.75*P.iI,paddingTop:.75*P.iI,uuid:"logs/load_newer_logs",children:"Load newer logs"}),(0,F.jsx)(O.Z,{mr:2}),(0,F.jsx)(Oe.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(c(n),E.includes(n)){var t,r=(0,Pe.JI)(T[n]);(0,W.u)(Ie((t={},(0,i.Z)(t,he.START,r),(0,i.Z)(t,he.END,null),t),De))}},paddingRight:4*P.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)(O.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,ke.AY)(d,null===m||void 0===m?void 0:m.hour,null===m||void 0===m?void 0:m.minute):""}),(0,F.jsx)(ye.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)(O.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,ke.AY)(v,null===k||void 0===k?void 0:k.hour,null===k||void 0===k?void 0:k.minute):""}),(0,F.jsx)(ye.Z,{onClickOutside:function(){return a(null)},open:1===u,style:{position:"relative"},children:(0,F.jsx)(xe.Z,{selectedDate:v,selectedTime:k,setSelectedDate:x,setSelectedTime:S})}),(0,F.jsx)(O.Z,{mr:1}),(0,F.jsx)(j.Z,{borderRadius:P.iI/2,onClick:function(){var e,n=(0,ke.BP)(d,m.hour,m.minute),t=(0,ke.BP)(v,k.hour,k.minute);(0,W.u)(Ie((e={},(0,i.Z)(e,he.START,(0,ke.A5)(n)),(0,i.Z)(e,he.END,(0,ke.A5)(t)),e),De))},padding:"".concat(P.iI/2,"px"),primary:!0,children:"Search"})]})]})})},Ee=t(82531),Te=t(59920);function Ae(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?Ae(Object(t),!0).forEach((function(n){(0,i.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}var Ne="log_uuid",Me="pipeline_run_id[]",Be="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],k=x[1],S=(0,h.useState)(!1),C=S[0],E=S[1],A=Ee.ZP.pipelines.detail(o,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,R=(0,h.useMemo)((function(){return Re(Re({},null===A||void 0===A?void 0:A.pipeline),{},{uuid:o})}),[A,o]),N=(null===R||void 0===R?void 0:R.type)===be.q.INTEGRATION,J=(0,h.useMemo)((function(){return R.blocks||[]}),[R]),U=(0,h.useMemo)((function(){var e=(0,q.HK)(J,(function(e){return e.uuid}));if(N){var n,t=(0,q.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,Se.iV)(),Q=!(null!==V&&void 0!==V&&V.start_timestamp)&&!(null!==V&&void 0!==V&&V.hasOwnProperty(Me)||null!==V&&void 0!==V&&V.hasOwnProperty(Be)),$=(0,Pe.JI)(T[w.LAST_DAY]),ne=Ee.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,q.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=U[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}))}))}),[U,N,fe,l]),ve=he.length,xe=(0,_e.Z)(V);(0,h.useEffect)((function(){var e;Q&&(0,W.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 ye=(0,_e.Z)(v);(0,h.useEffect)((function(){var e=V.log_uuid;!e||v||ye||j(fe.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[fe,V,v,ye]),(0,h.useEffect)((function(){var e;C&&!oe&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(),E(!1))}),[C,oe]);var Oe=V._limit,Ze=V._offset,ke=+(Oe||0),Ce=+(Ze||0),Ie=Math.max(se,de),De=(0,h.useCallback)((function(){var e,n=ke,t=Ce;(se>ke||de>ke)&&(n=Math.min(Ie,ke+L),t=Math.min(Ce+L,Ie-Ie%L),(0,W.u)(Re(Re({},V),{},(e={},(0,i.Z)(e,I,n),(0,i.Z)(e,D,t),e))))}),[Ie,ke,Ce,V,se,de]),Ae=(0,h.useCallback)((function(){var e,n=ke,t=Ce;ke>=L&&(n=Math.max(L,ke-L),ke>=Ie&&Ie%L!==0&&(n=Ie-Ie%L),t=Math.max(0,Ce-L),(0,W.u)(Re(Re({},V),{},(e={},(0,i.Z)(e,I,n),(0,i.Z)(e,D,t),e))))}),[Ie,ke,Ce,V]);return(0,F.jsxs)(ge.Z,{after:v&&(0,F.jsx)(me,{log:v,onClose:function(){(0,W.u)((0,i.Z)({},Ne,null)),j(null)}}),afterHidden:!v,afterWidth:80*P.iI,before:(0,F.jsx)(H,{blocks:J,query:l}),beforeWidth:20*P.iI,breadcrumbs:[{label:function(){return"Logs"}}],pageName:Te.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)(O.Z,{px:P.cd,py:1,children:(0,F.jsxs)(Z.ZP,{children:[!oe&&(0,F.jsxs)(F.Fragment,{children:[(0,B.x6)(ve)," logs found",(0,F.jsx)(Le,{allPastLogsLoaded:pe,loadNewerLogInterval:Ae,loadPastLogInterval:De,selectedRange:_,setSelectedRange:k})]}),oe&&"Searching..."]})}),(0,F.jsx)(b.Z,{light:!0}),oe&&(0,F.jsx)(O.Z,{p:P.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,W.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=U[v];if(x||(x=U[j[0]]),x){var _=(0,Y.qn)(x.type,{blockColor:x.color,theme:t}).accent;n=(0,F.jsx)(y.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)(X.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,F.jsx)(g.Z,{color:_,size:1.5*P.iI,square:!0}),(0,F.jsx)(O.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)(G.Z,{alignItems:"center",justifyContent:"center",children:(0,F.jsx)(M,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)(G.Z,{flex:1,justifyContent:"flex-end",children:(0,F.jsx)(ee._Q,{default:!0,size:2*P.iI})},"chevron_right_icon")]})),uuid:"logs"}),(0,F.jsx)(O.Z,{p:P.cd,ref:r,children:(0,F.jsx)(z.ZP,{blackBorder:!0,inline:!0,onClick:function(){E(!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,W.u)({_limit:L,_offset:0})},paddingBottom:.75*P.iI,paddingTop:.75*P.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 We=(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,3573,434,9898,1830,2626,4463,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","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}]);
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,3573,434,9898,1830,2626,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([[4947],{44162:function(n,e,t){"use strict";t.d(e,{HC:function(){return x},Kf:function(){return s},Nk:function(){return p},gE:function(){return v},jv:function(){return m},nz:function(){return f},oh:function(){return a},qn:function(){return l},t1:function(){return h},y9:function(){return b}});var r=t(9518),i=t(23831),o=t(86422),c=t(73942),u=t(49125),d=t(90880),a=68;function l(n,e){var t,r,c=((null===e||void 0===e||null===(t=e.theme)||void 0===t?void 0:t.borders)||i.Z.borders).light,u=((null===e||void 0===e||null===(r=e.theme)||void 0===r?void 0:r.monotone)||i.Z.monotone).grey500,d=e||{},a=d.blockColor,l=d.isSelected,s=d.theme;return l?c=((null===s||void 0===s?void 0:s.content)||i.Z.content).active:o.tf.TRANSFORMER===n||a===o.Lq.PURPLE?(c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).purple,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).purpleLight):o.tf.DATA_EXPORTER===n||a===o.Lq.YELLOW?(c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).yellow,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).yellowLight):o.tf.DATA_LOADER===n||a===o.Lq.BLUE?(c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).blue,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).blueLight):o.tf.SENSOR===n||a===o.Lq.PINK?(c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).pink,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).pinkLight):o.tf.DBT===n?(c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).dbt,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).dbtLight):a===o.Lq.TEAL?(c=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).teal,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).tealLight):(o.tf.SCRATCHPAD===n||a===o.Lq.GREY||o.tf.CUSTOM===n&&!a)&&(c=((null===s||void 0===s?void 0:s.content)||i.Z.content).default,u=((null===s||void 0===s?void 0:s.accent)||i.Z.accent).contentDefaultTransparent),{accent:c,accentLight:u}}var s=(0,r.css)([""," "," "," "," "," "," ",""],(0,d.eR)(),(function(n){return!n.selected&&!n.hasError&&"\n border-color: ".concat(l(n.blockType,n).accentLight,";\n ")}),(function(n){return n.selected&&!n.hasError&&"\n border-color: ".concat(l(n.blockType,n).accent,";\n ")}),(function(n){return!n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.accent||i.Z.accent).negativeTransparent,";\n ")}),(function(n){return n.selected&&n.hasError&&"\n border-color: ".concat((n.theme.borders||i.Z.borders).danger,";\n ")}),(function(n){return n.dynamicBlock&&"\n border-style: dashed !important;\n "}),(function(n){return n.dynamicChildBlock&&"\n border-style: dotted !important;\n "})),p=r.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-s5rj34-0"})(["border-radius:","px;position:relative;"],c.n_),f=r.default.div.withConfig({displayName:"indexstyle__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(n){return"\n background-color: ".concat((n.theme||i.Z).background.content,";\n ")}),(function(n){return n.zIndex&&"\n z-index: ".concat(6+(n.zIndex||0),";\n ")})),m=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(n){return"\n background-color: ".concat((n.theme.background||i.Z.background).codeTextarea,";\n ")}),(function(n){return!n.hasOutput&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom-style: ").concat(c.M8,";\n border-bottom-width: ").concat(c.mP,"px;\n ")})),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(n){return n.additionalZIndex>0&&"\n z-index: ".concat(8+n.additionalZIndex,";\n ")}),(function(n){return"\n background-color: ".concat((n.theme.text||i.Z.text).fileBrowser,";\n ")})),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),b=r.default.div.withConfig({displayName:"indexstyle__CodeHelperStyle",componentId:"sc-s5rj34-5"})(["margin-bottom:","px;padding-bottom:","px;",""],u.cd*u.iI,u.iI,(function(n){return"\n border-bottom: 1px solid ".concat((n.theme.borders||i.Z.borders).medium,";\n padding-left: ").concat(n.normalPadding?u.iI:a,"px;\n ")})),x=r.default.div.withConfig({displayName:"indexstyle__TimeTrackerStyle",componentId:"sc-s5rj34-6"})(["bottom:","px;left:","px;position:absolute;"],1*u.iI,a)},92953:function(n,e,t){"use strict";var r;t.d(e,{a:function(){return r}}),function(n){n.BLOCK_RUNS="block_runs",n.BLOCK_RUNTIME="block_runtime",n.PIPELINE_RUNS="pipeline_runs"}(r||(r={}))},87465:function(n,e,t){"use strict";t.d(e,{Z:function(){return h}});t(82684);var r=t(34376),i=t(87372),o=t(2626),c=t(86673),u=t(19711),d=t(2850),a=t(9518),l=t(23831),s=t(49125),p=a.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-1in9sst-0"})(["padding:","px ","px;"," ",""],s.iI,s.tr,(function(n){return n.selected&&"\n background-color: ".concat((n.theme.interactive||l.Z.interactive).checked,";\n ")}),(function(n){return!n.selected&&"\n cursor: pointer;\n "})),f=t(92953),m=t(59920),v=t(28598);var h=function(n){var e=n.breadcrumbs,t=n.children,a=n.monitorType,l=n.pipeline,h=n.subheader,b=(0,r.useRouter)();return(0,v.jsx)(o.Z,{before:(0,v.jsxs)(d.M,{children:[(0,v.jsx)(c.Z,{p:s.cd,children:(0,v.jsx)(i.Z,{level:4,muted:!0,children:"Insights"})}),(0,v.jsx)(p,{onClick:function(n){n.preventDefault(),b.push("/pipelines/[pipeline]/monitors","/pipelines/".concat(null===l||void 0===l?void 0:l.uuid,"/monitors"))},selected:f.a.PIPELINE_RUNS==a,children:(0,v.jsx)(u.ZP,{children:"Pipeline runs"})}),(0,v.jsx)(p,{onClick:function(n){n.preventDefault(),b.push("/pipelines/[pipeline]/monitors/block-runs","/pipelines/".concat(null===l||void 0===l?void 0:l.uuid,"/monitors/block-runs"))},selected:f.a.BLOCK_RUNS==a,children:(0,v.jsx)(u.ZP,{children:"Block runs"})}),(0,v.jsx)(p,{onClick:function(n){n.preventDefault(),b.push("/pipelines/[pipeline]/monitors/block-runtime","/pipelines/".concat(null===l||void 0===l?void 0:l.uuid,"/monitors/block-runtime"))},selected:f.a.BLOCK_RUNTIME==a,children:(0,v.jsx)(u.ZP,{children:"Block runtime"})})]}),breadcrumbs:e,pageName:m.M.MONITOR,pipeline:l,subheader:h,uuid:"pipeline/monitor",children:t})}},2850:function(n,e,t){"use strict";t.d(e,{M:function(){return u},W:function(){return c}});var r=t(9518),i=t(23831),o=t(3055),c=34*t(49125).iI,u=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(n){return"\n border-left: 1px solid ".concat((n.theme.borders||i.Z.borders).medium,";\n ")}))},45739:function(n,e,t){"use strict";t.d(e,{K:function(){return i}});var r=t(31969),i=function(n){var e=n||r.Z,t=e.brand,i=t.earth200,o=t.earth300,c=t.earth400,u=t.energy200,d=t.energy300,a=t.energy400,l=t.fire200,s=t.fire300,p=t.fire400,f=t.water200,m=t.water300,v=t.water400,h=t.wind200,b=t.wind300,x=t.wind400,R=e.chart;return[R.backgroundPrimary,R.backgroundSecondary,R.backgroundTertiary].concat([x,v,p,a,c,b,m,s,d,o,h,f,l,u,i])}},52359:function(n,e,t){"use strict";var r=t(9518).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);e.Z=r},344:function(n,e,t){"use strict";t.d(e,{P5:function(){return i},Vs:function(){return o}});t(90211);var r=Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:2});function i(n){return"number"!==typeof n?n:n>=1e4?r.format(n):n.toString()}function o(n,e,t){var r,i;if("undefined"===typeof n||"undefined"===typeof e)return 0;var o=null===n||void 0===n||null===(r=n(e,t))||void 0===r||null===(i=r.props)||void 0===i?void 0:i.children;return(Array.isArray(o)?o:[o]).join("").length}},86422:function(n,e,t){"use strict";t.d(e,{$W:function(){return p},DA:function(){return s},HX:function(){return v},J8:function(){return m},Lq:function(){return a},Qj:function(){return h},Ut:function(){return g},V4:function(){return R},VZ:function(){return f},dO:function(){return l},f2:function(){return x},iZ:function(){return b},t6:function(){return c},tf:function(){return d}});var r,i,o,c,u=t(82394);!function(n){n.PYTHON="python",n.R="r",n.SQL="sql",n.YAML="yaml"}(c||(c={}));var d,a,l=(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(n){n.CHART="chart",n.CUSTOM="custom",n.DATA_EXPORTER="data_exporter",n.DATA_LOADER="data_loader",n.DBT="dbt",n.SCRATCHPAD="scratchpad",n.SENSOR="sensor",n.TRANSFORMER="transformer"}(d||(d={})),function(n){n.BLUE="blue",n.GREY="grey",n.PINK="pink",n.PURPLE="purple",n.TEAL="teal",n.YELLOW="yellow"}(a||(a={}));var s,p=[d.CHART,d.CUSTOM,d.DATA_EXPORTER,d.DATA_LOADER,d.SCRATCHPAD,d.SENSOR,d.TRANSFORMER],f=[d.DATA_EXPORTER,d.DATA_LOADER],m=[d.DATA_EXPORTER,d.DATA_LOADER,d.TRANSFORMER],v=[d.DATA_EXPORTER,d.DATA_LOADER,d.DBT,d.TRANSFORMER],h=[d.CHART,d.SCRATCHPAD,d.SENSOR],b=[d.SCRATCHPAD];!function(n){n.EXECUTED="executed",n.FAILED="failed",n.NOT_EXECUTED="not_executed",n.UPDATED="updated"}(s||(s={}));var x=[d.DATA_EXPORTER,d.TRANSFORMER],R=(i={},(0,u.Z)(i,d.CUSTOM,"Custom"),(0,u.Z)(i,d.DATA_EXPORTER,"Data exporter"),(0,u.Z)(i,d.DATA_LOADER,"Data loader"),(0,u.Z)(i,d.SCRATCHPAD,"Scratchpad"),(0,u.Z)(i,d.SENSOR,"Sensor"),(0,u.Z)(i,d.TRANSFORMER,"Transformer"),i),g=[d.DATA_LOADER,d.TRANSFORMER,d.DATA_EXPORTER];o={},(0,u.Z)(o,d.DATA_EXPORTER,"DE"),(0,u.Z)(o,d.DATA_LOADER,"DL"),(0,u.Z)(o,d.SCRATCHPAD,"SP"),(0,u.Z)(o,d.SENSOR,"SR"),(0,u.Z)(o,d.TRANSFORMER,"TF")},68805:function(n,e,t){"use strict";t.r(e);var r=t(77837),i=t(75582),o=t(82394),c=t(38860),u=t.n(c),d=t(82684),a=t(92083),l=t.n(a),s=t(16634),p=t(67971),f=t(87372),m=t(68735),v=t(87465),h=t(41788),b=t(86673),x=t(55378),R=t(19711),g=t(82531),T=t(23831),A=t(73942),y=t(43032),E=t(92953),_=t(9518),O=t(44162),Z=t(24224),D=t(28598);function P(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function C(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?P(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function k(n){var e=n.pipeline,t=(0,d.useContext)(_.ThemeContext),r=(0,d.useState)(null),c=r[0],u=r[1],a=e.uuid,h=g.ZP.pipelines.detail(a,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,P=(0,d.useMemo)((function(){return C(C({},null===h||void 0===h?void 0:h.pipeline),{},{uuid:a})}),[h,a]),k=g.ZP.pipeline_schedules.pipelines.list(a).data,S=(0,d.useMemo)((function(){return null===k||void 0===k?void 0:k.pipeline_schedules}),[k]),L=(0,d.useMemo)((function(){return(0,Z.HK)(null===P||void 0===P?void 0:P.blocks,(function(n){return n.uuid}))||{}}),[P]),j={pipeline_uuid:a};(c||0===c)&&(j.pipeline_schedule_id=Number(c));var N=g.ZP.monitor_stats.detail("block_run_time",j),w=N.data,I=N.mutate;(0,d.useEffect)((function(){I(c)}),[I,c]);var M=((null===w||void 0===w?void 0:w.monitor_stat)||{}).stats,B=(0,d.useMemo)((function(){for(var n=new Date,e=[],t=0;t<90;t++)e.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return e}),[]),U=(0,d.useMemo)((function(){if(M)return Object.entries(M).reduce((function(n,e){var t=(0,i.Z)(e,2),r=t[0],c=t[1].data;return C(C({},n),{},(0,o.Z)({},r,B.map((function(n){return{x:n,y:n in c?[c[n]]:null}}))))}),{})}),[M]),X=(0,d.useMemo)((function(){var n=[];return n.push({bold:!0,label:function(){return"Monitors"}}),n}),[P]);return(0,D.jsx)(v.Z,{breadcrumbs:X,monitorType:E.a.BLOCK_RUNTIME,pipeline:P,subheader:(0,D.jsx)(p.Z,{children:(0,D.jsxs)(x.Z,{backgroundColor:T.Z.interactive.defaultBackground,label:"Trigger:",onChange:function(n){var e=n.target.value;"initial"!==e?(u(e),I(e)):(I(),u(null))},value:c||"initial",children:[(0,D.jsx)("option",{value:"initial",children:"All"}),S&&S.map((function(n){return(0,D.jsx)("option",{value:n.id,children:n.name},n.id)}))]})}),children:(0,D.jsx)(b.Z,{mx:2,children:U&&Object.entries(U).map((function(n,e){var r,o,c=(0,i.Z)(n,2),u=c[0],d=c[1];return(0,D.jsxs)(b.Z,{mt:2,children:[(0,D.jsxs)(p.Z,{alignItems:"center",children:[(0,D.jsx)(b.Z,{mx:1,children:(0,D.jsx)(s.Z,{color:(0,O.qn)(null===(r=L[u])||void 0===r?void 0:r.type,{blockColor:null===(o=L[u])||void 0===o?void 0:o.color,theme:t}).accent,size:y.ZG,square:!0})}),(0,D.jsx)(f.Z,{level:4,children:u})]}),(0,D.jsx)("div",{style:{backgroundColor:T.Z.background.chartBlock,borderRadius:"".concat(A.TR,"px"),marginTop:"8px"},children:(0,D.jsx)(m.Z,{data:d,getX:function(n){return l()(n.x).valueOf()},gridProps:{stroke:"black",strokeDasharray:null,strokeOpacity:.2},height:200,hideGridX:!0,margin:{top:10,bottom:30,left:35,right:-1},noCurve:!0,renderXTooltipContent:function(n){return(0,D.jsx)(R.ZP,{center:!0,inverted:!0,small:!0,children:l()(n.x).format("MMM DD")})},renderYTooltipContent:function(n){var e,t=null===n||void 0===n||null===(e=n.y)||void 0===e?void 0:e[0];return void 0!==t&&(0,D.jsxs)(R.ZP,{center:!0,inverted:!0,small:!0,children:[t.toFixed?t.toFixed(3):t,"s"]})},thickStroke:!0,xLabelFormat:function(n){return l()(n).format("MMM DD")},xLabelRotate:!1})})]},"".concat(u,"_").concat(e))}))})})}k.getInitialProps=function(){var n=(0,r.Z)(u().mark((function n(e){var t;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),e.default=(0,h.Z)(k)},76017:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors/block-runtime",function(){return t(68805)}])}},function(n){n.O(0,[3662,3850,2083,5896,2714,9832,9767,3573,434,9898,1830,2626,6641,9774,2888,179],(function(){return e=76017,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7713],{89677:function(n,_,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors",function(){return i(67400)}])}},function(n){n.O(0,[3850,2083,5896,2714,9767,6579,434,1830,2249,7400,9774,2888,179],(function(){return _=89677,n(n.s=_);var _}));var _=n.O();_N_E=_}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7713],{89677:function(n,_,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors",function(){return i(67400)}])}},function(n){n.O(0,[3850,2083,5896,2714,9767,3573,434,1830,2626,7400,9774,2888,179],(function(){return _=89677,n(n.s=_);var _}));var _=n.O();_N_E=_}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{62976:function(e,n,t){"use strict";t.d(n,{Z:function(){return R}});var r=t(82394),i=t(21831),o=t(82684),u=t(10919),l=t(12691),c=t.n(l),a=t(34376),s=t.n(a),d=t(9518),p=t(63068),f=t(44628),h=t(6508),m=t(67971),v=t(19711),g=t(23831),b=t(31969),y=function(){var e=document.createElement("div");e.setAttribute("style","width: 100px; height: 100px; overflow: scroll; position:absolute; top:-9999px;"),document.body.appendChild(e);var n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),n},x=t(2005),O=t(31012),j=t(37391),w=t(6753),Z=t(49125),P=t(20567),E=t(24224),k=t(28598);function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function S(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var D=2*Z.iI+O.dN,I=20*Z.iI,C=d.default.div.withConfig({displayName:"DataTable__Styles",componentId:"sc-1arr863-0"})([""," "," "," .body > div{","}.table{border-spacing:0;display:inline-block;"," "," "," "," .tr{.td.td-index-column{","}}.th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;","}.th,.td{"," font-family:",";margin:0;","}.td{padding:","px;}&.sticky{overflow:auto;}.header{overflow:hidden;}}"],(function(e){return e.disableScrolling&&"\n overflow: hidden;\n "}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),j.w5,(function(e){return!e.noBorderBottom&&"\n border-bottom: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderLeft&&"\n border-left: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderRight&&"\n border-right: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return!e.noBorderTop&&"\n border-top: 1px solid ".concat((e.theme.borders||b.Z.borders).medium,";\n ")}),(function(e){return"\n color: ".concat((e.theme.content||b.Z.content).default,";\n ")}),(function(e){return"\n height: ".concat(e.columnHeaderHeight||D,"px;\n ")}),O.iD,x.ry,(function(e){return"\n background-color: ".concat((e.theme.background||b.Z.background).table,";\n border-bottom: 1px solid ").concat((e.theme.borders||b.Z.borders).medium,";\n border-right: 1px solid ").concat((e.theme.borders||b.Z.borders).medium,";\n ")}),1*Z.iI);function T(e){var n=e.original,t=8.5*Math.max.apply(Math,(0,i.Z)(n.map((function(e){return(null===e||void 0===e?void 0:e.length)||0})))),r=Math.ceil(t/(I-2*Z.iI));return Math.max(r,1)*O.dN+2*Z.iI}function N(e){var n=e.columnHeaderHeight,t=e.columns,r=e.data,l=e.disableScrolling,a=e.height,j=e.index,_=e.invalidValues,C=e.maxHeight,N=e.numberOfIndexes,R=e.previewIndexes,H=e.renderColumnHeader,M=e.width,A=(0,o.useContext)(d.ThemeContext),B=(0,o.useRef)(null),L=(0,o.useRef)(null);(0,o.useEffect)((function(){var e=function(e){var n;null===B||void 0===B||null===(n=B.current)||void 0===n||n.scroll(e.target.scrollLeft,0)};return L&&L.current.addEventListener("scroll",e),function(){var n;null===L||void 0===L||null===(n=L.current)||void 0===n||n.removeEventListener("scroll",e)}}),[B,L]);var U=(0,o.useMemo)((function(){return j&&r&&j.length===r.length}),[r,j]),V=(0,o.useMemo)((function(){var e=[];return(0,E.w6)(N).forEach((function(n,t){var o=8.7*String(null===r||void 0===r?void 0:r.length).length;if(U){var u=j.map((function(e){return N>=2?String(e[t]).length:String(e).length}));o=8.7*Math.max.apply(Math,(0,i.Z)(u))}e.push(o+2*Z.iI)})),e}),[r,j,N,U]),F=t.map((function(e){return null===e||void 0===e?void 0:e.Header})).slice(1),G=(0,o.useMemo)((function(){return y()}),[]),X=(0,o.useMemo)((function(){var e=M-(Math.max.apply(Math,(0,i.Z)(V))+1.5*Z.iI+G),n=t.length-1,r=I;return r*n<e&&(r=e/n),{width:r}}),[t,V,G,M]),W=(0,f.useTable)({columns:t,data:r,defaultColumn:X},f.useBlockLayout,h.useSticky),q=W.getTableBodyProps,J=W.getTableProps,Y=W.headerGroups,z=W.prepareRow,K=W.rows,Q=s().query.slug,$=void 0===Q?[]:Q,ee=new Set((null===R||void 0===R?void 0:R.removedRows)||[]),ne=(0,o.useCallback)((function(e){var n=e.index,t=e.style,r=K[n];z(r);var i=r.original,l=ee.has(n);return(0,k.jsx)("div",S(S({},r.getRowProps({style:S(S({},t),{},{width:"auto"})})),{},{className:"tr",children:r.cells.map((function(e,t){var r,a=t<=N-1,s=e.getCellProps(),d=e.column.id,p=null===_||void 0===_||null===(r=_[d])||void 0===r?void 0:r.includes(n),f=S({},s.style);a&&(f.fontFamily=x.Vp,f.left=0,f.position="sticky",f.textAlign=j?"right":"center",f.width=V[t]);var h,g=i[t-N],y=F.indexOf(d);if(p&&(f.color=b.Z.interactive.dangerBorder),l&&(f.backgroundColor=b.Z.background.danger),Array.isArray(g)||"object"===typeof g)try{g=JSON.stringify(g)}catch(O){g="Error: cannot display value"}return a&&(U?(h=j[n],Array.isArray(h)&&(h=h[t])):h=e.render("Cell")),(0,o.createElement)("div",S(S({},s),{},{className:"td ".concat(a?"td-index-column":""),key:"".concat(t,"-").concat(g),style:f}),h,!a&&(0,k.jsxs)(m.Z,{justifyContent:"space-between",children:[(0,k.jsxs)(v.ZP,{danger:p,default:!0,wordBreak:!0,children:[!0===g&&"true",!1===g&&"false",(null===g||"null"===g)&&"null",!0!==g&&!1!==g&&null!==g&&"null"!==g&&g]}),p&&(0,k.jsx)(c(),{as:(0,P.o_)(w.mW,y),href:"/datasets/[...slug]",passHref:!0,children:(0,k.jsx)(u.Z,{danger:!0,children:"View all"})})]}))}))}))}),[j,_,V,N,z,K,$]),te=(0,o.useMemo)((function(){var e;return C?(e=(0,E.Sm)(K.map(T)),e+=n||D-O.dN):(e=a,e-=n||D),e}),[n,T,a,C,K]),re=(0,o.useMemo)((function(){return(0,k.jsx)(p.S_,{estimatedItemSize:D,height:te,itemCount:null===K||void 0===K?void 0:K.length,itemSize:function(e){return T(K[e])},outerRef:L,style:{maxHeight:C,pointerEvents:l?"none":null},children:ne})}),[te,L,ne,K]);return(0,k.jsx)("div",S(S({},J()),{},{className:"table sticky",style:{width:M},children:(0,k.jsxs)("div",S(S({},q()),{},{className:"body",children:[(0,k.jsx)("div",{className:"header",ref:B,children:Y.map((function(e,n){return(0,o.createElement)("div",S(S({},e.getHeaderGroupProps()),{},{className:"tr",key:"".concat(e.id,"_").concat(n)}),e.headers.map((function(e,n){var t,r=n<=N-1,i=e.getHeaderProps(),u=S({},i.style);return r?(u.fontFamily=x.Vp,u.left=0,u.position="sticky",u.textAlign="center",u.width=V[n],u.minWidth=V[n]):H?t=H(e,n-N,{width:X.width}):(t=e.render("Header"),u.color=(A||g.Z).content.default,u.padding=1*Z.iI,u.minWidth=X.width),(0,o.createElement)("div",S(S({},i),{},{className:"th",key:e.id,style:u,title:r?"Row number":void 0}),t)})))}))}),re]}))}))}var R=function(e){var n=e.columnHeaderHeight,t=e.columns,i=e.disableScrolling,u=e.height,l=e.index,c=e.invalidValues,a=e.maxHeight,s=e.noBorderBottom,d=e.noBorderLeft,p=e.noBorderRight,f=e.noBorderTop,h=e.previewIndexes,m=e.renderColumnHeader,v=e.rows,g=e.width,b=(0,o.useMemo)((function(){return null!==l&&void 0!==l&&l.length&&Array.isArray(l[0])?l[0].length:1}),[l]),y=(0,o.useMemo)((function(){return(0,E.w6)(b).map((function(e,n){return{Header:(0,E.w6)(n+1).map((function(){return" "})).join(" "),accessor:function(e,n){return n},sticky:"left"}})).concat(null===t||void 0===t?void 0:t.map((function(e){return{Header:String(e),accessor:String(e)}})))}),[t,b]);return(0,o.useMemo)((function(){return null===v||void 0===v?void 0:v.map((function(e){return e.reduce((function(e,n,i){return S(S({},e),{},(0,r.Z)({},t[i],n))}),{})}))}),[t,v]),(0,k.jsx)(C,{columnHeaderHeight:n,disableScrolling:i,height:u,maxHeight:(a||0)+37,noBorderBottom:s,noBorderLeft:d,noBorderRight:p,noBorderTop:f,children:(0,k.jsx)(N,{columnHeaderHeight:n,columns:y,data:v,disableScrolling:i,height:u,index:l,invalidValues:c,maxHeight:a,numberOfIndexes:b,previewIndexes:h,renderColumnHeader:m,width:g})})}},27125:function(e,n,t){"use strict";var r=t(82684),i=t(12691),o=t.n(i),u=t(34376),l=t.n(u),c=t(9518),a=t(66050),s=t(60328),d=t(16634),p=t(10919),f=t(98781),h=t(86673),m=t(87815),v=t(19711),g=t(10503),b=t(49125),y=t(44162),x=t(24224),O=t(28598);n.Z=function(e){var n=e.blockRuns,t=e.onClickRow,i=e.pipeline,u=e.selectedRun,j=(0,r.useContext)(c.ThemeContext),w=(i||{}).uuid,Z=(0,r.useMemo)((function(){return i.blocks||[]}),[i]),P=(0,r.useMemo)((function(){return(0,x.HK)(Z,(function(e){return e.uuid}))}),[Z]);return(0,O.jsx)(m.Z,{columnFlex:[null,1,3,2,null,null],columns:[{uuid:"Date"},{uuid:"Status"},{uuid:"Trigger"},{uuid:"Block"},{uuid:"Completed"},{uuid:"Logs"}],isSelectedRow:function(e){return n[e].id===(null===u||void 0===u?void 0:u.id)},onClickRow:t,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,r,u,c=e.block_uuid,m=e.completed_at,x=e.created_at,Z=e.id,E=e.pipeline_schedule_id,k=e.pipeline_schedule_name,_=e.status,S=c,D=S.split(":");f.q.INTEGRATION===i.type&&(S=D[0],r=D[1],u=D[2]);var I=P[S];return I||(I=P[D[0]]),[(0,O.jsx)(v.ZP,{monospace:!0,default:!0,children:x}),(0,O.jsx)(v.ZP,{danger:a.V.FAILED===_,default:a.V.CANCELLED===_,info:a.V.INITIAL===_,monospace:!0,success:a.V.COMPLETED===_,warning:a.V.RUNNING===_,children:_}),(0,O.jsx)(o(),{as:"/pipelines/".concat(w,"/triggers/").concat(E),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,O.jsx)(p.Z,{bold:!0,sameColorAsText:!0,children:k})}),(0,O.jsx)(o(),{as:"/pipelines/".concat(w,"/edit?block_uuid=").concat(S),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,O.jsxs)(p.Z,{bold:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,O.jsx)(d.Z,{color:(0,y.qn)(null===(n=I)||void 0===n?void 0:n.type,{blockColor:null===(t=I)||void 0===t?void 0:t.color,theme:j}).accent,size:1.5*b.iI,square:!0}),(0,O.jsx)(h.Z,{mr:1}),(0,O.jsxs)(v.ZP,{monospace:!0,children:[S,r&&": ",r&&(0,O.jsx)(v.ZP,{default:!0,inline:!0,monospace:!0,children:r}),u>=0&&": ",u>=0&&(0,O.jsx)(v.ZP,{default:!0,inline:!0,monospace:!0,children:u})]})]})}),(0,O.jsx)(v.ZP,{monospace:!0,default:!0,children:m||"-"}),(0,O.jsx)(s.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(w,"/logs?block_run_id[]=").concat(Z))},children:(0,O.jsx)(g.B4,{default:!0,size:2*b.iI})})]})),uuid:"block-runs"})}},64155:function(e,n,t){"use strict";t.d(n,{Eh:function(){return c},ht:function(){return s},t0:function(){return a}});var r=t(9518),i=t(82386),o=t(1286),u=t(31012),l=t(49125),c=(l.iI,o.O$+3*l.iI+u.dN),a=r.default.div.withConfig({displayName:"indexstyle__SidekickContainerStyle",componentId:"sc-15ofupc-0"})(["position:relative;width:fit-content;"," ",""],(function(e){return"\n height: calc(100vh - ".concat(i.uX,"px - ").concat(e.heightOffset,"px);\n ")}),(function(e){return e.fullWidth&&"\n width: 100%;\n "})),s=r.default.div.withConfig({displayName:"indexstyle__PaddingContainerStyle",componentId:"sc-15ofupc-1"})(["padding:","px;",""],2*l.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}))},19395:function(e,n,t){"use strict";t.d(n,{IJ:function(){return s},Vx:function(){return p},eI:function(){return d},gU:function(){return h},tL:function(){return f},vJ:function(){return m}});var r,i,o=t(82394),u=t(92083),l=t.n(u);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,i=n.started_at,u=n.status,c=null;i&&r&&(c=l()(r).valueOf()-l()(i).valueOf());return a(a({},e),{},(0,o.Z)({},t,{runtime:c,status:u}))}),{})}function d(e){if(!e)return null;var n=new Date(l()(e).valueOf()),t=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds());return new Date(t)}function p(e){return d(e).toISOString().split(".")[0]}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(i||(i={}));var f=(r={},(0,o.Z)(r,i.DAY,86400),(0,o.Z)(r,i.HOUR,3600),(0,o.Z)(r,i.MINUTE,60),(0,o.Z)(r,i.SECOND,1),r);function h(e){var n=i.SECOND,t=e;return e%86400===0?(t/=86400,n=i.DAY):e%3600===0?(t/=3600,n=i.HOUR):e%60===0&&(t/=60,n=i.MINUTE),{time:t,unit:n}}function m(e,n){return e*f[n]}},82635:function(e,n,t){"use strict";var r,i;t.d(n,{Gi:function(){return i},jU:function(){return u},uF:function(){return r}}),function(e){e.BUSY="busy",e.IDLE="idle",e.QUEUED="queued"}(r||(r={})),function(e){e.IMAGE_PNG="image/png",e.PROGRESS="progress",e.TABLE="table",e.TEXT="text",e.TEXT_HTML="text/html",e.TEXT_PLAIN="text/plain"}(i||(i={}));var o,u=[i.TEXT,i.TEXT_PLAIN];!function(e){e.DISPLAY_DATA="display_data",e.STATUS="status",e.STREAM="stream",e.STREAM_PIPELINE="stream_pipeline"}(o||(o={}))},47409:function(e,n,t){"use strict";t.d(n,{D:function(){return u},V:function(){return o}});var r,i=t(82394),o=t(66050).V,u=(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)},23588:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return L}});var r=t(77837),i=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),a=t(83455),s=t(27125),d=t(60328),p=t(34744),f=t(87372),h=t(2626),m=t(47409),v=t(41788),g=t(86673),b=t(82531),y=t(26304),x=t(62976),O=t(86532),j=t(67971),w=t(54283),Z=t(19711),P=t(82635),E=t(64155),k=t(19395),_=t(90211),S=t(28598),D=["blockRuns","columns","dataType","height","heightOffset","loadingData","pipeline","renderColumnHeader","rows","selectedRun","textData"];function I(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?I(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=t(59920),N=t(49125),R=t(96510),H=t(66653);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 A(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,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function B(e){var n,t=e.pipeline,r=e.pipelineRun,o=(0,c.useState)(),u=o[0],l=o[1],v=(0,c.useState)(null),I=v[0],M=v[1],B=t.uuid,L=b.ZP.pipelines.detail(B,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,U=(0,c.useMemo)((function(){return A(A({},null===L||void 0===L?void 0:L.pipeline),{},{uuid:B})}),[L,B]),V=b.ZP.pipeline_runs.detail(r.id,{},{refreshInterval:3e3,revalidateOnFocus:!0}).data,F=(0,c.useMemo)((function(){return null===V||void 0===V?void 0:V.pipeline_run}),[V]),G=(0,a.Db)(b.ZP.pipeline_runs.useUpdate(null===F||void 0===F?void 0:F.id),{onSuccess:function(e){return(0,R.wD)(e,{onErrorCallback:function(e,n){return M({errors:n,response:e})}})}}),X=(0,i.Z)(G,2),W=X[0],q=X[1].isLoading,J=b.ZP.outputs.block_runs.list(null===u||void 0===u?void 0:u.id),Y=J.data,z=J.loading,K=(null===Y||void 0===Y||null===(n=Y.outputs)||void 0===n?void 0:n[0])||{},Q=K.sample_data,$=K.text_data,ee=K.type,ne=(0,c.useMemo)((function(){return null===F||void 0===F?void 0:F.block_runs}),[F]),te=((null===Q||void 0===Q?void 0:Q.columns)||[]).slice(0,40),re=(null===Q||void 0===Q?void 0:Q.rows)||[],ie=(0,c.useMemo)((function(){return(0,S.jsx)(s.Z,{blockRuns:ne,onClickRow:function(e){return l((function(n){var t=ne[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipeline:U,selectedRun:u})}),[ne,U,u]);return(0,S.jsxs)(h.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(B,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return null===F||void 0===F?void 0:F.execution_date}}],buildSidekick:function(e){return function(e){var n=e.blockRuns,t=e.columns,r=e.dataType,i=e.height,o=e.heightOffset,u=e.loadingData,l=e.pipeline,c=e.renderColumnHeader,a=e.rows,s=e.selectedRun,d=e.textData,p=C({},(0,y.Z)(e,D));p.blockStatus=(0,k.IJ)(n);var h=(0,S.jsx)(g.Z,{ml:2,children:(0,S.jsx)(Z.ZP,{children:"This block run has no output."})}),m=a&&a.length>0?(0,S.jsx)(x.Z,{columnHeaderHeight:c?E.Eh:0,columns:t,height:i-o-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:c,rows:a}):h,v=(0,_.Pb)(d)?JSON.stringify(JSON.parse(d),null,2):d,b=d?(0,S.jsx)(g.Z,{ml:2,children:(0,S.jsx)(Z.ZP,{monospace:!0,children:(0,S.jsx)("pre",{children:v})})}):h;return(0,S.jsxs)(S.Fragment,{children:[!s&&(0,S.jsx)(O.Z,C(C({},p),{},{height:i,heightOffset:o||0,pipeline:l})),s&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(g.Z,{pl:2,py:3,style:{position:"fixed"},children:(0,S.jsx)(f.Z,{level:4,muted:!0,children:"Block Output"})}),(0,S.jsxs)("div",{style:{position:"relative",top:"75px"},children:[u&&(0,S.jsx)(g.Z,{mt:2,children:(0,S.jsx)(j.Z,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,S.jsx)(w.Z,{color:"white",large:!0})})}),!u&&r===P.Gi.TABLE&&m,!u&&r!==P.Gi.TABLE&&b]})]})]})}(A(A({},e),{},{blockRuns:ne,columns:te,dataType:ee,loadingData:z,rows:re,selectedRun:u,showDynamicBlocks:!0,textData:$}))},errors:I,pageName:T.M.RUNS,pipeline:U,setErrors:M,subheader:(null===F||void 0===F?void 0:F.status)&&F.status!==m.V.COMPLETED&&(0,S.jsx)(d.Z,{danger:!0,loading:q,onClick:function(e){(0,H.j)(e),W({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(T.M.RUNS,"_").concat(B,"_").concat(null===F||void 0===F?void 0:F.id),children:[(0,S.jsx)(g.Z,{mt:N.cd,px:N.cd,children:(0,S.jsx)(f.Z,{level:5,children:"Block runs"})}),(0,S.jsx)(p.Z,{light:!0,mt:N.cd,short:!0}),ie]})}B.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query,r=t.pipeline,i=t.run,e.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var L=(0,v.Z)(B)},39525:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return t(23588)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2125,9767,3573,434,1830,2626,4463,6532,1286,9774,2888,179],(function(){return n=39525,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([[244],{59739:function(e,n,t){"use strict";var i=t(56669);function r(){}function u(){}u.resetWarningCache=r,e.exports=function(){function e(e,n,t,r,u,o){if(o!==i){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:u,resetWarningCache:r};return t.PropTypes=t,t}},47329:function(e,n,t){e.exports=t(59739)()},56669:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},27125:function(e,n,t){"use strict";var i=t(82684),r=t(12691),u=t.n(r),o=t(34376),l=t.n(o),c=t(9518),s=t(66050),a=t(60328),d=t(16634),p=t(10919),f=t(98781),v=t(86673),h=t(87815),b=t(19711),g=t(10503),m=t(49125),x=t(44162),j=t(24224),_=t(28598);n.Z=function(e){var n=e.blockRuns,t=e.onClickRow,r=e.pipeline,o=e.selectedRun,y=(0,i.useContext)(c.ThemeContext),Z=(r||{}).uuid,O=(0,i.useMemo)((function(){return r.blocks||[]}),[r]),w=(0,i.useMemo)((function(){return(0,j.HK)(O,(function(e){return e.uuid}))}),[O]);return(0,_.jsx)(h.Z,{columnFlex:[null,1,3,2,null,null],columns:[{uuid:"Date"},{uuid:"Status"},{uuid:"Trigger"},{uuid:"Block"},{uuid:"Completed"},{uuid:"Logs"}],isSelectedRow:function(e){return n[e].id===(null===o||void 0===o?void 0:o.id)},onClickRow:t,rows:null===n||void 0===n?void 0:n.map((function(e){var n,t,i,o,c=e.block_uuid,h=e.completed_at,j=e.created_at,O=e.id,P=e.pipeline_schedule_id,k=e.pipeline_schedule_name,C=e.status,I=c,S=I.split(":");f.q.INTEGRATION===r.type&&(I=S[0],i=S[1],o=S[2]);var T=w[I];return T||(T=w[S[0]]),[(0,_.jsx)(b.ZP,{monospace:!0,default:!0,children:j}),(0,_.jsx)(b.ZP,{danger:s.V.FAILED===C,default:s.V.CANCELLED===C,info:s.V.INITIAL===C,monospace:!0,success:s.V.COMPLETED===C,warning:s.V.RUNNING===C,children:C}),(0,_.jsx)(u(),{as:"/pipelines/".concat(Z,"/triggers/").concat(P),href:"/pipelines/[pipeline]/triggers/[...slug]",passHref:!0,children:(0,_.jsx)(p.Z,{bold:!0,sameColorAsText:!0,children:k})}),(0,_.jsx)(u(),{as:"/pipelines/".concat(Z,"/edit?block_uuid=").concat(I),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,_.jsxs)(p.Z,{bold:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,_.jsx)(d.Z,{color:(0,x.qn)(null===(n=T)||void 0===n?void 0:n.type,{blockColor:null===(t=T)||void 0===t?void 0:t.color,theme:y}).accent,size:1.5*m.iI,square:!0}),(0,_.jsx)(v.Z,{mr:1}),(0,_.jsxs)(b.ZP,{monospace:!0,children:[I,i&&": ",i&&(0,_.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:i}),o>=0&&": ",o>=0&&(0,_.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:o})]})]})}),(0,_.jsx)(b.ZP,{monospace:!0,default:!0,children:h||"-"}),(0,_.jsx)(a.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return l().push("/pipelines/".concat(Z,"/logs?block_run_id[]=").concat(O))},children:(0,_.jsx)(g.B4,{default:!0,size:2*m.iI})})]})),uuid:"block-runs"})}},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return j},Z:function(){return _}});var i=t(75582),r=t(82394),u=t(26304),o=t(32316),l=t(22673),c=t(86532),s=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),v=t(28598),h=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function b(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?b(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var m={uuid:"Run details"},x={uuid:"Dependency tree"},j=[x,m];function _(e){var n=e.height,t=e.heightOffset,r=e.pipeline,b=e.selectedRun,_=e.selectedTab,y=e.setSelectedTab,Z=g({},(0,u.Z)(e,h));b?Z.blockStatus=(0,f.IJ)(null===b||void 0===b?void 0:b.block_runs):Z.noStatus=!0;var O=(null===b||void 0===b?void 0:b.variables)||{};null!==b&&void 0!==b&&b.event_variables&&(O.event=b.event_variables);var w=[];O&&JSON.stringify(O,null,2).split("\n").forEach((function(e){w.push(" ".concat(e))}));var P=b&&[["Run ID",null===b||void 0===b?void 0:b.id],["Variables",(0,v.jsx)(l.Z,{language:"json",small:!0,source:w.join("\n")})]],k=b&&(0,v.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,v.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:P.map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,v.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,v.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:r})]})),uuid:"LogDetail"})}),C=_&&y;return(0,v.jsxs)(v.Fragment,{children:[C&&(0,v.jsx)(s.Z,{py:p.cd,children:(0,v.jsx)(o.Z,{onClickTab:y,selectedTabUUID:null===_||void 0===_?void 0:_.uuid,tabs:j})}),(!C||x.uuid===(null===_||void 0===_?void 0:_.uuid))&&(0,v.jsx)(c.Z,g(g({},Z),{},{height:n,heightOffset:(t||0)+(C?76:0),pipeline:r})),m.uuid===(null===_||void 0===_?void 0:_.uuid)&&k]})}},22673:function(e,n,t){"use strict";var i=t(82684),r=t(73199),u=t.n(r),o=t(71593),l=t(9518),c=t(65292),s=t(23831),a=t(2005),d=t(49125),p=t(28598);n.Z=function(e){var n=e.language,t=e.maxWidth,r=e.showLineNumbers,f=e.small,v=e.source,h=e.wrapLines,b=(0,i.useContext)(l.ThemeContext);return(0,p.jsx)(u(),{source:v,renderers:{code:function(e){var i=e.value;return(0,p.jsx)(o.Z,{customStyle:{backgroundColor:(b.background||s.Z.background).popup,border:"none",borderRadius:"none",boxShadow:"none",fontFamily:a.Vp,fontSize:f?12:14,marginBottom:0,marginTop:0,paddingBottom:2*d.iI,paddingTop:2*d.iI,maxWidth:t},lineNumberStyle:{color:(b.content||s.Z.content).muted},language:n,showLineNumbers:r,style:c._4,useInlineStyles:!0,wrapLines:h,children:i})}}})}},32316:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var i=t(82684),r=t(60328),u=t(67971),o=t(882),l=t(86673),c=t(99994),s=t(9518),a=t(49125),d=t(37391),p=s.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],a.cd*a.iI,a.cd*a.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),d.w5),f=t(66653),v=t(28598);var h=function(e){var n=e.allowScroll,t=e.contained,s=e.noPadding,d=e.onClickTab,h=e.selectedTabUUID,b=e.small,g=e.tabs,m=(0,i.useMemo)((function(){var e=g.length,n=[];return g.forEach((function(t,i){var s=t.Icon,p=t.IconSelected,g=t.label,m=t.uuid,x=m===h,j=x&&p||s,_=g?g():m,y=(0,v.jsxs)(u.Z,{alignItems:"center",children:[j&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j,{default:!x,size:2*a.iI}),(0,v.jsx)(l.Z,{mr:1})]}),_]});i>=1&&e>=2&&n.push((0,v.jsx)("div",{style:{marginLeft:1.5*a.iI}},"spacing-".concat(m))),x?n.push((0,v.jsx)(o.Z,{backgroundGradient:c.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:b,onClick:function(e){(0,f.j)(e),d(t)},paddingUnitsHorizontal:2,paddingUnitsVertical:1.25,small:b,children:y},m)):n.push((0,v.jsx)("div",{style:{padding:4},children:(0,v.jsx)(r.Z,{borderLess:!0,compact:b,default:!0,onClick:function(e){(0,f.j)(e),d(t)},outline:!0,small:b,children:y},"button-tab-".concat(m))}))})),n}),[d,h,g]),x=(0,v.jsx)(u.Z,{alignItems:"center",children:m});return t?x:(0,v.jsx)(p,{allowScroll:n,noPadding:s,children:x})}},77980:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return V}});var i=t(77837),r=t(82394),u=t(38860),o=t.n(u),l=t(82684),c=t(34376),s=t(16953),a=t(27125),d=t(32316),p=t(67971),f=t(9518),v=t(23831),h=f.default.div.withConfig({displayName:"PageSectionHeader",componentId:"sc-1wznrcv-0"})(["left:0;position:sticky;top:0;width:100%;z-index:2;",""],(function(e){return"\n background-color: ".concat(e.backgroundColor||(e.theme.background||v.Z.background).page,";\n border-bottom: 1px solid ").concat((e.theme.borders||v.Z.borders).medium,";\n ")})),b=t(51099),g=t(2626),m=t(28598);var x=function(e){var n=e.size;return(0,m.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,m.jsx)("g",{"clip-path":"url(#clip0_3007_70027)",children:(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75 6.6859C1.75 3.95988 3.95988 1.75 6.6859 1.75h.98788c-.23022.41608-.36128.89466-.36128 1.40385s.13106.98777.36128 1.40384h-.71224c-1.32761 0-2.40385 1.07624-2.40385 2.40385 0 1.32761 1.07624 2.40385 2.40385 2.40385H15.609c3.3916 0 6.141 2.74941 6.141 6.14101 0 3.3916-2.7494 6.141-6.141 6.141H9.55584c.23019-.416.36123-.8946.36123-1.4037 0-.5092-.13108-.9879-.36134-1.404H15.609c1.8409 0 3.3333-1.4923 3.3333-3.3333 0-1.8409-1.4924-3.3333-3.3333-3.3333H6.96154C4.08329 12.1731 1.75 9.83979 1.75 6.96154V6.6859zM10.2163.25H6.6859C3.13145.25.25 3.13145.25 6.6859v.27564c0 3.70666 3.00486 6.71156 6.71154 6.71156H15.609c1.0125 0 1.8333.8208 1.8333 1.8333s-.8208 1.8333-1.8333 1.8333H7.01282c-1.60375 0-2.90385 1.3001-2.90385 2.9039 0 1.3248.88713 2.4423 2.09974 2.7911.06039.0173.12158.0328.18352.0463.20007.0436.40785.0665.62099.0665l.02449-.0001H15.609c4.22 0 7.641-3.421 7.641-7.641 0-4.22-3.421-7.64101-7.641-7.64101H6.96154c-.49918 0-.90385-.40467-.90385-.90385 0-.49918.40467-.90385.90385-.90385h3.25636c1.6038 0 2.9039-1.30009 2.9039-2.90384 0-1.60375-1.3001-2.903849-2.9039-2.90385h-.0016zm0 4.30769c-.77528 0-1.4038-.62852-1.4038-1.40384 0-.77505.62808-1.4034 1.403-1.40385h.0017c.7749.00045 1.403.6288 1.403 1.40385 0 .77532-.6285 1.40384-1.4039 1.40384zM7.01282 21.6474c-.10108 0-.19967-.0106-.29469-.0309-.03025-.0065-.06014-.0139-.08963-.0223-.58829-.1673-1.01912-.7086-1.01912-1.3505 0-.7753.62852-1.4039 1.40384-1.4039s1.40385.6286 1.40385 1.4039c0 .7696-.61935 1.3946-1.38683 1.4037h-.01742z",fill:"url(#paint0_linear_3007_70027)"})}),(0,m.jsxs)("defs",{children:[(0,m.jsxs)("linearGradient",{id:"paint0_linear_3007_70027",x1:"11.75",y1:".250001",x2:"11.75",y2:"23.1475",gradientUnits:"userSpaceOnUse",children:[(0,m.jsx)("stop",{offset:".28125",stopColor:"#7D55EC"}),(0,m.jsx)("stop",{offset:"1",stopColor:"#2AB2FE"})]}),(0,m.jsx)("clipPath",{id:"clip0_3007_70027",children:(0,m.jsx)("path",{fill:"#fff",transform:"matrix(0 1 1 0 0 0)",d:"M0 0h24v24H0z"})})]})]})},j=t(47409),_=t(97496),y=t(41788),Z=t(55378),O=t(86673),w=t(82531),P=t(56681),k=t(66166),C=t(10503),I=t(59920),S=t(66050),T=t(49125),R=t(33766),E=t(7715),N=t(59e3);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 M(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 H={Icon:C.mR,IconSelected:x,label:function(){return"Pipeline runs"},uuid:"pipeline_runs"},L={Icon:C.Re,IconSelected:s.Z,label:function(){return"Block runs"},uuid:"block_runs"},U=[H,L];function z(e){var n=e.pipeline,t=(0,c.useRouter)(),i=(0,l.useState)(null),r=i[0],u=i[1],o=(0,l.useState)(H),s=o[0],f=o[1],v=(0,l.useState)(P.G[0]),x=v[0],y=v[1],C=(0,l.useState)(null),D=C[0],z=C[1],V=n.uuid,F=w.ZP.pipelines.detail(V,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,A=(0,l.useMemo)((function(){return M(M({},null===F||void 0===F?void 0:F.pipeline),{},{uuid:V})}),[F,V]),B=w.ZP.block_runs.list((0,E.gR)(D,["tab"]),{},{pauseFetch:!D}).data,W=(0,l.useMemo)((function(){return(null===B||void 0===B?void 0:B.block_runs)||[]}),[B]),G=(0,l.useState)(),q=G[0],X=G[1],J=(0,N.iV)(),K=(0,k.Z)(J);(0,l.useEffect)((function(){var e=J.pipeline_run_id,n=J.status;if(!(0,E.Xy)(J,K)){var t=M(M({},K),J);e?t.pipeline_run_id=e:t.pipeline_uuid=V,n?t.status=n:delete t.status,z(t)}}),[V,J,K]);var Y={_limit:25,_offset:25*(null!==J&&void 0!==J&&J.page?J.page:0),pipeline_uuid:V};null!==J&&void 0!==J&&J.status&&(Y.status=J.status);var Q=w.ZP.pipeline_runs.list(Y,{refreshInterval:5e3}),$=Q.data,ee=Q.mutate,ne=(0,l.useMemo)((function(){return(null===$||void 0===$?void 0:$.pipeline_runs)||[]}),[$]),te=(0,l.useMemo)((function(){var e;return(null===$||void 0===$||null===(e=$.metadata)||void 0===e?void 0:e.count)||[]}),[$]),ie=(0,k.Z)(s);(0,l.useEffect)((function(){var e=J.tab;e&&f(U.find((function(n){return n.uuid===e})))}),[J,s,ie]);var re=(0,l.useMemo)((function(){var e=null!==J&&void 0!==J&&J.page?J.page:0;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(_.Z,{fetchPipelineRuns:ee,onClickRow:function(e){return X((function(n){var t=ne[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ne,selectedRun:q,setErrors:u}),(0,m.jsx)(O.Z,{p:2,children:(0,m.jsx)(b.Z,{maxPages:9,onUpdate:function(e){var n=Number(e),i=M(M({},J),{},{page:n>=0?n:0});t.push("/pipelines/[pipeline]/runs","/pipelines/".concat(V,"/runs?").concat((0,N.uM)(i)))},page:Number(e),totalPages:Math.ceil(te/25)})})]})}),[ee,A,ne,J,q,te]),ue=(0,l.useMemo)((function(){return(0,m.jsx)(a.Z,{blockRuns:W,pipeline:A})}),[W,A]);return(0,m.jsxs)(g.Z,{afterHidden:H.uuid===(null===s||void 0===s?void 0:s.uuid)&&!q,breadcrumbs:[{label:function(){return"Runs"}}],buildSidekick:H.uuid===(null===s||void 0===s?void 0:s.uuid)?function(e){return(0,P.Z)(M(M({},e),{},{selectedRun:q,selectedTab:x,setSelectedTab:y}))}:function(e){return(0,P.Z)(e)},errors:r,pageName:I.M.RUNS,pipeline:A,setErrors:u,title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"".concat(I.M.RUNS,"_").concat(V),children:[(0,m.jsx)(h,{children:(0,m.jsx)(O.Z,{py:1,children:(0,m.jsxs)(p.Z,{alignItems:"center",children:[(0,m.jsx)(d.Z,{onClickTab:function(e){var n=e.uuid;z(null),(0,R.u)({tab:n},{replaceParams:!0})},selectedTabUUID:null===s||void 0===s?void 0:s.uuid,tabs:U}),H.uuid===(null===s||void 0===s?void 0:s.uuid)&&(0,m.jsxs)(Z.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?(z(null),(0,R.u)({tab:H.uuid},{replaceParams:!0})):(0,R.u)({page:0,status:e.target.value})},paddingRight:4*T.iI,placeholder:"Select run status",value:null===D||void 0===D?void 0:D.status,children:[(0,m.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(S.V).map((function(e){return(0,m.jsx)("option",{value:e,children:j.D[e]},e)}))]})]})})}),H.uuid===(null===s||void 0===s?void 0:s.uuid)&&re,L.uuid===(null===s||void 0===s?void 0:s.uuid)&&ue]})}z.getInitialProps=function(){var e=(0,i.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 V=(0,y.Z)(z)},79897:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs",function(){return t(77980)}])}},function(e){e.O(0,[3850,2083,4804,1774,2524,9767,3573,434,9898,1830,2626,4463,6532,4846,9774,2888,179],(function(){return n=79897,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],{45838:function(n,e,t){"use strict";t.d(e,{GZ:function(){return a},Vq:function(){return s},cE:function(){return f},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(n){return n.minHeight&&"\n min-height: ".concat(n.minHeight,"px;\n ")}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),u=r.default.table.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-1wzfyed-1"})(["contain:size;width:100%;",""],(function(n){return(n.columnBorders||n.borderCollapseSeparate)&&"\n border-collapse: separate;\n "})),s=r.default.tr.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-1wzfyed-2"})([""," ",""],(function(n){return n.highlightOnHover&&"\n &:hover {\n background: ".concat((n.theme.interactive||o.Z.interactive).rowHoverBackground,";\n }\n ")}),(function(n){return!n.noHover&&"\n &:hover {\n background: ".concat((n.theme.interactive||o.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")})),d=(0,r.css)(["text-overflow:ellipsis;white-space:nowrap;"," "," "," "," "," ",""],(function(n){return!n.alignTop&&"\n vertical-align: middle;\n "}),(function(n){return n.alignTop&&"\n vertical-align: top;\n "}),(function(n){return!n.noBorder&&"\n border-bottom: 1px solid ".concat((n.theme.borders||o.Z.borders).light,";\n ")}),(function(n){return n.compact&&"\n padding: ".concat(c.iI/2,"px ").concat(c.iI,"px;\n ")}),(function(n){return!n.compact&&"\n padding: ".concat(c.iI,"px ").concat(2*c.iI,"px;\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,";\n ")})),a=r.default.th.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-1wzfyed-3"})([""," "," "," ",""],d,(function(n){return n.columnBorders&&"\n border: 1px solid ".concat((n.theme.borders||o.Z.borders).light,";\n border-right: none;\n ")}),(function(n){return n.columnBorders&&n.last&&"\n border-right: 1px solid ".concat((n.theme.borders||o.Z.borders).light,";\n ")}),(function(n){return n.sticky&&"\n background-color: ".concat((n.theme||o.Z).background.panel,";\n border-bottom: 1px solid ").concat((n.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 ")})),f=r.default.td.withConfig({displayName:"indexstyle__TableDataStyle",componentId:"sc-1wzfyed-4"})([""," "," "," "," "," "," ",""],d,(function(n){return n.rowVerticalPadding&&"\n padding-top: ".concat(n.rowVerticalPadding,"px;\n padding-bottom: ").concat(n.rowVerticalPadding,"px;\n ")}),(function(n){return n.columnBorders&&"\n border-left: 1px solid ".concat((n.theme.borders||o.Z.borders).light,";\n ")}),(function(n){return n.columnBorders&&n.last&&"\n border-right: 1px solid ".concat((n.theme.borders||o.Z.borders).light,";\n ")}),(function(n){return n.stickyFirstColumn&&"\n background-color: ".concat((n.theme||o.Z).background.panel,";\n z-index: 1;\n position: sticky;\n left: 0;\n ")}),(function(n){return n.selected&&"\n background-color: ".concat((n.theme.interactive||o.Z.interactive).activeBorder,";\n ")}),(function(n){return n.wrapColumns&&"\n white-space: break-spaces;\n "}))},87815:function(n,e,t){"use strict";var r=t(82394),o=t(12691),i=t.n(o),c=t(82684),l=t(67971),u=t(10919),s=t(86673),d=t(19711),a=t(46261),f=t(45838),p=t(28598);function m(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function v(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?m(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}e.Z=function(n){var e=n.alignTop,t=n.borderCollapseSeparate,r=n.buildLinkProps,o=n.columnBorders,m=n.columnFlex,h=n.columnMaxWidth,b=n.columns,x=void 0===b?[]:b,g=n.compact,j=n.highlightRowOnHover,Z=n.isSelectedRow,y=n.noBorder,k=n.noHeader,w=n.onClickRow,I=n.rows,_=n.rowVerticalPadding,P=n.stickyFirstColumn,O=n.stickyHeader,N=n.uuid,E=n.wrapColumns,C=(0,c.useMemo)((function(){return m.reduce((function(n,e){return n+(e||0)}),0)}),m),M=(0,c.useCallback)((function(n){if(m[n]){var e=Math.round(m[n]/C*100);return"".concat(e,"%")}return null}),[]),S=(0,c.useMemo)((function(){return null===I||void 0===I?void 0:I.map((function(n,t){var l=null===r||void 0===r?void 0:r(t),s=n.map((function(r,i){return(0,p.jsx)(f.cE,{alignTop:e,columnBorders:o,compact:g,last:i===n.length-1,maxWidth:null===h||void 0===h?void 0:h(i),noBorder:y,rowVerticalPadding:_,selected:null===Z||void 0===Z?void 0:Z(t),stickyFirstColumn:P&&0===i,width:M(i),wrapColumns:E,children:r},"".concat(N,"-row-").concat(t,"-cell-").concat(i))})),d=(0,p.jsx)(f.Vq,{highlightOnHover:j,noHover:!(l||w),onClick:w?function(){return w(t)}:null,children:s},"".concat(N,"-row-").concat(t));return l?(0,c.createElement)(i(),v(v({},l),{},{key:"".concat(N,"-row-link-").concat(t),passHref:!0}),(0,p.jsx)(u.Z,{fullWidth:!0,noHoverUnderline:!0,noOutline:!0,style:{display:"table-row-group"},verticalAlignContent:!0,children:d})):d}))}),[e,r,M,h,x,g,Z,y,w,I]);return(0,p.jsxs)(f.kA,{borderCollapseSeparate:t,columnBorders:o,children:[(null===x||void 0===x?void 0:x.length)>=1&&!k&&(0,p.jsx)(f.Vq,{noHover:!0,children:x.map((function(n,e){return(0,p.jsx)(f.GZ,{columnBorders:o,compact:g,last:e===x.length-1,noBorder:y,sticky:O,children:(0,p.jsxs)(l.Z,{alignItems:"center",children:[(0,p.jsx)(d.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:n.label?n.label():n.uuid}),n.tooltipMessage&&(0,p.jsx)(s.Z,{ml:"4px",children:(0,p.jsx)(a.Z,{appearBefore:!0,label:(0,p.jsx)(d.ZP,{leftAligned:!0,children:n.tooltipMessage}),lightBackground:!0,primary:!0})})]})},"".concat(N,"-col-").concat(n.uuid,"-").concat(e))}))}),S]})}},66050:function(n,e,t){"use strict";var r;t.d(e,{V:function(){return r}}),function(n){n.CANCELLED="cancelled",n.COMPLETED="completed",n.FAILED="failed",n.INITIAL="initial",n.RUNNING="running"}(r||(r={}))},47409:function(n,e,t){"use strict";t.d(e,{D:function(){return c},V:function(){return i}});var r,o=t(82394),i=t(66050).V,c=(r={},(0,o.Z)(r,i.CANCELLED,"Cancelled"),(0,o.Z)(r,i.COMPLETED,"Done"),(0,o.Z)(r,i.FAILED,"Failed"),(0,o.Z)(r,i.INITIAL,"Ready"),(0,o.Z)(r,i.RUNNING,"Running"),r)},89745:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return cn}});var r=t(77837),o=t(38860),i=t.n(o),c=t(82684),l=t(2626),u=t(41788),s=t(75582),d=t(82394),a=t(93461),f=t(67971),p=t(87372),m=t(47409),v=t(86673),h=t(54283),b=t(19711),x=t(23831),g=t(10503),j=t(9518),Z=t(73942),y=t(2005),k=t(49125),w=t(31012),I=j.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-15svh8z-0"})(["border-radius:","px;margin:","px;overflow:hidden;"," "," "," "," "," "," &:hover{"," "," "," "," ","}"],Z.n_,k.cd*k.iI,(function(n){return"\n background-color: ".concat((n.theme.background||x.Z.background).panel,";\n border: 1px solid ").concat((n.theme.borders||x.Z.borders).dark,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(n){return n.selected&&n.danger&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.selected&&n.primary&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.selected&&n.default&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")}),(function(n){return n.selected&&n.success&&"\n border-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.selected&&n.warning&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")}),(function(n){return n.danger&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n border-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")}),(function(n){return n.success&&"\n border-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n border-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")})),_=(0,j.css)([""," "," "," "," ",""],(function(n){return n.danger&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).negative,";\n ")}),(function(n){return n.primary&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).linkPrimary,";\n ")}),(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).defaultBackground,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||x.Z.background).success,";\n ")}),(function(n){return n.warning&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).warning,";\n ")})),P=j.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-15svh8z-1"})([""," ",";border-radius:","px;display:inline-block;font-family:",";padding:6px;"," "," "," "," "," ",""],_,w.iD,Z.D7,y.ry,(function(n){return n.danger&&"\n color: ".concat((n.theme.content||x.Z.content).active,";\n ")}),(function(n){return n.primary&&"\n color: ".concat((n.theme.content||x.Z.content).active,";\n ")}),(function(n){return(n.default||n.success)&&"\n "}),(function(n){return n.default&&"\n color: ".concat((n.theme.content||x.Z.content).default,";\n ")}),(function(n){return n.success&&"\n color: ".concat((n.theme.content||x.Z.content).inverted,";\n ")}),(function(n){return n.warning&&"\n color: ".concat((n.theme.content||x.Z.content).inverted,";\n ")})),O=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-15svh8z-2"})([""," display:flex;height:auto;width:3px;",""],_,(function(n){return n.default&&"\n background-color: ".concat((n.theme.interactive||x.Z.interactive).focusBackground,";\n ")})),N=t(90211),E=t(92083),C=t.n(E),M=t(66050),S=t(24224);function V(n){var e;return Object.keys((null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{}).sort()}function D(n){var e,t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null,i=null,c=null,l=null,u={},d=(null===n||void 0===n?void 0:n.block_runs)||[],a=(null===n||void 0===n||null===(e=n.metrics)||void 0===e?void 0:e.blocks)||{},f=(null===n||void 0===n||null===(t=n.metrics)||void 0===t?void 0:t.pipeline)||{},p=L(n);return Object.entries(a).forEach((function(n){var e,t=(0,s.Z)(n,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,x=v.sources,g=void 0===x?{records:null}:x,j=p[d]||[];if(r&&r===d&&j.every((function(n){var e=n.status;return M.V.COMPLETED===e}))&&null===o&&(o=0),null!==f&&void 0!==f&&null!==(e=f[d])&&void 0!==e&&e.record_counts)null===o&&(o=0),o+=Number(null===f||void 0===f||null===(m=f[d])||void 0===m?void 0:m.record_counts);else null!==g&&void 0!==g&&g.records&&(null===o&&(o=0),o+=Number(g.records));null!==b&&void 0!==b&&b.records_updated?(null===c&&(c=0),c+=Number(b.records_updated),null===l&&(l=0),l+=Number(b.records_updated)):null!==b&&void 0!==b&&b.records_inserted?(null===c&&(c=0),c+=Number(b.records_inserted),null===i&&(i=0),i+=Number(b.records_inserted)):null!==b&&void 0!==b&&b.records_affected&&(null===c&&(c=0),c+=Number(b.records_affected)),["destinations","sources"].forEach((function(n){var e=a[n]||{};null!==e&&void 0!==e&&e.error&&(u[d]||(u[d]={}),u[d][n]={error:null===e||void 0===e?void 0:e.error,errors:null===e||void 0===e?void 0:e.errors,message:null===e||void 0===e?void 0:e.message})}))}})),null===d||void 0===d||d.forEach((function(n){var e=n.block_uuid,t=n.metrics,r=n.status;if(M.V.FAILED===r&&null!==t&&void 0!==t&&t.error&&e){var o=e.split(":"),i=(0,s.Z)(o,3),c=(i[0],i[1]);i[2];u[c]||(u[c]={}),u[c][""]=t.error}})),{errors:u,records:o,recordsInserted:i,recordsProcessed:c,recordsUpdated:l}}function L(n){var e=n.block_runs,t={};return null===e||void 0===e||e.forEach((function(n){var e=n.block_uuid.split(":"),r=(0,s.Z)(e,3),o=(r[0],r[1]);r[2];t[o]||(t[o]=[]),t[o].push(n)})),t}function A(n){var e=L(n),t={};return Object.entries(e).forEach((function(n){var e=(0,s.Z)(n,2),r=e[0],o=e[1],i=o.filter((function(n){var e=n.status;return M.V.COMPLETED===e})),c=i.map((function(n){var e=n.completed_at,t=n.started_at,r=C().utc(e),o=C().utc(t);return r.diff(o,"second")})),l=i.length,u=o.length;t[r]={completed:l,runtime:c.length>=1?(0,S.Sm)(c)/c.length:null,total:u}})),t}function T(n){var e=n.block_runs,t=(null===e||void 0===e?void 0:e.length)||1,r=function(n){var e=(null===n||void 0===n?void 0:n.block_runs)||[];return null===e||void 0===e?void 0:e.filter((function(n){var e=n.status;return M.V.COMPLETED===e}))}(n).length||0;return r/t}function R(n){var e=n.completed_at,t=n.block_runs,r=void 0===t?[]:t,o=n.status;if(null===r||void 0===r||!r.length)return 0;var i=C().utc();if(e)i=C().utc(e);else if([m.V.CANCELLED,m.V.FAILED].includes(o)){var c=(0,S.YC)(r,(function(n){return n.started_at}),{ascending:!1})[0];i=C().utc(c.updated_at)}var l=C().utc(n.created_at);return i.diff(l,"second")}function B(n,e){var t,r,o,i,c,l=L(n),u=A(n),s=(null===n||void 0===n?void 0:n.metrics)||{blocks:null,pipeline:null},d=s.blocks||{},a=s.pipeline||{},f=(d[e],a[e],u[e]||{completed:null,total:null}),p=f.completed,m=f.total,v=p&&m?p/m:0,h=l[e]||[],b=h.every((function(n){var e=n.status;return M.V.COMPLETED===e})),x=(0,S.YC)(h,(function(n){return n.updated_at}),{ascending:!1})[0],g=null===(t=(0,S.YC)(h,(function(n){return n.started_at}),{ascending:!0})[0])||void 0===t?void 0:t.started_at;b?r=null===(c=(0,S.YC)(h,(function(n){return n.completed_at}),{ascending:!1})[0])||void 0===c?void 0:c.completed_at:x&&(i=null===x||void 0===x?void 0:x.updated_at);var j=b?C().utc(r||i):C().utc(),Z=C().utc(g);return{completed:p,completedAt:r,done:b,progress:v,runtime:o=j.diff(Z,"second"),startedAt:g,status:null===x||void 0===x?void 0:x.status,timeText:(0,N.zf)(o),total:m,updatedAt:i}}var z=t(28598);function F(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function U(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?F(Object(t),!0).forEach((function(e){(0,d.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var H=function(n){var e=n.onSelect,t=n.pipelineRun,r=n.selected,o=(t.block_runs,t.created_at),i=t.status,l=(0,c.useMemo)((function(){return(null===t||void 0===t?void 0:t.metrics)||{blocks:{},destination:null,pipeline:{},source:null}}),[t]),u=((0,c.useMemo)((function(){return l.blocks||{}}),[l]),(0,c.useMemo)((function(){return l.pipeline||{}}),[l])),d=l.destination,j=l.source,Z=(0,c.useMemo)((function(){return Object.keys(u).length}),[u]),y=(0,c.useMemo)((function(){return D(t)}),[t]),w=y.errors,_=y.records,E=y.recordsProcessed,C=(0,c.useMemo)((function(){return T(t)}),[t]),M=(0,c.useMemo)((function(){return[m.V.COMPLETED].includes(i)}),[i]),S=(0,c.useMemo)((function(){return{danger:m.V.FAILED===i,default:m.V.INITIAL===i,primary:m.V.RUNNING===i,success:M,warning:m.V.CANCELLED===i}}),[M,i]),V=(0,c.useMemo)((function(){if(t){var n=R(t);return(0,N.zf)(n)}}),[t]);return(0,z.jsx)(I,U(U({},S),{},{onClick:function(){return e(r?null:t.id)},selected:r,children:(0,z.jsxs)(f.Z,{fullHeight:!0,justifyContent:"space-between",children:[(0,z.jsx)(O,U({},S)),(0,z.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,z.jsxs)(v.Z,{ml:3,py:3,children:[(0,z.jsx)(p.Z,{bold:!0,level:5,monospace:!0,children:o}),(0,z.jsx)(v.Z,{fullWidth:!1,mt:2,children:(0,z.jsx)(P,U(U({},S),{},{children:(0,z.jsxs)(f.Z,{alignItems:"center",children:[M&&(0,z.jsx)(g.Jr,{inverted:!0,size:2*k.iI}),[m.V.INITIAL,m.V.RUNNING].includes(i)&&(0,z.jsx)(h.Z,{color:m.V.INITIAL!==i?x.Z.monotone.white:null,inverted:m.V.INITIAL===i,small:!0}),"\xa0",m.V.RUNNING===i&&(0,z.jsxs)(z.Fragment,{children:["\xa0",Math.round(100*C),"%"]}),![m.V.INITIAL,m.V.RUNNING].includes(i)&&m.D[i],m.V.INITIAL===i&&"Starting"]})}))}),Object.values(w).length>=1&&(0,z.jsx)(v.Z,{mt:1,children:Object.entries(w).map((function(n,e){var t=(0,s.Z)(n,2),r=t[0];t[1];return(0,z.jsxs)(b.ZP,{monospace:!0,muted:!0,small:!0,children:[r," stream failed"]},r)}))})]})}),(0,z.jsxs)(a.Z,{flex:1,children:[(0,z.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,z.jsxs)(v.Z,{ml:3,py:3,children:[(0,z.jsxs)(v.Z,{mb:1,children:[(0,z.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows processed"}),(0,z.jsx)(b.ZP,{monospace:!0,children:E>=1?(0,N.x6)(E):"-"})]}),(0,z.jsxs)(v.Z,{mb:1,children:[(0,z.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Rows remaining"}),(0,z.jsx)(b.ZP,{monospace:!0,children:_>=1&&_>=E?(0,N.x6)(_-E):"-"})]}),m.V.RUNNING!==i&&(0,z.jsxs)(v.Z,{mb:1,children:[(0,z.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Runtime"}),(0,z.jsx)(b.ZP,{monospace:!0,children:V})]})]})}),(0,z.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,z.jsxs)(v.Z,{ml:3,py:3,children:[(0,z.jsxs)(v.Z,{mb:1,children:[(0,z.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Source"}),(0,z.jsx)(b.ZP,{monospace:!0,children:j||"-"})]}),(0,z.jsxs)(v.Z,{mb:1,children:[(0,z.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Destination"}),(0,z.jsx)(b.ZP,{monospace:!0,children:d||"-"})]}),(0,z.jsxs)(v.Z,{mb:1,children:[(0,z.jsx)(b.ZP,{bold:!0,muted:!0,small:!0,children:"Streams"}),(0,z.jsx)(b.ZP,{monospace:!0,children:Z>=1?(0,N.x6)(Z):"-"})]})]})})]})]})}))},G=t(89565),W=t.n(G),Y=t(34376),q=t(60328),J=t(10919),X=t(87815),K=j.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1thr560-0"})(["display:flex;flex:1;"," "," ",""],(function(n){return n.even&&n.fill&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).cyan,";\n ")}),(function(n){return n.even&&!n.fill&&"\n background-color: ".concat((n.theme.accent||x.Z.accent).cyanTransparent,";\n ")}),(function(n){return"\n height: ".concat((n.small?1:2)*k.iI,"px;\n ")})),Q=t(66653);var $=function(n){var e=n.onClickRow,t=n.pipelineRun,r=n.selectedStream,o=(0,Y.useRouter)(),i=(0,c.useState)(null),l=i[0],u=i[1],d=(0,c.useState)(null),a=d[0],h=d[1],x=(0,c.useMemo)((function(){return t?L(t):{}}),[t]),j=(0,c.useMemo)((function(){return t?A(t):{}}),[t]),Z=(0,c.useMemo)((function(){var n=0,e=[],t=[];if(Object.entries(j).forEach((function(r){var o=(0,s.Z)(r,2),i=(o[0],o[1]),c=i.completed,l=i.runtime,u=i.total;null===l?t.push(i):(e.push(l),n+=l*(u-c))})),0===e.length)return null;var r=(0,S.Sm)(e)/e.length;return t.forEach((function(e){var t=e.completed,o=e.total;n+=r*(o-t)})),n}),[j]),y=(0,c.useMemo)((function(){return r?j[r]:null}),[j,r]),w=(0,c.useMemo)((function(){if(r&&j){var n=j[r]||{},e=n.completed,o=n.total;if(o>=1)return e/o}else if(t)return T(t);return 0}),[y,t,r]),I=(0,c.useMemo)((function(){return(0,z.jsx)(f.Z,{children:(0,S.w6)(101).map((function(n,e){return(0,z.jsx)(K,{even:e%2===0,fill:w>0&&Math.round(100*w)>=e},e)}))})}),[w]),_=(0,c.useMemo)((function(){if(r){var n=x[r]||[],e=n.every((function(n){var e=n.status;return M.V.COMPLETED===e})),o=(0,S.YC)(n,(function(n){return n.updated_at}),{ascending:!1})[0],i=null===o||void 0===o?void 0:o.status,c=y||{},l=c.completed,u=c.runtime,s=c.total;if(e)return"Sync complete for ".concat(r);if([M.V.CANCELLED,M.V.FAILED].includes(i))return m.D[i];if(u&&s>=1){var d=Math.ceil(u*(s-l)/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"}),[x,Z,y,t,r]),P=(0,c.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,c.useEffect)((function(){var n;if(t){var e=R(t);u(e),n=setInterval((function(){return u((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t]),(0,c.useEffect)((function(){var n;if(t&&r&&P){var e=(null===P||void 0===P?void 0:P.runtime)||0;h(e),n=setInterval((function(){return h((function(n){return n+1}))}),1e3)}return function(){return clearInterval(n)}}),[t,r,P]);var O=(0,c.useMemo)((function(){if(t){if(r)return null===P||void 0===P?void 0:P.timeText;var n=R(t);return(0,N.zf)(n)}}),[t,r,P]),E=(0,c.useMemo)((function(){var n=Math.floor(l%86400/3600),e=Math.floor(l%3600/60),t=Math.floor(l%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[l]),C=(0,c.useMemo)((function(){var n=Math.floor(a%86400/3600),e=Math.floor(a%3600/60),t=Math.floor(a%60/1);return[n>=10?String(n):"0".concat(n),e>=10?String(e):"0".concat(e),t>=10?String(t):"0".concat(t)].join(":")}),[a]),F=(0,c.useMemo)((function(){return t?D(t):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t]),U=F.errors,H=F.records,G=F.recordsInserted,$=F.recordsProcessed,nn=F.recordsUpdated,en=(0,c.useMemo)((function(){return t&&r?D(t,r):{errors:null,records:null,recordsInserted:null,recordsProcessed:null,recordsUpdated:null}}),[t,r]),tn=(0,c.useMemo)((function(){var n=r?null===en||void 0===en?void 0:en.records:H,e=r?null===en||void 0===en?void 0:en.recordsInserted:G,t=r?null===en||void 0===en?void 0:en.recordsProcessed:$,o=r?null===en||void 0===en?void 0:en.recordsUpdated:nn,i=[{label:"Rows fetched",value:null===n?"-":(0,N.x6)(n)}];return null===e&&null===o?i.push({label:"Rows processed",value:null===t?"-":(0,N.x6)(t)}):null!==e?i.push({label:"Rows inserted",value:(0,N.x6)(e)}):null!==o&&i.push({label:"Rows updated",value:(0,N.x6)(o)}),i.map((function(n){var e=n.label,t=n.value;return(0,z.jsxs)("div",{children:[(0,z.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:e}),(0,z.jsx)(b.ZP,{headline:!0,children:t})]},e)}))}),[H,en,G,$,nn,O,E,status]),rn=(0,c.useMemo)((function(){if(!t)return(0,z.jsx)("div",{});var n=V(t);return(0,z.jsx)(X.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===n[e]},onClickRow:e,rows:n.map((function(n){var e=B(t,n),r=(e.completed,e.completedAt),i=e.done,c=e.progress,l=e.startedAt,u=e.status,s=e.timeText,d=(e.total,!!U[n]);return[(0,z.jsx)(b.ZP,{danger:d,default:!d,monospace:!0,children:n},"stream"),(0,z.jsx)(b.ZP,{default:!0,monospace:!0,children:l?l.split(".")[0]:"-"},"started_at"),(0,z.jsx)(b.ZP,{default:!0,monospace:!0,children:r?r.split(".")[0]:"-"},"completed_at"),(0,z.jsx)(b.ZP,{default:!0,children:[M.V.INITIAL,M.V.RUNNING].includes(u)?"-":s},"runtime"),(0,z.jsxs)("div",{children:[i&&(0,z.jsx)(g.Jr,{default:!0,size:2*k.iI}),!i&&(0,z.jsx)(f.Z,{children:(0,S.w6)(51).map((function(n,e){return(0,z.jsx)(K,{fill:c>0&&Math.round(50*c)>=e,even:e%2===0,small:!0},e)}))})]},"progress"),(0,z.jsx)(q.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(n){o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id)),(0,Q.j)(n)},children:(0,z.jsx)(g.B4,{default:!0,size:2*k.iI})},"logs")]})),uuid:"".concat(null===t||void 0===t?void 0:t.id,"-streams-table")})}),[U,j,t,r]),on=(0,c.useMemo)((function(){var n,e,o,i,c,l,u,d;if(t&&r){var a=(null===t||void 0===t?void 0:t.metrics)||{blocks:null,destination:null,pipeline:null,source:null},f=null===a||void 0===a||null===(n=a.pipeline)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.bookmarks)||void 0===o?void 0:o[r],p=null===a||void 0===a||null===(i=a.blocks)||void 0===i||null===(c=i[r])||void 0===c||null===(l=c.destinations)||void 0===l||null===(u=l.state)||void 0===u||null===(d=u.bookmarks)||void 0===d?void 0:d[r];if(f||p){var m=Array.from(new Set(Object.keys(f||{}).concat(Object.keys(p||{})))).sort(),v=[];m.forEach((function(n){var e=[(0,z.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[f,p].forEach((function(t,r){t&&e.push((0,z.jsx)(b.ZP,{monospace:!0,small:!0,children:t[n]},"".concat(n,"-").concat(r)))})),v.push(e)}));var h=[{label:function(){return""},uuid:"column"}];return[[null===a||void 0===a?void 0:a.source,"source",f],[null===a||void 0===a?void 0:a.destination,"destination",p]].forEach((function(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&h.push({uuid:"".concat(t," (").concat(r,")")})})),(0,z.jsx)(X.Z,{columnFlex:[null,1,1],columns:h,rows:v,uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),cn=(0,c.useMemo)((function(){var n,e,o,i,c,l;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===(n=u.blocks)||void 0===n||null===(e=n[r])||void 0===e||null===(o=e.sources)||void 0===o?void 0:o.record,a=null===u||void 0===u||null===(i=u.blocks)||void 0===i||null===(c=i[r])||void 0===c||null===(l=c.destinations)||void 0===l?void 0:l.record;if(d||a){var f=Object.keys(a||d||{}).sort(),p=[];f.forEach((function(n){var e=[(0,z.jsx)(b.ZP,{bold:!0,monospace:!0,muted:!0,small:!0,children:n},n)];[d,a].forEach((function(t,r){if(t){var o=t[n],i="object"===typeof o;e.push((0,z.jsxs)(b.ZP,{monospace:!0,small:!0,textOverflow:!0,whiteSpaceNormal:!0,wordBreak:!0,children:[i&&(0,z.jsx)("pre",{children:JSON.stringify(o,null,2)}),!i&&o]},"".concat(n,"-").concat(r)))}})),p.push(e)}));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(n){var e=(0,s.Z)(n,3),t=e[0],r=e[1];e[2]&&m.push({uuid:"".concat(t," (").concat(r,")")})})),(0,z.jsx)(X.Z,{columnFlex:[null,1,1],columns:m,rows:p.map((function(n){return n.map((function(n){return(0,z.jsx)(b.ZP,{default:!0,monospace:!0,children:n},n)}))})),uuid:"".concat(r,"-bookmark-table")})}}}),[t,r]),ln=(0,c.useMemo)((function(){var n,e,o,i,c,l,u=null===t||void 0===t||null===(n=t.metrics)||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e[r];return(null===u||void 0===u||null===(o=u.sources)||void 0===o||null===(i=o.block_tags)||void 0===i?void 0:i.destination_table)||(null===u||void 0===u||null===(c=u.destinations)||void 0===c||null===(l=c.block_tags)||void 0===l?void 0:l.destination_table)}),[t,r]);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(v.Z,{p:3,children:[r&&(0,z.jsx)(v.Z,{mb:3,children:(0,z.jsxs)(f.Z,{alignItems:"center",children:[(0,z.jsx)(J.Z,{block:!0,onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/syncs?pipeline_run_id=").concat(t.id))},preventDefault:!0,children:(0,z.jsxs)(f.Z,{alignItems:"center",children:[(0,z.jsx)(g.Xd,{default:!0,size:1.5*k.iI}),(0,z.jsx)(v.Z,{mr:1}),(0,z.jsx)(b.ZP,{default:!0,children:"Syncs"})]})}),(0,z.jsx)(v.Z,{mx:1,children:(0,z.jsx)(b.ZP,{default:!0,monospace:!0,children:"/"})}),(0,z.jsx)(b.ZP,{bold:!0,monospace:!0,children:r})]})}),(0,z.jsxs)(f.Z,{alignItems:"center",justifyContent:"space-between",children:[(0,z.jsx)(v.Z,{mr:2,my:1,children:(0,z.jsx)(p.Z,{level:5,muted:!t,children:_})}),t&&(0,z.jsx)(q.Z,{onClick:function(){return o.push("/pipelines/".concat(t.pipeline_uuid,"/logs?pipeline_run_id[]=").concat(t.id))},small:!0,children:"Logs"})]}),(0,z.jsx)(v.Z,{mt:2,children:I}),t&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(v.Z,{mt:3,children:(0,z.jsxs)(f.Z,{justifyContent:"space-between",children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(b.ZP,{bold:!0,large:!0,muted:!0,children:"Runtime"}),(0,z.jsxs)(b.ZP,{headline:!0,children:[r&&[M.V.INITIAL,M.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&C,r&&![M.V.INITIAL,M.V.RUNNING].includes(null===P||void 0===P?void 0:P.status)&&(null===P||void 0===P?void 0:P.timeText),!r&&[m.V.INITIAL,m.V.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&E,!r&&![m.V.INITIAL,m.V.RUNNING].includes(null===t||void 0===t?void 0:t.status)&&O]})]}),tn]})}),Object.values(U).length>=1&&(0,z.jsxs)(v.Z,{mt:3,children:[(0,z.jsx)(p.Z,{level:5,muted:!0,children:"Errors"}),Object.entries(U).map((function(n,e){var t=(0,s.Z)(n,2),o=t[0],i=t[1];return(!r||r===o)&&(0,z.jsx)(v.Z,{mt:e>=1?1:0,children:Object.entries(i).map((function(n){var e=(0,s.Z)(n,2),t=e[0],r=e[1],i=r.error,c=r.errors,l=r.message,u=Array.isArray(i)?i.join(" "):i;return(0,z.jsxs)("div",{children:[(0,z.jsx)(v.Z,{mb:l||(null===c||void 0===c?void 0:c.length)>=1?2:0,children:(0,z.jsxs)(b.ZP,{monospace:!0,preWrap:!0,textOverflow:!0,children:[o,!!t&&(0,z.jsxs)(b.ZP,{inline:!0,monospace:!0,muted:!0,children:["\xa0(",t,")"]}),": ",(0,z.jsx)(b.ZP,{default:!0,inline:!0,monospace:!0,children:u&&(0,z.jsx)(W(),{children:u})})]})}),(0,z.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:l}),c.map((function(n){return(0,z.jsx)(b.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:n},n)}))]},"".concat(o,"-").concat(t))}))},o)}))]})]})]}),t&&!r&&(0,z.jsx)(v.Z,{my:3,children:rn}),t&&r&&(0,z.jsxs)(z.Fragment,{children:[ln&&(0,z.jsx)(v.Z,{my:3,children:(0,z.jsxs)(v.Z,{px:3,children:[(0,z.jsx)(p.Z,{level:5,children:"Table name"}),(0,z.jsx)(v.Z,{mt:1,children:(0,z.jsx)(b.ZP,{default:!0,monospace:!0,children:ln})})]})}),on&&(0,z.jsxs)(v.Z,{my:3,children:[(0,z.jsx)(v.Z,{px:3,children:(0,z.jsx)(p.Z,{level:5,children:"Bookmarks"})}),(0,z.jsx)(v.Z,{px:1,children:on})]}),cn&&(0,z.jsxs)(v.Z,{my:3,children:[(0,z.jsx)(v.Z,{px:3,children:(0,z.jsx)(p.Z,{level:5,children:"Sample row"})}),(0,z.jsx)(v.Z,{px:1,children:cn})]})]})]})},nn=t(82531),en=t(59920),tn=t(33766),rn=t(59e3);function on(n){var e=n.pipeline,t=e.uuid,r=nn.ZP.pipeline_runs.list({_limit:20,_offset:0,pipeline_uuid:t},{refreshInterval:5e3}),o=r.data,i=(r.mutate,(0,c.useMemo)((function(){return(null===o||void 0===o?void 0:o.pipeline_runs)||[]}),[o])),u=(0,rn.iV)(),s=(0,c.useState)(null),d=s[0],a=s[1],f=(0,c.useState)(null),p=f[0],m=f[1];(0,c.useEffect)((function(){null!==u&&void 0!==u&&u.pipeline_run_id?m(null===i||void 0===i?void 0:i.find((function(n){return n.id===Number(u.pipeline_run_id)}))):p&&m(null),null!==u&&void 0!==u&&u.stream?a(u.stream):d&&a(null)}),[i,u,p,d]);var v=(0,c.useCallback)((function(){var n=p?V(p):[];return(0,z.jsx)($,{onClickRow:function(e){var t=n[e];(0,tn.u)({stream:d===t?null:t})},pipelineRun:p,selectedStream:d})}),[p,d]),h=(0,c.useMemo)((function(){var n="/pipelines/".concat(t,"/syncs");p&&(n="".concat(n,"?pipeline_run_id=").concat(p.id));var e=[{label:function(){return"Syncs"},linkProps:d?{as:n,href:"/pipelines/[pipeline]/syncs"}:null}];return d&&e.push({label:function(){return d}}),e}),[p,d]);return(0,z.jsx)(l.Z,{breadcrumbs:h,buildSidekick:v,pageName:en.M.SYNCS,pipeline:e,title:function(n){var e=n.name;return"".concat(e," syncs")},uuid:"".concat(en.M.SYNCS,"_").concat(t),children:i.map((function(n){var e=(null===p||void 0===p?void 0:p.id)===n.id;return(0,z.jsx)(H,{onSelect:function(n){return(0,tn.u)({pipeline_run_id:n,stream:null})},pipelineRun:n,selected:e},n.id)}))})}on.getInitialProps=function(){var n=(0,r.Z)(i().mark((function n(e){var t;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.query.pipeline,n.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();var cn=(0,u.Z)(on)},33766:function(n,e,t){"use strict";t.d(e,{u:function(){return d}});var r=t(75582),o=t(82394),i=t(34376),c=t.n(i),l=t(59e3);function u(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function s(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?u(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function d(n){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.replaceParams,i=t.pushHistory,u=o?{}:(0,l.iV)();e=window.location.pathname;var d=i?c().push:c().replace,a=s(s({},u),n);Object.entries(n).forEach((function(n){var e=(0,r.Z)(n,2),t=e[0],o=e[1];"undefined"!==typeof o&&null!==o||delete a[t]}));var f=(0,l.uM)(a);f.length>=1&&(f="?".concat(f));var p="".concat(e.split("?")[0]).concat(f);return d(c().router.pathname,p,{shallow:!0})}},59416:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/syncs",function(){return t(89745)}])}},function(n){n.O(0,[3850,2083,9565,9767,3573,434,1830,2626,9774,2888,179],(function(){return e=59416,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{90659:function(e,n,t){"use strict";var r=t(67403),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,o,l,c,s,u,a=!1;n||(n={}),t=n.debug||!1;try{if(l=r(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[n.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");a=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),a=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),o=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),l()}return a}},11984:function(e,n,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CopyToClipboard=void 0;var i=c(t(82684)),o=c(t(90659)),l=["text","onCopy","options","children"];function c(e){return e&&e.__esModule?e:{default:e}}function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){j(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,n){return f=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},f(e,n)}function h(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=v(e);if(n){var i=v(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return m(this,t)}}function m(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var x=function(e){!function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f(e,n)}(s,e);var n,t,r,c=h(s);function s(){var e;d(this,s);for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return j(g(e=c.call.apply(c,[this].concat(t))),"onClick",(function(n){var t=e.props,r=t.text,l=t.onCopy,c=t.children,s=t.options,u=i.default.Children.only(c),a=(0,o.default)(r,s);l&&l(r,a),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(n)})),e}return n=s,(t=[{key:"render",value:function(){var e=this.props,n=(e.text,e.onCopy,e.options,e.children),t=a(e,l),r=i.default.Children.only(n);return i.default.cloneElement(r,u(u({},t),{},{onClick:this.onClick}))}}])&&p(n.prototype,t),r&&p(n,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(i.default.PureComponent);n.CopyToClipboard=x,j(x,"defaultProps",{onCopy:void 0,options:void 0})},64866:function(e,n,t){"use strict";var r=t(11984).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},67403:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach((function(n){e.addRange(n)})),n&&n.focus()}}},2850:function(e,n,t){"use strict";t.d(n,{M:function(){return c},W:function(){return l}});var r=t(9518),i=t(23831),o=t(3055),l=34*t(49125).iI,c=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);",""],o.Mz,(function(e){return"\n border-left: 1px solid ".concat((e.theme.borders||i.Z.borders).medium,";\n ")}))},56681:function(e,n,t){"use strict";t.d(n,{G:function(){return b},Z:function(){return y}});var r=t(75582),i=t(82394),o=t(26304),l=t(32316),c=t(22673),s=t(86532),u=t(86673),a=t(19711),d=t(87815),p=t(49125),f=t(19395),h=t(28598),m=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function g(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?g(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var j={uuid:"Run details"},x={uuid:"Dependency tree"},b=[x,j];function y(e){var n=e.height,t=e.heightOffset,i=e.pipeline,g=e.selectedRun,y=e.selectedTab,Z=e.setSelectedTab,O=v({},(0,o.Z)(e,m));g?O.blockStatus=(0,f.IJ)(null===g||void 0===g?void 0:g.block_runs):O.noStatus=!0;var _=(null===g||void 0===g?void 0:g.variables)||{};null!==g&&void 0!==g&&g.event_variables&&(_.event=g.event_variables);var P=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){P.push(" ".concat(e))}));var w=g&&[["Run ID",null===g||void 0===g?void 0:g.id],["Variables",(0,h.jsx)(c.Z,{language:"json",small:!0,source:P.join("\n")})]],S=g&&(0,h.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:w.map((function(e){var n=(0,r.Z)(e,2),t=n[0],i=n[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:t}),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:i})]})),uuid:"LogDetail"})}),C=y&&Z;return(0,h.jsxs)(h.Fragment,{children:[C&&(0,h.jsx)(u.Z,{py:p.cd,children:(0,h.jsx)(l.Z,{onClickTab:Z,selectedTabUUID:null===y||void 0===y?void 0:y.uuid,tabs:b})}),(!C||x.uuid===(null===y||void 0===y?void 0:y.uuid))&&(0,h.jsx)(s.Z,v(v({},O),{},{height:n,heightOffset:(t||0)+(C?76:0),pipeline:i})),j.uuid===(null===y||void 0===y?void 0:y.uuid)&&S]})}},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return s},U:function(){return c}});var r=t(9518),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),s=r.default.div.withConfig({displayName:"indexstyle__DateSelectionContainer",componentId:"sc-m7tlau-1"})(["border-radius:","px;padding:","px;"," "," ",""],o.n_,l.tr,(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).defaultBackground,";\n ")}),(function(e){return e.absolute&&"\n position: absolute;\n z-index: 2;\n right: 0;\n top: ".concat(2.5*l.iI,"px;\n ")}),(function(e){return e.topPosition&&"\n top: -".concat(42*l.iI,"px;\n ")}))},2713:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(67971),l=t(55378),c=t(86673),s=t(19711),u=t(18025),a=t(49125),d=t(24224),p=t(28598);function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?f(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.selectedDate,t=e.selectedTime,r=e.setSelectedDate,f=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(u.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.Z,{alignItems:"center",children:[(0,p.jsx)(s.ZP,{default:!0,large:!0,children:"Time (UTC):"}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===t||void 0===t?void 0:t.hour,children:(0,d.m5)(24,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"hour_".concat(e))}))}),(0,p.jsx)(c.Z,{px:1,children:(0,p.jsx)(s.ZP,{bold:!0,large:!0,children:":"})}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),f((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===t||void 0===t?void 0:t.minute,children:(0,d.m5)(60,0).map((function(e){return String(e).padStart(2,"0")})).map((function(e){return(0,p.jsx)("option",{value:e,children:e},"minute_".concat(e))}))})]})]})}},54183:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ie}});var r,i=t(75582),o=t(77837),l=t(82394),c=t(38860),s=t.n(c),u=t(82684),a=t(83455),d=t(34376),p=t(60328),f=t(34744),h=t(67971),m=t(87372),g=t(51099),v=t(2626),j=t(97496),x=t(47409),b=t(93348),y=t(55378),Z=t(86673),O=t(87815),_=t(19711),P=t(46261),w=t(82531),S=t(56681),C=t(2850),I=t(10503),E=t(49125),k=t(59920),D=t(24224);!function(e){e.AWS="aws_event"}(r||(r={}));var T=[{label:function(){return"AWS"},uuid:r.AWS}],M=(0,D.HK)(T,(function(e){return e.uuid})),A=t(66050),R=t(58122),N=t(19395),U=t(33766),F=t(7715),H=t(9736),z=t(96510),q=t(66653),V=t(59e3),X=t(28598);function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var J=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,o=e.variables,l=(0,d.useRouter)(),c=(0,H.Ct)(),s=(0,u.useState)(null),D=s[0],T=s[1],L=(t||{}).uuid,J=r||{},B=J.id,G=J.event_matchers,K=J.name,Y=J.schedule_interval,Q=J.schedule_type,$=J.settings,ee=J.sla,ne=J.start_time,te=J.status,re=J.variables,ie=void 0===re?{}:re,oe=(0,V.iV)(),le={_limit:30,_offset:30*(null!==oe&&void 0!==oe&&oe.page?oe.page:0)};null!==oe&&void 0!==oe&&oe.status&&(le.status=oe.status);var ce=w.ZP.pipeline_runs.pipeline_schedules.list(B,le,{refreshInterval:3e3,revalidateOnFocus:!0}),se=ce.data,ue=ce.mutate,ae=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.pipeline_runs)||[]}),[se]),de=(0,u.useMemo)((function(){var e;return(null===se||void 0===se||null===(e=se.metadata)||void 0===e?void 0:e.count)||[]}),[se]),pe=(0,u.useState)(null),fe=pe[0],he=pe[1],me=(0,u.useMemo)((function(){var e=null!==oe&&void 0!==oe&&oe.page?oe.page:0;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(j.Z,{fetchPipelineRuns:ue,onClickRow:function(e){return he((function(n){var t=ae[e];return(null===n||void 0===n?void 0:n.id)!==t.id?t:null}))},pipelineRuns:ae,selectedRun:fe}),(0,X.jsx)(Z.Z,{p:2,children:(0,X.jsx)(g.Z,{page:Number(e),maxPages:9,onUpdate:function(e){var n=Number(e),t=W(W({},oe),{},{page:n>=0?n:0});l.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(L,"/triggers/").concat(B,"?").concat((0,V.uM)(t)))},totalPages:Math.ceil(de/30)})})]})}),[ue,t,ae,fe]),ge=(0,u.useState)(S.G[0]),ve=ge[0],je=ge[1],xe=(0,a.Db)((function(e){return w.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,F.gR)(e,["id"])})}),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(){n()},onErrorCallback:function(e,n){return T({errors:n,response:e})}})}}),be=(0,i.Z)(xe,2),ye=be[0],Ze=be[1].isLoading,Oe=(0,u.useMemo)((function(){return b.fq.ACTIVE===te}),[te]),_e=(0,u.useMemo)((function(){var e,n={default:!0,size:1.5*E.iI},t=[[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.VW,W({},n)),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,X.jsx)(_.ZP,{monospace:!0,children:null===(e=b.Z4[Q])||void 0===e?void 0:e.call(b.Z4)},"trigger_type")],[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.rs,W({},n)),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,X.jsx)(_.ZP,{danger:!Oe,monospace:!0,success:Oe,children:te},"trigger_status")]];if(ee){var r=(0,N.gU)(ee),i=r.time,o=r.unit,l=1===i?o:"".concat(o,"s");t.push([(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.kI,W({},n)),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,X.jsx)(_.ZP,{monospace:!0,children:"".concat(i," ").concat(l)},"trigger_sla")])}if(Y&&t.push([(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.Pf,W({},n)),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,X.jsx)(_.ZP,{monospace:!0,children:Y.replace("@","")},"trigger_frequency")]),ne&&t.push([(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.aw,W({},n)),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,X.jsx)(_.ZP,{monospace:!0,children:ne},"trigger_start_date")]),$){var c=$.skip_if_previous_running;c&&t.push([(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(P.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",widthFitContent:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running_label"),(0,X.jsx)(_.ZP,{monospace:!0,children:c.toString()},"trigger_skip_if_running")])}return(0,X.jsx)(O.Z,{columnFlex:[null,1],rows:t})}),[Oe,Y,$,ee,ne,Q]),Pe=(0,u.useMemo)((function(){return ie||{}}),[ie]),we=(0,u.useMemo)((function(){var e,n=[];return(0,F.Qr)(Pe)?n=(0,R.wx)(o,(function(e){return"global"===e.uuid})):Object.entries(Pe).forEach((function(e){var t=(0,i.Z)(e,2),r=t[0],o=t[1];n.push({uuid:r,value:(0,R.FS)(o)})})),"undefined"!==typeof(n=(0,R.JZ)(n||[],Q))&&null!==(e=n)&&void 0!==e&&e.length?(0,X.jsx)(O.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,t=e.value;return[(0,X.jsx)(_.ZP,{default:!0,monospace:!0,small:!0,children:n},"settings_variable_label_".concat(n)),(0,X.jsx)(_.ZP,{monospace:!0,small:!0,children:t},"settings_variable_".concat(n))]}))}):null}),[Q,ie,o]),Se=(0,u.useMemo)((function(){return(0,X.jsx)(O.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===G||void 0===G?void 0:G.map((function(e,n){var t=e.event_type,r=e.name;return[(0,X.jsx)(_.ZP,{default:!0,monospace:!0,children:M[t].label()},"".concat(t,"_").concat(n,"_label")),(0,X.jsx)(_.ZP,{monospace:!0,children:r},"".concat(t,"_").concat(n,"_name"))]}))})}),[G]);return(0,X.jsxs)(v.Z,{afterHidden:!fe,before:(0,X.jsxs)(C.M,{children:[(0,X.jsxs)(Z.Z,{mb:E.HN,pt:E.cd,px:E.cd,children:[(0,X.jsxs)(Z.Z,{mb:E.cd,children:[b.Xm.TIME===Q&&(0,X.jsx)(I.kO,{size:5*E.iI}),b.Xm.EVENT===Q&&(0,X.jsx)(I.Jp,{size:5*E.iI}),!Q&&(0,X.jsx)(I.VW,{size:5*E.iI})]}),(0,X.jsx)(m.Z,{children:K})]}),(0,X.jsx)(Z.Z,{px:E.cd,children:(0,X.jsx)(m.Z,{level:5,children:"Settings"})}),(0,X.jsx)(f.Z,{light:!0,mt:1,short:!0}),_e,(null===G||void 0===G?void 0:G.length)>=1&&(0,X.jsxs)(Z.Z,{my:E.HN,children:[(0,X.jsx)(Z.Z,{px:E.cd,children:(0,X.jsx)(m.Z,{level:5,children:"Events"})}),(0,X.jsx)(f.Z,{light:!0,mt:1,short:!0}),Se]}),we&&(0,X.jsxs)(Z.Z,{my:E.HN,children:[(0,X.jsx)(Z.Z,{px:E.cd,children:(0,X.jsx)(m.Z,{level:5,children:"Runtime variables"})}),(0,X.jsx)(f.Z,{light:!0,mt:1,short:!0}),we]})]}),beforeWidth:C.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(L,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return K},linkProps:{as:"/pipelines/".concat(L,"/triggers/").concat(B),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,S.Z)(W(W({},e),{},{selectedRun:fe,selectedTab:ve,setSelectedTab:je}))},errors:D,pageName:k.M.TRIGGERS,pipeline:t,setErrors:T,subheader:(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(p.Z,{beforeIcon:Oe?(0,X.jsx)(I.dz,{size:2*E.iI}):(0,X.jsx)(I.Py,{inverted:!c,size:2*E.iI}),danger:Oe&&!c,loading:Ze,onClick:function(e){(0,q.j)(e),ye({id:B,status:Oe?b.fq.INACTIVE:b.fq.ACTIVE})},outline:!0,success:!Oe&&!c,children:Oe?"Pause trigger":"Start trigger"}),(0,X.jsx)(Z.Z,{mr:E.cd}),!c&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(p.Z,{linkProps:{as:"/pipelines/".concat(L,"/triggers/").concat(B,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,X.jsx)(Z.Z,{mr:E.cd})]}),(0,X.jsxs)(y.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?l.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(L,"/triggers/").concat(B)):(0,U.u)({page:0,status:e.target.value})},paddingRight:4*E.iI,placeholder:"Select run status",value:(null===oe||void 0===oe?void 0:oe.status)||"all",children:[(0,X.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),Object.values(A.V).map((function(e){return(0,X.jsx)("option",{value:e,children:x.D[e]},e)}))]})]}),title:function(){return K},uuid:"triggers/detail",children:[(0,X.jsx)(Z.Z,{mt:E.cd,px:E.cd,children:(0,X.jsx)(m.Z,{level:5,children:"Runs for this trigger"})}),(0,X.jsx)(f.Z,{light:!0,mt:E.cd,short:!0}),me]})},B=t(21831),G=t(21764),K=t(2713),Y=t(38341),Q=t(47999),$=t(22673),ee=t(65730),ne=t(93461),te=t(10919),re=t(26304),ie=t(9518),oe=t(23831),le=t(2005),ce=t(31012),se=["children","large","lineHeight","ordered"];function ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var de=(0,ie.css)([""," "," "," "," "," "," "," "," "," ",""],(function(e){return!e.muted&&"\n color: ".concat((e.theme.content||oe.Z.content).default,";\n ")}),(function(e){return e.muted&&"\n color: ".concat((e.theme.content||oe.Z.content).muted,";\n ")}),(function(e){return e.inverted&&"\n color: ".concat((e.theme.content||oe.Z.content).inverted,";\n ")}),(function(e){return e.color&&"\n color: ".concat(e.color,";\n ")}),(function(e){return!e.monospace&&"\n font-family: ".concat(le.ry,";\n ")}),(function(e){return e.monospace&&"\n font-family: ".concat(le.Vp,";\n ")}),(function(e){return e.large&&"\n ".concat(ce.x_,"\n ")}),(function(e){return!e.large&&!e.small&&"\n ".concat(ce.i3,"\n ")}),(function(e){return e.small&&"\n ".concat(ce.J5,"\n ")}),(function(e){return e.lineHeight&&"\n line-height: ".concat(e.lineHeight,"px !important;\n ")})),pe=ie.default.ul.withConfig({displayName:"List__UnorderedListStyle",componentId:"sc-1f6yhbi-0"})(["",""],de),fe=ie.default.ol.withConfig({displayName:"List__OrderedListStyle",componentId:"sc-1f6yhbi-1"})(["",""],de),he=ie.default.li.withConfig({displayName:"List__ListItemStyle",componentId:"sc-1f6yhbi-2"})(["",""],(function(e){return e.large&&e.marginTop&&"\n margin-top: ".concat(1*E.iI,"px;\n ")}));var me=function(e){var n=e.children,t=e.large,r=e.lineHeight,i=e.ordered,o=(0,re.Z)(e,se),l=i?fe:pe;return(0,X.jsx)(l,ae(ae({large:t,lineHeight:r},o),{},{children:u.Children.map(n,(function(e,n){return(0,X.jsx)(he,ae(ae({large:t,marginTop:n>=1},o),{},{children:u.cloneElement(e)}),e.props.key)}))}))},ge=t(98781),ve=t(82944),je=t(70902),xe=t(18025);function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ye(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?be(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ze=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:b.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:b.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:b.Xm.API}];return e?n.slice(0,1):n};var Oe=function(e){var n=e.fetchPipelineSchedule,t=e.pipeline,r=e.pipelineSchedule,o=e.variables,c=(0,d.useRouter)(),s=null===t||void 0===t?void 0:t.uuid,g=null===r||void 0===r?void 0:r.id,j=(null===t||void 0===t?void 0:t.type)===ge.q.STREAMING,x=(0,u.useState)(null),P=x[0],S=x[1],C=(0,u.useState)([]),M=C[0],A=C[1],U=(0,u.useState)(!1),H=U[0],q=U[1],V=(0,u.useState)(!1),L=V[0],W=V[1],J=(0,u.useState)(),re=J[0],ie=J[1],oe=(0,u.useState)({}),le=oe[0],ce=oe[1],se=(0,u.useState)(r),ue=se[0],ae=se[1],de=(0,u.useState)(!1),pe=de[0],fe=de[1],he=(0,u.useState)(null),be=he[0],Oe=he[1],_e=(0,u.useMemo)((function(){return(0,R.wx)(o,(function(e){return"global"===e.uuid}))}),[o]),Pe=ue||{},we=Pe.name,Se=Pe.schedule_interval,Ce=Pe.schedule_type,Ie=Pe.settings,Ee=void 0===Ie?{}:Ie,ke=Pe.sla,De=Pe.start_time,Te=(Pe.token,Pe.variables),Me=void 0===Te?{}:Te;(0,u.useEffect)((function(){ie(null===Ee||void 0===Ee?void 0:Ee.skip_if_previous_running)}),[Ee]);var Ae=(0,u.useState)(null),Re=Ae[0],Ne=Ae[1],Ue=(0,u.useState)({hour:"00",minute:"00"}),Fe=Ue[0],He=Ue[1],ze=w.ZP.event_rules.detail("aws").data,qe=(0,u.useMemo)((function(){var e;return(null===ze||void 0===ze||null===(e=ze.event_rule)||void 0===e?void 0:e.rules)||[]}),[ze]),Ve=(0,u.useMemo)((function(){return(0,D.HK)(qe,(function(e){return e.name}))}),[qe]),Xe=(0,a.Db)(w.ZP.pipeline_schedules.useUpdate(g),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(){n(),c.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(s,"/triggers/").concat(g))},onErrorCallback:function(e,n){return S({errors:n,response:e})}})}}),Le=(0,i.Z)(Xe,2),We=Le[0],Je=Le[1].isLoading,Be=(0,u.useMemo)((function(){return Me||{}}),[Me]);(0,u.useEffect)((function(){if(De){var e=De.split(" ")[1];Ne((0,N.eI)(De)),He({hour:e.substring(0,2),minute:e.substring(3,5)})}else{var n=new Date;Ne(n),He({hour:String(n.getUTCHours()).padStart(2,"0"),minute:String(n.getUTCMinutes()).padStart(2,"0")})}}),[De]),(0,u.useEffect)((function(){Be&&Object.keys(Be).length>0&&q(!0)}),[Be]),(0,u.useEffect)((function(){ce(H?null===_e||void 0===_e?void 0:_e.reduce((function(e,n){var t=n.uuid,r=n.value;return ye(ye({},e),{},(0,l.Z)({},t,Be[t]||r))}),{}):null)}),[_e,H]),(0,u.useEffect)((function(){if(r&&(A(r.event_matchers),Ke?(ae(ye(ye({},r),{},{schedule_interval:"custom"})),Oe(Se)):ae(j?ye(ye({},r),{},{schedule_interval:b.U5.ONCE}):r),r.sla)){W(!0);var e=(0,N.gU)(ke),n=e.time,t=e.unit;ae((function(e){return ye(ye({},e),{},{slaAmount:n,slaUnit:t})}))}}),[r]);var Ge=(0,u.useCallback)((function(){var e=ye(ye({},(0,F.GL)(ue,["name","schedule_type"])),{},{event_matchers:[],schedule_interval:null,start_time:null,variables:(0,R.e7)(le)});if(b.Xm.EVENT===ue.schedule_type?e.event_matchers=M:(e.schedule_interval=Ke?be:ue.schedule_interval,e.start_time=Re&&null!==Fe&&void 0!==Fe&&Fe.hour&&null!==Fe&&void 0!==Fe&&Fe.minute?"".concat(Re.toISOString().split("T")[0]," ").concat(null===Fe||void 0===Fe?void 0:Fe.hour,":").concat(null===Fe||void 0===Fe?void 0:Fe.minute,":00"):null),L){var n=null===ue||void 0===ue?void 0:ue.slaAmount,t=null===ue||void 0===ue?void 0:ue.slaUnit;if(!n||isNaN(n)||!t)return void G.Am.error("Please enter a valid SLA",{position:G.Am.POSITION.BOTTOM_RIGHT,toastId:"sla_error"});e.sla=(0,N.vJ)(n,t)}else null!==r&&void 0!==r&&r.sla&&(e.sla=0);b.Xm.TIME===ue.schedule_type&&(e.settings=ye(ye({},Ee),{},{skip_if_previous_running:re})),We({pipeline_schedule:e})}),[be,Re,L,M,r,le,ue,Ee,re,Fe,We]),Ke=(0,u.useMemo)((function(){return Se&&!Object.values(b.U5).includes(Se)}),[Se]),Ye=(0,u.useMemo)((function(){var e=[[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.KJ,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_detail"),(0,X.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_detail")],[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.Pf,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Frequency"})]},"frequency"),(0,X.jsxs)(y.Z,{monospace:!0,onChange:function(e){e.preventDefault();var n=e.target.value;ae((function(e){return ye(ye({},e),{},{schedule_interval:n})}))},placeholder:"Choose the frequency to run",value:Se,children:[!Se&&(0,X.jsx)("option",{value:""}),Object.values(b.U5).map((function(e){return(0,X.jsx)("option",{value:e,children:e.substring(1)},e)})),(0,X.jsx)("option",{value:"custom",children:"custom"},"custom")]},"frequency_input")],[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.aw,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Start date and time"})]},"start_time"),(0,X.jsxs)("div",{style:{minHeight:"".concat(5.75*E.iI,"px")},children:[!pe&&(0,X.jsx)(ve.Z,{monospace:!0,onClick:function(){return fe((function(e){return!e}))},placeholder:"YYYY-MM-DD HH:MM",value:Re?"".concat(Re.toISOString().split("T")[0]," ").concat(null===Fe||void 0===Fe?void 0:Fe.hour,":").concat(null===Fe||void 0===Fe?void 0:Fe.minute):""}),(0,X.jsx)("div",{style:{width:"400px"},children:(0,X.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return fe(!1)},open:pe,style:{position:"relative"},children:(0,X.jsx)(K.Z,{selectedDate:Re,selectedTime:Fe,setSelectedDate:Ne,setSelectedTime:He,topPosition:!0})})})]},"start_time_input")]];return j&&e.splice(1,1),Ke&&e.splice(2,0,[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.EK,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Cron expression"})]},"cron_expression"),(0,X.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),Oe(e.target.value)},placeholder:"* * * * *",value:be},"cron_expression_input")]),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Z.Z,{mb:2,px:E.cd,children:(0,X.jsx)(m.Z,{children:"Settings"})}),(0,X.jsx)(f.Z,{light:!0,short:!0}),(0,X.jsx)(O.Z,{columnFlex:[null,1],rows:e})]})}),[be,Re,ue,pe,Fe]),Qe=(0,u.useCallback)((function(e,n){A((function(t){return Object.entries(n).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1];t[e][o]=l})),(0,B.Z)(t)}))}),[A]),$e=(0,u.useMemo)((function(){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Z.Z,{mb:E.cd,px:E.cd,children:(0,X.jsx)(m.Z,{children:"Settings"})}),(0,X.jsx)(f.Z,{light:!0,short:!0}),(0,X.jsx)(O.Z,{columnFlex:[null,1],rows:[[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.KJ,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_event"),(0,X.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_event")]]}),(0,X.jsxs)(Z.Z,{mb:2,mt:5,px:E.cd,children:[(0,X.jsx)(m.Z,{children:"Events"}),(0,X.jsxs)(_.ZP,{muted:!0,children:["Add 1 or more event that will trigger this pipeline to run.",(0,X.jsx)("br",{}),"If you add more than 1 event, this pipeline will trigger if any of the events are received."]}),(0,X.jsxs)(Z.Z,{mt:E.Mq,children:[(0,X.jsx)(_.ZP,{bold:!0,large:!0,children:"AWS events"}),(0,X.jsxs)(_.ZP,{muted:!0,children:["In order to retrieve all the possible AWS events you can trigger your pipeline from,",(0,X.jsx)("br",{}),"you\u2019ll need to set 3 environment variables (",(0,X.jsx)(te.Z,{href:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html",openNewWindow:!0,underline:!0,children:"more info here"}),"):"]}),(0,X.jsx)(Z.Z,{mt:1,children:(0,X.jsxs)(me,{monospace:!0,ordered:!0,children:[(0,X.jsx)(_.ZP,{monospace:!0,children:"AWS_REGION_NAME"}),(0,X.jsx)(_.ZP,{monospace:!0,children:"AWS_ACCESS_KEY_ID"}),(0,X.jsx)(_.ZP,{monospace:!0,children:"AWS_SECRET_ACCESS_KEY"})]})})]})]}),(0,X.jsx)(f.Z,{light:!0,short:!0}),(null===M||void 0===M?void 0:M.length)>=1&&(0,X.jsx)(O.Z,{alignTop:!0,columnFlex:[1,1,2,null],columns:[{uuid:"Provider"},{uuid:"Event"},{uuid:"Pattern"},{label:function(){return""},uuid:"delete"}],rows:null===M||void 0===M?void 0:M.map((function(e,n){var t=e.event_type,r=e.name,i=e.pattern,o=e.id||"".concat(t,"-").concat(r,"-").concat(n,"-").concat(JSON.stringify(i)),l=[];return i&&JSON.stringify(i,null,2).split("\n").forEach((function(e){l.push(" ".concat(e))})),[(0,X.jsxs)(y.Z,{monospace:!0,onChange:function(e){return Qe(n,{event_type:e.target.value})},placeholder:"Event provider",value:t||"",children:[!t&&(0,X.jsx)("option",{value:""}),T.map((function(e){var n=e.label,t=e.uuid;return(0,X.jsx)("option",{value:t,children:n()},t)}))]},"event-provider-".concat(o)),(0,X.jsxs)(y.Z,{monospace:!0,onChange:function(e){var t,r=e.target.value,i=null===(t=Ve[r])||void 0===t?void 0:t.event_pattern;Qe(n,{name:r,pattern:i?JSON.parse(i):null})},placeholder:"Event name",value:r,children:[!r&&(0,X.jsx)("option",{value:""}),qe.map((function(e){var n=e.name;return(0,X.jsx)("option",{value:n,children:n},n)}))]},"event-name-".concat(o)),i&&(0,X.jsx)($.Z,{language:"json",small:!0,source:l.join("\n")}),(0,X.jsx)(p.Z,{default:!0,iconOnly:!0,noBackground:!0,onClick:function(){return A((function(e){return(0,D.oM)(e,n)}))},children:(0,X.jsx)(I.rF,{default:!0,size:2*E.iI})},"remove_event")]}))}),(0,X.jsx)(Z.Z,{p:E.cd,children:(0,X.jsx)(p.Z,{beforeIcon:(0,X.jsx)(I.mm,{size:2*E.iI}),onClick:function(){return A((function(e){return e.concat({})}))},outline:!0,children:"Add event matcher"})})]})}),[M,qe,we]),en=(0,u.useMemo)((function(){var e,n="";return n="".concat(window.origin,"/api/pipeline_schedules/").concat(null===r||void 0===r?void 0:r.id,"/pipeline_runs"),null!==r&&void 0!==r&&r.token&&(n="".concat(n,"/").concat(r.token)),(e=window.location.port)&&(n=n.replace(e,"6789")),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Z.Z,{mb:E.cd,px:E.cd,children:(0,X.jsx)(m.Z,{children:"Settings"})}),(0,X.jsx)(f.Z,{light:!0,short:!0}),(0,X.jsx)(O.Z,{columnFlex:[null,1],rows:[[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.KJ,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"Trigger name"})]},"trigger_name_api"),(0,X.jsx)(ve.Z,{monospace:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{name:e.target.value})}))},placeholder:"Name this trigger",value:we},"trigger_name_input_api")]]}),(0,X.jsxs)(Z.Z,{mb:2,mt:5,px:E.cd,children:[(0,X.jsx)(m.Z,{children:"Endpoint"}),(0,X.jsxs)(_.ZP,{muted:!0,children:["Make a ",(0,X.jsx)(_.ZP,{bold:!0,inline:!0,monospace:!0,children:"POST"})," request to the following endpoint:"]}),(0,X.jsx)(Z.Z,{mt:E.Mq,children:(0,X.jsx)(ee.Z,{copiedText:n,linkText:n,monospace:!0,withCopyIcon:!0})})]}),(0,X.jsxs)(Z.Z,{mb:2,mt:5,px:E.cd,children:[(0,X.jsx)(m.Z,{children:"Payload"}),(0,X.jsx)(_.ZP,{muted:!0,children:"You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block."}),(0,X.jsx)(Z.Z,{mt:E.Mq,children:(0,X.jsx)(ee.Z,{withCopyIcon:!0,copiedText:'{\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n}\n',children:(0,X.jsx)($.Z,{language:"json",small:!0,source:'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\n'})})})]}),(0,X.jsxs)(Z.Z,{mb:2,mt:5,px:E.cd,children:[(0,X.jsx)(m.Z,{children:"Sample cURL command"}),(0,X.jsx)(Z.Z,{mt:E.Mq,children:(0,X.jsx)($.Z,{language:"bash",small:!0,source:"\n curl -X POST ".concat(n,' \\\n --header \'Content-Type: application/json\' \\\n --data \'\n {\n "pipeline_run": {\n "variables": {\n "key1": "value1",\n "key2": "value2"\n }\n }\n }\'\n')})})]})]})}),[we,r,"object"]),nn=!Ce||b.Xm.TIME===Ce&&!(j&&Re||!j&&Re&&Se)||b.Xm.EVENT===Ce&&(!(null!==M&&void 0!==M&&M.length)||!M.every((function(e){var n=e.event_type,t=e.name;return n&&t}))),tn=(0,u.useMemo)((function(){return(0,X.jsxs)(Z.Z,{p:E.cd,children:[!(0,F.Qr)(_e)&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(Z.Z,{mr:2,children:(0,X.jsx)(je.Z,{checked:H,onCheck:q})}),(0,X.jsx)(_.ZP,{monospace:!0,muted:!0,children:"Overwrite global variables"})]}),H&&le&&Object.entries(le).length>0&&(0,X.jsx)(Z.Z,{mt:2,children:(0,X.jsx)(O.Z,{columnFlex:[null,1],columns:[{uuid:"Variable"},{uuid:"Value"}],rows:Object.entries(le).map((function(e){var n=(0,i.Z)(e,2),t=n[0],r=n[1];return[(0,X.jsx)(_.ZP,{default:!0,monospace:!0,children:t},"variable_".concat(t)),(0,X.jsx)(ve.Z,{borderless:!0,monospace:!0,onChange:function(e){e.preventDefault(),ce((function(n){return ye(ye({},n),{},(0,l.Z)({},t,e.target.value))}))},paddingHorizontal:0,placeholder:"Variable value",value:r},"variable_uuid_input_".concat(t))]}))})})]}),(0,X.jsxs)(Z.Z,{mt:2,children:[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(Z.Z,{mr:2,children:(0,X.jsx)(je.Z,{checked:L,onCheck:function(e){W(e),e||ae((function(e){return ye(ye({},e),{},{slaAmount:0})}))}})}),(0,X.jsx)(_.ZP,{default:!0,monospace:!0,children:"Configure trigger SLA"})]}),L&&(0,X.jsx)(Z.Z,{mt:2,children:(0,X.jsx)(O.Z,{columnFlex:[null,1],rows:[[(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(I.aw,{default:!0,size:1.5*E.iI}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(_.ZP,{default:!0,children:"SLA"})]},"sla_detail"),(0,X.jsxs)(h.Z,{children:[(0,X.jsx)(ne.Z,{flex:1,children:(0,X.jsx)(ve.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{slaAmount:e.target.value})}))},placeholder:"Time",value:null===ue||void 0===ue?void 0:ue.slaAmount})}),(0,X.jsx)(ne.Z,{flex:1,children:(0,X.jsx)(y.Z,{fullWidth:!0,monospace:!0,noBorder:!0,onChange:function(e){e.preventDefault(),ae((function(n){return ye(ye({},n),{},{slaUnit:e.target.value})}))},placeholder:"Select time unit",small:!0,value:null===ue||void 0===ue?void 0:ue.slaUnit,children:Object.keys(N.tL).map((function(e){return(0,X.jsx)("option",{value:e,children:"".concat(e,"(s)")},e)}))})})]},"sla_input_detail")]]})}),b.Xm.TIME===Ce&&(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(Z.Z,{mt:2,children:[(0,X.jsx)(m.Z,{default:!0,level:5,monospace:!0,children:"Additional settings"}),(0,X.jsx)(Z.Z,{mt:2,children:(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(Y.Z,{checked:re,onClick:function(){return ie((function(e){return!e}))}}),(0,X.jsx)(Z.Z,{ml:2}),(0,X.jsx)(_.ZP,{default:!0,monospace:!0,small:!0,children:"Skip run if previous run still in progress"})]})})]})})]})]})}),[L,_e,H,le,ue,W,q,re]);return(0,X.jsx)(X.Fragment,{children:(0,X.jsxs)(v.Z,{after:tn,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(s,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return null===r||void 0===r?void 0:r.name},linkProps:{as:"/pipelines/".concat(s,"/triggers/").concat(g),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],errors:P,pageName:k.M.TRIGGERS,pipeline:t,setErrors:S,subheader:(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(p.Z,{disabled:nn,loading:Je,onClick:Ge,outline:!0,primary:!0,children:"Save changes"}),(0,X.jsx)(Z.Z,{mr:1}),(0,X.jsx)(p.Z,{linkProps:{href:"/pipelines/[pipeline]/triggers/[...slug]",as:"/pipelines/".concat(s,"/triggers/").concat(g)},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Cancel"})]}),title:function(){return"Edit ".concat(null===r||void 0===r?void 0:r.name)},uuid:"triggers/edit",children:[(0,X.jsxs)(Z.Z,{p:E.cd,children:[(0,X.jsxs)(Z.Z,{mb:2,children:[(0,X.jsx)(m.Z,{children:"Trigger type"}),(0,X.jsx)(_.ZP,{muted:!0,children:"How would you like this pipeline to be triggered?"})]}),(0,X.jsx)(h.Z,{children:Ze(j).map((function(e){var n=e.label,t=e.description,r=e.uuid,i=Ce===r,o=Ce&&!i;return(0,X.jsx)(p.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){b.Xm.EVENT!==r||null!==M&&void 0!==M&&M.length||A([{}]),ae((function(e){return ye(ye({},e),{},{schedule_type:r})}))},children:(0,X.jsx)(xe.U,{selected:i,children:(0,X.jsxs)(h.Z,{alignItems:"center",children:[(0,X.jsx)(ne.Z,{children:(0,X.jsx)("input",{checked:i,type:"radio"})}),(0,X.jsx)(Z.Z,{mr:E.cd}),(0,X.jsxs)(ne.Z,{alignItems:"flex-start",flexDirection:"column",children:[(0,X.jsx)(m.Z,{bold:!0,default:!i&&!o,level:5,muted:!i&&o,children:n()}),(0,X.jsx)(_.ZP,{default:!i&&!o,leftAligned:!0,muted:o,children:t()})]})]})})},r)}))})]}),(0,X.jsxs)(Z.Z,{mt:5,children:[b.Xm.TIME===Ce&&Ye,b.Xm.EVENT===Ce&&$e,b.Xm.API===Ce&&en]})]})})},_e=t(41788),Pe=t(70543);function we(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?we(Object(t),!0).forEach((function(n){(0,l.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):we(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ce(e){var n=e.pipelineScheduleId,t=e.pipelineUUID,r=e.subpath,i=w.ZP.variables.pipelines.list(t).data,o=null===i||void 0===i?void 0:i.variables,l=w.ZP.pipeline_schedules.detail(n),c=l.data,s=l.mutate,u=null===c||void 0===c?void 0:c.pipeline_schedule,a=w.ZP.pipelines.detail(t,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,d=Se(Se({},null===a||void 0===a?void 0:a.pipeline),{},{uuid:t});return Pe.b===r?(0,X.jsx)(Oe,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:o}):(0,X.jsx)(J,{fetchPipelineSchedule:s,pipeline:d,pipelineSchedule:u,variables:o})}Ce.getInitialProps=function(){var e=(0,o.Z)(s().mark((function e(n){var t,r,o,l,c,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.query,r=t.pipeline,o=t.slug,!Array.isArray(o)){e.next=4;break}return l=(0,i.Z)(o,2),c=l[0],u=l[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var Ie=(0,_e.Z)(Ce)},95488:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return t(54183)}])}},function(e){e.O(0,[3850,2083,5896,4804,1774,5872,2524,4495,9767,3573,434,9898,1830,2626,4463,6532,1286,4846,7281,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);