nuxt-observe 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -0
- package/dist/module.d.mts +7 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +393 -0
- package/dist/runtime/app/assets/css/main.css +1 -0
- package/dist/runtime/app/components/ObserveActivityFeed.d.vue.ts +13 -0
- package/dist/runtime/app/components/ObserveActivityFeed.vue +77 -0
- package/dist/runtime/app/components/ObserveActivityFeed.vue.d.ts +13 -0
- package/dist/runtime/app/components/ObserveActivityTable.d.vue.ts +30 -0
- package/dist/runtime/app/components/ObserveActivityTable.vue +187 -0
- package/dist/runtime/app/components/ObserveActivityTable.vue.d.ts +30 -0
- package/dist/runtime/app/components/ObserveCan.d.vue.ts +27 -0
- package/dist/runtime/app/components/ObserveCan.vue +16 -0
- package/dist/runtime/app/components/ObserveCan.vue.d.ts +27 -0
- package/dist/runtime/app/components/ObserveErrorsTable.d.vue.ts +19 -0
- package/dist/runtime/app/components/ObserveErrorsTable.vue +105 -0
- package/dist/runtime/app/components/ObserveErrorsTable.vue.d.ts +19 -0
- package/dist/runtime/app/components/ObserveHealthHero.d.vue.ts +16 -0
- package/dist/runtime/app/components/ObserveHealthHero.vue +114 -0
- package/dist/runtime/app/components/ObserveHealthHero.vue.d.ts +16 -0
- package/dist/runtime/app/components/ObserveJourneySearch.d.vue.ts +13 -0
- package/dist/runtime/app/components/ObserveJourneySearch.vue +55 -0
- package/dist/runtime/app/components/ObserveJourneySearch.vue.d.ts +13 -0
- package/dist/runtime/app/components/ObserveJourneyTimeline.d.vue.ts +14 -0
- package/dist/runtime/app/components/ObserveJourneyTimeline.vue +119 -0
- package/dist/runtime/app/components/ObserveJourneyTimeline.vue.d.ts +14 -0
- package/dist/runtime/app/components/ObserveLogDetail.d.vue.ts +12 -0
- package/dist/runtime/app/components/ObserveLogDetail.vue +187 -0
- package/dist/runtime/app/components/ObserveLogDetail.vue.d.ts +12 -0
- package/dist/runtime/app/components/ObserveLogLevelBadge.d.vue.ts +10 -0
- package/dist/runtime/app/components/ObserveLogLevelBadge.vue +29 -0
- package/dist/runtime/app/components/ObserveLogLevelBadge.vue.d.ts +10 -0
- package/dist/runtime/app/components/ObserveLogsFilterBar.d.vue.ts +20 -0
- package/dist/runtime/app/components/ObserveLogsFilterBar.vue +134 -0
- package/dist/runtime/app/components/ObserveLogsFilterBar.vue.d.ts +20 -0
- package/dist/runtime/app/components/ObserveLogsTable.d.vue.ts +20 -0
- package/dist/runtime/app/components/ObserveLogsTable.vue +92 -0
- package/dist/runtime/app/components/ObserveLogsTable.vue.d.ts +20 -0
- package/dist/runtime/app/components/ObservePeriodSelector.d.vue.ts +3 -0
- package/dist/runtime/app/components/ObservePeriodSelector.vue +22 -0
- package/dist/runtime/app/components/ObservePeriodSelector.vue.d.ts +3 -0
- package/dist/runtime/app/components/ObserveRegressionAlert.d.vue.ts +12 -0
- package/dist/runtime/app/components/ObserveRegressionAlert.vue +27 -0
- package/dist/runtime/app/components/ObserveRegressionAlert.vue.d.ts +12 -0
- package/dist/runtime/app/components/ObserveServiceSwitcher.d.vue.ts +3 -0
- package/dist/runtime/app/components/ObserveServiceSwitcher.vue +49 -0
- package/dist/runtime/app/components/ObserveServiceSwitcher.vue.d.ts +3 -0
- package/dist/runtime/app/components/ObserveServicesTable.d.vue.ts +15 -0
- package/dist/runtime/app/components/ObserveServicesTable.vue +109 -0
- package/dist/runtime/app/components/ObserveServicesTable.vue.d.ts +15 -0
- package/dist/runtime/app/components/ObserveStatCard.d.vue.ts +14 -0
- package/dist/runtime/app/components/ObserveStatCard.vue +34 -0
- package/dist/runtime/app/components/ObserveStatCard.vue.d.ts +14 -0
- package/dist/runtime/app/components/charts/ObserveErrorRateChart.client.d.vue.ts +15 -0
- package/dist/runtime/app/components/charts/ObserveErrorRateChart.client.vue +170 -0
- package/dist/runtime/app/components/charts/ObserveErrorRateChart.client.vue.d.ts +15 -0
- package/dist/runtime/app/components/charts/ObserveServiceBreakdownChart.client.d.vue.ts +17 -0
- package/dist/runtime/app/components/charts/ObserveServiceBreakdownChart.client.vue +208 -0
- package/dist/runtime/app/components/charts/ObserveServiceBreakdownChart.client.vue.d.ts +17 -0
- package/dist/runtime/app/components/charts/ObserveVersionAdoptionChart.client.d.vue.ts +14 -0
- package/dist/runtime/app/components/charts/ObserveVersionAdoptionChart.client.vue +208 -0
- package/dist/runtime/app/components/charts/ObserveVersionAdoptionChart.client.vue.d.ts +14 -0
- package/dist/runtime/app/components/charts/ObserveVersionCompareChart.client.d.vue.ts +14 -0
- package/dist/runtime/app/components/charts/ObserveVersionCompareChart.client.vue +190 -0
- package/dist/runtime/app/components/charts/ObserveVersionCompareChart.client.vue.d.ts +14 -0
- package/dist/runtime/app/components/charts/ObserveVolumeChart.client.d.vue.ts +16 -0
- package/dist/runtime/app/components/charts/ObserveVolumeChart.client.vue +199 -0
- package/dist/runtime/app/components/charts/ObserveVolumeChart.client.vue.d.ts +16 -0
- package/dist/runtime/app/components/charts/chart-core.d.ts +64 -0
- package/dist/runtime/app/components/charts/chart-core.js +136 -0
- package/dist/runtime/app/components/settings/ObserveApiKeyPanel.d.vue.ts +8 -0
- package/dist/runtime/app/components/settings/ObserveApiKeyPanel.vue +145 -0
- package/dist/runtime/app/components/settings/ObserveApiKeyPanel.vue.d.ts +8 -0
- package/dist/runtime/app/components/settings/ObserveApiKeyRevealModal.d.vue.ts +19 -0
- package/dist/runtime/app/components/settings/ObserveApiKeyRevealModal.vue +106 -0
- package/dist/runtime/app/components/settings/ObserveApiKeyRevealModal.vue.d.ts +19 -0
- package/dist/runtime/app/components/settings/ObserveAssignmentEditor.d.vue.ts +12 -0
- package/dist/runtime/app/components/settings/ObserveAssignmentEditor.vue +67 -0
- package/dist/runtime/app/components/settings/ObserveAssignmentEditor.vue.d.ts +12 -0
- package/dist/runtime/app/components/settings/ObserveGroupFormModal.d.vue.ts +18 -0
- package/dist/runtime/app/components/settings/ObserveGroupFormModal.vue +60 -0
- package/dist/runtime/app/components/settings/ObserveGroupFormModal.vue.d.ts +18 -0
- package/dist/runtime/app/components/settings/ObserveGroupMembershipEditor.d.vue.ts +20 -0
- package/dist/runtime/app/components/settings/ObserveGroupMembershipEditor.vue +21 -0
- package/dist/runtime/app/components/settings/ObserveGroupMembershipEditor.vue.d.ts +20 -0
- package/dist/runtime/app/components/settings/ObserveOriginAllowlistEditor.d.vue.ts +15 -0
- package/dist/runtime/app/components/settings/ObserveOriginAllowlistEditor.vue +63 -0
- package/dist/runtime/app/components/settings/ObserveOriginAllowlistEditor.vue.d.ts +15 -0
- package/dist/runtime/app/components/settings/ObserveServiceEditForm.d.vue.ts +38 -0
- package/dist/runtime/app/components/settings/ObserveServiceEditForm.vue +216 -0
- package/dist/runtime/app/components/settings/ObserveServiceEditForm.vue.d.ts +38 -0
- package/dist/runtime/app/components/settings/ObserveServiceFormModal.d.vue.ts +37 -0
- package/dist/runtime/app/components/settings/ObserveServiceFormModal.vue +192 -0
- package/dist/runtime/app/components/settings/ObserveServiceFormModal.vue.d.ts +37 -0
- package/dist/runtime/app/components/settings/ObserveServiceTypeBadge.d.vue.ts +11 -0
- package/dist/runtime/app/components/settings/ObserveServiceTypeBadge.vue +18 -0
- package/dist/runtime/app/components/settings/ObserveServiceTypeBadge.vue.d.ts +11 -0
- package/dist/runtime/app/components/settings/ObserveSettingsServicesTable.d.vue.ts +19 -0
- package/dist/runtime/app/components/settings/ObserveSettingsServicesTable.vue +132 -0
- package/dist/runtime/app/components/settings/ObserveSettingsServicesTable.vue.d.ts +19 -0
- package/dist/runtime/app/components/settings/ObserveUserFormModal.d.vue.ts +27 -0
- package/dist/runtime/app/components/settings/ObserveUserFormModal.vue +108 -0
- package/dist/runtime/app/components/settings/ObserveUserFormModal.vue.d.ts +27 -0
- package/dist/runtime/app/components/settings/ObserveVersionTrackingField.d.vue.ts +17 -0
- package/dist/runtime/app/components/settings/ObserveVersionTrackingField.vue +20 -0
- package/dist/runtime/app/components/settings/ObserveVersionTrackingField.vue.d.ts +17 -0
- package/dist/runtime/app/composables/useObserveAbility.d.ts +15 -0
- package/dist/runtime/app/composables/useObserveAbility.js +20 -0
- package/dist/runtime/app/composables/useObserveActivity.d.ts +22 -0
- package/dist/runtime/app/composables/useObserveActivity.js +44 -0
- package/dist/runtime/app/composables/useObserveApiKeys.d.ts +15 -0
- package/dist/runtime/app/composables/useObserveApiKeys.js +19 -0
- package/dist/runtime/app/composables/useObserveAssignments.d.ts +19 -0
- package/dist/runtime/app/composables/useObserveAssignments.js +16 -0
- package/dist/runtime/app/composables/useObserveErrors.d.ts +33 -0
- package/dist/runtime/app/composables/useObserveErrors.js +85 -0
- package/dist/runtime/app/composables/useObserveGroups.d.ts +27 -0
- package/dist/runtime/app/composables/useObserveGroups.js +33 -0
- package/dist/runtime/app/composables/useObserveJourney.d.ts +19 -0
- package/dist/runtime/app/composables/useObserveJourney.js +19 -0
- package/dist/runtime/app/composables/useObserveLogFacets.d.ts +11 -0
- package/dist/runtime/app/composables/useObserveLogFacets.js +21 -0
- package/dist/runtime/app/composables/useObserveLogs.d.ts +28 -0
- package/dist/runtime/app/composables/useObserveLogs.js +100 -0
- package/dist/runtime/app/composables/useObserveMigrations.d.ts +17 -0
- package/dist/runtime/app/composables/useObserveMigrations.js +49 -0
- package/dist/runtime/app/composables/useObserveOverview.d.ts +14 -0
- package/dist/runtime/app/composables/useObserveOverview.js +23 -0
- package/dist/runtime/app/composables/useObservePeriod.d.ts +11 -0
- package/dist/runtime/app/composables/useObservePeriod.js +18 -0
- package/dist/runtime/app/composables/useObserveRollout.d.ts +20 -0
- package/dist/runtime/app/composables/useObserveRollout.js +55 -0
- package/dist/runtime/app/composables/useObserveScope.d.ts +13 -0
- package/dist/runtime/app/composables/useObserveScope.js +17 -0
- package/dist/runtime/app/composables/useObserveServices.d.ts +26 -0
- package/dist/runtime/app/composables/useObserveServices.js +33 -0
- package/dist/runtime/app/composables/useObserveStats.d.ts +14 -0
- package/dist/runtime/app/composables/useObserveStats.js +23 -0
- package/dist/runtime/app/composables/useObserveUsers.d.ts +29 -0
- package/dist/runtime/app/composables/useObserveUsers.js +33 -0
- package/dist/runtime/app/layouts/observe.d.vue.ts +13 -0
- package/dist/runtime/app/layouts/observe.vue +138 -0
- package/dist/runtime/app/layouts/observe.vue.d.ts +13 -0
- package/dist/runtime/app/middleware/observe-auth.global.d.ts +9 -0
- package/dist/runtime/app/middleware/observe-auth.global.js +8 -0
- package/dist/runtime/app/pages/activity.d.vue.ts +3 -0
- package/dist/runtime/app/pages/activity.vue +54 -0
- package/dist/runtime/app/pages/activity.vue.d.ts +3 -0
- package/dist/runtime/app/pages/error-detail.d.vue.ts +3 -0
- package/dist/runtime/app/pages/error-detail.vue +190 -0
- package/dist/runtime/app/pages/error-detail.vue.d.ts +3 -0
- package/dist/runtime/app/pages/errors.d.vue.ts +3 -0
- package/dist/runtime/app/pages/errors.vue +47 -0
- package/dist/runtime/app/pages/errors.vue.d.ts +3 -0
- package/dist/runtime/app/pages/journey.d.vue.ts +3 -0
- package/dist/runtime/app/pages/journey.vue +96 -0
- package/dist/runtime/app/pages/journey.vue.d.ts +3 -0
- package/dist/runtime/app/pages/log-detail.d.vue.ts +3 -0
- package/dist/runtime/app/pages/log-detail.vue +35 -0
- package/dist/runtime/app/pages/log-detail.vue.d.ts +3 -0
- package/dist/runtime/app/pages/login.d.vue.ts +3 -0
- package/dist/runtime/app/pages/login.vue +69 -0
- package/dist/runtime/app/pages/login.vue.d.ts +3 -0
- package/dist/runtime/app/pages/logs.d.vue.ts +3 -0
- package/dist/runtime/app/pages/logs.vue +36 -0
- package/dist/runtime/app/pages/logs.vue.d.ts +3 -0
- package/dist/runtime/app/pages/metrics.d.vue.ts +3 -0
- package/dist/runtime/app/pages/metrics.vue +68 -0
- package/dist/runtime/app/pages/metrics.vue.d.ts +3 -0
- package/dist/runtime/app/pages/overview.d.vue.ts +3 -0
- package/dist/runtime/app/pages/overview.vue +65 -0
- package/dist/runtime/app/pages/overview.vue.d.ts +3 -0
- package/dist/runtime/app/pages/rollout.d.vue.ts +3 -0
- package/dist/runtime/app/pages/rollout.vue +188 -0
- package/dist/runtime/app/pages/rollout.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/group-detail.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/group-detail.vue +149 -0
- package/dist/runtime/app/pages/settings/group-detail.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/groups.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/groups.vue +107 -0
- package/dist/runtime/app/pages/settings/groups.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/index.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/index.vue +47 -0
- package/dist/runtime/app/pages/settings/index.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/migrations.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/migrations.vue +275 -0
- package/dist/runtime/app/pages/settings/migrations.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/service-detail.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/service-detail.vue +133 -0
- package/dist/runtime/app/pages/settings/service-detail.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/services.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/services.vue +66 -0
- package/dist/runtime/app/pages/settings/services.vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/users/[id].d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/users/[id].vue +243 -0
- package/dist/runtime/app/pages/settings/users/[id].vue.d.ts +3 -0
- package/dist/runtime/app/pages/settings/users/index.d.vue.ts +3 -0
- package/dist/runtime/app/pages/settings/users/index.vue +129 -0
- package/dist/runtime/app/pages/settings/users/index.vue.d.ts +3 -0
- package/dist/runtime/options.d.ts +1 -0
- package/dist/runtime/options.js +1 -0
- package/dist/runtime/server/api/observe/activity.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/activity.get.js +30 -0
- package/dist/runtime/server/api/observe/auth/login.post.d.ts +4 -0
- package/dist/runtime/server/api/observe/auth/login.post.js +13 -0
- package/dist/runtime/server/api/observe/auth/logout.post.d.ts +4 -0
- package/dist/runtime/server/api/observe/auth/logout.post.js +6 -0
- package/dist/runtime/server/api/observe/auth/me.get.d.ts +2 -0
- package/dist/runtime/server/api/observe/auth/me.get.js +3 -0
- package/dist/runtime/server/api/observe/errors/[fingerprint].get.d.ts +3 -0
- package/dist/runtime/server/api/observe/errors/[fingerprint].get.js +56 -0
- package/dist/runtime/server/api/observe/errors/index.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/errors/index.get.js +41 -0
- package/dist/runtime/server/api/observe/facets.get.d.ts +8 -0
- package/dist/runtime/server/api/observe/facets.get.js +12 -0
- package/dist/runtime/server/api/observe/groups/[id]/assignments.put.d.ts +3 -0
- package/dist/runtime/server/api/observe/groups/[id]/assignments.put.js +12 -0
- package/dist/runtime/server/api/observe/groups/[id]/services.put.d.ts +5 -0
- package/dist/runtime/server/api/observe/groups/[id]/services.put.js +13 -0
- package/dist/runtime/server/api/observe/groups/[id].delete.d.ts +5 -0
- package/dist/runtime/server/api/observe/groups/[id].delete.js +11 -0
- package/dist/runtime/server/api/observe/groups/[id].get.d.ts +6 -0
- package/dist/runtime/server/api/observe/groups/[id].get.js +14 -0
- package/dist/runtime/server/api/observe/groups/[id].patch.d.ts +3 -0
- package/dist/runtime/server/api/observe/groups/[id].patch.js +12 -0
- package/dist/runtime/server/api/observe/groups/index.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/groups/index.get.js +7 -0
- package/dist/runtime/server/api/observe/groups/index.post.d.ts +3 -0
- package/dist/runtime/server/api/observe/groups/index.post.js +11 -0
- package/dist/runtime/server/api/observe/health.get.d.ts +6 -0
- package/dist/runtime/server/api/observe/health.get.js +10 -0
- package/dist/runtime/server/api/observe/ingest/frogger.d.ts +5 -0
- package/dist/runtime/server/api/observe/ingest/frogger.js +42 -0
- package/dist/runtime/server/api/observe/ingest.d.ts +5 -0
- package/dist/runtime/server/api/observe/ingest.js +38 -0
- package/dist/runtime/server/api/observe/journey.get.d.ts +9 -0
- package/dist/runtime/server/api/observe/journey.get.js +31 -0
- package/dist/runtime/server/api/observe/logs/[id].get.d.ts +3 -0
- package/dist/runtime/server/api/observe/logs/[id].get.js +19 -0
- package/dist/runtime/server/api/observe/logs.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/logs.get.js +54 -0
- package/dist/runtime/server/api/observe/migrations/index.get.d.ts +9 -0
- package/dist/runtime/server/api/observe/migrations/index.get.js +14 -0
- package/dist/runtime/server/api/observe/migrations/run.post.d.ts +13 -0
- package/dist/runtime/server/api/observe/migrations/run.post.js +35 -0
- package/dist/runtime/server/api/observe/overview.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/overview.get.js +19 -0
- package/dist/runtime/server/api/observe/rollout/compare.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/rollout/compare.get.js +24 -0
- package/dist/runtime/server/api/observe/rollout/regressions.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/rollout/regressions.get.js +31 -0
- package/dist/runtime/server/api/observe/rollout/versions.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/rollout/versions.get.js +20 -0
- package/dist/runtime/server/api/observe/services/[id]/assignments.put.d.ts +7 -0
- package/dist/runtime/server/api/observe/services/[id]/assignments.put.js +12 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/[keyId]/rotate.post.d.ts +4 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/[keyId]/rotate.post.js +14 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/[keyId].delete.d.ts +4 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/[keyId].delete.js +14 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/index.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/index.get.js +10 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/index.post.d.ts +3 -0
- package/dist/runtime/server/api/observe/services/[id]/keys/index.post.js +11 -0
- package/dist/runtime/server/api/observe/services/[id]/restore.post.d.ts +4 -0
- package/dist/runtime/server/api/observe/services/[id]/restore.post.js +11 -0
- package/dist/runtime/server/api/observe/services/[id].delete.d.ts +11 -0
- package/dist/runtime/server/api/observe/services/[id].delete.js +11 -0
- package/dist/runtime/server/api/observe/services/[id].get.d.ts +3 -0
- package/dist/runtime/server/api/observe/services/[id].get.js +12 -0
- package/dist/runtime/server/api/observe/services/[id].patch.d.ts +3 -0
- package/dist/runtime/server/api/observe/services/[id].patch.js +13 -0
- package/dist/runtime/server/api/observe/services/index.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/services/index.get.js +7 -0
- package/dist/runtime/server/api/observe/services/index.post.d.ts +3 -0
- package/dist/runtime/server/api/observe/services/index.post.js +16 -0
- package/dist/runtime/server/api/observe/stats.get.d.ts +3 -0
- package/dist/runtime/server/api/observe/stats.get.js +28 -0
- package/dist/runtime/server/api/observe/users/[id]/assignments.put.d.ts +3 -0
- package/dist/runtime/server/api/observe/users/[id]/assignments.put.js +14 -0
- package/dist/runtime/server/api/observe/users/[id].delete.d.ts +4 -0
- package/dist/runtime/server/api/observe/users/[id].delete.js +15 -0
- package/dist/runtime/server/api/observe/users/[id].get.d.ts +3 -0
- package/dist/runtime/server/api/observe/users/[id].get.js +11 -0
- package/dist/runtime/server/api/observe/users/[id].patch.d.ts +3 -0
- package/dist/runtime/server/api/observe/users/[id].patch.js +25 -0
- package/dist/runtime/server/api/observe/users/index.get.d.ts +8 -0
- package/dist/runtime/server/api/observe/users/index.get.js +7 -0
- package/dist/runtime/server/api/observe/users/index.post.d.ts +3 -0
- package/dist/runtime/server/api/observe/users/index.post.js +29 -0
- package/dist/runtime/server/auth/authorization.d.ts +7 -0
- package/dist/runtime/server/auth/authorization.js +5 -0
- package/dist/runtime/server/auth/provider.d.ts +17 -0
- package/dist/runtime/server/auth/provider.js +44 -0
- package/dist/runtime/server/auth/providers/config-provider.d.ts +18 -0
- package/dist/runtime/server/auth/providers/config-provider.js +54 -0
- package/dist/runtime/server/auth/providers/db-provider.d.ts +16 -0
- package/dist/runtime/server/auth/providers/db-provider.js +42 -0
- package/dist/runtime/server/auth/providers/jwt-provider.d.ts +24 -0
- package/dist/runtime/server/auth/providers/jwt-provider.js +72 -0
- package/dist/runtime/server/migrations/0001-services-kind.d.ts +8 -0
- package/dist/runtime/server/migrations/0001-services-kind.js +14 -0
- package/dist/runtime/server/migrations/0002-services-type.d.ts +7 -0
- package/dist/runtime/server/migrations/0002-services-type.js +14 -0
- package/dist/runtime/server/migrations/0003-services-deleted-at.d.ts +6 -0
- package/dist/runtime/server/migrations/0003-services-deleted-at.js +14 -0
- package/dist/runtime/server/migrations/0004-logs-error-fingerprint.d.ts +11 -0
- package/dist/runtime/server/migrations/0004-logs-error-fingerprint.js +15 -0
- package/dist/runtime/server/migrations/0005-users-columns.d.ts +9 -0
- package/dist/runtime/server/migrations/0005-users-columns.js +25 -0
- package/dist/runtime/server/migrations/index.d.ts +13 -0
- package/dist/runtime/server/migrations/index.js +13 -0
- package/dist/runtime/server/migrations/types.d.ts +15 -0
- package/dist/runtime/server/migrations/types.js +0 -0
- package/dist/runtime/server/plugins/observe-migrate.server.d.ts +2 -0
- package/dist/runtime/server/plugins/observe-migrate.server.js +18 -0
- package/dist/runtime/server/tasks/backfill-fingerprints.d.ts +11 -0
- package/dist/runtime/server/tasks/backfill-fingerprints.js +41 -0
- package/dist/runtime/server/tasks/purge.d.ts +5 -0
- package/dist/runtime/server/tasks/purge.js +12 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/utils/activity-query.d.ts +28 -0
- package/dist/runtime/server/utils/activity-query.js +70 -0
- package/dist/runtime/server/utils/api-keys.d.ts +48 -0
- package/dist/runtime/server/utils/api-keys.js +67 -0
- package/dist/runtime/server/utils/authz.d.ts +50 -0
- package/dist/runtime/server/utils/authz.js +60 -0
- package/dist/runtime/server/utils/db/users.d.ts +91 -0
- package/dist/runtime/server/utils/db/users.js +128 -0
- package/dist/runtime/server/utils/db.d.ts +10 -0
- package/dist/runtime/server/utils/db.js +5 -0
- package/dist/runtime/server/utils/frogger-adapter.d.ts +40 -0
- package/dist/runtime/server/utils/frogger-adapter.js +97 -0
- package/dist/runtime/server/utils/groups.d.ts +35 -0
- package/dist/runtime/server/utils/groups.js +59 -0
- package/dist/runtime/server/utils/ingest-cors.d.ts +23 -0
- package/dist/runtime/server/utils/ingest-cors.js +27 -0
- package/dist/runtime/server/utils/journey.d.ts +20 -0
- package/dist/runtime/server/utils/journey.js +44 -0
- package/dist/runtime/server/utils/logs.d.ts +50 -0
- package/dist/runtime/server/utils/logs.js +154 -0
- package/dist/runtime/server/utils/loop-guard.d.ts +11 -0
- package/dist/runtime/server/utils/loop-guard.js +11 -0
- package/dist/runtime/server/utils/migrate.d.ts +21 -0
- package/dist/runtime/server/utils/migrate.js +144 -0
- package/dist/runtime/server/utils/migration-runner.d.ts +42 -0
- package/dist/runtime/server/utils/migration-runner.js +129 -0
- package/dist/runtime/server/utils/observe-errors.d.ts +58 -0
- package/dist/runtime/server/utils/observe-errors.js +206 -0
- package/dist/runtime/server/utils/overview.d.ts +20 -0
- package/dist/runtime/server/utils/overview.js +119 -0
- package/dist/runtime/server/utils/provisioning.d.ts +62 -0
- package/dist/runtime/server/utils/provisioning.js +299 -0
- package/dist/runtime/server/utils/rate-limit.d.ts +11 -0
- package/dist/runtime/server/utils/rate-limit.js +22 -0
- package/dist/runtime/server/utils/require-observe-session.d.ts +15 -0
- package/dist/runtime/server/utils/require-observe-session.js +25 -0
- package/dist/runtime/server/utils/rollout.d.ts +19 -0
- package/dist/runtime/server/utils/rollout.js +56 -0
- package/dist/runtime/server/utils/scope.d.ts +14 -0
- package/dist/runtime/server/utils/scope.js +28 -0
- package/dist/runtime/server/utils/seed.d.ts +18 -0
- package/dist/runtime/server/utils/seed.js +70 -0
- package/dist/runtime/server/utils/services.d.ts +91 -0
- package/dist/runtime/server/utils/services.js +142 -0
- package/dist/runtime/server/utils/stats-query.d.ts +40 -0
- package/dist/runtime/server/utils/stats-query.js +104 -0
- package/dist/runtime/shared/auth/roles.d.ts +34 -0
- package/dist/runtime/shared/auth/roles.js +6 -0
- package/dist/runtime/shared/auth/schema.d.ts +85 -0
- package/dist/runtime/shared/auth/schema.js +41 -0
- package/dist/runtime/shared/auth/types.d.ts +68 -0
- package/dist/runtime/shared/auth/types.js +0 -0
- package/dist/runtime/shared/rbac/capabilities.d.ts +46 -0
- package/dist/runtime/shared/rbac/capabilities.js +48 -0
- package/dist/runtime/shared/schema/activity.d.ts +77 -0
- package/dist/runtime/shared/schema/activity.js +22 -0
- package/dist/runtime/shared/schema/adapters/frogger.d.ts +52 -0
- package/dist/runtime/shared/schema/adapters/frogger.js +17 -0
- package/dist/runtime/shared/schema/batch.d.ts +33 -0
- package/dist/runtime/shared/schema/batch.js +9 -0
- package/dist/runtime/shared/schema/error-fingerprint.d.ts +53 -0
- package/dist/runtime/shared/schema/error-fingerprint.js +47 -0
- package/dist/runtime/shared/schema/errors-query.d.ts +136 -0
- package/dist/runtime/shared/schema/errors-query.js +47 -0
- package/dist/runtime/shared/schema/event.d.ts +48 -0
- package/dist/runtime/shared/schema/event.js +41 -0
- package/dist/runtime/shared/schema/frogger-map.d.ts +62 -0
- package/dist/runtime/shared/schema/frogger-map.js +30 -0
- package/dist/runtime/shared/schema/index.d.ts +17 -0
- package/dist/runtime/shared/schema/index.js +17 -0
- package/dist/runtime/shared/schema/journey.d.ts +99 -0
- package/dist/runtime/shared/schema/journey.js +96 -0
- package/dist/runtime/shared/schema/levels.d.ts +37 -0
- package/dist/runtime/shared/schema/levels.js +72 -0
- package/dist/runtime/shared/schema/log-row.d.ts +31 -0
- package/dist/runtime/shared/schema/log-row.js +0 -0
- package/dist/runtime/shared/schema/logs-query.d.ts +91 -0
- package/dist/runtime/shared/schema/logs-query.js +72 -0
- package/dist/runtime/shared/schema/migrations.d.ts +34 -0
- package/dist/runtime/shared/schema/migrations.js +0 -0
- package/dist/runtime/shared/schema/overview.d.ts +78 -0
- package/dist/runtime/shared/schema/overview.js +9 -0
- package/dist/runtime/shared/schema/provisioning.d.ts +230 -0
- package/dist/runtime/shared/schema/provisioning.js +52 -0
- package/dist/runtime/shared/schema/registry.d.ts +115 -0
- package/dist/runtime/shared/schema/registry.js +27 -0
- package/dist/runtime/shared/schema/rollout.d.ts +103 -0
- package/dist/runtime/shared/schema/rollout.js +66 -0
- package/dist/runtime/shared/schema/stats.d.ts +64 -0
- package/dist/runtime/shared/schema/stats.js +15 -0
- package/dist/runtime/shared/schema/tiers.d.ts +5 -0
- package/dist/runtime/shared/schema/tiers.js +9 -0
- package/dist/runtime/shared/types/module-options.d.ts +119 -0
- package/dist/runtime/shared/types/module-options.js +13 -0
- package/dist/runtime/shared/types/storage.d.ts +31 -0
- package/dist/runtime/shared/types/storage.js +0 -0
- package/dist/runtime/shared/utils/format-relative.d.ts +7 -0
- package/dist/runtime/shared/utils/format-relative.js +11 -0
- package/dist/runtime/shared/utils/frogger-snippet.d.ts +19 -0
- package/dist/runtime/shared/utils/frogger-snippet.js +33 -0
- package/dist/runtime/shared/utils/observe-config.d.ts +9 -0
- package/dist/runtime/shared/utils/observe-config.js +17 -0
- package/dist/runtime/shared/utils/period.d.ts +13 -0
- package/dist/runtime/shared/utils/period.js +15 -0
- package/dist/runtime/shared/utils/slug.d.ts +1 -0
- package/dist/runtime/shared/utils/slug.js +5 -0
- package/dist/runtime/shared/utils/uuid.d.ts +187 -0
- package/dist/runtime/shared/utils/uuid.js +345 -0
- package/dist/runtime/types/nuxt-auth-utils-imports.d.ts +25 -0
- package/dist/runtime/types/observe-app-imports.d.ts +20 -0
- package/dist/runtime/types/session.d.ts +17 -0
- package/dist/schema.d.mts +1318 -0
- package/dist/schema.mjs +629 -0
- package/dist/types.d.mts +3 -0
- package/package.json +93 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { computed, ref, watch, onBeforeUnmount } from "vue";
|
|
2
|
+
import { useFetch } from "#imports";
|
|
3
|
+
import { useObservePeriod } from "./useObservePeriod.js";
|
|
4
|
+
import { useObserveScope } from "./useObserveScope.js";
|
|
5
|
+
const LIMIT = 50;
|
|
6
|
+
export function useObserveErrors() {
|
|
7
|
+
const { period } = useObservePeriod();
|
|
8
|
+
const { serviceSlug, groupSlug } = useObserveScope();
|
|
9
|
+
const q = ref("");
|
|
10
|
+
const debouncedQ = ref("");
|
|
11
|
+
const sort = ref("recent");
|
|
12
|
+
const pageState = ref(1);
|
|
13
|
+
let timer;
|
|
14
|
+
watch(q, (v) => {
|
|
15
|
+
if (timer) clearTimeout(timer);
|
|
16
|
+
timer = setTimeout(() => {
|
|
17
|
+
debouncedQ.value = v.trim();
|
|
18
|
+
}, 300);
|
|
19
|
+
});
|
|
20
|
+
onBeforeUnmount(() => {
|
|
21
|
+
if (timer) clearTimeout(timer);
|
|
22
|
+
});
|
|
23
|
+
watch([debouncedQ, sort, period, serviceSlug, groupSlug], () => {
|
|
24
|
+
pageState.value = 1;
|
|
25
|
+
});
|
|
26
|
+
const page = computed({
|
|
27
|
+
get: () => pageState.value,
|
|
28
|
+
set: (p) => {
|
|
29
|
+
pageState.value = p;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const query = computed(() => ({
|
|
33
|
+
period: period.value,
|
|
34
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {},
|
|
35
|
+
...groupSlug.value ? { group: groupSlug.value } : {},
|
|
36
|
+
...debouncedQ.value ? { q: debouncedQ.value } : {},
|
|
37
|
+
sort: sort.value,
|
|
38
|
+
limit: LIMIT,
|
|
39
|
+
offset: (pageState.value - 1) * LIMIT
|
|
40
|
+
}));
|
|
41
|
+
const { data, pending, error, refresh } = useFetch(
|
|
42
|
+
"/api/observe/errors",
|
|
43
|
+
{ key: "observe:errors", query }
|
|
44
|
+
);
|
|
45
|
+
return {
|
|
46
|
+
data,
|
|
47
|
+
pending,
|
|
48
|
+
error,
|
|
49
|
+
refresh,
|
|
50
|
+
q,
|
|
51
|
+
sort,
|
|
52
|
+
page,
|
|
53
|
+
limit: LIMIT
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function useObserveErrorGroup(fingerprint) {
|
|
57
|
+
const { period } = useObservePeriod();
|
|
58
|
+
const { serviceSlug, groupSlug } = useObserveScope();
|
|
59
|
+
const pageState = ref(1);
|
|
60
|
+
const page = computed({
|
|
61
|
+
get: () => pageState.value,
|
|
62
|
+
set: (p) => {
|
|
63
|
+
pageState.value = p;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const query = computed(() => ({
|
|
67
|
+
period: period.value,
|
|
68
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {},
|
|
69
|
+
...groupSlug.value ? { group: groupSlug.value } : {},
|
|
70
|
+
limit: LIMIT,
|
|
71
|
+
offset: (pageState.value - 1) * LIMIT
|
|
72
|
+
}));
|
|
73
|
+
const { data, pending, error, refresh } = useFetch(
|
|
74
|
+
`/api/observe/errors/${fingerprint}`,
|
|
75
|
+
{ key: `observe:error:${fingerprint}`, query }
|
|
76
|
+
);
|
|
77
|
+
return {
|
|
78
|
+
data,
|
|
79
|
+
pending,
|
|
80
|
+
error,
|
|
81
|
+
refresh,
|
|
82
|
+
page,
|
|
83
|
+
limit: LIMIT
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { GroupListItem, ServiceListItem } from '../../shared/schema/provisioning.js';
|
|
3
|
+
export interface UseObserveGroupsReturn {
|
|
4
|
+
data: Ref<GroupListItem[] | null | undefined>;
|
|
5
|
+
pending: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null | undefined>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
create: (name: string) => Promise<GroupListItem>;
|
|
9
|
+
update: (id: string, name: string) => Promise<GroupListItem>;
|
|
10
|
+
remove: (id: string) => Promise<{
|
|
11
|
+
ok: true;
|
|
12
|
+
}>;
|
|
13
|
+
setMembership: (id: string, serviceIds: string[]) => Promise<{
|
|
14
|
+
ok: true;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export declare function useObserveGroups(): UseObserveGroupsReturn;
|
|
18
|
+
export interface UseObserveGroupDetailReturn {
|
|
19
|
+
data: Ref<{
|
|
20
|
+
group: GroupListItem;
|
|
21
|
+
services: ServiceListItem[];
|
|
22
|
+
} | null | undefined>;
|
|
23
|
+
pending: Ref<boolean>;
|
|
24
|
+
error: Ref<Error | null | undefined>;
|
|
25
|
+
refresh: () => Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare function useObserveGroupDetail(id: string): UseObserveGroupDetailReturn;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useFetch } from "#imports";
|
|
2
|
+
export function useObserveGroups() {
|
|
3
|
+
const { data, pending, error, refresh } = useFetch(
|
|
4
|
+
"/api/observe/groups",
|
|
5
|
+
{ key: "observe:groups" }
|
|
6
|
+
);
|
|
7
|
+
const create = (name) => $fetch("/api/observe/groups", { method: "POST", body: { name } });
|
|
8
|
+
const update = (id, name) => $fetch(`/api/observe/groups/${id}`, { method: "PATCH", body: { name } });
|
|
9
|
+
const remove = (id) => $fetch(`/api/observe/groups/${id}`, { method: "DELETE" });
|
|
10
|
+
const setMembership = (id, serviceIds) => $fetch(`/api/observe/groups/${id}/services`, { method: "PUT", body: { serviceIds } });
|
|
11
|
+
return {
|
|
12
|
+
data,
|
|
13
|
+
pending,
|
|
14
|
+
error,
|
|
15
|
+
refresh,
|
|
16
|
+
create,
|
|
17
|
+
update,
|
|
18
|
+
remove,
|
|
19
|
+
setMembership
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function useObserveGroupDetail(id) {
|
|
23
|
+
const { data, pending, error, refresh } = useFetch(
|
|
24
|
+
`/api/observe/groups/${id}`,
|
|
25
|
+
{ key: `observe:group:${id}` }
|
|
26
|
+
);
|
|
27
|
+
return {
|
|
28
|
+
data,
|
|
29
|
+
pending,
|
|
30
|
+
error,
|
|
31
|
+
refresh
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { type JourneyMode, type JourneyResponse } from '../../shared/schema/journey.js';
|
|
3
|
+
export interface UseObserveJourneyReturn {
|
|
4
|
+
data: Ref<JourneyResponse | null | undefined>;
|
|
5
|
+
pending: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null | undefined>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The one fetch behind the journey timeline. `mode`/`key` are reactive (URL-driven
|
|
11
|
+
* on the page). The selector param depends on the mode (trace -> ?traceId), so the
|
|
12
|
+
* query maps through MODE_PARAM. `immediate` is gated on an initial key so a bare
|
|
13
|
+
* /journey visit does not fire an empty-selector 400; a later search navigation
|
|
14
|
+
* populates the key and useFetch refetches on the reactive query change.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useObserveJourney(mode: Ref<JourneyMode>, key: Ref<string>, opts?: {
|
|
17
|
+
limit?: number;
|
|
18
|
+
key?: string;
|
|
19
|
+
}): UseObserveJourneyReturn;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useFetch } from "#imports";
|
|
3
|
+
import { MODE_PARAM } from "../../shared/schema/journey.js";
|
|
4
|
+
export function useObserveJourney(mode, key, opts = {}) {
|
|
5
|
+
const query = computed(() => ({
|
|
6
|
+
[MODE_PARAM[mode.value]]: key.value,
|
|
7
|
+
...opts.limit ? { limit: opts.limit } : {}
|
|
8
|
+
}));
|
|
9
|
+
const { data, pending, error, refresh } = useFetch(
|
|
10
|
+
"/api/observe/journey",
|
|
11
|
+
{ key: opts.key ?? "observe:journey", query, immediate: !!key.value }
|
|
12
|
+
);
|
|
13
|
+
return {
|
|
14
|
+
data,
|
|
15
|
+
pending,
|
|
16
|
+
error,
|
|
17
|
+
refresh
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
import type { LogsFacetsResponse } from '../../shared/schema/logs-query.js';
|
|
3
|
+
export interface UseObserveLogFacetsReturn {
|
|
4
|
+
data: Ref<LogsFacetsResponse | null | undefined>;
|
|
5
|
+
pending: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null | undefined>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
versions: ComputedRef<string[]>;
|
|
9
|
+
}
|
|
10
|
+
/** Feeds the filter bar's version dropdown, narrowed by the navbar scope switcher. */
|
|
11
|
+
export declare function useObserveLogFacets(): UseObserveLogFacetsReturn;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useFetch } from "#imports";
|
|
3
|
+
import { useObserveScope } from "./useObserveScope.js";
|
|
4
|
+
export function useObserveLogFacets() {
|
|
5
|
+
const { serviceSlug, groupSlug } = useObserveScope();
|
|
6
|
+
const query = computed(() => ({
|
|
7
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {},
|
|
8
|
+
...groupSlug.value ? { group: groupSlug.value } : {}
|
|
9
|
+
}));
|
|
10
|
+
const { data, pending, error, refresh } = useFetch(
|
|
11
|
+
"/api/observe/facets",
|
|
12
|
+
{ key: "observe:facets", query }
|
|
13
|
+
);
|
|
14
|
+
return {
|
|
15
|
+
data,
|
|
16
|
+
pending,
|
|
17
|
+
error,
|
|
18
|
+
refresh,
|
|
19
|
+
versions: computed(() => data.value?.versions ?? [])
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Ref, type WritableComputedRef } from 'vue';
|
|
2
|
+
import type { LogListResponse } from '../../shared/schema/logs-query.js';
|
|
3
|
+
export interface LogsFilters {
|
|
4
|
+
levels: number[];
|
|
5
|
+
versions: string[];
|
|
6
|
+
route: string | null;
|
|
7
|
+
feature: string | null;
|
|
8
|
+
q: string;
|
|
9
|
+
traceId: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface UseObserveLogsReturn {
|
|
12
|
+
data: Ref<LogListResponse | null | undefined>;
|
|
13
|
+
pending: Ref<boolean>;
|
|
14
|
+
error: Ref<Error | null | undefined>;
|
|
15
|
+
refresh: () => Promise<void>;
|
|
16
|
+
filters: Ref<LogsFilters>;
|
|
17
|
+
setFilters: (patch: Partial<LogsFilters>) => void;
|
|
18
|
+
clearFilters: () => void;
|
|
19
|
+
page: WritableComputedRef<number>;
|
|
20
|
+
limit: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The logs explorer's filter state + list fetch. Filters initialise from the URL query
|
|
24
|
+
* so a shared link restores them; every mutation writes the query back via router.replace
|
|
25
|
+
* (spreading ...route.query, so the navbar's ?period= and the cookie scope coexist).
|
|
26
|
+
* Scope + period compose from the shared shell state exactly as useObserveStats does.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useObserveLogs(): UseObserveLogsReturn;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useFetch, useState, useRoute, useRouter } from "#imports";
|
|
3
|
+
import { useObservePeriod } from "./useObservePeriod.js";
|
|
4
|
+
import { useObserveScope } from "./useObserveScope.js";
|
|
5
|
+
const LIMIT = 50;
|
|
6
|
+
function firstStr(v) {
|
|
7
|
+
const s = Array.isArray(v) ? v[0] : v;
|
|
8
|
+
return typeof s === "string" ? s : void 0;
|
|
9
|
+
}
|
|
10
|
+
function csvNumbers(v) {
|
|
11
|
+
const s = firstStr(v);
|
|
12
|
+
if (!s) return [];
|
|
13
|
+
return s.split(",").map((x) => Number(x.trim())).filter((n) => Number.isInteger(n) && n >= 0 && n <= 5);
|
|
14
|
+
}
|
|
15
|
+
function csvStrings(v) {
|
|
16
|
+
const s = firstStr(v);
|
|
17
|
+
if (!s) return [];
|
|
18
|
+
return s.split(",").map((x) => x.trim()).filter((x) => x.length > 0);
|
|
19
|
+
}
|
|
20
|
+
export function useObserveLogs() {
|
|
21
|
+
const route = useRoute();
|
|
22
|
+
const router = useRouter();
|
|
23
|
+
const { period } = useObservePeriod();
|
|
24
|
+
const { serviceSlug, groupSlug } = useObserveScope();
|
|
25
|
+
const filters = useState("observe:logs-filters", () => ({
|
|
26
|
+
levels: csvNumbers(route.query.levels),
|
|
27
|
+
versions: csvStrings(route.query.versions),
|
|
28
|
+
route: firstStr(route.query.route) ?? null,
|
|
29
|
+
feature: firstStr(route.query.feature) ?? null,
|
|
30
|
+
q: firstStr(route.query.q) ?? "",
|
|
31
|
+
traceId: firstStr(route.query.traceId) ?? null
|
|
32
|
+
}));
|
|
33
|
+
const pageState = useState("observe:logs-page", () => {
|
|
34
|
+
const p = Number(firstStr(route.query.page));
|
|
35
|
+
return Number.isInteger(p) && p >= 1 ? p : 1;
|
|
36
|
+
});
|
|
37
|
+
function syncUrl() {
|
|
38
|
+
const q = { ...route.query };
|
|
39
|
+
delete q.levels;
|
|
40
|
+
delete q.versions;
|
|
41
|
+
delete q.route;
|
|
42
|
+
delete q.feature;
|
|
43
|
+
delete q.q;
|
|
44
|
+
delete q.traceId;
|
|
45
|
+
delete q.page;
|
|
46
|
+
if (filters.value.levels.length) q.levels = filters.value.levels.join(",");
|
|
47
|
+
if (filters.value.versions.length) q.versions = filters.value.versions.join(",");
|
|
48
|
+
if (filters.value.route) q.route = filters.value.route;
|
|
49
|
+
if (filters.value.feature) q.feature = filters.value.feature;
|
|
50
|
+
if (filters.value.q) q.q = filters.value.q;
|
|
51
|
+
if (filters.value.traceId) q.traceId = filters.value.traceId;
|
|
52
|
+
if (pageState.value > 1) q.page = String(pageState.value);
|
|
53
|
+
router.replace({ query: q });
|
|
54
|
+
}
|
|
55
|
+
const setFilters = (patch) => {
|
|
56
|
+
filters.value = { ...filters.value, ...patch };
|
|
57
|
+
pageState.value = 1;
|
|
58
|
+
syncUrl();
|
|
59
|
+
};
|
|
60
|
+
const clearFilters = () => {
|
|
61
|
+
filters.value = { levels: [], versions: [], route: null, feature: null, q: "", traceId: null };
|
|
62
|
+
pageState.value = 1;
|
|
63
|
+
syncUrl();
|
|
64
|
+
};
|
|
65
|
+
const page = computed({
|
|
66
|
+
get: () => pageState.value,
|
|
67
|
+
set: (p) => {
|
|
68
|
+
pageState.value = p;
|
|
69
|
+
syncUrl();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const query = computed(() => ({
|
|
73
|
+
period: period.value,
|
|
74
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {},
|
|
75
|
+
...groupSlug.value ? { group: groupSlug.value } : {},
|
|
76
|
+
...filters.value.levels.length ? { levels: filters.value.levels.join(",") } : {},
|
|
77
|
+
...filters.value.versions.length ? { versions: filters.value.versions.join(",") } : {},
|
|
78
|
+
...filters.value.route ? { route: filters.value.route } : {},
|
|
79
|
+
...filters.value.feature ? { feature: filters.value.feature } : {},
|
|
80
|
+
...filters.value.q ? { q: filters.value.q } : {},
|
|
81
|
+
...filters.value.traceId ? { traceId: filters.value.traceId } : {},
|
|
82
|
+
limit: LIMIT,
|
|
83
|
+
offset: (pageState.value - 1) * LIMIT
|
|
84
|
+
}));
|
|
85
|
+
const { data, pending, error, refresh } = useFetch(
|
|
86
|
+
"/api/observe/logs",
|
|
87
|
+
{ key: "observe:logs", query }
|
|
88
|
+
);
|
|
89
|
+
return {
|
|
90
|
+
data,
|
|
91
|
+
pending,
|
|
92
|
+
error,
|
|
93
|
+
refresh,
|
|
94
|
+
filters,
|
|
95
|
+
setFilters,
|
|
96
|
+
clearFilters,
|
|
97
|
+
page,
|
|
98
|
+
limit: LIMIT
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { MigrationStatusResponse, MigrationRunFrame } from '../../shared/schema/migrations.js';
|
|
3
|
+
export interface UseObserveMigrationsReturn {
|
|
4
|
+
status: Ref<MigrationStatusResponse | null | undefined>;
|
|
5
|
+
pending: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null | undefined>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
run: (ids: string[] | undefined, onFrame: (frame: MigrationRunFrame) => void) => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The one composable behind the migration console. `status` is the admin status fetch;
|
|
12
|
+
* `run` POSTs to /run and reads the SSE-framed response body as a stream (fetch +
|
|
13
|
+
* TextDecoder, NOT the native EventSource — its auto-reconnect could re-trigger a run),
|
|
14
|
+
* splitting on the SSE frame boundary and parsing each `data:` line, invoking `onFrame`
|
|
15
|
+
* as each frame arrives so the page can append to its terminal buffer live.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useObserveMigrations(): UseObserveMigrationsReturn;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useFetch } from "#imports";
|
|
2
|
+
export function useObserveMigrations() {
|
|
3
|
+
const { data, pending, error, refresh } = useFetch(
|
|
4
|
+
"/api/observe/migrations",
|
|
5
|
+
{ key: "observe:migrations" }
|
|
6
|
+
);
|
|
7
|
+
async function run(ids, onFrame) {
|
|
8
|
+
const res = await fetch("/api/observe/migrations/run", {
|
|
9
|
+
method: "POST",
|
|
10
|
+
headers: { "content-type": "application/json", "accept": "text/event-stream" },
|
|
11
|
+
body: JSON.stringify(ids ? { ids } : {})
|
|
12
|
+
});
|
|
13
|
+
if (!res.ok || !res.body) {
|
|
14
|
+
throw new Error(`Migration run failed to start (${res.status})`);
|
|
15
|
+
}
|
|
16
|
+
const reader = res.body.getReader();
|
|
17
|
+
const decoder = new TextDecoder();
|
|
18
|
+
let buffer = "";
|
|
19
|
+
const flushFrame = (raw) => {
|
|
20
|
+
const dataLine = raw.split("\n").find((l) => l.startsWith("data:"));
|
|
21
|
+
if (!dataLine) return;
|
|
22
|
+
const json = dataLine.slice("data:".length).trim();
|
|
23
|
+
if (!json) return;
|
|
24
|
+
try {
|
|
25
|
+
onFrame(JSON.parse(json));
|
|
26
|
+
} catch {
|
|
27
|
+
onFrame({ type: "log", line: json });
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
for (; ; ) {
|
|
31
|
+
const { done, value } = await reader.read();
|
|
32
|
+
if (done) break;
|
|
33
|
+
buffer += decoder.decode(value, { stream: true });
|
|
34
|
+
let sep;
|
|
35
|
+
while ((sep = buffer.indexOf("\n\n")) !== -1) {
|
|
36
|
+
flushFrame(buffer.slice(0, sep));
|
|
37
|
+
buffer = buffer.slice(sep + 2);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (buffer.trim()) flushFrame(buffer);
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
status: data,
|
|
44
|
+
pending,
|
|
45
|
+
error,
|
|
46
|
+
refresh,
|
|
47
|
+
run
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { OverviewResponse } from '../../shared/schema/overview.js';
|
|
3
|
+
export interface UseObserveOverviewReturn {
|
|
4
|
+
data: Ref<OverviewResponse | null | undefined>;
|
|
5
|
+
pending: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null | undefined>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The one overview fetch. Keyed explicitly so the layout (switcher) and the page
|
|
11
|
+
* share a single request instead of each firing their own; the reactive query means
|
|
12
|
+
* changing the period or the selected observable refetches automatically.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useObserveOverview(): UseObserveOverviewReturn;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useFetch } from "#imports";
|
|
3
|
+
import { useObservePeriod } from "./useObservePeriod.js";
|
|
4
|
+
import { useObserveScope } from "./useObserveScope.js";
|
|
5
|
+
export function useObserveOverview() {
|
|
6
|
+
const { period } = useObservePeriod();
|
|
7
|
+
const { serviceSlug, groupSlug } = useObserveScope();
|
|
8
|
+
const query = computed(() => ({
|
|
9
|
+
period: period.value,
|
|
10
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {},
|
|
11
|
+
...groupSlug.value ? { group: groupSlug.value } : {}
|
|
12
|
+
}));
|
|
13
|
+
const { data, pending, error, refresh } = useFetch(
|
|
14
|
+
"/api/observe/overview",
|
|
15
|
+
{ key: "observe:overview", query }
|
|
16
|
+
);
|
|
17
|
+
return {
|
|
18
|
+
data,
|
|
19
|
+
pending,
|
|
20
|
+
error,
|
|
21
|
+
refresh
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import { type Period } from '../../shared/utils/period.js';
|
|
3
|
+
/**
|
|
4
|
+
* Selected dashboard time window, shared across the shell and every page. Initialised
|
|
5
|
+
* from ?period= so a shared link restores the window; set() writes the query back with
|
|
6
|
+
* router.replace so the URL always reflects the current selection.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useObservePeriod(): {
|
|
9
|
+
period: Ref<Period>;
|
|
10
|
+
setPeriod: (p: Period) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useState, useRoute, useRouter } from "#imports";
|
|
2
|
+
import { PERIODS } from "../../shared/utils/period.js";
|
|
3
|
+
function isPeriod(value) {
|
|
4
|
+
return typeof value === "string" && PERIODS.includes(value);
|
|
5
|
+
}
|
|
6
|
+
export function useObservePeriod() {
|
|
7
|
+
const route = useRoute();
|
|
8
|
+
const router = useRouter();
|
|
9
|
+
const period = useState(
|
|
10
|
+
"observe:period",
|
|
11
|
+
() => isPeriod(route.query.period) ? route.query.period : "24h"
|
|
12
|
+
);
|
|
13
|
+
const setPeriod = (p) => {
|
|
14
|
+
period.value = p;
|
|
15
|
+
router.replace({ query: { ...route.query, period: p } });
|
|
16
|
+
};
|
|
17
|
+
return { period, setPeriod };
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { VersionStat, VersionCompare, RegressionResponse } from '../../shared/schema/rollout.js';
|
|
3
|
+
export interface UseObserveRolloutReturn {
|
|
4
|
+
versions: Ref<VersionStat[] | null | undefined>;
|
|
5
|
+
compare: Ref<VersionCompare | null | undefined>;
|
|
6
|
+
regressions: Ref<RegressionResponse | null | undefined>;
|
|
7
|
+
/** true = a single service is selected, so the regressions panel is meaningful */
|
|
8
|
+
hasService: Ref<boolean>;
|
|
9
|
+
pending: Ref<boolean>;
|
|
10
|
+
error: Ref<Error | null | undefined>;
|
|
11
|
+
refresh: () => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The rollout page's three reads behind one composable. versions + compare follow any
|
|
15
|
+
* selector (service, group, or full scope) with the standard reactive-query auto-refetch.
|
|
16
|
+
* regressions is per-service only (version_tracking is a service flag), so it is driven
|
|
17
|
+
* manually and only fires when a service slug is selected - a group/all-scope view would
|
|
18
|
+
* 400, so we skip it rather than surface a spurious error.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useObserveRollout(): UseObserveRolloutReturn;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { computed, watch } from "vue";
|
|
2
|
+
import { useFetch } from "#imports";
|
|
3
|
+
import { useObservePeriod } from "./useObservePeriod.js";
|
|
4
|
+
import { useObserveScope } from "./useObserveScope.js";
|
|
5
|
+
export function useObserveRollout() {
|
|
6
|
+
const { period } = useObservePeriod();
|
|
7
|
+
const { serviceSlug, groupSlug } = useObserveScope();
|
|
8
|
+
const hasService = computed(() => !!serviceSlug.value);
|
|
9
|
+
const query = computed(() => ({
|
|
10
|
+
period: period.value,
|
|
11
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {},
|
|
12
|
+
...groupSlug.value ? { group: groupSlug.value } : {}
|
|
13
|
+
}));
|
|
14
|
+
const versionsFetch = useFetch(
|
|
15
|
+
"/api/observe/rollout/versions",
|
|
16
|
+
{ key: "observe:rollout:versions", query }
|
|
17
|
+
);
|
|
18
|
+
const compareFetch = useFetch(
|
|
19
|
+
"/api/observe/rollout/compare",
|
|
20
|
+
{ key: "observe:rollout:compare", query }
|
|
21
|
+
);
|
|
22
|
+
const regressionsQuery = computed(() => ({
|
|
23
|
+
period: period.value,
|
|
24
|
+
...serviceSlug.value ? { service: serviceSlug.value } : {}
|
|
25
|
+
}));
|
|
26
|
+
const regressionsFetch = useFetch(
|
|
27
|
+
"/api/observe/rollout/regressions",
|
|
28
|
+
{ key: "observe:rollout:regressions", query: regressionsQuery, immediate: false, watch: false }
|
|
29
|
+
);
|
|
30
|
+
watch(
|
|
31
|
+
[serviceSlug, period],
|
|
32
|
+
() => {
|
|
33
|
+
if (serviceSlug.value) regressionsFetch.refresh();
|
|
34
|
+
},
|
|
35
|
+
{ immediate: true }
|
|
36
|
+
);
|
|
37
|
+
const pending = computed(() => versionsFetch.pending.value || compareFetch.pending.value);
|
|
38
|
+
const error = computed(() => versionsFetch.error.value ?? compareFetch.error.value);
|
|
39
|
+
const refresh = async () => {
|
|
40
|
+
await Promise.all([
|
|
41
|
+
versionsFetch.refresh(),
|
|
42
|
+
compareFetch.refresh(),
|
|
43
|
+
...serviceSlug.value ? [regressionsFetch.refresh()] : []
|
|
44
|
+
]);
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
versions: versionsFetch.data,
|
|
48
|
+
compare: compareFetch.data,
|
|
49
|
+
regressions: regressionsFetch.data,
|
|
50
|
+
hasService,
|
|
51
|
+
pending,
|
|
52
|
+
error,
|
|
53
|
+
refresh
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Selected observable: a service slug, 'group:<slug>', or null (= everything the
|
|
4
|
+
* caller is assigned). Cookie-persisted so the selection survives reloads. The value
|
|
5
|
+
* is presentational input only — the server re-validates any named slug against the
|
|
6
|
+
* caller's scope (404 unknown, 403 out-of-scope).
|
|
7
|
+
*/
|
|
8
|
+
export declare function useObserveScope(): {
|
|
9
|
+
scope: Ref<string | null>;
|
|
10
|
+
setScope: (value: string | null) => void;
|
|
11
|
+
serviceSlug: ComputedRef<string | undefined>;
|
|
12
|
+
groupSlug: ComputedRef<string | undefined>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useState, useCookie } from "#imports";
|
|
3
|
+
export function useObserveScope() {
|
|
4
|
+
const cookie = useCookie("observe:scope", { default: () => null });
|
|
5
|
+
const scope = useState("observe:scope", () => cookie.value ?? null);
|
|
6
|
+
const setScope = (value) => {
|
|
7
|
+
scope.value = value;
|
|
8
|
+
cookie.value = value;
|
|
9
|
+
};
|
|
10
|
+
const serviceSlug = computed(
|
|
11
|
+
() => scope.value && !scope.value.startsWith("group:") ? scope.value : void 0
|
|
12
|
+
);
|
|
13
|
+
const groupSlug = computed(
|
|
14
|
+
() => scope.value?.startsWith("group:") ? scope.value.slice("group:".length) : void 0
|
|
15
|
+
);
|
|
16
|
+
return { scope, setScope, serviceSlug, groupSlug };
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ServiceListItem, ServiceDetail, ServiceCreate, ServiceUpdate } from '../../shared/schema/provisioning.js';
|
|
3
|
+
export interface UseObserveServicesReturn {
|
|
4
|
+
data: Ref<ServiceListItem[] | null | undefined>;
|
|
5
|
+
pending: Ref<boolean>;
|
|
6
|
+
error: Ref<Error | null | undefined>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
create: (input: ServiceCreate) => Promise<ServiceDetail>;
|
|
9
|
+
update: (id: string, patch: ServiceUpdate) => Promise<ServiceDetail>;
|
|
10
|
+
softDelete: (id: string) => Promise<{
|
|
11
|
+
ok: true;
|
|
12
|
+
deletedAt: number;
|
|
13
|
+
purgeAt: number;
|
|
14
|
+
}>;
|
|
15
|
+
restore: (id: string) => Promise<ServiceDetail>;
|
|
16
|
+
}
|
|
17
|
+
/** The scoped services list plus the CRUD mutations behind the provisioning table. */
|
|
18
|
+
export declare function useObserveServices(): UseObserveServicesReturn;
|
|
19
|
+
export interface UseObserveServiceDetailReturn {
|
|
20
|
+
data: Ref<ServiceDetail | null | undefined>;
|
|
21
|
+
pending: Ref<boolean>;
|
|
22
|
+
error: Ref<Error | null | undefined>;
|
|
23
|
+
refresh: () => Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
/** Single-service detail fetch keyed by id, for the edit page. */
|
|
26
|
+
export declare function useObserveServiceDetail(id: string): UseObserveServiceDetailReturn;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useFetch } from "#imports";
|
|
2
|
+
export function useObserveServices() {
|
|
3
|
+
const { data, pending, error, refresh } = useFetch(
|
|
4
|
+
"/api/observe/services",
|
|
5
|
+
{ key: "observe:services" }
|
|
6
|
+
);
|
|
7
|
+
const create = (input) => $fetch("/api/observe/services", { method: "POST", body: input });
|
|
8
|
+
const update = (id, patch) => $fetch(`/api/observe/services/${id}`, { method: "PATCH", body: patch });
|
|
9
|
+
const softDelete = (id) => $fetch(`/api/observe/services/${id}`, { method: "DELETE" });
|
|
10
|
+
const restore = (id) => $fetch(`/api/observe/services/${id}/restore`, { method: "POST" });
|
|
11
|
+
return {
|
|
12
|
+
data,
|
|
13
|
+
pending,
|
|
14
|
+
error,
|
|
15
|
+
refresh,
|
|
16
|
+
create,
|
|
17
|
+
update,
|
|
18
|
+
softDelete,
|
|
19
|
+
restore
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function useObserveServiceDetail(id) {
|
|
23
|
+
const { data, pending, error, refresh } = useFetch(
|
|
24
|
+
`/api/observe/services/${id}`,
|
|
25
|
+
{ key: `observe:service:${id}` }
|
|
26
|
+
);
|
|
27
|
+
return {
|
|
28
|
+
data,
|
|
29
|
+
pending,
|
|
30
|
+
error,
|
|
31
|
+
refresh
|
|
32
|
+
};
|
|
33
|
+
}
|