From 44ac18acf353ba4e424da49f890e8b8584e1e451 Mon Sep 17 00:00:00 2001 From: Adam Furmanek Date: Wed, 13 Aug 2025 14:24:56 +0200 Subject: [PATCH 1/2] Indicating when the body wasn't stored for the audited message --- src/Frontend/src/components/messages/BodyView.vue | 4 ++++ src/Frontend/src/stores/MessageStore.ts | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Frontend/src/components/messages/BodyView.vue b/src/Frontend/src/components/messages/BodyView.vue index 62222c599..ceb1e8d8b 100644 --- a/src/Frontend/src/components/messages/BodyView.vue +++ b/src/Frontend/src/components/messages/BodyView.vue @@ -25,6 +25,10 @@ const body = computed(() => bodyState.value.data.value);
Could not find the message body. This could be because the message URL is invalid or the corresponding message was processed and is no longer tracked by ServiceControl.
Message body unavailable.
+
+ Body was too large and not stored. Edit ServiceControl/MaxBodySizeToStore to be larger in the + ServiceControl configuration. +
Message body cannot be displayed because content type "{{ bodyState.data.content_type }}" is not supported.
diff --git a/src/Frontend/src/stores/MessageStore.ts b/src/Frontend/src/stores/MessageStore.ts index c3d1ee19d..a746ffd10 100644 --- a/src/Frontend/src/stores/MessageStore.ts +++ b/src/Frontend/src/stores/MessageStore.ts @@ -61,7 +61,7 @@ interface Model { export const useMessageStore = defineStore("MessageStore", () => { const headers = ref>({ data: [] }); - const body = ref>({ data: {} }); + const body = ref>({ data: {} }); const state = reactive>({ data: { failure_metadata: {}, failure_status: {}, dialog_status: {}, invoked_saga: {} } }); let bodyLoadedId = ""; let conversationLoadedId = ""; @@ -204,6 +204,12 @@ export const useMessageStore = defineStore("MessageStore", () => { return; } + if (response.status === 204) { + body.value.data.no_content = true; + + return; + } + const contentType = response.headers.get("content-type"); body.value.data.content_type = contentType ?? "text/plain"; body.value.data.value = await response.text(); @@ -288,7 +294,7 @@ export const useMessageStore = defineStore("MessageStore", () => { await downloadBody(); - if (!(body.value.not_found || body.value.failed_to_load)) { + if (!(body.value.not_found || body.value.failed_to_load || body.value.data.no_content)) { exportString += "\n\nMESSAGE BODY\n"; exportString += body.value.data.value; } From 2fd4aa0a83476637d25f875333a17f5ef0211ab7 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Sun, 17 Aug 2025 13:32:44 +0200 Subject: [PATCH 2/2] Address saga history --- .../src/components/messages/SagaDiagram/MessageDataBox.vue | 2 +- src/Frontend/src/stores/SagaDiagramStore.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue b/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue index 811b4392a..4124fe83f 100644 --- a/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue +++ b/src/Frontend/src/components/messages/SagaDiagram/MessageDataBox.vue @@ -30,7 +30,7 @@ const body = computed(() => props.messageData.body.data.value || "");
Failed to load message data, there might be a connection issue or the message may no longer be available.
-
+
No message body data available
diff --git a/src/Frontend/src/stores/SagaDiagramStore.ts b/src/Frontend/src/stores/SagaDiagramStore.ts index bbd06884b..cbea7e1da 100644 --- a/src/Frontend/src/stores/SagaDiagramStore.ts +++ b/src/Frontend/src/stores/SagaDiagramStore.ts @@ -10,7 +10,7 @@ import { useMessageStore } from "./MessageStore"; export interface SagaMessageData { message_id: string; - body: DataContainer<{ value?: string; content_type?: string }>; + body: DataContainer<{ value?: string; content_type?: string; no_content?: boolean }>; } export const useSagaDiagramStore = defineStore("SagaDiagramStore", () => { const sagaHistory = ref(null); @@ -101,6 +101,11 @@ export const useSagaDiagramStore = defineStore("SagaDiagramStore", () => { return result; } + if (response.status === 204) { + result.body.data.no_content = true; + return result; + } + const contentType = response.headers.get("content-type"); result.body.data.content_type = contentType ?? "text/plain"; result.body.data.value = await response.text();