Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b148921
include audit section displaying audit messages
PhilBastian Mar 6, 2025
105cc68
show status icons
PhilBastian Mar 10, 2025
337fdef
Merge branch 'master' into si_integration
PhilBastian Mar 11, 2025
dd2cd69
add feature flag
PhilBastian Mar 11, 2025
36d7815
format message type as per SI
PhilBastian Mar 11, 2025
b281cf3
change name from audit to all messages and include message view route
PhilBastian Mar 11, 2025
f706a7f
display time_sent and processing_time values
PhilBastian Mar 11, 2025
db87e15
fix the body of the popup message in retry dialog
soujay Mar 13, 2025
ef84c78
Revert "fix the body of the popup message in retry dialog"
soujay Mar 13, 2025
2616724
enable auto refresh to be paused and to be configured after creation
PhilBastian Mar 13, 2025
0065abb
manual/auto refresh control
PhilBastian Mar 13, 2025
6933c0f
Merge branch 'si_integration' of https://github.com/Particular/Servic…
PhilBastian Mar 13, 2025
10ae9af
stripe results grid
PhilBastian Mar 13, 2025
0a510d0
change to use emits
PhilBastian Mar 13, 2025
ba62324
remove commented code
PhilBastian Mar 14, 2025
60e4bfa
add paging
PhilBastian Mar 14, 2025
322f801
implement server side sorting
PhilBastian Mar 14, 2025
9cf0ac4
scroll on list instead of view, allowing the table headers to always …
PhilBastian Mar 14, 2025
338d370
Merge branch 'master' into si_integration
PhilBastian Mar 16, 2025
3b206eb
change to use messages routing
PhilBastian Mar 16, 2025
9e77b04
increase default page size
PhilBastian Mar 16, 2025
be36fd2
add failedmessage redirect and remove unused message components
PhilBastian Mar 17, 2025
c2f286e
start converting conversation model from SI
PhilBastian Mar 18, 2025
83592dc
order messages
PhilBastian Mar 18, 2025
0a07896
Merge branch 'master' into sequence_diagram
PhilBastian Mar 19, 2025
6a3fdab
add endpoint host versions
PhilBastian Mar 19, 2025
b2e1204
convert handleritem logic from SI
PhilBastian Mar 19, 2025
72df26f
convert routedMessages (arrows) from SI
PhilBastian Mar 19, 2025
a89730a
display endpoints
PhilBastian Apr 1, 2025
90a0052
timeline
PhilBastian Apr 1, 2025
eb5ffa5
handlers
PhilBastian Apr 2, 2025
7350293
arrow (left to right)
PhilBastian Apr 2, 2025
19171da
expand SVG to fit larger diagrams
PhilBastian Apr 2, 2025
f24f540
fix handler map
PhilBastian Apr 3, 2025
a9b6488
fix messagetype text side
PhilBastian Apr 3, 2025
5108f2a
replace props and emits with a store
PhilBastian Apr 3, 2025
39929c2
highlight on handlers
PhilBastian Apr 3, 2025
29f435a
implement route highlight
PhilBastian Apr 3, 2025
2de64d6
hide sequence diagram behind feature flag
PhilBastian Apr 3, 2025
c926f54
Merge branch 'master' into sequence_diagram
PhilBastian Apr 3, 2025
9303f63
support local and response message flow
PhilBastian Apr 4, 2025
ff1666f
handle long message names being pushed off the svg surface
PhilBastian Apr 4, 2025
35e4232
handle handler messagetext offset less than 0 (buggy)
PhilBastian Apr 4, 2025
b32a4fd
display event as dashed line
PhilBastian Apr 4, 2025
9645d4a
handle events in SequenceDiagram
PhilBastian Apr 4, 2025
ed3aa5a
endpoint tooltips
PhilBastian Apr 7, 2025
0b0f590
address comments from review
PhilBastian Apr 7, 2025
c62f833
Merge branch 'sequence_diagram' into reverse_local_events_timeout
PhilBastian Apr 7, 2025
821947e
add comment for clarity
PhilBastian Apr 7, 2025
799eebb
Merge branch 'master' into reverse_local_events_timeout
PhilBastian Apr 7, 2025
20f3a71
fix merge issue
PhilBastian Apr 7, 2025
ec1a5b7
simplify name uniqueness
PhilBastian Apr 7, 2025
204c6c6
Merge branch 'reverse_local_events_timeout' into sd_tooltips
PhilBastian Apr 7, 2025
948a63e
Merge branch 'master' into sd_tooltips
PhilBastian Apr 7, 2025
b77f819
alignment to match SI
PhilBastian Apr 8, 2025
632a5cd
implement handler tooltip and move tooltip creation outside of render…
PhilBastian Apr 8, 2025
f969bea
implement handler tooltip and move tooltip creation outside of render…
PhilBastian Apr 8, 2025
85130da
Merge branch 'sd_tooltips' of https://github.com/Particular/ServicePu…
PhilBastian Apr 8, 2025
23b3a28
route tooltip
PhilBastian Apr 9, 2025
499fa1f
fix timeout detection
PhilBastian Apr 9, 2025
881c51a
fix sequence diagram not re-rendering on tab switch away and back
PhilBastian Apr 9, 2025
75b0fea
fix startX offset calculation
PhilBastian Apr 9, 2025
a7fd209
Merge branch 'master' into sd_tooltips
PhilBastian Apr 9, 2025
184a567
incorporate sequence diagram into new message view
PhilBastian Apr 9, 2025
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: 0 additions & 4 deletions src/Frontend/src/components/messages/MessageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import TimeSince from "../TimeSince.vue";
import moment from "moment";
import ConfirmDialog from "../ConfirmDialog.vue";
import FlowDiagram from "./FlowDiagram.vue";
import SequenceDiagram from "./SequenceDiagram.vue";
import EditRetryDialog from "../failedmessages/EditRetryDialog.vue";
import routeLinks from "@/router/routeLinks";
import { EditAndRetryConfig } from "@/resources/Configuration";
Expand Down Expand Up @@ -44,7 +43,6 @@ const showEditRetryModal = ref(false);

