Skip to content

Commit 5d7db79

Browse files
cquirosjandreasohlundpoornimanayar
authored
User indicator update for transactional session (#2456)
* User indicator update for transactional session * links in legend options * Apply suggestions from code review Co-authored-by: Poornima Nayar <[email protected]> * Individual legend components * Updated legends --------- Co-authored-by: Andreas Öhlund <[email protected]> Co-authored-by: Poornima Nayar <[email protected]>
1 parent b9cb7cb commit 5d7db79

11 files changed

+51
-13
lines changed

src/Frontend/src/views/throughputreport/EndpointsView.vue

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,26 @@ import routeLinks from "@/router/routeLinks";
33
import isRouteSelected from "@/composables/isRouteSelected";
44
import { UserIndicator } from "@/views/throughputreport/endpoints/userIndicator";
55
import { userIndicatorMapper } from "@/views/throughputreport/endpoints/userIndicatorMapper";
6-
import { ref } from "vue";
6+
import { ref, type Component } from "vue";
77
import { useThroughputStore } from "@/stores/ThroughputStore";
88
import { storeToRefs } from "pinia";
9+
import LegendNServiceBusEndpoint from "./LegendNServiceBusEndpoint.vue";
10+
import LegendNServiceBusEndpointNoLongerInUse from "./LegendNServiceBusEndpointNoLongerInUse.vue";
11+
import LegendTransactionalSessionProcessorEndpoint from "./LegendTransactionalSessionProcessorEndpoint.vue";
12+
import LegendSendOnlyEndpoint from "./LegendSendOnlyEndpoint.vue";
13+
import LegendPlannedToDecommission from "./LegendPlannedToDecommission.vue";
14+
import LegendNotNServiceBusEndpoint from "./LegendNotNServiceBusEndpoint.vue";
915
1016
const { isBrokerTransport } = storeToRefs(useThroughputStore());
1117
const showLegend = ref(true);
12-
const legendOptions = new Map<UserIndicator, string>([
13-
[UserIndicator.NServiceBusEndpoint, "Known NServiceBus Endpoint"],
14-
[UserIndicator.NServiceBusEndpointNoLongerInUse, "NServiceBus Endpoint that is no longer in use, usually this would have zero throughput"],
15-
[UserIndicator.SendOnlyOrTransactionSessionEndpoint, "If the endpoint has no throughput or the endpoint has Transactional Session feature enabled"],
16-
[UserIndicator.PlannedToDecommission, "If the endpoint is planned to no longer be used in the next 30 days"],
17-
[UserIndicator.NotNServiceBusEndpoint, "Not an NServiceBus Endpoint"],
18+
19+
const legendOptions = new Map<UserIndicator, Component>([
20+
[UserIndicator.NServiceBusEndpoint, LegendNServiceBusEndpoint],
21+
[UserIndicator.NServiceBusEndpointNoLongerInUse, LegendNServiceBusEndpointNoLongerInUse],
22+
[UserIndicator.TransactionalSessionProcessorEndpoint, LegendTransactionalSessionProcessorEndpoint],
23+
[UserIndicator.SendOnlyEndpoint, LegendSendOnlyEndpoint],
24+
[UserIndicator.PlannedToDecommission, LegendPlannedToDecommission],
25+
[UserIndicator.NotNServiceBusEndpoint, LegendNotNServiceBusEndpoint],
1826
]);
1927
2028
function toggleOptionsLegendVisible() {
@@ -32,8 +40,8 @@ function toggleOptionsLegendVisible() {
3240
<a href="#" :aria-label="`${showLegend ? 'Hide' : 'Show'} Endpoint Types meaning`" @click.prevent="toggleOptionsLegendVisible()">{{ showLegend ? "Hide" : "Show" }} Endpoint Types meaning.</a>
3341
</p>
3442
<div v-show="showLegend" class="alert alert-info">
35-
<div v-for="[key, value] in legendOptions" :key="key">
36-
<strong>{{ userIndicatorMapper.get(key) }}</strong> - {{ value }}.
43+
<div v-for="[key, LegendComponent] in legendOptions" :key="key">
44+
<strong>{{ userIndicatorMapper.get(key) }}</strong> - <component :is="LegendComponent" />.
3745
</div>
3846
</div>
3947
</div>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template>
2+
<span>
3+
Known NServiceBus
4+
<a href="https://docs.particular.net/nservicebus/endpoints/" target="_blank">Endpoint</a>
5+
</span>
6+
</template>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<span>NServiceBus Endpoint that is no longer in use, usually this would have zero throughput</span>
3+
</template>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<span>Not an NServiceBus Endpoint</span>
3+
</template>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<span>If the endpoint is planned to no longer be used in the next 30 days</span>
3+
</template>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<span>An endpoint that <a href="https://docs.particular.net/nservicebus/hosting/#self-hosting-send-only-hosting" target="_blank">only sends</a> messages and does not process any messages</span>
3+
</template>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<span> An <a href="https://docs.particular.net/nservicebus/transactional-session/#design-considerations" target="_blank">endpoint that is only processing transactional session control messages</a> </span>
3+
</template>

src/Frontend/src/views/throughputreport/endpoints/DetectedBrokerQueuesView.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ const { testResults } = storeToRefs(store);
2222
</template>
2323
<DetectedListView
2424
ariaLabel="Detected broker queues"
25-
:indicator-options="[UserIndicator.NServiceBusEndpoint, UserIndicator.NotNServiceBusEndpoint, UserIndicator.SendOnlyOrTransactionSessionEndpoint, UserIndicator.NServiceBusEndpointNoLongerInUse, UserIndicator.PlannedToDecommission]"
25+
:indicator-options="[
26+
UserIndicator.NServiceBusEndpoint,
27+
UserIndicator.NotNServiceBusEndpoint,
28+
UserIndicator.TransactionalSessionProcessorEndpoint,
29+
UserIndicator.SendOnlyEndpoint,
30+
UserIndicator.NServiceBusEndpointNoLongerInUse,
31+
UserIndicator.PlannedToDecommission,
32+
]"
2633
:source="DataSource.Broker"
2734
column-title="Queue Name"
2835
:show-endpoint-type-placeholder="true"

src/Frontend/src/views/throughputreport/endpoints/DetectedEndpointsView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const { isBrokerTransport, hasErrors } = storeToRefs(useThroughputStore());
2323
</template>
2424
<DetectedListView
2525
ariaLabel="Detected endpoints"
26-
:indicator-options="[UserIndicator.NServiceBusEndpoint, UserIndicator.SendOnlyOrTransactionSessionEndpoint, UserIndicator.NServiceBusEndpointNoLongerInUse, UserIndicator.PlannedToDecommission]"
26+
:indicator-options="[UserIndicator.NServiceBusEndpoint, UserIndicator.TransactionalSessionProcessorEndpoint, UserIndicator.SendOnlyEndpoint, UserIndicator.NServiceBusEndpointNoLongerInUse, UserIndicator.PlannedToDecommission]"
2727
:source="DataSource.WellKnownEndpoint"
2828
column-title="Endpoint Name"
2929
:show-endpoint-type-placeholder="false"
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
export enum UserIndicator {
22
NServiceBusEndpoint = "NServiceBusEndpoint",
33
NotNServiceBusEndpoint = "NotNServiceBusEndpoint",
4-
SendOnlyOrTransactionSessionEndpoint = "SendOnlyOrTransactionSessionEndpoint",
4+
TransactionalSessionProcessorEndpoint = "TransactionalSessionProcessorEndpoint",
5+
SendOnlyEndpoint = "SendOnlyEndpoint",
56
NServiceBusEndpointNoLongerInUse = "NServiceBusEndpointNoLongerInUse",
67
PlannedToDecommission = "PlannedToDecommission",
78
}

0 commit comments

Comments
 (0)