mage-ai 0.9.14__py3-none-any.whl → 0.9.15__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 (138) hide show
  1. mage_ai/api/resources/PipelineRunResource.py +8 -5
  2. mage_ai/data_preparation/executors/block_executor.py +5 -7
  3. mage_ai/data_preparation/templates/constants.py +16 -0
  4. mage_ai/data_preparation/templates/data_exporters/mssql.py +32 -0
  5. mage_ai/data_preparation/templates/data_loaders/mssql.py +27 -0
  6. mage_ai/io/base.py +5 -0
  7. mage_ai/io/mssql.py +1 -0
  8. mage_ai/orchestration/db/models/base.py +15 -15
  9. mage_ai/orchestration/db/models/oauth.py +35 -4
  10. mage_ai/orchestration/pipeline_scheduler.py +12 -6
  11. mage_ai/server/constants.py +1 -1
  12. mage_ai/server/frontend_dist/404.html +2 -2
  13. mage_ai/server/frontend_dist/404.html.html +2 -2
  14. mage_ai/server/frontend_dist/_next/static/chunks/{2786-f71862671f66d948.js → 2786-756b3834d10b8711.js} +1 -1
  15. mage_ai/server/frontend_dist/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
  16. mage_ai/server/frontend_dist/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
  17. mage_ai/server/frontend_dist/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
  18. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
  19. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
  20. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
  21. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
  22. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-ce11db27e4af7869.js → [...slug]-91889109af36a793.js} +1 -1
  23. mage_ai/server/frontend_dist/_next/static/{CNjkRIWPaAu1yJUmIaX_q → h5mR3pjfn_EQy348CZ_ok}/_buildManifest.js +1 -1
  24. mage_ai/server/frontend_dist/files.html +2 -2
  25. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  26. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  27. mage_ai/server/frontend_dist/index.html +2 -2
  28. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  29. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  30. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  31. mage_ai/server/frontend_dist/manage/users.html +2 -2
  32. mage_ai/server/frontend_dist/manage.html +2 -2
  33. mage_ai/server/frontend_dist/overview.html +2 -2
  34. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  35. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  36. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  37. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  38. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  39. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  40. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  41. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  42. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  43. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  44. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  45. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  46. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  47. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  48. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  49. mage_ai/server/frontend_dist/pipelines.html +2 -2
  50. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  51. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  52. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  53. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  54. mage_ai/server/frontend_dist/settings.html +2 -2
  55. mage_ai/server/frontend_dist/sign-in.html +2 -2
  56. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  57. mage_ai/server/frontend_dist/templates.html +2 -2
  58. mage_ai/server/frontend_dist/terminal.html +2 -2
  59. mage_ai/server/frontend_dist/test.html +2 -2
  60. mage_ai/server/frontend_dist/triggers.html +2 -2
  61. mage_ai/server/frontend_dist/version-control.html +2 -2
  62. mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
  63. mage_ai/server/frontend_dist_base_path_template/404.html.html +2 -2
  64. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{2786-f71862671f66d948.js → 2786-756b3834d10b8711.js} +1 -1
  65. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-e1578fe1bdb5a557.js +1 -0
  66. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-9b785c07dacf22b3.js +1 -0
  67. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-050e60a8b1eaa32a.js +1 -0
  68. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-03841b6dd7d240f6.js +1 -0
  69. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6e2c0e3f818fd4de.js +1 -0
  70. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-6e59dc4e57dd2680.js +1 -0
  71. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-02295848c811e26a.js +1 -0
  72. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/{[...slug]-ce11db27e4af7869.js → [...slug]-91889109af36a793.js} +1 -1
  73. mage_ai/server/frontend_dist_base_path_template/_next/static/{yJvL-3bfsNF3WCStZ10Dm → xykYLW_ARw5SevdiponLI}/_buildManifest.js +1 -1
  74. mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
  75. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
  76. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
  77. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  78. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
  79. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
  80. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
  81. mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
  82. mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
  83. mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
  84. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
  85. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  86. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
  87. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  88. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
  89. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  90. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  91. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
  92. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
  93. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
  94. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
  95. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
  96. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  97. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
  98. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  99. mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
  100. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
  101. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
  102. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
  103. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
  104. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  105. mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
  106. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
  107. mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
  108. mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
  109. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  110. mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
  111. mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
  112. mage_ai/server/server.py +12 -1
  113. mage_ai/shared/retry.py +1 -1
  114. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/METADATA +1 -1
  115. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/RECORD +123 -122
  116. mage_ai/server/frontend_dist/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
  117. mage_ai/server/frontend_dist/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
  118. mage_ai/server/frontend_dist/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
  119. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
  120. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
  121. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +0 -1
  122. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
  123. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3391-6f0a0a5c254cd7f2.js +0 -1
  124. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/6299-fcb702d0f3d3291b.js +0 -1
  125. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8952-9d6fa18fa9378989.js +0 -1
  126. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-2dc2a0dfc0ff620d.js +0 -1
  127. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-6577159a0af52a78.js +0 -1
  128. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-54cb4936accdd2d9.js +0 -1
  129. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-d331e98ad103b13e.js +0 -1
  130. mage_ai/tests/orchestration/db/test_models.py +0 -710
  131. /mage_ai/server/frontend_dist/_next/static/{CNjkRIWPaAu1yJUmIaX_q → h5mR3pjfn_EQy348CZ_ok}/_middlewareManifest.js +0 -0
  132. /mage_ai/server/frontend_dist/_next/static/{CNjkRIWPaAu1yJUmIaX_q → h5mR3pjfn_EQy348CZ_ok}/_ssgManifest.js +0 -0
  133. /mage_ai/server/frontend_dist_base_path_template/_next/static/{yJvL-3bfsNF3WCStZ10Dm → xykYLW_ARw5SevdiponLI}/_middlewareManifest.js +0 -0
  134. /mage_ai/server/frontend_dist_base_path_template/_next/static/{yJvL-3bfsNF3WCStZ10Dm → xykYLW_ARw5SevdiponLI}/_ssgManifest.js +0 -0
  135. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/LICENSE +0 -0
  136. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/WHEEL +0 -0
  137. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/entry_points.txt +0 -0
  138. {mage_ai-0.9.14.dist-info → mage_ai-0.9.15.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{59739:function(e,n,t){"use strict";var r=t(56669);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,n,t,i,o,l){if(l!==r){var c=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 c.name="Invariant Violation",c}}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:o,resetWarningCache:i};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 o}});var r=t(38626),i=t(3055),o=34*t(49125).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},18025:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(38626),i=t(23831),o=t(73942),l=t(49125),c=r.default.div.withConfig({displayName:"indexstyle__CardStyle",componentId:"sc-m7tlau-0"})(["border-radius:","px;border-style:solid;border-width:2px;height:","px;margin-right:","px;padding:","px;width:","px;"," ",""],o.TR,14*l.iI,l.cd*l.iI,l.cd*l.iI,40*l.iI,(function(e){return!e.selected&&"\n border-color: ".concat((e.theme.borders||i.Z.borders).light,";\n ")}),(function(e){return e.selected&&"\n border-color: ".concat((e.theme.interactive||i.Z.interactive).linkPrimary,";\n ")})),u=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),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)(i.ZP,{onChange:r,value:n}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsx)(u.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*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)(c.Z,{px:1,children:(0,p.jsx)(u.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*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))}))})]})]})}},19464:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ln}});var r,i=t(77837),o=t(82394),l=t(38860),c=t.n(l),u=t(38626),a=t(4804),s=t(82684),d=t(86422),p=t(34744),f=t(60328),h=t(38341),m=t(16634),v=t(67971),g=t(86673),j=t(19711),b=t(2850),x=t(49125),y=u.default.div.withConfig({displayName:"indexstyle__FilterRowStyle",componentId:"sc-kvapsi-0"})(["padding-bottom:","px;padding-top:","px;"],x.iI/2,x.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 _,Z=[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"}(_||(_={}));var O=t(73942),P=t(73899);var k=(0,u.css)(["",""],(function(e){return"\n background-color: ".concat(function(e){var n=e.critical,t=e.debug,r=e.error,i=e.exception,o=e.info,l=e.log,c=e.warning;return n?P.Zl:t?P.EG:r?P.hl:i?P.hM:o?P.gN:l?P.Wd:c?P.$R:"transparent"}(e),";\n ")})),S=u.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],k,O.n_),w=t(90211),C=t(44162),I=t(33766),D=t(28598);function T(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 E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=function(e){var n=e.blocks,t=e.query,r=(0,s.useContext)(u.ThemeContext),i=(0,s.useMemo)((function(){return t["level[]"]}),[t]),l=(0,s.useMemo)((function(){return t["block_type[]"]}),[t]),c=(0,s.useMemo)((function(){return t["block_uuid[]"]}),[t]),a=(0,s.useMemo)((function(){return t["pipeline_schedule_id[]"]}),[t]),p=(0,s.useMemo)((function(){return t["pipeline_run_id[]"]}),[t]),_=(0,s.useMemo)((function(){return t["block_run_id[]"]}),[t]);return(0,D.jsx)(b.M,{children:(0,D.jsxs)(g.Z,{p:x.cd,children:[(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),Z.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,I.g_)(t,{level:e},{isList:!0})},children:(0,D.jsx)(y,{children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(i)&&(null===i||void 0===i?void 0:i.includes(String(e)))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(S,E({},(0,o.Z)({},e.toLowerCase(),!0))),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,children:(0,w.kC)(e.toLowerCase())})]})})},e)}))]}),(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block type"})}),[d.tf.DATA_LOADER,d.tf.TRANSFORMER,d.tf.DATA_EXPORTER].map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,I.g_)(t,{block_type:e},{isList:!0})},children:(0,D.jsx)(y,{children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(m.Z,{color:(0,C.qn)(e,{theme:r}).accent,size:1.5*x.iI,square:!0}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block"})}),n.filter((function(e){var n=e.type;return d.tf.SCRATCHPAD!==n})).map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,I.g_)(t,{block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,D.jsx)(y,{children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e.uuid)))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(m.Z,{color:(0,C.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*x.iI,square:!0}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===a||void 0===a?void 0:a.length)&&(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),a.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,I.g_)(t,{pipeline_schedule_id:e},{isList:!0})},children:(0,D.jsx)(y,{children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(a)&&(null===a||void 0===a?void 0:a.includes(e))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===p||void 0===p?void 0:p.length)&&(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),p.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,I.g_)(t,{pipeline_run_id:e},{isList:!0})},children:(0,D.jsx)(y,{children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(p)&&(null===p||void 0===p?void 0:p.includes(e))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===_||void 0===_?void 0:_.length)&&(0,D.jsxs)(g.Z,{mb:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),_.map((function(e){return(0,D.jsx)(f.Z,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,I.g_)(t,{block_run_id:e},{isList:!0})},children:(0,D.jsx)(y,{children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(h.Z,{checked:Array.isArray(_)&&(null===_||void 0===_?void 0:_.includes(e))}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},L=t(93461),R=t(11135),M=t(75582),N=t(32316),B=t(10919),Y=t(87815),W=u.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],k,.5*x.iI),H=u.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],k,O.BG,.25*x.iI,.5*x.iI),U=t(22341),J=t(92083),G=t.n(J);function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?q(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/,K=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function X(e){var n=e.content.trim().split(K),t=[],r=[];return n.forEach((function(e){var n=e.trim();F.test(e)?(r.length>=1&&t.push(r.join(" ").trim()),r=[e]):r.filter((function(e){return e})).length<=1&&n&&r.push(n)})),t.push(r.join(" ").trim()),t.map((function(n){return function(e){var n=e.content.trim().match(K),t=null===n||void 0===n?void 0:n[1],r=null===n||void 0===n?void 0:n[2],i={};return r&&(0,w.Pb)(r)&&(i=JSON.parse(r)),z(z({},e),{},{createdAt:t,data:i})}(z(z({},e),{},{content:n}))}))}function V(e){return e&&G().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS")}var Q=t(24224);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 ee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ne=["error","error_stack","error_stacktrace"],te={uuid:"Details"},re={uuid:"Errors"};var ie=function(e){var n=e.log,t=e.onClose,r=e.selectedTab,i=e.setSelectedTab,l=(0,s.useState)(!1),c=l[0],u=l[1],a=n.data,d=n.name,h=n.path,m=a||{},b=m.error,y=m.error_stack,_=m.error_stacktrace,Z=m.level,O=m.timestamp,P=(0,o.Z)({},Z.toLowerCase(),!0),k=(0,s.useMemo)((function(){var e=[["file name",d],["file path",h]];return Object.entries(a).forEach((function(n){var t=(0,M.Z)(n,2),r=t[0],i=t[1];ne.includes(r)||e.push([r,i])})),_&&e.push(["error",_]),(0,Q.YC)(e,(function(e){var n=(0,M.Z)(e,2),t=n[0];n[1];return t}))}),[a,_,d,h]),S=(0,s.useMemo)((function(){var e=[te];return b&&e.push(re),(0,D.jsx)(N.Z,{onClickTab:i,selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:e})}),[b,r,i]);return(0,D.jsxs)("div",{children:[(0,D.jsx)(W,ee({},P)),(0,D.jsx)(g.Z,{p:x.cd,children:(0,D.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,D.jsxs)(L.Z,{alignItems:"center",children:[(0,D.jsx)(H,ee(ee({},P),{},{children:(0,D.jsx)(j.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:Z})})),(0,D.jsx)(g.Z,{mr:x.cd}),(0,D.jsx)(j.ZP,{monospace:!0,children:V(O)})]}),(0,D.jsx)(f.Z,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,D.jsx)(U.x8,{size:1.5*x.iI})})]})}),(0,D.jsx)(p.Z,{medium:!0}),(0,D.jsx)(g.Z,{py:x.cd,children:S}),te.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,D.jsx)(Y.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===k||void 0===k?void 0:k.map((function(e,n){var t=(0,M.Z)(e,2),r=t[0],i=t[1],o="message"===r,l="tags"===r,a=i,s=i;return l?s=a=(0,w.Pb)(i)?JSON.parse(JSON.stringify(i,null,2)):JSON.stringify(i,null,2):o&&c&&(0,w.Pb)(i)&&(s=JSON.stringify(JSON.parse(i),null,2),a=(0,D.jsx)("pre",{children:s})),"object"===typeof a&&(a=JSON.stringify(a,null,2),a=(0,D.jsx)("pre",{children:a})),"object"===typeof s&&(s=JSON.stringify(s)),[(0,D.jsx)(j.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(j.ZP,{monospace:!0,textOverflow:!0,title:s,whiteSpaceNormal:o&&c||l,wordBreak:o&&c||l,children:[!l&&a,l&&(0,D.jsx)("pre",{children:a})]},"".concat(r,"_").concat(n,"_val")),o&&(0,D.jsx)(B.Z,{muted:!0,onClick:function(){return u((function(e){return!e}))},children:c?"Click to hide log":"Click to show full log message"})]})]})),uuid:"LogDetail"}),re.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,D.jsxs)(g.Z,{mb:5,px:x.cd,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,children:"Error"})}),null===b||void 0===b?void 0:b.map((function(e){return e.split("\n").map((function(e){return e.split("\\n").map((function(e){return(0,D.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),y&&(0,D.jsxs)(g.Z,{mt:3,children:[(0,D.jsx)(g.Z,{mb:1,children:(0,D.jsx)(j.ZP,{bold:!0,children:"Stack trace"})}),null===y||void 0===y?void 0:y.map((function(e){return null===e||void 0===e?void 0:e.map((function(e){return(0,D.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},oe=t(60547),le=t(98781),ce=t(41788),ue=t(54283),ae=t(21831),se=t(89565),de=t.n(se),pe=t(12691),fe=t.n(pe),he=t(72487),me=t(66166),ve=t(3055),ge=t(23831),je=t(37391),be=u.default.div.withConfig({displayName:"indexstyle__TableContainer",componentId:"sc-16j4vp6-0"})([".table_row > div{margin:","px ","px;}div{","}"],.5*x.iI,x.iI,je.w5),xe=u.default.div.withConfig({displayName:"indexstyle__TableHeadStyle",componentId:"sc-16j4vp6-1"})(["display:flex;align-items:center;overflow:hidden;",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||ge.Z).borders.medium2,";\n ")})),ye=u.default.div.withConfig({displayName:"indexstyle__TableRowStyle",componentId:"sc-16j4vp6-2"})(["display:flex;align-items:center;"," "," ",""],(function(e){return"\n border-bottom: 1px solid ".concat((e.theme||ge.Z).borders.light,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return!e.selected&&"\n &:hover {\n background: ".concat((e.theme.interactive||ge.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||ge.Z.interactive).activeBorder,";\n ")})),_e=t(62976),Ze=t(24141);function Oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Pe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Oe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke="log_uuid";var Se,we,Ce,Ie=function(e){var n=e.autoScrollLogs,t=e.blocksByUUID,r=e.tableInnerRef,i=e.logs,l=e.onRowClick,c=e.pipeline,u=e.query,a=e.setSelectedLog,d=e.themeContext,p=(0,Ze.i)().height,f=(0,s.useMemo)((function(){return le.qL.INTEGRATION===(null===c||void 0===c?void 0:c.type)}),[c.type]),h=(0,me.Z)(i);(0,s.useEffect)((function(){var e;n&&(h||[]).length!==(i||[]).length&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(!1))}),[n,i,h,r]);var b=Object.keys(t||{});if(f){var y,_,Z=((null===c||void 0===c||null===(y=c.data_integration)||void 0===y||null===(_=y.catalog)||void 0===_?void 0:_.streams)||[]).map((function(e){return e.tap_stream_id})),O=new Set;b.forEach((function(e){Z.forEach((function(n){return O.add("".concat(e,":").concat(n,":0"))}))})),b=Array.from(O)}var P=Math.max.apply(Math,(0,ae.Z)(b.map((function(e){return e.length})))),k=Math.min(P*_e.r+12+8,50*x.iI),w=[{uuid:"_",width:28},{uuid:"Date",width:214},{uuid:"Block",width:k+16},{uuid:"Message"},{uuid:"_"}],T=(0,s.useCallback)((function(e){var n,t,r,i=e.data,c=e.index,s=e.style,d=i.blocksByUUID,p=i.logs,h=i.themeContext,b=p[c],y=b.content,_=b.data,Z=b.name,O=_||{},P=O.block_uuid,w=O.level,T=O.message,E=O.pipeline_uuid,A=O.timestamp,R=O.uuid,M=P||Z.split(".log")[0],N=M.split(":");f&&(M=N[0],t=N[1],r=N[2]);var Y=d[M];if(Y||(Y=d[N[0]]),Y){var W=(0,C.qn)(Y.type,{blockColor:Y.color,theme:h}).accent;n=(0,D.jsx)(v.ZP,{alignItems:"center",children:(0,D.jsx)(fe(),{as:"/pipelines/".concat(E,"/edit?block_uuid=").concat(M),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,D.jsxs)(B.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,D.jsx)(m.Z,{color:W,size:1.5*x.iI,square:!0}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsxs)(j.ZP,{disableWordBreak:!0,monospace:!0,noWrapping:!0,title:P,width:k-16,children:[M,t&&":",t&&(0,D.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:t}),r>=0&&":",r>=0&&(0,D.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:r})]})]})})})}return(0,D.jsxs)(ye,{className:"table_row",onClick:function(){var e,n,t=p[c],r=null===(e=t.data)||void 0===e?void 0:e.uuid;u.log_uuid===r&&(r=null),null!==(n=t.data)&&void 0!==n&&n.error?null===l||void 0===l||l(re):null===l||void 0===l||l(te),(0,I.u7)((0,o.Z)({},ke,r)),a(r?t:null)},selected:(null===u||void 0===u?void 0:u.log_uuid)&&(null===u||void 0===u?void 0:u.log_uuid)===R,style:Pe({},s),children:[(0,D.jsx)(L.Z,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(S,Pe({},(0,o.Z)({},null===w||void 0===w?void 0:w.toLowerCase(),!0)))},"log_type"),(0,D.jsx)(L.Z,{children:(0,D.jsx)(j.ZP,{default:!0,monospace:!0,noWrapping:!0,children:V(A)},"log_timestamp")}),(0,D.jsx)(L.Z,{style:{minWidth:k,width:k},children:n}),(0,D.jsx)(L.Z,{style:{overflow:"auto"},children:(0,D.jsx)(j.ZP,{monospace:!0,textOverflow:!0,title:T||y,children:(0,D.jsx)(de(),{children:T||y})},"log_message")}),(0,D.jsx)(L.Z,{flex:"1",justifyContent:"flex-end",children:(0,D.jsx)(U._Q,{default:!0,size:2*x.iI})},"chevron_right_icon")]})}),[k,f,l,u,a]);return(0,D.jsxs)(be,{children:[(0,D.jsx)(xe,{children:w.map((function(e,n){return(0,D.jsx)(L.Z,{alignItems:"center",style:{height:4*x.iI,minWidth:e.width||null,width:e.width||null},children:"_"!==e.uuid&&(0,D.jsx)(j.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.uuid})},"".concat(e,"_").concat(n))}))}),(0,D.jsx)(he.t7,{height:p-ve.Mz-86-34-58,innerRef:r,itemCount:i.length,itemData:{blocksByUUID:t,logs:i,pipeline:c,themeContext:d},itemSize:3.75*x.iI,width:"100%",children:T})]})},De=t(2713),Te=t(47999),Ee=t(55378),Ae=t(82944),Le="_limit",Re="_offset",Me=20,Ne=[_.LAST_HOUR,_.LAST_DAY,_.LAST_WEEK,_.LAST_30_DAYS],Be=(Se={},(0,o.Z)(Se,_.LAST_HOUR,3600),(0,o.Z)(Se,_.LAST_DAY,86400),(0,o.Z)(Se,_.LAST_WEEK,604800),(0,o.Z)(Se,_.LAST_30_DAYS,2592e3),Se),Ye=t(84779),We=t(42305),He=t(7715),Ue=t(59e3);function Je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ge(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Je(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Je(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}!function(e){e.START="start_timestamp",e.END="end_timestamp"}(Ce||(Ce={}));var qe=(we={},(0,o.Z)(we,Le,Me),(0,o.Z)(we,Re,0),we),ze={blackBorder:!0,inline:!0,paddingBottom:.75*x.iI,paddingTop:.75*x.iI};var Fe=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,i=e.selectedRange,l=e.setSelectedRange,c=(0,s.useState)(null),u=c[0],a=c[1],d=(0,s.useState)(null),p=d[0],h=d[1],m=(0,s.useState)({hour:"00",minute:"00"}),b=m[0],y=m[1],Z=(0,s.useState)(new Date),O=Z[0],P=Z[1],k=(0,s.useState)({hour:(0,We.lJ)(String((new Date).getUTCHours())),minute:(0,We.lJ)(String((new Date).getUTCMinutes()))}),S=k[0],w=k[1],C=(0,Ue.iV)(),T=(0,me.Z)(C);return(0,s.useEffect)((function(){if(!(0,He.Xy)(C,T)){var e=C.start_timestamp,n=C.end_timestamp;if(e){var t=(0,We.Pc)(e),r=t.date,i=t.hour,o=t.minute;h(r),y({hour:(0,We.lJ)(i),minute:(0,We.lJ)(o)});var c=Math.ceil(Date.now()/1e3)-e;Math.abs(c-Be[_.LAST_DAY])<=60&&l(_.LAST_DAY)}if(n){var u=(0,We.Pc)(n),a=u.date,s=u.hour,d=u.minute;P(a),w({hour:(0,We.lJ)(s),minute:(0,We.lJ)(d)})}}}),[C,T]),(0,D.jsx)(g.Z,{py:1,children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(R.ZP,Ge(Ge({},ze),{},{disabled:n,onClick:r,uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"})),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(R.ZP,Ge(Ge({},ze),{},{disabled:(null===C||void 0===C?void 0:C._offset)<=0,onClick:t,uuid:"logs/load_newer_logs",children:"Load newer logs"})),(0,D.jsx)(g.Z,{mr:2}),(0,D.jsx)(Ee.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(l(n),Ne.includes(n)){var t,r=(0,Ye.JI)(Be[n]);(0,I.u7)(Ge((t={},(0,o.Z)(t,Ce.START,r),(0,o.Z)(t,Ce.END,null),t),qe))}},paddingRight:4*x.iI,placeholder:"Select time range",value:i,children:Object.values(_).map((function(e){return(0,D.jsx)("option",{value:e,children:e},e)}))}),(0,D.jsx)(g.Z,{mr:1}),i===_.CUSTOM_RANGE&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ae.Z,{compact:!0,defaultColor:!0,onClick:function(){return a(0)},paddingRight:0,placeholder:"Start",value:p?(0,We.AY)(p,null===b||void 0===b?void 0:b.hour,null===b||void 0===b?void 0:b.minute):""}),(0,D.jsx)(Te.Z,{onClickOutside:function(){return a(null)},open:0===u,style:{position:"relative"},children:(0,D.jsx)(De.Z,{selectedDate:p,selectedTime:b,setSelectedDate:h,setSelectedTime:y})}),(0,D.jsx)(g.Z,{px:1,children:(0,D.jsx)(j.ZP,{children:"to"})}),(0,D.jsx)(Ae.Z,{compact:!0,defaultColor:!0,onClick:function(){return a(1)},paddingRight:0,placeholder:"End",value:O?(0,We.AY)(O,null===S||void 0===S?void 0:S.hour,null===S||void 0===S?void 0:S.minute):""}),(0,D.jsx)(Te.Z,{onClickOutside:function(){return a(null)},open:1===u,style:{position:"relative"},children:(0,D.jsx)(De.Z,{selectedDate:O,selectedTime:S,setSelectedDate:P,setSelectedTime:w})}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(f.Z,{borderRadius:x.iI/2,onClick:function(){var e,n=(0,We.BP)(p,b.hour,b.minute),t=(0,We.BP)(O,S.hour,S.minute);(0,I.u7)(Ge((e={},(0,o.Z)(e,Ce.START,(0,We.A5)(n)),(0,o.Z)(e,Ce.END,(0,We.A5)(t)),e),qe))},padding:"".concat(x.iI/2,"px"),primary:!0,children:"Search"})]})]})})},Ke=t(70902),Xe=t(82531),Ve=t(11366),Qe=t(59920),$e=t(91427);function en(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 nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?en(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):en(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var tn="pipeline_run_id[]",rn="block_run_id[]";function on(e){var n=e.pipeline,t=(0,s.useContext)(u.ThemeContext),r=(0,s.useRef)(null),i=n.uuid,l=(0,s.useState)(null),c=l[0],f=l[1],h=(0,s.useState)(null),m=h[0],b=h[1],y=(0,s.useState)(null),Z=y[0],O=y[1],P=(0,s.useState)(null),k=P[0],S=P[1],C=(0,s.useState)(te),T=C[0],E=C[1],M=(0,s.useState)((0,$e.U2)(Ve.Tz,!0)),N=M[0],B=M[1],Y=Xe.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,W=(0,s.useMemo)((function(){return nn(nn({},null===Y||void 0===Y?void 0:Y.pipeline),{},{uuid:i})}),[Y,i]),H=(null===W||void 0===W?void 0:W.type)===le.qL.INTEGRATION,U=(0,s.useMemo)((function(){return W.blocks||[]}),[W]),J=(0,s.useMemo)((function(){var e=(0,Q.HK)(U,(function(e){return e.uuid}));if(H){var n,t=(0,Q.sE)(U,(function(e){var n=e.type;return d.tf.DATA_LOADER===n})),r=t?(0,a.Qc)(t.content):{},i=((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 U.forEach((function(e){var n=e.uuid,i=e.type,o="".concat(n,":").concat(t);r[o]={type:i}})),nn(nn({},e),r)}),{});e=nn(nn({},i),e)}return e}),[U,H]),G=(0,Ue.iV)(),q=!(null!==G&&void 0!==G&&G.start_timestamp)&&!(null!==G&&void 0!==G&&G.hasOwnProperty(tn)||null!==G&&void 0!==G&&G.hasOwnProperty(rn)),z=(0,Ye.JI)(Be[_.LAST_DAY]),F=Xe.ZP.logs.pipelines.list(c?i:null,(0,He.gR)(q?nn(nn({},c),{},{start_timestamp:z}):c,[ke]),{refreshInterval:5e3}),K=F.data,V=F.mutate,$=!K,ee=(0,s.useMemo)((function(){var e;if(null!==K&&void 0!==K&&null!==(e=K.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=K.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}}),[K]),ne=ee.blockRunLogs,re=ee.pipelineRunLogs,ce=ee.totalBlockRunLogCount,ae=ee.totalPipelineRunLogCount,se=+(null===G||void 0===G?void 0:G._limit)>=ce&&+(null===G||void 0===G?void 0:G._limit)>=ae,de=(0,s.useMemo)((function(){return(0,Q.YC)(ne.concat(re).reduce((function(e,n){return e.concat(X(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ne,re]),pe=(0,s.useMemo)((function(){return de.filter((function(e){var n=e.data,t=[];if(!c)return!0;if(t.push(!(0,He.Qr)(n)),c["level[]"]&&t.push(c["level[]"].includes(null===n||void 0===n?void 0:n.level)),c["block_type[]"]){var r,i,o=null===n||void 0===n?void 0:n.block_uuid;if(H)o=null===n||void 0===n||null===(i=n.block_uuid)||void 0===i?void 0:i.split(":").slice(0,2).join(":");t.push(c["block_type[]"].includes(null===(r=J[o])||void 0===r?void 0:r.type))}if(c["pipeline_run_id[]"]){var l=null===n||void 0===n?void 0:n.pipeline_run_id;t.push(c["pipeline_run_id[]"].includes(String(l)))}if(c["block_run_id[]"]){var u=null===n||void 0===n?void 0:n.block_run_id;t.push(c["block_run_id[]"].includes(String(u)))}return t.every((function(e){return e}))}))}),[J,H,de,c]),fe=pe.length,he=(0,me.Z)(G);(0,s.useEffect)((function(){var e;q&&(0,I.u7)((e={},(0,o.Z)(e,Le,Me),(0,o.Z)(e,Re,0),(0,o.Z)(e,"start_timestamp",z),e))}),[q]),(0,s.useEffect)((function(){(0,He.Xy)(G,he)||f(G)}),[G,he]);var ve=(0,me.Z)(m);(0,s.useEffect)((function(){var e=G.log_uuid;!e||m||ve||b(de.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[de,G,m,ve]);var je=G._limit,be=G._offset,xe=+(je||0),ye=+(be||0),_e=Math.max(ce,ae),Ze=(0,s.useCallback)((function(){var e,n=xe,t=ye;(ce>xe||ae>xe)&&(n=Math.min(_e,xe+Me),t=Math.min(ye+Me,_e-_e%Me),(0,I.u7)(nn(nn({},G),{},(e={},(0,o.Z)(e,Le,n),(0,o.Z)(e,Re,t),e))))}),[_e,xe,ye,G,ce,ae]),Oe=(0,s.useCallback)((function(){var e,n=xe,t=ye;xe>=Me&&(n=Math.max(Me,xe-Me),xe>=_e&&_e%Me!==0&&(n=_e-_e%Me),t=Math.max(0,ye-Me),(0,I.u7)(nn(nn({},G),{},(e={},(0,o.Z)(e,Le,n),(0,o.Z)(e,Re,t),e))))}),[_e,xe,ye,G]),Pe=(0,s.useCallback)((function(){var e=!N;B(e),(0,$e.t8)(Ve.Tz,e)}),[N]),Se=(0,s.useMemo)((function(){return(0,D.jsx)(Ie,{autoScrollLogs:N,blocksByUUID:J,logs:pe,onRowClick:E,pipeline:W,query:c,setSelectedLog:b,tableInnerRef:r,themeContext:t})}),[N,J,pe,W,c,t]);return(0,D.jsxs)(oe.Z,{after:m&&(0,D.jsx)(ie,{log:m,onClose:function(){(0,I.u7)((0,o.Z)({},ke,null)),b(null)},selectedTab:T,setSelectedTab:E}),afterHidden:!m,afterWidth:80*x.iI,before:(0,D.jsx)(A,{blocks:U,query:c}),beforeWidth:20*x.iI,breadcrumbs:[{label:function(){return"Logs"}}],errors:k,pageName:Qe.M.PIPELINE_LOGS,pipeline:W,setErrors:S,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,D.jsx)(g.Z,{px:x.cd,py:1,children:(0,D.jsxs)(j.ZP,{children:[!$&&(0,D.jsxs)(D.Fragment,{children:[(0,w.x6)(fe)," logs found",(0,D.jsx)(Fe,{allPastLogsLoaded:se,loadNewerLogInterval:Oe,loadPastLogInterval:Ze,selectedRange:Z,setSelectedRange:O})]}),$&&"Searching..."]})}),(0,D.jsx)(p.Z,{light:!0}),$&&(0,D.jsx)(g.Z,{p:x.cd,children:(0,D.jsx)(ue.Z,{})}),!$&&pe.length>=1&&Se,(0,D.jsx)(g.Z,{p:"".concat(1.5*x.iI,"px"),children:(0,D.jsxs)(v.ZP,{alignItems:"center",children:[(0,D.jsx)(R.ZP,nn(nn({},ze),{},{onClick:function(){"0"===(null===G||void 0===G?void 0:G._offset)&&(null===G||void 0===G?void 0:G._limit)===String(Me)?V(null):(0,I.u7)({_limit:Me,_offset:0})},uuid:"logs/toolbar/load_newest",children:"Load latest logs"})),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(R.ZP,nn(nn({},ze),{},{backgroundColor:ge.Z.background.page,onClick:function(){var e;null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},uuid:"logs/toolbar/scroll_to_bottomt",children:"Scroll to bottom"})),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsxs)(L.Z,{children:[(0,D.jsx)(j.ZP,{noWrapping:!0,children:"Auto-scroll to new logs"}),(0,D.jsx)(g.Z,{mr:1}),(0,D.jsx)(Ke.Z,{checked:N,compact:!0,onCheck:Pe})]})]})})]})}on.getInitialProps=function(){var e=(0,i.Z)(c().mark((function e(n){var t;return c().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 ln=(0,ce.Z)(on)},11366:function(e,n,t){"use strict";t.d(n,{Ch:function(){return l},H8:function(){return r},Tz:function(){return c},g6:function(){return i},vF:function(){return o}});var r="pipeline_edit_before_tab_selected",i="pipeline_edit_hidden_blocks",o="pipeline_edit_block_output_logs",l="setup_ai_later",c="auto_scroll_logs"},42305:function(e,n,t){"use strict";t.d(n,{A5:function(){return b},AY:function(){return x},BP:function(){return j},JX:function(){return g},OC:function(){return d},Pc:function(){return y},Ro:function(){return _},Tz:function(){return v},Y_:function(){return O},d$:function(){return m},jV:function(){return Z},lJ:function(){return P},n1:function(){return f},s8:function(){return a},vk:function(){return o},yD:function(){return s}});var r,i,o,l=t(82394),c=t(92083),u=t.n(c);!function(e){e.TODAY="today",e.WEEK="week",e.MONTH="month"}(o||(o={}));var a=(r={},(0,l.Z)(r,o.TODAY,"today"),(0,l.Z)(r,o.WEEK,"last 7 days"),(0,l.Z)(r,o.MONTH,"last 30 days"),r),s=(i={},(0,l.Z)(i,o.TODAY,0),(0,l.Z)(i,o.WEEK,6),(0,l.Z)(i,o.MONTH,29),i),d="YYYY-MM-DD HH:mm:ss",p="YYYY-MM-DD HH:mm",f="YYYY-MM-DD",h="MMMM D, YYYY";function m(e,n){var t=n.dayAgo,r=n.includeSeconds,i=n.utcFormat,o=u()(e),l=p;return i&&(o=o.utc()),t&&(o=o.subtract(1,"days")),r&&(l=d),o.format(l)}function v(e){var n=m((new Date).toISOString(),{includeSeconds:!0,utcFormat:!0});return null!==e&&void 0!==e&&e.dateObj?new Date(n):n}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u().unix(e).format(null!==n&&void 0!==n&&n.withSeconds?d:p)}function j(e,n,t){return u()(e).utc().hours(+n).minutes(+t).format()}function b(e){return u()(e).unix()}function x(e,n,t,r){var i="".concat(e.toISOString().split("T")[0]," ").concat(n,":").concat(t);return r?"".concat(i,":").concat(r):i}function y(e){var n=u().unix(+e).utc();return{date:n.toDate(),hour:String(n.hour()),minute:String(n.minute())}}function _(e,n){var t=u().utc(),r=u().utc();null!==n&&void 0!==n&&n.localTime&&(t=u()().local(),r=u()().local());var i=(t=t.subtract(e,"days")).format(h),o=r.format(h);return null!==n&&void 0!==n&&n.endDateOnly?o:"".concat(i," - ").concat(o)}function Z(e,n){var t=null!==n&&void 0!==n&&n.localTime?u()().local():u().utc();if(e===o.WEEK){var r=s[o.WEEK];t=t.subtract(r,"days")}else if(e===o.MONTH){var i=s[o.MONTH];t=t.subtract(i,"days")}return null!==n&&void 0!==n&&n.isoString?t.startOf("day").toISOString():t.startOf("day").format(d)}function O(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90,n=new Date,t=[],r=0;r<e;r++)t.unshift(n.toISOString().split("T")[0]),n.setDate(n.getDate()-1);return t}function P(e){return e.padStart(2,"0")}},84779:function(e,n,t){"use strict";t.d(n,{JI:function(){return o},uf:function(){return i}});var r=t(75582),i=function(e){var n=String(e).split("."),t=(0,r.Z)(n,2),i=t[0],o=t[1];return"".concat(i.replace(/\B(?=(\d{3})+(?!\d))/g,",")).concat(o?".".concat(o):"")};function o(e){var n=Math.floor(Date.now()/1e3);return e>0?n-e:n}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(19464)}])}},function(e){e.O(0,[844,9902,426,4259,4495,1424,1005,7815,6422,547,4822,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);