Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/dashboard/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ AXIOM_TOKEN=
CLICKHOUSE_URL=http://localhost:8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=

# Bugslide error tracking (Sentry-compatible, https://github.com/anbraten/bugslide)
# Get the DSN from your Bugslide instance
SENTRY_DSN=
16 changes: 7 additions & 9 deletions packages/dashboard/app/pages/organizations/[organizationId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
const route = useRoute();
const organizationId = computed(() => route.params.organizationId as string);

const {
data: organization,
refresh: refreshOrg,
pending,
} = await useFetch(() => `/api/organizations/${organizationId.value}`);
// Start the fetch and provide the reactive refs synchronously before any await,
// so Vue's provide/inject context is properly established for child pages during SSR.
const fetchResult = useFetch(() => `/api/organizations/${organizationId.value}`);
const { data: organization, refresh: refreshOrg, pending } = fetchResult;

typedProvide(
'org',
computed(() => organization.value!),
);
typedProvide('org', computed(() => organization.value!));
typedProvide('refreshOrg', refreshOrg);

await fetchResult;
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
<script setup lang="ts">
const route = useRoute();
const appName = computed(() => route.params.appName as string);
const { data: app, pending, refresh: refreshApp } = await useFetch(() => `/api/apps/by-name/${appName.value}`);

typedProvide(
'app',
computed(() => app.value!),
);
// Start the fetch and provide the reactive refs synchronously before any await,
// so Vue's provide/inject context is properly established for child pages during SSR.
const fetchResult = useFetch(() => `/api/apps/by-name/${appName.value}`);
const { data: app, pending, refresh: refreshApp } = fetchResult;

typedProvide('app', computed(() => app.value!));
typedProvide('refreshApp', refreshApp);

await fetchResult;
</script>
6 changes: 5 additions & 1 deletion packages/dashboard/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { defineNuxtConfig } from 'nuxt/config';

export default defineNuxtConfig({
modules: ['@nuxt/ui'],
modules: ['@nuxt/ui', '@sentry/nuxt/module'],

sentry: {
dsn: process.env.SENTRY_DSN,
},

runtimeConfig: {
auth: {
Expand Down
3 changes: 3 additions & 0 deletions packages/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"uplot": "^1.6.32",
"vue-tsc": "^3.2.5",
"zod": "^4.3.6"
},
"dependencies": {
"@sentry/nuxt": "^10.46.0"
}
}
6 changes: 6 additions & 0 deletions packages/dashboard/sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as Sentry from '@sentry/nuxt';

Sentry.init({
dsn: import.meta.env.SENTRY_DSN,
tracesSampleRate: 1.0,
});
6 changes: 6 additions & 0 deletions packages/dashboard/sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as Sentry from '@sentry/nuxt';

Sentry.init({
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1.0,
});
1,231 changes: 1,184 additions & 47 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Loading