railwatch 0.6.1 → 0.7.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/app/frontend/components/app-content.tsx +26 -0
- data/app/frontend/components/app-logo-icon.tsx +23 -0
- data/app/frontend/components/app-logo.tsx +14 -0
- data/app/frontend/components/app-shell.tsx +38 -0
- data/app/frontend/components/app-sidebar-header.tsx +54 -0
- data/app/frontend/components/app-sidebar.tsx +94 -0
- data/app/frontend/components/app-wordmark.tsx +29 -0
- data/app/frontend/components/breadcrumbs.tsx +46 -0
- data/app/frontend/components/icon.tsx +16 -0
- data/app/frontend/components/input-error.tsx +18 -0
- data/app/frontend/components/nav-footer.tsx +46 -0
- data/app/frontend/components/nav-main.tsx +41 -0
- data/app/frontend/components/nav-user.tsx +50 -0
- data/app/frontend/components/railwatch/chart-hover.tsx +34 -0
- data/app/frontend/components/railwatch/chart-panel.tsx +170 -0
- data/app/frontend/components/railwatch/code.tsx +28 -0
- data/app/frontend/components/railwatch/command-palette.tsx +132 -0
- data/app/frontend/components/railwatch/copy-block.tsx +52 -0
- data/app/frontend/components/railwatch/copy-id.tsx +49 -0
- data/app/frontend/components/railwatch/cursor-load-more.tsx +39 -0
- data/app/frontend/components/railwatch/data-table.tsx +195 -0
- data/app/frontend/components/railwatch/digit-roll.tsx +312 -0
- data/app/frontend/components/railwatch/empty-state.tsx +159 -0
- data/app/frontend/components/railwatch/env-nav.tsx +130 -0
- data/app/frontend/components/railwatch/env-switcher.tsx +145 -0
- data/app/frontend/components/railwatch/filter-bar.tsx +153 -0
- data/app/frontend/components/railwatch/flamegraph.tsx +324 -0
- data/app/frontend/components/railwatch/frames.tsx +295 -0
- data/app/frontend/components/railwatch/json-viewer.tsx +159 -0
- data/app/frontend/components/railwatch/live-dot.tsx +78 -0
- data/app/frontend/components/railwatch/live-toggle.tsx +76 -0
- data/app/frontend/components/railwatch/metric-chart.tsx +112 -0
- data/app/frontend/components/railwatch/mobile-page-switcher.tsx +89 -0
- data/app/frontend/components/railwatch/onboarding.tsx +91 -0
- data/app/frontend/components/railwatch/origin-identity.tsx +84 -0
- data/app/frontend/components/railwatch/page-header.tsx +42 -0
- data/app/frontend/components/railwatch/percentile-picker.tsx +18 -0
- data/app/frontend/components/railwatch/relative-time.tsx +18 -0
- data/app/frontend/components/railwatch/saved-views.tsx +232 -0
- data/app/frontend/components/railwatch/segmented.tsx +64 -0
- data/app/frontend/components/railwatch/series-chart.tsx +400 -0
- data/app/frontend/components/railwatch/shortcuts-dialog.tsx +89 -0
- data/app/frontend/components/railwatch/signal-toast.tsx +121 -0
- data/app/frontend/components/railwatch/sort-header.tsx +37 -0
- data/app/frontend/components/railwatch/source-link.tsx +57 -0
- data/app/frontend/components/railwatch/sparkline-cell.tsx +14 -0
- data/app/frontend/components/railwatch/sql-block.tsx +116 -0
- data/app/frontend/components/railwatch/stat.tsx +173 -0
- data/app/frontend/components/railwatch/status-badge.tsx +79 -0
- data/app/frontend/components/railwatch/step-picker.tsx +57 -0
- data/app/frontend/components/railwatch/timeline.tsx +405 -0
- data/app/frontend/components/railwatch/utilisation-bar.tsx +44 -0
- data/app/frontend/components/railwatch/window-picker.tsx +147 -0
- data/app/frontend/components/ui/avatar.tsx +51 -0
- data/app/frontend/components/ui/badge.tsx +46 -0
- data/app/frontend/components/ui/breadcrumb.tsx +109 -0
- data/app/frontend/components/ui/button.tsx +60 -0
- data/app/frontend/components/ui/card.tsx +92 -0
- data/app/frontend/components/ui/chart.tsx +374 -0
- data/app/frontend/components/ui/checkbox.tsx +32 -0
- data/app/frontend/components/ui/collapsible.tsx +31 -0
- data/app/frontend/components/ui/command.tsx +182 -0
- data/app/frontend/components/ui/dialog.tsx +158 -0
- data/app/frontend/components/ui/dropdown-menu.tsx +255 -0
- data/app/frontend/components/ui/hover-card.tsx +42 -0
- data/app/frontend/components/ui/input.tsx +21 -0
- data/app/frontend/components/ui/label.tsx +24 -0
- data/app/frontend/components/ui/popover.tsx +87 -0
- data/app/frontend/components/ui/select.tsx +185 -0
- data/app/frontend/components/ui/separator.tsx +28 -0
- data/app/frontend/components/ui/sheet.tsx +137 -0
- data/app/frontend/components/ui/sidebar.tsx +726 -0
- data/app/frontend/components/ui/skeleton.tsx +13 -0
- data/app/frontend/components/ui/sonner.tsx +41 -0
- data/app/frontend/components/ui/table.tsx +114 -0
- data/app/frontend/components/ui/tabs.tsx +91 -0
- data/app/frontend/components/ui/textarea.tsx +18 -0
- data/app/frontend/components/ui/tooltip.tsx +61 -0
- data/app/frontend/components/user-info.tsx +32 -0
- data/app/frontend/components/user-menu-content.tsx +94 -0
- data/app/frontend/entrypoints/application.css +244 -0
- data/app/frontend/entrypoints/inertia.tsx +95 -0
- data/app/frontend/fonts/CommitMono-Bold.woff2 +0 -0
- data/app/frontend/fonts/CommitMono-Regular.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Black.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Bold.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Medium.woff2 +0 -0
- data/app/frontend/fonts/Roboto-Regular.woff2 +0 -0
- data/app/frontend/hooks/use-appearance.tsx +67 -0
- data/app/frontend/hooks/use-clipboard.ts +32 -0
- data/app/frontend/hooks/use-flash.tsx +23 -0
- data/app/frontend/hooks/use-hotkeys.ts +63 -0
- data/app/frontend/hooks/use-initials.tsx +15 -0
- data/app/frontend/hooks/use-live.ts +179 -0
- data/app/frontend/hooks/use-mobile-navigation.ts +8 -0
- data/app/frontend/hooks/use-mobile.ts +21 -0
- data/app/frontend/hooks/use-percentile.ts +24 -0
- data/app/frontend/hooks/use-reduced-motion.ts +25 -0
- data/app/frontend/hooks/use-row-nav.ts +106 -0
- data/app/frontend/hooks/use-step.ts +27 -0
- data/app/frontend/hooks/use-ticker.ts +12 -0
- data/app/frontend/hooks/use-window.ts +58 -0
- data/app/frontend/layouts/app/app-sidebar-layout.tsx +107 -0
- data/app/frontend/layouts/app-layout.tsx +21 -0
- data/app/frontend/layouts/env-layout.tsx +53 -0
- data/app/frontend/layouts/persistent-layout.tsx +18 -0
- data/app/frontend/lib/cable.ts +10 -0
- data/app/frontend/lib/env-pages.ts +236 -0
- data/app/frontend/lib/execution-path.ts +55 -0
- data/app/frontend/lib/explain.ts +50 -0
- data/app/frontend/lib/filter.ts +25 -0
- data/app/frontend/lib/flamegraph.ts +155 -0
- data/app/frontend/lib/format.ts +71 -0
- data/app/frontend/lib/keyboard.ts +18 -0
- data/app/frontend/lib/source-link.ts +217 -0
- data/app/frontend/lib/utils.ts +6 -0
- data/app/frontend/pages/alerts/index.tsx +171 -0
- data/app/frontend/pages/broadcasts/index.tsx +171 -0
- data/app/frontend/pages/cache_events/index.tsx +127 -0
- data/app/frontend/pages/commands/index.tsx +143 -0
- data/app/frontend/pages/deploys/index.tsx +94 -0
- data/app/frontend/pages/deploys/show.tsx +309 -0
- data/app/frontend/pages/deprecations/index.tsx +176 -0
- data/app/frontend/pages/exceptions/index.tsx +271 -0
- data/app/frontend/pages/executions/show.tsx +821 -0
- data/app/frontend/pages/issues/index.tsx +399 -0
- data/app/frontend/pages/issues/show.tsx +1367 -0
- data/app/frontend/pages/jobs/index.tsx +381 -0
- data/app/frontend/pages/jobs/klass.tsx +215 -0
- data/app/frontend/pages/llm_calls/index.tsx +664 -0
- data/app/frontend/pages/logs/index.tsx +303 -0
- data/app/frontend/pages/mails/index.tsx +218 -0
- data/app/frontend/pages/notifications/index.tsx +161 -0
- data/app/frontend/pages/outgoing_requests/index.tsx +309 -0
- data/app/frontend/pages/overview/show.tsx +333 -0
- data/app/frontend/pages/people/index.tsx +102 -0
- data/app/frontend/pages/people/show.tsx +149 -0
- data/app/frontend/pages/processes/index.tsx +335 -0
- data/app/frontend/pages/profiles/index.tsx +110 -0
- data/app/frontend/pages/profiles/show.tsx +105 -0
- data/app/frontend/pages/queries/index.tsx +492 -0
- data/app/frontend/pages/queries/show.tsx +276 -0
- data/app/frontend/pages/releases/index.tsx +190 -0
- data/app/frontend/pages/releases/release-health.tsx +68 -0
- data/app/frontend/pages/releases/release-path.ts +25 -0
- data/app/frontend/pages/releases/show.tsx +262 -0
- data/app/frontend/pages/requests/index.tsx +235 -0
- data/app/frontend/pages/requests/route.tsx +159 -0
- data/app/frontend/pages/scheduled_tasks/index.tsx +220 -0
- data/app/frontend/pages/spans/index.tsx +229 -0
- data/app/frontend/pages/spans/show.tsx +220 -0
- data/app/frontend/pages/storage_ops/index.tsx +150 -0
- data/app/frontend/pages/tenants/index.tsx +236 -0
- data/app/frontend/pages/tenants/show.tsx +477 -0
- data/app/frontend/pages/tenants/tenant-path.ts +26 -0
- data/app/frontend/pages/thresholds/index.tsx +414 -0
- data/app/frontend/pages/traces/show.tsx +208 -0
- data/app/frontend/pages/transactions/index.tsx +220 -0
- data/app/frontend/pages/view_renders/index.tsx +241 -0
- data/app/frontend/pages/visits/index.tsx +321 -0
- data/app/frontend/public/icon.png +0 -0
- data/app/frontend/public/icon.svg +5 -0
- data/app/frontend/routes/index.d.ts +2136 -0
- data/app/frontend/routes/index.js +2112 -0
- data/app/frontend/types/globals.d.ts +9 -0
- data/app/frontend/types/index.ts +288 -0
- data/app/frontend/types/vite-env.d.ts +9 -0
- data/lib/railwatch/version.rb +1 -1
- data/lib/railwatch.rb +8 -3
- data/public/railwatch/assets/app-layout-LvxN9xSS.js +41 -0
- data/public/railwatch/assets/application-Cc5v_Vk9.css +1 -0
- data/public/railwatch/assets/{arrow-up-CLQ-7heQ.js → arrow-up-DG01k9AL.js} +1 -1
- data/public/railwatch/assets/{braces-rSYydpLY.js → braces-C3w7pfxS.js} +1 -1
- data/public/railwatch/assets/{card-DPjFKfen.js → card-Dpwlr0uY.js} +1 -1
- data/public/railwatch/assets/{chart-DWh7l8yM.js → chart-DJHv3R7W.js} +1 -1
- data/public/railwatch/assets/{chart-hover-CfoZUY4J.js → chart-hover-CEH-DtXO.js} +1 -1
- data/public/railwatch/assets/{chart-panel-CC49WTQL.js → chart-panel-CUdIzJvk.js} +1 -1
- data/public/railwatch/assets/code-BRZprwun.js +1 -0
- data/public/railwatch/assets/copy-id-CwhGGiwF.js +1 -0
- data/public/railwatch/assets/cursor-load-more-uF1_955Q.js +1 -0
- data/public/railwatch/assets/data-table-DYi-N0hm.js +1 -0
- data/public/railwatch/assets/env-layout-HdcOaPPX.js +1 -0
- data/public/railwatch/assets/{execution-path-FAuIzOXB.js → execution-path-CElXXFO_.js} +1 -1
- data/public/railwatch/assets/filter-bar-DEv0G_34.js +1 -0
- data/public/railwatch/assets/{flamegraph-EaGkP2NT.js → flamegraph-SKD9yxW9.js} +2 -2
- data/public/railwatch/assets/frames-CUpyJQDy.js +1 -0
- data/public/railwatch/assets/index-2W-ppwap.js +1 -0
- data/public/railwatch/assets/index-74ocuU5d.js +1 -0
- data/public/railwatch/assets/{index-C8Cggnbw.js → index-B8NA62Lz.js} +2 -2
- data/public/railwatch/assets/index-BBCEkLqp.js +1 -0
- data/public/railwatch/assets/index-BDcglJzX.js +1 -0
- data/public/railwatch/assets/index-B_KFb9LS.js +1 -0
- data/public/railwatch/assets/index-BqK_VKom.js +1 -0
- data/public/railwatch/assets/index-BxCXBHP2.js +1 -0
- data/public/railwatch/assets/index-C1jc1OoH.js +1 -0
- data/public/railwatch/assets/index-C7zREldp.js +1 -0
- data/public/railwatch/assets/index-CEetm4oC.js +1 -0
- data/public/railwatch/assets/index-CIaZkokF.js +1 -0
- data/public/railwatch/assets/index-CNH85TZp.js +1 -0
- data/public/railwatch/assets/index-Ce4SB5AB.js +1 -0
- data/public/railwatch/assets/index-CiRMSYMn.js +1 -0
- data/public/railwatch/assets/index-CjxXgOs-.js +1 -0
- data/public/railwatch/assets/index-ClL-PYEV.js +1 -0
- data/public/railwatch/assets/index-CteZ6fop.js +1 -0
- data/public/railwatch/assets/index-CvqfEExO.js +1 -0
- data/public/railwatch/assets/index-CxTLT-Qh.js +1 -0
- data/public/railwatch/assets/index-DJd3OUSd.js +1 -0
- data/public/railwatch/assets/index-DPD-rLp6.js +1 -0
- data/public/railwatch/assets/index-DYK_dps4.js +1 -0
- data/public/railwatch/assets/index-DrayARrI.js +1 -0
- data/public/railwatch/assets/index-HRXGir-0.js +1 -0
- data/public/railwatch/assets/index-UJOUALr_.js +1 -0
- data/public/railwatch/assets/index-d-3J7gQ5.js +1 -0
- data/public/railwatch/assets/index-oQrvBpOm.js +1 -0
- data/public/railwatch/assets/inertia-FoqYZAk8.js +97 -0
- data/public/railwatch/assets/json-viewer-CxqMojEm.js +1 -0
- data/public/railwatch/assets/klass-DEF-Vat5.js +1 -0
- data/public/railwatch/assets/origin-identity-Y6gvfQVR.js +1 -0
- data/public/railwatch/assets/{percentile-picker-CeQgllxD.js → percentile-picker-E2aUdLxx.js} +1 -1
- data/public/railwatch/assets/relative-time-DcJbkKlN.js +1 -0
- data/public/railwatch/assets/{release-health-uP-GF3_V.js → release-health-C8WSCDKD.js} +1 -1
- data/public/railwatch/assets/route-qO5vX1p-.js +1 -0
- data/public/railwatch/assets/{segmented-BeIe4uqk.js → segmented-BWee8uc9.js} +1 -1
- data/public/railwatch/assets/select-G7rNBzv0.js +1 -0
- data/public/railwatch/assets/series-chart-C5nXIUc5.js +1 -0
- data/public/railwatch/assets/show-BEWisLQw.js +1 -0
- data/public/railwatch/assets/show-BEa9PGu1.js +2 -0
- data/public/railwatch/assets/{show-YsNpqbcI.js → show-BiT_Aloc.js} +3 -3
- data/public/railwatch/assets/show-BpCO49d3.js +1 -0
- data/public/railwatch/assets/show-CH7yxt7R.js +1 -0
- data/public/railwatch/assets/show-CTO8Lvd2.js +1 -0
- data/public/railwatch/assets/show-DnYsDMUt.js +2 -0
- data/public/railwatch/assets/show-DyzHM527.js +1 -0
- data/public/railwatch/assets/show-Nfpxs8su.js +1 -0
- data/public/railwatch/assets/show-ddjUMo9G.js +1 -0
- data/public/railwatch/assets/show-ksjbSzDH.js +1 -0
- data/public/railwatch/assets/{sort-header-mEJUM3Av.js → sort-header-uOq5VlrB.js} +1 -1
- data/public/railwatch/assets/{sparkline-cell-Dwg7awwh.js → sparkline-cell-DgGij0cu.js} +1 -1
- data/public/railwatch/assets/stat-BTzNKTm2.js +1 -0
- data/public/railwatch/assets/status-badge-BDkOXa-C.js +1 -0
- data/public/railwatch/assets/{tenant-path-CQoP-BeF.js → tenant-path-DU0ezKSU.js} +1 -1
- data/public/railwatch/assets/{use-clipboard-DNefo-ky.js → use-clipboard-DoENmlWY.js} +1 -1
- data/public/railwatch/assets/{use-live-DMTuhKfB.js → use-live-CE_fN5_6.js} +1 -1
- data/public/railwatch/manifest.json +612 -1591
- metadata +242 -117
- data/public/railwatch/assets/app-layout-Zc0v-hYh.js +0 -1
- data/public/railwatch/assets/app-wordmark-BA_60AVb.js +0 -1
- data/public/railwatch/assets/appearance-CcfP9tZ7.js +0 -1
- data/public/railwatch/assets/application-BrN3Sz94.css +0 -1
- data/public/railwatch/assets/auth-layout-C05gEBIQ.js +0 -1
- data/public/railwatch/assets/badge-DRae8XwK.js +0 -1
- data/public/railwatch/assets/checkbox-DPkLUiwM.js +0 -1
- data/public/railwatch/assets/code-CLmYS6FU.js +0 -1
- data/public/railwatch/assets/copy-DaQMJWoT.js +0 -1
- data/public/railwatch/assets/copy-block-CGcXxp8J.js +0 -1
- data/public/railwatch/assets/copy-id-vBYHQwxg.js +0 -1
- data/public/railwatch/assets/cursor-load-more-Ddwxe5dZ.js +0 -1
- data/public/railwatch/assets/data-table-CzKTEE-O.js +0 -1
- data/public/railwatch/assets/edit-B1kmWkzd.js +0 -8
- data/public/railwatch/assets/edit-D9cx4pbG.js +0 -1
- data/public/railwatch/assets/edit-yv6j9p-V.js +0 -1
- data/public/railwatch/assets/empty-state-CW4wclK_.js +0 -1
- data/public/railwatch/assets/env-layout-Kz7wks1x.js +0 -1
- data/public/railwatch/assets/filter-bar-CJDjWFib.js +0 -1
- data/public/railwatch/assets/frames-zZuIaNH9.js +0 -1
- data/public/railwatch/assets/google-sign-in-button-2_zgbgVy.js +0 -1
- data/public/railwatch/assets/index-B49SWz7K.js +0 -1
- data/public/railwatch/assets/index-BHlY4wKe.js +0 -1
- data/public/railwatch/assets/index-BZpPtyFY.js +0 -1
- data/public/railwatch/assets/index-BeVK6jCL.js +0 -1
- data/public/railwatch/assets/index-BfbSo01U.js +0 -1
- data/public/railwatch/assets/index-BfgncAv6.js +0 -1
- data/public/railwatch/assets/index-BhNszK1k.js +0 -1
- data/public/railwatch/assets/index-Bu01uWvw.js +0 -1
- data/public/railwatch/assets/index-C1s_hK3p.js +0 -1
- data/public/railwatch/assets/index-CBip6V4z.js +0 -1
- data/public/railwatch/assets/index-CMJGss5R.js +0 -1
- data/public/railwatch/assets/index-CRo3yK20.js +0 -1
- data/public/railwatch/assets/index-CWB_p2J8.js +0 -1
- data/public/railwatch/assets/index-CWHpndGc.js +0 -1
- data/public/railwatch/assets/index-Ca_S4Sc3.js +0 -1
- data/public/railwatch/assets/index-CanPDDOa.js +0 -1
- data/public/railwatch/assets/index-Cie90Yat.js +0 -1
- data/public/railwatch/assets/index-CiepQ_pR.js +0 -1
- data/public/railwatch/assets/index-Cm1uCIGN.js +0 -1
- data/public/railwatch/assets/index-CzitnnSC.js +0 -1
- data/public/railwatch/assets/index-DEUfClv3.js +0 -1
- data/public/railwatch/assets/index-DJKwo-mI.js +0 -1
- data/public/railwatch/assets/index-DK6y0YHp.js +0 -1
- data/public/railwatch/assets/index-DMNPpLH9.js +0 -1
- data/public/railwatch/assets/index-DZO1mSfX.js +0 -1
- data/public/railwatch/assets/index-Db5wj3M5.js +0 -1
- data/public/railwatch/assets/index-Dcy5WktB.js +0 -1
- data/public/railwatch/assets/index-DvG0-7Lx.js +0 -1
- data/public/railwatch/assets/index-Dvj1wuka.js +0 -1
- data/public/railwatch/assets/index-KyZX46qX.js +0 -1
- data/public/railwatch/assets/index-Ze-KP-sl.js +0 -1
- data/public/railwatch/assets/index-mhRbWLBM.js +0 -1
- data/public/railwatch/assets/index-x099JL5f.js +0 -1
- data/public/railwatch/assets/index-x28zb_nf.js +0 -1
- data/public/railwatch/assets/inertia-Cuyz2ZHO.js +0 -97
- data/public/railwatch/assets/input-error-hog6gGxg.js +0 -1
- data/public/railwatch/assets/json-viewer-DH2W9HXf.js +0 -1
- data/public/railwatch/assets/klass-DHbDelLk.js +0 -1
- data/public/railwatch/assets/label-DdCBgiUn.js +0 -1
- data/public/railwatch/assets/layout-Cueyl7c5.js +0 -1
- data/public/railwatch/assets/live-dot-BZgYTYdt.js +0 -41
- data/public/railwatch/assets/nav-BSSGObDZ.js +0 -1
- data/public/railwatch/assets/new-B8FSb8Bl.js +0 -1
- data/public/railwatch/assets/new-C39_v2Ll.js +0 -1
- data/public/railwatch/assets/new-DVOPwaC5.js +0 -1
- data/public/railwatch/assets/new-Dd40nvJR.js +0 -1
- data/public/railwatch/assets/new-SxnYe1SE.js +0 -1
- data/public/railwatch/assets/new-eP5vKD3Y.js +0 -1
- data/public/railwatch/assets/onboarding-CUpZl5KB.js +0 -1
- data/public/railwatch/assets/origin-identity-BYt2uiuo.js +0 -1
- data/public/railwatch/assets/relative-time-D5UbF4oO.js +0 -1
- data/public/railwatch/assets/route-DQAY8JEr.js +0 -1
- data/public/railwatch/assets/select-2R16457Z.js +0 -1
- data/public/railwatch/assets/separator-D5I0UCB5.js +0 -1
- data/public/railwatch/assets/series-chart-gnrzhmM6.js +0 -1
- data/public/railwatch/assets/show-2BkeNRUC.js +0 -2
- data/public/railwatch/assets/show-B0X1hRQH.js +0 -1
- data/public/railwatch/assets/show-BKUV5l5q.js +0 -1
- data/public/railwatch/assets/show-BQJD_CsF.js +0 -6
- data/public/railwatch/assets/show-BhmD6Sxp.js +0 -1
- data/public/railwatch/assets/show-C3KcnVo2.js +0 -1
- data/public/railwatch/assets/show-C95cHd06.js +0 -2
- data/public/railwatch/assets/show-CdB4uVQS.js +0 -1
- data/public/railwatch/assets/show-CoCqcVIp.js +0 -1
- data/public/railwatch/assets/show-D2LqjEsU.js +0 -1
- data/public/railwatch/assets/show-DNpnKyTh.js +0 -1
- data/public/railwatch/assets/show-DOlTxbig.js +0 -1
- data/public/railwatch/assets/show-DQCkttL8.js +0 -1
- data/public/railwatch/assets/show-DcxesipC.js +0 -1
- data/public/railwatch/assets/show-IGJoc_X0.js +0 -1
- data/public/railwatch/assets/show-qNV6H8SH.js +0 -2
- data/public/railwatch/assets/stat-ZtxGU8lE.js +0 -1
- data/public/railwatch/assets/status-badge-CH5P-Xkj.js +0 -1
- data/public/railwatch/assets/text-link-DHJ8BXx5.js +0 -1
- data/public/railwatch/assets/textarea-BeQtQyl5.js +0 -1
- data/public/railwatch/assets/timeline-CaKQVu48.js +0 -1
- data/public/railwatch/assets/transition-ksDpqhKJ.js +0 -5
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Link, router, usePage } from "@inertiajs/react"
|
|
2
|
+
import { CalendarClock } from "lucide-react"
|
|
3
|
+
|
|
4
|
+
import { DataTable } from "@/components/railwatch/data-table"
|
|
5
|
+
import { EmptyState } from "@/components/railwatch/empty-state"
|
|
6
|
+
import {
|
|
7
|
+
OriginIdentity,
|
|
8
|
+
type OriginIdentityData,
|
|
9
|
+
} from "@/components/railwatch/origin-identity"
|
|
10
|
+
import { PageHeader } from "@/components/railwatch/page-header"
|
|
11
|
+
import { RelativeTime } from "@/components/railwatch/relative-time"
|
|
12
|
+
import { StatusBadge } from "@/components/railwatch/status-badge"
|
|
13
|
+
import { Badge } from "@/components/ui/badge"
|
|
14
|
+
import EnvLayout from "@/layouts/env-layout"
|
|
15
|
+
import { ago, ms, when } from "@/lib/format"
|
|
16
|
+
import * as R from "@/routes"
|
|
17
|
+
import type { SharedProps } from "@/types"
|
|
18
|
+
|
|
19
|
+
interface Task {
|
|
20
|
+
task_key: string
|
|
21
|
+
runs: number
|
|
22
|
+
failed: number
|
|
23
|
+
avg: number
|
|
24
|
+
last_run_at: string
|
|
25
|
+
next_run_at: string | null
|
|
26
|
+
schedule: string | null
|
|
27
|
+
}
|
|
28
|
+
interface Run extends OriginIdentityData {
|
|
29
|
+
execution_id: string
|
|
30
|
+
task_key: string
|
|
31
|
+
name: string
|
|
32
|
+
outcome: string
|
|
33
|
+
duration: number
|
|
34
|
+
occurred_at: string
|
|
35
|
+
exception_preview: string | null
|
|
36
|
+
}
|
|
37
|
+
interface Props {
|
|
38
|
+
tasks: Task[]
|
|
39
|
+
runs: Run[]
|
|
40
|
+
missed: { key: string; title: string; id: number }[]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default function ScheduledTasks(p: Props) {
|
|
44
|
+
const {
|
|
45
|
+
environment,
|
|
46
|
+
range,
|
|
47
|
+
window: selectedWindow,
|
|
48
|
+
} = usePage<SharedProps>().props
|
|
49
|
+
const a = environment!.application_id
|
|
50
|
+
const e = environment!.id
|
|
51
|
+
const runHref = (r: Run) =>
|
|
52
|
+
R.applicationEnvironmentScheduledTaskPath(a, e, r.execution_id)
|
|
53
|
+
return (
|
|
54
|
+
<EnvLayout title="Scheduled tasks">
|
|
55
|
+
<PageHeader
|
|
56
|
+
title="Scheduled tasks"
|
|
57
|
+
description="Solid Queue recurring tasks from config/recurring.yml: runs, failures, and missed schedules."
|
|
58
|
+
/>
|
|
59
|
+
{p.missed.length > 0 && (
|
|
60
|
+
<div className="flex flex-wrap gap-2">
|
|
61
|
+
{p.missed.map((m) => (
|
|
62
|
+
<Link key={m.id} href={R.issuePath(m.id)}>
|
|
63
|
+
<Badge variant="destructive">
|
|
64
|
+
{m.key} · {m.title}
|
|
65
|
+
</Badge>
|
|
66
|
+
</Link>
|
|
67
|
+
))}
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
<DataTable
|
|
71
|
+
rows={p.tasks}
|
|
72
|
+
rowKey={(t) => t.task_key}
|
|
73
|
+
empty={
|
|
74
|
+
<EmptyState
|
|
75
|
+
icon={CalendarClock}
|
|
76
|
+
title="No scheduled task has run in this window"
|
|
77
|
+
description="Recurring and scheduled job runs appear here as they execute."
|
|
78
|
+
/>
|
|
79
|
+
}
|
|
80
|
+
columns={[
|
|
81
|
+
{
|
|
82
|
+
key: "k",
|
|
83
|
+
header: "Task",
|
|
84
|
+
cell: (t) => (
|
|
85
|
+
<span className="font-mono text-xs">{t.task_key}</span>
|
|
86
|
+
),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: "s",
|
|
90
|
+
header: "Schedule",
|
|
91
|
+
cell: (t) => (
|
|
92
|
+
<span className="text-muted-foreground font-mono text-xs">
|
|
93
|
+
{t.schedule ?? "–"}
|
|
94
|
+
</span>
|
|
95
|
+
),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: "next",
|
|
99
|
+
hideOnMobile: true,
|
|
100
|
+
header: "Next run",
|
|
101
|
+
cell: (t) => (
|
|
102
|
+
<span className="text-muted-foreground text-xs">
|
|
103
|
+
{t.next_run_at ? <RelativeTime iso={t.next_run_at} /> : "–"}
|
|
104
|
+
</span>
|
|
105
|
+
),
|
|
106
|
+
},
|
|
107
|
+
{ key: "n", header: "Runs", align: "right", cell: (t) => t.runs },
|
|
108
|
+
{
|
|
109
|
+
key: "f",
|
|
110
|
+
hideOnMobile: true,
|
|
111
|
+
header: "Failed",
|
|
112
|
+
align: "right",
|
|
113
|
+
cell: (t) => (
|
|
114
|
+
<span className={t.failed ? "text-destructive" : ""}>
|
|
115
|
+
{t.failed}
|
|
116
|
+
</span>
|
|
117
|
+
),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "avg",
|
|
121
|
+
hideOnMobile: true,
|
|
122
|
+
header: "Avg",
|
|
123
|
+
align: "right",
|
|
124
|
+
cell: (t) => ms(t.avg),
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
key: "last",
|
|
128
|
+
header: "Last run",
|
|
129
|
+
align: "right",
|
|
130
|
+
cell: (t) => ago(t.last_run_at),
|
|
131
|
+
},
|
|
132
|
+
]}
|
|
133
|
+
/>
|
|
134
|
+
<h2 className="text-sm font-semibold">Recent runs</h2>
|
|
135
|
+
<DataTable
|
|
136
|
+
rows={p.runs}
|
|
137
|
+
rowKey={(r) => r.execution_id}
|
|
138
|
+
onRowClick={(r) => router.visit(runHref(r))}
|
|
139
|
+
keyboardNav={{
|
|
140
|
+
onOpen: (r, opts) =>
|
|
141
|
+
opts?.newTab
|
|
142
|
+
? window.open(runHref(r), "_blank")
|
|
143
|
+
: router.visit(runHref(r)),
|
|
144
|
+
}}
|
|
145
|
+
columns={[
|
|
146
|
+
{
|
|
147
|
+
key: "when",
|
|
148
|
+
header: "When",
|
|
149
|
+
cell: (r) => <span className="text-xs">{when(r.occurred_at)}</span>,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: "k",
|
|
153
|
+
header: "Task",
|
|
154
|
+
cell: (r) => (
|
|
155
|
+
<span className="font-mono text-xs">{r.task_key}</span>
|
|
156
|
+
),
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
key: "job",
|
|
160
|
+
hideOnMobile: true,
|
|
161
|
+
header: "Job",
|
|
162
|
+
cell: (r) => <span className="font-mono text-xs">{r.name}</span>,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
key: "o",
|
|
166
|
+
header: "Outcome",
|
|
167
|
+
cell: (r) => <StatusBadge outcome={r.outcome} />,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
key: "user",
|
|
171
|
+
hideOnMobile: true,
|
|
172
|
+
header: "Origin user",
|
|
173
|
+
cell: (r) => (
|
|
174
|
+
<OriginIdentity
|
|
175
|
+
{...r}
|
|
176
|
+
applicationId={a}
|
|
177
|
+
environmentId={e}
|
|
178
|
+
kind="user"
|
|
179
|
+
range={range}
|
|
180
|
+
window={selectedWindow}
|
|
181
|
+
/>
|
|
182
|
+
),
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "tenant",
|
|
186
|
+
hideOnMobile: true,
|
|
187
|
+
header: "Origin tenant",
|
|
188
|
+
cell: (r) => (
|
|
189
|
+
<OriginIdentity
|
|
190
|
+
{...r}
|
|
191
|
+
applicationId={a}
|
|
192
|
+
environmentId={e}
|
|
193
|
+
kind="tenant"
|
|
194
|
+
range={range}
|
|
195
|
+
window={selectedWindow}
|
|
196
|
+
/>
|
|
197
|
+
),
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
key: "d",
|
|
201
|
+
hideOnMobile: true,
|
|
202
|
+
header: "Duration",
|
|
203
|
+
align: "right",
|
|
204
|
+
cell: (r) => ms(r.duration),
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
key: "ex",
|
|
208
|
+
hideOnMobile: true,
|
|
209
|
+
header: "Exception",
|
|
210
|
+
cell: (r) => (
|
|
211
|
+
<span className="text-destructive line-clamp-1 text-xs">
|
|
212
|
+
{r.exception_preview ?? ""}
|
|
213
|
+
</span>
|
|
214
|
+
),
|
|
215
|
+
},
|
|
216
|
+
]}
|
|
217
|
+
/>
|
|
218
|
+
</EnvLayout>
|
|
219
|
+
)
|
|
220
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { Link, router, usePage } from "@inertiajs/react"
|
|
2
|
+
import { Braces } from "lucide-react"
|
|
3
|
+
|
|
4
|
+
import { DurationPanel, VolumePanel } from "@/components/railwatch/chart-panel"
|
|
5
|
+
import { DataTable } from "@/components/railwatch/data-table"
|
|
6
|
+
import { EmptyState } from "@/components/railwatch/empty-state"
|
|
7
|
+
import { FilterBar } from "@/components/railwatch/filter-bar"
|
|
8
|
+
import { PageHeader } from "@/components/railwatch/page-header"
|
|
9
|
+
import { PercentilePicker } from "@/components/railwatch/percentile-picker"
|
|
10
|
+
import { SortHeader } from "@/components/railwatch/sort-header"
|
|
11
|
+
import { SparklineCell } from "@/components/railwatch/sparkline-cell"
|
|
12
|
+
import { Stat, StatStrip } from "@/components/railwatch/stat"
|
|
13
|
+
import { usePercentile } from "@/hooks/use-percentile"
|
|
14
|
+
import EnvLayout from "@/layouts/env-layout"
|
|
15
|
+
import { count, ms } from "@/lib/format"
|
|
16
|
+
import * as R from "@/routes"
|
|
17
|
+
import type {
|
|
18
|
+
GroupRow,
|
|
19
|
+
SeriesPoint,
|
|
20
|
+
SharedProps,
|
|
21
|
+
SummaryWithDelta,
|
|
22
|
+
} from "@/types"
|
|
23
|
+
|
|
24
|
+
interface Props {
|
|
25
|
+
spans: GroupRow[]
|
|
26
|
+
series: SeriesPoint[]
|
|
27
|
+
summary: SummaryWithDelta
|
|
28
|
+
sort: string
|
|
29
|
+
dir: string
|
|
30
|
+
q: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default function Spans(p: Props) {
|
|
34
|
+
const { environment, window } = usePage<SharedProps>().props
|
|
35
|
+
const { percentile } = usePercentile()
|
|
36
|
+
const a = environment!.application_id
|
|
37
|
+
const e = environment!.id
|
|
38
|
+
const current = p.summary.current
|
|
39
|
+
|
|
40
|
+
const sortBy = (field: string) =>
|
|
41
|
+
router.visit(
|
|
42
|
+
R.applicationEnvironmentSpansPath(a, e, {
|
|
43
|
+
window,
|
|
44
|
+
q: p.q || undefined,
|
|
45
|
+
sort: field,
|
|
46
|
+
dir: p.sort === field && p.dir === "desc" ? "asc" : "desc",
|
|
47
|
+
}),
|
|
48
|
+
{ preserveState: true },
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
const spanHref = (groupHash: string) =>
|
|
52
|
+
R.applicationEnvironmentSpanPath(a, e, groupHash, { window })
|
|
53
|
+
const openSpan = (groupHash: string, opts?: { newTab?: boolean }) =>
|
|
54
|
+
opts?.newTab
|
|
55
|
+
? globalThis.window.open(spanHref(groupHash), "_blank")
|
|
56
|
+
: router.visit(spanHref(groupHash))
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<EnvLayout title="Spans">
|
|
60
|
+
<PageHeader
|
|
61
|
+
title="Spans"
|
|
62
|
+
description="Custom spans your app recorded with Railwatch.span, grouped by name."
|
|
63
|
+
actions={<PercentilePicker />}
|
|
64
|
+
/>
|
|
65
|
+
<StatStrip>
|
|
66
|
+
<Stat
|
|
67
|
+
label="Spans"
|
|
68
|
+
value={count(current.count)}
|
|
69
|
+
delta={{
|
|
70
|
+
current: current.count,
|
|
71
|
+
previous: p.summary.previous.count,
|
|
72
|
+
goodDirection: "up",
|
|
73
|
+
}}
|
|
74
|
+
deltaCaption="vs previous period"
|
|
75
|
+
/>
|
|
76
|
+
<Stat
|
|
77
|
+
label="Failed"
|
|
78
|
+
value={count(current.errors)}
|
|
79
|
+
tone={current.errors ? "destructive" : undefined}
|
|
80
|
+
/>
|
|
81
|
+
<Stat
|
|
82
|
+
label={percentile}
|
|
83
|
+
value={ms(current[percentile] / 1000, 2)}
|
|
84
|
+
hint={`avg ${ms(current.avg / 1000, 2)}`}
|
|
85
|
+
/>
|
|
86
|
+
<Stat label="Max" value={ms(current.max / 1000, 2)} />
|
|
87
|
+
</StatStrip>
|
|
88
|
+
<div className="grid gap-4 lg:grid-cols-2">
|
|
89
|
+
<VolumePanel
|
|
90
|
+
legend="outcome"
|
|
91
|
+
label="Spans"
|
|
92
|
+
seriesLabel="Spans"
|
|
93
|
+
data={p.series}
|
|
94
|
+
/>
|
|
95
|
+
<DurationPanel
|
|
96
|
+
label="Duration"
|
|
97
|
+
data={p.series}
|
|
98
|
+
percentile={percentile}
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
<FilterBar
|
|
102
|
+
value={p.q}
|
|
103
|
+
fields={[
|
|
104
|
+
{ key: "name", label: "Name" },
|
|
105
|
+
{ key: "status", label: "Status", options: ["failed"] },
|
|
106
|
+
]}
|
|
107
|
+
onChange={(q) =>
|
|
108
|
+
router.visit(
|
|
109
|
+
R.applicationEnvironmentSpansPath(a, e, {
|
|
110
|
+
window,
|
|
111
|
+
q: q || undefined,
|
|
112
|
+
sort: p.sort,
|
|
113
|
+
dir: p.dir,
|
|
114
|
+
}),
|
|
115
|
+
{ preserveState: true },
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
placeholder="name:geocode status:failed"
|
|
119
|
+
/>
|
|
120
|
+
<DataTable
|
|
121
|
+
rows={p.spans}
|
|
122
|
+
rowKey={(s) => s.group_hash}
|
|
123
|
+
empty={
|
|
124
|
+
<EmptyState
|
|
125
|
+
icon={Braces}
|
|
126
|
+
title="No spans in this window"
|
|
127
|
+
description="Wrap any code in Railwatch.span('name') { } and it shows up here."
|
|
128
|
+
/>
|
|
129
|
+
}
|
|
130
|
+
hoverKey={(s) => s.group_hash}
|
|
131
|
+
keyboardNav={{ onOpen: (s, opts) => openSpan(s.group_hash, opts) }}
|
|
132
|
+
columns={[
|
|
133
|
+
{
|
|
134
|
+
key: "name",
|
|
135
|
+
header: "Span",
|
|
136
|
+
grow: true,
|
|
137
|
+
cell: (s) => (
|
|
138
|
+
<Link
|
|
139
|
+
href={spanHref(s.group_hash)}
|
|
140
|
+
className="truncate font-mono text-xs hover:underline"
|
|
141
|
+
>
|
|
142
|
+
{s.name}
|
|
143
|
+
</Link>
|
|
144
|
+
),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
key: "trend",
|
|
148
|
+
hideOnMobile: true,
|
|
149
|
+
header: "Trend",
|
|
150
|
+
cell: (s) => (
|
|
151
|
+
<SparklineCell data={s.sparkline} hoverKey={s.group_hash} />
|
|
152
|
+
),
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
key: "n",
|
|
156
|
+
header: (
|
|
157
|
+
<SortHeader
|
|
158
|
+
label="Count"
|
|
159
|
+
active={p.sort === "count"}
|
|
160
|
+
dir={p.dir === "asc" ? "asc" : "desc"}
|
|
161
|
+
onClick={() => sortBy("count")}
|
|
162
|
+
/>
|
|
163
|
+
),
|
|
164
|
+
align: "right",
|
|
165
|
+
cell: (s) => count(s.count),
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
key: "failed",
|
|
169
|
+
header: (
|
|
170
|
+
<SortHeader
|
|
171
|
+
label="Failed"
|
|
172
|
+
active={p.sort === "errors"}
|
|
173
|
+
dir={p.dir === "asc" ? "asc" : "desc"}
|
|
174
|
+
onClick={() => sortBy("errors")}
|
|
175
|
+
/>
|
|
176
|
+
),
|
|
177
|
+
align: "right",
|
|
178
|
+
cell: (s) => (
|
|
179
|
+
<span className={s.errors ? "text-danger font-semibold" : ""}>
|
|
180
|
+
{count(s.errors)}
|
|
181
|
+
</span>
|
|
182
|
+
),
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "p50",
|
|
186
|
+
hideOnMobile: true,
|
|
187
|
+
header: (
|
|
188
|
+
<SortHeader
|
|
189
|
+
label="p50"
|
|
190
|
+
active={p.sort === "p50"}
|
|
191
|
+
dir={p.dir === "asc" ? "asc" : "desc"}
|
|
192
|
+
onClick={() => sortBy("p50")}
|
|
193
|
+
/>
|
|
194
|
+
),
|
|
195
|
+
align: "right",
|
|
196
|
+
cell: (s) => ms(s.p50, 2),
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
key: "p95",
|
|
200
|
+
header: (
|
|
201
|
+
<SortHeader
|
|
202
|
+
label="p95"
|
|
203
|
+
active={p.sort === "p95"}
|
|
204
|
+
dir={p.dir === "asc" ? "asc" : "desc"}
|
|
205
|
+
onClick={() => sortBy("p95")}
|
|
206
|
+
/>
|
|
207
|
+
),
|
|
208
|
+
align: "right",
|
|
209
|
+
cell: (s) => <span className="font-semibold">{ms(s.p95, 2)}</span>,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
key: "max",
|
|
213
|
+
hideOnMobile: true,
|
|
214
|
+
header: (
|
|
215
|
+
<SortHeader
|
|
216
|
+
label="Max"
|
|
217
|
+
active={p.sort === "max"}
|
|
218
|
+
dir={p.dir === "asc" ? "asc" : "desc"}
|
|
219
|
+
onClick={() => sortBy("max")}
|
|
220
|
+
/>
|
|
221
|
+
),
|
|
222
|
+
align: "right",
|
|
223
|
+
cell: (s) => ms(s.max, 2),
|
|
224
|
+
},
|
|
225
|
+
]}
|
|
226
|
+
/>
|
|
227
|
+
</EnvLayout>
|
|
228
|
+
)
|
|
229
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Link, usePage } from "@inertiajs/react"
|
|
2
|
+
import { Braces } from "lucide-react"
|
|
3
|
+
|
|
4
|
+
import { DurationPanel, VolumePanel } from "@/components/railwatch/chart-panel"
|
|
5
|
+
import { DataTable } from "@/components/railwatch/data-table"
|
|
6
|
+
import { EmptyState } from "@/components/railwatch/empty-state"
|
|
7
|
+
import { PageHeader } from "@/components/railwatch/page-header"
|
|
8
|
+
import { Stat, StatStrip } from "@/components/railwatch/stat"
|
|
9
|
+
import { StatusBadge } from "@/components/railwatch/status-badge"
|
|
10
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
|
11
|
+
import EnvLayout from "@/layouts/env-layout"
|
|
12
|
+
import { count, ms, when } from "@/lib/format"
|
|
13
|
+
import * as R from "@/routes"
|
|
14
|
+
import type { SeriesPoint, SharedProps, SummaryWithDelta } from "@/types"
|
|
15
|
+
|
|
16
|
+
interface Facet {
|
|
17
|
+
key: string
|
|
18
|
+
count: number
|
|
19
|
+
values: [string, number][]
|
|
20
|
+
}
|
|
21
|
+
interface Sample {
|
|
22
|
+
id: number
|
|
23
|
+
name: string
|
|
24
|
+
duration: number
|
|
25
|
+
status: string | null
|
|
26
|
+
attributes: Record<string, unknown>
|
|
27
|
+
occurred_at: string
|
|
28
|
+
execution_id: string | null
|
|
29
|
+
execution_preview: string | null
|
|
30
|
+
}
|
|
31
|
+
interface Props {
|
|
32
|
+
group_hash: string
|
|
33
|
+
name: string | null
|
|
34
|
+
summary: SummaryWithDelta
|
|
35
|
+
series: SeriesPoint[]
|
|
36
|
+
facets: Facet[]
|
|
37
|
+
samples: Sample[]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function Attributes({ attributes }: { attributes: Record<string, unknown> }) {
|
|
41
|
+
const entries = Object.entries(attributes)
|
|
42
|
+
if (entries.length === 0)
|
|
43
|
+
return <span className="text-muted-foreground text-xs">–</span>
|
|
44
|
+
return (
|
|
45
|
+
<span className="flex flex-wrap gap-1">
|
|
46
|
+
{entries.map(([key, value]) => (
|
|
47
|
+
<span
|
|
48
|
+
key={key}
|
|
49
|
+
className="bg-muted rounded-sm px-1.5 font-mono text-[10px]"
|
|
50
|
+
>
|
|
51
|
+
{key}={String(value)}
|
|
52
|
+
</span>
|
|
53
|
+
))}
|
|
54
|
+
</span>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default function SpanShow(p: Props) {
|
|
59
|
+
const { environment, window } = usePage<SharedProps>().props
|
|
60
|
+
const a = environment!.application_id
|
|
61
|
+
const e = environment!.id
|
|
62
|
+
const current = p.summary.current
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<EnvLayout
|
|
66
|
+
title={p.name ?? "Span"}
|
|
67
|
+
crumbs={[
|
|
68
|
+
{
|
|
69
|
+
title: "Spans",
|
|
70
|
+
href: R.applicationEnvironmentSpansPath(a, e, { window }),
|
|
71
|
+
},
|
|
72
|
+
{ title: p.name ?? "Span", href: "#" },
|
|
73
|
+
]}
|
|
74
|
+
>
|
|
75
|
+
<PageHeader
|
|
76
|
+
title={<span className="font-mono">{p.name ?? "Span"}</span>}
|
|
77
|
+
description="Every recording of this span in the window."
|
|
78
|
+
/>
|
|
79
|
+
<StatStrip>
|
|
80
|
+
<Stat
|
|
81
|
+
label="Recorded"
|
|
82
|
+
value={count(current.count)}
|
|
83
|
+
delta={{
|
|
84
|
+
current: current.count,
|
|
85
|
+
previous: p.summary.previous.count,
|
|
86
|
+
goodDirection: "up",
|
|
87
|
+
}}
|
|
88
|
+
deltaCaption="vs previous period"
|
|
89
|
+
/>
|
|
90
|
+
<Stat
|
|
91
|
+
label="Failed"
|
|
92
|
+
value={count(current.errors)}
|
|
93
|
+
tone={current.errors ? "destructive" : undefined}
|
|
94
|
+
/>
|
|
95
|
+
<Stat
|
|
96
|
+
label="p95"
|
|
97
|
+
value={ms(current.p95 / 1000, 2)}
|
|
98
|
+
hint={`p99 ${ms(current.p99 / 1000, 2)}`}
|
|
99
|
+
/>
|
|
100
|
+
<Stat
|
|
101
|
+
label="Max"
|
|
102
|
+
value={ms(current.max / 1000, 2)}
|
|
103
|
+
hint={`avg ${ms(current.avg / 1000, 2)}`}
|
|
104
|
+
/>
|
|
105
|
+
</StatStrip>
|
|
106
|
+
<div className="grid gap-4 lg:grid-cols-2">
|
|
107
|
+
<VolumePanel
|
|
108
|
+
legend="outcome"
|
|
109
|
+
label="Recordings"
|
|
110
|
+
seriesLabel="Spans"
|
|
111
|
+
data={p.series}
|
|
112
|
+
/>
|
|
113
|
+
<DurationPanel label="Duration" data={p.series} />
|
|
114
|
+
</div>
|
|
115
|
+
<Card>
|
|
116
|
+
<CardHeader>
|
|
117
|
+
<CardTitle>Attributes</CardTitle>
|
|
118
|
+
</CardHeader>
|
|
119
|
+
<CardContent>
|
|
120
|
+
<DataTable
|
|
121
|
+
rows={p.facets}
|
|
122
|
+
rowKey={(f) => f.key}
|
|
123
|
+
empty={
|
|
124
|
+
<EmptyState
|
|
125
|
+
icon={Braces}
|
|
126
|
+
title="No attributes recorded"
|
|
127
|
+
description="Pass a hash to Railwatch.span to tag each recording."
|
|
128
|
+
/>
|
|
129
|
+
}
|
|
130
|
+
columns={[
|
|
131
|
+
{
|
|
132
|
+
key: "k",
|
|
133
|
+
header: "Key",
|
|
134
|
+
cell: (f) => <span className="font-mono text-xs">{f.key}</span>,
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "v",
|
|
138
|
+
header: "Most common values",
|
|
139
|
+
cell: (f) => (
|
|
140
|
+
<span className="flex flex-wrap gap-1">
|
|
141
|
+
{f.values.map(([value, n]) => (
|
|
142
|
+
<span
|
|
143
|
+
key={value}
|
|
144
|
+
className="bg-muted rounded-sm px-1.5 font-mono text-[10px]"
|
|
145
|
+
>
|
|
146
|
+
{value}
|
|
147
|
+
<span className="text-muted-foreground"> ×{n}</span>
|
|
148
|
+
</span>
|
|
149
|
+
))}
|
|
150
|
+
</span>
|
|
151
|
+
),
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
key: "n",
|
|
155
|
+
header: "Spans",
|
|
156
|
+
align: "right",
|
|
157
|
+
cell: (f) => count(f.count),
|
|
158
|
+
},
|
|
159
|
+
]}
|
|
160
|
+
/>
|
|
161
|
+
</CardContent>
|
|
162
|
+
</Card>
|
|
163
|
+
<DataTable
|
|
164
|
+
rows={p.samples}
|
|
165
|
+
rowKey={(s) => s.id}
|
|
166
|
+
empty={
|
|
167
|
+
<EmptyState
|
|
168
|
+
icon={Braces}
|
|
169
|
+
title="No recordings in this window"
|
|
170
|
+
description="Widen the time window to see older recordings of this span."
|
|
171
|
+
/>
|
|
172
|
+
}
|
|
173
|
+
columns={[
|
|
174
|
+
{
|
|
175
|
+
key: "when",
|
|
176
|
+
header: "When",
|
|
177
|
+
cell: (s) => <span className="text-xs">{when(s.occurred_at)}</span>,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
key: "status",
|
|
181
|
+
header: "Status",
|
|
182
|
+
cell: (s) => <StatusBadge outcome={s.status} />,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "in",
|
|
186
|
+
hideOnMobile: true,
|
|
187
|
+
header: "In",
|
|
188
|
+
cell: (s) =>
|
|
189
|
+
s.execution_id ? (
|
|
190
|
+
<Link
|
|
191
|
+
className="font-mono text-xs hover:underline"
|
|
192
|
+
href={R.applicationEnvironmentRequestPath(
|
|
193
|
+
a,
|
|
194
|
+
e,
|
|
195
|
+
s.execution_id,
|
|
196
|
+
)}
|
|
197
|
+
>
|
|
198
|
+
{s.execution_preview}
|
|
199
|
+
</Link>
|
|
200
|
+
) : (
|
|
201
|
+
<span className="text-muted-foreground text-xs">–</span>
|
|
202
|
+
),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
key: "attrs",
|
|
206
|
+
hideOnMobile: true,
|
|
207
|
+
header: "Attributes",
|
|
208
|
+
cell: (s) => <Attributes attributes={s.attributes} />,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: "d",
|
|
212
|
+
header: "Duration",
|
|
213
|
+
align: "right",
|
|
214
|
+
cell: (s) => ms(s.duration, 2),
|
|
215
|
+
},
|
|
216
|
+
]}
|
|
217
|
+
/>
|
|
218
|
+
</EnvLayout>
|
|
219
|
+
)
|
|
220
|
+
}
|