const configuration = useConfiguration();
const isMassTransitConnected = useIsMassTransitConnected();
const showAllMessages = window.defaultConfig.showAllMessages;

async function loadFailedMessage() {
const response = await useFetchFromServiceControl(`errors/last/${id.value}`);
Expand Down Expand Up @@ -351,13 +349,11 @@ onUnmounted(() => {
<h5 :class="{ active: panel === 2 }" class="nav-item" @click.prevent="togglePanel(2)"><a href="#">Message body</a></h5>
<h5 :class="{ active: panel === 3 }" class="nav-item" @click.prevent="togglePanel(3)"><a href="#">Headers</a></h5>
<h5 v-if="!isMassTransitConnected" :class="{ active: panel === 4 }" class="nav-item" @click.prevent="togglePanel(4)"><a href="#">Flow Diagram</a></h5>
<h5 v-if="showAllMessages" :class="{ active: panel === 5 }" class="nav-item" @click.prevent="togglePanel(5)"><a href="#">Sequence Diagram</a></h5>
</div>
<StackTraceView v-if="panel === 1 && failedMessage.exception?.stack_trace" :message="failedMessage" />
<BodyView v-if="panel === 2" :message="failedMessage" />
<HeadersView v-if="panel === 3" :message="failedMessage" />
<FlowDiagram v-if="panel === 4" :message="failedMessage" />
<SequenceDiagram v-if="showAllMessages && panel === 5" />
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/Frontend/src/components/messages2/FlowDiagram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const nodeSpacingX = 300;
const nodeSpacingY = 200;

const store = useMessageStore();
const { state } = storeToRefs(useMessageStore());
const { state } = storeToRefs(store);

async function getConversation(conversationId: string) {
await store.loadConversation(conversationId);
Expand Down
5 changes: 5 additions & 0 deletions src/Frontend/src/components/messages2/MessageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { RouterLink, useRoute } from "vue-router";
import NoData from "../NoData.vue";
import TimeSince from "../TimeSince.vue";
import FlowDiagram from "./FlowDiagram.vue";
import SequenceDiagram from "./SequenceDiagram.vue";
import routeLinks from "@/router/routeLinks";
import { useIsMassTransitConnected } from "@/composables/useIsMassTransitConnected";
import BodyView from "@/components/messages2/BodyView.vue";
Expand Down Expand Up @@ -51,6 +52,10 @@ const tabs = computed(() => {
text: "Flow Diagram",
component: FlowDiagram,
});
currentTabs.push({
text: "Sequence Diagram",
component: SequenceDiagram,
});
}

return currentTabs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import Handlers from "./SequenceDiagram/HandlersComponent.vue";
import Routes from "./SequenceDiagram/RoutesComponent.vue";
import { useSequenceDiagramStore } from "@/stores/SequenceDiagramStore";
import { storeToRefs } from "pinia";
import useTooltips from "./SequenceDiagram/tooltipOverlay.ts";
import { onMounted } from "vue";

const store = useSequenceDiagramStore();
store.setConversationId("39907d51-12e5-4202-82c3-b2b30077ebd4");

const { maxWidth, maxHeight } = storeToRefs(store);

useTooltips();

onMounted(() => store.refreshConversation());
</script>

<template>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<script setup lang="ts">
import { Endpoint } from "@/resources/SequenceDiagram/Endpoint";

defineProps<{ endpoint: Endpoint }>();
</script>

<template>
<div class="endpoint-tooltip">
<label>Name:</label>
<span>{{ endpoint.name }}</span>
<label>NSB Version:</label>
<span>{{ endpoint.version }}</span>
<label>Host:</label>
<span>{{ endpoint.host }}</span>
</div>
</template>

<style>
.endpoint-tooltip {
display: grid;
grid-template-columns: auto auto;
column-gap: 0.5em;
}

.endpoint-tooltip label {
grid-column: 1;
justify-self: end;
font-weight: bold;
color: #b3b3b3;
}

.endpoint-tooltip span {
word-break: break-all;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ const Endpoint_Image_Width = 20;
const store = useSequenceDiagramStore();
const { startX, endpoints } = storeToRefs(store);

const epRefs = ref<SVGTextElement[]>([]);
const epTextRefs = ref<SVGTextElement[]>([]);
const endpointItems = computed(() =>
endpoints.value.map((x, index) => {
const endpoint = x as EndpointWithLocation;
const el = epRefs.value[index];
const el = epTextRefs.value[index];
if (el) {
const bounds = el.getBBox();
const previousEndpoint = index > 0 ? endpointItems.value[index - 1] : undefined;
Expand Down Expand Up @@ -69,17 +69,17 @@ watch(endpointItems, () => {
});

watch(startX, () => {
epRefs.value = [];
epTextRefs.value = [];
endpoints.value.forEach((endpoint) => ((endpoint as EndpointWithLocation).surround = undefined));
});

function setEndpointRef(el: SVGTextElement, index: number) {
if (el) epRefs.value[index] = el;
function setEndpointTextRef(el: SVGTextElement, index: number) {
if (el) epTextRefs.value[index] = el;
}
</script>

<template>
<g v-for="(endpoint, i) in endpointItems" :key="endpoint.name" transform="translate(0,15)">
<g v-for="(endpoint, i) in endpointItems" :key="endpoint.name" transform="translate(0,15)" :ref="(el) => (endpoint.uiRef = el as SVGElement)">
<rect
v-if="endpoint.surround"
:x="endpoint.surround.x"
Expand All @@ -93,7 +93,7 @@ function setEndpointRef(el: SVGTextElement, index: number) {
></rect>
<g :transform="`translate(${(endpoint.x ?? Endpoint_Width / 2) - ((endpoint.textWidth ?? 0) + Endpoint_Image_Width) / 2}, 0)`">
<path fill="var(--gray40)" d="M 0,0 M 18,18 M 0,2 v 14 h 14 v -4 h -6 v -6 h 6 v -4 h -14 M 9,7 v 4 h 9 v -4"></path>
<text :x="Endpoint_Image_Width" y="10" alignment-baseline="middle" text-anchor="start" :ref="(el) => setEndpointRef(el as SVGTextElement, i)">{{ endpoint.name }}</text>
<text :x="Endpoint_Image_Width" y="10" alignment-baseline="middle" text-anchor="start" :ref="(el) => setEndpointTextRef(el as SVGTextElement, i)">{{ endpoint.name }}</text>
</g>
</g>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<script setup lang="ts">
import { useFormatTime } from "@/composables/formatter";
import { Handler } from "@/resources/SequenceDiagram/Handler";

defineProps<{ handler: Handler }>();

function formatTime(milliseconds: number) {
const time = useFormatTime(milliseconds);
return `${time.value} ${time.unit}`;
}
Comment on lines +7 to +10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be a component that is reused?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could use it in the list

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and probably other places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created an idea card

</script>

<template>
<div v-if="handler.id === 'First'">Start of Conversation</div>
<div v-else class="handler-tooltip">
<div class="title">Processing of Message</div>
<div class="details">
<label>Processing Time:</label>
<span>{{ formatTime(handler.processingTime ?? 0) }}</span>
<label>Processing Of:</label>
<span>{{ handler.name }}</span>
<label v-if="handler.partOfSaga">Sagas Invoked:</label>
<span v-if="handler.partOfSaga">{{ handler.partOfSaga }}</span>
</div>
</div>
</template>

<style>
.handler-tooltip {
display: flex;
flex-direction: column;
}

.handler-tooltip .title {
font-weight: bold;
}

.handler-tooltip .details {
display: grid;
grid-template-columns: auto auto;
column-gap: 0.5em;
}

.handler-tooltip label {
grid-column: 1;
justify-self: end;
font-weight: bold;
color: #b3b3b3;
}

.handler-tooltip span {
word-break: break-all;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,18 @@ const handlerItems = computed(() => {

//determine which side of the handler to render the messageType on. If it's the left side (for a right arrow) then we apply a negative offset
const messageTypeOffset = handler.direction === Direction.Right ? ((messageTypeElement?.getBBox().width ?? 0) + 24) * -1 : 20;
if (messageTypeOffset < 0) {
store.setStartX(-1 * messageTypeOffset);
const left = (endpoint?.centre ?? 0) - Handler_Width / 2;
const right = (endpoint?.centre ?? 0) + Handler_Width / 2;
if (left + messageTypeOffset < 0) {
store.setStartX(-1 * (left + messageTypeOffset) + 20);
}

return {
id: handler.id,
endpointName: handler.endpoint.name,
incomingId: handler.route?.name,
left: (endpoint?.centre ?? 0) - Handler_Width / 2,
right: (endpoint?.centre ?? 0) + Handler_Width / 2,
left,
right,
y,
height,
fill,
Expand All @@ -61,6 +63,7 @@ const handlerItems = computed(() => {
messageType: handler.name,
messageTypeOffset,
messageTypeHighlight: handler.route?.name === highlightId.value,
setUIRef: (el: SVGElement) => (handler.uiRef = el),
};
});

Expand All @@ -76,10 +79,12 @@ function setMessageTypeRef(el: SVGTextElement, index: number) {
</script>

<template>
<g v-for="(handler, i) in handlerItems" :key="handler.id" :transform="`translate(${handler.left}, ${handler.y})`">
<g v-for="(handler, i) in handlerItems" :key="`${handler.id}###${handler.endpointName}`" :transform="`translate(${handler.left}, ${handler.y})`">
<!--Handler Activation Box-->
<rect :width="Handler_Width" :height="handler.height" :class="handler.incomingId && 'clickable'" :fill="handler.fill" @mouseover="() => store.setHighlightId(handler.incomingId)" @mouseleave="() => store.setHighlightId()" />
<path v-if="handler.icon" :d="handler.icon" fill="white" :transform="`translate(${Handler_Width / 2 - handler.iconSize / 2}, ${handler.height / 2 - handler.iconSize / 2})`" />
<g :ref="(el) => handler.setUIRef(el as SVGElement)">
<rect :width="Handler_Width" :height="handler.height" :class="handler.incomingId && 'clickable'" :fill="handler.fill" @mouseover="() => store.setHighlightId(handler.incomingId)" @mouseleave="() => store.setHighlightId()" />
<path v-if="handler.icon" :d="handler.icon" fill="white" :transform="`translate(${Handler_Width / 2 - handler.iconSize / 2}, ${handler.height / 2 - handler.iconSize / 2})`" />
</g>
<!--Message Type and Icon-->
<g
v-if="handler.messageType"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<script setup lang="ts">
import { RoutedMessage, RoutedMessageType } from "@/resources/SequenceDiagram/RoutedMessage";

defineProps<{ routedMessage: RoutedMessage }>();
</script>

<template>
<div class="route-tooltip">
<div class="title">{{ RoutedMessageType[routedMessage.type] }}</div>
<div class="details">
<label>Message Type:</label>
<span>{{ routedMessage.name }}</span>
<label>Message Id:</label>
<span>{{ routedMessage.messageId }}</span>
<label>Sent From:</label>
<span>{{ `${routedMessage.sending.name}@${routedMessage.sending.host}` }}</span>
<label>Sent To:</label>
<span>{{ `${routedMessage.receiving.name}@${routedMessage.receiving.host}` }}</span>
</div>
</div>
</template>

<style>
.route-tooltip {
display: flex;
flex-direction: column;
}

.route-tooltip .title {
font-weight: bold;
}

.route-tooltip .details {
display: grid;
grid-template-columns: auto auto;
column-gap: 0.5em;
}

.route-tooltip label {
grid-column: 1;
justify-self: end;
font-weight: bold;
color: #b3b3b3;
}

.route-tooltip span {
word-break: break-all;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const arrows = computed(() =>
route.fromRoutedMessage.direction = direction;

if (messageTypeOffset < 0) {
store.setStartX(-1 * messageTypeOffset);
store.setStartX(-1 * messageTypeOffset + 20);
}

return {
Expand All @@ -53,6 +53,7 @@ const arrows = computed(() =>
highlight: highlightId.value === route.name,
highlightTextWidth: messageTypeElementBounds?.width,
highlightTextHeight: messageTypeElementBounds?.height,
setUIRef: (el: SVGElement) => (route.uiRef = el),
};
})
);
Expand All @@ -78,11 +79,12 @@ function setMessageTypeRef(el: SVGTextElement, index: number) {
</g>
<!--Message Type and Icon-->
<g
class="clickable"
class="clickable message-type"
:transform="`translate(${arrow.messageTypeOffset}, ${arrow.y - 7.5 - Message_Type_Margin})`"
:fill="arrow.highlight ? 'var(--highlight)' : 'black'"
@mouseover="() => store.setHighlightId(arrow.id)"
@mouseleave="() => store.setHighlightId()"
:ref="(el) => arrow.setUIRef(el as SVGElement)"
>
<!--19 is width of MessageType icon, plus a gap-->
<rect
Expand Down Expand Up @@ -113,4 +115,8 @@ function setMessageTypeRef(el: SVGTextElement, index: number) {
.clickable {
cursor: pointer;
}

.message-type text::selection {
fill: white;
}
</style>
Loading