Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/Frontend/src/components/messages2/SequenceDiagram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useSequenceDiagramStore } from "@/stores/SequenceDiagramStore";
import { storeToRefs } from "pinia";
import useTooltips from "./SequenceDiagram/tooltipOverlay.ts";
import { onMounted, ref } from "vue";

import LoadingSpinner from "@/components/LoadingSpinner.vue";
const store = useSequenceDiagramStore();
const { maxWidth, maxHeight } = storeToRefs(store);
const endpointYOffset = ref(0);
Expand All @@ -22,6 +22,7 @@ onMounted(() => store.refreshConversation());
<div class="toolbar">
<a class="help-link" target="_blank" href="https://docs.particular.net/servicepulse/sequence-diagram"><i class="fa fa-info-circle" /> Sequence Diagram Help</a>
</div>
<LoadingSpinner v-if="store.isLoading" />
<div class="outer" @scroll="(ev) => (endpointYOffset = (ev.target as Element).scrollTop)">
<svg class="sequence-diagram" :style="{ width: `max(100%, ${isNaN(maxWidth) ? 0 : maxWidth}px)` }" :height="maxHeight + 20">
<Timeline />
Expand Down
2 changes: 2 additions & 0 deletions src/Frontend/src/stores/SequenceDiagramStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const useSequenceDiagramStore = defineStore("SequenceDiagramStore", () =>
const handlerLocations = ref<HandlerLocation[]>([]);
const highlightId = ref<string>();

const isLoading = computed(() => state.value.loading || !endpoints.value.length || !handlers.value.length || !routes.value.length);
const selectedId = computed(() => `${state.value.data.message_type ?? ""}(${state.value.data.id})`);

watch(
Expand Down Expand Up @@ -104,6 +105,7 @@ export const useSequenceDiagramStore = defineStore("SequenceDiagramStore", () =>
handlerLocations,
highlightId,
selectedId,
isLoading,
setStartX,
setMaxWidth,
setMaxHeight,
Expand Down