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,149 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, watch } from "vue";
|
|
3
|
+
import { useRoute, useRuntimeConfig, navigateTo } from "#imports";
|
|
4
|
+
import { useObserveGroups, useObserveGroupDetail } from "../../composables/useObserveGroups";
|
|
5
|
+
import { useObserveServices } from "../../composables/useObserveServices";
|
|
6
|
+
import { useObserveAbility } from "../../composables/useObserveAbility";
|
|
7
|
+
const route = useRoute();
|
|
8
|
+
const id = route.params.id;
|
|
9
|
+
const { prefix } = useRuntimeConfig().public.observe;
|
|
10
|
+
const { data, pending, error, refresh } = useObserveGroupDetail(id);
|
|
11
|
+
const { data: allServices } = useObserveServices();
|
|
12
|
+
const { update, remove, setMembership } = useObserveGroups();
|
|
13
|
+
const { can } = useObserveAbility();
|
|
14
|
+
const renameOpen = ref(false);
|
|
15
|
+
const renaming = ref(false);
|
|
16
|
+
const savingMembers = ref(false);
|
|
17
|
+
const memberIds = ref([]);
|
|
18
|
+
watch(data, (d) => {
|
|
19
|
+
if (d) memberIds.value = d.services.map((s) => s.id);
|
|
20
|
+
}, { immediate: true });
|
|
21
|
+
async function onRename(name) {
|
|
22
|
+
renaming.value = true;
|
|
23
|
+
try {
|
|
24
|
+
await update(id, name);
|
|
25
|
+
renameOpen.value = false;
|
|
26
|
+
await refresh();
|
|
27
|
+
} finally {
|
|
28
|
+
renaming.value = false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async function onSaveMembers() {
|
|
32
|
+
savingMembers.value = true;
|
|
33
|
+
try {
|
|
34
|
+
await setMembership(id, memberIds.value);
|
|
35
|
+
await refresh();
|
|
36
|
+
} finally {
|
|
37
|
+
savingMembers.value = false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async function onDelete() {
|
|
41
|
+
await remove(id);
|
|
42
|
+
await navigateTo(`${prefix}/settings/groups`);
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<div class="space-y-6">
|
|
48
|
+
<UButton
|
|
49
|
+
:to="`${prefix}/settings/groups`"
|
|
50
|
+
icon="i-lucide-arrow-left"
|
|
51
|
+
color="neutral"
|
|
52
|
+
variant="ghost"
|
|
53
|
+
size="sm"
|
|
54
|
+
label="Groups"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<UAlert
|
|
58
|
+
v-if="error"
|
|
59
|
+
color="error"
|
|
60
|
+
variant="subtle"
|
|
61
|
+
title="Failed to load group"
|
|
62
|
+
:description="error.message"
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<template v-else-if="data">
|
|
66
|
+
<div class="flex items-start justify-between">
|
|
67
|
+
<div>
|
|
68
|
+
<h1 class="text-lg font-semibold">
|
|
69
|
+
{{ data.group.name }}
|
|
70
|
+
</h1>
|
|
71
|
+
<div class="font-mono text-xs text-muted">
|
|
72
|
+
{{ data.group.slug }}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div
|
|
76
|
+
v-if="can('groups.manage')"
|
|
77
|
+
class="flex gap-2"
|
|
78
|
+
>
|
|
79
|
+
<UButton
|
|
80
|
+
icon="i-lucide-pencil"
|
|
81
|
+
color="neutral"
|
|
82
|
+
variant="soft"
|
|
83
|
+
label="Rename"
|
|
84
|
+
@click="() => {
|
|
85
|
+
renameOpen = true;
|
|
86
|
+
}"
|
|
87
|
+
/>
|
|
88
|
+
<UButton
|
|
89
|
+
icon="i-lucide-trash-2"
|
|
90
|
+
color="error"
|
|
91
|
+
variant="soft"
|
|
92
|
+
label="Delete"
|
|
93
|
+
@click="onDelete"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<section class="space-y-3">
|
|
99
|
+
<h2 class="text-sm font-semibold uppercase tracking-wider text-muted">
|
|
100
|
+
Member services
|
|
101
|
+
</h2>
|
|
102
|
+
<template v-if="can('groups.manage')">
|
|
103
|
+
<ObserveGroupMembershipEditor
|
|
104
|
+
v-model="memberIds"
|
|
105
|
+
:services="allServices ?? []"
|
|
106
|
+
/>
|
|
107
|
+
<div class="flex justify-end">
|
|
108
|
+
<UButton
|
|
109
|
+
label="Save membership"
|
|
110
|
+
:loading="savingMembers"
|
|
111
|
+
@click="onSaveMembers"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
115
|
+
<div
|
|
116
|
+
v-else-if="!data.services.length"
|
|
117
|
+
class="text-sm text-muted"
|
|
118
|
+
>
|
|
119
|
+
No services in this group.
|
|
120
|
+
</div>
|
|
121
|
+
<ul
|
|
122
|
+
v-else
|
|
123
|
+
class="space-y-1 text-sm"
|
|
124
|
+
>
|
|
125
|
+
<li
|
|
126
|
+
v-for="s in data.services"
|
|
127
|
+
:key="s.id"
|
|
128
|
+
>
|
|
129
|
+
{{ s.name }}
|
|
130
|
+
</li>
|
|
131
|
+
</ul>
|
|
132
|
+
</section>
|
|
133
|
+
|
|
134
|
+
<ObserveGroupFormModal
|
|
135
|
+
v-model:open="renameOpen"
|
|
136
|
+
:loading="renaming"
|
|
137
|
+
:initial-name="data.group.name"
|
|
138
|
+
@submit="onRename"
|
|
139
|
+
/>
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<div
|
|
143
|
+
v-else-if="pending"
|
|
144
|
+
class="text-sm text-muted"
|
|
145
|
+
>
|
|
146
|
+
Loading…
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed } from "vue";
|
|
3
|
+
import { useRuntimeConfig } from "#imports";
|
|
4
|
+
import { useObserveGroups } from "../../composables/useObserveGroups";
|
|
5
|
+
const { prefix } = useRuntimeConfig().public.observe;
|
|
6
|
+
const { data, pending, error, refresh, create, remove } = useObserveGroups();
|
|
7
|
+
const formOpen = ref(false);
|
|
8
|
+
const creating = ref(false);
|
|
9
|
+
async function onCreate(name) {
|
|
10
|
+
creating.value = true;
|
|
11
|
+
try {
|
|
12
|
+
await create(name);
|
|
13
|
+
formOpen.value = false;
|
|
14
|
+
await refresh();
|
|
15
|
+
} finally {
|
|
16
|
+
creating.value = false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
async function onDelete(group) {
|
|
20
|
+
await remove(group.id);
|
|
21
|
+
await refresh();
|
|
22
|
+
}
|
|
23
|
+
const columns = computed(() => [
|
|
24
|
+
{ id: "name", accessorKey: "name", header: "Group" },
|
|
25
|
+
{ id: "count", accessorKey: "serviceCount", header: "Services", meta: { class: { th: "text-right", td: "text-right tabular-nums" } } },
|
|
26
|
+
{ id: "actions", header: "" }
|
|
27
|
+
]);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div class="space-y-4">
|
|
32
|
+
<div class="flex items-center justify-between">
|
|
33
|
+
<p class="text-sm text-muted">
|
|
34
|
+
Groups organise services for scoping and rollups.
|
|
35
|
+
</p>
|
|
36
|
+
<ObserveCan capability="groups.manage">
|
|
37
|
+
<UButton
|
|
38
|
+
icon="i-lucide-plus"
|
|
39
|
+
label="New group"
|
|
40
|
+
@click="() => {
|
|
41
|
+
formOpen = true;
|
|
42
|
+
}"
|
|
43
|
+
/>
|
|
44
|
+
</ObserveCan>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<UAlert
|
|
48
|
+
v-if="error"
|
|
49
|
+
color="error"
|
|
50
|
+
variant="subtle"
|
|
51
|
+
title="Failed to load groups"
|
|
52
|
+
:description="error.message"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<UCard
|
|
56
|
+
v-else
|
|
57
|
+
:ui="{ body: 'p-0 sm:p-0' }"
|
|
58
|
+
>
|
|
59
|
+
<UTable
|
|
60
|
+
:data="data ?? []"
|
|
61
|
+
:columns="columns"
|
|
62
|
+
:loading="pending"
|
|
63
|
+
empty="No groups yet."
|
|
64
|
+
>
|
|
65
|
+
<template #name-cell="{ row }">
|
|
66
|
+
<NuxtLink
|
|
67
|
+
:to="`${prefix}/settings/groups/${row.original.id}`"
|
|
68
|
+
class="font-medium hover:underline"
|
|
69
|
+
>
|
|
70
|
+
{{ row.original.name }}
|
|
71
|
+
</NuxtLink>
|
|
72
|
+
<div class="text-xs text-muted">
|
|
73
|
+
{{ row.original.slug }}
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
<template #actions-cell="{ row }">
|
|
77
|
+
<ObserveCan capability="groups.manage">
|
|
78
|
+
<div class="flex justify-end gap-1">
|
|
79
|
+
<UButton
|
|
80
|
+
:to="`${prefix}/settings/groups/${row.original.id}`"
|
|
81
|
+
icon="i-lucide-pencil"
|
|
82
|
+
color="neutral"
|
|
83
|
+
variant="ghost"
|
|
84
|
+
size="xs"
|
|
85
|
+
label="Manage"
|
|
86
|
+
/>
|
|
87
|
+
<UButton
|
|
88
|
+
icon="i-lucide-trash-2"
|
|
89
|
+
color="error"
|
|
90
|
+
variant="ghost"
|
|
91
|
+
size="xs"
|
|
92
|
+
label="Delete"
|
|
93
|
+
@click="onDelete(row.original)"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
</ObserveCan>
|
|
97
|
+
</template>
|
|
98
|
+
</UTable>
|
|
99
|
+
</UCard>
|
|
100
|
+
|
|
101
|
+
<ObserveGroupFormModal
|
|
102
|
+
v-model:open="formOpen"
|
|
103
|
+
:loading="creating"
|
|
104
|
+
@submit="onCreate"
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useRuntimeConfig } from "#imports";
|
|
4
|
+
import { useObserveAbility } from "../../composables/useObserveAbility";
|
|
5
|
+
const { prefix } = useRuntimeConfig().public.observe;
|
|
6
|
+
const { can } = useObserveAbility();
|
|
7
|
+
const cards = computed(() => {
|
|
8
|
+
const items = [
|
|
9
|
+
{ title: "Services", description: "Register observables, manage ingest keys, origins and versions.", icon: "i-lucide-boxes", to: `${prefix}/settings/services` },
|
|
10
|
+
{ title: "Groups", description: "Organise services into groups for scoping and rollups.", icon: "i-lucide-folder-tree", to: `${prefix}/settings/groups` }
|
|
11
|
+
];
|
|
12
|
+
if (can("users.manage")) {
|
|
13
|
+
items.push({ title: "Users", description: "Manage dashboard users, roles and assigned scope.", icon: "i-lucide-users", to: `${prefix}/settings/users` });
|
|
14
|
+
}
|
|
15
|
+
if (can("migrations.manage")) {
|
|
16
|
+
items.push({ title: "Migrations", description: "Review and run gated schema migrations with live output.", icon: "i-lucide-database", to: `${prefix}/settings/migrations` });
|
|
17
|
+
}
|
|
18
|
+
return items;
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="grid gap-4 sm:grid-cols-2">
|
|
24
|
+
<NuxtLink
|
|
25
|
+
v-for="c in cards"
|
|
26
|
+
:key="c.to"
|
|
27
|
+
:to="c.to"
|
|
28
|
+
>
|
|
29
|
+
<UCard class="h-full transition hover:bg-elevated/50">
|
|
30
|
+
<div class="flex items-start gap-3">
|
|
31
|
+
<UIcon
|
|
32
|
+
:name="c.icon"
|
|
33
|
+
class="size-6 shrink-0 text-primary"
|
|
34
|
+
/>
|
|
35
|
+
<div>
|
|
36
|
+
<h2 class="font-semibold">
|
|
37
|
+
{{ c.title }}
|
|
38
|
+
</h2>
|
|
39
|
+
<p class="text-sm text-muted">
|
|
40
|
+
{{ c.description }}
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</UCard>
|
|
45
|
+
</NuxtLink>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, nextTick, watch } from "vue";
|
|
3
|
+
import { formatRelative } from "../../../shared/utils/format-relative";
|
|
4
|
+
import { useObserveMigrations } from "../../composables/useObserveMigrations";
|
|
5
|
+
const { status, pending, error, refresh, run } = useObserveMigrations();
|
|
6
|
+
const statuses = computed(() => status.value?.statuses ?? []);
|
|
7
|
+
const notApplied = computed(() => statuses.value.filter((s) => s.state !== "applied"));
|
|
8
|
+
const appliedCount = computed(() => statuses.value.filter((s) => s.state === "applied").length);
|
|
9
|
+
const willBackup = computed(() => notApplied.value.some((s) => s.class === "destructive"));
|
|
10
|
+
const nextPendingId = computed(() => statuses.value.find((s) => s.state === "pending")?.id ?? null);
|
|
11
|
+
const running = ref(false);
|
|
12
|
+
const confirmOpen = ref(false);
|
|
13
|
+
const logLines = ref([]);
|
|
14
|
+
const termRef = ref(null);
|
|
15
|
+
watch(logLines, async () => {
|
|
16
|
+
await nextTick();
|
|
17
|
+
if (termRef.value) termRef.value.scrollTop = termRef.value.scrollHeight;
|
|
18
|
+
}, { deep: true });
|
|
19
|
+
function onFrame(frame) {
|
|
20
|
+
if (frame.type === "log") logLines.value.push(frame.line);
|
|
21
|
+
else if (frame.type === "error") logLines.value.push(`[error] ${frame.message}`);
|
|
22
|
+
else if (frame.type === "complete") {
|
|
23
|
+
logLines.value.push(
|
|
24
|
+
frame.failedAt ? `[complete] stopped at ${frame.failedAt} (applied ${frame.applied.length})` : `[complete] applied ${frame.applied.length} migration(s)`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function doRun(ids) {
|
|
29
|
+
if (running.value) return;
|
|
30
|
+
running.value = true;
|
|
31
|
+
logLines.value = [];
|
|
32
|
+
try {
|
|
33
|
+
await run(ids, onFrame);
|
|
34
|
+
} catch (e) {
|
|
35
|
+
logLines.value.push(`[error] ${e.message}`);
|
|
36
|
+
} finally {
|
|
37
|
+
running.value = false;
|
|
38
|
+
await refresh();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function onRunAll() {
|
|
42
|
+
confirmOpen.value = false;
|
|
43
|
+
await doRun(void 0);
|
|
44
|
+
}
|
|
45
|
+
function lineClass(line) {
|
|
46
|
+
if (line.startsWith("[fail]") || line.startsWith("[error]")) return "text-error";
|
|
47
|
+
if (line.startsWith("[ok]") || line.startsWith("[complete]")) return "text-success";
|
|
48
|
+
if (line.startsWith("[backup]")) return "text-warning";
|
|
49
|
+
if (line.startsWith("[run]")) return "text-primary";
|
|
50
|
+
return "text-muted";
|
|
51
|
+
}
|
|
52
|
+
const columns = computed(() => [
|
|
53
|
+
{ id: "id", accessorKey: "id", header: "Migration" },
|
|
54
|
+
{ id: "class", accessorKey: "class", header: "Class" },
|
|
55
|
+
{ id: "state", accessorKey: "state", header: "State" },
|
|
56
|
+
{ id: "applied", accessorKey: "applied_at", header: "Applied", meta: { class: { th: "text-right", td: "text-right tabular-nums" } } },
|
|
57
|
+
{ id: "actions", header: "" }
|
|
58
|
+
]);
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<div class="space-y-4">
|
|
63
|
+
<div class="flex items-center justify-between gap-3">
|
|
64
|
+
<p class="text-sm text-muted">
|
|
65
|
+
Additive schema migrations apply automatically at boot. Destructive migrations wait
|
|
66
|
+
here for an explicit admin run; a database backup is taken before the first one.
|
|
67
|
+
</p>
|
|
68
|
+
<ObserveCan capability="migrations.manage">
|
|
69
|
+
<UButton
|
|
70
|
+
v-if="notApplied.length"
|
|
71
|
+
icon="i-lucide-play"
|
|
72
|
+
color="error"
|
|
73
|
+
label="Run all pending"
|
|
74
|
+
:loading="running"
|
|
75
|
+
:disabled="running"
|
|
76
|
+
@click="() => {
|
|
77
|
+
confirmOpen = true;
|
|
78
|
+
}"
|
|
79
|
+
/>
|
|
80
|
+
</ObserveCan>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<UAlert
|
|
84
|
+
v-if="error"
|
|
85
|
+
color="error"
|
|
86
|
+
variant="subtle"
|
|
87
|
+
title="Failed to load migrations"
|
|
88
|
+
:description="error.message"
|
|
89
|
+
:actions="[{ label: 'Retry', color: 'error', variant: 'soft', onClick: () => refresh() }]"
|
|
90
|
+
/>
|
|
91
|
+
|
|
92
|
+
<template v-else>
|
|
93
|
+
<UAlert
|
|
94
|
+
v-if="(status?.driftWarnings?.length ?? 0) > 0"
|
|
95
|
+
color="warning"
|
|
96
|
+
variant="subtle"
|
|
97
|
+
icon="i-lucide-triangle-alert"
|
|
98
|
+
title="Checksum drift detected"
|
|
99
|
+
:description="`A shipped migration was edited after it ran: ${status?.driftWarnings.join(', ')}. This is a warning only; ship a corrective migration.`"
|
|
100
|
+
/>
|
|
101
|
+
|
|
102
|
+
<UAlert
|
|
103
|
+
v-if="!pending && notApplied.length === 0"
|
|
104
|
+
color="success"
|
|
105
|
+
variant="subtle"
|
|
106
|
+
icon="i-lucide-check"
|
|
107
|
+
title="Schema is up to date"
|
|
108
|
+
:description="`${appliedCount} migration(s) applied.`"
|
|
109
|
+
/>
|
|
110
|
+
|
|
111
|
+
<UCard :ui="{ body: 'p-0 sm:p-0' }">
|
|
112
|
+
<UTable
|
|
113
|
+
:data="statuses"
|
|
114
|
+
:columns="columns"
|
|
115
|
+
:loading="pending"
|
|
116
|
+
empty="No migrations registered."
|
|
117
|
+
>
|
|
118
|
+
<template #id-cell="{ row }">
|
|
119
|
+
<div class="font-medium">
|
|
120
|
+
{{ row.original.id }}
|
|
121
|
+
</div>
|
|
122
|
+
<div class="text-xs text-muted">
|
|
123
|
+
{{ row.original.description }}
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
<template #class-cell="{ row }">
|
|
127
|
+
<UBadge
|
|
128
|
+
:color="row.original.class === 'destructive' ? 'error' : 'neutral'"
|
|
129
|
+
variant="subtle"
|
|
130
|
+
:label="row.original.class"
|
|
131
|
+
/>
|
|
132
|
+
</template>
|
|
133
|
+
<template #state-cell="{ row }">
|
|
134
|
+
<div class="flex items-center gap-1.5">
|
|
135
|
+
<UBadge
|
|
136
|
+
:color="row.original.state === 'applied' ? 'success' : row.original.state === 'pending' ? 'warning' : 'neutral'"
|
|
137
|
+
variant="subtle"
|
|
138
|
+
:label="row.original.state"
|
|
139
|
+
/>
|
|
140
|
+
<UBadge
|
|
141
|
+
v-if="row.original.driftWarning"
|
|
142
|
+
color="warning"
|
|
143
|
+
variant="outline"
|
|
144
|
+
label="drift"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
<template #applied-cell="{ row }">
|
|
149
|
+
<span
|
|
150
|
+
v-if="row.original.applied_at"
|
|
151
|
+
class="text-muted"
|
|
152
|
+
>{{ formatRelative(row.original.applied_at) }}</span>
|
|
153
|
+
<span
|
|
154
|
+
v-else
|
|
155
|
+
class="text-dimmed"
|
|
156
|
+
>—</span>
|
|
157
|
+
</template>
|
|
158
|
+
<template #actions-cell="{ row }">
|
|
159
|
+
<ObserveCan capability="migrations.manage">
|
|
160
|
+
<div
|
|
161
|
+
v-if="row.original.state !== 'applied'"
|
|
162
|
+
class="flex justify-end"
|
|
163
|
+
>
|
|
164
|
+
<UButton
|
|
165
|
+
v-if="row.original.id === nextPendingId"
|
|
166
|
+
icon="i-lucide-play"
|
|
167
|
+
:color="row.original.class === 'destructive' ? 'error' : 'primary'"
|
|
168
|
+
variant="ghost"
|
|
169
|
+
size="xs"
|
|
170
|
+
label="Run this"
|
|
171
|
+
:loading="running"
|
|
172
|
+
:disabled="running"
|
|
173
|
+
@click="doRun([row.original.id])"
|
|
174
|
+
/>
|
|
175
|
+
<UTooltip
|
|
176
|
+
v-else
|
|
177
|
+
text="An earlier pending migration must run first."
|
|
178
|
+
>
|
|
179
|
+
<UButton
|
|
180
|
+
icon="i-lucide-play"
|
|
181
|
+
color="neutral"
|
|
182
|
+
variant="ghost"
|
|
183
|
+
size="xs"
|
|
184
|
+
label="Run this"
|
|
185
|
+
disabled
|
|
186
|
+
/>
|
|
187
|
+
</UTooltip>
|
|
188
|
+
</div>
|
|
189
|
+
</ObserveCan>
|
|
190
|
+
</template>
|
|
191
|
+
</UTable>
|
|
192
|
+
</UCard>
|
|
193
|
+
|
|
194
|
+
<UCard
|
|
195
|
+
v-if="logLines.length"
|
|
196
|
+
:ui="{ body: 'p-0 sm:p-0' }"
|
|
197
|
+
>
|
|
198
|
+
<template #header>
|
|
199
|
+
<div class="flex items-center gap-2">
|
|
200
|
+
<UIcon
|
|
201
|
+
name="i-lucide-terminal"
|
|
202
|
+
class="size-4"
|
|
203
|
+
/>
|
|
204
|
+
<span class="text-sm font-medium">Migration output</span>
|
|
205
|
+
</div>
|
|
206
|
+
</template>
|
|
207
|
+
<div
|
|
208
|
+
ref="termRef"
|
|
209
|
+
class="max-h-80 overflow-y-auto bg-elevated/40 p-3 font-mono text-xs leading-relaxed"
|
|
210
|
+
>
|
|
211
|
+
<div
|
|
212
|
+
v-for="(line, i) in logLines"
|
|
213
|
+
:key="i"
|
|
214
|
+
:class="lineClass(line)"
|
|
215
|
+
class="whitespace-pre-wrap"
|
|
216
|
+
>
|
|
217
|
+
{{ line }}
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</UCard>
|
|
221
|
+
</template>
|
|
222
|
+
|
|
223
|
+
<UModal
|
|
224
|
+
v-model:open="confirmOpen"
|
|
225
|
+
title="Run pending migrations"
|
|
226
|
+
>
|
|
227
|
+
<template #body>
|
|
228
|
+
<div class="space-y-3">
|
|
229
|
+
<p class="text-sm text-muted">
|
|
230
|
+
The following migration(s) will run in order:
|
|
231
|
+
</p>
|
|
232
|
+
<ul class="space-y-1 text-sm">
|
|
233
|
+
<li
|
|
234
|
+
v-for="m in notApplied"
|
|
235
|
+
:key="m.id"
|
|
236
|
+
class="flex items-center gap-2"
|
|
237
|
+
>
|
|
238
|
+
<UBadge
|
|
239
|
+
:color="m.class === 'destructive' ? 'error' : 'neutral'"
|
|
240
|
+
variant="subtle"
|
|
241
|
+
size="sm"
|
|
242
|
+
:label="m.class"
|
|
243
|
+
/>
|
|
244
|
+
<span class="font-mono">{{ m.id }}</span>
|
|
245
|
+
</li>
|
|
246
|
+
</ul>
|
|
247
|
+
<UAlert
|
|
248
|
+
v-if="willBackup"
|
|
249
|
+
color="warning"
|
|
250
|
+
variant="subtle"
|
|
251
|
+
icon="i-lucide-database-backup"
|
|
252
|
+
title="A database backup is taken first"
|
|
253
|
+
description="A copy of the SQLite file is written next to it before the first destructive migration runs."
|
|
254
|
+
/>
|
|
255
|
+
<div class="flex justify-end gap-2">
|
|
256
|
+
<UButton
|
|
257
|
+
color="neutral"
|
|
258
|
+
variant="ghost"
|
|
259
|
+
label="Cancel"
|
|
260
|
+
@click="() => {
|
|
261
|
+
confirmOpen = false;
|
|
262
|
+
}"
|
|
263
|
+
/>
|
|
264
|
+
<UButton
|
|
265
|
+
color="error"
|
|
266
|
+
label="Run migrations"
|
|
267
|
+
:loading="running"
|
|
268
|
+
@click="onRunAll"
|
|
269
|
+
/>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</template>
|
|
273
|
+
</UModal>
|
|
274
|
+
</div>
|
|
275
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|