@lunora/studio 1.0.0-alpha.13 → 1.0.0-alpha.131
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.
- package/LICENSE.md +6 -0
- package/dist/index.d.ts +881 -786
- package/dist/index.js +1 -41
- package/dist/mount.d.ts +10 -10
- package/dist/mount.js +1 -26
- package/dist/packem_chunks/AdvisorHealthPanel.js +1 -0
- package/dist/packem_chunks/ApiTab.js +1 -0
- package/dist/packem_chunks/AuditPanel.js +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -0
- package/dist/packem_chunks/ExportImportPanel.js +3 -0
- package/dist/packem_chunks/FileBrowser.js +4 -0
- package/dist/packem_chunks/FunctionRunner.js +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -0
- package/dist/packem_chunks/HealthPanel.js +1 -0
- package/dist/packem_chunks/InsightsPanel.js +1 -0
- package/dist/packem_chunks/LogsPanel.js +1 -0
- package/dist/packem_chunks/MailPanel.js +2 -0
- package/dist/packem_chunks/MetricsPanel.js +1 -0
- package/dist/packem_chunks/NotificationsPanel.js +1 -0
- package/dist/packem_chunks/PitrPanel.js +1 -0
- package/dist/packem_chunks/SchemaViewer.js +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -0
- package/dist/packem_chunks/SettingsPanel.js +1 -0
- package/dist/packem_chunks/SqlEditorPanel.js +9 -0
- package/dist/packem_chunks/TableEditor.js +1 -0
- package/dist/packem_chunks/agents-panel.js +1 -0
- package/dist/packem_chunks/analytics-panel.js +1 -0
- package/dist/packem_chunks/auth-audit-panel.js +1 -0
- package/dist/packem_chunks/auth-config-panel.js +1 -0
- package/dist/packem_chunks/auth-sessions-panel.js +1 -0
- package/dist/packem_chunks/containers-panel.js +1 -0
- package/dist/packem_chunks/dashboards-panel.js +1 -0
- package/dist/packem_chunks/evals-panel.js +1 -0
- package/dist/packem_chunks/fanout-panel.js +1 -0
- package/dist/packem_chunks/flags-panel.js +1 -0
- package/dist/packem_chunks/issues-panel.js +1 -0
- package/dist/packem_chunks/kv-browser.js +1 -0
- package/dist/packem_chunks/log-drains-panel.js +4 -0
- package/dist/packem_chunks/migrations-route.js +1 -0
- package/dist/packem_chunks/organizations-panel.js +1 -0
- package/dist/packem_chunks/payments-panel.js +1 -0
- package/dist/packem_chunks/permissions-panel.js +1 -0
- package/dist/packem_chunks/queues-panel.js +1 -0
- package/dist/packem_chunks/reactors-panel.js +1 -0
- package/dist/packem_chunks/rls-panel.js +1 -0
- package/dist/packem_chunks/schedule-panel.js +1 -0
- package/dist/packem_chunks/sparkline.js +1 -0
- package/dist/packem_chunks/storage-rules-panel.js +1 -0
- package/dist/packem_chunks/subscriptions-panel.js +1 -0
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -0
- package/dist/packem_chunks/users-panel.js +1 -0
- package/dist/packem_chunks/vector-browser.js +1 -0
- package/dist/packem_chunks/workflows-panel.js +1 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-B6z7VLYt.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-Du1L7Ysj.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-uGgGOBYj.js +1 -0
- package/dist/packem_shared/CommandPalette-HqiXrWIm.js +1 -0
- package/dist/packem_shared/ConfirmButton-Cj2SOapE.js +1 -0
- package/dist/packem_shared/ConnectionBadge-Bh16X9-u.js +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.js +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-1Lrg55IV.js +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.js +1 -0
- package/dist/packem_shared/DataBrowser-W5TxvLB8.js +4 -0
- package/dist/packem_shared/DataFilters-3nbW0uax.js +1 -0
- package/dist/packem_shared/ErrorBoundary-BWNF98VF.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-LFznuyGe.js +1 -0
- package/dist/packem_shared/HomePanel-DmB0EKjl.js +1 -0
- package/dist/packem_shared/MigrationsPanel-BDNt136v.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-DgrpASYD.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-CiO3eXgI.js +1 -0
- package/dist/packem_shared/ShardInput-CdawpUiS.js +1 -0
- package/dist/packem_shared/Studio-CkNE_tEy.js +1 -0
- package/dist/packem_shared/StudioApp-BZP_0E2n.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-Bl547evf.js +1 -0
- package/dist/packem_shared/advisor-view-C1KFTXSH.js +1 -0
- package/dist/packem_shared/aggregateMetrics-A-Y7OH6R.js +1 -0
- package/dist/packem_shared/alert-C2SEhYS9.js +1 -0
- package/dist/packem_shared/app.d-D1bPR8FO.d.ts +252 -0
- package/dist/packem_shared/badge-cAk9Di1Q.js +1 -0
- package/dist/packem_shared/bar-chart-B6gzp_f9.js +6 -0
- package/dist/packem_shared/browser-storage-BH1MxLZs.js +1 -0
- package/dist/packem_shared/button-BOPLD1un.js +1 -0
- package/dist/packem_shared/card-BGlQzQY-.js +1 -0
- package/dist/packem_shared/cf-links-CBJ5SywP.js +1 -0
- package/dist/packem_shared/checkbox-C5w53W-E.js +1 -0
- package/dist/packem_shared/control-button-BOZ5K-FC.js +1 -0
- package/dist/packem_shared/data-grid-BFTQnkXq.js +1 -0
- package/dist/packem_shared/data-view-params-qoSTqjAj.js +1 -0
- package/dist/packem_shared/dropdown-menu-U7Tjg1Nb.js +2 -0
- package/dist/packem_shared/empty-state-B939z6K2.js +1 -0
- package/dist/packem_shared/error-alert-TYdKetJd.js +1 -0
- package/dist/packem_shared/grid-features-jBzZGauv.js +6 -0
- package/dist/packem_shared/home-panel-DHOa3sxt.js +3 -0
- package/dist/packem_shared/input-CY5W3wzv.js +1 -0
- package/dist/packem_shared/internal-CwaF9YNk.js +2 -0
- package/dist/packem_shared/label-BOUo-DP0.js +1 -0
- package/dist/packem_shared/live-status-Bf7rR8o8.js +1 -0
- package/dist/packem_shared/log-fields-SBxKyBug.js +1 -0
- package/dist/packem_shared/log-line-UnE93Ovi.js +1 -0
- package/dist/packem_shared/modal-shell-wGW4CKEW.js +1 -0
- package/dist/packem_shared/operation-console-provider-DoloEvon.js +1 -0
- package/dist/packem_shared/quote-identifier-CGiYFBvY.js +1 -0
- package/dist/packem_shared/recording-client-CKn4-vUx.js +1 -0
- package/dist/packem_shared/reference-view-BU2dNK9Z.js +13 -0
- package/dist/packem_shared/schema-diagram-DOaIh1y6.js +2 -0
- package/dist/packem_shared/scroll-area-DSJftwu_.js +2 -0
- package/dist/packem_shared/select-BPISLTcv.js +2 -0
- package/dist/packem_shared/shard-history-DU5b3QDI.js +1 -0
- package/dist/packem_shared/shortcuts-lH4Vaqjc.js +1 -0
- package/dist/packem_shared/skeleton-DFBBaJU6.js +1 -0
- package/dist/packem_shared/sparkline-CYbJzfA1.js +1 -0
- package/dist/packem_shared/sql-result-table-CqlZo2QN.js +1 -0
- package/dist/packem_shared/stat-card-B9uIvAHg.js +1 -0
- package/dist/packem_shared/storage-tier-C2mKwYRj.js +1 -0
- package/dist/packem_shared/studio-CXai1O2K.js +2 -0
- package/dist/packem_shared/table-BMsuYFhk.js +2 -0
- package/dist/packem_shared/table-list-sidebar-BWq_-gtu.js +1 -0
- package/dist/packem_shared/textarea-DpO3i-Qo.js +1 -0
- package/dist/packem_shared/trace-handoff-z9sy89Ci.js +1 -0
- package/dist/packem_shared/use-admin-query-P0RJrjsD.js +1 -0
- package/dist/packem_shared/use-async-submit-DdLd0MdK.js +1 -0
- package/dist/packem_shared/use-auth-config-z3KRWAqD.js +1 -0
- package/dist/packem_shared/use-open-trace-4mqqFWrn.js +1 -0
- package/dist/packem_shared/use-shard-key-BsP3o5wT.js +1 -0
- package/dist/packem_shared/use-sql-assistant-D1K2LqpO.js +1 -0
- package/dist/packem_shared/useDebounced-DVeQ5-oW.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-D_j7aLxX.js +1 -0
- package/dist/packem_shared/wire-codec-Dl3VeNrd.js +1 -0
- package/dist/standalone/chunk-26VREVWU.js +1 -0
- package/dist/standalone/chunk-2SFSTQS4.js +1 -0
- package/dist/standalone/chunk-2VGV6RPS.js +1 -0
- package/dist/standalone/chunk-2XOGZAF4.js +3 -0
- package/dist/standalone/chunk-333WFRWG.js +1 -0
- package/dist/standalone/chunk-362AVHNC.js +1 -0
- package/dist/standalone/chunk-3NXFFXQ2.js +1 -0
- package/dist/standalone/chunk-3S4VZ2ZM.js +1 -0
- package/dist/standalone/chunk-443UDYWL.js +6 -0
- package/dist/standalone/chunk-4PZEPCO7.js +1 -0
- package/dist/standalone/chunk-4YTSKL4R.js +1 -0
- package/dist/standalone/chunk-4ZCENYC3.js +1 -0
- package/dist/standalone/chunk-57VX76PR.js +1 -0
- package/dist/standalone/chunk-5EW733RQ.js +1 -0
- package/dist/standalone/chunk-5JLIP2HH.js +1 -0
- package/dist/standalone/chunk-6CBLYGXJ.js +1 -0
- package/dist/standalone/chunk-6UPO6ELN.js +1 -0
- package/dist/standalone/chunk-6ZPTNC34.js +19 -0
- package/dist/standalone/chunk-74ASA4WU.js +1 -0
- package/dist/standalone/chunk-76YLMHR3.js +1 -0
- package/dist/standalone/chunk-77JLGJ7V.js +1 -0
- package/dist/standalone/chunk-7PIHTTND.js +1 -0
- package/dist/standalone/chunk-7SROZWKL.js +1 -0
- package/dist/standalone/chunk-AFKLFS74.js +1 -0
- package/dist/standalone/chunk-AOAJGSYZ.js +2 -0
- package/dist/standalone/chunk-AXXNMZQ4.js +1 -0
- package/dist/standalone/chunk-BFCUKERU.js +8 -0
- package/dist/standalone/chunk-BQK2C2Z4.js +1 -0
- package/dist/standalone/chunk-BUIAZFSC.js +1 -0
- package/dist/standalone/chunk-BWEXJENB.js +1 -0
- package/dist/standalone/chunk-CA5ILAW2.js +14 -0
- package/dist/standalone/chunk-CAOUXOL7.js +1 -0
- package/dist/standalone/chunk-CKTKI4IY.js +1 -0
- package/dist/standalone/chunk-CL76PTLM.js +2 -0
- package/dist/standalone/chunk-CN2AINNY.js +1 -0
- package/dist/standalone/chunk-CP4ZFBVW.js +1 -0
- package/dist/standalone/chunk-CSYDKCNQ.js +1 -0
- package/dist/standalone/chunk-CYX3OHJ3.js +1 -0
- package/dist/standalone/chunk-DKSLOJDQ.js +1 -0
- package/dist/standalone/chunk-DPNEFSEC.js +1 -0
- package/dist/standalone/chunk-DUDQV6XJ.js +1 -0
- package/dist/standalone/chunk-DZGOHOOE.js +1 -0
- package/dist/standalone/chunk-EBI7CCQQ.js +1 -0
- package/dist/standalone/chunk-EDHW2EEG.js +1 -0
- package/dist/standalone/chunk-EE63P4VX.js +1 -0
- package/dist/standalone/chunk-ELO3V35K.js +1 -0
- package/dist/standalone/chunk-EVQ6LHI6.js +1 -0
- package/dist/standalone/chunk-EYGF6TQS.js +1 -0
- package/dist/standalone/chunk-F7JOSNAT.js +1 -0
- package/dist/standalone/chunk-FB5DOMZF.js +4 -0
- package/dist/standalone/chunk-FDLSPDIC.js +15 -0
- package/dist/standalone/chunk-FJ6G6FNE.js +1 -0
- package/dist/standalone/chunk-GIQDEWC4.js +1 -0
- package/dist/standalone/chunk-GSQURGCT.js +1 -0
- package/dist/standalone/chunk-H3BH6X3G.js +1 -0
- package/dist/standalone/chunk-H7YVFLA5.js +7 -0
- package/dist/standalone/chunk-HAIBZTXF.js +1 -0
- package/dist/standalone/chunk-HRD2DVIW.js +1 -0
- package/dist/standalone/chunk-IE5S3JMD.js +1 -0
- package/dist/standalone/chunk-INQICZYC.js +1 -0
- package/dist/standalone/chunk-IYWVSMAY.js +1 -0
- package/dist/standalone/chunk-IZXGBTPE.js +1 -0
- package/dist/standalone/chunk-JHXEEPRG.js +1 -0
- package/dist/standalone/chunk-JURAVSE7.js +1 -0
- package/dist/standalone/chunk-JUWOEHDD.js +1 -0
- package/dist/standalone/chunk-JV7KTJPY.js +1 -0
- package/dist/standalone/chunk-KTXD2N6F.js +1 -0
- package/dist/standalone/chunk-KVSQKUWD.js +1 -0
- package/dist/standalone/chunk-L4EZAHCD.js +1 -0
- package/dist/standalone/chunk-M3NNNOD5.js +1 -0
- package/dist/standalone/chunk-MCLM2QJI.js +1 -0
- package/dist/standalone/chunk-METRMDIQ.js +1 -0
- package/dist/standalone/chunk-MPYVZLYP.js +1 -0
- package/dist/standalone/chunk-MSCK3V6U.js +1 -0
- package/dist/standalone/chunk-MVZARXDR.js +1 -0
- package/dist/standalone/chunk-MYFFCV2R.js +1 -0
- package/dist/standalone/chunk-NIX2QSSN.js +1 -0
- package/dist/standalone/chunk-NNLNQKT7.js +59 -0
- package/dist/standalone/chunk-NSOLPNU7.js +1 -0
- package/dist/standalone/chunk-NXXGISFB.js +1 -0
- package/dist/standalone/chunk-O5MAFDY2.js +1 -0
- package/dist/standalone/chunk-OE4KGVJW.js +4 -0
- package/dist/standalone/chunk-OEGE3YDK.js +11 -0
- package/dist/standalone/chunk-OG57FC7W.js +1 -0
- package/dist/standalone/chunk-PQICDSPP.js +1 -0
- package/dist/standalone/chunk-PSPJORP6.js +1 -0
- package/dist/standalone/chunk-PZ4QDWTI.js +1 -0
- package/dist/standalone/chunk-QHQTOESO.js +1 -0
- package/dist/standalone/chunk-QO4SZ4WH.js +1 -0
- package/dist/standalone/chunk-R5ZTCHCE.js +1 -0
- package/dist/standalone/chunk-RCZTUWG3.js +1 -0
- package/dist/standalone/chunk-RJINX3H6.js +1 -0
- package/dist/standalone/chunk-RLRTQOFQ.js +1 -0
- package/dist/standalone/chunk-RPCMQE4A.js +1 -0
- package/dist/standalone/chunk-SJ4CA7QG.js +1 -0
- package/dist/standalone/chunk-SPDZUX4P.js +1 -0
- package/dist/standalone/chunk-SQMJUXBA.js +1 -0
- package/dist/standalone/chunk-SRQP7SLQ.js +1 -0
- package/dist/standalone/chunk-TB5N24CM.js +1 -0
- package/dist/standalone/chunk-TFMQSCGC.js +1 -0
- package/dist/standalone/chunk-TIANWRSD.js +1 -0
- package/dist/standalone/chunk-TNKECJW4.js +1 -0
- package/dist/standalone/chunk-TPAZM36C.js +1 -0
- package/dist/standalone/chunk-TV2M3PHL.js +1 -0
- package/dist/standalone/chunk-TVGQ7K5I.js +1 -0
- package/dist/standalone/chunk-U7LNRJHZ.js +1 -0
- package/dist/standalone/chunk-UANVABQG.js +1 -0
- package/dist/standalone/chunk-V6QPVFDL.js +1 -0
- package/dist/standalone/chunk-VHXQGKA7.js +1 -0
- package/dist/standalone/chunk-VLW547U6.js +1 -0
- package/dist/standalone/chunk-VR3UJA7B.js +1 -0
- package/dist/standalone/chunk-VZCS5GXZ.js +1 -0
- package/dist/standalone/chunk-W2FXNIVC.js +1 -0
- package/dist/standalone/chunk-W2JBKQNU.js +1 -0
- package/dist/standalone/chunk-WUW4ZHRL.js +1 -0
- package/dist/standalone/chunk-WXBTOI6T.js +1 -0
- package/dist/standalone/chunk-WY33QRLH.js +9 -0
- package/dist/standalone/chunk-XJSWM47N.js +1 -0
- package/dist/standalone/chunk-XNBAJ6XA.js +1 -0
- package/dist/standalone/chunk-XQS7KSHL.js +1 -0
- package/dist/standalone/chunk-Y2YQITGI.js +1 -0
- package/dist/standalone/chunk-Z6SECRFO.js +3 -0
- package/dist/standalone/chunk-ZHPDAJBM.js +1 -0
- package/dist/standalone/chunk-ZPGNTTQ3.js +1 -0
- package/dist/standalone/chunk-ZSOLGJFC.js +1 -0
- package/dist/standalone/studio.js +9 -378
- package/dist/styles.css +2 -2
- package/package.json +16 -15
- package/dist/packem_shared/ADMIN_FUNCTIONS-CZJCZ4c7.js +0 -47
- package/dist/packem_shared/ApiDocsPanel-yEz0fiof.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-DdubReQI.js +0 -251
- package/dist/packem_shared/AuditPanel-CE5ofjCc.js +0 -200
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-DpL8U-Nf.js +0 -4475
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/ExportImportPanel-ChsSUCYZ.js +0 -197
- package/dist/packem_shared/FileBrowser-DsRBnVhZ.js +0 -2932
- package/dist/packem_shared/FunctionRunner-D4cZ6fuA.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-BVelWgNv.js +0 -375
- package/dist/packem_shared/GlobalDataBrowser-3X9uRfdO.js +0 -289
- package/dist/packem_shared/HealthPanel-CxUVKfvo.js +0 -648
- package/dist/packem_shared/HomePanel-tfqpZxuu.js +0 -1334
- package/dist/packem_shared/InsightsPanel-DNg3K9XN.js +0 -461
- package/dist/packem_shared/LogsPanel-B4LoSRj0.js +0 -827
- package/dist/packem_shared/MailPanel-CcpdyWYs.js +0 -440
- package/dist/packem_shared/MetricsPanel-CxoyWbNb.js +0 -1611
- package/dist/packem_shared/MigrationsPanel-DGwJGWDA.js +0 -239
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-CKUzyyHi.js +0 -252
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-BWNwIN3I.js +0 -262
- package/dist/packem_shared/SchemaViewer-RclXFo9Q.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-Dqql1Z5O.js +0 -92
- package/dist/packem_shared/SettingsPanel-D5iTY0YE.js +0 -390
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-Dj-In-B3.js +0 -13
- package/dist/packem_shared/Studio-VWvKNOw4.js +0 -33
- package/dist/packem_shared/StudioApp-BhQ6T2pn.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-BY8bTpCl.js +0 -11
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/app.d-BVJFkXyj.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
- package/dist/packem_shared/sql-editor-panel-CMdxstu5.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-D8ry3tJR.js +0 -11043
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-editor-CWx68ZCg.js +0 -407
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-admin-query-BkbdNFNz.js +0 -105
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
|
@@ -1,461 +0,0 @@
|
|
|
1
|
-
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { useLunora } from '@lunora/react';
|
|
3
|
-
import { useNavigate } from '@tanstack/react-router';
|
|
4
|
-
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
5
|
-
import { ShardInput } from './ShardInput-gx_DZXXn.js';
|
|
6
|
-
import { B as Button } from './button-BhsN2uZH.js';
|
|
7
|
-
import { u as useAdminQuery } from './use-admin-query-BkbdNFNz.js';
|
|
8
|
-
import useDebounced from './useDebounced-Dxncpg6z.js';
|
|
9
|
-
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
10
|
-
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CZJCZ4c7.js';
|
|
11
|
-
import { f as fireAndForget, c as callOptions, a as adminRef } from './internal-rXJEAhXS.js';
|
|
12
|
-
import { r as recordShard } from './shard-history-DyebH1R5.js';
|
|
13
|
-
import { a as advisoryRow, A as AdvisorView } from './advisor-view-CGcfMiPq.js';
|
|
14
|
-
import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
|
|
15
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
16
|
-
import { deriveInsights } from './DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js';
|
|
17
|
-
import { runAdvisor, RUNTIME_LINTS } from '@lunora/advisor';
|
|
18
|
-
|
|
19
|
-
const hasIndexMetadata = (metadata) => {
|
|
20
|
-
const {
|
|
21
|
-
suggestedIndex,
|
|
22
|
-
table
|
|
23
|
-
} = metadata;
|
|
24
|
-
if (typeof table !== "string" || table.length === 0) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
if (typeof suggestedIndex !== "object" || suggestedIndex === null || !Array.isArray(suggestedIndex["fields"]) || suggestedIndex["fields"].length === 0) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
};
|
|
32
|
-
const composeCreateIndex = (table, indexName, fields) => {
|
|
33
|
-
const quotedTable = `"${table}"`;
|
|
34
|
-
const quotedIndex = `"${indexName}"`;
|
|
35
|
-
const quotedColumns = fields.map((f) => `"${f}"`).join(", ");
|
|
36
|
-
return `CREATE INDEX IF NOT EXISTS ${quotedIndex} ON ${quotedTable} (${quotedColumns});`;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const ApplyIndexButton = (t0) => {
|
|
40
|
-
const $ = c(19);
|
|
41
|
-
const {
|
|
42
|
-
fields,
|
|
43
|
-
indexName,
|
|
44
|
-
table,
|
|
45
|
-
testId
|
|
46
|
-
} = t0;
|
|
47
|
-
const t = useT();
|
|
48
|
-
const [applied, setApplied] = useState(false);
|
|
49
|
-
let t1;
|
|
50
|
-
if ($[0] !== fields || $[1] !== indexName || $[2] !== table) {
|
|
51
|
-
t1 = () => {
|
|
52
|
-
const clipboard = "navigator" in globalThis ? globalThis.navigator.clipboard : void 0;
|
|
53
|
-
if (clipboard === void 0) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const sql = composeCreateIndex(table, indexName, fields);
|
|
57
|
-
fireAndForget(clipboard.writeText(sql));
|
|
58
|
-
setApplied(true);
|
|
59
|
-
};
|
|
60
|
-
$[0] = fields;
|
|
61
|
-
$[1] = indexName;
|
|
62
|
-
$[2] = table;
|
|
63
|
-
$[3] = t1;
|
|
64
|
-
} else {
|
|
65
|
-
t1 = $[3];
|
|
66
|
-
}
|
|
67
|
-
const onConfirm = t1;
|
|
68
|
-
if (applied) {
|
|
69
|
-
const t22 = `${testId}-applied`;
|
|
70
|
-
let t32;
|
|
71
|
-
if ($[4] !== t) {
|
|
72
|
-
t32 = t("CREATE INDEX SQL copied to clipboard.");
|
|
73
|
-
$[4] = t;
|
|
74
|
-
$[5] = t32;
|
|
75
|
-
} else {
|
|
76
|
-
t32 = $[5];
|
|
77
|
-
}
|
|
78
|
-
let t42;
|
|
79
|
-
if ($[6] !== t22 || $[7] !== t32) {
|
|
80
|
-
t42 = /* @__PURE__ */ jsxDEV("span", {
|
|
81
|
-
className: "text-xs text-muted-foreground",
|
|
82
|
-
"data-testid": t22,
|
|
83
|
-
children: t32
|
|
84
|
-
}, void 0, false);
|
|
85
|
-
$[6] = t22;
|
|
86
|
-
$[7] = t32;
|
|
87
|
-
$[8] = t42;
|
|
88
|
-
} else {
|
|
89
|
-
t42 = $[8];
|
|
90
|
-
}
|
|
91
|
-
return t42;
|
|
92
|
-
}
|
|
93
|
-
let t2;
|
|
94
|
-
if ($[9] !== t) {
|
|
95
|
-
t2 = t("Apply?");
|
|
96
|
-
$[9] = t;
|
|
97
|
-
$[10] = t2;
|
|
98
|
-
} else {
|
|
99
|
-
t2 = $[10];
|
|
100
|
-
}
|
|
101
|
-
let t3;
|
|
102
|
-
if ($[11] !== t || $[12] !== table) {
|
|
103
|
-
t3 = t("Apply index on {table}", {
|
|
104
|
-
table
|
|
105
|
-
});
|
|
106
|
-
$[11] = t;
|
|
107
|
-
$[12] = table;
|
|
108
|
-
$[13] = t3;
|
|
109
|
-
} else {
|
|
110
|
-
t3 = $[13];
|
|
111
|
-
}
|
|
112
|
-
let t4;
|
|
113
|
-
if ($[14] !== onConfirm || $[15] !== t2 || $[16] !== t3 || $[17] !== testId) {
|
|
114
|
-
t4 = /* @__PURE__ */ jsxDEV(ConfirmButton, {
|
|
115
|
-
confirmLabel: t2,
|
|
116
|
-
onConfirm,
|
|
117
|
-
testId,
|
|
118
|
-
children: t3
|
|
119
|
-
}, void 0, false);
|
|
120
|
-
$[14] = onConfirm;
|
|
121
|
-
$[15] = t2;
|
|
122
|
-
$[16] = t3;
|
|
123
|
-
$[17] = testId;
|
|
124
|
-
$[18] = t4;
|
|
125
|
-
} else {
|
|
126
|
-
t4 = $[18];
|
|
127
|
-
}
|
|
128
|
-
return t4;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const reconcileIndexHits = (declaredIndexes, indexHits) => {
|
|
132
|
-
const readsByKey = /* @__PURE__ */ new Map();
|
|
133
|
-
for (const hit of indexHits) {
|
|
134
|
-
const key = `${hit.table} ${hit.index}`;
|
|
135
|
-
readsByKey.set(key, (readsByKey.get(key) ?? 0) + hit.reads);
|
|
136
|
-
}
|
|
137
|
-
return declaredIndexes.map((declared) => {
|
|
138
|
-
return {
|
|
139
|
-
index: declared.index,
|
|
140
|
-
reads: readsByKey.get(`${declared.table} ${declared.index}`) ?? 0,
|
|
141
|
-
table: declared.table
|
|
142
|
-
};
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
const aggregateTableScans = (functions) => {
|
|
146
|
-
const scansByTable = /* @__PURE__ */ new Map();
|
|
147
|
-
for (const callStat of functions) {
|
|
148
|
-
for (const attribution of callStat.scannedTables ?? []) {
|
|
149
|
-
scansByTable.set(attribution.table, (scansByTable.get(attribution.table) ?? 0) + attribution.scans);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return [...scansByTable].map(([table, scans]) => {
|
|
153
|
-
return {
|
|
154
|
-
scans,
|
|
155
|
-
table
|
|
156
|
-
};
|
|
157
|
-
});
|
|
158
|
-
};
|
|
159
|
-
const declaredIndexesFor = (table, indexes) => indexes.map((index) => {
|
|
160
|
-
return {
|
|
161
|
-
index: index.name,
|
|
162
|
-
table
|
|
163
|
-
};
|
|
164
|
-
});
|
|
165
|
-
const deriveRuntimeAdvisories = (inputs) => {
|
|
166
|
-
const inDoIndexHits = reconcileIndexHits(inputs.declaredIndexes ?? [], inputs.indexHits ?? []);
|
|
167
|
-
const inDoTableScans = aggregateTableScans(inputs.functions ?? []);
|
|
168
|
-
const inDoShardTraffic = inputs.shardTraffic ?? [];
|
|
169
|
-
const analytics = inputs.analyticsMetrics;
|
|
170
|
-
const indexHits = analytics && analytics.indexHits.length > 0 ? analytics.indexHits : inDoIndexHits;
|
|
171
|
-
const tableScans = analytics && analytics.tableScans.length > 0 ? analytics.tableScans : inDoTableScans;
|
|
172
|
-
const shardTraffic = analytics && analytics.shardTraffic.length > 0 ? analytics.shardTraffic : inDoShardTraffic;
|
|
173
|
-
const findings = runAdvisor({
|
|
174
|
-
indexHits,
|
|
175
|
-
schema: {
|
|
176
|
-
tables: []
|
|
177
|
-
},
|
|
178
|
-
shardTraffic,
|
|
179
|
-
tableScans
|
|
180
|
-
}, {
|
|
181
|
-
lints: RUNTIME_LINTS,
|
|
182
|
-
source: "runtime"
|
|
183
|
-
});
|
|
184
|
-
const suppress = inputs.suppressHotScanTables;
|
|
185
|
-
const visible = suppress === void 0 ? findings : findings.filter((finding) => !(finding.metadata["kind"] === "hot_scan" && typeof finding.metadata["table"] === "string" && suppress.has(finding.metadata["table"])));
|
|
186
|
-
return visible.map((finding) => advisoryRow(finding));
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
const LIST_TABLES = adminRef(ADMIN_FUNCTIONS.listTables);
|
|
190
|
-
const LIST_TABLE_INDEXES = adminRef(ADMIN_FUNCTIONS.listTableIndexes);
|
|
191
|
-
const percent = (rate) => `${(rate * 100).toFixed(1)}%`;
|
|
192
|
-
const seconds = (ms) => `${(ms / 1e3).toFixed(2)}s`;
|
|
193
|
-
const tableList = (tables) => {
|
|
194
|
-
if (tables.length <= 1) {
|
|
195
|
-
return tables[0] ?? "";
|
|
196
|
-
}
|
|
197
|
-
const last = tables[tables.length - 1] ?? "";
|
|
198
|
-
return `${tables.slice(0, -1).join(", ")} and ${last}`;
|
|
199
|
-
};
|
|
200
|
-
const insightTitle = (t, insight) => ({
|
|
201
|
-
"high-error-rate": t("High error rate"),
|
|
202
|
-
"high-evictions": t("High cache eviction rate"),
|
|
203
|
-
"high-write-contention": t("High write contention"),
|
|
204
|
-
"low-cache-hit-rate": t("Low cache hit rate"),
|
|
205
|
-
"missing-index": t("Missing index"),
|
|
206
|
-
"slow-function": t("Slow function")
|
|
207
|
-
})[insight.kind];
|
|
208
|
-
const insightDetail = (t, insight) => ({
|
|
209
|
-
"high-error-rate": t("{rate} of calls failed.", {
|
|
210
|
-
rate: percent(insight.value)
|
|
211
|
-
}),
|
|
212
|
-
"high-evictions": t("{count} entries evicted recently.", {
|
|
213
|
-
count: insight.value
|
|
214
|
-
}),
|
|
215
|
-
"high-write-contention": t("{rate} of calls hit a write conflict — consider sharding to cut contention.", {
|
|
216
|
-
rate: percent(insight.value)
|
|
217
|
-
}),
|
|
218
|
-
"low-cache-hit-rate": t("{rate} hit rate over recent traffic.", {
|
|
219
|
-
rate: percent(insight.value)
|
|
220
|
-
}),
|
|
221
|
-
"missing-index": t("Slowest call took {duration} — it full-scanned {tables} with no index.", {
|
|
222
|
-
duration: seconds(insight.value),
|
|
223
|
-
tables: tableList(insight.tables ?? [])
|
|
224
|
-
}),
|
|
225
|
-
"slow-function": t("Slowest call took {duration}.", {
|
|
226
|
-
duration: seconds(insight.value)
|
|
227
|
-
})
|
|
228
|
-
})[insight.kind];
|
|
229
|
-
const AddIndexButton = (t0) => {
|
|
230
|
-
const $ = c(10);
|
|
231
|
-
const {
|
|
232
|
-
onJump,
|
|
233
|
-
table
|
|
234
|
-
} = t0;
|
|
235
|
-
const t = useT();
|
|
236
|
-
let t1;
|
|
237
|
-
if ($[0] !== onJump || $[1] !== table) {
|
|
238
|
-
t1 = () => {
|
|
239
|
-
onJump(table);
|
|
240
|
-
};
|
|
241
|
-
$[0] = onJump;
|
|
242
|
-
$[1] = table;
|
|
243
|
-
$[2] = t1;
|
|
244
|
-
} else {
|
|
245
|
-
t1 = $[2];
|
|
246
|
-
}
|
|
247
|
-
const onClick = t1;
|
|
248
|
-
const t2 = `in-add-index-${table}`;
|
|
249
|
-
let t3;
|
|
250
|
-
if ($[3] !== t || $[4] !== table) {
|
|
251
|
-
t3 = t("Add index on {table}", {
|
|
252
|
-
table
|
|
253
|
-
});
|
|
254
|
-
$[3] = t;
|
|
255
|
-
$[4] = table;
|
|
256
|
-
$[5] = t3;
|
|
257
|
-
} else {
|
|
258
|
-
t3 = $[5];
|
|
259
|
-
}
|
|
260
|
-
let t4;
|
|
261
|
-
if ($[6] !== onClick || $[7] !== t2 || $[8] !== t3) {
|
|
262
|
-
t4 = /* @__PURE__ */ jsxDEV(Button, {
|
|
263
|
-
"data-testid": t2,
|
|
264
|
-
onClick,
|
|
265
|
-
size: "sm",
|
|
266
|
-
type: "button",
|
|
267
|
-
variant: "outline",
|
|
268
|
-
children: t3
|
|
269
|
-
}, void 0, false);
|
|
270
|
-
$[6] = onClick;
|
|
271
|
-
$[7] = t2;
|
|
272
|
-
$[8] = t3;
|
|
273
|
-
$[9] = t4;
|
|
274
|
-
} else {
|
|
275
|
-
t4 = $[9];
|
|
276
|
-
}
|
|
277
|
-
return t4;
|
|
278
|
-
};
|
|
279
|
-
const InsightsPanel = ({
|
|
280
|
-
initialShardKey,
|
|
281
|
-
loadShardTraffic
|
|
282
|
-
}) => {
|
|
283
|
-
const client = useLunora();
|
|
284
|
-
const navigate = useNavigate();
|
|
285
|
-
const t = useT();
|
|
286
|
-
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
287
|
-
const [declaredIndexes, setDeclaredIndexes] = useState(null);
|
|
288
|
-
const [shardTraffic, setShardTraffic] = useState(null);
|
|
289
|
-
const debouncedShard = useDebounced(shardKey.trim(), 400);
|
|
290
|
-
const latestEnumeratedShard = useRef("");
|
|
291
|
-
const metricsQuery = useAdminQuery(ADMIN_FUNCTIONS.getMetrics, {}, {
|
|
292
|
-
live: true,
|
|
293
|
-
shardKey: debouncedShard
|
|
294
|
-
});
|
|
295
|
-
const functionsQuery = useAdminQuery(ADMIN_FUNCTIONS.getFunctionStats, {}, {
|
|
296
|
-
live: true,
|
|
297
|
-
shardKey: debouncedShard
|
|
298
|
-
});
|
|
299
|
-
const advisoriesQuery = useAdminQuery(ADMIN_FUNCTIONS.getAdvisories, {}, {
|
|
300
|
-
live: true,
|
|
301
|
-
shardKey: debouncedShard
|
|
302
|
-
});
|
|
303
|
-
const metrics = metricsQuery.data ?? null;
|
|
304
|
-
const functions = functionsQuery.data?.functions ?? null;
|
|
305
|
-
const advisories = advisoriesQuery.data?.advisories ?? null;
|
|
306
|
-
const indexHits = metricsQuery.data?.indexHits ?? null;
|
|
307
|
-
const error = metricsQuery.error !== null && functionsQuery.error !== null ? metricsQuery.error : null;
|
|
308
|
-
const fanShardTraffic = loadShardTraffic ?? ((table) => client.shardTraffic(table));
|
|
309
|
-
const loadShardTrafficFeed = async (tableNames, shard) => {
|
|
310
|
-
const seedTable = tableNames[0];
|
|
311
|
-
if (seedTable === void 0 || seedTable === "") {
|
|
312
|
-
if (latestEnumeratedShard.current === shard) {
|
|
313
|
-
setShardTraffic(null);
|
|
314
|
-
}
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
try {
|
|
318
|
-
const traffic = await fanShardTraffic(seedTable);
|
|
319
|
-
if (latestEnumeratedShard.current !== shard) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
const byShard = /* @__PURE__ */ new Map();
|
|
323
|
-
for (const entry of traffic.shards) {
|
|
324
|
-
if (!byShard.has(entry.shardKey)) {
|
|
325
|
-
byShard.set(entry.shardKey, {
|
|
326
|
-
requests: entry.requests,
|
|
327
|
-
shardKey: entry.shardKey
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
setShardTraffic([...byShard.values()]);
|
|
332
|
-
} catch {
|
|
333
|
-
if (latestEnumeratedShard.current === shard) {
|
|
334
|
-
setShardTraffic(null);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
const enumerateShard = useCallback(
|
|
339
|
-
async (shard) => {
|
|
340
|
-
latestEnumeratedShard.current = shard;
|
|
341
|
-
let tableNames = [];
|
|
342
|
-
try {
|
|
343
|
-
const tables = await client.query(LIST_TABLES, {}, callOptions(shard));
|
|
344
|
-
if (latestEnumeratedShard.current !== shard) {
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
recordShard(shard);
|
|
348
|
-
tableNames = tables.map((table) => table.name);
|
|
349
|
-
const indexResults = await Promise.allSettled(tables.map(async (table) => [table.name, await client.query(LIST_TABLE_INDEXES, {
|
|
350
|
-
table: table.name
|
|
351
|
-
}, callOptions(shard))]));
|
|
352
|
-
if (latestEnumeratedShard.current !== shard) {
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
const declared = [];
|
|
356
|
-
for (const result of indexResults) {
|
|
357
|
-
if (result.status === "fulfilled") {
|
|
358
|
-
const [name, payload] = result.value;
|
|
359
|
-
declared.push(...declaredIndexesFor(name, payload.indexes));
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
setDeclaredIndexes(declared);
|
|
363
|
-
} catch {
|
|
364
|
-
if (latestEnumeratedShard.current === shard) {
|
|
365
|
-
setDeclaredIndexes(null);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
await loadShardTrafficFeed(tableNames, shard);
|
|
369
|
-
},
|
|
370
|
-
// `fanShardTraffic`/`loadShardTrafficFeed` are render-fresh closures; the
|
|
371
|
-
// enumeration only needs to re-run on a shard change (or a manual visibility
|
|
372
|
-
// refresh), so they're intentionally excluded from the cache key.
|
|
373
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
374
|
-
[client]
|
|
375
|
-
);
|
|
376
|
-
useEffect(() => {
|
|
377
|
-
fireAndForget(enumerateShard(debouncedShard));
|
|
378
|
-
}, [debouncedShard, enumerateShard]);
|
|
379
|
-
useEffect(() => {
|
|
380
|
-
const onVisible = () => {
|
|
381
|
-
if (document.visibilityState === "visible") {
|
|
382
|
-
metricsQuery.refetch();
|
|
383
|
-
functionsQuery.refetch();
|
|
384
|
-
advisoriesQuery.refetch();
|
|
385
|
-
fireAndForget(enumerateShard(debouncedShard));
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
document.addEventListener("visibilitychange", onVisible);
|
|
389
|
-
return () => {
|
|
390
|
-
document.removeEventListener("visibilitychange", onVisible);
|
|
391
|
-
};
|
|
392
|
-
}, [advisoriesQuery, debouncedShard, enumerateShard, functionsQuery, metricsQuery]);
|
|
393
|
-
const jumpToSchemaIndex = useCallback((table) => {
|
|
394
|
-
fireAndForget(navigate({
|
|
395
|
-
search: {
|
|
396
|
-
table
|
|
397
|
-
},
|
|
398
|
-
to: "/schema"
|
|
399
|
-
}));
|
|
400
|
-
}, [navigate]);
|
|
401
|
-
const insights = deriveInsights(metrics, functions);
|
|
402
|
-
const missingIndexTables = new Set(insights.filter((insight) => insight.kind === "missing-index").flatMap((insight) => insight.tables ?? []));
|
|
403
|
-
const runtimeRows = deriveRuntimeAdvisories({
|
|
404
|
-
declaredIndexes: declaredIndexes ?? [],
|
|
405
|
-
functions,
|
|
406
|
-
indexHits,
|
|
407
|
-
shardTraffic,
|
|
408
|
-
suppressHotScanTables: missingIndexTables
|
|
409
|
-
});
|
|
410
|
-
const rows = useMemo(() => {
|
|
411
|
-
const insightRows = insights.map((insight) => {
|
|
412
|
-
const tables = insight.kind === "missing-index" ? insight.tables ?? [] : [];
|
|
413
|
-
return {
|
|
414
|
-
action: tables.length > 0 ? tables.map((table) => /* @__PURE__ */ jsxDEV(AddIndexButton, {
|
|
415
|
-
onJump: jumpToSchemaIndex,
|
|
416
|
-
table
|
|
417
|
-
}, table, false)) : void 0,
|
|
418
|
-
description: insight.message === void 0 ? insightDetail(t, insight) : `${insightDetail(t, insight)} — ${insight.message}`,
|
|
419
|
-
entity: insight.fn,
|
|
420
|
-
issueType: insightTitle(t, insight),
|
|
421
|
-
key: `${insight.kind}:${insight.fn ?? ""}`,
|
|
422
|
-
level: insight.severity
|
|
423
|
-
};
|
|
424
|
-
});
|
|
425
|
-
const indexAdvisoryLints = /* @__PURE__ */ new Set(["unindexed_foreign_key", "unindexed_relation_target"]);
|
|
426
|
-
const staticRows = (advisories ?? []).map((finding) => {
|
|
427
|
-
const base = advisoryRow(finding);
|
|
428
|
-
if (indexAdvisoryLints.has(finding.name) && hasIndexMetadata(finding.metadata)) {
|
|
429
|
-
const {
|
|
430
|
-
table,
|
|
431
|
-
suggestedIndex
|
|
432
|
-
} = finding.metadata;
|
|
433
|
-
const testId = `in-apply-index-${table}-${suggestedIndex.name}`;
|
|
434
|
-
return {
|
|
435
|
-
...base,
|
|
436
|
-
action: /* @__PURE__ */ jsxDEV(ApplyIndexButton, {
|
|
437
|
-
fields: suggestedIndex.fields,
|
|
438
|
-
indexName: suggestedIndex.name,
|
|
439
|
-
table,
|
|
440
|
-
testId
|
|
441
|
-
}, void 0, false)
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
return base;
|
|
445
|
-
});
|
|
446
|
-
return [...staticRows, ...runtimeRows, ...insightRows];
|
|
447
|
-
}, [advisories, insights, jumpToSchemaIndex, runtimeRows, t]);
|
|
448
|
-
const toolbar = /* @__PURE__ */ jsxDEV(ShardInput, {
|
|
449
|
-
onChange: setShardKey,
|
|
450
|
-
testId: "in-shard-input",
|
|
451
|
-
value: shardKey
|
|
452
|
-
}, void 0, false);
|
|
453
|
-
return /* @__PURE__ */ jsxDEV(AdvisorView, {
|
|
454
|
-
error,
|
|
455
|
-
rows,
|
|
456
|
-
testId: "lunora-insights",
|
|
457
|
-
toolbar
|
|
458
|
-
}, void 0, false);
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
export { InsightsPanel };
|