From 4aaeda72f75639f4bded06cd797fa8ef8d8552b8 Mon Sep 17 00:00:00 2001 From: butschster Date: Sat, 9 Dec 2023 20:24:31 +0400 Subject: [PATCH] Improves tags for sentry page --- .../sentry/lib/normalize-sentry-event.ts | 3 +- src/entities/sentry/mocks/sentry-spiral.json | 1 + .../ui/sentry-page-tags/sentry-page-tags.vue | 81 +++++++++++-------- .../sentry/ui/sentry-page/sentry-page.vue | 1 - 4 files changed, 50 insertions(+), 36 deletions(-) diff --git a/src/entities/sentry/lib/normalize-sentry-event.ts b/src/entities/sentry/lib/normalize-sentry-event.ts index a8c5dd4c..88c3f38e 100644 --- a/src/entities/sentry/lib/normalize-sentry-event.ts +++ b/src/entities/sentry/lib/normalize-sentry-event.ts @@ -8,7 +8,8 @@ export const normalizeSentryEvent = (event: ServerEvent): NormalizedEven labels: [EVENT_TYPES.SENTRY, 'exception'], origin: { logger: event.payload.logger, - environment: event.payload.environment + environment: event.payload.environment, + release: event.payload?.release || '-', }, serverName: event.payload?.server_name || '', date: event.timestamp ? new Date(event.timestamp * 1000) : null, diff --git a/src/entities/sentry/mocks/sentry-spiral.json b/src/entities/sentry/mocks/sentry-spiral.json index c7fcf58c..ae8f8887 100644 --- a/src/entities/sentry/mocks/sentry-spiral.json +++ b/src/entities/sentry/mocks/sentry-spiral.json @@ -12,6 +12,7 @@ "logger": "php", "server_name": "ButschsterLpp", "environment": "production", + "release": "0.4.0", "modules": { "brick/math": "0.10.2", "clue/stream-filter": "v1.6.0", diff --git a/src/screens/sentry/ui/sentry-page-tags/sentry-page-tags.vue b/src/screens/sentry/ui/sentry-page-tags/sentry-page-tags.vue index a433c03b..8563eeab 100644 --- a/src/screens/sentry/ui/sentry-page-tags/sentry-page-tags.vue +++ b/src/screens/sentry/ui/sentry-page-tags/sentry-page-tags.vue @@ -30,8 +30,6 @@ const contextsOS = computed(() => { @@ -136,6 +145,10 @@ const contextsOS = computed(() => { @apply flex flex-row flex-wrap items-center text-purple-600 dark:text-purple-100 gap-3; } +.sentry-page-tags__labels-wrapper { + @apply bg-gray-50 dark:bg-gray-900 p-4 rounded-lg; +} + .sentry-page-tags__label { @apply flex border border-purple-300 rounded text-xs items-center; } diff --git a/src/screens/sentry/ui/sentry-page/sentry-page.vue b/src/screens/sentry/ui/sentry-page/sentry-page.vue index 76a189b4..c9e8efb7 100644 --- a/src/screens/sentry/ui/sentry-page/sentry-page.vue +++ b/src/screens/sentry/ui/sentry-page/sentry-page.vue @@ -35,7 +35,6 @@ const mainException = computed( class="sentry-page__main-exception-message" v-html="mainException.value" /> -

{{ formattedTimestamp }}