Skip to content

Commit c62f833

Browse files
committed
Merge branch 'sequence_diagram' into reverse_local_events_timeout
# Conflicts: # src/Frontend/src/components/messages/SequenceDiagram/RoutesComponent.vue
2 parents 9645d4a + 0b0f590 commit c62f833

File tree

7 files changed

+31
-28
lines changed

7 files changed

+31
-28
lines changed

src/Frontend/src/components/heartbeats/EndpointInstances.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function deleteInstance(instance: EndpointsView) {
8989
9090
async function deleteAllInstances() {
9191
try {
92-
await Promise.all(sortedInstances.value.filter((instance: EndpointsView) => instance.name === endpointName).map((instance: EndpointsView) => store.deleteEndpointInstance(instance)));
92+
await Promise.all(sortedInstances.value.filter((instance) => instance.name === endpointName).map((instance) => store.deleteEndpointInstance(instance)));
9393
useShowToast(TYPE.SUCCESS, "Endpoint deleted", "", false, { timeout: 1000 });
9494
await router.replace(backLink.value);
9595
} catch {

src/Frontend/src/components/heartbeats/HeartbeatConfiguration.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import HeartbeatsList from "./HeartbeatsList.vue";
1010
import { ref } from "vue";
1111
import ConfirmDialog from "@/components/ConfirmDialog.vue";
1212
import ResultsCount from "../ResultsCount.vue";
13-
import { LogicalEndpoint } from "@/resources/Heartbeat";
1413
1514
enum Operation {
1615
Track = "track",
@@ -36,7 +35,7 @@ async function proceedWarningDialog() {
3635
3736
try {
3837
await store.updateEndpointSettings(
39-
filteredEndpoints.value.filter((endpoint: LogicalEndpoint) => (dialogWarningOperation.value === Operation.Track && !endpoint.track_instances) || (dialogWarningOperation.value === Operation.DoNotTrack && endpoint.track_instances))
38+
filteredEndpoints.value.filter((endpoint) => (dialogWarningOperation.value === Operation.Track && !endpoint.track_instances) || (dialogWarningOperation.value === Operation.DoNotTrack && endpoint.track_instances))
4039
);
4140
useShowToast(TYPE.SUCCESS, `All endpoints set to '${dialogWarningOperation.value}'`, "", false, { timeout: 1000 });
4241
} catch {

src/Frontend/src/components/messages/SequenceDiagram/HandlersComponent.vue

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,21 @@ function setMessageTypeRef(el: SVGTextElement, index: number) {
7575
</script>
7676

7777
<template>
78-
<g>
79-
<g v-for="(handler, i) in handlerItems" :key="handler.id" :transform="`translate(${handler.left}, ${handler.y})`">
80-
<!--Handler Activation Box-->
81-
<rect :width="Handler_Width" :height="handler.height" :class="handler.incomingId && 'clickable'" :fill="handler.fill" @mouseover="() => store.setHighlightId(handler.incomingId)" @mouseleave="() => store.setHighlightId()" />
82-
<path v-if="handler.icon" :d="handler.icon" fill="white" :transform="`translate(${Handler_Width / 2 - handler.iconSize / 2}, ${handler.height / 2 - handler.iconSize / 2})`" />
83-
<!--Message Type and Icon-->
84-
<g
85-
v-if="handler.messageType"
86-
:transform="`translate(${handler.messageTypeOffset}, 4)`"
87-
class="clickable"
88-
:fill="handler.messageTypeHighlight ? 'var(--highlight)' : 'var(--gray40)'"
89-
@mouseover="() => store.setHighlightId(handler.incomingId)"
90-
@mouseleave="() => store.setHighlightId()"
91-
>
92-
<path d="M9,3L9,3 9,0 0,0 0,3 4,3 4,6 0,6 0,9 4,9 4,12 0,12 0,15 9,15 9,12 5,12 5,9 9,9 9,6 5,6 5,3z" />
93-
<text x="14" y="10" alignment-baseline="middle" :ref="(el) => setMessageTypeRef(el as SVGTextElement, i)">{{ handler.messageType }}</text>
94-
</g>
78+
<g v-for="(handler, i) in handlerItems" :key="handler.id" :transform="`translate(${handler.left}, ${handler.y})`">
79+
<!--Handler Activation Box-->
80+
<rect :width="Handler_Width" :height="handler.height" :class="handler.incomingId && 'clickable'" :fill="handler.fill" @mouseover="() => store.setHighlightId(handler.incomingId)" @mouseleave="() => store.setHighlightId()" />
81+
<path v-if="handler.icon" :d="handler.icon" fill="white" :transform="`translate(${Handler_Width / 2 - handler.iconSize / 2}, ${handler.height / 2 - handler.iconSize / 2})`" />
82+
<!--Message Type and Icon-->
83+
<g
84+
v-if="handler.messageType"
85+
:transform="`translate(${handler.messageTypeOffset}, 4)`"
86+
class="clickable"
87+
:fill="handler.messageTypeHighlight ? 'var(--highlight)' : 'var(--gray40)'"
88+
@mouseover="() => store.setHighlightId(handler.incomingId)"
89+
@mouseleave="() => store.setHighlightId()"
90+
>
91+
<path d="M9,3L9,3 9,0 0,0 0,3 4,3 4,6 0,6 0,9 4,9 4,12 0,12 0,15 9,15 9,12 5,12 5,9 9,9 9,6 5,6 5,3z" />
92+
<text x="14" y="10" alignment-baseline="middle" :ref="(el) => setMessageTypeRef(el as SVGTextElement, i)">{{ handler.messageType }}</text>
9593
</g>
9694
</g>
9795
</template>

src/Frontend/src/components/messages/SequenceDiagram/RoutesComponent.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,13 @@ function setMessageTypeRef(el: SVGTextElement, index: number) {
8585
@mouseover="() => store.setHighlightId(arrow.id)"
8686
@mouseleave="() => store.setHighlightId()"
8787
>
88-
<rect v-if="arrow.highlight && arrow.messageTypeOffset" :width="arrow.highlightTextWidth + 15 + Message_Type_Margin * 3" :height="arrow.highlightTextHeight + Message_Type_Margin * 2" fill="var(--highlight-background)" />
88+
<!--19 is width of MessageType icon, plus a gap-->
89+
<rect
90+
v-if="arrow.highlight && arrow.messageTypeOffset"
91+
:width="arrow.highlightTextWidth + 19 + Message_Type_Margin + Message_Type_Margin"
92+
:height="arrow.highlightTextHeight + Message_Type_Margin + Message_Type_Margin"
93+
fill="var(--highlight-background)"
94+
/>
8995
<svg :x="Message_Type_Margin" :y="Message_Type_Margin" width="15" height="15" viewBox="0 0 32 32">
9096
<path
9197
v-if="arrow.type === RoutedMessageType.Timeout"

src/Frontend/src/resources/SequenceDiagram/Endpoint.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ export function createSendingEndpoint(message: Message): Endpoint {
3030
}
3131

3232
export class EndpointRegistry {
33-
_store = new Map<string, EndpointItem>();
33+
#store = new Map<string, EndpointItem>();
3434

3535
register(item: Endpoint) {
36-
let endpoint = this._store.get(item.name);
36+
let endpoint = this.#store.get(item.name);
3737
if (!endpoint) {
3838
endpoint = item as EndpointItem;
39-
this._store.set(endpoint.name, endpoint);
39+
this.#store.set(endpoint.name, endpoint);
4040
}
4141

4242
item.hosts.forEach((host) => endpoint.addHost(host as Host));
4343
}
4444

4545
get(item: Endpoint) {
46-
return this._store.get(item.name)! as Endpoint;
46+
return this.#store.get(item.name)! as Endpoint;
4747
}
4848
}
4949

src/Frontend/src/stores/HeartbeatInstancesStore.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe("HeartbeatInstancesStore tests", () => {
8181
[{ name: "", track_instances: true }]
8282
);
8383

84-
const names = () => filteredInstances.value.map((value: EndpointsView) => value.host_display_name);
84+
const names = () => filteredInstances.value.map((value) => value.host_display_name);
8585
sortByInstances.value = { property: ColumnNames.InstanceName, isAscending: true };
8686
expect(names()).toEqual(["Anna", "John", "Oliver"]);
8787

src/Frontend/src/stores/HeartbeatsStore.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as precondition from "../../test/preconditions";
1010
import { EndpointSettings } from "@/resources/EndpointSettings";
1111
import { serviceControlWithHeartbeats } from "@/components/heartbeats/serviceControlWithHeartbeats";
1212
import flushPromises from "flush-promises";
13-
import { EndpointStatus, LogicalEndpoint } from "@/resources/Heartbeat";
13+
import { EndpointStatus } from "@/resources/Heartbeat";
1414
import { ColumnNames, useHeartbeatsStore } from "@/stores/HeartbeatsStore";
1515

1616
describe("HeartbeatsStore tests", () => {
@@ -302,7 +302,7 @@ describe("HeartbeatsStore tests", () => {
302302
]
303303
);
304304

305-
const names = () => filteredHealthyEndpoints.value.map((value: LogicalEndpoint) => value.name);
305+
const names = () => filteredHealthyEndpoints.value.map((value) => value.name);
306306

307307
sortByInstances.value = { property: ColumnNames.Name, isAscending: true };
308308
expect(names()).toEqual(["Anna", "John", "Oliver"]);

0 commit comments

Comments
 (0)