mage-ai 0.9.66__py3-none-any.whl → 0.9.67__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mage-ai might be problematic. Click here for more details.
- mage_ai/data_preparation/decorators.py +15 -0
- mage_ai/data_preparation/executors/streaming_pipeline_executor.py +22 -12
- mage_ai/data_preparation/git/api.py +3 -0
- mage_ai/data_preparation/git/clients/gitlab.py +3 -2
- mage_ai/data_preparation/models/block/__init__.py +24 -18
- mage_ai/data_preparation/storage/gcs_storage.py +27 -2
- mage_ai/data_preparation/storage/local_storage.py +18 -3
- mage_ai/data_preparation/storage/s3_storage.py +7 -2
- mage_ai/data_preparation/templates/data_loaders/streaming/generic_python.py +23 -0
- mage_ai/data_preparation/templates/template.py +6 -2
- mage_ai/data_preparation/variable_manager.py +2 -1
- mage_ai/io/bigquery.py +2 -0
- mage_ai/io/oracledb.py +14 -2
- mage_ai/orchestration/job_manager.py +6 -1
- mage_ai/server/constants.py +1 -1
- mage_ai/server/frontend_dist/404.html +2 -2
- mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-913116aa749f7ca6.js → _app-1c1ffd928f5a00f7.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +1 -0
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{edit-d84556cefbe31a1a.js → edit-36377e679da2cd91.js} +1 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js +1 -0
- mage_ai/server/frontend_dist/_next/static/{rtugsJoijF2SsCCB5_yKS → vPsMu6Fi2zrHaf2fRXKRO}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist/block-layout.html +2 -2
- mage_ai/server/frontend_dist/compute.html +2 -2
- mage_ai/server/frontend_dist/files.html +2 -2
- mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-data-products.html +2 -2
- mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/index.html +2 -2
- mage_ai/server/frontend_dist/manage/files.html +2 -2
- mage_ai/server/frontend_dist/manage/settings.html +2 -2
- mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist/manage/users.html +2 -2
- mage_ai/server/frontend_dist/manage.html +2 -2
- mage_ai/server/frontend_dist/oauth.html +2 -2
- mage_ai/server/frontend_dist/overview.html +2 -2
- mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist/pipelines.html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist/settings.html +2 -2
- mage_ai/server/frontend_dist/sign-in.html +2 -2
- mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist/templates.html +2 -2
- mage_ai/server/frontend_dist/terminal.html +2 -2
- mage_ai/server/frontend_dist/test.html +2 -2
- mage_ai/server/frontend_dist/triggers.html +2 -2
- mage_ai/server/frontend_dist/version-control.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/404.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-913116aa749f7ca6.js → _app-1c1ffd928f5a00f7.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-b7b8695a7f9efde2.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{edit-d84556cefbe31a1a.js → edit-36377e679da2cd91.js} +1 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js +1 -0
- mage_ai/server/frontend_dist_base_path_template/_next/static/{wxqkF4diPqRxUfP6Ac6ai → khKiaJtwrslgMmp4YSa1f}/_buildManifest.js +1 -1
- mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/compute.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-data-products.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/files.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/manage.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/oauth.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/overview.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/pipelines.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/sign-in.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +2 -2
- mage_ai/server/frontend_dist_base_path_template/templates.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/terminal.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/triggers.html +2 -2
- mage_ai/server/frontend_dist_base_path_template/version-control.html +2 -2
- mage_ai/services/aws/s3/s3.py +8 -2
- mage_ai/settings/server.py +6 -1
- mage_ai/shared/logger.py +12 -6
- mage_ai/streaming/sources/base_python.py +30 -0
- mage_ai/streaming/sources/source_factory.py +25 -0
- mage_ai/tests/data_preparation/models/test_block.py +39 -2
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.67.dist-info}/METADATA +1 -1
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.67.dist-info}/RECORD +149 -147
- mage_ai/server/frontend_dist/_next/static/chunks/pages/index-64851458dde54ad9.js +0 -1
- mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-64851458dde54ad9.js +0 -1
- mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js +0 -1
- /mage_ai/server/frontend_dist/_next/static/{rtugsJoijF2SsCCB5_yKS → vPsMu6Fi2zrHaf2fRXKRO}/_ssgManifest.js +0 -0
- /mage_ai/server/frontend_dist_base_path_template/_next/static/{wxqkF4diPqRxUfP6Ac6ai → khKiaJtwrslgMmp4YSa1f}/_ssgManifest.js +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.67.dist-info}/LICENSE +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.67.dist-info}/WHEEL +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.67.dist-info}/entry_points.txt +0 -0
- {mage_ai-0.9.66.dist-info → mage_ai-0.9.67.dist-info}/top_level.txt +0 -0
mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/logs-cf656cbe37ecaacc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(25976),i=t(46684),o=34*t(70515).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(25976),i=t(44897),o=t(42631),l=t(70515),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 ")}))},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(55485),l=t(44085),c=t(38276),u=t(30160),s=t(88785),a=t(70515),d=t(86735),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.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,v=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),v((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.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(),v((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.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))}))})]})]})}},59860:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return sn}});var r,i=t(77837),o=t(82394),l=t(38860),c=t.n(l),u=t(25976),s=t(4804),a=t(82684),d=t(44425),p=t(15338),f=t(71180),h=t(70652),v=t(39867),m=t(55485),g=t(38276),j=t(30160),b=t(74395),x=t(70515),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"}(Z||(Z={}));var O=t(42631),P=t(79633);var I,S=(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 ")})),k=u.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],S,O.n_),w=t(81728),C=t(55283),L=t(15610),E=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 T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,o.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(e){e.BLOCK_RUN_ID="block_run_id[]",e.BLOCK_TYPE="block_type[]",e.BLOCK_UUID="block_uuid[]",e.LEVEL="level[]",e.PIPELINE_RUN_ID="pipeline_run_id[]",e.PIPELINE_SCHEDULE_ID="pipeline_schedule_id[]"}(I||(I={}));var A=function(e){var n=e.blocks,t=e.query,r=(0,a.useContext)(u.ThemeContext),i=(0,a.useMemo)((function(){return t[I.LEVEL]}),[t]),l=(0,a.useMemo)((function(){return t[I.BLOCK_TYPE]}),[t]),c=(0,a.useMemo)((function(){return t[I.BLOCK_UUID]}),[t]),s=(0,a.useMemo)((function(){return t[I.PIPELINE_SCHEDULE_ID]}),[t]),p=(0,a.useMemo)((function(){return t[I.PIPELINE_RUN_ID]}),[t]),Z=(0,a.useMemo)((function(){return t[I.BLOCK_RUN_ID]}),[t]);return(0,E.jsx)(b.M,{children:(0,E.jsxs)(g.Z,{p:x.cd,children:[(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),_.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{level:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(i)&&(null===i||void 0===i?void 0:i.includes(String(e)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(k,T({},(0,o.Z)({},e.toLowerCase(),!0))),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,children:(0,w.kC)(e.toLowerCase())})]})})},e)}))]}),(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_type:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(v.Z,{color:(0,C.qn)(e,{theme:r}).accent,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e.uuid)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(v.Z,{color:(0,C.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===s||void 0===s?void 0:s.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),s.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{pipeline_schedule_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(s)&&(null===s||void 0===s?void 0:s.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===p||void 0===p?void 0:p.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),p.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{pipeline_run_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(p)&&(null===p||void 0===p?void 0:p.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===Z||void 0===Z?void 0:Z.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),Z.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_run_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(Z)&&(null===Z||void 0===Z?void 0:Z.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},R=t(97618),N=t(68562),B=t(75582),M=t(90299),U=t(48670),W=t(75499),J=u.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],S,.5*x.iI),Y=u.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],S,O.BG,.25*x.iI,.5*x.iI),F=t(72473),H=t(92083),G=t.n(H);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 K=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/,$=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function V(e){var n=e.content.trim().split($),t=[],r=[];return n.forEach((function(e){var n=e.trim();K.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($),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 X(e,n){return e?null!==n&&void 0!==n&&n.localTimezone?G().unix(e).local().format():G().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS"):""}var Q=t(86735);function ee(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 ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=["error","error_stack","error_stacktrace"],re={uuid:"Details"},ie={uuid:"Errors"};var oe=function(e){var n=e.log,t=e.onClose,r=e.selectedTab,i=e.setSelectedTab,l=(0,a.useState)(!1),c=l[0],u=l[1],s=n.data,d=n.name,h=n.path,v=s||{},b=v.error,y=v.error_stack,Z=v.error_stacktrace,_=v.level,O=v.timestamp,P=(0,o.Z)({},_.toLowerCase(),!0),I=(0,a.useMemo)((function(){var e=[["file name",d],["file path",h]];return Object.entries(s).forEach((function(n){var t=(0,B.Z)(n,2),r=t[0],i=t[1];te.includes(r)||e.push([r,i])})),Z&&e.push(["error",Z]),(0,Q.YC)(e,(function(e){var n=(0,B.Z)(e,2),t=n[0];n[1];return t}))}),[s,Z,d,h]),S=(0,a.useMemo)((function(){var e=[re];return b&&e.push(ie),(0,E.jsx)(M.Z,{onClickTab:i,selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:e})}),[b,r,i]);return(0,E.jsxs)("div",{children:[(0,E.jsx)(J,ne({},P)),(0,E.jsx)(g.Z,{p:x.cd,children:(0,E.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,E.jsxs)(R.Z,{alignItems:"center",children:[(0,E.jsx)(Y,ne(ne({},P),{},{children:(0,E.jsx)(j.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:_})})),(0,E.jsx)(g.Z,{mr:x.cd}),(0,E.jsx)(j.ZP,{monospace:!0,children:X(O)})]}),(0,E.jsx)(f.ZP,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,E.jsx)(F.Close,{size:1.5*x.iI})})]})}),(0,E.jsx)(p.Z,{medium:!0}),(0,E.jsx)(g.Z,{py:x.cd,children:S}),re.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,E.jsx)(W.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===I||void 0===I?void 0:I.map((function(e,n){var t=(0,B.Z)(e,2),r=t[0],i=t[1],o="message"===r,l="tags"===r,s=i,a=i;if(l?a=s=(0,w.Pb)(i)?JSON.parse(JSON.stringify(i,null,2)):JSON.stringify(i,null,2):o&&c&&(0,w.Pb)(i)&&(a=JSON.stringify(JSON.parse(i),null,2),s=(0,E.jsx)("pre",{children:a})),"object"===typeof s)try{s=JSON.stringify(s,null,2),s=(0,E.jsx)("pre",{children:s})}catch(d){}return"object"===typeof a&&(a=JSON.stringify(a)),[(0,E.jsx)(j.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(j.ZP,{monospace:!0,textOverflow:!0,title:a,whiteSpaceNormal:o&&c||l,wordBreak:o&&c||l,children:[!l&&s,l&&(0,E.jsx)("pre",{children:s})]},"".concat(r,"_").concat(n,"_val")),o&&(0,E.jsx)(U.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"}),ie.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,E.jsxs)(g.Z,{mb:5,px:x.cd,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),y&&(0,E.jsxs)(g.Z,{mt:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},le=t(21831),ce=t(89565),ue=t.n(ce),se=t(12691),ae=t.n(se),de=t(80017),pe=t(57653),fe=t(98464),he=t(46684),ve=t(44897),me=t(47041),ge=u.default.div.withConfig({displayName:"indexstyle__TableContainer",componentId:"sc-16j4vp6-0"})([".table_row > div{margin:","px ","px;}div{","}"],.5*x.iI,x.iI,me.w5),je=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||ve.Z).borders.medium2,";\n ")})),be=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||ve.Z).borders.light,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return!e.selected&&"\n &:hover {\n background: ".concat((e.theme.interactive||ve.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||ve.Z.interactive).activeBorder,";\n ")})),xe=t(93859),ye=t(53808),Ze=t(69419),_e=function(e){var n=(0,Ze.iV)(),t=((null===n||void 0===n?void 0:n[I.PIPELINE_SCHEDULE_ID])||[]).join(",");return"".concat(e,"/logs/triggers/").concat(t)},Oe=t(70320),Pe=t(19183);function Ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke="log_uuid";var we,Ce,Le,Ee=function(e){var n=e.autoScrollLogs,t=e.blocksByUUID,r=e.tableInnerRef,i=e.logs,l=e.onRowClick,c=e.pipeline,u=e.query,s=e.saveScrollPosition,d=e.setSelectedLog,p=e.themeContext,f=(0,Oe.qB)(),h=(0,Pe.i)().height,b=(0,a.useRef)(null),y=(0,a.useMemo)((function(){return pe.qL.INTEGRATION===(null===c||void 0===c?void 0:c.type)}),[c.type]),Z=(0,fe.Z)(i);(0,a.useEffect)((function(){var e;n&&(Z||[]).length!==(i||[]).length&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(!1))}),[n,i,Z,r]);var _=(0,a.useMemo)((function(){return _e(null===c||void 0===c?void 0:c.uuid)}),[null===c||void 0===c?void 0:c.uuid]);(0,a.useEffect)((function(){var e;s&&(null===b||void 0===b||null===(e=b.current)||void 0===e||e.scrollTo((0,ye.U2)(_,0)))}),[s,_]);var O=Object.keys(t||{});if(y){var P,I,S=((null===c||void 0===c||null===(P=c.data_integration)||void 0===P||null===(I=P.catalog)||void 0===I?void 0:I.streams)||[]).map((function(e){return e.tap_stream_id})),w=new Set;O.forEach((function(e){S.forEach((function(n){return w.add("".concat(e,":").concat(n,":0"))}))})),O=Array.from(w)}var D=(0,a.useMemo)((function(){var e=null===i||void 0===i?void 0:i.map((function(e){var n;return null===(n=e.name.split(".log")[0])||void 0===n?void 0:n.length})),n=Math.max.apply(Math,(0,le.Z)(e));return Math.min(n*xe.r+12+8,50*x.iI)}),[i]),T=[{uuid:"_",width:28},{uuid:"Date",width:f?202:214},{uuid:"Block",width:D+16},{uuid:"Message"},{uuid:"_"}],A=(0,a.useCallback)((function(e){var n,t=e.data,r=e.index,i=e.style,c=t.blocksByUUID,s=t.logs,a=t.themeContext,p=s[r],h=p.content,b=p.data,Z=p.name,_=b||{},O=_.block_uuid,P=_.level,I=_.message,S=_.pipeline_uuid,w=_.timestamp,T=_.uuid,A=null==I?h:I;Array.isArray(A)?A=A.join(" "):"object"===typeof A&&(A=JSON.stringify(A));var N,B,M=O||Z.split(".log")[0],W=M,J=W.split(":");y&&(W=J[0],N=J[1],B=J[2]);var Y=c[W];if(Y||(Y=c[J[0]]),Y){var H=(0,C.qn)(Y.type,{blockColor:Y.color,theme:a}).accent;n=(0,E.jsx)(m.ZP,{alignItems:"center",children:(0,E.jsx)(ae(),{as:"/pipelines/".concat(S,"/edit?block_uuid=").concat(W),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,E.jsxs)(U.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,E.jsx)(v.Z,{color:H,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(j.ZP,{disableWordBreak:!0,monospace:!0,noWrapping:!0,title:O,width:D-16,children:[M,N&&":",N&&(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:N}),B>=0&&":",B>=0&&(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:B})]})]})})})}return(0,E.jsxs)(be,{className:"table_row",onClick:function(){var e,n,t=s[r],i=null===(e=t.data)||void 0===e?void 0:e.uuid;u.log_uuid===i&&(i=null),null!==(n=t.data)&&void 0!==n&&n.error?null===l||void 0===l||l(ie):null===l||void 0===l||l(re),(0,L.u)((0,o.Z)({},ke,i)),d(i?t:null)},selected:(null===u||void 0===u?void 0:u.log_uuid)&&(null===u||void 0===u?void 0:u.log_uuid)===T,style:Se({},i),children:[(0,E.jsx)(R.Z,{alignItems:"center",justifyContent:"center",children:(0,E.jsx)(k,Se({},(0,o.Z)({},null===P||void 0===P?void 0:P.toLowerCase(),!0)))},"log_type"),(0,E.jsx)(R.Z,{children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,noWrapping:!0,small:f,children:X(w,{localTimezone:f})},"log_timestamp")}),(0,E.jsx)(R.Z,{style:{minWidth:D,width:D},children:n}),(0,E.jsx)(R.Z,{style:{overflow:"auto"},children:(0,E.jsx)(j.ZP,{monospace:!0,textOverflow:!0,title:A,children:(0,E.jsx)(ue(),{children:A})},"log_message")}),(0,E.jsx)(R.Z,{flex:"1",justifyContent:"flex-end",children:(0,E.jsx)(F.ChevronRight,{default:!0,size:2*x.iI})},"chevron_right_icon")]})}),[D,f,y,l,u,d]);return(0,E.jsxs)(ge,{children:[(0,E.jsx)(je,{children:T.map((function(e,n){return(0,E.jsx)(R.Z,{alignItems:"center",style:{height:4*x.iI,minWidth:e.width||null,width:e.width||null},children:"_"!==e.uuid&&(0,E.jsx)(j.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.uuid})},"".concat(e,"_").concat(n))}))}),(0,E.jsx)(de.t7,{height:h-he.Mz-86-34-58,innerRef:r,itemCount:i.length,itemData:{blocksByUUID:t,logs:i,pipeline:c,themeContext:p},itemSize:3.75*x.iI,onScroll:function(e){var n=e.scrollOffset,t=e.scrollDirection;!s||"forward"===t&&0===n||(0,ye.t8)(_,n)},ref:b,width:"100%",children:A})]})},De=t(34376),Te=t(14805),Ae=t(50724),Re=t(44085),Ne=t(17488),Be=20,Me=[Z.LAST_HOUR,Z.LAST_DAY,Z.LAST_WEEK,Z.LAST_30_DAYS],Ue=(we={},(0,o.Z)(we,Z.LAST_HOUR,3600),(0,o.Z)(we,Z.LAST_DAY,86400),(0,o.Z)(we,Z.LAST_WEEK,604800),(0,o.Z)(we,Z.LAST_30_DAYS,2592e3),we),We=t(11498),Je=t(48277),Ye=t(3917),Fe=t(42122);function He(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?He(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(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"}(Le||(Le={}));var qe=(Ce={},(0,o.Z)(Ce,We.$D.LIMIT,Be),(0,o.Z)(Ce,We.$D.OFFSET,0),Ce),ze={blackBorder:!0,inline:!0,paddingBottom:.75*x.iI,paddingTop:.75*x.iI};var Ke=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,i=e.saveScrollPosition,l=e.selectedRange,c=e.setSelectedRange,u=(0,a.useState)(null),s=u[0],d=u[1],p=(0,a.useState)(null),h=p[0],v=p[1],b=(0,a.useState)({hour:"00",minute:"00"}),y=b[0],_=b[1],O=(0,a.useState)(new Date),P=O[0],I=O[1],S=(0,a.useState)({hour:(0,Ye.lJ)(String((new Date).getUTCHours())),minute:(0,Ye.lJ)(String((new Date).getUTCMinutes()))}),k=S[0],w=S[1],C=(0,De.useRouter)().query.pipeline,D=(0,Ze.iV)(),T=(0,fe.Z)(D);(0,a.useEffect)((function(){if(!(0,Fe.Xy)(D,T)){var e=D.start_timestamp,n=D.end_timestamp;if(e){var t=(0,Ye.Pc)(e),r=t.date,i=t.hour,o=t.minute;v(r),_({hour:(0,Ye.lJ)(i),minute:(0,Ye.lJ)(o)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-Ue[Z.LAST_DAY])<=60&&c(Z.LAST_DAY)}if(n){var u=(0,Ye.Pc)(n),s=u.date,a=u.hour,d=u.minute;I(s),w({hour:(0,Ye.lJ)(a),minute:(0,Ye.lJ)(d)})}}}),[D,T]);var A=(0,a.useCallback)((function(){if(i){var e=_e(C);(0,ye.t8)(e,0)}}),[C,i]);return(0,E.jsx)(g.Z,{py:1,children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:n,onClick:function(){A(),r()},uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:(null===D||void 0===D?void 0:D._offset)<=0,onClick:function(){A(),t()},uuid:"logs/load_newer_logs",children:"Load newer logs"})),(0,E.jsx)(g.Z,{mr:2}),(0,E.jsx)(Re.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(A(),c(n),Me.includes(n)){var t,r=(0,Je.JI)(Ue[n]);(0,L.u)(Ge((t={},(0,o.Z)(t,Le.START,r),(0,o.Z)(t,Le.END,null),t),qe))}},paddingRight:4*x.iI,placeholder:"Select time range",value:l,children:Object.values(Z).map((function(e){return(0,E.jsx)("option",{value:e,children:e},e)}))}),(0,E.jsx)(g.Z,{mr:1}),l===Z.CUSTOM_RANGE&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Ne.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(0)},paddingRight:0,placeholder:"Start",value:h?(0,Ye.AY)(h,null===y||void 0===y?void 0:y.hour,null===y||void 0===y?void 0:y.minute):""}),(0,E.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:0===s,style:{position:"relative"},children:(0,E.jsx)(Te.Z,{selectedDate:h,selectedTime:y,setSelectedDate:v,setSelectedTime:_})}),(0,E.jsx)(g.Z,{px:1,children:(0,E.jsx)(j.ZP,{children:"to"})}),(0,E.jsx)(Ne.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(1)},paddingRight:0,placeholder:"End",value:P?(0,Ye.AY)(P,null===k||void 0===k?void 0:k.hour,null===k||void 0===k?void 0:k.minute):""}),(0,E.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:1===s,style:{position:"relative"},children:(0,E.jsx)(Te.Z,{selectedDate:P,selectedTime:k,setSelectedDate:I,setSelectedTime:w})}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(f.ZP,{borderRadius:"".concat(x.iI/2,"px"),onClick:function(){var e;A();var n=(0,Ye.BP)(h,y.hour,y.minute),t=(0,Ye.BP)(P,k.hour,k.minute);(0,L.u)(Ge((e={},(0,o.Z)(e,Le.START,(0,Ye.A5)(n)),(0,o.Z)(e,Le.END,(0,Ye.A5)(t)),e),qe))},padding:"".concat(x.iI/2,"px"),primary:!0,children:"Search"})]})]})})},$e=t(75457),Ve=t(93808),Xe=t(4190),Qe=t(69650),en=t(35686),nn=t(78419),tn=t(28795);function rn(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 on(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rn(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ln="pipeline_run_id[]",cn="block_run_id[]";function un(e){var n=e.pipeline,t=(0,a.useContext)(u.ThemeContext),r=(0,a.useRef)(null),i=n.uuid,l=(0,a.useState)(null),c=l[0],f=l[1],h=(0,a.useState)(null),v=h[0],b=h[1],y=(0,a.useState)(null),_=y[0],O=y[1],P=(0,a.useState)(null),S=P[0],k=P[1],C=(0,a.useState)(re),D=C[0],T=C[1],B=(0,a.useState)((0,ye.U2)(nn.Tz,!0)),M=B[0],U=B[1],W=en.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,J=(0,a.useMemo)((function(){return on(on({},null===W||void 0===W?void 0:W.pipeline),{},{uuid:i})}),[W,i]),Y=(null===J||void 0===J?void 0:J.type)===pe.qL.INTEGRATION,F=(0,a.useMemo)((function(){return J.blocks||[]}),[J]),H=(0,a.useMemo)((function(){var e=(0,Q.HK)(F,(function(e){return e.uuid}));if(Y){var n,t=(0,Q.sE)(F,(function(e){var n=e.type;return d.tf.DATA_LOADER===n})),r=t?(0,s.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 F.forEach((function(e){var n=e.uuid,i=e.type,o="".concat(n,":").concat(t);r[o]={type:i}})),on(on({},e),r)}),{});e=on(on({},i),e)}return e}),[F,Y]),G=(0,Ze.iV)(),q=(0,a.useMemo)((function(){return(null===G||void 0===G?void 0:G.hasOwnProperty(I.PIPELINE_SCHEDULE_ID))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.LEVEL))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.BLOCK_TYPE))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.BLOCK_UUID))}),[G]),z=!(null!==G&&void 0!==G&&G.start_timestamp)&&!(null!==G&&void 0!==G&&G.hasOwnProperty(ln)||null!==G&&void 0!==G&&G.hasOwnProperty(cn)),K=(0,Je.JI)(Ue[Z.LAST_DAY]),$=en.ZP.logs.pipelines.list(c?i:null,(0,Fe.gR)(z?on(on({},c),{},{start_timestamp:K}):c,[ke]),{refreshInterval:5e3}),X=$.data,ee=$.mutate,ne=!X,te=(0,a.useMemo)((function(){var e;if(null!==X&&void 0!==X&&null!==(e=X.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=X.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}}),[X]),ie=te.blockRunLogs,le=te.pipelineRunLogs,ce=te.totalBlockRunLogCount,ue=te.totalPipelineRunLogCount,se=+(null===G||void 0===G?void 0:G._limit)>=ce&&+(null===G||void 0===G?void 0:G._limit)>=ue,ae=(0,a.useMemo)((function(){return(0,Q.YC)(ie.concat(le).reduce((function(e,n){return e.concat(V(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ie,le]),de=(0,a.useMemo)((function(){return ae.filter((function(e){var n=e.data,t=[];if(!c)return!0;if(t.push(!(0,Fe.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(Y)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=H[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}))}))}),[H,Y,ae,c]),he=de.length,me=(0,fe.Z)(G);(0,a.useEffect)((function(){var e;z&&(0,L.u)((e={},(0,o.Z)(e,We.$D.LIMIT,Be),(0,o.Z)(e,We.$D.OFFSET,0),(0,o.Z)(e,"start_timestamp",K),e))}),[z]),(0,a.useEffect)((function(){(0,Fe.Xy)(G,me)||f(G)}),[G,me]);var ge=(0,fe.Z)(v);(0,a.useEffect)((function(){var e=G.log_uuid;!e||v||ge||b(ae.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[ae,G,v,ge]);var je=G._limit,be=G._offset,xe=+(je||0),_e=+(be||0),Oe=Math.max(ce,ue),Pe=(0,a.useCallback)((function(){var e,n=xe,t=_e;(ce>xe||ue>xe)&&(n=Math.min(Oe,xe+Be),t=Math.min(_e+Be,Oe-Oe%Be),(0,L.u)(on(on({},G),{},(e={},(0,o.Z)(e,We.$D.LIMIT,n),(0,o.Z)(e,We.$D.OFFSET,t),e))))}),[Oe,xe,_e,G,ce,ue]),Ie=(0,a.useCallback)((function(){var e,n=xe,t=_e;xe>=Be&&(n=Math.max(Be,xe-Be),xe>=Oe&&Oe%Be!==0&&(n=Oe-Oe%Be),t=Math.max(0,_e-Be),(0,L.u)(on(on({},G),{},(e={},(0,o.Z)(e,We.$D.LIMIT,n),(0,o.Z)(e,We.$D.OFFSET,t),e))))}),[Oe,xe,_e,G]),Se=(0,a.useCallback)((function(){var e=!M;U(e),(0,ye.t8)(nn.Tz,e)}),[M]),we=(0,a.useMemo)((function(){return(0,E.jsx)(Ee,{autoScrollLogs:M,blocksByUUID:H,logs:de,onRowClick:T,pipeline:J,query:c,saveScrollPosition:q,setSelectedLog:b,tableInnerRef:r,themeContext:t})}),[M,H,de,J,c,q,t]);return(0,E.jsxs)($e.Z,{after:v&&(0,E.jsx)(oe,{log:v,onClose:function(){(0,L.u)((0,o.Z)({},ke,null)),b(null)},selectedTab:D,setSelectedTab:T}),afterHidden:!v,afterWidth:80*x.iI,before:(0,E.jsx)(A,{blocks:F,query:c}),beforeWidth:20*x.iI,breadcrumbs:[{label:function(){return"Logs"}}],errors:S,pageName:tn.M.PIPELINE_LOGS,pipeline:J,setErrors:k,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,E.jsx)(g.Z,{px:x.cd,py:1,children:(0,E.jsxs)(j.ZP,{children:[!ne&&(0,E.jsxs)(E.Fragment,{children:[(0,w.x6)(he)," logs found",(0,E.jsx)(Ke,{allPastLogsLoaded:se,loadNewerLogInterval:Ie,loadPastLogInterval:Pe,saveScrollPosition:q,selectedRange:_,setSelectedRange:O})]}),ne&&"Searching..."]})}),(0,E.jsx)(p.Z,{light:!0}),ne&&(0,E.jsx)(g.Z,{p:x.cd,children:(0,E.jsx)(Xe.Z,{})}),!ne&&de.length>=1&&we,(0,E.jsx)(g.Z,{p:"".concat(1.5*x.iI,"px"),children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(N.ZP,on(on({},ze),{},{onClick:function(){"0"===(null===G||void 0===G?void 0:G._offset)&&(null===G||void 0===G?void 0:G._limit)===String(Be)?ee(null):(0,L.u)({_limit:Be,_offset:0})},uuid:"logs/toolbar/load_newest",children:"Load latest logs"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(N.ZP,on(on({},ze),{},{backgroundColor:ve.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,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(R.Z,{children:[(0,E.jsx)(j.ZP,{noWrapping:!0,children:"Auto-scroll to new logs"}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(Qe.Z,{checked:M,compact:!0,onCheck:Se})]})]})})]})}un.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 sn=(0,Ve.Z)(un)},48277:function(e,n,t){"use strict";t.d(n,{$P:function(){return s},JI:function(){return o},VJ:function(){return u},fD:function(){return l},uf:function(){return i},vN:function(){return c}});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}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function u(e,n){return String(BigInt(e)-BigInt(n))}function s(e){return parseInt(e,2)}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(59860)}])}},function(e){e.O(0,[7674,1557,3782,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/index-64851458dde54ad9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{55006:function(n,i,e){"use strict";e.r(i);var u=e(82684),t=e(34376),o=e(35686),a=e(87432),l=e(66916);i.default=function(){var n,i=(0,t.useRouter)(),e=i.asPath,s=e.split("?")[0],r=o.ZP.statuses.list().data,v=(0,u.useMemo)((function(){var n;return null===r||void 0===r||null===(n=r.statuses)||void 0===n?void 0:n[0]}),[r]),d=o.ZP.pipeline_runs.list({_limit:0}).data,c=0===(0,u.useMemo)((function(){var n;return(null===d||void 0===d||null===(n=d.metadata)||void 0===n?void 0:n.count)||0}),[null===d||void 0===d||null===(n=d.metadata)||void 0===n?void 0:n.count])?"/pipelines":"/overview";(0,u.useEffect)((function(){(0,a.xf)()&&(0,l.a3)()}),[]),(0,u.useEffect)((function(){var n;if(403===(null===d||void 0===d||null===(n=d.error)||void 0===n?void 0:n.code))i.replace("/sign-in");else if(v){var u=null===v||void 0===v?void 0:v.is_instance_manager,t=e;"/"===s&&(t=u?"/manage":c),d&&i.replace(t)}}),[s,e,d,v,c,i])}},48312:function(n,i,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return e(55006)}])}},function(n){n.O(0,[9774,2888,179],(function(){return i=48312,n(n.s=i);var i}));var i=n.O();_N_E=i}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4794],{74395:function(e,n,t){"use strict";t.d(n,{M:function(){return l},W:function(){return o}});var r=t(25976),i=t(46684),o=34*t(70515).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},88785:function(e,n,t){"use strict";t.d(n,{J:function(){return u},U:function(){return c}});var r=t(25976),i=t(44897),o=t(42631),l=t(70515),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 ")}))},14805:function(e,n,t){"use strict";var r=t(82394),i=t(44495),o=t(55485),l=t(44085),c=t(38276),u=t(30160),s=t(88785),a=t(70515),d=t(86735),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.localTime,t=e.selectedDate,r=e.selectedTime,f=e.setSelectedDate,v=e.setSelectedTime,m=e.topPosition;return(0,p.jsxs)(s.J,{absolute:!0,topPosition:m,children:[(0,p.jsx)(i.ZP,{onChange:f,value:t}),(0,p.jsx)(c.Z,{mb:2}),(0,p.jsxs)(o.ZP,{alignItems:"center",children:[(0,p.jsxs)(u.ZP,{default:!0,large:!0,children:["Time (",n?"Local":"UTC","):"]}),(0,p.jsx)(c.Z,{pr:2}),(0,p.jsx)(l.Z,{compact:!0,monospace:!0,onChange:function(e){e.preventDefault(),v((function(n){return h(h({},n),{},{hour:e.target.value})}))},paddingRight:5*a.iI,placeholder:"HH",value:null===r||void 0===r?void 0:r.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(),v((function(n){return h(h({},n),{},{minute:e.target.value})}))},paddingRight:5*a.iI,placeholder:"MM",value:null===r||void 0===r?void 0:r.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))}))})]})]})}},59860:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return sn}});var r,i=t(77837),o=t(82394),l=t(38860),c=t.n(l),u=t(25976),s=t(4804),a=t(82684),d=t(44425),p=t(15338),f=t(71180),h=t(70652),v=t(39867),m=t(55485),g=t(38276),j=t(30160),b=t(74395),x=t(70515),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"}(Z||(Z={}));var O=t(42631),P=t(79633);var I,S=(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 ")})),k=u.default.div.withConfig({displayName:"indexstyle__LogLevelIndicatorStyle",componentId:"sc-1e2zh7m-0"})([""," border-radius:","px;height:12px;width:5px;"],S,O.n_),w=t(81728),C=t(55283),L=t(15610),E=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 T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,o.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(e){e.BLOCK_RUN_ID="block_run_id[]",e.BLOCK_TYPE="block_type[]",e.BLOCK_UUID="block_uuid[]",e.LEVEL="level[]",e.PIPELINE_RUN_ID="pipeline_run_id[]",e.PIPELINE_SCHEDULE_ID="pipeline_schedule_id[]"}(I||(I={}));var A=function(e){var n=e.blocks,t=e.query,r=(0,a.useContext)(u.ThemeContext),i=(0,a.useMemo)((function(){return t[I.LEVEL]}),[t]),l=(0,a.useMemo)((function(){return t[I.BLOCK_TYPE]}),[t]),c=(0,a.useMemo)((function(){return t[I.BLOCK_UUID]}),[t]),s=(0,a.useMemo)((function(){return t[I.PIPELINE_SCHEDULE_ID]}),[t]),p=(0,a.useMemo)((function(){return t[I.PIPELINE_RUN_ID]}),[t]),Z=(0,a.useMemo)((function(){return t[I.BLOCK_RUN_ID]}),[t]);return(0,E.jsx)(b.M,{children:(0,E.jsxs)(g.Z,{p:x.cd,children:[(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Log level"})}),_.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{level:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(i)&&(null===i||void 0===i?void 0:i.includes(String(e)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(k,T({},(0,o.Z)({},e.toLowerCase(),!0))),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,children:(0,w.kC)(e.toLowerCase())})]})})},e)}))]}),(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_type:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(l)&&(null===l||void 0===l?void 0:l.includes(String(e)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(v.Z,{color:(0,C.qn)(e,{theme:r}).accent,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,muted:!0,monospace:!0,children:e})]})})},e)}))]}),(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_uuid:e.uuid},{isList:!0,resetLimitParams:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(c)&&(null===c||void 0===c?void 0:c.includes(String(e.uuid)))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(v.Z,{color:(0,C.qn)(e.type,{blockColor:e.color,theme:r}).accent,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,muted:!0,children:e.uuid})]})})},e.uuid)}))]}),(null===s||void 0===s?void 0:s.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Trigger"})}),s.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{pipeline_schedule_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(s)&&(null===s||void 0===s?void 0:s.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-schedule-".concat(e))}))]}),(null===p||void 0===p?void 0:p.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline run"})}),p.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{pipeline_run_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(p)&&(null===p||void 0===p?void 0:p.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"pipeline-run-".concat(e))}))]}),(null===Z||void 0===Z?void 0:Z.length)&&(0,E.jsxs)(g.Z,{mb:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.jsx)(j.ZP,{bold:!0,default:!0,large:!0,children:"Block run"})}),Z.map((function(e){return(0,E.jsx)(f.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){return(0,L.g)(t,{block_run_id:e},{isList:!0})},children:(0,E.jsx)(y,{children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(h.Z,{checked:Array.isArray(Z)&&(null===Z||void 0===Z?void 0:Z.includes(e))}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(j.ZP,{disableWordBreak:!0,monospace:!0,children:e})]})})},"block-run-".concat(e))}))]})]})})},R=t(97618),N=t(68562),B=t(75582),M=t(90299),U=t(48670),W=t(75499),J=u.default.div.withConfig({displayName:"indexstyle__BarStyle",componentId:"sc-1r43sbu-0"})([""," height:","px;width:100%;"],S,.5*x.iI),Y=u.default.div.withConfig({displayName:"indexstyle__BadgeStyle",componentId:"sc-1r43sbu-1"})([""," border-radius:","px;display:inline-block;padding:","px ","px;"],S,O.BG,.25*x.iI,.5*x.iI),F=t(72473),H=t(92083),G=t.n(H);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 K=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/,$=/([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}) (.+)/;function V(e){var n=e.content.trim().split($),t=[],r=[];return n.forEach((function(e){var n=e.trim();K.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($),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 X(e,n){return e?null!==n&&void 0!==n&&n.localTimezone?G().unix(e).local().format():G().unix(e).utc().format("YYYY-MM-DD HH:mm:ss.SSS"):""}var Q=t(86735);function ee(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 ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=["error","error_stack","error_stacktrace"],re={uuid:"Details"},ie={uuid:"Errors"};var oe=function(e){var n=e.log,t=e.onClose,r=e.selectedTab,i=e.setSelectedTab,l=(0,a.useState)(!1),c=l[0],u=l[1],s=n.data,d=n.name,h=n.path,v=s||{},b=v.error,y=v.error_stack,Z=v.error_stacktrace,_=v.level,O=v.timestamp,P=(0,o.Z)({},_.toLowerCase(),!0),I=(0,a.useMemo)((function(){var e=[["file name",d],["file path",h]];return Object.entries(s).forEach((function(n){var t=(0,B.Z)(n,2),r=t[0],i=t[1];te.includes(r)||e.push([r,i])})),Z&&e.push(["error",Z]),(0,Q.YC)(e,(function(e){var n=(0,B.Z)(e,2),t=n[0];n[1];return t}))}),[s,Z,d,h]),S=(0,a.useMemo)((function(){var e=[re];return b&&e.push(ie),(0,E.jsx)(M.Z,{onClickTab:i,selectedTabUUID:null===r||void 0===r?void 0:r.uuid,tabs:e})}),[b,r,i]);return(0,E.jsxs)("div",{children:[(0,E.jsx)(J,ne({},P)),(0,E.jsx)(g.Z,{p:x.cd,children:(0,E.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,E.jsxs)(R.Z,{alignItems:"center",children:[(0,E.jsx)(Y,ne(ne({},P),{},{children:(0,E.jsx)(j.ZP,{bold:!0,inverted:!0,monospace:!0,small:!0,children:_})})),(0,E.jsx)(g.Z,{mr:x.cd}),(0,E.jsx)(j.ZP,{monospace:!0,children:X(O)})]}),(0,E.jsx)(f.ZP,{iconOnly:!0,noBackground:!0,onClick:function(){return t()},children:(0,E.jsx)(F.Close,{size:1.5*x.iI})})]})}),(0,E.jsx)(p.Z,{medium:!0}),(0,E.jsx)(g.Z,{py:x.cd,children:S}),re.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,E.jsx)(W.Z,{columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:null===I||void 0===I?void 0:I.map((function(e,n){var t=(0,B.Z)(e,2),r=t[0],i=t[1],o="message"===r,l="tags"===r,s=i,a=i;if(l?a=s=(0,w.Pb)(i)?JSON.parse(JSON.stringify(i,null,2)):JSON.stringify(i,null,2):o&&c&&(0,w.Pb)(i)&&(a=JSON.stringify(JSON.parse(i),null,2),s=(0,E.jsx)("pre",{children:a})),"object"===typeof s)try{s=JSON.stringify(s,null,2),s=(0,E.jsx)("pre",{children:s})}catch(d){}return"object"===typeof a&&(a=JSON.stringify(a)),[(0,E.jsx)(j.ZP,{monospace:!0,muted:!0,children:r},"".concat(r,"_").concat(n,"_key")),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(j.ZP,{monospace:!0,textOverflow:!0,title:a,whiteSpaceNormal:o&&c||l,wordBreak:o&&c||l,children:[!l&&s,l&&(0,E.jsx)("pre",{children:s})]},"".concat(r,"_").concat(n,"_val")),o&&(0,E.jsx)(U.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"}),ie.uuid===(null===r||void 0===r?void 0:r.uuid)&&(0,E.jsxs)(g.Z,{mb:5,px:x.cd,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))})),y&&(0,E.jsxs)(g.Z,{mt:3,children:[(0,E.jsx)(g.Z,{mb:1,children:(0,E.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,E.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,small:!0,children:e},e)}))}))]})]})]})},le=t(21831),ce=t(89565),ue=t.n(ce),se=t(12691),ae=t.n(se),de=t(80017),pe=t(57653),fe=t(98464),he=t(46684),ve=t(44897),me=t(47041),ge=u.default.div.withConfig({displayName:"indexstyle__TableContainer",componentId:"sc-16j4vp6-0"})([".table_row > div{margin:","px ","px;}div{","}"],.5*x.iI,x.iI,me.w5),je=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||ve.Z).borders.medium2,";\n ")})),be=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||ve.Z).borders.light,";\n\n &:hover {\n cursor: pointer;\n }\n ")}),(function(e){return!e.selected&&"\n &:hover {\n background: ".concat((e.theme.interactive||ve.Z.interactive).rowHoverBackground,";\n cursor: pointer;\n }\n ")}),(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||ve.Z.interactive).activeBorder,";\n ")})),xe=t(93859),ye=t(53808),Ze=t(69419),_e=function(e){var n=(0,Ze.iV)(),t=((null===n||void 0===n?void 0:n[I.PIPELINE_SCHEDULE_ID])||[]).join(",");return"".concat(e,"/logs/triggers/").concat(t)},Oe=t(70320),Pe=t(19183);function Ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke="log_uuid";var we,Ce,Le,Ee=function(e){var n=e.autoScrollLogs,t=e.blocksByUUID,r=e.tableInnerRef,i=e.logs,l=e.onRowClick,c=e.pipeline,u=e.query,s=e.saveScrollPosition,d=e.setSelectedLog,p=e.themeContext,f=(0,Oe.qB)(),h=(0,Pe.i)().height,b=(0,a.useRef)(null),y=(0,a.useMemo)((function(){return pe.qL.INTEGRATION===(null===c||void 0===c?void 0:c.type)}),[c.type]),Z=(0,fe.Z)(i);(0,a.useEffect)((function(){var e;n&&(Z||[]).length!==(i||[]).length&&(null===r||void 0===r||null===(e=r.current)||void 0===e||e.scrollIntoView(!1))}),[n,i,Z,r]);var _=(0,a.useMemo)((function(){return _e(null===c||void 0===c?void 0:c.uuid)}),[null===c||void 0===c?void 0:c.uuid]);(0,a.useEffect)((function(){var e;s&&(null===b||void 0===b||null===(e=b.current)||void 0===e||e.scrollTo((0,ye.U2)(_,0)))}),[s,_]);var O=Object.keys(t||{});if(y){var P,I,S=((null===c||void 0===c||null===(P=c.data_integration)||void 0===P||null===(I=P.catalog)||void 0===I?void 0:I.streams)||[]).map((function(e){return e.tap_stream_id})),w=new Set;O.forEach((function(e){S.forEach((function(n){return w.add("".concat(e,":").concat(n,":0"))}))})),O=Array.from(w)}var D=(0,a.useMemo)((function(){var e=null===i||void 0===i?void 0:i.map((function(e){var n;return null===(n=e.name.split(".log")[0])||void 0===n?void 0:n.length})),n=Math.max.apply(Math,(0,le.Z)(e));return Math.min(n*xe.r+12+8,50*x.iI)}),[i]),T=[{uuid:"_",width:28},{uuid:"Date",width:f?202:214},{uuid:"Block",width:D+16},{uuid:"Message"},{uuid:"_"}],A=(0,a.useCallback)((function(e){var n,t=e.data,r=e.index,i=e.style,c=t.blocksByUUID,s=t.logs,a=t.themeContext,p=s[r],h=p.content,b=p.data,Z=p.name,_=b||{},O=_.block_uuid,P=_.level,I=_.message,S=_.pipeline_uuid,w=_.timestamp,T=_.uuid,A=null==I?h:I;Array.isArray(A)?A=A.join(" "):"object"===typeof A&&(A=JSON.stringify(A));var N,B,M=O||Z.split(".log")[0],W=M,J=W.split(":");y&&(W=J[0],N=J[1],B=J[2]);var Y=c[W];if(Y||(Y=c[J[0]]),Y){var H=(0,C.qn)(Y.type,{blockColor:Y.color,theme:a}).accent;n=(0,E.jsx)(m.ZP,{alignItems:"center",children:(0,E.jsx)(ae(),{as:"/pipelines/".concat(S,"/edit?block_uuid=").concat(W),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,E.jsxs)(U.Z,{block:!0,fullWidth:!0,sameColorAsText:!0,verticalAlignContent:!0,children:[(0,E.jsx)(v.Z,{color:H,size:1.5*x.iI,square:!0}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(j.ZP,{disableWordBreak:!0,monospace:!0,noWrapping:!0,title:O,width:D-16,children:[M,N&&":",N&&(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:N}),B>=0&&":",B>=0&&(0,E.jsx)(j.ZP,{default:!0,inline:!0,monospace:!0,children:B})]})]})})})}return(0,E.jsxs)(be,{className:"table_row",onClick:function(){var e,n,t=s[r],i=null===(e=t.data)||void 0===e?void 0:e.uuid;u.log_uuid===i&&(i=null),null!==(n=t.data)&&void 0!==n&&n.error?null===l||void 0===l||l(ie):null===l||void 0===l||l(re),(0,L.u)((0,o.Z)({},ke,i)),d(i?t:null)},selected:(null===u||void 0===u?void 0:u.log_uuid)&&(null===u||void 0===u?void 0:u.log_uuid)===T,style:Se({},i),children:[(0,E.jsx)(R.Z,{alignItems:"center",justifyContent:"center",children:(0,E.jsx)(k,Se({},(0,o.Z)({},null===P||void 0===P?void 0:P.toLowerCase(),!0)))},"log_type"),(0,E.jsx)(R.Z,{children:(0,E.jsx)(j.ZP,{default:!0,monospace:!0,noWrapping:!0,small:f,children:X(w,{localTimezone:f})},"log_timestamp")}),(0,E.jsx)(R.Z,{style:{minWidth:D,width:D},children:n}),(0,E.jsx)(R.Z,{style:{overflow:"auto"},children:(0,E.jsx)(j.ZP,{monospace:!0,textOverflow:!0,title:A,children:(0,E.jsx)(ue(),{children:A})},"log_message")}),(0,E.jsx)(R.Z,{flex:"1",justifyContent:"flex-end",children:(0,E.jsx)(F.ChevronRight,{default:!0,size:2*x.iI})},"chevron_right_icon")]})}),[D,f,y,l,u,d]);return(0,E.jsxs)(ge,{children:[(0,E.jsx)(je,{children:T.map((function(e,n){return(0,E.jsx)(R.Z,{alignItems:"center",style:{height:4*x.iI,minWidth:e.width||null,width:e.width||null},children:"_"!==e.uuid&&(0,E.jsx)(j.ZP,{bold:!0,leftAligned:!0,monospace:!0,muted:!0,children:e.uuid})},"".concat(e,"_").concat(n))}))}),(0,E.jsx)(de.t7,{height:h-he.Mz-86-34-58,innerRef:r,itemCount:i.length,itemData:{blocksByUUID:t,logs:i,pipeline:c,themeContext:p},itemSize:3.75*x.iI,onScroll:function(e){var n=e.scrollOffset,t=e.scrollDirection;!s||"forward"===t&&0===n||(0,ye.t8)(_,n)},ref:b,width:"100%",children:A})]})},De=t(34376),Te=t(14805),Ae=t(50724),Re=t(44085),Ne=t(17488),Be=20,Me=[Z.LAST_HOUR,Z.LAST_DAY,Z.LAST_WEEK,Z.LAST_30_DAYS],Ue=(we={},(0,o.Z)(we,Z.LAST_HOUR,3600),(0,o.Z)(we,Z.LAST_DAY,86400),(0,o.Z)(we,Z.LAST_WEEK,604800),(0,o.Z)(we,Z.LAST_30_DAYS,2592e3),we),We=t(11498),Je=t(48277),Ye=t(3917),Fe=t(42122);function He(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?He(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(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"}(Le||(Le={}));var qe=(Ce={},(0,o.Z)(Ce,We.$D.LIMIT,Be),(0,o.Z)(Ce,We.$D.OFFSET,0),Ce),ze={blackBorder:!0,inline:!0,paddingBottom:.75*x.iI,paddingTop:.75*x.iI};var Ke=function(e){var n=e.allPastLogsLoaded,t=e.loadNewerLogInterval,r=e.loadPastLogInterval,i=e.saveScrollPosition,l=e.selectedRange,c=e.setSelectedRange,u=(0,a.useState)(null),s=u[0],d=u[1],p=(0,a.useState)(null),h=p[0],v=p[1],b=(0,a.useState)({hour:"00",minute:"00"}),y=b[0],_=b[1],O=(0,a.useState)(new Date),P=O[0],I=O[1],S=(0,a.useState)({hour:(0,Ye.lJ)(String((new Date).getUTCHours())),minute:(0,Ye.lJ)(String((new Date).getUTCMinutes()))}),k=S[0],w=S[1],C=(0,De.useRouter)().query.pipeline,D=(0,Ze.iV)(),T=(0,fe.Z)(D);(0,a.useEffect)((function(){if(!(0,Fe.Xy)(D,T)){var e=D.start_timestamp,n=D.end_timestamp;if(e){var t=(0,Ye.Pc)(e),r=t.date,i=t.hour,o=t.minute;v(r),_({hour:(0,Ye.lJ)(i),minute:(0,Ye.lJ)(o)});var l=Math.ceil(Date.now()/1e3)-e;Math.abs(l-Ue[Z.LAST_DAY])<=60&&c(Z.LAST_DAY)}if(n){var u=(0,Ye.Pc)(n),s=u.date,a=u.hour,d=u.minute;I(s),w({hour:(0,Ye.lJ)(a),minute:(0,Ye.lJ)(d)})}}}),[D,T]);var A=(0,a.useCallback)((function(){if(i){var e=_e(C);(0,ye.t8)(e,0)}}),[C,i]);return(0,E.jsx)(g.Z,{py:1,children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:n,onClick:function(){A(),r()},uuid:"logs/load_older_logs",children:n?"All past logs within range loaded":"Load older logs"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(N.ZP,Ge(Ge({},ze),{},{disabled:(null===D||void 0===D?void 0:D._offset)<=0,onClick:function(){A(),t()},uuid:"logs/load_newer_logs",children:"Load newer logs"})),(0,E.jsx)(g.Z,{mr:2}),(0,E.jsx)(Re.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault();var n=e.target.value;if(A(),c(n),Me.includes(n)){var t,r=(0,Je.JI)(Ue[n]);(0,L.u)(Ge((t={},(0,o.Z)(t,Le.START,r),(0,o.Z)(t,Le.END,null),t),qe))}},paddingRight:4*x.iI,placeholder:"Select time range",value:l,children:Object.values(Z).map((function(e){return(0,E.jsx)("option",{value:e,children:e},e)}))}),(0,E.jsx)(g.Z,{mr:1}),l===Z.CUSTOM_RANGE&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Ne.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(0)},paddingRight:0,placeholder:"Start",value:h?(0,Ye.AY)(h,null===y||void 0===y?void 0:y.hour,null===y||void 0===y?void 0:y.minute):""}),(0,E.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:0===s,style:{position:"relative"},children:(0,E.jsx)(Te.Z,{selectedDate:h,selectedTime:y,setSelectedDate:v,setSelectedTime:_})}),(0,E.jsx)(g.Z,{px:1,children:(0,E.jsx)(j.ZP,{children:"to"})}),(0,E.jsx)(Ne.Z,{compact:!0,defaultColor:!0,onClick:function(){return d(1)},paddingRight:0,placeholder:"End",value:P?(0,Ye.AY)(P,null===k||void 0===k?void 0:k.hour,null===k||void 0===k?void 0:k.minute):""}),(0,E.jsx)(Ae.Z,{onClickOutside:function(){return d(null)},open:1===s,style:{position:"relative"},children:(0,E.jsx)(Te.Z,{selectedDate:P,selectedTime:k,setSelectedDate:I,setSelectedTime:w})}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(f.ZP,{borderRadius:"".concat(x.iI/2,"px"),onClick:function(){var e;A();var n=(0,Ye.BP)(h,y.hour,y.minute),t=(0,Ye.BP)(P,k.hour,k.minute);(0,L.u)(Ge((e={},(0,o.Z)(e,Le.START,(0,Ye.A5)(n)),(0,o.Z)(e,Le.END,(0,Ye.A5)(t)),e),qe))},padding:"".concat(x.iI/2,"px"),primary:!0,children:"Search"})]})]})})},$e=t(75457),Ve=t(93808),Xe=t(4190),Qe=t(69650),en=t(35686),nn=t(78419),tn=t(28795);function rn(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 on(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?rn(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rn(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ln="pipeline_run_id[]",cn="block_run_id[]";function un(e){var n=e.pipeline,t=(0,a.useContext)(u.ThemeContext),r=(0,a.useRef)(null),i=n.uuid,l=(0,a.useState)(null),c=l[0],f=l[1],h=(0,a.useState)(null),v=h[0],b=h[1],y=(0,a.useState)(null),_=y[0],O=y[1],P=(0,a.useState)(null),S=P[0],k=P[1],C=(0,a.useState)(re),D=C[0],T=C[1],B=(0,a.useState)((0,ye.U2)(nn.Tz,!0)),M=B[0],U=B[1],W=en.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,J=(0,a.useMemo)((function(){return on(on({},null===W||void 0===W?void 0:W.pipeline),{},{uuid:i})}),[W,i]),Y=(null===J||void 0===J?void 0:J.type)===pe.qL.INTEGRATION,F=(0,a.useMemo)((function(){return J.blocks||[]}),[J]),H=(0,a.useMemo)((function(){var e=(0,Q.HK)(F,(function(e){return e.uuid}));if(Y){var n,t=(0,Q.sE)(F,(function(e){var n=e.type;return d.tf.DATA_LOADER===n})),r=t?(0,s.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 F.forEach((function(e){var n=e.uuid,i=e.type,o="".concat(n,":").concat(t);r[o]={type:i}})),on(on({},e),r)}),{});e=on(on({},i),e)}return e}),[F,Y]),G=(0,Ze.iV)(),q=(0,a.useMemo)((function(){return(null===G||void 0===G?void 0:G.hasOwnProperty(I.PIPELINE_SCHEDULE_ID))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.LEVEL))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.BLOCK_TYPE))&&!(null!==G&&void 0!==G&&G.hasOwnProperty(I.BLOCK_UUID))}),[G]),z=!(null!==G&&void 0!==G&&G.start_timestamp)&&!(null!==G&&void 0!==G&&G.hasOwnProperty(ln)||null!==G&&void 0!==G&&G.hasOwnProperty(cn)),K=(0,Je.JI)(Ue[Z.LAST_DAY]),$=en.ZP.logs.pipelines.list(c?i:null,(0,Fe.gR)(z?on(on({},c),{},{start_timestamp:K}):c,[ke]),{refreshInterval:5e3}),X=$.data,ee=$.mutate,ne=!X,te=(0,a.useMemo)((function(){var e;if(null!==X&&void 0!==X&&null!==(e=X.logs)&&void 0!==e&&e[0]){var n,t=(null===(n=X.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}}),[X]),ie=te.blockRunLogs,le=te.pipelineRunLogs,ce=te.totalBlockRunLogCount,ue=te.totalPipelineRunLogCount,se=+(null===G||void 0===G?void 0:G._limit)>=ce&&+(null===G||void 0===G?void 0:G._limit)>=ue,ae=(0,a.useMemo)((function(){return(0,Q.YC)(ie.concat(le).reduce((function(e,n){return e.concat(V(n))}),[]),(function(e){var n=e.data;return(null===n||void 0===n?void 0:n.timestamp)||0}))}),[ie,le]),de=(0,a.useMemo)((function(){return ae.filter((function(e){var n=e.data,t=[];if(!c)return!0;if(t.push(!(0,Fe.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(Y)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=H[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}))}))}),[H,Y,ae,c]),he=de.length,me=(0,fe.Z)(G);(0,a.useEffect)((function(){var e;z&&(0,L.u)((e={},(0,o.Z)(e,We.$D.LIMIT,Be),(0,o.Z)(e,We.$D.OFFSET,0),(0,o.Z)(e,"start_timestamp",K),e))}),[z]),(0,a.useEffect)((function(){(0,Fe.Xy)(G,me)||f(G)}),[G,me]);var ge=(0,fe.Z)(v);(0,a.useEffect)((function(){var e=G.log_uuid;!e||v||ge||b(ae.find((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.uuid)===e})))}),[ae,G,v,ge]);var je=G._limit,be=G._offset,xe=+(je||0),_e=+(be||0),Oe=Math.max(ce,ue),Pe=(0,a.useCallback)((function(){var e,n=xe,t=_e;(ce>xe||ue>xe)&&(n=Math.min(Oe,xe+Be),t=Math.min(_e+Be,Oe-Oe%Be),(0,L.u)(on(on({},G),{},(e={},(0,o.Z)(e,We.$D.LIMIT,n),(0,o.Z)(e,We.$D.OFFSET,t),e))))}),[Oe,xe,_e,G,ce,ue]),Ie=(0,a.useCallback)((function(){var e,n=xe,t=_e;xe>=Be&&(n=Math.max(Be,xe-Be),xe>=Oe&&Oe%Be!==0&&(n=Oe-Oe%Be),t=Math.max(0,_e-Be),(0,L.u)(on(on({},G),{},(e={},(0,o.Z)(e,We.$D.LIMIT,n),(0,o.Z)(e,We.$D.OFFSET,t),e))))}),[Oe,xe,_e,G]),Se=(0,a.useCallback)((function(){var e=!M;U(e),(0,ye.t8)(nn.Tz,e)}),[M]),we=(0,a.useMemo)((function(){return(0,E.jsx)(Ee,{autoScrollLogs:M,blocksByUUID:H,logs:de,onRowClick:T,pipeline:J,query:c,saveScrollPosition:q,setSelectedLog:b,tableInnerRef:r,themeContext:t})}),[M,H,de,J,c,q,t]);return(0,E.jsxs)($e.Z,{after:v&&(0,E.jsx)(oe,{log:v,onClose:function(){(0,L.u)((0,o.Z)({},ke,null)),b(null)},selectedTab:D,setSelectedTab:T}),afterHidden:!v,afterWidth:80*x.iI,before:(0,E.jsx)(A,{blocks:F,query:c}),beforeWidth:20*x.iI,breadcrumbs:[{label:function(){return"Logs"}}],errors:S,pageName:tn.M.PIPELINE_LOGS,pipeline:J,setErrors:k,subheader:null,title:function(e){var n=e.name;return"".concat(n," logs")},uuid:"pipeline/logs",children:[(0,E.jsx)(g.Z,{px:x.cd,py:1,children:(0,E.jsxs)(j.ZP,{children:[!ne&&(0,E.jsxs)(E.Fragment,{children:[(0,w.x6)(he)," logs found",(0,E.jsx)(Ke,{allPastLogsLoaded:se,loadNewerLogInterval:Ie,loadPastLogInterval:Pe,saveScrollPosition:q,selectedRange:_,setSelectedRange:O})]}),ne&&"Searching..."]})}),(0,E.jsx)(p.Z,{light:!0}),ne&&(0,E.jsx)(g.Z,{p:x.cd,children:(0,E.jsx)(Xe.Z,{})}),!ne&&de.length>=1&&we,(0,E.jsx)(g.Z,{p:"".concat(1.5*x.iI,"px"),children:(0,E.jsxs)(m.ZP,{alignItems:"center",children:[(0,E.jsx)(N.ZP,on(on({},ze),{},{onClick:function(){"0"===(null===G||void 0===G?void 0:G._offset)&&(null===G||void 0===G?void 0:G._limit)===String(Be)?ee(null):(0,L.u)({_limit:Be,_offset:0})},uuid:"logs/toolbar/load_newest",children:"Load latest logs"})),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(N.ZP,on(on({},ze),{},{backgroundColor:ve.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,E.jsx)(g.Z,{mr:1}),(0,E.jsxs)(R.Z,{children:[(0,E.jsx)(j.ZP,{noWrapping:!0,children:"Auto-scroll to new logs"}),(0,E.jsx)(g.Z,{mr:1}),(0,E.jsx)(Qe.Z,{checked:M,compact:!0,onCheck:Se})]})]})})]})}un.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 sn=(0,Ve.Z)(un)},48277:function(e,n,t){"use strict";t.d(n,{$P:function(){return s},JI:function(){return o},VJ:function(){return u},fD:function(){return l},uf:function(){return i},vN:function(){return c}});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}function l(e){return(e>>>0).toString(2)}function c(e,n){return String(BigInt(e)+BigInt(n))}function u(e,n){return String(BigInt(e)-BigInt(n))}function s(e){return parseInt(e,2)}},62453:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/logs",function(){return t(59860)}])}},function(e){e.O(0,[7674,1557,3782,9774,2888,179],(function(){return n=62453,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|