railwatch 0.9.3 → 1.0.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/AGENTS.md +37 -33
- data/CHANGELOG.md +66 -0
- data/README.md +51 -60
- data/config/routes.rb +0 -59
- data/docs/ai-and-mcp.md +9 -8
- data/docs/configuration.md +57 -71
- data/docs/faq.md +17 -25
- data/docs/getting-started.md +105 -117
- data/docs/replacing-nightwatch.md +8 -7
- data/docs/replacing-sentry.md +12 -16
- data/docs/security.md +14 -20
- data/docs/self-hosting.md +24 -22
- data/docs/testing.md +6 -14
- data/docs/troubleshooting.md +12 -46
- data/lib/generators/railwatch/install/install_generator.rb +12 -240
- data/lib/generators/railwatch/install/templates/initializer.rb.tt +10 -40
- data/lib/generators/railwatch/install/templates/post-deploy +0 -7
- data/lib/railwatch/authentication.rb +6 -5
- data/lib/railwatch/buffer.rb +9 -0
- data/lib/railwatch/configuration.rb +21 -151
- data/lib/railwatch/engine.rb +9 -118
- data/lib/railwatch/patches.rb +0 -11
- data/lib/railwatch/reporter.rb +92 -21
- data/lib/railwatch/sampler.rb +10 -2
- data/lib/railwatch/subscribers/process_info.rb +1 -2
- data/lib/railwatch/version.rb +1 -1
- data/lib/railwatch.rb +8 -64
- data/lib/tasks/railwatch_tasks.rake +3 -325
- data/llms.txt +23 -25
- metadata +3 -453
- data/app/channels/railwatch/environment_channel.rb +0 -62
- data/app/controllers/concerns/railwatch/telemetry_identity.rb +0 -25
- data/app/controllers/railwatch/alerts_controller.rb +0 -48
- data/app/controllers/railwatch/anomaly_rules_controller.rb +0 -31
- data/app/controllers/railwatch/attachments_controller.rb +0 -22
- data/app/controllers/railwatch/broadcasts_controller.rb +0 -15
- data/app/controllers/railwatch/cache_events_controller.rb +0 -30
- data/app/controllers/railwatch/commands_controller.rb +0 -16
- data/app/controllers/railwatch/comments_controller.rb +0 -11
- data/app/controllers/railwatch/dashboard_controller.rb +0 -70
- data/app/controllers/railwatch/deploys_controller.rb +0 -34
- data/app/controllers/railwatch/deprecations_controller.rb +0 -54
- data/app/controllers/railwatch/environment_scoped.rb +0 -81
- data/app/controllers/railwatch/exceptions_controller.rb +0 -52
- data/app/controllers/railwatch/executions_controller.rb +0 -13
- data/app/controllers/railwatch/issues_controller.rb +0 -258
- data/app/controllers/railwatch/jobs_controller.rb +0 -63
- data/app/controllers/railwatch/llm_calls_controller.rb +0 -124
- data/app/controllers/railwatch/logs_controller.rb +0 -40
- data/app/controllers/railwatch/mails_controller.rb +0 -19
- data/app/controllers/railwatch/notifications_controller.rb +0 -11
- data/app/controllers/railwatch/outgoing_requests_controller.rb +0 -19
- data/app/controllers/railwatch/overview_controller.rb +0 -38
- data/app/controllers/railwatch/people_controller.rb +0 -25
- data/app/controllers/railwatch/processes_controller.rb +0 -33
- data/app/controllers/railwatch/profiles_controller.rb +0 -65
- data/app/controllers/railwatch/queries_controller.rb +0 -59
- data/app/controllers/railwatch/releases_controller.rb +0 -75
- data/app/controllers/railwatch/requests_controller.rb +0 -37
- data/app/controllers/railwatch/saved_views_controller.rb +0 -53
- data/app/controllers/railwatch/scheduled_tasks_controller.rb +0 -45
- data/app/controllers/railwatch/spans_controller.rb +0 -47
- data/app/controllers/railwatch/storage_ops_controller.rb +0 -15
- data/app/controllers/railwatch/tenants_controller.rb +0 -44
- data/app/controllers/railwatch/thresholds_controller.rb +0 -47
- data/app/controllers/railwatch/traces_controller.rb +0 -72
- data/app/controllers/railwatch/transactions_controller.rb +0 -21
- data/app/controllers/railwatch/view_renders_controller.rb +0 -28
- data/app/controllers/railwatch/visits_controller.rb +0 -53
- data/app/frontend/components/app-content.tsx +0 -26
- data/app/frontend/components/app-logo-icon.tsx +0 -23
- data/app/frontend/components/app-logo.tsx +0 -14
- data/app/frontend/components/app-shell.tsx +0 -38
- data/app/frontend/components/app-sidebar-header.tsx +0 -54
- data/app/frontend/components/app-sidebar.tsx +0 -94
- data/app/frontend/components/app-wordmark.tsx +0 -29
- data/app/frontend/components/breadcrumbs.tsx +0 -46
- data/app/frontend/components/icon.tsx +0 -16
- data/app/frontend/components/input-error.tsx +0 -18
- data/app/frontend/components/nav-footer.tsx +0 -46
- data/app/frontend/components/nav-main.tsx +0 -41
- data/app/frontend/components/nav-user.tsx +0 -50
- data/app/frontend/components/railwatch/chart-hover.tsx +0 -34
- data/app/frontend/components/railwatch/chart-panel.tsx +0 -170
- data/app/frontend/components/railwatch/code.tsx +0 -28
- data/app/frontend/components/railwatch/command-palette.tsx +0 -132
- data/app/frontend/components/railwatch/copy-block.tsx +0 -52
- data/app/frontend/components/railwatch/copy-id.tsx +0 -49
- data/app/frontend/components/railwatch/cursor-load-more.tsx +0 -39
- data/app/frontend/components/railwatch/data-table.tsx +0 -195
- data/app/frontend/components/railwatch/digit-roll.tsx +0 -312
- data/app/frontend/components/railwatch/empty-state.tsx +0 -159
- data/app/frontend/components/railwatch/env-nav.tsx +0 -130
- data/app/frontend/components/railwatch/env-switcher.tsx +0 -145
- data/app/frontend/components/railwatch/filter-bar.tsx +0 -153
- data/app/frontend/components/railwatch/flamegraph.tsx +0 -324
- data/app/frontend/components/railwatch/frames.tsx +0 -295
- data/app/frontend/components/railwatch/json-viewer.tsx +0 -159
- data/app/frontend/components/railwatch/live-dot.tsx +0 -78
- data/app/frontend/components/railwatch/live-toggle.tsx +0 -76
- data/app/frontend/components/railwatch/metric-chart.tsx +0 -112
- data/app/frontend/components/railwatch/mobile-page-switcher.tsx +0 -89
- data/app/frontend/components/railwatch/onboarding.tsx +0 -91
- data/app/frontend/components/railwatch/origin-identity.tsx +0 -84
- data/app/frontend/components/railwatch/page-header.tsx +0 -42
- data/app/frontend/components/railwatch/percentile-picker.tsx +0 -18
- data/app/frontend/components/railwatch/relative-time.tsx +0 -18
- data/app/frontend/components/railwatch/saved-views.tsx +0 -232
- data/app/frontend/components/railwatch/segmented.tsx +0 -64
- data/app/frontend/components/railwatch/series-chart.tsx +0 -400
- data/app/frontend/components/railwatch/shortcuts-dialog.tsx +0 -89
- data/app/frontend/components/railwatch/signal-toast.tsx +0 -121
- data/app/frontend/components/railwatch/sort-header.tsx +0 -37
- data/app/frontend/components/railwatch/source-link.tsx +0 -57
- data/app/frontend/components/railwatch/sparkline-cell.tsx +0 -14
- data/app/frontend/components/railwatch/sql-block.tsx +0 -116
- data/app/frontend/components/railwatch/stat.tsx +0 -185
- data/app/frontend/components/railwatch/status-badge.tsx +0 -79
- data/app/frontend/components/railwatch/step-picker.tsx +0 -57
- data/app/frontend/components/railwatch/timeline.tsx +0 -405
- data/app/frontend/components/railwatch/utilisation-bar.tsx +0 -44
- data/app/frontend/components/railwatch/window-picker.tsx +0 -147
- data/app/frontend/components/ui/avatar.tsx +0 -51
- data/app/frontend/components/ui/badge.tsx +0 -46
- data/app/frontend/components/ui/breadcrumb.tsx +0 -109
- data/app/frontend/components/ui/button.tsx +0 -60
- data/app/frontend/components/ui/card.tsx +0 -92
- data/app/frontend/components/ui/chart.tsx +0 -374
- data/app/frontend/components/ui/checkbox.tsx +0 -32
- data/app/frontend/components/ui/collapsible.tsx +0 -31
- data/app/frontend/components/ui/command.tsx +0 -182
- data/app/frontend/components/ui/dialog.tsx +0 -158
- data/app/frontend/components/ui/dropdown-menu.tsx +0 -255
- data/app/frontend/components/ui/hover-card.tsx +0 -42
- data/app/frontend/components/ui/input.tsx +0 -21
- data/app/frontend/components/ui/label.tsx +0 -24
- data/app/frontend/components/ui/popover.tsx +0 -87
- data/app/frontend/components/ui/select.tsx +0 -185
- data/app/frontend/components/ui/separator.tsx +0 -28
- data/app/frontend/components/ui/sheet.tsx +0 -137
- data/app/frontend/components/ui/sidebar.tsx +0 -726
- data/app/frontend/components/ui/skeleton.tsx +0 -13
- data/app/frontend/components/ui/sonner.tsx +0 -41
- data/app/frontend/components/ui/table.tsx +0 -114
- data/app/frontend/components/ui/tabs.tsx +0 -91
- data/app/frontend/components/ui/textarea.tsx +0 -18
- data/app/frontend/components/ui/tooltip.tsx +0 -61
- data/app/frontend/components/user-info.tsx +0 -32
- data/app/frontend/components/user-menu-content.tsx +0 -94
- data/app/frontend/entrypoints/application.css +0 -244
- data/app/frontend/entrypoints/inertia.tsx +0 -92
- 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 +0 -67
- data/app/frontend/hooks/use-clipboard.ts +0 -32
- data/app/frontend/hooks/use-flash.tsx +0 -23
- data/app/frontend/hooks/use-hotkeys.ts +0 -63
- data/app/frontend/hooks/use-initials.tsx +0 -15
- data/app/frontend/hooks/use-live.ts +0 -205
- data/app/frontend/hooks/use-mobile-navigation.ts +0 -8
- data/app/frontend/hooks/use-mobile.ts +0 -21
- data/app/frontend/hooks/use-percentile.ts +0 -24
- data/app/frontend/hooks/use-reduced-motion.ts +0 -25
- data/app/frontend/hooks/use-row-nav.ts +0 -106
- data/app/frontend/hooks/use-step.ts +0 -27
- data/app/frontend/hooks/use-ticker.ts +0 -12
- data/app/frontend/hooks/use-window.ts +0 -58
- data/app/frontend/layouts/app/app-sidebar-layout.tsx +0 -107
- data/app/frontend/layouts/app-layout.tsx +0 -21
- data/app/frontend/layouts/env-layout.tsx +0 -53
- data/app/frontend/layouts/persistent-layout.tsx +0 -18
- data/app/frontend/lib/cable.ts +0 -10
- data/app/frontend/lib/env-pages.ts +0 -236
- data/app/frontend/lib/execution-path.ts +0 -55
- data/app/frontend/lib/explain.ts +0 -50
- data/app/frontend/lib/filter.ts +0 -25
- data/app/frontend/lib/flamegraph.ts +0 -155
- data/app/frontend/lib/format.ts +0 -71
- data/app/frontend/lib/keyboard.ts +0 -18
- data/app/frontend/lib/mount.ts +0 -23
- data/app/frontend/lib/source-link.ts +0 -217
- data/app/frontend/lib/utils.ts +0 -6
- data/app/frontend/pages/alerts/index.tsx +0 -171
- data/app/frontend/pages/broadcasts/index.tsx +0 -171
- data/app/frontend/pages/cache_events/index.tsx +0 -127
- data/app/frontend/pages/commands/index.tsx +0 -143
- data/app/frontend/pages/deploys/index.tsx +0 -94
- data/app/frontend/pages/deploys/show.tsx +0 -309
- data/app/frontend/pages/deprecations/index.tsx +0 -176
- data/app/frontend/pages/exceptions/index.tsx +0 -271
- data/app/frontend/pages/executions/show.tsx +0 -821
- data/app/frontend/pages/issues/index.tsx +0 -399
- data/app/frontend/pages/issues/show.tsx +0 -1367
- data/app/frontend/pages/jobs/index.tsx +0 -381
- data/app/frontend/pages/jobs/klass.tsx +0 -215
- data/app/frontend/pages/llm_calls/index.tsx +0 -664
- data/app/frontend/pages/logs/index.tsx +0 -303
- data/app/frontend/pages/mails/index.tsx +0 -218
- data/app/frontend/pages/notifications/index.tsx +0 -161
- data/app/frontend/pages/outgoing_requests/index.tsx +0 -309
- data/app/frontend/pages/overview/show.tsx +0 -333
- data/app/frontend/pages/people/index.tsx +0 -102
- data/app/frontend/pages/people/show.tsx +0 -149
- data/app/frontend/pages/processes/index.tsx +0 -335
- data/app/frontend/pages/profiles/index.tsx +0 -110
- data/app/frontend/pages/profiles/show.tsx +0 -105
- data/app/frontend/pages/queries/index.tsx +0 -492
- data/app/frontend/pages/queries/show.tsx +0 -276
- data/app/frontend/pages/releases/index.tsx +0 -190
- data/app/frontend/pages/releases/release-health.tsx +0 -68
- data/app/frontend/pages/releases/release-path.ts +0 -25
- data/app/frontend/pages/releases/show.tsx +0 -262
- data/app/frontend/pages/requests/index.tsx +0 -235
- data/app/frontend/pages/requests/route.tsx +0 -159
- data/app/frontend/pages/scheduled_tasks/index.tsx +0 -220
- data/app/frontend/pages/spans/index.tsx +0 -229
- data/app/frontend/pages/spans/show.tsx +0 -220
- data/app/frontend/pages/storage_ops/index.tsx +0 -150
- data/app/frontend/pages/tenants/index.tsx +0 -236
- data/app/frontend/pages/tenants/show.tsx +0 -477
- data/app/frontend/pages/tenants/tenant-path.ts +0 -26
- data/app/frontend/pages/thresholds/index.tsx +0 -414
- data/app/frontend/pages/traces/show.tsx +0 -208
- data/app/frontend/pages/transactions/index.tsx +0 -220
- data/app/frontend/pages/view_renders/index.tsx +0 -241
- data/app/frontend/pages/visits/index.tsx +0 -321
- data/app/frontend/public/icon.png +0 -0
- data/app/frontend/public/icon.svg +0 -5
- data/app/frontend/routes/index.d.ts +0 -2136
- data/app/frontend/routes/index.js +0 -2112
- data/app/frontend/types/globals.d.ts +0 -9
- data/app/frontend/types/index.ts +0 -288
- data/app/frontend/types/vite-env.d.ts +0 -9
- data/app/helpers/railwatch/assets_helper.rb +0 -52
- data/app/jobs/railwatch/anomaly_scan_job.rb +0 -11
- data/app/jobs/railwatch/application_job.rb +0 -7
- data/app/jobs/railwatch/auto_resolve_issues_job.rb +0 -19
- data/app/jobs/railwatch/check_scheduled_tasks_job.rb +0 -113
- data/app/jobs/railwatch/detect_anomalies_job.rb +0 -171
- data/app/jobs/railwatch/detect_performance_issues_job.rb +0 -95
- data/app/jobs/railwatch/group_exceptions_job.rb +0 -91
- data/app/jobs/railwatch/optimize_telemetry_job.rb +0 -23
- data/app/jobs/railwatch/performance_scan_job.rb +0 -11
- data/app/jobs/railwatch/prune_telemetry_job.rb +0 -129
- data/app/jobs/railwatch/release_health_rollup_job.rb +0 -64
- data/app/jobs/railwatch/rollup_catchup_job.rb +0 -21
- data/app/jobs/railwatch/rollup_job.rb +0 -132
- data/app/jobs/railwatch/scheduled_task_scan_job.rb +0 -11
- data/app/models/concerns/railwatch/detection_snapshotting.rb +0 -20
- data/app/models/railwatch/alert.rb +0 -229
- data/app/models/railwatch/alert_rule.rb +0 -121
- data/app/models/railwatch/anomaly_rule.rb +0 -51
- data/app/models/railwatch/application.rb +0 -44
- data/app/models/railwatch/application_record.rb +0 -33
- data/app/models/railwatch/comment.rb +0 -36
- data/app/models/railwatch/deploy.rb +0 -67
- data/app/models/railwatch/environment.rb +0 -68
- data/app/models/railwatch/execution_presenter.rb +0 -185
- data/app/models/railwatch/filter_query.rb +0 -184
- data/app/models/railwatch/followup_receipt.rb +0 -27
- data/app/models/railwatch/ingest/batch.rb +0 -355
- data/app/models/railwatch/ingest/mapper.rb +0 -585
- data/app/models/railwatch/ingest/payload.rb +0 -96
- data/app/models/railwatch/ingest/rollup_absorber.rb +0 -170
- data/app/models/railwatch/ingest/writer.rb +0 -137
- data/app/models/railwatch/issue.rb +0 -277
- data/app/models/railwatch/issue_activity.rb +0 -23
- data/app/models/railwatch/issue_detection_presenter.rb +0 -309
- data/app/models/railwatch/issue_detection_snapshot.rb +0 -77
- data/app/models/railwatch/maintenance_task.rb +0 -53
- data/app/models/railwatch/saved_view.rb +0 -63
- data/app/models/railwatch/telemetry/aggregations.rb +0 -251
- data/app/models/railwatch/telemetry/attachment.rb +0 -31
- data/app/models/railwatch/telemetry/bounded_gzip.rb +0 -101
- data/app/models/railwatch/telemetry/broadcast.rb +0 -13
- data/app/models/railwatch/telemetry/cache_event.rb +0 -16
- data/app/models/railwatch/telemetry/child.rb +0 -53
- data/app/models/railwatch/telemetry/cursor_page.rb +0 -99
- data/app/models/railwatch/telemetry/deprecation.rb +0 -13
- data/app/models/railwatch/telemetry/enqueued_job.rb +0 -13
- data/app/models/railwatch/telemetry/exception.rb +0 -28
- data/app/models/railwatch/telemetry/execution.rb +0 -152
- data/app/models/railwatch/telemetry/export_delivery.rb +0 -32
- data/app/models/railwatch/telemetry/export_destination.rb +0 -66
- data/app/models/railwatch/telemetry/health_sample.rb +0 -72
- data/app/models/railwatch/telemetry/ingest_batch.rb +0 -31
- data/app/models/railwatch/telemetry/llm_call.rb +0 -37
- data/app/models/railwatch/telemetry/log.rb +0 -91
- data/app/models/railwatch/telemetry/mail.rb +0 -13
- data/app/models/railwatch/telemetry/n_plus_one.rb +0 -92
- data/app/models/railwatch/telemetry/notification.rb +0 -13
- data/app/models/railwatch/telemetry/outgoing_request.rb +0 -13
- data/app/models/railwatch/telemetry/person.rb +0 -50
- data/app/models/railwatch/telemetry/process.rb +0 -10
- data/app/models/railwatch/telemetry/profile.rb +0 -37
- data/app/models/railwatch/telemetry/query.rb +0 -57
- data/app/models/railwatch/telemetry/query_shape.rb +0 -45
- data/app/models/railwatch/telemetry/release_health.rb +0 -69
- data/app/models/railwatch/telemetry/rollup.rb +0 -157
- data/app/models/railwatch/telemetry/session.rb +0 -24
- data/app/models/railwatch/telemetry/span.rb +0 -19
- data/app/models/railwatch/telemetry/storage_op.rb +0 -13
- data/app/models/railwatch/telemetry/tenant.rb +0 -240
- data/app/models/railwatch/telemetry/transaction.rb +0 -13
- data/app/models/railwatch/telemetry/view_render.rb +0 -13
- data/app/models/railwatch/telemetry/visit.rb +0 -24
- data/app/models/railwatch/telemetry_record.rb +0 -107
- data/app/models/railwatch/threshold.rb +0 -66
- data/app/models/railwatch/user.rb +0 -47
- data/app/models/railwatch/viewer.rb +0 -13
- data/app/models/railwatch/window.rb +0 -66
- data/app/views/layouts/railwatch/dashboard.html.erb +0 -25
- data/db/railwatch_migrate/20260916000000_create_railwatch_tables.rb +0 -151
- data/db/railwatch_migrate/20260917000000_create_railwatch_maintenance_tasks.rb +0 -18
- data/db/railwatch_migrate/20260917120000_create_railwatch_followup_receipts.rb +0 -20
- data/db/railwatch_migrate/20260918120000_widen_host_user_ids.rb +0 -71
- data/db/railwatch_telemetry_migrate/20260903000000_enable_incremental_vacuum.rb +0 -62
- data/db/railwatch_telemetry_migrate/20260903000001_create_telemetry.rb +0 -481
- data/db/railwatch_telemetry_migrate/20260903000002_rename_tenant_to_app_tenant.rb +0 -14
- data/db/railwatch_telemetry_migrate/20260903000003_add_statement_count_to_transactions.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260903000004_add_role_and_channel.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260903000005_add_locals_to_exceptions.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260903000006_add_spans_health_vitals_and_fts.rb +0 -82
- data/db/railwatch_telemetry_migrate/20260903000007_rename_span_attributes_to_payload.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260903000008_add_profiles_and_attachments.rb +0 -60
- data/db/railwatch_telemetry_migrate/20260903000009_add_truncated_to_attachments.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260903000010_create_sessions_and_release_health.rb +0 -51
- data/db/railwatch_telemetry_migrate/20260903000011_add_fingerprint_to_exceptions.rb +0 -11
- data/db/railwatch_telemetry_migrate/20260904000012_add_failed_to_broadcasts.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260904010000_add_filter_cursor_indexes.rb +0 -37
- data/db/railwatch_telemetry_migrate/20260904020000_add_n_plus_ones_execution_id_index.rb +0 -11
- data/db/railwatch_telemetry_migrate/20260904120000_create_query_shapes.rb +0 -15
- data/db/railwatch_telemetry_migrate/20260906120000_add_backpressure_factor_to_ingest_batches.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260907000000_rename_lantern_version_on_processes.rb +0 -10
- data/db/railwatch_telemetry_migrate/20260913000000_rename_nightrail_version_on_processes.rb +0 -9
- data/db/railwatch_telemetry_migrate/20260914000000_drop_orphan_durable_ingest_tables.rb +0 -18
- data/db/railwatch_telemetry_migrate/20260914010000_drop_orphan_durable_ingest_columns.rb +0 -25
- data/db/railwatch_telemetry_migrate/20260915000000_create_llm_calls.rb +0 -55
- data/db/railwatch_telemetry_migrate/20260915120000_add_detail_to_llm_calls.rb +0 -21
- data/db/railwatch_telemetry_migrate/20260915200000_add_explained_index_to_queries.rb +0 -16
- data/db/railwatch_telemetry_migrate/20260915210000_add_slowest_index_to_queries.rb +0 -18
- data/db/railwatch_telemetry_migrate/20260917010000_add_batch_ledger_to_ingest_batches.rb +0 -16
- data/db/railwatch_telemetry_migrate/20260919000100_create_export_queue.rb +0 -146
- data/db/railwatch_telemetry_migrate/20260922000000_add_covering_indexes_for_dashboard_aggregates.rb +0 -34
- data/db/railwatch_telemetry_migrate/20260923000000_add_people_index.rb +0 -15
- data/db/railwatch_telemetry_migrate/20260925000000_add_tenant_summary_index.rb +0 -17
- data/db/railwatch_telemetry_migrate/20261008000000_add_in_transaction_to_outgoing_requests.rb +0 -10
- data/docs/embedded.md +0 -503
- data/lib/puma/plugin/railwatch.rb +0 -215
- data/lib/railwatch/dashboard_assets.rb +0 -45
- data/lib/railwatch/embedded.rb +0 -50
- data/lib/railwatch/export/client.rb +0 -124
- data/lib/railwatch/export/lease.rb +0 -56
- data/lib/railwatch/export/outbox.rb +0 -361
- data/lib/railwatch/export/policy.rb +0 -79
- data/lib/railwatch/export/sender.rb +0 -130
- data/lib/railwatch/ingest_request_body_limit.rb +0 -10
- data/lib/railwatch/maintenance.rb +0 -194
- data/lib/railwatch/patches/migration_busy_timeout.rb +0 -73
- data/lib/railwatch/transport/local.rb +0 -78
- data/lib/railwatch/transport/socket.rb +0 -183
- data/lib/railwatch/writer.rb +0 -370
- data/public/railwatch/assets/CommitMono-Bold-D6h61ieg.woff2 +0 -0
- data/public/railwatch/assets/CommitMono-Regular-zr8w7Obm.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Black-auA4GeOK.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Bold-CJLnO8j1.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Medium-Cm2bwKpj.woff2 +0 -0
- data/public/railwatch/assets/Roboto-Regular-Chaq1-PV.woff2 +0 -0
- data/public/railwatch/assets/app-layout-by7G3sa1.js +0 -41
- data/public/railwatch/assets/application-Cc5v_Vk9.css +0 -1
- data/public/railwatch/assets/arrow-up-DCZ7emux.js +0 -1
- data/public/railwatch/assets/braces-CykT5_5u.js +0 -1
- data/public/railwatch/assets/card-C-PPSA0g.js +0 -1
- data/public/railwatch/assets/chart-Cov79YC5.js +0 -39
- data/public/railwatch/assets/chart-hover-DdK4E-2h.js +0 -1
- data/public/railwatch/assets/chart-panel-BPaYRXJB.js +0 -1
- data/public/railwatch/assets/code-BYjC4YZ_.js +0 -1
- data/public/railwatch/assets/copy-id-LPfoj9cC.js +0 -1
- data/public/railwatch/assets/cursor-load-more-DSdhgpGl.js +0 -1
- data/public/railwatch/assets/data-table-CQ_YRWQs.js +0 -1
- data/public/railwatch/assets/env-layout-CdMWbUkm.js +0 -1
- data/public/railwatch/assets/execution-path-7MYt-Qbn.js +0 -1
- data/public/railwatch/assets/filter-bar-CrzpQ_vD.js +0 -1
- data/public/railwatch/assets/flamegraph-BIFEdTAg.js +0 -2
- data/public/railwatch/assets/format-B9SDkrWj.js +0 -1
- data/public/railwatch/assets/frames-C5t-x4f0.js +0 -1
- data/public/railwatch/assets/index--NQ7us-L.js +0 -1
- data/public/railwatch/assets/index-2kgYe_99.js +0 -1
- data/public/railwatch/assets/index-4YEPHxtO.js +0 -1
- data/public/railwatch/assets/index-AOCC1GDJ.js +0 -1
- data/public/railwatch/assets/index-BEo-u0eO.js +0 -1
- data/public/railwatch/assets/index-BJ1V3w2N.js +0 -1
- data/public/railwatch/assets/index-BPoHsBKb.js +0 -1
- data/public/railwatch/assets/index-BZzyGUM3.js +0 -1
- data/public/railwatch/assets/index-BgVq7yKL.js +0 -1
- data/public/railwatch/assets/index-BqFGEZvW.js +0 -1
- data/public/railwatch/assets/index-ByuHJ1CH.js +0 -1
- data/public/railwatch/assets/index-C2j50AL2.js +0 -1
- data/public/railwatch/assets/index-CLEdTkvW.js +0 -1
- data/public/railwatch/assets/index-CWgq8qBu.js +0 -1
- data/public/railwatch/assets/index-CXQ7_oVj.js +0 -2
- data/public/railwatch/assets/index-CmyYrjS2.js +0 -1
- data/public/railwatch/assets/index-Cn9_HjDo.js +0 -1
- data/public/railwatch/assets/index-CsMAm9UK.js +0 -1
- data/public/railwatch/assets/index-D0Kk_oGY.js +0 -1
- data/public/railwatch/assets/index-DC9ZptJh.js +0 -1
- data/public/railwatch/assets/index-DNzg7jmV.js +0 -1
- data/public/railwatch/assets/index-DQ8uJO5f.js +0 -1
- data/public/railwatch/assets/index-Deq14BxB.js +0 -1
- data/public/railwatch/assets/index-IaV3Blzp.js +0 -1
- data/public/railwatch/assets/index-TYNWcJQs.js +0 -1
- data/public/railwatch/assets/index-WonH2fcZ.js +0 -1
- data/public/railwatch/assets/index-WxWUaH_d.js +0 -1
- data/public/railwatch/assets/index-mUNrl4ky.js +0 -1
- data/public/railwatch/assets/inertia-DfNRARuA.js +0 -97
- data/public/railwatch/assets/json-viewer-DMsF5glp.js +0 -1
- data/public/railwatch/assets/klass-CmHYk5rz.js +0 -1
- data/public/railwatch/assets/origin-identity-1R3bqa3R.js +0 -1
- data/public/railwatch/assets/percentile-picker-73z5PAps.js +0 -1
- data/public/railwatch/assets/relative-time-Dsc_cCdX.js +0 -1
- data/public/railwatch/assets/release-health-BV5OaOWd.js +0 -1
- data/public/railwatch/assets/route-CWh58C7K.js +0 -1
- data/public/railwatch/assets/segmented-DB4zh-Am.js +0 -1
- data/public/railwatch/assets/select-DBKjFlOX.js +0 -1
- data/public/railwatch/assets/series-chart-BaiDG795.js +0 -1
- data/public/railwatch/assets/show-B4ICCFGh.js +0 -1
- data/public/railwatch/assets/show-B5lOU9Gv.js +0 -1
- data/public/railwatch/assets/show-BYPB74t4.js +0 -2
- data/public/railwatch/assets/show-C7A0m2M8.js +0 -1
- data/public/railwatch/assets/show-DT5X1zqE.js +0 -1
- data/public/railwatch/assets/show-D_NBdXsn.js +0 -2
- data/public/railwatch/assets/show-DgPCnRg8.js +0 -1
- data/public/railwatch/assets/show-Yl69HF0x.js +0 -1
- data/public/railwatch/assets/show-_QxuUQCm.js +0 -3
- data/public/railwatch/assets/show-g__jnN36.js +0 -1
- data/public/railwatch/assets/show-l4ztfjl9.js +0 -1
- data/public/railwatch/assets/sort-header-BcG8ulEH.js +0 -1
- data/public/railwatch/assets/source-link-B2183i2-.js +0 -1
- data/public/railwatch/assets/sparkline-cell-B47ipscB.js +0 -1
- data/public/railwatch/assets/stat-DT2hhsqS.js +0 -1
- data/public/railwatch/assets/status-badge-CmbRKlY7.js +0 -1
- data/public/railwatch/assets/tenant-path-C4rNGauE.js +0 -1
- data/public/railwatch/assets/use-clipboard-oTNeP4ax.js +0 -1
- data/public/railwatch/assets/use-live-CLZZj245.js +0 -1
- data/public/railwatch/icon.png +0 -0
- data/public/railwatch/icon.svg +0 -5
- data/public/railwatch/manifest.json +0 -1245
- data/public/railwatch/rails-vite.json +0 -1
- /data/{app/frontend/lib → lib/generators/railwatch/install/templates}/railwatch.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,c as i,j as v}from"./inertia-DfNRARuA.js";const x=()=>{},d={hoveredKey:null,setHoveredKey:x},a=c.createContext(d);function C(l){const e=i.c(5),{children:r}=l,[s,u]=c.useState(null);let t;e[0]!==s?(t={hoveredKey:s,setHoveredKey:u},e[0]=s,e[1]=t):t=e[1];const n=t;let o;return e[2]!==r||e[3]!==n?(o=v.jsx(a.Provider,{value:n,children:r}),e[2]=r,e[3]=n,e[4]=o):o=e[4],o}function f(){return c.useContext(a)}export{C,f as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,o as P,j as u}from"./inertia-DfNRARuA.js";import{T as R,L as T}from"./series-chart-BaiDG795.js";import{c as L,m as _}from"./format-B9SDkrWj.js";function q(l){const e=C.c(18),{label:s,value:d,legend:p,children:v,className:g}=l;let t;e[0]!==g?(t=P("bg-card rounded-lg border p-4",g),e[0]=g,e[1]=t):t=e[1];let c;e[2]!==s?(c=u.jsx("div",{className:"label-caps",children:s}),e[2]=s,e[3]=c):c=e[3];let i;e[4]!==d?(i=u.jsx("div",{className:"mt-0.5 text-xl font-semibold tracking-tight tabular-nums",children:d}),e[4]=d,e[5]=i):i=e[5];let a;e[6]!==c||e[7]!==i?(a=u.jsxs("div",{className:"min-w-0",children:[c,i]}),e[6]=c,e[7]=i,e[8]=a):a=e[8];let n;e[9]!==p?(n=p&&u.jsx("div",{className:"flex shrink-0 gap-4",children:p.map(V)}),e[9]=p,e[10]=n):n=e[10];let o;e[11]!==a||e[12]!==n?(o=u.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a,n]}),e[11]=a,e[12]=n,e[13]=o):o=e[13];let r;return e[14]!==v||e[15]!==t||e[16]!==o?(r=u.jsxs("div",{className:t,children:[o,v]}),e[14]=v,e[15]=t,e[16]=o,e[17]=r):r=e[17],r}function V(l){return u.jsxs("div",{className:"text-right",children:[u.jsxs("div",{className:"label-caps flex items-center justify-end gap-1.5",children:[u.jsx("span",{className:"inline-block h-2.5 w-1 rounded-sm",style:{background:l.color}}),l.label]}),u.jsx("div",{className:"mt-0.5 font-mono text-sm tabular-nums",children:l.value})]},l.key)}function $(l,e){return l.reduce((s,d)=>s+d[e],0)}const B={request:{ok:"1/2/3xx",warn:"4xx",error:"5xx"},job:{ok:"processed",warn:"released",error:"failed"},outcome:{ok:"ok",warn:null,error:"failed"},exception:{ok:"handled",warn:null,error:"unhandled"},cache:{ok:"hit",warn:"miss",error:"write"}};function H(l){const e=C.c(27),{data:s,deploys:d,label:p,seriesLabel:v,legend:g,className:t}=l,c=p===void 0?"Requests":p,i=g===void 0?"request":g;let a,n,o,r;if(e[0]!==s||e[1]!==c||e[2]!==i){const j=$(s,"count"),w=$(s,"errors"),N=$(s,"client_errors"),m=B[i],y=m.ok,k=j-w-N;let x;e[7]!==k?(x=L(k),e[7]=k,e[8]=x):x=e[8];let f;e[9]!==x||e[10]!==m.ok?(f={key:"ok",label:y,value:x,color:"var(--ok)"},e[9]=x,e[10]=m.ok,e[11]=f):f=e[11];const M=m.warn&&{key:"warn",label:m.warn,value:L(N),color:"var(--warning)"},D={key:"error",label:m.error,value:L(w),color:"var(--danger)"};let E;e[12]!==D||e[13]!==f||e[14]!==M?(E=[f,M,D].filter(G),e[12]=D,e[13]=f,e[14]=M,e[15]=E):E=e[15],n=E,a=q,o=c,r=L(j),e[0]=s,e[1]=c,e[2]=i,e[3]=a,e[4]=n,e[5]=o,e[6]=r}else a=e[3],n=e[4],o=e[5],r=e[6];let b;e[16]!==s||e[17]!==d||e[18]!==v?(b=u.jsx(R,{data:s,deploys:d,label:v}),e[16]=s,e[17]=d,e[18]=v,e[19]=b):b=e[19];let h;return e[20]!==a||e[21]!==t||e[22]!==n||e[23]!==o||e[24]!==r||e[25]!==b?(h=u.jsx(a,{label:o,value:r,className:t,legend:n,children:b}),e[20]=a,e[21]=t,e[22]=n,e[23]=o,e[24]=r,e[25]=b,e[26]=h):h=e[26],h}function G(l){return!!l}function I(l){const e=C.c(35),{data:s,deploys:d,percentile:p,label:v,className:g}=l,t=p===void 0?"p95":p,c=v===void 0?"Duration":v;let i,a,n,o,r;if(e[0]!==s||e[1]!==t){r=s.filter(U);const f=r.flatMap(S);let M;e[7]!==t?(M=E=>E[t]==null?[]:[E[t]],e[7]=t,e[8]=M):M=e[8];const D=r.flatMap(M);i=f.length?f.reduce(O,0)/f.length:0,n=D.length?Math.max(...D):0,a=f.length?Math.min(...f):0,o=D.length?Math.max(...D):0,e[0]=s,e[1]=t,e[2]=i,e[3]=a,e[4]=n,e[5]=o,e[6]=r}else i=e[2],a=e[3],n=e[4],o=e[5],r=e[6];const b=o;let h;e[9]!==b||e[10]!==a||e[11]!==r.length?(h=r.length?`${_(a)} — ${_(b)}`:"—",e[9]=b,e[10]=a,e[11]=r.length,e[12]=h):h=e[12];let j;e[13]!==i?(j=_(i),e[13]=i,e[14]=j):j=e[14];let w;e[15]!==j?(w={key:"avg",label:"avg",value:j,color:"var(--warning)"},e[15]=j,e[16]=w):w=e[16];let N;e[17]!==n?(N=_(n),e[17]=n,e[18]=N):N=e[18];let m;e[19]!==t||e[20]!==N?(m={key:t,label:t,value:N,color:"var(--primary)"},e[19]=t,e[20]=N,e[21]=m):m=e[21];let y;e[22]!==w||e[23]!==m?(y=[w,m],e[22]=w,e[23]=m,e[24]=y):y=e[24];let k;e[25]!==s||e[26]!==d||e[27]!==t?(k=u.jsx(T,{data:s,deploys:d,percentile:t}),e[25]=s,e[26]=d,e[27]=t,e[28]=k):k=e[28];let x;return e[29]!==g||e[30]!==c||e[31]!==k||e[32]!==h||e[33]!==y?(x=u.jsx(q,{label:c,value:h,className:g,legend:y,children:k}),e[29]=g,e[30]=c,e[31]=k,e[32]=h,e[33]=y,e[34]=x):x=e[34],x}function O(l,e){return l+e}function S(l){return l.avg==null?[]:[l.avg]}function U(l){return l.count>0}export{q as C,I as D,H as V};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,o as a,j as i}from"./inertia-DfNRARuA.js";function m(c){const t=l.c(5),{children:o,className:n}=c;let e;t[0]!==n?(e=a("block max-w-full truncate font-mono text-xs",n),t[0]=n,t[1]=e):e=t[1];let s;return t[2]!==o||t[3]!==e?(s=i.jsx("code",{className:e,title:o,children:o}),t[2]=o,t[3]=e,t[4]=s):s=t[4],s}function x(c){const t=l.c(5),{children:o,className:n}=c;let e;t[0]!==n?(e=a("font-mono text-xs",n),t[0]=n,t[1]=e):e=t[1];let s;return t[2]!==o||t[3]!==e?(s=i.jsx("span",{className:e,children:o}),t[2]=o,t[3]=e,t[4]=s):s=t[4],s}export{x as M,m as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as d,r as y,o as h,j as m}from"./inertia-DfNRARuA.js";import{q as j,b as E}from"./app-layout-by7G3sa1.js";import{u as b,C as N}from"./use-clipboard-oTNeP4ax.js";const z=1500;function k(f){const t=d.c(12),{value:o,label:x,className:n}=f,[,l]=b(),[c,u]=y.useState(!1);let a;t[0]!==l||t[1]!==o?(a=()=>{l(o).then(C=>{C&&(u(!0),window.setTimeout(()=>u(!1),z))})},t[0]=l,t[1]=o,t[2]=a):a=t[2];const r=a;let s;t[3]!==n?(s=h("h-auto gap-1.5 px-1.5 py-0.5 font-mono text-xs",n),t[3]=n,t[4]=s):s=t[4];const p=x??o;let e;t[5]!==c?(e=c?m.jsx(j,{className:"size-3 text-emerald-500"}):m.jsx(N,{className:"size-3 opacity-60"}),t[5]=c,t[6]=e):e=t[6];let i;return t[7]!==r||t[8]!==s||t[9]!==p||t[10]!==e?(i=m.jsxs(E,{type:"button",variant:"ghost",size:"sm",className:s,onClick:r,children:[p,e]}),t[7]=r,t[8]=s,t[9]=p,t[10]=e,t[11]=i):i=t[11],i}export{k as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,r as x,d,j as u}from"./inertia-DfNRARuA.js";import{b as f}from"./app-layout-by7G3sa1.js";function j(c){const t=m.c(8),{meta:e,href:n,only:i}=c,[o,l]=x.useState(!1);if(!e.has_more||!e.next_cursor)return null;let r;t[0]!==n||t[1]!==e.next_cursor||t[2]!==i?(r=()=>d.visit(n(e.next_cursor),{only:i,preserveState:!0,preserveScroll:!0,onStart:()=>l(!0),onFinish:()=>l(!1)}),t[0]=n,t[1]=e.next_cursor,t[2]=i,t[3]=r):r=t[3];const a=o?"Loading…":"Load "+e.limit+" more";let s;return t[4]!==o||t[5]!==r||t[6]!==a?(s=u.jsx("div",{className:"flex justify-center pt-3",children:u.jsx(f,{type:"button",variant:"outline",disabled:o,onClick:r,children:a})}),t[4]=o,t[5]=r,t[6]=a,t[7]=s):s=t[7],s}export{j as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as j,o as h,j as o,r as d}from"./inertia-DfNRARuA.js";import{u as D}from"./chart-hover-DdK4E-2h.js";import{E as C}from"./app-layout-by7G3sa1.js";function _(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("w-full caption-bottom text-sm",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:o.jsx("table",{"data-slot":"table",className:l,...t})}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function M(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("[&_tr]:border-b",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function S(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("[&_tr:last-child]:border-0",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function T(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function I(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function H(n){const e=j.c(8);let s,t;e[0]!==n?({className:s,...t}=n,e[0]=n,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=h("px-3 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==t||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...t}),e[5]=t,e[6]=l,e[7]=r):r=e[7],r}function K(n){return n.defaultPrevented||n.isComposing||n.repeat||n.metaKey||n.ctrlKey||n.altKey||n.shiftKey||n.target instanceof Element&&!!n.target.closest('input, textarea, select, button, a, [contenteditable]:not([contenteditable="false"]), [role="button"], [role="combobox"], [role="textbox"], [role="menu"], [role="listbox"], [role="dialog"]')}const N=new Map;let x;function $({rows:n,rowKey:e,onOpen:s,enabled:t=!0}){const[l,r]=d.useState(null),[u]=d.useState(()=>Symbol("row-nav"));function v(){!t||x===u||(x&&N.get(x)?.(),x=u)}d.useEffect(()=>{if(t)return N.set(u,()=>r(null)),x??=u,()=>{N.delete(u),x===u&&(x=N.keys().next().value)}},[t,u]);const w=d.useRef(n),m=d.useRef(e),g=d.useRef(s);return d.useEffect(()=>{w.current=n,m.current=e,g.current=s}),d.useEffect(()=>{if(!t)return;function b(c){if(x!==u||K(c))return;if(c.key==="/"){const i=document.querySelector("[data-filter-bar-input]");i&&(c.preventDefault(),i.focus());return}const f=w.current,y=m.current,a=f.findIndex(i=>y(i)===l);if(c.key==="j"){if(f.length===0)return;c.preventDefault();const i=Math.min(a+1,f.length-1);r(y(f[i]))}else if(c.key==="k"){if(f.length===0)return;c.preventDefault();const i=a<0?0:Math.max(a-1,0);r(y(f[i]))}else c.key==="Enter"?a>=0&&(c.preventDefault(),g.current(f[a])):c.key==="o"?a>=0&&(c.preventDefault(),g.current(f[a],{newTab:!0})):c.key==="Escape"&&r(null)}return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[l,t,u]),{highlighted:l,setHighlighted:r,activate:v}}const B='a, button, input, select, textarea, [role="button"], [role="link"], [contenteditable="true"]';function L(n){return n instanceof Element&&n.closest(B)}function V({rows:n,columns:e,rowKey:s,empty:t="Nothing here yet.",onRowClick:l,keyboardNav:r,hoverKey:u,rowClassName:v,className:w}){const{highlighted:m,activate:g}=$({rows:n,rowKey:s,onOpen:r?.onOpen??(()=>{}),enabled:!!r&&r?.enabled!==!1}),b=d.useRef(new Map);d.useEffect(()=>{m!=null&&b.current.get(m)?.scrollIntoView({block:"nearest"})},[m]),d.useEffect(()=>{if(!r?.onHighlightChange)return;const a=n.find(i=>s(i)===m)??null;r.onHighlightChange(a)},[m]);const{hoveredKey:c,setHoveredKey:f}=D(),y=a=>h(a.align==="right"&&"text-right",a.hideOnMobile&&"hidden md:table-cell",a.grow&&"w-full max-w-0 truncate",a.className);return o.jsx("div",{tabIndex:r&&r.enabled!==!1?0:void 0,onFocusCapture:g,onPointerDownCapture:g,className:h("bg-card -mx-3 overflow-x-auto border-y md:mx-0 md:rounded-lg md:border",w),children:o.jsxs(_,{children:[o.jsx(M,{children:o.jsx(T,{className:"hover:bg-transparent",children:e.map(a=>o.jsx(I,{className:y(a),children:a.header},a.key))})}),o.jsxs(S,{children:[n.length===0&&o.jsx(T,{children:o.jsx(H,{colSpan:e.length,className:"p-0 whitespace-normal",children:typeof t=="string"?o.jsx(C,{title:t}):o.jsx("div",{className:"text-muted-foreground min-h-24 text-center",children:t})})}),n.map(a=>{const i=s(a),R=!!r&&m===i,E=u?.(a),k=E!=null&&c===E;return o.jsx(T,{ref:p=>{p?b.current.set(i,p):b.current.delete(i)},"data-state":R?"highlighted":void 0,"data-hovered":k||void 0,className:h(l&&"cursor-pointer",v?.(a),R&&"bg-accent shadow-[inset_2px_0_0_0_var(--primary)]",k&&!R&&"bg-accent/50"),onClick:l?p=>{L(p.target)||l(a)}:void 0,onMouseEnter:E?()=>f(E):void 0,onMouseLeave:E?()=>f(null):void 0,children:e.map(p=>o.jsx(H,{className:h("py-1.5 text-xs",p.align==="right"&&"font-mono tabular-nums",y(p)),children:p.cell(a)},p.key))},i)})]})]})})}export{V as D,K as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as P,j as n,c as O,o as le,u as V,d as X,ah as ge,$ as ve,H as xe}from"./inertia-DfNRARuA.js";import{d as Pe,e as ie,u as be,f as je,n as we,j as ce,P as _e,g as q,A as Ce,h as de,i as Se,N as De,U as Re,Q as Ne,V as Oe,D as ye,k as Te,Z as Ie,ae as ke,af as $e,ag as Ee,a4 as Ae,ah as Me,ai as Fe,aj as Le,C as ze,ak as He,b as J,al as We,am as Ue,an as Ve,ao as Ge,ap as Be,aq as Ke,ar as ne,a8 as re,t as Ye}from"./app-layout-by7G3sa1.js";import{u as Ze}from"./use-live-CLZZj245.js";import{a as Q}from"./format-B9SDkrWj.js";import{a as ae,S as qe}from"./segmented-DB4zh-Am.js";var Qe=Object.defineProperty,I=(t,e)=>Qe(t,"name",{value:e,configurable:!0}),ee="Popover",[ue,It]=Pe(ee,[ie]),te=ie(),[Je,W]=ue(ee),Xe=I(t=>{const{__scopePopover:e,children:o,open:s,defaultOpen:l,onOpenChange:c,modal:i=!1}=t,r=te(e),a=P.useRef(null),[u,d]=P.useState(!1),[f,p]=be({prop:s,defaultProp:l??!1,onChange:c,caller:ee});return n.jsx(je,{...r,children:n.jsx(Je,{scope:e,contentId:we(),triggerRef:a,open:f,onOpenChange:p,onOpenToggle:P.useCallback(()=>p(m=>!m),[p]),hasCustomAnchor:u,onCustomAnchorAdd:P.useCallback(()=>d(!0),[]),onCustomAnchorRemove:P.useCallback(()=>d(!1),[]),modal:i,children:o})})},"Popover"),et="PopoverTrigger",tt=P.forwardRef(I(function(e,o){const{__scopePopover:s,...l}=e,c=W(et,s),i=te(s),r=ce(o,c.triggerRef),a=n.jsx(_e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":oe(c.open),...l,ref:r,onClick:q(e.onClick,c.onOpenToggle)});return c.hasCustomAnchor?a:n.jsx(Ce,{asChild:!0,...i,children:a})},"PopoverTrigger")),pe="PopoverPortal",[ot,st]=ue(pe,{forceMount:void 0}),nt=I(t=>{const{__scopePopover:e,forceMount:o,children:s,container:l}=t,c=W(pe,e);return n.jsx(ot,{scope:e,forceMount:o,children:n.jsx(de,{present:o||c.open,children:n.jsx(Se,{asChild:!0,container:l,children:s})})})},"PopoverPortal"),U="PopoverContent",rt=P.forwardRef(I(function(e,o){const s=st(U,e.__scopePopover),{forceMount:l=s.forceMount,...c}=e,i=W(U,e.__scopePopover);return n.jsx(de,{present:l||i.open,children:i.modal?n.jsx(lt,{...c,ref:o}):n.jsx(it,{...c,ref:o})})},"PopoverContent")),at=Ie("PopoverContent.RemoveScroll"),lt=P.forwardRef(I(function(e,o){const s=W(U,e.__scopePopover),l=P.useRef(null),c=ce(o,l),i=P.useRef(!1);return P.useEffect(()=>{const r=l.current;if(r)return De(r)},[]),n.jsx(Re,{as:at,allowPinchZoom:!0,children:n.jsx(fe,{...e,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,r=>{r.preventDefault(),i.current||s.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,r=>{const a=r.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,d=a.button===2||u;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:q(e.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),it=P.forwardRef(I(function(e,o){const s=W(U,e.__scopePopover),l=P.useRef(!1),c=P.useRef(!1);return n.jsx(fe,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(l.current||s.triggerRef.current?.focus(),i.preventDefault()),l.current=!1,c.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(l.current=!0,i.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const r=i.target;s.triggerRef.current?.contains(r)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&c.current&&i.preventDefault()}})},"PopoverContentNonModal")),fe=P.forwardRef(I(function(e,o){const{__scopePopover:s,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:i,disableOutsidePointerEvents:r,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,m=W(U,s),h=te(s);return Ne(),n.jsx(Oe,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:c,onUnmountAutoFocus:i,children:n.jsx(ye,{asChild:!0,disableOutsidePointerEvents:r,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:n.jsx(Te,{"data-state":oe(m.open),role:"dialog",id:m.contentId,...h,...p,ref:o,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function oe(t){return t?"open":"closed"}I(oe,"getState");var ct=Xe,dt=tt,ut=nt,pt=rt;function ft(t){const e=O.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=n.jsx(ct,{"data-slot":"popover",...o}),e[2]=o,e[3]=s):s=e[3],s}function mt(t){const e=O.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=n.jsx(dt,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=s):s=e[3],s}function ht(t){const e=O.c(12);let o,s,l,c;e[0]!==t?({className:o,align:l,sideOffset:c,...s}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=l,e[4]=c):(o=e[1],s=e[2],l=e[3],c=e[4]);const i=l===void 0?"center":l,r=c===void 0?4:c;let a;e[5]!==o?(a=le("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=a):a=e[6];let u;return e[7]!==i||e[8]!==s||e[9]!==r||e[10]!==a?(u=n.jsx(ut,{children:n.jsx(pt,{"data-slot":"popover-content",align:i,sideOffset:r,className:a,...s})}),e[7]=i,e[8]=s,e[9]=r,e[10]=a,e[11]=u):u=e[11],u}function gt(t){const e=O.c(46),{environmentId:o}=t;ke();const{environment:s,telemetry_freshness:l}=V().props,{connected:c,lastEventAt:i,lastRefreshedAt:r,paused:a,setPaused:u}=Ze(o);let d;e[0]!==s?.last_seen_at||e[1]!==l?.received_at||e[2]!==i?(d=i!=null?new Date(i).toISOString():l?.received_at??s?.last_seen_at??null,e[0]=s?.last_seen_at,e[1]=l?.received_at,e[2]=i,e[3]=d):d=e[3];const f=d;let p,m,h,g,v;if(e[4]!==c||e[5]!==f||e[6]!==r||e[7]!==a||e[8]!==u){const k=r!=null?new Date(r).toISOString():null;m=Ee;const $=a?"Resume live updates":"Pause live updates";let j;e[14]!==a||e[15]!==u?(j=()=>u(!a),e[14]=a,e[15]=u,e[16]=j):j=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=le($e({variant:"outline"}),"hover:bg-accent h-7 cursor-pointer gap-1.5 rounded-md font-mono text-[11px] tracking-wide uppercase"),e[17]=C):C=e[17];const N=c?f:null;let w;e[18]!==N?(w=n.jsx(Ae,{lastSeenAt:N,thresholdMs:1e4}),e[18]=N,e[19]=w):w=e[19];const T=a?"Paused":c?"Live":"Disconnected";e[20]!==a||e[21]!==T||e[22]!==$||e[23]!==j||e[24]!==w?(v=n.jsx(Me,{asChild:!0,children:n.jsxs("button",{type:"button","aria-pressed":a,"aria-label":$,onClick:j,className:C,children:[w,T]})}),e[20]=a,e[21]=T,e[22]=$,e[23]=j,e[24]=w,e[25]=v):v=e[25],p=Fe;let S;e[26]!==f?(S=f?`Telemetry received ${Q(f)}`:"No telemetry received yet",e[26]=f,e[27]=S):S=e[27],e[28]!==S?(g=n.jsx("p",{children:S}),e[28]=S,e[29]=g):g=e[29],h=k?`Page refreshed ${Q(k)}`:"No live refresh yet",e[4]=c,e[5]=f,e[6]=r,e[7]=a,e[8]=u,e[9]=p,e[10]=m,e[11]=h,e[12]=g,e[13]=v}else p=e[9],m=e[10],h=e[11],g=e[12],v=e[13];let _;e[30]!==h?(_=n.jsx("p",{children:h}),e[30]=h,e[31]=_):_=e[31];let D;e[32]!==l?(D=l?.processing_lag_seconds!=null&&n.jsxs("p",{children:["Ingest processing pending:"," ",Math.round(l.processing_lag_seconds),"s"]}),e[32]=l,e[33]=D):D=e[33];let b;e[34]!==l?(b=l?.aggregated_at&&n.jsxs("p",{children:["Charts updated ",Q(l.aggregated_at)]}),e[34]=l,e[35]=b):b=e[35];let R;e[36]!==p||e[37]!==g||e[38]!==_||e[39]!==D||e[40]!==b?(R=n.jsxs(p,{children:[g,_,D,b]}),e[36]=p,e[37]=g,e[38]=_,e[39]=D,e[40]=b,e[41]=R):R=e[41];let y;return e[42]!==m||e[43]!==v||e[44]!==R?(y=n.jsxs(m,{children:[v,R]}),e[42]=m,e[43]=v,e[44]=R,e[45]=y):y=e[45],y}const se={"1m":"1 minute","5m":"5 minutes","15m":"15 minutes","1h":"1 hour","6h":"6 hours","1d":"1 day"};function vt(){const t=O.c(6),{step:e,steps:o}=V().props,s=e===void 0?"1h":e;let l;t[0]!==o?(l=o===void 0?[]:o,t[0]=o,t[1]=l):l=t[1];const c=l,i=xt,r=se[s]??s;let a;return t[2]!==s||t[3]!==c||t[4]!==r?(a={step:s,steps:c,set:i,label:r},t[2]=s,t[3]=c,t[4]=r,t[5]=a):a=t[5],a}function xt(t){const e=new URL(globalThis.location.href);e.searchParams.set("step",t),X.visit(e.toString(),{preserveScroll:!0,preserveState:!0})}function Pt(){const t=O.c(18),{step:e,steps:o,set:s}=vt();if(o.length<2)return null;const l=`Chart buckets: ${se[e]}`;let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("span",{className:"text-muted-foreground normal-case",children:"per"}),t[0]=c):c=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ze,{className:"text-muted-foreground size-3"}),t[1]=i):i=t[1];let r;t[2]!==e||t[3]!==l?(r=n.jsx(He,{asChild:!0,children:n.jsxs(J,{variant:"outline",size:"sm",className:"h-8 gap-1 px-2 font-mono text-xs uppercase","aria-label":l,children:[c,e,i]})}),t[2]=e,t[3]=l,t[4]=r):r=t[4];let a,u;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(We,{className:"label-caps",children:"Chart buckets"}),u=n.jsx(Ue,{}),t[5]=a,t[6]=u):(a=t[5],u=t[6]);let d;t[7]!==s?(d=h=>s(h),t[7]=s,t[8]=d):d=t[8];let f;t[9]!==o?(f=o.map(bt),t[9]=o,t[10]=f):f=t[10];let p;t[11]!==e||t[12]!==d||t[13]!==f?(p=n.jsxs(Ve,{align:"end",className:"w-44",children:[a,u,n.jsx(Ge,{value:e,onValueChange:d,children:f})]}),t[11]=e,t[12]=d,t[13]=f,t[14]=p):p=t[14];let m;return t[15]!==r||t[16]!==p?(m=n.jsxs(Be,{children:[r,p]}),t[15]=r,t[16]=p,t[17]=m):m=t[17],m}function bt(t){return n.jsxs(Le,{value:t,className:"text-xs",children:[n.jsx("span",{className:"font-mono uppercase",children:t}),n.jsx("span",{className:"text-muted-foreground ml-auto",children:se[t]})]},t)}const me=[{value:"1h",label:"1 hour"},{value:"6h",label:"6 hours"},{value:"24h",label:"24 hours"},{value:"7d",label:"7 days"},{value:"30d",label:"30 days"}];function jt(t,e){const o={month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};return`${new Date(t).toLocaleString(void 0,o)} – ${new Date(e).toLocaleString(void 0,o)}`}function wt(){const t=O.c(8),{window:e,range:o}=V().props,s=e===void 0?"24h":e,l=Ct,c=_t;let i;t[0]!==s||t[1]!==o?(i=s==="custom"&&o?jt(o.from,o.to):me.find(f=>f.value===s)?.label??s,t[0]=s,t[1]=o,t[2]=i):i=t[2];const r=i,a=o?.from,u=o?.to;let d;return t[3]!==s||t[4]!==r||t[5]!==a||t[6]!==u?(d={window:s,from:a,to:u,set:l,setRange:c,label:r},t[3]=s,t[4]=r,t[5]=a,t[6]=u,t[7]=d):d=t[7],d}function _t(t,e){const o=new URL(globalThis.location.href);o.searchParams.set("from",t),o.searchParams.set("to",e),o.searchParams.delete("window"),o.searchParams.delete("step"),X.visit(o.toString(),{preserveScroll:!0,preserveState:!0})}function Ct(t){const e=new URL(globalThis.location.href);e.searchParams.set("window",t),e.searchParams.delete("from"),e.searchParams.delete("to"),e.searchParams.delete("step"),X.visit(e.toString(),{preserveScroll:!0,preserveState:!0})}function Y(t){const e=new Date(t),o=s=>String(s).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}T${o(e.getHours())}:${o(e.getMinutes())}`}function Z(t){const e=new Date(t);return e.setHours(0,0,0,0),e}const St=[{label:"Today",range:()=>[Z(new Date),new Date]},{label:"Yesterday",range:()=>{const t=Z(new Date);return[Z(new Date(t.getTime()-1440*60*1e3)),t]}},{label:"This week",range:()=>{const t=Z(new Date);return t.setDate(t.getDate()-t.getDay()),[t,new Date]}}];function Dt(){const t=O.c(48),{window:e,from:o,to:s,set:l,setRange:c,label:i}=wt(),[r,a]=P.useState(!1);let u;t[0]!==o?(u=()=>Y(o??new Date(Date.now()-864e5).toISOString()),t[0]=o,t[1]=u):u=t[1];const[d,f]=P.useState(u);let p;t[2]!==s?(p=()=>Y(s??new Date().toISOString()),t[2]=s,t[3]=p):p=t[3];const[m,h]=P.useState(p);let g;t[4]!==c?(g=(x,E)=>{f(Y(x.toISOString())),h(Y(E.toISOString())),c(x.toISOString(),E.toISOString()),a(!1)},t[4]=c,t[5]=g):g=t[5];const v=g;let _;t[6]!==v||t[7]!==d||t[8]!==m?(_=()=>{const x=new Date(d),E=new Date(m);!Number.isNaN(x.getTime())&&!Number.isNaN(E.getTime())&&v(x,E)},t[6]=v,t[7]=d,t[8]=m,t[9]=_):_=t[9];const D=_;let b;t[10]!==l||t[11]!==e?(b=me.map(x=>n.jsx(ae,{active:e===x.value,onClick:()=>l(x.value),"aria-label":x.label,children:x.value},x.value)),t[10]=l,t[11]=e,t[12]=b):b=t[12];const R=e==="custom";let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=()=>a(!0),t[13]=y):y=t[13];let k;t[14]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ke,{className:"size-3"}),t[14]=k):k=t[14];const $=e==="custom"?i:"Custom";let j;t[15]!==$?(j=n.jsx("span",{className:"hidden sm:inline",children:$}),t[15]=$,t[16]=j):j=t[16];let C;t[17]!==R||t[18]!==j?(C=n.jsx(mt,{asChild:!0,children:n.jsxs(ae,{active:R,onClick:y,"aria-label":"Custom range",className:"px-2",children:[k,j]})}),t[17]=R,t[18]=j,t[19]=C):C=t[19];let N;t[20]!==v?(N=St.map(x=>n.jsx(J,{type:"button",variant:"outline",size:"sm",onClick:()=>{const[E,he]=x.range();v(E,he)},children:x.label},x.label)),t[20]=v,t[21]=N):N=t[21];let w;t[22]!==N?(w=n.jsx("div",{className:"flex flex-wrap gap-1",children:N}),t[22]=N,t[23]=w):w=t[23];let T;t[24]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(ne,{htmlFor:"window-picker-from",className:"text-xs",children:"From"}),t[24]=T):T=t[24];let S;t[25]===Symbol.for("react.memo_cache_sentinel")?(S=x=>f(x.target.value),t[25]=S):S=t[25];let A;t[26]!==d?(A=n.jsx(re,{id:"window-picker-from",type:"datetime-local",value:d,onChange:S}),t[26]=d,t[27]=A):A=t[27];let G;t[28]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(ne,{htmlFor:"window-picker-to",className:"text-xs",children:"To"}),t[28]=G):G=t[28];let B;t[29]===Symbol.for("react.memo_cache_sentinel")?(B=x=>h(x.target.value),t[29]=B):B=t[29];let M;t[30]!==m?(M=n.jsx(re,{id:"window-picker-to",type:"datetime-local",value:m,onChange:B}),t[30]=m,t[31]=M):M=t[31];let F;t[32]!==A||t[33]!==M?(F=n.jsxs("div",{className:"flex flex-col gap-2",children:[T,A,G,M]}),t[32]=A,t[33]=M,t[34]=F):F=t[34];let L;t[35]!==D?(L=n.jsx(J,{type:"button",size:"sm",onClick:D,children:"Apply"}),t[35]=D,t[36]=L):L=t[36];let z;t[37]!==w||t[38]!==F||t[39]!==L?(z=n.jsx(ht,{className:"w-72",align:"end",children:n.jsxs("div",{className:"flex flex-col gap-3",children:[w,F,L]})}),t[37]=w,t[38]=F,t[39]=L,t[40]=z):z=t[40];let H;t[41]!==r||t[42]!==C||t[43]!==z?(H=n.jsxs(ft,{open:r,onOpenChange:a,children:[C,z]}),t[41]=r,t[42]=C,t[43]=z,t[44]=H):H=t[44];let K;return t[45]!==H||t[46]!==b?(K=n.jsxs(qe,{children:[b,H]}),t[45]=H,t[46]=b,t[47]=K):K=t[47],K}function kt(t){const e=O.c(21),{title:o,description:s,actions:l,withWindow:c}=t,i=c===void 0?!0:c,{environment:r}=V().props;let a;e[0]!==o?(a=n.jsx("h1",{className:"truncate text-xl font-semibold tracking-tight md:text-2xl",children:o}),e[0]=o,e[1]=a):a=e[1];let u;e[2]!==s?(u=s&&n.jsx("p",{className:"text-muted-foreground mt-0.5 text-sm",children:s}),e[2]=s,e[3]=u):u=e[3];let d;e[4]!==a||e[5]!==u?(d=n.jsxs("div",{className:"min-w-0",children:[a,u]}),e[4]=a,e[5]=u,e[6]=d):d=e[6];let f;e[7]!==r?(f=r&&n.jsx(gt,{environmentId:r.id}),e[7]=r,e[8]=f):f=e[8];let p;e[9]!==i?(p=i&&n.jsx(Pt,{}),e[9]=i,e[10]=p):p=e[10];let m;e[11]!==i?(m=i&&n.jsx(Dt,{}),e[11]=i,e[12]=m):m=e[12];let h;e[13]!==l||e[14]!==f||e[15]!==p||e[16]!==m?(h=n.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:shrink-0 md:justify-end",children:[f,l,p,m]}),e[13]=l,e[14]=f,e[15]=p,e[16]=m,e[17]=h):h=e[17];let g;return e[18]!==d||e[19]!==h?(g=n.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between md:gap-4",children:[d,h]}),e[18]=d,e[19]=h,e[20]=g):g=e[20],g}function $t(t){const e=O.c(18),{title:o,children:s,crumbs:l}=t;let c;e[0]!==l?(c=l===void 0?[]:l,e[0]=l,e[1]=c):c=e[1];const i=c,{environment:r}=V().props;let a;e[2]!==r?(a=r?[{title:r.application_name,href:ge(r.application_id)},{title:r.name,href:ve(r.application_id,r.id)}]:[],e[2]=r,e[3]=a):a=e[3];const u=a;let d;e[4]!==i||e[5]!==o?(d=i.length?i:[{title:o,href:"#"}],e[4]=i,e[5]=o,e[6]=d):d=e[6];let f;e[7]!==u||e[8]!==d?(f=[...u,...d],e[7]=u,e[8]=d,e[9]=f):f=e[9];const p=f,m=r?`${o} · ${r.application_name} ${r.name}`:o;let h;e[10]!==m?(h=n.jsx(xe,{title:m}),e[10]=m,e[11]=h):h=e[11];let g;e[12]!==s?(g=n.jsx("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:p-6",children:s}),e[12]=s,e[13]=g):g=e[13];let v;return e[14]!==p||e[15]!==h||e[16]!==g?(v=n.jsxs(Ye,{breadcrumbs:p,children:[h,g]}),e[14]=p,e[15]=h,e[16]=g,e[17]=v):v=e[17],v}export{$t as E,kt as P,ft as a,mt as b,ht as c,wt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ak as e,h as n,al as h,t as u,f as m}from"./inertia-DfNRARuA.js";function c({applicationId:t,environmentId:r,source:s,executionId:a}){if(!a||s==="browser")return null;switch(s){case"request":return m(t,r,a);case"job":case"job_attempt":return u(t,r,a);case"scheduled_task":return h(t,r,a);case"command":return n(t,r,a);default:return e(t,r,a)}}export{c as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as U,c as Y,r as H,j as s,X as Z}from"./inertia-DfNRARuA.js";import{B as ee,v as K,w as V,r as te,b as se,ad as ne,J as le,H as oe}from"./app-layout-by7G3sa1.js";import{a as ae,b as ie,c as re}from"./env-layout-CdMWbUkm.js";const ce=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],me=U("funnel",ce),de=/^([a-z_]+):(\S+)$/;function xe(m){const e=[],l={};for(const a of m.trim().split(/\s+/)){if(!a)continue;const o=de.exec(a);o?l[o[1]]=o[2]:e.push(a)}return{text:e.join(" "),fields:l}}function G(m){const e=Object.entries(m.fields).map(([l,a])=>`${l}:${a}`);return m.text&&e.push(m.text),e.join(" ")}function he(m){const e=Y.c(57),{value:l,fields:a,onChange:o,placeholder:I}=m,$=I===void 0?"Filter...":I,[i,z]=H.useState(l),[R,D]=H.useState(!1),[J,M]=H.useState(l);l!==J&&(M(l),z(l));let x,f,p,u,h,r,j,b,y,g,v,c,_;if(e[0]!==i||e[1]!==a||e[2]!==o||e[3]!==R||e[4]!==$||e[5]!==l){const F=xe(l),W=t=>{const n={...F.fields};delete n[t];const d=G({text:F.text,fields:n});z(d),o(d)},X=(t,n)=>{const d=G({text:F.text,fields:{...F.fields,[t]:n}});z(d),o(d),D(!1)};let B;e[19]===Symbol.for("react.memo_cache_sentinel")?(B=t=>{z(n=>`${n}${n&&!n.endsWith(" ")?" ":""}${t}:`),D(!1)},e[19]=B):B=e[19];const Q=B;let O;e[20]!==i||e[21]!==o?(O=()=>o(i),e[20]=i,e[21]=o,e[22]=O):O=e[22];const w=O;_="flex flex-wrap items-center gap-2";let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(te,{className:"text-muted-foreground size-3.5 shrink-0"}),e[23]=A):A=e[23];let q;e[24]===Symbol.for("react.memo_cache_sentinel")?(q=t=>z(t.target.value),e[24]=q):q=e[24];let T;e[25]!==w?(T=t=>t.key==="Enter"&&w(),e[25]=w,e[26]=T):T=e[26];let L;e[27]!==w||e[28]!==i||e[29]!==$||e[30]!==T?(L=s.jsx("input",{"data-filter-bar-input":!0,value:i,onChange:q,onKeyDown:T,onBlur:w,placeholder:$,className:"placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent font-mono text-xs outline-none"}),e[27]=w,e[28]=i,e[29]=$,e[30]=T,e[31]=L):L=e[31];let P;e[32]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("kbd",{className:"bg-muted text-muted-foreground hidden rounded px-1 font-mono text-[10px] md:inline",children:"/"}),e[32]=P):P=e[32],h=s.jsxs("div",{className:"bg-card focus-within:border-ring flex h-8 min-w-0 flex-1 items-center gap-1.5 rounded-md border px-2 md:max-w-md md:flex-none md:basis-80",children:[A,Object.entries(F.fields).map(t=>{const[n,d]=t;return s.jsxs(ee,{variant:"secondary",className:"shrink-0 gap-1 rounded-sm px-1.5 font-mono text-[10px]",children:[n,":",d,s.jsx("button",{type:"button",onClick:()=>W(n),className:"hover:text-destructive","aria-label":`Remove ${n} filter`,children:s.jsx(Z,{className:"size-3"})})]},n)}),L,P]}),u=ae,g=R,v=D,e[33]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ie,{asChild:!0,children:s.jsx(se,{type:"button",variant:"outline",size:"sm",className:"h-8 px-2","aria-label":"Add filter",children:s.jsx(me,{className:"size-3.5"})})}),e[33]=c):c=e[33],p=re,b="w-56 p-0",y="start",f=ne,x=le,e[34]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(oe,{children:"No fields."}),e[34]=r):r=e[34],j=a.map(t=>t.options?s.jsx(K,{heading:t.label,children:t.options.map(n=>s.jsx(V,{onSelect:()=>X(t.key,n),children:n},n))},t.key):s.jsx(K,{heading:t.label,children:s.jsxs(V,{onSelect:()=>Q(t.key),children:[t.key,":…"]})},t.key)),e[0]=i,e[1]=a,e[2]=o,e[3]=R,e[4]=$,e[5]=l,e[6]=x,e[7]=f,e[8]=p,e[9]=u,e[10]=h,e[11]=r,e[12]=j,e[13]=b,e[14]=y,e[15]=g,e[16]=v,e[17]=c,e[18]=_}else x=e[6],f=e[7],p=e[8],u=e[9],h=e[10],r=e[11],j=e[12],b=e[13],y=e[14],g=e[15],v=e[16],c=e[17],_=e[18];let k;e[35]!==x||e[36]!==r||e[37]!==j?(k=s.jsxs(x,{children:[r,j]}),e[35]=x,e[36]=r,e[37]=j,e[38]=k):k=e[38];let N;e[39]!==f||e[40]!==k?(N=s.jsx(f,{children:k}),e[39]=f,e[40]=k,e[41]=N):N=e[41];let S;e[42]!==p||e[43]!==N||e[44]!==b||e[45]!==y?(S=s.jsx(p,{className:b,align:y,children:N}),e[42]=p,e[43]=N,e[44]=b,e[45]=y,e[46]=S):S=e[46];let C;e[47]!==u||e[48]!==S||e[49]!==g||e[50]!==v||e[51]!==c?(C=s.jsxs(u,{open:g,onOpenChange:v,children:[c,S]}),e[47]=u,e[48]=S,e[49]=g,e[50]=v,e[51]=c,e[52]=C):C=e[52];let E;return e[53]!==h||e[54]!==C||e[55]!==_?(E=s.jsxs("div",{className:_,children:[h,C]}),e[53]=h,e[54]=C,e[55]=_,e[56]=E):E=e[56],E}export{he as F,xe as p,G as s};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as j,j as o,o as C,c as E}from"./inertia-DfNRARuA.js";import{D as I}from"./data-table-CQ_YRWQs.js";import{S as V,a as z}from"./segmented-DB4zh-Am.js";import{a8 as W}from"./app-layout-by7G3sa1.js";import{c as M,p as T}from"./format-B9SDkrWj.js";function L(s){let e=0;const t=a=>({id:e++,name:a,value:0,self:0,children:[]}),n=t("all"),m=new Map;for(const a of s.split(`
|
|
2
|
-
`)){const f=a.trim(),x=f.lastIndexOf(" ");if(x<=0)continue;const i=Number(f.slice(x+1));if(!Number.isFinite(i)||i<=0)continue;const r=f.slice(0,x).split(";").filter(u=>u.length>0);if(r.length===0)continue;n.value+=i;let c=n,h="";for(const u of r){h+=";"+u;let d=m.get(h);d||(d=t(u),c.children.push(d),m.set(h,d)),d.value+=i,c=d}c.self+=i}return n}function A(s,e){const t=[],n=s.value>0?e/s.value:0,m=(a,f,x,i)=>{t.push({id:a.id,node:a,x:f,width:a.value*n,depth:x,parentValue:i});let r=f;for(const c of a.children)m(c,r,x+1,a.value),r+=c.value*n};return m(s,0,0,s.value),t}function F(s){const e=new Map,t=(n,m)=>{if(!m){const a=e.get(n.name)??{name:n.name,self:0,total:0};a.self+=n.self,a.total+=n.value,e.set(n.name,a)}for(const a of n.children)t(a,!1)};return t(s,!0),e}function B(s,e){return[...F(s).values()].sort((t,n)=>n.self-t.self||n.total-t.total).slice(0,e)}function D(s,e){return[...F(s).values()].sort((t,n)=>n.total-t.total||n.self-t.self).slice(0,e)}function H(s,e){const t=new Set,n=e.trim().toLowerCase();if(n==="")return t;const m=a=>{a.name.toLowerCase().includes(n)&&t.add(a.id);for(const f of a.children)m(f)};return m(s),t}const y=18,R=15;function X(s){const e=s.lastIndexOf(" ("),t=e>=0?s.slice(e+2):"";return/^(app|lib|config|db|engines)\//.test(t)}function q(s){let e=0;for(let t=0;t<s.length;t++)e=e*31+s.charCodeAt(t)|0;return Math.abs(e)}function K(s){const e=q(s);return X(s)?`hsl(${[24,34,14,44,4][e%5]} 78% ${52+e%3*6}%)`:`hsl(${[215,220,210][e%3]} 14% ${58+e%3*7}%)`}function Q(s,e){const t=Math.floor((e-8)/5.6);return t<4?"":s.length<=t?s:s.slice(0,t-1)+"…"}function Y(s){const e=E.c(30),{rect:t,total:n,x:m,y:a}=s,f=Math.max(0,m-8),x=a+14;let i;e[0]!==f||e[1]!==x?(i={left:f,top:x},e[0]=f,e[1]=x,e[2]=i):i=e[2];let r;e[3]!==t.node.name?(r=o.jsx("div",{className:"font-mono text-[11px] break-all",children:t.node.name}),e[3]=t.node.name,e[4]=r):r=e[4];let c;e[5]!==t.node.value?(c=M(t.node.value),e[5]=t.node.value,e[6]=c):c=e[6];let h;e[7]!==c?(h=o.jsxs("span",{children:[c," samples"]}),e[7]=c,e[8]=h):h=e[8];let u;e[9]!==t.node.value||e[10]!==n?(u=T(t.node.value,n),e[9]=t.node.value,e[10]=n,e[11]=u):u=e[11];let d;e[12]!==u?(d=o.jsxs("span",{children:[u," of total"]}),e[12]=u,e[13]=d):d=e[13];let p;e[14]!==t.node.value||e[15]!==t.parentValue?(p=T(t.node.value,t.parentValue),e[14]=t.node.value,e[15]=t.parentValue,e[16]=p):p=e[16];let w;e[17]!==p?(w=o.jsxs("span",{children:[p," of parent"]}),e[17]=p,e[18]=w):w=e[18];let v;e[19]!==t.node.self?(v=t.node.self>0&&o.jsxs("span",{children:[M(t.node.self)," self"]}),e[19]=t.node.self,e[20]=v):v=e[20];let b;e[21]!==w||e[22]!==v||e[23]!==h||e[24]!==d?(b=o.jsxs("div",{className:"text-muted-foreground mt-1 flex flex-wrap gap-x-3 font-mono text-[10px] tabular-nums",children:[h,d,w,v]}),e[21]=w,e[22]=v,e[23]=h,e[24]=d,e[25]=b):b=e[25];let N;return e[26]!==b||e[27]!==i||e[28]!==r?(N=o.jsxs("div",{className:"bg-popover text-popover-foreground pointer-events-none absolute z-10 max-w-[min(22rem,90vw)] rounded-md border p-2 shadow-md",style:i,children:[r,b]}),e[26]=b,e[27]=i,e[28]=r,e[29]=N):N=e[29],N}function _({collapsed:s,className:e}){const t=j.useMemo(()=>L(s),[s]),[n,m]=j.useState(""),[a,f]=j.useState("self"),[x,i]=j.useState({tree:t,zoom:[],hovered:null}),r=x.tree===t?x:{tree:t,zoom:[],hovered:null},c=r.zoom,h=j.useRef(null),[u,d]=j.useState(0);j.useEffect(()=>{const l=h.current;if(!l)return;d(l.clientWidth);const g=new ResizeObserver(([k])=>d(k.contentRect.width));return g.observe(l),()=>g.disconnect()},[]);const p=c[c.length-1]??t,w=j.useMemo(()=>A(p,u),[p,u]),v=j.useMemo(()=>H(t,n),[t,n]),b=j.useMemo(()=>a==="self"?B(p,R):D(p,R),[p,a]),N=w.reduce((l,g)=>Math.max(l,g.depth),0),$=v.size>0;return t.value===0?o.jsx("p",{className:"text-muted-foreground py-6 text-center text-sm",children:"This profile recorded no samples."}):o.jsxs("div",{className:C("space-y-3",e),children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsx(W,{value:n,onChange:l=>m(l.target.value),placeholder:"Search frames",className:"h-8 max-w-56 font-mono text-xs","aria-label":"Search frames"}),n!==""&&o.jsxs("span",{className:"text-muted-foreground font-mono text-[11px]",children:[v.size," match",v.size===1?"":"es"]}),o.jsx("div",{className:"ml-auto flex flex-wrap items-center gap-1 font-mono text-[11px]",children:[t,...c].map((l,g)=>o.jsxs("span",{className:"flex items-center gap-1",children:[g>0&&o.jsx("span",{className:"text-muted-foreground",children:"/"}),o.jsx("button",{type:"button",onClick:()=>i({...r,zoom:c.slice(0,g)}),disabled:g===c.length,className:C("max-w-40 truncate",g===c.length?"text-foreground font-semibold":"text-muted-foreground hover:underline"),children:l.name})]},l.id))})]}),o.jsxs("div",{ref:h,className:"bg-muted/20 relative overflow-hidden rounded-lg border",onMouseLeave:()=>i({...r,hovered:null}),children:[o.jsx("svg",{width:u,height:(N+1)*y,role:"img","aria-label":`Flamegraph of ${t.value} samples`,children:w.map(l=>{const g=Q(l.node.name,l.width);return o.jsxs("g",{onClick:()=>i({...r,zoom:[...c,...O(p,l.node)]}),onMouseMove:k=>{const S=h.current?.getBoundingClientRect();i({...r,hovered:{rect:l,x:k.clientX-(S?.left??0),y:k.clientY-(S?.top??0)}})},className:"cursor-pointer",children:[o.jsx("rect",{x:l.x,y:l.depth*y,width:Math.max(0,l.width-1),height:y-1,rx:2,fill:K(l.node.name),opacity:$?v.has(l.id)?1:.18:r.hovered?.rect.id===l.id?1:.88,stroke:v.has(l.id)?"currentColor":"none",strokeWidth:1}),g!==""&&o.jsx("text",{x:l.x+4,y:l.depth*y+y/2,dominantBaseline:"central",className:"pointer-events-none fill-black/85 font-mono text-[10px]",children:g})]},l.id)})}),r.hovered&&o.jsx(Y,{rect:r.hovered.rect,total:t.value,x:r.hovered.x,y:r.hovered.y})]}),o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[o.jsx("h3",{className:"label-caps",children:"Hottest frames"}),o.jsxs(V,{children:[o.jsx(z,{active:a==="self",onClick:()=>f("self"),children:"Self"}),o.jsx(z,{active:a==="total",onClick:()=>f("total"),children:"Total"})]})]}),o.jsx(I,{rows:b,rowKey:l=>l.name,empty:"No frames in this view.",columns:[{key:"name",header:"Frame",className:"max-w-0",cell:l=>o.jsx("span",{className:"block truncate font-mono text-xs",title:l.name,children:l.name})},{key:"self",header:"Self",align:"right",cell:l=>o.jsx("span",{className:a==="self"?"font-semibold":"",children:M(l.self)})},{key:"total",header:"Total",align:"right",cell:l=>o.jsx("span",{className:a==="total"?"font-semibold":"",children:M(l.total)})}]})]})}function O(s,e){if(s===e)return[];for(const t of s.children){const n=O(t,e);if(n.length>0||t===e)return[t,...n]}return[]}export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function n(r,t=1){return r==null?"–":r>=1e3?`${(r/1e3).toFixed(2)}s`:r<1&&r>0?`${(r*1e3).toFixed(0)}µs`:`${r.toFixed(t)}ms`}function i(r){return r==null?"–":r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e4?`${(r/1e3).toFixed(1)}k`:r.toLocaleString()}function e(r){return r?r>=1<<30?`${(r/(1<<30)).toFixed(1)} GB`:r>=1<<20?`${(r/(1<<20)).toFixed(1)} MB`:r>=1024?`${(r/1024).toFixed(1)} KB`:`${r} B`:"–"}function o(r){return r==null?"–":r===0?"$0":r<.01?`$${r.toFixed(4)}`:r<1e3?`$${r.toFixed(2)}`:`$${Math.round(r).toLocaleString()}`}function f(r,t){return t?`${(r/t*100).toFixed(1)}%`:"0%"}function d(r){if(!r)return"never";const t=(Date.now()-new Date(r).getTime())/1e3;return t<60?`${Math.max(0,Math.floor(t))}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function u(r){return r?new Date(r).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"–"}function c(r,t){return t==="failed"?"destructive":t==="processed"?"success":r?r>=500?"destructive":r>=400?"warning":r>=300?"muted":"success":"muted"}export{d as a,e as b,i as c,n as m,f as p,c as s,o as u,u as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as S,c as _,u as C,o as N,j as s,r as w}from"./inertia-DfNRARuA.js";import{s as E}from"./source-link-B2183i2-.js";import{B as $}from"./app-layout-by7G3sa1.js";const q=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],Z=S("clipboard-copy",q);const M=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],F=S("external-link",M);function A(m){const e=_.c(26),{location:t,deploy:o,className:l}=m,{auth:r,environment:n}=C().props;let p,c,a;if(e[0]!==r||e[1]!==l||e[2]!==o||e[3]!==n?.default_branch||e[4]!==n?.repository_url||e[5]!==t){c=Symbol.for("react.early_return_sentinel");e:{const g=/^(.*):(\d+)$/.exec(t);if(a=g?E({file:g[1],line:Number(g[2]),repositoryUrl:n?.repository_url,ref:o,defaultBranch:n?.default_branch,editor:r.user.editor,editorRoot:r.user.editor_root}):null,!a){let d;e[9]!==l?(d=N("truncate font-mono text-xs",l),e[9]=l,e[10]=d):d=e[10];let j;e[11]!==t||e[12]!==d?(j=s.jsx("span",{className:d,children:t}),e[11]=t,e[12]=d,e[13]=j):j=e[13],c=j;break e}p=a.startsWith("http")}e[0]=r,e[1]=l,e[2]=o,e[3]=n?.default_branch,e[4]=n?.repository_url,e[5]=t,e[6]=p,e[7]=c,e[8]=a}else p=e[6],c=e[7],a=e[8];if(c!==Symbol.for("react.early_return_sentinel"))return c;const b=p;let i;e[14]!==b?(i=b?{target:"_blank",rel:"noreferrer"}:{},e[14]=b,e[15]=i):i=e[15];let f;e[16]!==l?(f=N("inline-flex min-w-0 items-center gap-1 font-mono text-xs hover:underline",l),e[16]=l,e[17]=f):f=e[17];let h;e[18]!==t?(h=s.jsx("span",{className:"truncate",children:t}),e[18]=t,e[19]=h):h=e[19];let u;e[20]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(F,{className:"size-3 shrink-0 opacity-60"}),e[20]=u):u=e[20];let x;return e[21]!==i||e[22]!==f||e[23]!==h||e[24]!==a?(x=s.jsxs("a",{href:a,...i,className:f,children:[h,u]}),e[21]=i,e[22]=f,e[23]=h,e[24]=a,e[25]=x):x=e[25],x}const H=/-[A-Za-z0-9_-]{8,}\.(?:js|mjs|cjs|css)$/;function O(m){const e=_.c(36),{frame:t,deploy:o,open:l,onToggle:r}=m;let n;e[0]!==t.code?(n=t.code?Object.entries(t.code):[],e[0]=t.code,e[1]=n):n=e[1];const p=n;let c;e[2]!==t.file||e[3]!==t.in_app?(c=t.in_app&&!H.test(t.file),e[2]=t.file,e[3]=t.in_app,e[4]=c):c=e[4];const a=c,b=t.in_app?"bg-background":"bg-muted/40";let i;e[5]!==b?(i=N("border-b last:border-b-0",b),e[5]=b,e[6]=i):i=e[6];let f;e[7]!==o||e[8]!==t.file||e[9]!==t.line||e[10]!==a?(f=a&&s.jsx(A,{location:`${t.file}:${t.line}`,deploy:o}),e[7]=o,e[8]=t.file,e[9]=t.line,e[10]=a,e[11]=f):f=e[11];let h;e[12]!==t.file||e[13]!==t.line||e[14]!==a?(h=!a&&s.jsxs("span",{className:"text-muted-foreground truncate",children:[t.file,":",t.line]}),e[12]=t.file,e[13]=t.line,e[14]=a,e[15]=h):h=e[15];let u;e[16]!==t.function?(u=s.jsxs("span",{className:"text-muted-foreground ml-auto truncate",children:["in ",t.function]}),e[16]=t.function,e[17]=u):u=e[17];let x;e[18]!==t.in_app?(x=t.in_app&&s.jsx($,{variant:"outline",className:"shrink-0 text-[10px]",children:"app"}),e[18]=t.in_app,e[19]=x):x=e[19];let g;e[20]!==r||e[21]!==h||e[22]!==u||e[23]!==x?(g=s.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[h,u,x]}),e[20]=r,e[21]=h,e[22]=u,e[23]=x,e[24]=g):g=e[24];let d;e[25]!==f||e[26]!==g?(d=s.jsxs("div",{className:"hover:bg-muted/60 flex w-full items-center gap-2 px-3 py-1.5 font-mono text-xs",children:[f,g]}),e[25]=f,e[26]=g,e[27]=d):d=e[27];let j;e[28]!==t.line||e[29]!==p||e[30]!==l?(j=l&&p.length>0&&s.jsx("pre",{className:"bg-muted/60 overflow-x-auto px-3 py-2 font-mono text-xs leading-5",children:p.map(v=>{const[k,B]=v;return s.jsxs("div",{className:N("flex gap-3 border-l-2 border-transparent pl-2",Number(k)===t.line&&"border-destructive bg-destructive/10 font-semibold"),children:[s.jsx("span",{className:"text-muted-foreground w-10 shrink-0 text-right select-none",children:k}),s.jsx("span",{className:"whitespace-pre",children:B})]},k)})}),e[28]=t.line,e[29]=p,e[30]=l,e[31]=j):j=e[31];let y;return e[32]!==d||e[33]!==j||e[34]!==i?(y=s.jsxs("div",{className:i,children:[d,j]}),e[32]=d,e[33]=j,e[34]=i,e[35]=y):y=e[35],y}function z(m){const e=_.c(22),{frames:t,deploy:o}=m;let l,r;if(e[0]!==t){const d=t.flatMap(R);l=w.useState,r=new Set(d.length>0?d:[0]),e[0]=t,e[1]=l,e[2]=r}else l=e[1],r=e[2];const[n,p]=l(r),[c,a]=w.useState(!1);let b;e[3]!==t||e[4]!==c?(b=c?t:t.filter(L),e[3]=t,e[4]=c,e[5]=b):b=e[5];const i=b;let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=function(j){p(y=>{const v=new Set(y);return v.has(j)?v.delete(j):v.add(j),v})},e[6]=f):f=e[6];const h=f;let u;if(e[7]!==o||e[8]!==t||e[9]!==n||e[10]!==i){let d;e[12]!==o||e[13]!==t||e[14]!==n?(d=j=>{const y=t.indexOf(j);return s.jsx(O,{frame:j,deploy:o,open:n.has(y),onToggle:()=>h(y)},y)},e[12]=o,e[13]=t,e[14]=n,e[15]=d):d=e[15],u=i.map(d),e[7]=o,e[8]=t,e[9]=n,e[10]=i,e[11]=u}else u=e[11];let x;e[16]!==t.length||e[17]!==i.length?(x=i.length<t.length&&s.jsxs("button",{type:"button",className:"text-muted-foreground w-full px-3 py-1.5 text-left text-xs hover:underline",onClick:()=>a(!0),children:["Show ",t.length-i.length," framework frames"]}),e[16]=t.length,e[17]=i.length,e[18]=x):x=e[18];let g;return e[19]!==u||e[20]!==x?(g=s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[u,x]}),e[19]=u,e[20]=x,e[21]=g):g=e[21],g}function L(m,e){return m.in_app||e<3}function R(m,e){return m.in_app?[e]:[]}function G(m){const e=_.c(34),{exception:t,deploy:o}=m;let l;e[0]!==t.class_name?(l=s.jsx("span",{className:"font-mono text-sm font-semibold",children:t.class_name}),e[0]=t.class_name,e[1]=l):l=e[1];const r=t.handled?"secondary":"destructive",n=t.handled?"handled":"unhandled";let p;e[2]!==r||e[3]!==n?(p=s.jsx($,{variant:r,children:n}),e[2]=r,e[3]=n,e[4]=p):p=e[4];let c;e[5]!==t.severity?(c=t.severity&&s.jsx($,{variant:"outline",children:t.severity}),e[5]=t.severity,e[6]=c):c=e[6];let a;e[7]!==t.source?(a=t.source&&s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.source}),e[7]=t.source,e[8]=a):a=e[8];let b;e[9]!==l||e[10]!==p||e[11]!==c||e[12]!==a?(b=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l,p,c,a]}),e[9]=l,e[10]=p,e[11]=c,e[12]=a,e[13]=b):b=e[13];let i;e[14]!==t.message?(i=s.jsx("p",{className:"mt-1 font-mono text-sm break-words",children:t.message}),e[14]=t.message,e[15]=i):i=e[15];let f;e[16]!==t.cause?(f=t.cause&&s.jsxs("p",{className:"text-muted-foreground mt-1 font-mono text-xs",children:["caused by ",t.cause.class,": ",t.cause.message]}),e[16]=t.cause,e[17]=f):f=e[17];let h;e[18]!==b||e[19]!==i||e[20]!==f?(h=s.jsxs("div",{children:[b,i,f]}),e[18]=b,e[19]=i,e[20]=f,e[21]=h):h=e[21];let u;e[22]!==o||e[23]!==t.frames?(u=s.jsx(z,{frames:t.frames,deploy:o}),e[22]=o,e[23]=t.frames,e[24]=u):u=e[24];let x;e[25]!==t.locals?(x=t.locals&&Object.keys(t.locals).length>0&&s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[s.jsx("div",{className:"label-caps border-b px-3 py-1.5",children:"Local variables at the raise site"}),s.jsx("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1 px-3 py-2 font-mono text-xs",children:Object.entries(t.locals).map(T)})]}),e[25]=t.locals,e[26]=x):x=e[26];let g;e[27]!==t.context?(g=t.context&&t.context!=="{}"&&s.jsx("pre",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs",children:t.context}),e[27]=t.context,e[28]=g):g=e[28];let d;return e[29]!==h||e[30]!==u||e[31]!==x||e[32]!==g?(d=s.jsxs("div",{className:"space-y-3",children:[h,u,x,g]}),e[29]=h,e[30]=u,e[31]=x,e[32]=g,e[33]=d):d=e[33],d}function T(m){const[e,t]=m;return s.jsxs(w.Fragment,{children:[s.jsx("dt",{className:"text-muted-foreground",children:e}),s.jsx("dd",{className:"break-all",children:t})]},e)}const I={query:"bg-sky-500",transaction:"bg-sky-300",cache_event:"bg-violet-500",outgoing_request:"bg-orange-500",mail:"bg-pink-500",broadcast:"bg-teal-500",enqueued_job:"bg-amber-500",view_render:"bg-emerald-500",storage_op:"bg-indigo-500",exception:"bg-red-500",log:"bg-neutral-400"};function J(m){const e=_.c(9),{entries:t}=m;if(t.length===0)return null;let o;e[0]!==t.length?(o=s.jsxs("div",{className:"label-caps border-b px-3 py-1.5",children:["Breadcrumbs · ",t.length," events before the exception"]}),e[0]=t.length,e[1]=o):o=e[1];let l;e[2]!==t?(l=t.map(U),e[2]=t,e[3]=l):l=e[3];let r;e[4]!==l?(r=s.jsx("ol",{className:"divide-y",children:l}),e[4]=l,e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==r?(n=s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[o,r]}),e[6]=o,e[7]=r,e[8]=n):n=e[8],n}function U(m){return s.jsxs("li",{className:"grid grid-cols-[3.5rem_5rem_1fr_4rem] items-center gap-2 px-3 py-1 font-mono text-xs",children:[s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:["+",m.offset.toFixed(1),"ms"]}),s.jsxs("span",{className:"text-muted-foreground flex items-center gap-1.5 truncate",children:[s.jsx("span",{className:N("inline-block size-1.5 shrink-0 rounded-full",I[m.type]??"bg-neutral-500")}),m.type.replace("_"," ")]}),s.jsx("span",{className:"truncate",children:m.label}),s.jsx("span",{className:"text-muted-foreground text-right tabular-nums",children:m.duration!=null?`${m.duration.toFixed(1)}ms`:""})]},`${m.type}-${m.id}`)}const D={console:"bg-red-500",click:"bg-violet-500",navigate:"bg-sky-500"};function K(m){const e=_.c(12),{crumbs:t}=m;if(t.length===0)return null;const o=t[0].at;let l;e[0]!==t.length?(l=s.jsxs("div",{className:"label-caps border-b px-3 py-1.5",children:["Breadcrumbs · ",t.length," events before the error"]}),e[0]=t.length,e[1]=l):l=e[1];let r;if(e[2]!==t||e[3]!==o){let c;e[5]!==o?(c=(a,b)=>s.jsxs("li",{className:"grid grid-cols-[3.5rem_5rem_1fr] items-center gap-2 px-3 py-1 font-mono text-xs",children:[s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:["+",((a.at-o)/1e3).toFixed(1),"s"]}),s.jsxs("span",{className:"text-muted-foreground flex items-center gap-1.5 truncate",children:[s.jsx("span",{className:N("inline-block size-1.5 shrink-0 rounded-full",D[a.kind]??"bg-neutral-500")}),a.kind]}),s.jsx("span",{className:"truncate",children:a.text})]},`${a.at}-${a.kind}-${b}`),e[5]=o,e[6]=c):c=e[6],r=t.map(c),e[2]=t,e[3]=o,e[4]=r}else r=e[4];let n;e[7]!==r?(n=s.jsx("ol",{className:"divide-y",children:r}),e[7]=r,e[8]=n):n=e[8];let p;return e[9]!==l||e[10]!==n?(p=s.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[l,n]}),e[9]=l,e[10]=n,e[11]=p):p=e[11],p}export{J as B,Z as C,G as E,A as S,K as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as le,u as ae,j as r,d as oe,S as ne,K as ce,L as de}from"./inertia-DfNRARuA.js";import{C as me}from"./chart-hover-DdK4E-2h.js";import{V as ue,D as fe}from"./chart-panel-BPaYRXJB.js";import{D as he}from"./data-table-CQ_YRWQs.js";import{S as xe,E as ye,ac as ge}from"./app-layout-by7G3sa1.js";import{F as pe}from"./filter-bar-CrzpQ_vD.js";import{P as ve,E as be}from"./env-layout-CdMWbUkm.js";import{u as ke,P as je}from"./percentile-picker-73z5PAps.js";import{S as M}from"./sort-header-BcG8ulEH.js";import{S as _e}from"./sparkline-cell-B47ipscB.js";import{m as re,c as $,p as qe}from"./format-B9SDkrWj.js";import"./series-chart-BaiDG795.js";import"./chart-Cov79YC5.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./arrow-up-DCZ7emux.js";function Xe(t){const e=le.c(95),{environment:se,window:a}=ae().props,{percentile:o}=ke(),n=se.application_id,c=se.id;let O;e[0]!==n||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==a?(O=s=>oe.visit(ne(n,c,{window:a,sort:t.sort,dir:t.dir,q:t.q||void 0,...s}),{preserveState:!0}),e[0]=n,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=a,e[6]=O):O=e[6];const d=O;let H;e[7]!==t.dir||e[8]!==t.sort||e[9]!==d?(H=s=>d({sort:s,dir:t.sort===s&&t.dir==="desc"?"asc":"desc"}),e[7]=t.dir,e[8]=t.sort,e[9]=d,e[10]=H):H=e[10];const i=H;let N;e[11]!==n||e[12]!==c||e[13]!==a?(N=s=>ce(n,c,s.group_hash,{window:a}),e[11]=n,e[12]=c,e[13]=a,e[14]=N):N=e[14];const l=N;let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(ve,{title:"Requests",description:"Every route your app served, with error rates and percentiles.",actions:r.jsxs(r.Fragment,{children:[r.jsx(xe,{page:"requests"}),r.jsx(je,{})]})}),e[15]=D):D=e[15];let L;e[16]===Symbol.for("react.memo_cache_sentinel")?(L={key:"method",label:"Method",options:["GET","POST","PUT","PATCH","DELETE"]},e[16]=L):L=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=[L,{key:"status",label:"Status",options:["2xx","3xx","4xx","5xx"]},{key:"route",label:"Route"}],e[17]=A):A=e[17];let m;e[18]!==d?(m=s=>d({q:s||void 0}),e[18]=d,e[19]=m):m=e[19];let u;e[20]!==t.q||e[21]!==m?(u=r.jsx(pe,{value:t.q,fields:A,onChange:m,placeholder:"method:GET status:5xx route:/widgets"}),e[20]=t.q,e[21]=m,e[22]=u):u=e[22];let f;e[23]!==t.deploys||e[24]!==t.series?(f=r.jsx(ue,{label:"Requests",data:t.series,deploys:t.deploys}),e[23]=t.deploys,e[24]=t.series,e[25]=f):f=e[25];let h;e[26]!==t.deploys||e[27]!==t.series||e[28]!==o?(h=r.jsx(fe,{label:"Latency",data:t.series,deploys:t.deploys,percentile:o}),e[26]=t.deploys,e[27]=t.series,e[28]=o,e[29]=h):h=e[29];let x;e[30]!==f||e[31]!==h?(x=r.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[f,h]}),e[30]=f,e[31]=h,e[32]=x):x=e[32];let K;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(ye,{icon:ge,title:"No requests in this window",description:"HTTP requests to your app appear here as they're reported."}),e[33]=K):K=e[33];let y;e[34]!==l?(y={onOpen:(s,ie)=>ie?.newTab?globalThis.window.open(l(s),"_blank"):oe.visit(l(s))},e[34]=l,e[35]=y):y=e[35];let g;e[36]!==l?(g={key:"name",header:"Route",grow:!0,cell:s=>r.jsx(de,{className:"font-mono text-xs hover:underline",href:l(s),title:s.name,children:s.name})},e[36]=l,e[37]=g):g=e[37];let F,V,B;e[38]===Symbol.for("react.memo_cache_sentinel")?(F={key:"trend",hideOnMobile:!0,header:"Trend",cell:Me},V={key:"ok",hideOnMobile:!0,header:"2xx",align:"right",cell:Re},B={key:"4xx",hideOnMobile:!0,header:"4xx",align:"right",cell:Ce},e[38]=F,e[39]=V,e[40]=B):(F=e[38],V=e[39],B=e[40]);const z=t.sort==="errors",I=t.dir==="asc"?"asc":"desc";let p;e[41]!==i?(p=()=>i("errors"),e[41]=i,e[42]=p):p=e[42];let v;e[43]!==z||e[44]!==I||e[45]!==p?(v={key:"5xx",header:r.jsx(M,{label:"5xx",active:z,dir:I,onClick:p}),align:"right",cell:Te},e[43]=z,e[44]=I,e[45]=p,e[46]=v):v=e[46];const J=t.sort==="count",Q=t.dir==="asc"?"asc":"desc";let b;e[47]!==i?(b=()=>i("count"),e[47]=i,e[48]=b):b=e[48];let k;e[49]!==J||e[50]!==Q||e[51]!==b?(k={key:"total",header:r.jsx(M,{label:"Total",active:J,dir:Q,onClick:b}),align:"right",cell:we},e[49]=J,e[50]=Q,e[51]=b,e[52]=k):k=e[52];let G;e[53]===Symbol.for("react.memo_cache_sentinel")?(G={key:"err",hideOnMobile:!0,header:"Error %",align:"right",cell:Ee},e[53]=G):G=e[53];const W=t.sort==="avg",X=t.dir==="asc"?"asc":"desc";let j;e[54]!==i?(j=()=>i("avg"),e[54]=i,e[55]=j):j=e[55];let _;e[56]!==W||e[57]!==X||e[58]!==j?(_={key:"avg",hideOnMobile:!0,header:r.jsx(M,{label:"Avg",active:W,dir:X,onClick:j}),align:"right",cell:Pe},e[56]=W,e[57]=X,e[58]=j,e[59]=_):_=e[59];const Y=t.sort===o,Z=t.dir==="asc"?"asc":"desc";let q;e[60]!==o||e[61]!==i?(q=()=>i(o),e[60]=o,e[61]=i,e[62]=q):q=e[62];let S;e[63]!==o||e[64]!==Y||e[65]!==Z||e[66]!==q?(S=r.jsx(M,{label:o,active:Y,dir:Z,onClick:q}),e[63]=o,e[64]=Y,e[65]=Z,e[66]=q,e[67]=S):S=e[67];let P;e[68]!==o?(P=s=>r.jsx("span",{className:"font-semibold",children:re(s[o])}),e[68]=o,e[69]=P):P=e[69];let E;e[70]!==o||e[71]!==S||e[72]!==P?(E={key:o,header:S,align:"right",cell:P},e[70]=o,e[71]=S,e[72]=P,e[73]=E):E=e[73];const ee=t.sort==="max",te=t.dir==="asc"?"asc":"desc";let w;e[74]!==i?(w=()=>i("max"),e[74]=i,e[75]=w):w=e[75];let T;e[76]!==ee||e[77]!==te||e[78]!==w?(T={key:"max",hideOnMobile:!0,header:r.jsx(M,{label:"Max",active:ee,dir:te,onClick:w}),align:"right",cell:Se},e[76]=ee,e[77]=te,e[78]=w,e[79]=T):T=e[79];let C;e[80]!==g||e[81]!==v||e[82]!==k||e[83]!==_||e[84]!==E||e[85]!==T?(C=[g,F,V,B,v,k,G,_,E,T],e[80]=g,e[81]=v,e[82]=k,e[83]=_,e[84]=E,e[85]=T,e[86]=C):C=e[86];let R;e[87]!==t.routes||e[88]!==y||e[89]!==C?(R=r.jsx(he,{rows:t.routes,rowKey:He,empty:K,hoverKey:Oe,keyboardNav:y,columns:C}),e[87]=t.routes,e[88]=y,e[89]=C,e[90]=R):R=e[90];let U;return e[91]!==x||e[92]!==R||e[93]!==u?(U=r.jsx(be,{title:"Requests",children:r.jsxs(me,{children:[D,u,x,R]})}),e[91]=x,e[92]=R,e[93]=u,e[94]=U):U=e[94],U}function Se(t){return re(t.max)}function Pe(t){return re(t.avg)}function Ee(t){return qe(t.errors,t.count)}function we(t){return $(t.count)}function Te(t){return r.jsx("span",{className:t.errors?"text-destructive":"",children:$(t.errors)})}function Ce(t){return $(t.client_errors)}function Re(t){return $(t.count-t.errors-t.client_errors)}function Me(t){return r.jsx(_e,{data:t.sparkline,hoverKey:t.group_hash})}function Oe(t){return t.group_hash}function He(t){return t.group_hash}export{Xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ye,u as Se,j as s,d as ve,a2 as ge,an as je,L as _e}from"./inertia-DfNRARuA.js";import{V as ke,D as we}from"./chart-panel-BPaYRXJB.js";import{D as Pe}from"./data-table-CQ_YRWQs.js";import{E as Ce}from"./app-layout-by7G3sa1.js";import{F as qe}from"./filter-bar-CrzpQ_vD.js";import{P as Ee,E as Ne}from"./env-layout-CdMWbUkm.js";import{u as De,P as Me}from"./percentile-picker-73z5PAps.js";import{S as V}from"./sort-header-BcG8ulEH.js";import{S as Be}from"./sparkline-cell-B47ipscB.js";import{S as Y,a as Fe}from"./stat-DT2hhsqS.js";import{c as Z,m as H}from"./format-B9SDkrWj.js";import{B as Le}from"./braces-CykT5_5u.js";import"./series-chart-BaiDG795.js";import"./chart-hover-DdK4E-2h.js";import"./chart-Cov79YC5.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./arrow-up-DCZ7emux.js";function nt(t){const e=ye.c(115),{environment:be,window:l}=Se().props,{percentile:c}=De(),o=be.application_id,n=be.id,a=t.summary.current;let $;e[0]!==o||e[1]!==n||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==l?($=i=>ve.visit(ge(o,n,{window:l,q:t.q||void 0,sort:i,dir:t.sort===i&&t.dir==="desc"?"asc":"desc"}),{preserveState:!0}),e[0]=o,e[1]=n,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=l,e[6]=$):$=e[6];const r=$;let W;e[7]!==o||e[8]!==n||e[9]!==l?(W=i=>je(o,n,i,{window:l}),e[7]=o,e[8]=n,e[9]=l,e[10]=W):W=e[10];const m=W;let z;e[11]!==m?(z=(i,xe)=>xe?.newTab?globalThis.window.open(m(i),"_blank"):ve.visit(m(i)),e[11]=m,e[12]=z):z=e[12];const ee=z;let A;e[13]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ee,{title:"Spans",description:"Custom spans your app recorded with Railwatch.span, grouped by name.",actions:s.jsx(Me,{})}),e[13]=A):A=e[13];let d;e[14]!==a.count?(d=Z(a.count),e[14]=a.count,e[15]=d):d=e[15];let u;e[16]!==a.count||e[17]!==t.summary.previous.count?(u={current:a.count,previous:t.summary.previous.count,goodDirection:"up"},e[16]=a.count,e[17]=t.summary.previous.count,e[18]=u):u=e[18];let f;e[19]!==d||e[20]!==u?(f=s.jsx(Y,{label:"Spans",value:d,delta:u,deltaCaption:"vs previous period"}),e[19]=d,e[20]=u,e[21]=f):f=e[21];let p;e[22]!==a.errors?(p=Z(a.errors),e[22]=a.errors,e[23]=p):p=e[23];const te=a.errors?"destructive":void 0;let h;e[24]!==p||e[25]!==te?(h=s.jsx(Y,{label:"Failed",value:p,tone:te}),e[24]=p,e[25]=te,e[26]=h):h=e[26];const se=a[c]/1e3;let x;e[27]!==se?(x=H(se,2),e[27]=se,e[28]=x):x=e[28];const re=a.avg/1e3;let G;e[29]!==re?(G=H(re,2),e[29]=re,e[30]=G):G=e[30];const ie=`avg ${G}`;let v;e[31]!==c||e[32]!==x||e[33]!==ie?(v=s.jsx(Y,{label:c,value:x,hint:ie}),e[31]=c,e[32]=x,e[33]=ie,e[34]=v):v=e[34];const ae=a.max/1e3;let b;e[35]!==ae?(b=H(ae,2),e[35]=ae,e[36]=b):b=e[36];let g;e[37]!==b?(g=s.jsx(Y,{label:"Max",value:b}),e[37]=b,e[38]=g):g=e[38];let y;e[39]!==v||e[40]!==g||e[41]!==f||e[42]!==h?(y=s.jsxs(Fe,{children:[f,h,v,g]}),e[39]=v,e[40]=g,e[41]=f,e[42]=h,e[43]=y):y=e[43];let S;e[44]!==t.series?(S=s.jsx(ke,{legend:"outcome",label:"Spans",seriesLabel:"Spans",data:t.series}),e[44]=t.series,e[45]=S):S=e[45];let j;e[46]!==t.series||e[47]!==c?(j=s.jsx(we,{label:"Duration",data:t.series,percentile:c}),e[46]=t.series,e[47]=c,e[48]=j):j=e[48];let _;e[49]!==S||e[50]!==j?(_=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[S,j]}),e[49]=S,e[50]=j,e[51]=_):_=e[51];let I;e[52]===Symbol.for("react.memo_cache_sentinel")?(I={key:"name",label:"Name"},e[52]=I):I=e[52];let J;e[53]===Symbol.for("react.memo_cache_sentinel")?(J=[I,{key:"status",label:"Status",options:["failed"]}],e[53]=J):J=e[53];let k;e[54]!==o||e[55]!==n||e[56]!==t.dir||e[57]!==t.sort||e[58]!==l?(k=i=>ve.visit(ge(o,n,{window:l,q:i||void 0,sort:t.sort,dir:t.dir}),{preserveState:!0}),e[54]=o,e[55]=n,e[56]=t.dir,e[57]=t.sort,e[58]=l,e[59]=k):k=e[59];let w;e[60]!==t.q||e[61]!==k?(w=s.jsx(qe,{value:t.q,fields:J,onChange:k,placeholder:"name:geocode status:failed"}),e[60]=t.q,e[61]=k,e[62]=w):w=e[62];let Q;e[63]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Ce,{icon:Le,title:"No spans in this window",description:"Wrap any code in Railwatch.span('name') { } and it shows up here."}),e[63]=Q):Q=e[63];let P;e[64]!==ee?(P={onOpen:(i,xe)=>ee(i.group_hash,xe)},e[64]=ee,e[65]=P):P=e[65];let C;e[66]!==m?(C={key:"name",header:"Span",grow:!0,cell:i=>s.jsx(_e,{href:m(i.group_hash),className:"truncate font-mono text-xs hover:underline",children:i.name})},e[66]=m,e[67]=C):C=e[67];let U;e[68]===Symbol.for("react.memo_cache_sentinel")?(U={key:"trend",hideOnMobile:!0,header:"Trend",cell:Ve},e[68]=U):U=e[68];const le=t.sort==="count",oe=t.dir==="asc"?"asc":"desc";let q;e[69]!==r?(q=()=>r("count"),e[69]=r,e[70]=q):q=e[70];let E;e[71]!==le||e[72]!==oe||e[73]!==q?(E={key:"n",header:s.jsx(V,{label:"Count",active:le,dir:oe,onClick:q}),align:"right",cell:He},e[71]=le,e[72]=oe,e[73]=q,e[74]=E):E=e[74];const ne=t.sort==="errors",ce=t.dir==="asc"?"asc":"desc";let N;e[75]!==r?(N=()=>r("errors"),e[75]=r,e[76]=N):N=e[76];let D;e[77]!==ne||e[78]!==ce||e[79]!==N?(D={key:"failed",header:s.jsx(V,{label:"Failed",active:ne,dir:ce,onClick:N}),align:"right",cell:Ke},e[77]=ne,e[78]=ce,e[79]=N,e[80]=D):D=e[80];const me=t.sort==="p50",de=t.dir==="asc"?"asc":"desc";let M;e[81]!==r?(M=()=>r("p50"),e[81]=r,e[82]=M):M=e[82];let B;e[83]!==me||e[84]!==de||e[85]!==M?(B={key:"p50",hideOnMobile:!0,header:s.jsx(V,{label:"p50",active:me,dir:de,onClick:M}),align:"right",cell:Te},e[83]=me,e[84]=de,e[85]=M,e[86]=B):B=e[86];const ue=t.sort==="p95",fe=t.dir==="asc"?"asc":"desc";let F;e[87]!==r?(F=()=>r("p95"),e[87]=r,e[88]=F):F=e[88];let L;e[89]!==ue||e[90]!==fe||e[91]!==F?(L={key:"p95",header:s.jsx(V,{label:"p95",active:ue,dir:fe,onClick:F}),align:"right",cell:Re},e[89]=ue,e[90]=fe,e[91]=F,e[92]=L):L=e[92];const pe=t.sort==="max",he=t.dir==="asc"?"asc":"desc";let O;e[93]!==r?(O=()=>r("max"),e[93]=r,e[94]=O):O=e[94];let R;e[95]!==pe||e[96]!==he||e[97]!==O?(R={key:"max",hideOnMobile:!0,header:s.jsx(V,{label:"Max",active:pe,dir:he,onClick:O}),align:"right",cell:Oe},e[95]=pe,e[96]=he,e[97]=O,e[98]=R):R=e[98];let T;e[99]!==C||e[100]!==E||e[101]!==D||e[102]!==B||e[103]!==L||e[104]!==R?(T=[C,U,E,D,B,L,R],e[99]=C,e[100]=E,e[101]=D,e[102]=B,e[103]=L,e[104]=R,e[105]=T):T=e[105];let K;e[106]!==t.spans||e[107]!==P||e[108]!==T?(K=s.jsx(Pe,{rows:t.spans,rowKey:We,empty:Q,hoverKey:$e,keyboardNav:P,columns:T}),e[106]=t.spans,e[107]=P,e[108]=T,e[109]=K):K=e[109];let X;return e[110]!==y||e[111]!==_||e[112]!==w||e[113]!==K?(X=s.jsxs(Ne,{title:"Spans",children:[A,y,_,w,K]}),e[110]=y,e[111]=_,e[112]=w,e[113]=K,e[114]=X):X=e[114],X}function Oe(t){return H(t.max,2)}function Re(t){return s.jsx("span",{className:"font-semibold",children:H(t.p95,2)})}function Te(t){return H(t.p50,2)}function Ke(t){return s.jsx("span",{className:t.errors?"text-danger font-semibold":"",children:Z(t.errors)})}function He(t){return Z(t.count)}function Ve(t){return s.jsx(Be,{data:t.sparkline,hoverKey:t.group_hash})}function $e(t){return t.group_hash}function We(t){return t.group_hash}export{nt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,u as C,j as n,al as D,d as R,L as H,i as K}from"./inertia-DfNRARuA.js";import{D as T}from"./data-table-CQ_YRWQs.js";import{E as W,aq as q,B as A}from"./app-layout-by7G3sa1.js";import{O as I}from"./origin-identity-1R3bqa3R.js";import{P as F,E as J}from"./env-layout-CdMWbUkm.js";import{R as Q}from"./relative-time-Dsc_cCdX.js";import{S as $}from"./status-badge-CmbRKlY7.js";import{m as P,a as z,w as G}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./tenant-path-C4rNGauE.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function be(t){const e=B.c(42),{environment:M,range:a,window:l}=C().props,i=M.application_id,r=M.id;let k;e[0]!==i||e[1]!==r?(k=s=>D(i,r,s.execution_id),e[0]=i,e[1]=r,e[2]=k):k=e[2];const x=k;let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(F,{title:"Scheduled tasks",description:"Solid Queue recurring tasks from config/recurring.yml: runs, failures, and missed schedules."}),e[3]=_):_=e[3];let o;e[4]!==t.missed?(o=t.missed.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:t.missed.map(de)}),e[4]=t.missed,e[5]=o):o=e[5];let y,g;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(W,{icon:q,title:"No scheduled task has run in this window",description:"Recurring and scheduled job runs appear here as they execute."}),g=[{key:"k",header:"Task",cell:oe},{key:"s",header:"Schedule",cell:le},{key:"next",hideOnMobile:!0,header:"Next run",cell:ae},{key:"n",header:"Runs",align:"right",cell:re},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:ie},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:se},{key:"last",header:"Last run",align:"right",cell:ne}],e[6]=y,e[7]=g):(y=e[6],g=e[7]);let c;e[8]!==t.tasks?(c=n.jsx(T,{rows:t.tasks,rowKey:ce,empty:y,columns:g}),e[8]=t.tasks,e[9]=c):c=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent runs"}),e[10]=j):j=e[10];let d,u;e[11]!==x?(d=s=>R.visit(x(s)),u={onOpen:(s,L)=>L?.newTab?window.open(x(s),"_blank"):R.visit(x(s))},e[11]=x,e[12]=d,e[13]=u):(d=e[12],u=e[13]);let w,b,v,O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={key:"when",header:"When",cell:ee},w={key:"k",header:"Task",cell:Z},b={key:"job",hideOnMobile:!0,header:"Job",cell:Y},v={key:"o",header:"Outcome",cell:X},e[14]=w,e[15]=b,e[16]=v,e[17]=O):(w=e[14],b=e[15],v=e[16],O=e[17]);let m;e[18]!==i||e[19]!==r||e[20]!==a||e[21]!==l?(m={key:"user",hideOnMobile:!0,header:"Origin user",cell:s=>n.jsx(I,{...s,applicationId:i,environmentId:r,kind:"user",range:a,window:l})},e[18]=i,e[19]=r,e[20]=a,e[21]=l,e[22]=m):m=e[22];let h;e[23]!==i||e[24]!==r||e[25]!==a||e[26]!==l?(h={key:"tenant",hideOnMobile:!0,header:"Origin tenant",cell:s=>n.jsx(I,{...s,applicationId:i,environmentId:r,kind:"tenant",range:a,window:l})},e[23]=i,e[24]=r,e[25]=a,e[26]=l,e[27]=h):h=e[27];let S,N;e[28]===Symbol.for("react.memo_cache_sentinel")?(S={key:"d",hideOnMobile:!0,header:"Duration",align:"right",cell:V},N={key:"ex",hideOnMobile:!0,header:"Exception",cell:U},e[28]=S,e[29]=N):(S=e[28],N=e[29]);let f;e[30]!==m||e[31]!==h?(f=[O,w,b,v,m,h,S,N],e[30]=m,e[31]=h,e[32]=f):f=e[32];let p;e[33]!==t.runs||e[34]!==f||e[35]!==d||e[36]!==u?(p=n.jsx(T,{rows:t.runs,rowKey:te,onRowClick:d,keyboardNav:u,columns:f}),e[33]=t.runs,e[34]=f,e[35]=d,e[36]=u,e[37]=p):p=e[37];let E;return e[38]!==p||e[39]!==o||e[40]!==c?(E=n.jsxs(J,{title:"Scheduled tasks",children:[_,o,c,j,p]}),e[38]=p,e[39]=o,e[40]=c,e[41]=E):E=e[41],E}function U(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function V(t){return P(t.duration)}function X(t){return n.jsx($,{outcome:t.outcome})}function Y(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Z(t){return n.jsx("span",{className:"font-mono text-xs",children:t.task_key})}function ee(t){return n.jsx("span",{className:"text-xs",children:G(t.occurred_at)})}function te(t){return t.execution_id}function ne(t){return z(t.last_run_at)}function se(t){return P(t.avg)}function ie(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:t.failed})}function re(t){return t.runs}function ae(t){return n.jsx("span",{className:"text-muted-foreground text-xs",children:t.next_run_at?n.jsx(Q,{iso:t.next_run_at}):"–"})}function le(t){return n.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.schedule??"–"})}function oe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.task_key})}function ce(t){return t.task_key}function de(t){return n.jsx(H,{href:K(t.id),children:n.jsxs(A,{variant:"destructive",children:[t.key," · ",t.title]})},t.id)}export{be as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Ie,u as Oe,r as re,v as fe,j as s,d as I,w as ze,H as Ee,L as Pe,i as ye}from"./inertia-DfNRARuA.js";import{D as Me,i as Ae}from"./data-table-CQ_YRWQs.js";import{b as de,r as Le,E as Re,O as De,s as he,t as Be,B as Se}from"./app-layout-by7G3sa1.js";import{S as xe,a as pe}from"./segmented-DB4zh-Am.js";import{I as _e}from"./status-badge-CmbRKlY7.js";import{S as ge,a as be,b as ke,c as je,d as ue}from"./select-DBKjFlOX.js";import{c as me,a as He}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";const Ke=["low","normal","high","urgent"];function mt(t){const e=Ie.c(82),{applications:O}=Oe().props,[d,ve]=re.useState(t.filters.q??""),[c,we]=re.useState(null);let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=new Set,e[0]=z):z=e[0];const[a,E]=re.useState(z),ae=t.filters.status??"open";let P;e[1]!==t.filters?(P=n=>I.visit(fe({...t.filters,...n}),{preserveState:!0}),e[1]=t.filters,e[2]=P):P=e[2];const r=P,M=st;let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A={onOpen:(n,l)=>l?.newTab?window.open(M(n),"_blank"):I.visit(M(n)),onHighlightChange:n=>we(n?.id??null)},e[3]=A):A=e[3];const Ne=A;let L,R;e[4]!==c||e[5]!==t.issues?(L=()=>{const n=function(i){if(Ae(i)||i.key!=="r"&&i.key!=="i"&&i.key!=="a")return;const o=t.issues.findIndex(ce=>ce.id===c);if(o<0)return;i.preventDefault();const C=i.key==="r"?"resolve":i.key==="i"?"ignore":"assign_me";I.patch(ye(t.issues[o].id),{action_name:C},{preserveScroll:!0})};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},R=[c,t.issues],e[4]=c,e[5]=t.issues,e[6]=L,e[7]=R):(L=e[6],R=e[7]),re.useEffect(L,R);let D;e[8]===Symbol.for("react.memo_cache_sentinel")?(D=function(l){E(i=>{const o=new Set(i);return o.has(l)?o.delete(l):o.add(l),o})},e[8]=D):D=e[8];const Ce=D;let B;e[9]!==a?(B=function(l,i){I.post(ze(),{ids:[...a],action_name:l,value:i},{preserveScroll:!0,onSuccess:()=>E(new Set)})},e[9]=a,e[10]=B):B=e[10];const N=B;let H,K;e[11]===Symbol.for("react.memo_cache_sentinel")?(H=[{title:"Issues",href:fe()}],K=s.jsx(Ee,{title:"Issues"}),e[11]=H,e[12]=K):(H=e[11],K=e[12]);let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=[["exception","Exceptions"],["performance","Performance"],["anomaly","Anomalies"]],e[13]=T):T=e[13];let m;e[14]!==r||e[15]!==t.filters.kind||e[16]!==t.kindCounts?(m=s.jsx(xe,{children:T.map(n=>{const[l,i]=n;return s.jsxs(pe,{mono:!1,active:(t.filters.kind??"")===l,onClick:()=>r({kind:t.filters.kind===l?void 0:l}),className:"gap-2 px-3",children:[i,s.jsx("span",{className:"bg-muted text-muted-foreground rounded px-1.5 font-mono text-[10px]",children:me(t.kindCounts?.[l]??0)})]},l)})}),e[14]=r,e[15]=t.filters.kind,e[16]=t.kindCounts,e[17]=m):m=e[17];let u;e[18]!==r||e[19]!==d?(u=n=>{n.preventDefault(),r({q:d})},e[18]=r,e[19]=d,e[20]=u):u=e[20];let q;e[21]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Le,{className:"text-muted-foreground size-3.5 shrink-0"}),e[21]=q):q=e[21];let V;e[22]===Symbol.for("react.memo_cache_sentinel")?(V=n=>ve(n.target.value),e[22]=V):V=e[22];let f;e[23]!==d?(f=s.jsx("input",{value:d,onChange:V,placeholder:"Search or source:browser",className:"placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"}),e[23]=d,e[24]=f):f=e[24];let h;e[25]!==u||e[26]!==f?(h=s.jsxs("form",{className:"bg-card flex h-8 min-w-0 flex-1 items-center gap-1.5 rounded-md border px-2 md:max-w-xs",onSubmit:u,children:[q,f]}),e[25]=u,e[26]=f,e[27]=h):h=e[27];let U;e[28]===Symbol.for("react.memo_cache_sentinel")?(U=["open","Open",{}],e[28]=U):U=e[28];let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=["mine","Mine",{mine:"1"}],e[29]=$):$=e[29];let Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(Q=["resolved","Resolved",{}],e[30]=Q):Q=e[30];let W;e[31]===Symbol.for("react.memo_cache_sentinel")?(W=[U,$,Q,["ignored","Ignored",{}]],e[31]=W):W=e[31];let x;e[32]!==r||e[33]!==t.counts||e[34]!==t.filters.mine||e[35]!==ae?(x=s.jsx("div",{className:"-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:ml-auto md:overflow-visible md:px-0 [&::-webkit-scrollbar]:hidden",children:s.jsx(xe,{children:W.map(n=>{const[l,i,o]=n,C=l==="mine",ce=C?t.filters.mine==="1":ae===l&&t.filters.mine!=="1";return s.jsxs(pe,{mono:!1,active:ce,onClick:()=>r(C?{mine:"1",status:"open"}:{status:l,mine:void 0,...o}),className:"px-3",children:[i,!C&&s.jsx("span",{className:"text-muted-foreground font-mono text-[10px]",children:me(t.counts[l]??0)})]},l)})})}),e[32]=r,e[33]=t.counts,e[34]=t.filters.mine,e[35]=ae,e[36]=x):x=e[36];let p;e[37]!==O||e[38]!==r||e[39]!==t.filters.application_id?(p=O.length>1&&s.jsxs(ge,{value:t.filters.application_id??"all",onValueChange:n=>r({application_id:n==="all"?void 0:n,environment_id:void 0}),children:[s.jsx(be,{className:"h-8 w-44 text-xs",children:s.jsx(ke,{placeholder:"Application"})}),s.jsxs(je,{children:[s.jsx(ue,{value:"all",children:"All applications"}),O.map(tt)]})]}),e[37]=O,e[38]=r,e[39]=t.filters.application_id,e[40]=p):p=e[40];let g;e[41]!==m||e[42]!==h||e[43]!==x||e[44]!==p?(g=s.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:items-center",children:[m,h,x,p]}),e[41]=m,e[42]=h,e[43]=x,e[44]=p,e[45]=g):g=e[45];let F,G;e[46]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Re,{icon:De,title:"No issues match",signal:"caution",description:"Issues are grouped from repeated request, job, and exception errors."}),G=n=>I.visit(M(n)),e[46]=F,e[47]=G):(F=e[46],G=e[47]);const oe=t.issues.length>0&&a.size===t.issues.length;let b;e[48]!==t.issues?(b=n=>E(n?new Set(t.issues.map(Ze)):new Set),e[48]=t.issues,e[49]=b):b=e[49];let k;e[50]!==oe||e[51]!==b?(k=s.jsx(he,{checked:oe,onCheckedChange:b,"aria-label":"Select all",onClick:Ye}),e[50]=oe,e[51]=b,e[52]=k):k=e[52];let j;e[53]!==a?(j=n=>s.jsx(he,{checked:a.has(n.id),onCheckedChange:()=>Ce(n.id),"aria-label":`Select ${n.key}`,onClick:Xe}),e[53]=a,e[54]=j):j=e[54];let y;e[55]!==k||e[56]!==j?(y={key:"sel",hideOnMobile:!0,header:k,cell:j},e[55]=k,e[56]=j,e[57]=y):y=e[57];let S;e[58]!==c?(S={key:"k",header:"Issue",cell:n=>s.jsxs("div",{className:"flex items-center gap-1",children:[n.id===c&&s.jsx("span",{className:"text-primary","aria-hidden":!0,children:"›"}),s.jsx(Pe,{className:"font-mono text-xs font-semibold hover:underline",href:M(n),children:n.key})]})},e[58]=c,e[59]=S):S=e[59];let J,X,Y,Z,ee,te,se,ne,le;e[60]===Symbol.for("react.memo_cache_sentinel")?(J={key:"t",header:"Title",grow:!0,cell:Je},X={key:"env",hideOnMobile:!0,header:"Where",cell:Ge},Y={key:"kind",hideOnMobile:!0,header:"Kind",cell:Fe},Z={key:"s",hideOnMobile:!0,header:"Status",cell:We},ee={key:"p",hideOnMobile:!0,header:"Priority",cell:Qe},te={key:"a",hideOnMobile:!0,header:"Assignee",cell:$e},se={key:"n",header:"Events",align:"right",cell:Ue},ne={key:"u",hideOnMobile:!0,header:"Users",align:"right",cell:Ve},le={key:"l",hideOnMobile:!0,header:"Last seen",align:"right",cell:qe},e[60]=J,e[61]=X,e[62]=Y,e[63]=Z,e[64]=ee,e[65]=te,e[66]=se,e[67]=ne,e[68]=le):(J=e[60],X=e[61],Y=e[62],Z=e[63],ee=e[64],te=e[65],se=e[66],ne=e[67],le=e[68]);let _;e[69]!==y||e[70]!==S?(_=[y,S,J,X,Y,Z,ee,te,se,ne,le],e[69]=y,e[70]=S,e[71]=_):_=e[71];let v;e[72]!==t.issues||e[73]!==_?(v=s.jsx(Me,{rows:t.issues,rowKey:et,empty:F,onRowClick:G,keyboardNav:Ne,columns:_}),e[72]=t.issues,e[73]=_,e[74]=v):v=e[74];let w;e[75]!==N||e[76]!==a.size?(w=a.size>0&&s.jsxs("div",{className:"bg-background sticky bottom-4 z-10 flex w-fit items-center gap-2 self-start rounded-lg border p-2 shadow-md",children:[s.jsxs("span",{className:"px-1 text-sm",children:[a.size," selected"]}),s.jsx(de,{size:"sm",variant:"outline",onClick:()=>N("resolve"),children:"Resolve"}),s.jsx(de,{size:"sm",variant:"outline",onClick:()=>N("ignore"),children:"Ignore"}),s.jsxs(ge,{onValueChange:n=>N("priority",n),children:[s.jsx(be,{className:"h-8 w-32",children:s.jsx(ke,{placeholder:"Priority"})}),s.jsx(je,{children:Ke.map(Te)})]}),s.jsx(de,{size:"sm",variant:"ghost",onClick:()=>E(new Set),children:"Clear"})]}),e[75]=N,e[76]=a.size,e[77]=w):w=e[77];let ie;return e[78]!==g||e[79]!==v||e[80]!==w?(ie=s.jsxs(Be,{breadcrumbs:H,children:[K,s.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6",children:[g,v,w]})]}),e[78]=g,e[79]=v,e[80]=w,e[81]=ie):ie=e[81],ie}function Te(t){return s.jsx(ue,{value:t,className:"capitalize",children:t},t)}function qe(t){return s.jsx("span",{title:t.last_seen_at,children:He(t.last_seen_at)})}function Ve(t){return t.affected_users}function Ue(t){return me(t.occurrences)}function $e(t){return t.assignee?.name??s.jsx("span",{className:"text-muted-foreground",children:"–"})}function Qe(t){return s.jsx("span",{className:t.priority==="urgent"?"text-destructive font-semibold":t.priority==="high"?"text-amber-600":"text-muted-foreground",children:t.priority})}function We(t){return s.jsx(_e,{status:t.status})}function Fe(t){return s.jsx(Se,{variant:"outline",children:t.kind})}function Ge(t){return s.jsxs("span",{className:"text-xs",children:[t.application?.name," · ",t.environment?.name]})}function Je(t){return s.jsxs("div",{className:"text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"line-clamp-1 font-medium",children:t.title}),t.fingerprint_source&&t.fingerprint_source!=="default"&&s.jsxs(Se,{variant:"secondary",className:"shrink-0",children:["grouped by ",t.fingerprint_source]}),s.jsx("span",{className:"md:hidden",children:s.jsx(_e,{status:t.status})})]}),s.jsx("div",{className:"text-muted-foreground font-mono",children:t.culprit})]})}function Xe(t){return t.stopPropagation()}function Ye(t){return t.stopPropagation()}function Ze(t){return t.id}function et(t){return t.id}function tt(t){return s.jsx(ue,{value:String(t.id),children:t.name},t.id)}function st(t){return ye(t.id)}export{mt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M,u as T,j as i,L as N,p as O}from"./inertia-DfNRARuA.js";import{D as $}from"./data-table-CQ_YRWQs.js";import{E as D,a7 as F}from"./app-layout-by7G3sa1.js";import{P as H,E as I}from"./env-layout-CdMWbUkm.js";import{R as C}from"./relative-time-Dsc_cCdX.js";import{S as R,a as K}from"./stat-DT2hhsqS.js";import{c as d,p as W,m as q}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./arrow-up-DCZ7emux.js";function re(l){const e=M.c(40),{environment:A,window:b}=T().props,S=A.application_id,k=A.id,t=l.summary;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(H,{title:"Profiles",description:"Sampled stack profiles, grouped by the execution they profiled."}),e[0]=h):h=e[0];let s;e[1]!==t.profiles?(s=d(t.profiles),e[1]=t.profiles,e[2]=s):s=e[2];let o;e[3]!==s?(o=i.jsx(R,{label:"Profiles",value:s}),e[3]=s,e[4]=o):o=e[4];let r;e[5]!==t.executions||e[6]!==t.profiled?(r=W(t.profiled,t.executions),e[5]=t.executions,e[6]=t.profiled,e[7]=r):r=e[7];let x;e[8]!==t.profiled?(x=d(t.profiled),e[8]=t.profiled,e[9]=x):x=e[9];let _;e[10]!==t.executions?(_=d(t.executions),e[10]=t.executions,e[11]=_):_=e[11];const w=`${x} of ${_}`;let a;e[12]!==r||e[13]!==w?(a=i.jsx(R,{label:"Executions profiled",value:r,hint:w}),e[12]=r,e[13]=w,e[14]=a):a=e[14];let n;e[15]!==t.avg_samples?(n=d(t.avg_samples),e[15]=t.avg_samples,e[16]=n):n=e[16];let p;e[17]!==n?(p=i.jsx(R,{label:"Avg samples",value:n}),e[17]=n,e[18]=p):p=e[18];let f;e[19]!==o||e[20]!==a||e[21]!==p?(f=i.jsxs(K,{children:[o,a,p]}),e[19]=o,e[20]=a,e[21]=p,e[22]=f):f=e[22];let g;e[23]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(D,{icon:F,title:"No profiles in this window",description:"Set RAILWATCH_PROFILE_SAMPLE_RATE in the app to profile slow executions."}),e[23]=g):g=e[23];let m;e[24]!==S||e[25]!==k||e[26]!==b?(m={key:"name",header:"Execution",className:"max-w-0",cell:L=>i.jsx(N,{href:O(S,k,L.profile_id,{window:b}),className:"block truncate font-mono text-xs hover:underline",children:L.name??L.group_hash})},e[24]=S,e[25]=k,e[26]=b,e[27]=m):m=e[27];let v,y,j,E;e[28]===Symbol.for("react.memo_cache_sentinel")?(v={key:"n",header:"Profiles",align:"right",cell:J},y={key:"avg",header:"Avg duration",align:"right",cell:G},j={key:"samples",hideOnMobile:!0,header:"Max samples",align:"right",cell:B},E={key:"last",hideOnMobile:!0,header:"Last seen",align:"right",cell:z},e[28]=v,e[29]=y,e[30]=j,e[31]=E):(v=e[28],y=e[29],j=e[30],E=e[31]);let c;e[32]!==m?(c=[m,v,y,j,E],e[32]=m,e[33]=c):c=e[33];let u;e[34]!==l.profiles||e[35]!==c?(u=i.jsx($,{rows:l.profiles,rowKey:Q,empty:g,columns:c}),e[34]=l.profiles,e[35]=c,e[36]=u):u=e[36];let P;return e[37]!==f||e[38]!==u?(P=i.jsxs(I,{title:"Profiles",children:[h,f,u]}),e[37]=f,e[38]=u,e[39]=P):P=e[39],P}function z(l){return i.jsx(C,{iso:l.last_seen_at})}function B(l){return d(l.max_samples)}function G(l){return q(l.avg_duration)}function J(l){return d(l.count)}function Q(l){return l.group_hash}export{re as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as F,r as M,j as s,L as w,s as O,d as S,f as T,P as Q,c as L}from"./inertia-DfNRARuA.js";import{S as _}from"./code-BYjC4YZ_.js";import{C as R}from"./cursor-load-more-DSdhgpGl.js";import{D as q}from"./data-table-CQ_YRWQs.js";import{C as z,a as K,E as $,a9 as A,q as B,b as H}from"./app-layout-by7G3sa1.js";import{F as I}from"./filter-bar-CrzpQ_vD.js";import{u as U,E as W,P as G}from"./env-layout-CdMWbUkm.js";import{u as J,P as V}from"./percentile-picker-73z5PAps.js";import{S as k}from"./sort-header-BcG8ulEH.js";import{S as X}from"./sparkline-cell-B47ipscB.js";import{a as Y,S as C}from"./stat-DT2hhsqS.js";import{C as Z,b as ee,c as se,a as oe}from"./card-C-PPSA0g.js";import{u as re,C as te}from"./use-clipboard-oTNeP4ax.js";import{c as P,m as f}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./arrow-up-DCZ7emux.js";import"./series-chart-BaiDG795.js";import"./chart-Cov79YC5.js";const ae=1500;function ie(r){const o=L.c(20),{suggestion:a}=r,[,d]=re(),[u,v]=M.useState(!1);let p;o[0]!==d||o[1]!==a.code?(p=()=>{d(a.code).then(g=>{g&&(v(!0),window.setTimeout(()=>v(!1),ae))})},o[0]=d,o[1]=a.code,o[2]=p):p=o[2];const y=p;let n;o[3]!==a.code?(n=s.jsx("pre",{className:"overflow-x-auto font-mono text-xs whitespace-pre-wrap",children:a.code}),o[3]=a.code,o[4]=n):n=o[4];let l;o[5]!==y?(l=g=>{g.stopPropagation(),y()},o[5]=y,o[6]=l):l=o[6];let c;o[7]!==u?(c=u?s.jsx(B,{className:"size-3 text-emerald-500"}):s.jsx(te,{className:"size-3 opacity-60"}),o[7]=u,o[8]=c):c=o[8];let m;o[9]!==l||o[10]!==c?(m=s.jsxs(H,{type:"button",variant:"ghost",size:"sm",className:"h-6 shrink-0 gap-1 px-1.5 text-xs",onClick:l,children:[c,"Copy"]}),o[9]=l,o[10]=c,o[11]=m):m=o[11];let h;o[12]!==n||o[13]!==m?(h=s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n,m]}),o[12]=n,o[13]=m,o[14]=h):h=o[14];let t;o[15]!==a.explanation?(t=s.jsx("p",{className:"text-muted-foreground text-xs whitespace-normal",children:a.explanation}),o[15]=a.explanation,o[16]=t):t=o[16];let x;return o[17]!==h||o[18]!==t?(x=s.jsxs("div",{className:"border-warning/40 bg-muted/40 mt-2 space-y-2 rounded-lg border p-2",children:[h,t]}),o[17]=h,o[18]=t,o[19]=x):x=o[19],x}function _e(r){const{environment:o,window:a,range:d}=F().props,{percentile:u}=J(),{label:v}=U(),[p,y]=M.useState(null),n=o.application_id,l=o.id,c=a==="custom"?{from:d?.from,to:d?.to}:{window:a},m=d?{from:d.from,to:d.to}:c,h=(e,i=r.q)=>Q(n,l,{...e?m:c,q:i||void 0,cursor:e,limit:r.pagination.limit,sort:r.sort,dir:r.dir}),t=r.summary.current,x=r.summary.previous,g=a==="custom"?"vs previous period":`vs previous ${v}`,D=r.n_plus_ones.filter(e=>e.suggestion).length,E=e=>{e.suggestion&&y(i=>i===e.group_hash?null:e.group_hash)},b=e=>S.visit(Q(n,l,{...c,q:r.q||void 0,sort:e,dir:r.sort===e&&r.dir==="desc"?"asc":"desc"}),{preserveState:!0}),j=e=>O(n,l,e,c),N=(e,i)=>i?.newTab?globalThis.window.open(j(e),"_blank"):S.visit(j(e));return s.jsxs(W,{title:"Queries",children:[s.jsx(G,{title:"Queries",description:"Every SQL shape your app ran, grouped by normalized statement.",actions:s.jsx(V,{})}),s.jsxs(Y,{children:[s.jsx(C,{label:"Queries",value:P(t.count),delta:{current:t.count,previous:x.count,goodDirection:"down"},deltaCaption:g}),s.jsx(C,{label:"N+1 groups",value:P(r.n_plus_ones.length),tone:r.n_plus_ones.length>0?"warning":void 0,hint:r.n_plus_ones.length>0?`${D} with a suggested fix`:void 0}),s.jsx(C,{label:"Avg",value:f(t.avg/1e3,2),delta:{current:t.avg,previous:x.avg,goodDirection:"down"},deltaCaption:g}),s.jsx(C,{label:"p95",value:f(t.p95/1e3,2),hint:`p99 ${f(t.p99/1e3,2)}`,delta:{current:t.p95,previous:x.p95,goodDirection:"down"},deltaCaption:g})]}),r.n_plus_ones.length>0&&s.jsxs(Z,{className:"border-amber-500/40",children:[s.jsx(ee,{children:s.jsx(se,{children:"N+1 queries detected"})}),s.jsx(oe,{children:s.jsx(q,{rows:r.n_plus_ones,rowKey:e=>e.group_hash,onRowClick:E,keyboardNav:{onOpen:(e,i)=>N(e.group_hash,i)},columns:[{key:"sql",header:"Query shape",grow:!0,cell:e=>s.jsxs(s.Fragment,{children:[s.jsx(w,{href:O(n,l,e.group_hash),children:s.jsx(_,{className:"hover:underline",children:e.sql})}),p===e.group_hash&&e.suggestion&&s.jsx(ie,{suggestion:e.suggestion})]})},{key:"fix",header:"Fix",cell:e=>e.suggestion?s.jsxs("button",{type:"button","aria-expanded":p===e.group_hash,"aria-label":`Suggested fix: ${e.suggestion.code}`,onClick:i=>{i.stopPropagation(),E(e)},className:"border-warning/50 text-warning hover:bg-warning/10 inline-flex items-center gap-0.5 rounded-md border py-0.5 pr-1.5 pl-0.5 font-mono text-[11px] uppercase",children:[p===e.group_hash?s.jsx(z,{className:"size-3"}):s.jsx(K,{className:"size-3"}),"Fix"]}):null},{key:"src",hideOnMobile:!0,header:"Source",cell:e=>s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:e.source??""})},{key:"occ",header:"Executions affected",align:"right",cell:e=>e.occurrences},{key:"mx",hideOnMobile:!0,header:"Max repeats",align:"right",cell:e=>e.max_count}]})})]}),s.jsx(q,{rows:r.queries,rowKey:e=>e.group_hash,empty:s.jsx($,{icon:A,title:"No queries in this window",description:"SQL queries executed by your app appear here as they're reported."}),hoverKey:e=>e.group_hash,keyboardNav:{onOpen:(e,i)=>N(e.group_hash,i)},columns:[{key:"sql",header:"Query",grow:!0,cell:e=>s.jsx(w,{href:j(e.group_hash),children:s.jsx(_,{className:"hover:underline",children:e.name})})},{key:"trend",hideOnMobile:!0,header:"Trend",cell:e=>s.jsx(X,{data:e.sparkline,hoverKey:e.group_hash})},{key:"n",header:s.jsx(k,{label:"Count",active:r.sort==="count",dir:r.dir==="asc"?"asc":"desc",onClick:()=>b("count")}),align:"right",cell:e=>P(e.count)},{key:"avg",hideOnMobile:!0,header:s.jsx(k,{label:"Avg",active:r.sort==="avg",dir:r.dir==="asc"?"asc":"desc",onClick:()=>b("avg")}),align:"right",cell:e=>f(e.avg,2)},{key:u,header:s.jsx(k,{label:u,active:r.sort===u,dir:r.dir==="asc"?"asc":"desc",onClick:()=>b(u)}),align:"right",cell:e=>s.jsx("span",{className:"font-semibold",children:f(e[u],2)})},{key:"max",hideOnMobile:!0,header:s.jsx(k,{label:"Max",active:r.sort==="max",dir:r.dir==="asc"?"asc":"desc",onClick:()=>b("max")}),align:"right",cell:e=>f(e.max,2)}]}),s.jsx("h2",{className:"text-sm font-semibold",children:"Slowest individual queries"}),s.jsx(I,{value:r.q,fields:[{key:"after",label:"After"},{key:"before",label:"Before"},{key:"user",label:"User"},{key:"tenant",label:"Tenant"},{key:"deploy",label:"Deploy"},{key:"source",label:"Source"},{key:"kind",label:"Execution kind",options:["request","job","scheduled_task","command"]},{key:"connection",label:"Connection"},{key:"role",label:"Role"},{key:"adapter",label:"Adapter"}],onChange:e=>S.visit(h(void 0,e),{only:["slowest","pagination","q"],preserveState:!0,reset:["slowest"]}),placeholder:"connection:primary role:reading source:app/models"}),s.jsx(q,{rows:r.slowest,rowKey:e=>e.id,keyboardNav:{onOpen:(e,i)=>N(e.group_hash,i)},columns:[{key:"sql",header:"SQL",grow:!0,cell:e=>s.jsx(w,{href:j(e.group_hash),children:s.jsx(_,{className:"hover:underline",children:e.sql})})},{key:"exe",hideOnMobile:!0,header:"In",cell:e=>e.execution_id?s.jsx(w,{className:"font-mono text-xs hover:underline",href:T(n,l,e.execution_id),children:e.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},{key:"src",hideOnMobile:!0,header:"Source",cell:e=>s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:e.source??""})},{key:"d",header:"Duration",align:"right",cell:e=>f(e.duration,2)}]}),s.jsx(R,{meta:r.pagination,href:h,only:["slowest","pagination"]})]})}export{_e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as D,u as P,j as i,f as L,d as A,L as F}from"./inertia-DfNRARuA.js";import{D as M}from"./data-table-CQ_YRWQs.js";import{E as O,a2 as S}from"./app-layout-by7G3sa1.js";import{P as H,E as K}from"./env-layout-CdMWbUkm.js";import{c as R,m as j,w as T}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function oe(t){const e=D.c(26),{environment:E}=P().props,N=E.application_id,w=E.id;let c;e[0]!==N||e[1]!==w?(c=n=>n.execution_id?L(N,w,n.execution_id):null,e[0]=N,e[1]=w,e[2]=c):c=e[2];const r=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(H,{title:"Notifications",description:"ActionMailer/Noticed deliveries, grouped by notifier and delivery method."}),e[3]=m):m=e[3];let u,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),d=[{key:"n",header:"Notifier",cell:U},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:Q},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:J},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:G},{key:"p95",header:"p95",align:"right",cell:z}],e[4]=u,e[5]=d):(u=e[4],d=e[5]);let o;e[6]!==t.groups?(o=i.jsx(M,{rows:t.groups,rowKey:V,empty:u,columns:d}),e[6]=t.groups,e[7]=o):o=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),e[9]=h):h=e[9];let l;e[10]!==r?(l={onOpen:(n,v)=>{const k=r(n);k&&(v?.newTab?window.open(k,"_blank"):A.visit(k))}},e[10]=r,e[11]=l):l=e[11];let p,y,_,x,g;e[12]===Symbol.for("react.memo_cache_sentinel")?(x={key:"when",header:"When",cell:W},g={key:"n",header:"Notifier",cell:I},p={key:"dm",hideOnMobile:!0,header:"Delivery method",cell:C},y={key:"f",hideOnMobile:!0,header:"Failed",cell:B},_={key:"d",header:"Duration",align:"right",cell:q},e[12]=p,e[13]=y,e[14]=_,e[15]=x,e[16]=g):(p=e[12],y=e[13],_=e[14],x=e[15],g=e[16]);let s;e[17]!==r?(s=[x,g,p,y,_,{key:"in",hideOnMobile:!0,header:"In",cell:n=>{const v=r(n);return v?i.jsx(F,{className:"font-mono text-xs hover:underline",href:v,children:n.execution_preview}):null}}],e[17]=r,e[18]=s):s=e[18];let a;e[19]!==t.recent||e[20]!==s||e[21]!==l?(a=i.jsx(M,{rows:t.recent,rowKey:$,empty:h,keyboardNav:l,columns:s}),e[19]=t.recent,e[20]=s,e[21]=l,e[22]=a):a=e[22];let b;return e[23]!==a||e[24]!==o?(b=i.jsxs(K,{title:"Notifications",children:[m,o,f,a]}),e[23]=a,e[24]=o,e[25]=b):b=e[25],b}function q(t){return j(t.duration,3)}function B(t){return t.failed?"yes":""}function C(t){return t.delivery_method}function I(t){return i.jsx("span",{className:"font-mono text-xs",children:t.notifier})}function W(t){return i.jsx("span",{className:"text-xs",children:T(t.occurred_at)})}function $(t){return t.id}function z(t){return j(t.p95,3)}function G(t){return j(t.avg,3)}function J(t){return R(t.errors)}function Q(t){return R(t.count)}function U(t){return i.jsx("span",{className:"font-mono text-xs",children:t.name})}function V(t){return t.group_hash}export{oe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x,u as g,j as r,M as j,d as h}from"./inertia-DfNRARuA.js";import{D as _}from"./data-table-CQ_YRWQs.js";import{E as w,a6 as b}from"./app-layout-by7G3sa1.js";import{E as v,P as k}from"./env-layout-CdMWbUkm.js";import{c as E,a as N}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function $(t){const e=x.c(13),{environment:f}=g().props,u=f.application_id,d=f.id;let o;e[0]!==u||e[1]!==d?(o=a=>j(u,d,a.ref),e[0]=u,e[1]=d,e[2]=o):o=e[2];const i=o;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(k,{title:"Users",description:"Your application's users as seen in telemetry, with their activity and errors."}),e[3]=l):l=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(w,{icon:b,title:"No authenticated activity in this window",description:"People appear here once requests are tagged with an authenticated user."}),e[4]=c):c=e[4];let s,n;e[5]!==i?(s=a=>h.visit(i(a)),n={onOpen:(a,y)=>y?.newTab?window.open(i(a),"_blank"):h.visit(i(a))},e[5]=i,e[6]=s,e[7]=n):(s=e[6],n=e[7]);let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=[{key:"n",header:"User",cell:q},{key:"t",hideOnMobile:!0,header:"Tenant",cell:U},{key:"r",header:"Requests",align:"right",cell:S},{key:"e",hideOnMobile:!0,header:"Errors",align:"right",cell:R},{key:"l",header:"Last seen",align:"right",cell:P}],e[8]=m):m=e[8];let p;return e[9]!==t.people||e[10]!==s||e[11]!==n?(p=r.jsxs(v,{title:"Users",children:[l,r.jsx(_,{rows:t.people,rowKey:M,empty:c,onRowClick:s,keyboardNav:n,columns:m})]}),e[9]=t.people,e[10]=s,e[11]=n,e[12]=p):p=e[12],p}function P(t){return N(t.last_seen_at)}function R(t){return r.jsx("span",{className:t.errors?"text-destructive":"",children:t.errors})}function S(t){return E(t.requests)}function U(t){return r.jsx("span",{className:"font-mono text-xs",children:t.tenant??""})}function q(t){return r.jsxs("span",{className:"text-xs",children:[r.jsx("span",{className:"font-medium",children:t.name??t.ref}),t.email&&r.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.email]})]})}function M(t){return t.ref}export{$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Z,u as ee,j as s,f as te,d as W,I as se,L as oe,r as G}from"./inertia-DfNRARuA.js";import{V as re,D as ne}from"./chart-panel-BPaYRXJB.js";import{D as J}from"./data-table-CQ_YRWQs.js";import{E as Q,a3 as X,C as le,a as ie,q as ae}from"./app-layout-by7G3sa1.js";import{F as ce}from"./filter-bar-CrzpQ_vD.js";import{P as me,E as ue}from"./env-layout-CdMWbUkm.js";import{u as de,P as fe}from"./percentile-picker-73z5PAps.js";import{S as he}from"./sparkline-cell-B47ipscB.js";import{S as pe}from"./status-badge-CmbRKlY7.js";import{u as xe,C as ge}from"./use-clipboard-oTNeP4ax.js";import{m as V,c as ye,p as be,w as _e,b as Y}from"./format-B9SDkrWj.js";import"./series-chart-BaiDG795.js";import"./chart-hover-DdK4E-2h.js";import"./chart-Cov79YC5.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function je(t){const e=Z.c(16),{body:h}=t,[o,i]=G.useState(!1),[,m]=xe(),[u,p]=G.useState(!1),d=o?le:ie;let a;e[0]!==o?(a=()=>i(!o),e[0]=o,e[1]=a):a=e[1];let r;e[2]!==d?(r=s.jsx(d,{className:"size-3"}),e[2]=d,e[3]=r):r=e[3];let n;e[4]!==o||e[5]!==a||e[6]!==r?(n=s.jsxs("button",{type:"button",onClick:a,"aria-expanded":o,className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[r,"Body"]}),e[4]=o,e[5]=a,e[6]=r,e[7]=n):n=e[7];let l;e[8]!==h||e[9]!==u||e[10]!==m||e[11]!==o?(l=o&&s.jsxs("div",{className:"w-[70vw] max-w-[36rem] space-y-1 text-left",children:[s.jsxs("button",{type:"button",onClick:()=>{(async()=>await m(h)&&(p(!0),setTimeout(()=>p(!1),1200)))()},className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[u?s.jsx(ae,{className:"size-3"}):s.jsx(ge,{className:"size-3"}),"Copy"]}),s.jsx("pre",{className:"bg-muted max-h-64 overflow-auto rounded p-2 font-mono text-[10px] break-all whitespace-pre-wrap",children:h})]}),e[8]=h,e[9]=u,e[10]=m,e[11]=o,e[12]=l):l=e[12];let f;return e[13]!==n||e[14]!==l?(f=s.jsxs("div",{className:"flex flex-col items-end gap-1",children:[n,l]}),e[13]=n,e[14]=l,e[15]=f):f=e[15],f}function Ze(t){const e=Z.c(62),{environment:h,window:o}=ee().props,{percentile:i}=de(),m=h.application_id,u=h.id;let p;e[0]!==m||e[1]!==u?(p=c=>c.execution_id?te(m,u,c.execution_id):null,e[0]=m,e[1]=u,e[2]=p):p=e[2];const d=p;let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(me,{title:"Outgoing requests",description:"HTTP calls your app makes to other services, by host and method.",actions:s.jsx(fe,{})}),e[3]=a):a=e[3];let r;e[4]!==t.series?(r=s.jsx(re,{legend:"request",label:"Outgoing requests",seriesLabel:"Calls",data:t.series}),e[4]=t.series,e[5]=r):r=e[5];let n;e[6]!==t.series||e[7]!==i?(n=s.jsx(ne,{label:"Latency",data:t.series,percentile:i}),e[6]=t.series,e[7]=i,e[8]=n):n=e[8];let l;e[9]!==r||e[10]!==n?(l=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[r,n]}),e[9]=r,e[10]=n,e[11]=l):l=e[11];let f,S,q,C,O,P;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Q,{icon:X,title:"No outgoing requests in this window",description:"HTTP calls your app makes to other services appear here."}),q={key:"h",header:"Host",cell:He},C={key:"trend",hideOnMobile:!0,header:"Trend",cell:Me},O={key:"n",header:"Calls",align:"right",cell:Ee},P={key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:Te},f={key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:Re},e[12]=f,e[13]=S,e[14]=q,e[15]=C,e[16]=O,e[17]=P):(f=e[12],S=e[13],q=e[14],C=e[15],O=e[16],P=e[17]);let x;e[18]!==i?(x=c=>s.jsx("span",{className:"font-semibold",children:V(c[i])}),e[18]=i,e[19]=x):x=e[19];let g;e[20]!==i||e[21]!==x?(g={key:i,header:i,align:"right",cell:x},e[20]=i,e[21]=x,e[22]=g):g=e[22];let R;e[23]===Symbol.for("react.memo_cache_sentinel")?(R={key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:Pe},e[23]=R):R=e[23];let y;e[24]!==g?(y=[q,C,O,P,f,g,R],e[24]=g,e[25]=y):y=e[25];let b;e[26]!==t.hosts||e[27]!==y?(b=s.jsx(J,{rows:t.hosts,rowKey:ze,empty:S,columns:y}),e[26]=t.hosts,e[27]=y,e[28]=b):b=e[28];let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[29]=T):T=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E={key:"host",label:"Host"},e[30]=E):E=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=[E,{key:"status",label:"Status",options:["2xx","3xx","4xx","5xx"]}],e[31]=M):M=e[31];let _;e[32]!==m||e[33]!==u||e[34]!==o?(_=c=>W.visit(se(m,u,{window:o,q:c||void 0}),{preserveState:!0}),e[32]=m,e[33]=u,e[34]=o,e[35]=_):_=e[35];let j;e[36]!==t.q||e[37]!==_?(j=s.jsx(ce,{value:t.q,fields:M,onChange:_,placeholder:"host:api.test status:5xx"}),e[36]=t.q,e[37]=_,e[38]=j):j=e[38];let H;e[39]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Q,{icon:X,title:"No outgoing requests in this window",description:"HTTP calls your app makes to other services appear here."}),e[39]=H):H=e[39];let k;e[40]!==d?(k={onOpen:(c,K)=>{const U=d(c);U&&(K?.newTab?globalThis.window.open(U,"_blank"):W.visit(U))}},e[40]=d,e[41]=k):k=e[41];let z,D,L,B,$,F;e[42]===Symbol.for("react.memo_cache_sentinel")?(z={key:"when",header:"When",cell:Ce},D={key:"st",header:"Status",cell:qe},L={key:"u",hideOnMobile:!0,header:"Request",cell:Se},B={key:"sz",hideOnMobile:!0,header:"In/out",align:"right",cell:Ne},$={key:"d",header:"Duration",align:"right",cell:we},F={key:"src",hideOnMobile:!0,header:"Source",cell:ve},e[42]=z,e[43]=D,e[44]=L,e[45]=B,e[46]=$,e[47]=F):(z=e[42],D=e[43],L=e[44],B=e[45],$=e[46],F=e[47]);let v;e[48]!==d?(v={key:"in",hideOnMobile:!0,header:"In",cell:c=>{const K=d(c);return K?s.jsx(oe,{className:"font-mono text-xs hover:underline",href:K,children:c.execution_preview}):null}},e[48]=d,e[49]=v):v=e[49];let I;e[50]===Symbol.for("react.memo_cache_sentinel")?(I={key:"body",header:"Response",align:"right",cell:ke},e[50]=I):I=e[50];let w;e[51]!==v?(w=[z,D,L,B,$,F,v,I],e[51]=v,e[52]=w):w=e[52];let N;e[53]!==t.recent||e[54]!==k||e[55]!==w?(N=s.jsx(J,{rows:t.recent,rowKey:Oe,empty:H,keyboardNav:k,columns:w}),e[53]=t.recent,e[54]=k,e[55]=w,e[56]=N):N=e[56];let A;return e[57]!==b||e[58]!==j||e[59]!==N||e[60]!==l?(A=s.jsxs(ue,{title:"Outgoing requests",children:[a,l,b,T,j,N]}),e[57]=b,e[58]=j,e[59]=N,e[60]=l,e[61]=A):A=e[61],A}function ke(t){return t.response_body?s.jsx(je,{body:t.response_body}):s.jsx("span",{className:"text-muted-foreground",children:"–"})}function ve(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.source??""})}function we(t){return V(t.duration)}function Ne(t){return`${Y(t.request_size)} / ${Y(t.response_size)}`}function Se(t){return s.jsxs("span",{className:"font-mono text-xs",children:[s.jsx("span",{className:"font-semibold",children:t.method})," ",t.url]})}function qe(t){return s.jsx(pe,{status:t.status_code,label:t.error?"error":void 0,outcome:t.error?"failed":void 0})}function Ce(t){return s.jsx("span",{className:"text-xs",children:_e(t.occurred_at)})}function Oe(t){return t.id}function Pe(t){return V(t.max)}function Re(t){return V(t.avg)}function Te(t){return s.jsx("span",{className:t.errors?"text-destructive":"",children:be(t.errors,t.count)})}function Ee(t){return ye(t.count)}function Me(t){return s.jsx(he,{data:t.sparkline})}function He(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function ze(t){return t.group_hash}export{Ze as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,u as F,j as t,d as I,m as R,r as $,L as A}from"./inertia-DfNRARuA.js";import{E as G,B as L}from"./app-layout-by7G3sa1.js";import{F as H}from"./filter-bar-CrzpQ_vD.js";import{P as O,E as T}from"./env-layout-CdMWbUkm.js";import{S as J}from"./series-chart-BaiDG795.js";import{S as q}from"./stat-DT2hhsqS.js";import{C as K,a as M}from"./card-C-PPSA0g.js";import{e as Q}from"./execution-path-7MYt-Qbn.js";import{c as P,w as z}from"./format-B9SDkrWj.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./chart-hover-DdK4E-2h.js";import"./chart-Cov79YC5.js";import"./arrow-up-DCZ7emux.js";function U(i){const e=B.c(51),{d:s,a:g,e:j}=i,[_,w]=$.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>w(V),e[0]=f):f=e[0];let l;e[1]!==s.gem_name?(l=s.gem_name&&t.jsx(L,{variant:"secondary",className:"font-mono",children:s.gem_name}),e[1]=s.gem_name,e[2]=l):l=e[2];let a;e[3]!==s.horizon?(a=s.horizon&&t.jsxs(L,{variant:"outline",className:"font-mono",children:["removed in ",s.horizon]}),e[3]=s.horizon,e[4]=a):a=e[4];let n;e[5]!==l||e[6]!==a?(n=t.jsxs("div",{className:"flex items-center gap-2",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7];let r;e[8]!==s.message?(r=t.jsx("p",{className:"mt-1 font-mono text-xs whitespace-pre-wrap",children:s.message}),e[8]=s.message,e[9]=r):r=e[9];let o;e[10]!==s.source?(o=s.source&&t.jsx("p",{className:"text-muted-foreground mt-1 font-mono text-xs",children:s.source}),e[10]=s.source,e[11]=o):o=e[11];let c;e[12]!==n||e[13]!==r||e[14]!==o?(c=t.jsxs("div",{className:"min-w-0 flex-1",children:[n,r,o]}),e[12]=n,e[13]=r,e[14]=o,e[15]=c):c=e[15];let x;e[16]!==s.sparkline?(x=t.jsx(J,{data:s.sparkline,className:"h-10 w-32"}),e[16]=s.sparkline,e[17]=x):x=e[17];let m;e[18]!==s.count?(m=P(s.count),e[18]=s.count,e[19]=m):m=e[19];let d;e[20]!==m?(d=t.jsx("div",{className:"text-lg font-semibold tabular-nums",children:m}),e[20]=m,e[21]=d):d=e[21];let u;e[22]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"text-muted-foreground text-xs",children:"occurrences"}),e[22]=u):u=e[22];let p;e[23]!==d?(p=t.jsxs("div",{className:"text-right",children:[d,u]}),e[23]=d,e[24]=p):p=e[24];let h;e[25]!==p||e[26]!==x?(h=t.jsxs("div",{className:"flex shrink-0 items-center gap-4",children:[x,p]}),e[25]=p,e[26]=x,e[27]=h):h=e[27];let v;e[28]!==h||e[29]!==c?(v=t.jsxs("button",{type:"button",onClick:f,className:"flex flex-wrap items-start justify-between gap-4 text-left",children:[c,h]}),e[28]=h,e[29]=c,e[30]=v):v=e[30];let N;e[31]!==s.first_seen_at?(N=z(s.first_seen_at),e[31]=s.first_seen_at,e[32]=N):N=e[32];let b;e[33]!==N?(b=t.jsxs("span",{children:["First seen ",N]}),e[33]=N,e[34]=b):b=e[34];let y;e[35]!==s.last_seen_at?(y=z(s.last_seen_at),e[35]=s.last_seen_at,e[36]=y):y=e[36];let S;e[37]!==y?(S=t.jsxs("span",{children:["Last seen ",y]}),e[37]=y,e[38]=S):S=e[38];let k;e[39]!==b||e[40]!==S?(k=t.jsxs("div",{className:"text-muted-foreground flex gap-4 text-xs",children:[b,S]}),e[39]=b,e[40]=S,e[41]=k):k=e[41];let E;e[42]!==g||e[43]!==s.occurrences||e[44]!==j||e[45]!==_?(E=_&&t.jsx("div",{className:"mt-2 overflow-hidden rounded-lg border",children:t.jsx("table",{className:"w-full text-xs",children:t.jsx("tbody",{children:s.occurrences.map(D=>t.jsxs("tr",{className:"border-t first:border-t-0",children:[t.jsx("td",{className:"px-3 py-1.5 tabular-nums",children:z(D.occurred_at)}),t.jsx("td",{className:"px-3 py-1.5",children:D.execution_id?t.jsx(A,{className:"font-mono hover:underline",href:Q({applicationId:g,environmentId:j,source:D.execution_source,executionId:D.execution_id}),children:D.execution_preview}):t.jsx("span",{className:"text-muted-foreground",children:"–"})})]},D.id))})})}),e[42]=g,e[43]=s.occurrences,e[44]=j,e[45]=_,e[46]=E):E=e[46];let C;return e[47]!==v||e[48]!==k||e[49]!==E?(C=t.jsx(K,{children:t.jsxs(M,{className:"flex flex-col gap-2 pt-4",children:[v,k,E]})}),e[47]=v,e[48]=k,e[49]=E,e[50]=C):C=e[50],C}function V(i){return!i}function me(i){const e=B.c(33),{environment:s,window:g}=F().props,j=s.application_id,_=s.id;let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(O,{title:"Deprecations",description:"ActiveSupport::Deprecation warnings, grouped by gem and message."}),e[0]=w):w=e[0];let f;e[1]!==i.distinct?(f=P(i.distinct),e[1]=i.distinct,e[2]=f):f=e[2];let l;e[3]!==f?(l=t.jsx(q,{label:"Distinct deprecations",value:f}),e[3]=f,e[4]=l):l=e[4];let a;e[5]!==i.total_occurrences?(a=P(i.total_occurrences),e[5]=i.total_occurrences,e[6]=a):a=e[6];let n;e[7]!==a?(n=t.jsx(q,{label:"Total occurrences",value:a}),e[7]=a,e[8]=n):n=e[8];let r;e[9]!==i.new_this_window?(r=P(i.new_this_window),e[9]=i.new_this_window,e[10]=r):r=e[10];let o;e[11]!==r?(o=t.jsx(q,{label:"New this window",value:r}),e[11]=r,e[12]=o):o=e[12];let c;e[13]!==l||e[14]!==n||e[15]!==o?(c=t.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l,n,o]}),e[13]=l,e[14]=n,e[15]=o,e[16]=c):c=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=[{key:"gem",label:"Gem"}],e[17]=x):x=e[17];let m;e[18]!==j||e[19]!==_||e[20]!==g?(m=h=>I.visit(R(j,_,{window:g,q:h||void 0}),{preserveState:!0}),e[18]=j,e[19]=_,e[20]=g,e[21]=m):m=e[21];let d;e[22]!==i.q||e[23]!==m?(d=t.jsx(H,{value:i.q,fields:x,onChange:m,placeholder:"gem:rails deprecated method"}),e[22]=i.q,e[23]=m,e[24]=d):d=e[24];let u;e[25]!==j||e[26]!==_||e[27]!==i.deprecations?(u=i.deprecations.length===0?t.jsx(G,{title:"No deprecations in this window."}):t.jsx("div",{className:"flex flex-col gap-3",children:i.deprecations.map(h=>t.jsx(U,{d:h,a:j,e:_},h.group_hash))}),e[25]=j,e[26]=_,e[27]=i.deprecations,e[28]=u):u=e[28];let p;return e[29]!==d||e[30]!==u||e[31]!==c?(p=t.jsxs(T,{title:"Deprecations",children:[w,c,d,u]}),e[29]=d,e[30]=u,e[31]=c,e[32]=p):p=e[32],p}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Ce,u as Je,j as l,B as je,t as Ee,C as Ae,d as fe,L as Me}from"./inertia-DfNRARuA.js";import{C as Te}from"./chart-hover-DdK4E-2h.js";import{V as Ie}from"./chart-panel-BPaYRXJB.js";import{C as Fe}from"./cursor-load-more-DSdhgpGl.js";import{D as xe}from"./data-table-CQ_YRWQs.js";import{S as He,E as ke,_ as ve}from"./app-layout-by7G3sa1.js";import{F as Ke}from"./filter-bar-CrzpQ_vD.js";import{O as we}from"./origin-identity-1R3bqa3R.js";import{P as Le,E as Be}from"./env-layout-CdMWbUkm.js";import{u as De,P as Re}from"./percentile-picker-73z5PAps.js";import{S as Qe}from"./sparkline-cell-B47ipscB.js";import{S as _e}from"./status-badge-CmbRKlY7.js";import{C as Se,a as qe,b as Ne,c as Oe}from"./card-C-PPSA0g.js";import{m as he,c as Pe,w as Ve,p as We}from"./format-B9SDkrWj.js";import"./series-chart-BaiDG795.js";import"./chart-Cov79YC5.js";import"./tenant-path-C4rNGauE.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function Jt(t){const e=Ce.c(114),{environment:ge,window:i,range:r}=Je().props,{percentile:c}=De(),s=ge.application_id,o=ge.id;let J;e[0]!==r?.from||e[1]!==r?.to||e[2]!==i?(J=i==="custom"?{from:r?.from,to:r?.to}:{window:i},e[0]=r?.from,e[1]=r?.to,e[2]=i,e[3]=J):J=e[3];const a=J;let E;e[4]!==r||e[5]!==a?(E=r?{from:r.from,to:r.to}:a,e[4]=r,e[5]=a,e[6]=E):E=e[6];const pe=E;let A;e[7]!==s||e[8]!==pe||e[9]!==o||e[10]!==t.pagination.limit||e[11]!==t.q?(A=n=>je(s,o,{...pe,q:t.q||void 0,cursor:n,limit:t.pagination.limit}),e[7]=s,e[8]=pe,e[9]=o,e[10]=t.pagination.limit,e[11]=t.q,e[12]=A):A=e[12];const be=A;let M;e[13]!==s||e[14]!==o?(M=n=>Ee(s,o,n.execution_id),e[13]=s,e[14]=o,e[15]=M):M=e[15];const C=M;let T;e[16]!==s||e[17]!==o||e[18]!==t.q||e[19]!==a?(T=n=>Ae(s,o,n.group_hash,{...a,q:t.q||void 0}),e[16]=s,e[17]=o,e[18]=t.q,e[19]=a,e[20]=T):T=e[20];const m=T;let I;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(Le,{title:"Jobs",description:"Active Job attempts by class and queue, with queue latency and failures.",actions:l.jsxs(l.Fragment,{children:[l.jsx(He,{page:"jobs"}),l.jsx(Re,{})]})}),e[21]=I):I=e[21];let u;e[22]!==t.deploys||e[23]!==t.series?(u=l.jsx(Ie,{legend:"job",label:"Job attempts",seriesLabel:"Attempts",data:t.series,deploys:t.deploys}),e[22]=t.deploys,e[23]=t.series,e[24]=u):u=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(Ne,{children:l.jsx(Oe,{children:"Queues"})}),e[25]=F):F=e[25];let H;e[26]===Symbol.for("react.memo_cache_sentinel")?(H=[{key:"q",header:"Queue",cell:mt},{key:"n",header:"Attempts",align:"right",cell:ct},{key:"lat",hideOnMobile:!0,header:"Avg wait",align:"right",cell:at},{key:"f",header:"Failed",align:"right",cell:it}],e[26]=H):H=e[26];let d;e[27]!==t.queues?(d=l.jsxs(Se,{className:"lg:col-span-1",children:[F,l.jsx(qe,{children:l.jsx(xe,{rows:t.queues,rowKey:ut,columns:H})})]}),e[27]=t.queues,e[28]=d):d=e[28];let K;e[29]===Symbol.for("react.memo_cache_sentinel")?(K=l.jsx(Ne,{children:l.jsx(Oe,{children:"Recent runs"})}),e[29]=K):K=e[29];let L,B,D,R,Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(L={key:"after",label:"After"},B={key:"before",label:"Before"},D={key:"user",label:"User"},R={key:"tenant",label:"Tenant"},Q={key:"deploy",label:"Deploy"},e[30]=L,e[31]=B,e[32]=D,e[33]=R,e[34]=Q):(L=e[30],B=e[31],D=e[32],R=e[33],Q=e[34]);let V,W,U,$;e[35]===Symbol.for("react.memo_cache_sentinel")?(V={key:"kind",label:"Execution kind",options:["job"]},W={key:"queue",label:"Queue"},U={key:"class",label:"Job class"},$={key:"job_id",label:"Job ID"},e[35]=V,e[36]=W,e[37]=U,e[38]=$):(V=e[35],W=e[36],U=e[37],$=e[38]);let z;e[39]===Symbol.for("react.memo_cache_sentinel")?(z=[L,B,D,R,Q,V,W,U,$,{key:"outcome",label:"Outcome",options:["processed","failed"]}],e[39]=z):z=e[39];let f;e[40]!==s||e[41]!==o||e[42]!==a?(f=n=>fe.visit(je(s,o,{...a,q:n||void 0}),{only:["recent","pagination","q"],preserveState:!0,reset:["recent"]}),e[40]=s,e[41]=o,e[42]=a,e[43]=f):f=e[43];let h;e[44]!==t.q||e[45]!==f?(h=l.jsx(Ke,{value:t.q,fields:z,onChange:f,placeholder:"queue:default outcome:failed"}),e[44]=t.q,e[45]=f,e[46]=h):h=e[46];let G;e[47]===Symbol.for("react.memo_cache_sentinel")?(G=l.jsx(ke,{icon:ve,title:"No job runs in this window",description:"Job classes appear here once Active Job executions are reported."}),e[47]=G):G=e[47];let p,b;e[48]!==C?(p=n=>fe.visit(C(n)),b={onOpen:(n,ye)=>ye?.newTab?globalThis.window.open(C(n),"_blank"):fe.visit(C(n))},e[48]=C,e[49]=p,e[50]=b):(p=e[49],b=e[50]);let X,Y,Z,ee;e[51]===Symbol.for("react.memo_cache_sentinel")?(X={key:"when",header:"When",cell:ot},Y={key:"name",header:"Job",grow:!0,cell:st},Z={key:"st",header:"Outcome",cell:nt},ee={key:"att",hideOnMobile:!0,header:"Attempt",align:"right",cell:lt},e[51]=X,e[52]=Y,e[53]=Z,e[54]=ee):(X=e[51],Y=e[52],Z=e[53],ee=e[54]);let y;e[55]!==s||e[56]!==o||e[57]!==r||e[58]!==i?(y={key:"user",className:"hidden 2xl:table-cell",header:"Origin user",cell:n=>l.jsx(we,{...n,applicationId:s,environmentId:o,kind:"user",range:r,window:i})},e[55]=s,e[56]=o,e[57]=r,e[58]=i,e[59]=y):y=e[59];let x;e[60]!==s||e[61]!==o||e[62]!==r||e[63]!==i?(x={key:"tenant",className:"hidden 2xl:table-cell",header:"Origin tenant",cell:n=>l.jsx(we,{...n,applicationId:s,environmentId:o,kind:"tenant",range:r,window:i})},e[60]=s,e[61]=o,e[62]=r,e[63]=i,e[64]=x):x=e[64];let te;e[65]===Symbol.for("react.memo_cache_sentinel")?(te={key:"ex",hideOnMobile:!0,header:"Exception",className:"max-w-48",cell:tt},e[65]=te):te=e[65];let _;e[66]!==y||e[67]!==x?(_=[X,Y,Z,ee,y,x,te],e[66]=y,e[67]=x,e[68]=_):_=e[68];let g;e[69]!==t.recent||e[70]!==p||e[71]!==b||e[72]!==_?(g=l.jsx(xe,{rows:t.recent,rowKey:rt,empty:G,onRowClick:p,keyboardNav:b,columns:_}),e[69]=t.recent,e[70]=p,e[71]=b,e[72]=_,e[73]=g):g=e[73];let le;e[74]===Symbol.for("react.memo_cache_sentinel")?(le=["recent","pagination"],e[74]=le):le=e[74];let j;e[75]!==t.pagination||e[76]!==be?(j=l.jsx(Fe,{meta:t.pagination,href:be,only:le}),e[75]=t.pagination,e[76]=be,e[77]=j):j=e[77];let k;e[78]!==h||e[79]!==g||e[80]!==j?(k=l.jsxs(Se,{className:"lg:col-span-2",children:[K,l.jsxs(qe,{className:"space-y-3",children:[h,g,j]})]}),e[78]=h,e[79]=g,e[80]=j,e[81]=k):k=e[81];let v;e[82]!==k||e[83]!==d?(v=l.jsxs("div",{className:"grid gap-4 lg:grid-cols-3",children:[d,k]}),e[82]=k,e[83]=d,e[84]=v):v=e[84];let ne;e[85]===Symbol.for("react.memo_cache_sentinel")?(ne=l.jsx(ke,{icon:ve,title:"No job attempts in this window",description:"Individual job executions appear here as they run."}),e[85]=ne):ne=e[85];let w;e[86]!==m?(w={onOpen:(n,ye)=>ye?.newTab?globalThis.window.open(m(n),"_blank"):fe.visit(m(n))},e[86]=m,e[87]=w):w=e[87];let S;e[88]!==m?(S={key:"name",header:"Job",grow:!0,cell:n=>l.jsx(Me,{className:"font-mono text-xs hover:underline",href:m(n),children:n.name})},e[88]=m,e[89]=S):S=e[89];let se,oe,re,ie,ae;e[90]===Symbol.for("react.memo_cache_sentinel")?(se={key:"trend",hideOnMobile:!0,header:"Trend",cell:Ye},oe={key:"n",header:"Attempts",align:"right",cell:Xe},re={key:"f",header:"Failed",align:"right",cell:Ge},ie={key:"fr",hideOnMobile:!0,header:"Failure %",align:"right",cell:ze},ae={key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:$e},e[90]=se,e[91]=oe,e[92]=re,e[93]=ie,e[94]=ae):(se=e[90],oe=e[91],re=e[92],ie=e[93],ae=e[94]);let q;e[95]!==c?(q=n=>l.jsx("span",{className:"font-semibold",children:he(n[c])}),e[95]=c,e[96]=q):q=e[96];let N;e[97]!==c||e[98]!==q?(N={key:c,header:c,align:"right",cell:q},e[97]=c,e[98]=q,e[99]=N):N=e[99];let ce;e[100]===Symbol.for("react.memo_cache_sentinel")?(ce={key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:Ue},e[100]=ce):ce=e[100];let O;e[101]!==S||e[102]!==N?(O=[S,se,oe,re,ie,ae,N,ce],e[101]=S,e[102]=N,e[103]=O):O=e[103];let P;e[104]!==t.classes||e[105]!==w||e[106]!==O?(P=l.jsx(xe,{rows:t.classes,rowKey:et,empty:ne,hoverKey:Ze,keyboardNav:w,columns:O}),e[104]=t.classes,e[105]=w,e[106]=O,e[107]=P):P=e[107];let me;e[108]===Symbol.for("react.memo_cache_sentinel")?(me=l.jsx(_e,{outcome:"processed"}),e[108]=me):me=e[108];let ue;e[109]===Symbol.for("react.memo_cache_sentinel")?(ue=l.jsxs("p",{className:"text-muted-foreground text-xs",children:[me," processed ·"," ",l.jsx(_e,{outcome:"failed"})," failed"]}),e[109]=ue):ue=e[109];let de;return e[110]!==v||e[111]!==P||e[112]!==u?(de=l.jsx(Be,{title:"Jobs",children:l.jsxs(Te,{children:[I,u,v,P,ue]})}),e[110]=v,e[111]=P,e[112]=u,e[113]=de):de=e[113],de}function Ue(t){return he(t.max)}function $e(t){return he(t.avg)}function ze(t){return We(t.errors,t.count)}function Ge(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:t.errors})}function Xe(t){return Pe(t.count)}function Ye(t){return l.jsx(Qe,{data:t.sparkline,hoverKey:t.group_hash})}function Ze(t){return t.group_hash}function et(t){return t.group_hash}function tt(t){return l.jsx("span",{className:"text-destructive block truncate text-xs",children:t.exception_preview})}function lt(t){return t.attempt}function nt(t){return l.jsx(_e,{outcome:t.outcome})}function st(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function ot(t){return l.jsx("span",{className:"text-xs",children:Ve(t.occurred_at)})}function rt(t){return t.execution_id}function it(t){return t.failed}function at(t){return he(t.avg_latency)}function ct(t){return Pe(t.count)}function mt(t){return l.jsx("span",{className:"font-mono text-xs",children:t.queue})}function ut(t){return t.queue??"-"}export{Jt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ae,j as t,o as ie,u as re,r as W,ab as le,ao as oe,F as G,d as O,ap as de,aq as J}from"./inertia-DfNRARuA.js";import{D as Q}from"./data-table-CQ_YRWQs.js";import{ar as i,a8 as h,b as F,E as X,au as Y}from"./app-layout-by7G3sa1.js";import{P as me,E as ce}from"./env-layout-CdMWbUkm.js";import{R as ue}from"./relative-time-Dsc_cCdX.js";import{b as Z,c as ee,C as te,a as se}from"./card-C-PPSA0g.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./format-B9SDkrWj.js";import"./segmented-DB4zh-Am.js";function S(s){const e=ae.c(8);let l,r,c;e[0]!==s?({messages:l,className:c,...r}=s,e[0]=s,e[1]=l,e[2]=r,e[3]=c):(l=e[1],r=e[2],c=e[3]);const d=c===void 0?"":c;let u;return e[4]!==d||e[5]!==l||e[6]!==r?(u=l?t.jsx("p",{...r,className:ie("text-sm text-red-600 dark:text-red-400",d),children:l.join(", ")}):null,e[4]=d,e[5]=l,e[6]=r,e[7]=u):u=e[7],u}function Ke(s){const e=ae.c(56),{environment:l}=re().props,[r,c]=W.useState(s.kinds[0]),[d,u]=W.useState(s.metrics[0]),[C,ne]=W.useState(s.anomaly_target_kinds[0]),[E,U]=W.useState(s.anomaly_metrics[0]),$=s.anomaly_metrics_for_kind[C]??s.anomaly_metrics,z=s.metrics_for_kind[r]??s.metrics,B=s.units[d]??"ms",H=B==="$"?"Limit (US$)":B==="%"?"Limit (%)":B===""?"Limit (count)":"Limit (ms)",a=l.application_id,n=l.id;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(me,{withWindow:!1,title:"Thresholds",description:"Performance rules. When a route, job, or query crosses one, Railwatch opens a performance issue and alerts the rules subscribed to thresholds."}),e[0]=A):A=e[0];let R;e[1]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Z,{children:t.jsx(ee,{children:"Add a threshold"})}),e[1]=R):R=e[1];let x;e[2]!==a||e[3]!==n?(x=le(a,n),e[2]=a,e[3]=n,e[4]=x):x=e[4];let g;e[5]!==z||e[6]!==r||e[7]!==H||e[8]!==d||e[9]!==s.jobs||e[10]!==s.kinds||e[11]!==s.llm_models||e[12]!==s.metrics||e[13]!==s.metrics_for_kind||e[14]!==s.routes?(g=o=>{const{errors:k,processing:I}=o;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"target_kind",children:"Kind"}),t.jsx("select",{id:"target_kind",name:"target_kind",value:r,onChange:m=>{c(m.target.value);const w=s.metrics_for_kind[m.target.value]??s.metrics;w.includes(d)||u(w[0])},className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:s.kinds.map(ke)})]}),t.jsxs("div",{className:"grid gap-1 md:col-span-2",children:[t.jsx(i,{htmlFor:"target",children:"Target"}),t.jsx(h,{id:"target",name:"target",defaultValue:"*",list:"targets",placeholder:"* for all, or a route / job name"}),t.jsxs("datalist",{id:"targets",children:[t.jsx("option",{value:"*"}),t.jsx("option",{value:"unmatched"}),s.routes.map(Ne),s.jobs.map(ve),s.llm_models.map(be)]}),t.jsx(S,{messages:k.target})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"metric",children:"Metric"}),t.jsx("select",{id:"metric",name:"metric",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",value:d,onChange:m=>u(m.target.value),children:z.map(ye)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"limit",children:H}),t.jsx(h,{id:"limit",name:"limit",type:"number",step:"any",defaultValue:2e3}),t.jsx(S,{messages:k.limit})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"window_minutes",children:"Window (min)"}),t.jsx(h,{id:"window_minutes",name:"window_minutes",type:"number",defaultValue:5})]}),t.jsx("div",{className:"md:col-span-6",children:t.jsx(F,{disabled:I,children:"Add threshold"})})]})},e[5]=z,e[6]=r,e[7]=H,e[8]=d,e[9]=s.jobs,e[10]=s.kinds,e[11]=s.llm_models,e[12]=s.metrics,e[13]=s.metrics_for_kind,e[14]=s.routes,e[15]=g):g=e[15];let j;e[16]!==x||e[17]!==g?(j=t.jsxs(te,{children:[R,t.jsx(se,{children:t.jsx(G,{method:"post",action:x,className:"grid gap-3 md:grid-cols-6",children:g})})]}),e[16]=x,e[17]=g,e[18]=j):j=e[18];let T,L;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(X,{icon:Y,title:"No thresholds yet",description:"Start with requests * p95 2000ms to get alerted on regressions."}),L={key:"d",header:"Rule",cell:fe},e[19]=T,e[20]=L):(T=e[19],L=e[20]);let p;e[21]!==a||e[22]!==n?(p=[L,{key:"x",header:"",align:"right",cell:o=>t.jsx(F,{size:"sm",variant:"ghost",onClick:()=>O.delete(de(a,n,o.id)),children:"Remove"})}],e[21]=a,e[22]=n,e[23]=p):p=e[23];let f;e[24]!==s.thresholds||e[25]!==p?(f=t.jsx(Q,{rows:s.thresholds,rowKey:_e,empty:T,columns:p}),e[24]=s.thresholds,e[25]=p,e[26]=f):f=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold",children:"Anomaly rules"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"A threshold needs a number you already know. An anomaly rule learns one: it compares the last few minutes against the same clock window on each of the previous days and opens an issue when today sits more than the given number of standard deviations above that baseline."})]}),e[27]=P):P=e[27];let K;e[28]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(Z,{children:t.jsx(ee,{children:"Add an anomaly rule"})}),e[28]=K):K=e[28];let _;e[29]!==a||e[30]!==n?(_=oe(a,n),e[29]=a,e[30]=n,e[31]=_):_=e[31];let y;e[32]!==$||e[33]!==C||e[34]!==E||e[35]!==s.anomaly_metrics||e[36]!==s.anomaly_metrics_for_kind||e[37]!==s.anomaly_target_kinds?(y=o=>{const{errors:k,processing:I}=o;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"anomaly_target_kind",children:"Kind"}),t.jsx("select",{id:"anomaly_target_kind",name:"target_kind",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",value:C,onChange:m=>{ne(m.target.value);const w=s.anomaly_metrics_for_kind[m.target.value]??s.anomaly_metrics;w.includes(E)||U(w[0])},children:s.anomaly_target_kinds.map(pe)})]}),t.jsxs("div",{className:"grid gap-1 md:col-span-2",children:[t.jsx(i,{htmlFor:"anomaly_target",children:"Target"}),t.jsx(h,{id:"anomaly_target",name:"target",defaultValue:"*",list:"targets",placeholder:"* for all, or a route / job name"}),t.jsx(S,{messages:k.target})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"anomaly_metric",children:"Metric"}),t.jsx("select",{id:"anomaly_metric",name:"metric",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",value:E,onChange:m=>U(m.target.value),children:$.map(je)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"deviation",children:"Deviation (σ)"}),t.jsx(h,{id:"deviation",name:"deviation",type:"number",step:"0.5",min:"0.5",defaultValue:3}),t.jsx(S,{messages:k.deviation})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"anomaly_window_minutes",children:"Window (min)"}),t.jsx(h,{id:"anomaly_window_minutes",name:"window_minutes",type:"number",defaultValue:15})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"baseline_days",children:"Baseline (days)"}),t.jsx(h,{id:"baseline_days",name:"baseline_days",type:"number",defaultValue:7}),t.jsx(S,{messages:k.baseline_days})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"enabled",children:"Status"}),t.jsxs("select",{id:"enabled",name:"enabled",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:[t.jsx("option",{value:"true",children:"enabled"}),t.jsx("option",{value:"false",children:"disabled"})]})]}),t.jsx("div",{className:"md:col-span-6",children:t.jsx(F,{disabled:I,children:"Add anomaly rule"})})]})},e[32]=$,e[33]=C,e[34]=E,e[35]=s.anomaly_metrics,e[36]=s.anomaly_metrics_for_kind,e[37]=s.anomaly_target_kinds,e[38]=y):y=e[38];let b;e[39]!==_||e[40]!==y?(b=t.jsxs(te,{children:[K,t.jsx(se,{children:t.jsx(G,{method:"post",action:_,className:"grid gap-3 md:grid-cols-6",children:y})})]}),e[39]=_,e[40]=y,e[41]=b):b=e[41];let V,M,q;e[42]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(X,{icon:Y,title:"No anomaly rules yet",description:"Start with requests * p95 at 3σ over a 7-day baseline."}),M={key:"d",header:"Rule",cell:xe},q={key:"f",header:"Last fired",hideOnMobile:!0,cell:he},e[42]=V,e[43]=M,e[44]=q):(V=e[42],M=e[43],q=e[44]);let v;e[45]!==a||e[46]!==n?(v=[M,q,{key:"x",header:"",align:"right",cell:o=>t.jsxs("span",{className:"flex justify-end gap-1",children:[t.jsx(F,{size:"sm",variant:"ghost",onClick:()=>O.patch(J(a,n,o.id),{enabled:!o.enabled}),children:o.enabled?"Disable":"Enable"}),t.jsx(F,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>O.delete(J(a,n,o.id)),children:"Remove"})]})}],e[45]=a,e[46]=n,e[47]=v):v=e[47];let N;e[48]!==s.anomaly_rules||e[49]!==v?(N=t.jsx(Q,{rows:s.anomaly_rules,rowKey:ge,empty:V,columns:v}),e[48]=s.anomaly_rules,e[49]=v,e[50]=N):N=e[50];let D;return e[51]!==b||e[52]!==N||e[53]!==j||e[54]!==f?(D=t.jsxs(ce,{title:"Thresholds",children:[A,j,f,P,b,N]}),e[51]=b,e[52]=N,e[53]=j,e[54]=f,e[55]=D):D=e[55],D}function he(s){return t.jsx(ue,{iso:s.last_fired_at,className:"text-muted-foreground font-mono text-xs"})}function xe(s){return t.jsxs("span",{className:"text-sm",children:[s.description,s.enabled?null:t.jsx("span",{className:"text-muted-foreground label-caps ml-2",children:"disabled"})]})}function ge(s){return s.id}function je(s){return t.jsx("option",{value:s,children:s},s)}function pe(s){return t.jsx("option",{value:s,children:s},s)}function fe(s){return t.jsx("span",{className:"text-sm",children:s.description})}function _e(s){return s.id}function ye(s){return t.jsx("option",{value:s,children:s},s)}function be(s){return t.jsx("option",{value:s},s)}function ve(s){return t.jsx("option",{value:s},s)}function Ne(s){return t.jsx("option",{value:s},s)}function ke(s){return t.jsx("option",{value:s,children:s},s)}export{Ke as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,j as s,o as R,T as Y}from"./inertia-DfNRARuA.js";import{C as S}from"./chart-panel-BPaYRXJB.js";import{D}from"./data-table-CQ_YRWQs.js";import{E as T,a5 as P}from"./app-layout-by7G3sa1.js";import{C as G,X as I,Y as W,a as X,b as J,c as V}from"./chart-Cov79YC5.js";import{A as Z,a as ee}from"./series-chart-BaiDG795.js";import{E as te,P as se}from"./env-layout-CdMWbUkm.js";import{a as re,S as k}from"./stat-DT2hhsqS.js";import{C as $,b as B,c as F,a as E}from"./card-C-PPSA0g.js";import{c as j,m as O,b as ae,a as z,w as H}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./arrow-up-DCZ7emux.js";const K={fontSize:10,fontFamily:"var(--font-mono)"},ne=1440*60*1e3;function le(t){return(t.length>1?new Date(t[t.length-1].t).getTime()-new Date(t[0].t).getTime():0)>2*ne?a=>new Date(a).toLocaleDateString(void 0,{month:"short",day:"numeric"}):a=>new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function A(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}function C(t){const e=L.c(28),{label:a,data:r,format:l,color:p,className:n}=t,i=p===void 0?"var(--primary)":p,b=n===void 0?"h-32":n;let c;e[0]!==i||e[1]!==a?(c={value:{label:a,color:i}},e[0]=i,e[1]=a,e[2]=c):c=e[2];const g=c;let m;e[3]!==r?(m=le(r),e[3]=r,e[4]=m):m=e[4];const o=m,d=`${b} w-full`;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(G,{vertical:!1,strokeDasharray:"2 4"}),e[5]=h):h=e[5];let u;e[6]!==o?(u=s.jsx(I,{dataKey:"t",tickFormatter:o,tickLine:!1,axisLine:!1,minTickGap:40,tick:K}),e[6]=o,e[7]=u):u=e[7];let f;e[8]!==l?(f=s.jsx(W,{width:44,tickLine:!1,axisLine:!1,tick:K,tickFormatter:q=>l(Number(q))}),e[8]=l,e[9]=f):f=e[9];let x;e[10]!==l||e[11]!==a?(x=s.jsx(X,{content:s.jsx(J,{labelFormatter:oe,formatter:q=>[l(Number(q)),a]})}),e[10]=l,e[11]=a,e[12]=x):x=e[12];let w;e[13]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Z,{dataKey:"value",stroke:"var(--color-value)",fill:"var(--color-value)",fillOpacity:.15,strokeWidth:1.75,isAnimationActive:!1}),e[13]=w):w=e[13];let v;e[14]!==r||e[15]!==u||e[16]!==f||e[17]!==x?(v=s.jsxs(ee,{data:r,children:[h,u,f,x,w]}),e[14]=r,e[15]=u,e[16]=f,e[17]=x,e[18]=v):v=e[18];let y;e[19]!==g||e[20]!==v||e[21]!==d?(y=s.jsx(V,{config:g,className:d,children:v}),e[19]=g,e[20]=v,e[21]=d,e[22]=y):y=e[22];let _;e[23]!==r?(_=r.length>0&&s.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[s.jsx("span",{children:A(r[0].t)}),s.jsx("span",{children:A(r[r.length-1].t)})]}),e[23]=r,e[24]=_):_=e[24];let N;return e[25]!==y||e[26]!==_?(N=s.jsxs("div",{children:[y,_]}),e[25]=y,e[26]=_,e[27]=N):N=e[27],N}function oe(t){return A(String(t))}function U(t){const e=L.c(21),{busy:a,max:r,className:l}=t;if(!r){let x;return e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=x):x=e[0],x}const p=Math.min(1,(a??0)/r);let n;e[1]!==l?(n=R("flex items-center gap-1.5",l),e[1]=l,e[2]=n):n=e[2];const i=a??0,b=p>=.9?"bg-danger":p>=.7?"bg-warning":"bg-live";let c;e[3]!==b?(c=R("absolute inset-y-0 left-0 rounded-full",b),e[3]=b,e[4]=c):c=e[4];const g=`${Math.max(4,p*100)}%`;let m;e[5]!==g?(m={width:g},e[5]=g,e[6]=m):m=e[6];let o;e[7]!==c||e[8]!==m?(o=s.jsx("span",{className:c,style:m}),e[7]=c,e[8]=m,e[9]=o):o=e[9];let d;e[10]!==r||e[11]!==i||e[12]!==o?(d=s.jsx("span",{role:"meter","aria-label":"Utilisation","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":r,className:"bg-muted-foreground/25 relative h-1.5 w-10 shrink-0 overflow-hidden rounded-full",children:o}),e[10]=r,e[11]=i,e[12]=o,e[13]=d):d=e[13];const h=a??0;let u;e[14]!==r||e[15]!==h?(u=s.jsxs("span",{className:"font-mono tabular-nums",children:[h,"/",r]}),e[14]=r,e[15]=h,e[16]=u):u=e[16];let f;return e[17]!==n||e[18]!==u||e[19]!==d?(f=s.jsxs("span",{className:n,children:[d,u]}),e[17]=n,e[18]=u,e[19]=d,e[20]=f):f=e[20],f}const M=t=>`${t.toFixed(0)}%`;function ie(t){return t.reduce((e,a)=>e+(a??0),0)}function Q(t){return t.reduce((e,a)=>Math.max(e,a??0),0)}function et(t){const e=L.c(27);let a;if(e[0]!==t.samples){const h=t.samples.flatMap(Fe);a=h.length?h.reduce(Be,0)/h.length:0,e[0]=t.samples,e[1]=a}else a=e[1];const r=a;let l,p,n,i,b;if(e[2]!==t.queues||e[3]!==t.samples||e[4]!==t.series||e[5]!==t.silent_servers||e[6]!==r){const h=ie(t.samples.map($e)),u=Q(t.samples.map(Pe)),f=Q(t.samples.map(Re)),x=t.samples.length>0||t.series.length>0;l=te,p="Processes",e[12]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(se,{title:"Processes",description:"What every web and worker process is doing right now: thread pools, socket backlog, queue depth, and the boots behind them."}),e[12]=n):n=e[12],e[13]!==t.silent_servers?(i=t.silent_servers.length>0&&s.jsxs($,{className:"border-warning/40",children:[s.jsx(B,{children:s.jsxs(F,{className:"flex items-center gap-2",children:[s.jsx(Y,{className:"text-warning size-4"}),t.silent_servers.length===1?"1 expected host is silent":`${t.silent_servers.length} expected hosts are silent`]})}),s.jsxs(E,{className:"space-y-2",children:[s.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.silent_servers.map(Le)}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"No health sample or execution from these hosts in the last 10 minutes. Expected hosts come from your Kamal post-deploy hook, or from the environment settings if you set them by hand."})]})]}),e[13]=t.silent_servers,e[14]=i):i=e[14],b=x?s.jsxs(s.Fragment,{children:[s.jsxs(re,{children:[s.jsx(k,{label:"Live processes",value:t.samples.length}),s.jsx(k,{label:"Thread utilisation",value:M(r),tone:r>=90?"destructive":r>=70?"warning":void 0,hint:"averaged across live processes"}),s.jsx(k,{label:"Backlog",value:j(h)}),s.jsx(k,{label:"Queue depth",value:j(u)}),s.jsx(k,{label:"Oldest job",value:O(f)})]}),s.jsx(D,{rows:t.samples,rowKey:Ae,empty:s.jsx(T,{title:"No process reported in the last 10 minutes",description:"Health samples are older than the live window."}),columns:[{key:"server",header:"Server",cell:Oe},{key:"role",header:"Role",cell:Me},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:Te},{key:"threads",header:"Threads",cell:De},{key:"pool",hideOnMobile:!0,header:"DB pool",cell:qe},{key:"mem",hideOnMobile:!0,header:"Memory",align:"right",cell:Ce},{key:"seen",header:"Last sample",align:"right",cell:Se}]}),t.queues.length>0&&s.jsxs($,{children:[s.jsx(B,{children:s.jsx(F,{children:"Queue depth"})}),s.jsx(E,{children:s.jsx(D,{rows:t.queues,rowKey:Ne,columns:[{key:"q",header:"Queue",cell:we},{key:"d",header:"Ready jobs",align:"right",cell:ke}]})})]}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(S,{label:"Thread utilisation",value:M(r),children:s.jsx(C,{label:"Utilisation",format:M,data:t.series.map(_e)})}),s.jsx(S,{label:"Backlog",value:j(h),children:s.jsx(C,{label:"Backlog",color:"var(--warning)",format:j,data:t.series.map(ye)})}),s.jsx(S,{label:"Queue depth",value:j(u),children:s.jsx(C,{label:"Ready jobs",format:j,data:t.series.map(ve)})}),s.jsx(S,{label:"Oldest job",value:O(f),children:s.jsx(C,{label:"Oldest job",color:"var(--danger)",format:je,data:t.series.map(ge)})})]})]}):s.jsx(T,{icon:P,title:"No health samples yet",description:"The gem reports thread pool, backlog and queue health every 15s from each web and worker process."}),e[2]=t.queues,e[3]=t.samples,e[4]=t.series,e[5]=t.silent_servers,e[6]=r,e[7]=l,e[8]=p,e[9]=n,e[10]=i,e[11]=b}else l=e[7],p=e[8],n=e[9],i=e[10],b=e[11];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h2",{className:"text-sm font-semibold",children:"Process boots"}),e[15]=c):c=e[15];let g,m;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(T,{icon:P,title:"No process has booted with Railwatch yet",description:"Server processes report here once they boot with the gem installed."}),m=[{key:"b",header:"Booted",cell:xe},{key:"s",header:"Server",cell:pe},{key:"r",header:"Role",cell:fe},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:he},{key:"d",header:"Deploy",cell:de},{key:"v",hideOnMobile:!0,header:"Ruby / Rails / Railwatch",cell:ue},{key:"ad",hideOnMobile:!0,header:"DB / queue / cache",cell:me},{key:"boot",hideOnMobile:!0,header:"Boot",align:"right",cell:ce}],e[16]=g,e[17]=m):(g=e[16],m=e[17]);let o;e[18]!==t.processes?(o=s.jsx(D,{rows:t.processes,rowKey:be,empty:g,columns:m}),e[18]=t.processes,e[19]=o):o=e[19];let d;return e[20]!==l||e[21]!==p||e[22]!==n||e[23]!==i||e[24]!==b||e[25]!==o?(d=s.jsxs(l,{title:p,children:[n,i,b,c,o]}),e[20]=l,e[21]=p,e[22]=n,e[23]=i,e[24]=b,e[25]=o,e[26]=d):d=e[26],d}function ce(t){return t.boot_seconds?`${t.boot_seconds.toFixed(1)}s`:"–"}function me(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.detail.database_adapter," / ",t.detail.queue_adapter," /"," ",t.detail.cache_store?.replace("ActiveSupport::Cache::","")]})}function ue(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.ruby_version," / ",t.rails_version," / ",t.railwatch_version]})}function de(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,12)})}function he(t){return t.pid}function fe(t){return t.role}function pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function xe(t){return s.jsx("span",{className:"text-xs",title:H(t.booted_at),children:z(t.booted_at)})}function be(t){return t.id}function ge(t){return{t:t.t,value:t.queue_latency}}function je(t){return O(t)}function ve(t){return{t:t.t,value:t.queue_depth}}function ye(t){return{t:t.t,value:t.backlog}}function _e(t){return{t:t.t,value:t.utilisation}}function ke(t){return j(t.depth)}function we(t){return t.queue}function Ne(t){return t.queue}function Se(t){return s.jsx("span",{title:H(t.sampled_at),children:z(t.sampled_at)})}function Ce(t){return ae(t.memory)}function qe(t){return s.jsx(U,{busy:t.pool_busy,max:t.pool_size})}function De(t){return s.jsx(U,{busy:t.threads_busy,max:t.threads_max})}function Te(t){return t.pid}function Me(t){return t.role}function Oe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function Ae(t){return t.id}function Le(t){return s.jsx("span",{className:"border-warning/40 bg-warning/10 text-warning rounded-sm border px-1.5 font-mono text-[11px]",children:t},t)}function Re(t){return t.queue_latency}function Pe(t){return t.queue_depth}function $e(t){return t.backlog}function Be(t,e){return t+e}function Fe(t){return t.threads_max?[(t.threads_busy??0)/t.threads_max*100]:[]}export{et as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M,u as R,j as n,f as A,d as D,L}from"./inertia-DfNRARuA.js";import{D as N}from"./data-table-CQ_YRWQs.js";import{E as O,as as E}from"./app-layout-by7G3sa1.js";import{P,E as H}from"./env-layout-CdMWbUkm.js";import{c as K,m as j,w as $}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function re(t){const e=M.c(25),{environment:S}=R().props,w=S.application_id,b=S.id;let c;e[0]!==w||e[1]!==b?(c=r=>r.execution_id?A(w,b,r.execution_id):null,e[0]=w,e[1]=b,e[2]=c):c=e[2];const o=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(P,{title:"Storage",description:"Active Storage service operations: uploads, downloads, deletes, URL generation, analysis, and transforms."}),e[3]=m):m=e[3];let u,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),d=[{key:"s",header:"Service",cell:G},{key:"o",header:"Operation",cell:F},{key:"n",header:"Count",align:"right",cell:B},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:z},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:W}],e[4]=u,e[5]=d):(u=e[4],d=e[5]);let i;e[6]!==t.ops?(i=n.jsx(N,{rows:t.ops,rowKey:J,empty:u,columns:d}),e[6]=t.ops,e[7]=i):i=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=p):p=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),e[9]=f):f=e[9];let s;e[10]!==o?(s={onOpen:(r,v)=>{const k=o(r);k&&(v?.newTab?window.open(k,"_blank"):D.visit(k))}},e[10]=o,e[11]=s):s=e[11];let h,x,y,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(y={key:"when",header:"When",cell:I},_={key:"o",header:"Op",cell:C},h={key:"k",hideOnMobile:!0,header:"Key",cell:q},x={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=x,e[14]=y,e[15]=_):(h=e[12],x=e[13],y=e[14],_=e[15]);let a;e[16]!==o?(a=[y,_,h,x,{key:"in",hideOnMobile:!0,header:"In",cell:r=>{const v=o(r);return v?n.jsx(L,{className:"font-mono text-xs hover:underline",href:v,children:r.execution_preview}):null}}],e[16]=o,e[17]=a):a=e[17];let l;e[18]!==t.recent||e[19]!==a||e[20]!==s?(l=n.jsx(N,{rows:t.recent,rowKey:U,empty:f,keyboardNav:s,columns:a}),e[18]=t.recent,e[19]=a,e[20]=s,e[21]=l):l=e[21];let g;return e[22]!==l||e[23]!==i?(g=n.jsxs(H,{title:"Storage",children:[m,i,p,l]}),e[22]=l,e[23]=i,e[24]=g):g=e[24],g}function T(t){return j(t.duration)}function q(t){return n.jsx("span",{className:"font-mono text-xs",children:t.key})}function C(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.service," ",t.op]})}function I(t){return n.jsx("span",{className:"text-xs",children:$(t.occurred_at)})}function U(t){return t.id}function W(t){return j(t.max)}function z(t){return j(t.avg)}function B(t){return K(t.count)}function F(t){return n.jsx("span",{className:"font-mono text-xs",children:t.op})}function G(t){return t.service}function J(t){return`${t.service}-${t.op}`}export{re as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as ee,u as oe,j as s,d as ie,E as te,L as ae,f as re,r as ce,o as me}from"./inertia-DfNRARuA.js";import{C as fe}from"./cursor-load-more-DSdhgpGl.js";import{D as de}from"./data-table-CQ_YRWQs.js";import{S as he,E as ue,a0 as ge}from"./app-layout-by7G3sa1.js";import{p as Z,F as xe,s as se}from"./filter-bar-CrzpQ_vD.js";import{P as pe,E as be}from"./env-layout-CdMWbUkm.js";import{a as le,S as ve}from"./segmented-DB4zh-Am.js";import{L as ye}from"./status-badge-CmbRKlY7.js";import{c as ne,w as je}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";const ke="",_e=160;function we(t){const e=ee.c(18),{message:a,highlight:i,tags:n}=t,[o,m]=ce.useState(!1);let d,c;e[0]!==a||e[1]!==o?(d=a.length>_e||a.includes(`
|
|
2
|
-
`),c=me("font-mono text-xs break-all whitespace-pre-wrap",d&&!o&&"line-clamp-3"),e[0]=a,e[1]=o,e[2]=d,e[3]=c):(d=e[2],c=e[3]);let f;e[4]!==i||e[5]!==a?(f=i?s.jsx(Se,{text:i}):a,e[4]=i,e[5]=a,e[6]=f):f=e[6];let h;e[7]!==n?(h=n.length>0&&s.jsxs("span",{className:"text-muted-foreground",children:[" [",n.join(", "),"]"]}),e[7]=n,e[8]=h):h=e[8];let u;e[9]!==c||e[10]!==f||e[11]!==h?(u=s.jsxs("span",{className:c,children:[f,h]}),e[9]=c,e[10]=f,e[11]=h,e[12]=u):u=e[12];const r=u;if(!d)return r;let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=()=>m(qe),e[13]=g):g=e[13];const p=o?"Collapse":"Expand";let x;return e[14]!==r||e[15]!==o||e[16]!==p?(x=s.jsx("button",{type:"button",onClick:g,"aria-expanded":o,className:"block w-full cursor-pointer text-left",title:p,children:r}),e[14]=r,e[15]=o,e[16]=p,e[17]=x):x=e[17],x}function qe(t){return!t}function Se(t){const e=ee.c(4),{text:a}=t;let i;e[0]!==a?(i=a.split(ke).map(Le),e[0]=a,e[1]=i):i=e[1];let n;return e[2]!==i?(n=s.jsx(s.Fragment,{children:i}),e[2]=i,e[3]=n):n=e[3],n}function Le(t,e){return e%2===1?s.jsx("mark",{className:"fts-mark",children:t},e):s.jsx("span",{children:t},e)}function Ke(t){const e=ee.c(81),{environment:a,window:i,range:n}=oe().props,o=a.application_id,m=a.id;let d;e[0]!==n?.from||e[1]!==n?.to||e[2]!==i?(d=i==="custom"?{from:n?.from,to:n?.to}:{window:i},e[0]=n?.from,e[1]=n?.to,e[2]=i,e[3]=d):d=e[3];const c=d;let f;e[4]!==n||e[5]!==c?(f=n?{from:n.from,to:n.to}:c,e[4]=n,e[5]=c,e[6]=f):f=e[6];const h=f;let u;e[7]!==o||e[8]!==m||e[9]!==c?(u=l=>ie.visit(te(o,m,{...c,q:l||void 0}),{only:["logs","pagination","highlights","counts","q"],preserveState:!0,preserveScroll:!0,reset:["logs","highlights"]}),e[7]=o,e[8]=m,e[9]=c,e[10]=u):u=e[10];const r=u;let g;e[11]!==o||e[12]!==h||e[13]!==m||e[14]!==t.pagination.limit||e[15]!==t.q?(g=l=>te(o,m,{...h,q:t.q||void 0,cursor:l,limit:t.pagination.limit}),e[11]=o,e[12]=h,e[13]=m,e[14]=t.pagination.limit,e[15]=t.q,e[16]=g):g=e[16];const p=g;let x;e[17]!==t.q?(x=Z(t.q),e[17]=t.q,e[18]=x):x=e[18];const R=x.fields.level;let T;e[19]!==t.q||e[20]!==r?(T=l=>{const F=Z(t.q),Y={...F.fields};l?Y.level=l:delete Y.level,r(se({text:F.text,fields:Y}))},e[19]=t.q,e[20]=r,e[21]=T):T=e[21];const b=T;let A;e[22]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(pe,{title:"Logs",description:"Rails.logger lines and Rails.event structured events, linked to the request or job that wrote them.",actions:s.jsx(he,{page:"logs"})}),e[22]=A):A=e[22];const Q=!R;let v;e[23]!==b?(v=()=>b(void 0),e[23]=b,e[24]=v):v=e[24];let y;e[25]!==Q||e[26]!==v?(y=s.jsx(le,{active:Q,onClick:v,children:"All"}),e[25]=Q,e[26]=v,e[27]=y):y=e[27];let B;e[28]===Symbol.for("react.memo_cache_sentinel")?(B=["debug","info","warn","error","fatal","event"],e[28]=B):B=e[28];let j;e[29]!==R||e[30]!==t.counts||e[31]!==b?(j=B.map(l=>s.jsxs(le,{active:R===l,onClick:()=>b(l),className:"gap-1.5",children:[l,s.jsx("span",{className:"opacity-60",children:ne(t.counts[l]??0)})]},l)),e[29]=R,e[30]=t.counts,e[31]=b,e[32]=j):j=e[32];let k;e[33]!==j||e[34]!==y?(k=s.jsx("div",{className:"-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden",children:s.jsxs(ve,{className:"w-max",children:[y,j]})}),e[33]=j,e[34]=y,e[35]=k):k=e[35];let D,O,$,I;e[36]===Symbol.for("react.memo_cache_sentinel")?(D={key:"after",label:"After"},O={key:"before",label:"Before"},$={key:"user",label:"User"},I={key:"deploy",label:"Deploy"},e[36]=D,e[37]=O,e[38]=$,e[39]=I):(D=e[36],O=e[37],$=e[38],I=e[39]);let K;e[40]===Symbol.for("react.memo_cache_sentinel")?(K={key:"level",label:"Level",options:["debug","info","warn","error","fatal","event","unknown"]},e[40]=K):K=e[40];let z;e[41]===Symbol.for("react.memo_cache_sentinel")?(z=[D,O,$,I,K,{key:"kind",label:"Execution kind",options:["request","job","scheduled_task","command"]},{key:"source",label:"Source"},{key:"tenant",label:"Tenant"}],e[41]=z):z=e[41];let _;e[42]!==t.q||e[43]!==r?(_=s.jsx(xe,{value:t.q,fields:z,onChange:r,placeholder:"level:error kind:job source:app/jobs/sync_job.rb:12"}),e[42]=t.q,e[43]=r,e[44]=_):_=e[44];let w;e[45]!==t.logs.length?(w=ne(t.logs.length),e[45]=t.logs.length,e[46]=w):w=e[46];const X=t.logs.length===1?"line":"lines";let q;e[47]!==w||e[48]!==X?(q=s.jsxs("span",{className:"font-mono tabular-nums",children:[w," ",X]}),e[47]=w,e[48]=X,e[49]=q):q=e[49];let H;e[50]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx("span",{children:"Full-text search: quotes for phrases, -word to exclude, prefixes match"}),e[50]=H):H=e[50];let S;e[51]!==q?(S=s.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs",children:[q,H]}),e[51]=q,e[52]=S):S=e[52];let U,V,W;e[53]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ue,{icon:ge,title:"No log lines match",signal:"caution",description:"Log lines are captured from your app's Rails logger."}),V={key:"when",header:"When",className:"w-40",cell:Ee},W={key:"lvl",header:"Level",cell:Ne},e[53]=U,e[54]=V,e[55]=W):(U=e[53],V=e[54],W=e[55]);let L;e[56]!==t.highlights?(L={key:"msg",header:"Message",grow:!0,className:"whitespace-normal",cell:l=>s.jsx(we,{message:l.message,highlight:t.highlights[l.id],tags:l.tags})},e[56]=t.highlights,e[57]=L):L=e[57];let N;e[58]!==o||e[59]!==m?(N={key:"in",hideOnMobile:!0,header:"In",cell:l=>l.execution_id?s.jsx(ae,{className:"font-mono text-xs hover:underline",href:re(o,m,l.execution_id),children:l.execution_preview}):null},e[58]=o,e[59]=m,e[60]=N):N=e[60];let E;e[61]!==t.q||e[62]!==r?(E={key:"t",hideOnMobile:!0,header:"Tenant",cell:l=>l.tenant?s.jsx("button",{className:"font-mono text-xs hover:underline",onClick:()=>{const F=Z(t.q);r(se({text:F.text,fields:{...F.fields,tenant:l.tenant}}))},children:l.tenant}):null},e[61]=t.q,e[62]=r,e[63]=E):E=e[63];let C;e[64]!==L||e[65]!==N||e[66]!==E?(C=[V,W,L,N,E],e[64]=L,e[65]=N,e[66]=E,e[67]=C):C=e[67];let P;e[68]!==t.logs||e[69]!==C?(P=s.jsx(de,{rows:t.logs,rowKey:Ce,empty:U,columns:C}),e[68]=t.logs,e[69]=C,e[70]=P):P=e[70];let G;e[71]===Symbol.for("react.memo_cache_sentinel")?(G=["logs","pagination","highlights"],e[71]=G):G=e[71];let M;e[72]!==p||e[73]!==t.pagination?(M=s.jsx(fe,{meta:t.pagination,href:p,only:G}),e[72]=p,e[73]=t.pagination,e[74]=M):M=e[74];let J;return e[75]!==k||e[76]!==_||e[77]!==S||e[78]!==P||e[79]!==M?(J=s.jsxs(be,{title:"Logs",children:[A,k,_,S,P,M]}),e[75]=k,e[76]=_,e[77]=S,e[78]=P,e[79]=M,e[80]=J):J=e[80],J}function Ne(t){return s.jsx(ye,{level:t.level})}function Ee(t){return s.jsx("span",{className:"text-xs tabular-nums",children:je(t.occurred_at)})}function Ce(t){return t.id}export{Ke as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,u as V,j as s,d as X,a3 as Y,L as Z}from"./inertia-DfNRARuA.js";import{D as ee}from"./chart-panel-BPaYRXJB.js";import{D as Q}from"./data-table-CQ_YRWQs.js";import{P as te,E as ne}from"./env-layout-CdMWbUkm.js";import{u as se,P as oe}from"./percentile-picker-73z5PAps.js";import{S as L}from"./sort-header-BcG8ulEH.js";import{S as re}from"./sparkline-cell-B47ipscB.js";import{B as ie}from"./app-layout-by7G3sa1.js";import{e as ce}from"./execution-path-7MYt-Qbn.js";import{m as G,c as J,w as ae}from"./format-B9SDkrWj.js";import"./series-chart-BaiDG795.js";import"./chart-hover-DdK4E-2h.js";import"./chart-Cov79YC5.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";import"./arrow-up-DCZ7emux.js";function le(t){const e=U.c(3),{outcome:c}=t,a=c==="rollback"?"destructive":c==="restart"?"secondary":c==="commit"?"outline":"secondary",n=c||"open";let r;return e[0]!==n||e[1]!==a?(r=s.jsx(ie,{variant:a,className:"font-mono",children:n}),e[0]=n,e[1]=a,e[2]=r):r=e[2],r}function Ae(t){const e=U.c(70),{environment:c,window:a}=V().props,{percentile:n}=se(),r=c.application_id,l=c.id;let N;e[0]!==r||e[1]!==l||e[2]!==t.dir||e[3]!==t.sort||e[4]!==a?(N=i=>X.visit(Y(r,l,{window:a,sort:i,dir:t.sort===i&&t.dir==="desc"?"asc":"desc"}),{preserveState:!0}),e[0]=r,e[1]=l,e[2]=t.dir,e[3]=t.sort,e[4]=a,e[5]=N):N=e[5];const o=N;let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(te,{title:"Transactions",description:"ActiveRecord transactions, grouped by connection and outcome.",actions:s.jsx(oe,{})}),e[6]=P):P=e[6];let m;e[7]!==t.series||e[8]!==n?(m=s.jsx(ee,{label:"Duration",data:t.series,percentile:n}),e[7]=t.series,e[8]=n,e[9]=m):m=e[9];let C,O;e[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"name",header:"Connection · outcome",cell:be},O={key:"trend",hideOnMobile:!0,header:"Trend",cell:ge},e[10]=C,e[11]=O):(C=e[10],O=e[11]);const A=t.sort==="count",H=t.dir==="asc"?"asc":"desc";let u;e[12]!==o?(u=()=>o("count"),e[12]=o,e[13]=u):u=e[13];let d;e[14]!==A||e[15]!==H||e[16]!==u?(d={key:"n",header:s.jsx(L,{label:"Count",active:A,dir:H,onClick:u}),align:"right",cell:ye},e[14]=A,e[15]=H,e[16]=u,e[17]=d):d=e[17];const K=t.sort==="errors",$=t.dir==="asc"?"asc":"desc";let f;e[18]!==o?(f=()=>o("errors"),e[18]=o,e[19]=f):f=e[19];let h;e[20]!==$||e[21]!==f||e[22]!==K?(h={key:"errors",hideOnMobile:!0,header:s.jsx(L,{label:"Rollbacks",active:K,dir:$,onClick:f}),align:"right",cell:_e},e[20]=$,e[21]=f,e[22]=K,e[23]=h):h=e[23];const W=t.sort==="avg",q=t.dir==="asc"?"asc":"desc";let x;e[24]!==o?(x=()=>o("avg"),e[24]=o,e[25]=x):x=e[25];let p;e[26]!==W||e[27]!==q||e[28]!==x?(p={key:"avg",hideOnMobile:!0,header:s.jsx(L,{label:"Avg",active:W,dir:q,onClick:x}),align:"right",cell:pe},e[26]=W,e[27]=q,e[28]=x,e[29]=p):p=e[29];const z=t.sort===n,F=t.dir==="asc"?"asc":"desc";let _;e[30]!==n||e[31]!==o?(_=()=>o(n),e[30]=n,e[31]=o,e[32]=_):_=e[32];let y;e[33]!==n||e[34]!==z||e[35]!==F||e[36]!==_?(y=s.jsx(L,{label:n,active:z,dir:F,onClick:_}),e[33]=n,e[34]=z,e[35]=F,e[36]=_,e[37]=y):y=e[37];let g;e[38]!==n?(g=i=>s.jsx("span",{className:"font-semibold",children:G(i[n],2)}),e[38]=n,e[39]=g):g=e[39];let b;e[40]!==n||e[41]!==y||e[42]!==g?(b={key:n,header:y,align:"right",cell:g},e[40]=n,e[41]=y,e[42]=g,e[43]=b):b=e[43];let j;e[44]!==h||e[45]!==p||e[46]!==b||e[47]!==d?(j=[C,O,d,h,p,b],e[44]=h,e[45]=p,e[46]=b,e[47]=d,e[48]=j):j=e[48];let k;e[49]!==t.transactions||e[50]!==j?(k=s.jsx(Q,{rows:t.transactions,rowKey:je,empty:"No transactions in this window.",columns:j}),e[49]=t.transactions,e[50]=j,e[51]=k):k=e[51];let D;e[52]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("h2",{className:"text-sm font-semibold",children:"Recent transactions"}),e[52]=D):D=e[52];let M,T,E,R;e[53]===Symbol.for("react.memo_cache_sentinel")?(M={key:"when",header:"When",className:"w-40",cell:he},T={key:"conn",hideOnMobile:!0,header:"Connection",cell:fe},E={key:"outcome",header:"Outcome",cell:de},R={key:"statements",hideOnMobile:!0,header:"Statements",align:"right",cell:ue},e[53]=M,e[54]=T,e[55]=E,e[56]=R):(M=e[53],T=e[54],E=e[55],R=e[56]);let v;e[57]!==r||e[58]!==l?(v={key:"in",hideOnMobile:!0,header:"In",cell:i=>i.execution_id?s.jsx(Z,{className:"font-mono text-xs hover:underline",href:ce({applicationId:r,environmentId:l,source:i.execution_source,executionId:i.execution_id}),children:i.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[57]=r,e[58]=l,e[59]=v):v=e[59];let B;e[60]===Symbol.for("react.memo_cache_sentinel")?(B={key:"d",header:"Duration",align:"right",cell:me},e[60]=B):B=e[60];let w;e[61]!==v?(w=[M,T,E,R,v,B],e[61]=v,e[62]=w):w=e[62];let S;e[63]!==t.recent||e[64]!==w?(S=s.jsx(Q,{rows:t.recent,rowKey:xe,columns:w}),e[63]=t.recent,e[64]=w,e[65]=S):S=e[65];let I;return e[66]!==m||e[67]!==k||e[68]!==S?(I=s.jsxs(ne,{title:"Transactions",children:[P,m,k,D,S]}),e[66]=m,e[67]=k,e[68]=S,e[69]=I):I=e[69],I}function me(t){return G(t.duration,2)}function ue(t){return t.statement_count===null?"—":J(t.statement_count)}function de(t){return s.jsx(le,{outcome:t.outcome})}function fe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.connection??""})}function he(t){return s.jsx("span",{className:"text-xs tabular-nums",children:ae(t.occurred_at)})}function xe(t){return t.id}function pe(t){return G(t.avg,2)}function _e(t){return J(t.errors)}function ye(t){return J(t.count)}function ge(t){return s.jsx(re,{data:t.sparkline})}function be(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function je(t){return t.group_hash}export{Ae as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x,u as _,j as o,k as b,d as u}from"./inertia-DfNRARuA.js";import{D as k}from"./data-table-CQ_YRWQs.js";import{E as w,R as j}from"./app-layout-by7G3sa1.js";import{E as v,P as N}from"./env-layout-CdMWbUkm.js";import{w as R,c as D}from"./format-B9SDkrWj.js";import"./chart-hover-DdK4E-2h.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";function A(t){const e=x.c(13),{environment:h}=_().props,d=h.application_id,f=h.id;let i;e[0]!==d||e[1]!==f?(i=l=>b(d,f,l.id),e[0]=d,e[1]=f,e[2]=i):i=e[2];const s=i;let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(N,{withWindow:!1,title:"Deploys",description:"Recorded by bin/rails railwatch:deploy or the Kamal post-deploy hook. Click one to compare the hour before and after."}),e[3]=a):a=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(w,{icon:j,title:"No deploys recorded",description:"Run bin/rails railwatch:deploy or install the Kamal hook to track deploys."}),e[4]=c):c=e[4];let n,r;e[5]!==s?(n=l=>u.visit(s(l)),r={onOpen:(l,y)=>y?.newTab?window.open(s(l),"_blank"):u.visit(s(l))},e[5]=s,e[6]=n,e[7]=r):(n=e[6],r=e[7]);let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=[{key:"when",header:"When",cell:C},{key:"d",header:"Deploy",cell:P},{key:"r",hideOnMobile:!0,header:"Ref",cell:M},{key:"n",hideOnMobile:!0,header:"Name",cell:g},{key:"by",hideOnMobile:!0,header:"By",cell:S},{key:"c",hideOnMobile:!0,header:"Commits",align:"right",cell:O},{key:"s",header:"Server",cell:E}],e[8]=m):m=e[8];let p;return e[9]!==t.deploys||e[10]!==n||e[11]!==r?(p=o.jsxs(v,{title:"Deploys",children:[a,o.jsx(k,{rows:t.deploys,rowKey:K,empty:c,onRowClick:n,keyboardNav:r,columns:m})]}),e[9]=t.deploys,e[10]=n,e[11]=r,e[12]=p):p=e[12],p}function E(t){return o.jsx("span",{className:"font-mono text-xs",children:t.server})}function O(t){return D(t.commits_count)}function S(t){return o.jsx("span",{className:"text-xs",children:t.performer})}function g(t){return t.name}function M(t){return o.jsx("span",{className:"font-mono text-xs",children:t.ref})}function P(t){return o.jsx("span",{className:"font-mono text-xs",children:t.deploy})}function C(t){return o.jsx("span",{className:"text-xs",children:R(t.deployed_at)})}function K(t){return t.id}export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,u as S,r as F,j as s,L as z,i as A,a as R,b as B,d as w,e as L}from"./inertia-DfNRARuA.js";import{E as J,C as O,a as D,B as H,b as k}from"./app-layout-by7G3sa1.js";import{p as I,F as T,s as V}from"./filter-bar-CrzpQ_vD.js";import{J as W}from"./json-viewer-DMsF5glp.js";import{P as $,E as G}from"./env-layout-CdMWbUkm.js";import{R as K}from"./relative-time-Dsc_cCdX.js";import"./use-clipboard-oTNeP4ax.js";import"./use-live-CLZZj245.js";import"./format-B9SDkrWj.js";import"./segmented-DB4zh-Am.js";function ae(i){const e=C.c(30),{environment:m}=S().props,[y,E]=F.useState(null);let f;e[0]!==m?(f=t=>{const u=m?R(m.application_id,m.id,{q:t||void 0}):B({q:t||void 0});w.visit(u,{preserveState:!0,preserveScroll:!0})},e[0]=m,e[1]=f):f=e[1];const l=f,P=Q;let x;e[2]!==i.q?(x=I(i.q),e[2]=i.q,e[3]=x):x=e[3];const r=x,p=r.fields.status==="failed";let h;e[4]!==p||e[5]!==r.fields||e[6]!==r.text||e[7]!==l?(h=()=>{const t={...r.fields};p?delete t.status:t.status="failed",l(V({text:r.text,fields:t}))},e[4]=p,e[5]=r.fields,e[6]=r.text,e[7]=l,e[8]=h):h=e[8];const _=h;let v,j;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=[{title:"Alerts",href:"#"}],j=s.jsx($,{withWindow:!1,title:"Alerts",description:"Fired alerts across your integrations, newest first."}),e[9]=v,e[10]=j):(v=e[9],j=e[10]);let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"event",label:"Event",options:["new_issue","regressed_issue","threshold","quota"]},e[11]=g):g=e[11];let a;e[12]!==i.statuses?(a=[g,{key:"status",label:"Status",options:i.statuses}],e[12]=i.statuses,e[13]=a):a=e[13];let n;e[14]!==i.q||e[15]!==a||e[16]!==l?(n=s.jsx(T,{value:i.q,fields:a,onChange:l,placeholder:"event:new_issue status:failed"}),e[14]=i.q,e[15]=a,e[16]=l,e[17]=n):n=e[17];const b=p?"default":"outline";let o;e[18]!==b||e[19]!==_?(o=s.jsx(k,{size:"sm",variant:b,className:"h-8",onClick:_,children:"Failed only"}),e[18]=b,e[19]=_,e[20]=o):o=e[20];let d;e[21]!==n||e[22]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n,o]}),e[21]=n,e[22]=o,e[23]=d):d=e[23];let c;e[24]!==y||e[25]!==i.alerts?(c=i.alerts.length===0?s.jsx(J,{title:"No alerts have fired."}):s.jsx("div",{className:"divide-y rounded-md border",children:i.alerts.map(t=>{const u=y===t.id;return s.jsxs("div",{className:"p-3",children:[s.jsxs("button",{type:"button",className:"flex w-full flex-wrap items-center gap-3 text-left text-sm",onClick:()=>E(u?null:t.id),children:[u?s.jsx(O,{className:"text-muted-foreground size-4 shrink-0"}):s.jsx(D,{className:"text-muted-foreground size-4 shrink-0"}),s.jsx("span",{className:"font-mono text-xs",children:t.event}),s.jsxs("span",{className:"text-muted-foreground text-xs",children:[t.integration.name," (",t.integration.kind,")"]}),t.issue&&s.jsxs(z,{href:A(t.issue.id),onClick:M,className:"text-xs hover:underline",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.issue.key})," ",s.jsx("span",{className:"text-muted-foreground",children:t.issue.title})]}),s.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[s.jsx(H,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",title:t.error??void 0,children:t.status}),s.jsx(K,{iso:t.sent_at??t.created_at,className:"text-muted-foreground text-xs"}),t.status==="failed"&&s.jsx(k,{size:"sm",variant:"outline",onClick:q=>{q.stopPropagation(),P(t.id)},children:"Retry"})]})]}),u&&s.jsxs("div",{className:"mt-3 space-y-2 pl-7",children:[t.error&&s.jsx("p",{className:"text-destructive text-xs",children:t.error}),s.jsx(W,{data:t.payload})]})]},t.id)})}),e[24]=y,e[25]=i.alerts,e[26]=c):c=e[26];let N;return e[27]!==d||e[28]!==c?(N=s.jsxs(G,{title:"Alerts",crumbs:v,children:[j,d,c]}),e[27]=d,e[28]=c,e[29]=N):N=e[29],N}function M(i){return i.stopPropagation()}function Q(i){return w.post(L(i),{},{preserveScroll:!0})}export{ae as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as ae,c as $,u as he,j as l,f as fe,d as le,D as pe,L as xe,o as ge,r as re}from"./inertia-DfNRARuA.js";import{V as se,D as ne}from"./chart-panel-BPaYRXJB.js";import{D as ee}from"./data-table-CQ_YRWQs.js";import{E as ie,$ as ce,C as _e,a as ke}from"./app-layout-by7G3sa1.js";import{F as je}from"./filter-bar-CrzpQ_vD.js";import{P as ye,E as be}from"./env-layout-CdMWbUkm.js";import{S as de}from"./sparkline-cell-B47ipscB.js";import{S as Ne}from"./status-badge-CmbRKlY7.js";import{c as f,u as ue,p as te,m as F,w as we}from"./format-B9SDkrWj.js";import"./series-chart-BaiDG795.js";import"./chart-hover-DdK4E-2h.js";import"./chart-Cov79YC5.js";import"./use-live-CLZZj245.js";import"./segmented-DB4zh-Am.js";const ve=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Me=ae("paperclip",ve);const Se=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],Oe=ae("scissors",Se),oe=l.jsx(ie,{icon:ce,title:"No model calls in this window",description:"Chats, embeddings, and other model calls your app makes through RubyLLM appear here, with the request or job that made them."}),Ce=l.jsx(ie,{icon:ce,title:"No tool calls in this window",description:"Tools your models invoke appear here, timed separately from the calls that asked for them."});function Le(t){const e=$.c(7),{reason:s}=t;if(!s||s==="stop"||s==="tool_calls")return null;const a=s==="max_tokens"||s==="content_filter"?"text-destructive":"text-muted-foreground";let n;e[0]!==a?(n=ge("ml-2 inline-flex items-center gap-1 text-xs",a),e[0]=a,e[1]=n):n=e[1];const r=s==="max_tokens"?"The answer was cut off at the output token limit":`Model stopped: ${s}`;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(Oe,{className:"size-3"}),e[2]=i):i=e[2];let c;return e[3]!==s||e[4]!==n||e[5]!==r?(c=l.jsxs("span",{className:n,title:r,children:[i,s]}),e[3]=s,e[4]=n,e[5]=r,e[6]=c):c=e[6],c}function Te(t){const e=$.c(4),{call:s}=t;if(!s.attachments)return null;const o=s.attachment_names??`${s.attachments} file(s): ${s.attachment_types}`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(Me,{className:"size-3"}),e[0]=a):a=e[0];const n=s.attachment_types??s.attachments;let r;return e[1]!==o||e[2]!==n?(r=l.jsxs("span",{className:"text-muted-foreground ml-2 inline-flex items-center gap-1 text-xs",title:o,children:[a,n]}),e[1]=o,e[2]=n,e[3]=r):r=e[3],r}function $e(t){const e=$.c(19),{call:s}=t,[o,a]=re.useState(!1),{prompt:n,completion:r,params:i,provider_request_id:c,tools:p}=s;if(!(n!==null||r!==null||c!==null||p!==null||i!==null&&Object.keys(i).length>0)){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=g):g=e[0],g}const _=o?_e:ke;let d;e[1]!==o?(d=()=>a(!o),e[1]=o,e[2]=d):d=e[2];let u;e[3]!==_?(u=l.jsx(_,{className:"size-3"}),e[3]=_,e[4]=u):u=e[4];let m;e[5]!==o||e[6]!==d||e[7]!==u?(m=l.jsxs("button",{type:"button",onClick:d,"aria-expanded":o,className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[u,"Detail"]}),e[5]=o,e[6]=d,e[7]=u,e[8]=m):m=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==i||e[12]!==n||e[13]!==c||e[14]!==p?(h=o&&l.jsxs("div",{className:"w-[70vw] max-w-[36rem] space-y-2 text-left",children:[l.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-[10px]",children:[c&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:"provider id"}),l.jsx("dd",{className:"break-all",children:c})]}),p&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:"tools"}),l.jsx("dd",{className:"break-all",children:p})]}),i&&Object.entries(i).map(Fe)]}),[["Prompt",n],["Completion",r]].map(De)]}),e[9]=r,e[10]=o,e[11]=i,e[12]=n,e[13]=c,e[14]=p,e[15]=h):h=e[15];let x;return e[16]!==m||e[17]!==h?(x=l.jsxs("div",{className:"flex flex-col items-end gap-1",children:[m,h]}),e[16]=m,e[17]=h,e[18]=x):x=e[18],x}function De(t){const[e,s]=t;return s?l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground text-[10px] tracking-wide uppercase",children:e}),l.jsx("pre",{className:"bg-muted max-h-64 overflow-auto rounded p-2 font-mono text-[10px] break-all whitespace-pre-wrap",children:s})]},e):null}function Fe(t){const[e,s]=t;return l.jsxs(re.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:e}),l.jsx("dd",{className:"break-all",children:typeof s=="string"||typeof s=="number"?s:JSON.stringify(s)})]},e)}function me(t){const e=$.c(9),{cost:s,unpriced:o}=t;if(s===null){let i;return e[0]!==o?(i=o>0?l.jsx("span",{className:"text-muted-foreground",title:"No registry pricing",children:"unpriced"}):l.jsx("span",{className:"text-muted-foreground",title:"Nothing here has a price",children:"–"}),e[0]=o,e[1]=i):i=e[1],i}let a;e[2]!==s?(a=ue(s),e[2]=s,e[3]=a):a=e[3];let n;e[4]!==o?(n=o>0&&l.jsxs("span",{className:"text-muted-foreground ml-1 text-xs font-normal",title:`${o} call${o===1?"":"s"} had no registry pricing and are not in this total`,children:["+",f(o)," unpriced"]}),e[4]=o,e[5]=n):n=e[5];let r;return e[6]!==a||e[7]!==n?(r=l.jsxs("span",{className:"font-semibold",children:[a,n]}),e[6]=a,e[7]=n,e[8]=r):r=e[8],r}function D(t){const e=$.c(7),{label:s,children:o}=t;let a;e[0]!==s?(a=l.jsx("div",{className:"text-muted-foreground text-xs",children:s}),e[0]=s,e[1]=a):a=e[1];let n;e[2]!==o?(n=l.jsx("div",{className:"truncate text-lg",children:o}),e[2]=o,e[3]=n):n=e[3];let r;return e[4]!==a||e[5]!==n?(r=l.jsxs("div",{className:"min-w-0",children:[a,n]}),e[4]=a,e[5]=n,e[6]=r):r=e[6],r}function wt(t){const e=$.c(79),{environment:s,window:o}=he().props,a=s.application_id,n=s.id;let r;e[0]!==a||e[1]!==n?(r=k=>k.execution_id?fe(a,n,k.execution_id):null,e[0]=a,e[1]=n,e[2]=r):r=e[2];const i=r;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(ye,{title:"LLM",description:"Model calls and tool invocations through RubyLLM, by model and by the request or job that made them."}),e[3]=c):c=e[3];let p;e[4]!==t.totals.count?(p=f(t.totals.count),e[4]=t.totals.count,e[5]=p):p=e[5];let j;e[6]!==p?(j=l.jsx(D,{label:"Model calls",children:p}),e[6]=p,e[7]=j):j=e[7];let _;e[8]!==t.totals.tool_count?(_=f(t.totals.tool_count),e[8]=t.totals.tool_count,e[9]=_):_=e[9];let d;e[10]!==_?(d=l.jsx(D,{label:"Tool calls",children:_}),e[10]=_,e[11]=d):d=e[11];let u;e[12]!==t.totals.cost||e[13]!==t.totals.unpriced?(u=l.jsx(D,{label:"Spend",children:l.jsx(me,{cost:t.totals.cost,unpriced:t.totals.unpriced})}),e[12]=t.totals.cost,e[13]=t.totals.unpriced,e[14]=u):u=e[14];let m;e[15]!==t.totals.input_tokens?(m=f(t.totals.input_tokens),e[15]=t.totals.input_tokens,e[16]=m):m=e[16];let h;e[17]!==m?(h=l.jsx(D,{label:"Tokens in",children:m}),e[17]=m,e[18]=h):h=e[18];let x;e[19]!==t.totals.output_tokens?(x=f(t.totals.output_tokens),e[19]=t.totals.output_tokens,e[20]=x):x=e[20];let g;e[21]!==x?(g=l.jsx(D,{label:"Tokens out",children:x}),e[21]=x,e[22]=g):g=e[22];let y;e[23]!==g||e[24]!==j||e[25]!==d||e[26]!==u||e[27]!==h?(y=l.jsxs("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-5",children:[j,d,u,h,g]}),e[23]=g,e[24]=j,e[25]=d,e[26]=u,e[27]=h,e[28]=y):y=e[28];let b;e[29]!==t.series?(b=l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(se,{legend:"outcome",label:"Model calls",seriesLabel:"Calls",data:t.series}),l.jsx(ne,{label:"Model latency",data:t.series,percentile:"p95"})]}),e[29]=t.series,e[30]=b):b=e[30];let N;e[31]!==t.tool_series||e[32]!==t.totals.tool_count?(N=t.totals.tool_count>0&&l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(se,{legend:"outcome",label:"Tool calls",seriesLabel:"Calls",data:t.tool_series}),l.jsx(ne,{label:"Tool latency",data:t.tool_series,percentile:"p95"})]}),e[31]=t.tool_series,e[32]=t.totals.tool_count,e[33]=N):N=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{key:"m",header:"Model",cell:it},{key:"trend",hideOnMobile:!0,header:"Trend",cell:rt},{key:"n",header:"Calls",align:"right",cell:at},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:ot},{key:"cut",hideOnMobile:!0,header:"Cut off",align:"right",cell:nt},{key:"att",hideOnMobile:!0,header:"With files",align:"right",cell:st},{key:"in",hideOnMobile:!0,header:"Tokens in",align:"right",cell:lt},{key:"out",hideOnMobile:!0,header:"Tokens out",align:"right",cell:tt},{key:"cached",hideOnMobile:!0,header:"Cached",align:"right",cell:et},{key:"p95",hideOnMobile:!0,header:"p95",align:"right",cell:Ze},{key:"cost",header:"Spend",align:"right",cell:Ye}],e[34]=E):E=e[34];let w;e[35]!==t.models?(w=l.jsx(ee,{rows:t.models,rowKey:ct,empty:oe,columns:E}),e[35]=t.models,e[36]=w):w=e[36];let v;e[37]!==t.tools?(v=t.tools.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-sm font-semibold",children:"Tools"}),l.jsx(ee,{rows:t.tools,rowKey:Xe,empty:Ce,columns:[{key:"t",header:"Tool",cell:Ue},{key:"trend",hideOnMobile:!0,header:"Trend",cell:Qe},{key:"n",header:"Calls",align:"right",cell:Ge},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:Je},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:He},{key:"p95",header:"p95",align:"right",cell:Ve},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:Ie}]})]}),e[37]=t.tools,e[38]=v):v=e[38];let P;e[39]===Symbol.for("react.memo_cache_sentinel")?(P=l.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[39]=P):P=e[39];let q,R;e[40]===Symbol.for("react.memo_cache_sentinel")?(q={key:"model",label:"Model"},R={key:"provider",label:"Provider"},e[40]=q,e[41]=R):(q=e[40],R=e[41]);let W,z;e[42]===Symbol.for("react.memo_cache_sentinel")?(W={key:"operation",label:"Operation",options:["chat","tool","embedding","image","speech","transcription","moderation","rerank","ocr"]},z={key:"workflow",label:"Workflow"},e[42]=W,e[43]=z):(W=e[42],z=e[43]);let A;e[44]===Symbol.for("react.memo_cache_sentinel")?(A={key:"finish",label:"Finish",options:["stop","max_tokens","tool_calls","content_filter"]},e[44]=A):A=e[44];let K;e[45]===Symbol.for("react.memo_cache_sentinel")?(K=[q,R,W,z,A,{key:"attachments",label:"Files",options:["any","image","pdf","audio","video"]}],e[45]=K):K=e[45];let M;e[46]!==a||e[47]!==n||e[48]!==o?(M=k=>le.visit(pe(a,n,{window:o,q:k||void 0}),{preserveState:!0}),e[46]=a,e[47]=n,e[48]=o,e[49]=M):M=e[49];let S;e[50]!==t.q||e[51]!==M?(S=l.jsx(je,{value:t.q,fields:K,onChange:M,placeholder:"model:claude-opus-5 operation:chat"}),e[50]=t.q,e[51]=M,e[52]=S):S=e[52];let O;e[53]!==i?(O={onOpen:(k,Y)=>{const Z=i(k);Z&&(Y?.newTab?globalThis.window.open(Z,"_blank"):le.visit(Z))}},e[53]=i,e[54]=O):O=e[54];let B,I,V,H,J,G,Q;e[55]===Symbol.for("react.memo_cache_sentinel")?(B={key:"when",header:"When",cell:Ke},I={key:"st",header:"Status",cell:Ae},V={key:"what",header:"Call",grow:!0,cell:ze},H={key:"wf",hideOnMobile:!0,header:"Workflow",cell:We},J={key:"tok",hideOnMobile:!0,header:"Tokens",align:"right",cell:Re},G={key:"d",header:"Duration",align:"right",cell:qe},Q={key:"cost",header:"Cost",align:"right",cell:Pe},e[55]=B,e[56]=I,e[57]=V,e[58]=H,e[59]=J,e[60]=G,e[61]=Q):(B=e[55],I=e[56],V=e[57],H=e[58],J=e[59],G=e[60],Q=e[61]);let C;e[62]!==i?(C={key:"in",hideOnMobile:!0,header:"In",cell:k=>{const Y=i(k);return Y?l.jsx(xe,{className:"font-mono text-xs hover:underline",href:Y,children:k.execution_preview}):null}},e[62]=i,e[63]=C):C=e[63];let U;e[64]===Symbol.for("react.memo_cache_sentinel")?(U={key:"content",header:"Detail",align:"right",cell:Ee},e[64]=U):U=e[64];let L;e[65]!==C?(L=[B,I,V,H,J,G,Q,C,U],e[65]=C,e[66]=L):L=e[66];let T;e[67]!==t.recent||e[68]!==O||e[69]!==L?(T=l.jsx(ee,{rows:t.recent,rowKey:Be,empty:oe,keyboardNav:O,columns:L}),e[67]=t.recent,e[68]=O,e[69]=L,e[70]=T):T=e[70];let X;return e[71]!==y||e[72]!==b||e[73]!==N||e[74]!==w||e[75]!==v||e[76]!==S||e[77]!==T?(X=l.jsxs(be,{title:"LLM",children:[c,y,b,N,w,v,P,S,T]}),e[71]=y,e[72]=b,e[73]=N,e[74]=w,e[75]=v,e[76]=S,e[77]=T,e[78]=X):X=e[78],X}function Ee(t){return l.jsx($e,{call:t})}function Pe(t){return t.cost===null&&t.operation!=="tool"&&t.status!=="failed"?l.jsx("span",{className:"text-muted-foreground",title:"No registry pricing",children:"unpriced"}):ue(t.cost)}function qe(t){return F(t.duration)}function Re(t){return t.input_tokens===null&&t.output_tokens===null?l.jsx("span",{className:"text-muted-foreground",children:"–"}):l.jsxs("span",{className:"font-mono text-xs",children:[f(t.input_tokens??0)," / ",f(t.output_tokens??0)]})}function We(t){return t.workflow_name?l.jsxs("span",{className:"text-xs",children:[t.workflow_name,t.workflow_step_name&&l.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.workflow_step_name]})]}):null}function ze(t){return l.jsxs("span",{className:"font-mono text-xs",children:[t.operation==="tool"?t.tool_name:l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-muted-foreground",children:[t.provider,"/"]}),l.jsx("span",{className:"font-semibold",children:t.model})]}),t.error&&l.jsx("span",{className:"text-destructive ml-2",children:t.error}),l.jsx(Le,{reason:t.finish_reason}),l.jsx(Te,{call:t})]})}function Ae(t){return l.jsx(Ne,{status:null,label:t.status==="failed"?"error":t.operation,outcome:t.status==="failed"?"failed":void 0})}function Ke(t){return l.jsx("span",{className:"text-xs",children:we(t.occurred_at)})}function Be(t){return t.id}function Ie(t){return F(t.max)}function Ve(t){return l.jsx("span",{className:"font-semibold",children:F(t.p95)})}function He(t){return F(t.avg)}function Je(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:te(t.errors,t.count)})}function Ge(t){return f(t.count)}function Qe(t){return l.jsx(de,{data:t.sparkline})}function Ue(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function Xe(t){return t.group_hash}function Ye(t){return l.jsx(me,{cost:t.cost,unpriced:t.unpriced})}function Ze(t){return F(t.p95)}function et(t){return f(t.cache_read_tokens)}function tt(t){return f(t.output_tokens)}function lt(t){return f(t.input_tokens)}function st(t){return t.with_attachments?f(t.with_attachments):l.jsx("span",{className:"text-muted-foreground",children:"–"})}function nt(t){return t.truncated?l.jsx("span",{className:"text-destructive",title:"Answers stopped at the output token limit",children:te(t.truncated,t.count)}):l.jsx("span",{className:"text-muted-foreground",children:"–"})}function ot(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:te(t.errors,t.count)})}function at(t){return f(t.count)}function rt(t){return l.jsx(de,{data:t.sparkline})}function it(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function ct(t){return t.group_hash}export{wt as default};
|