@@ -5,7 +5,7 @@ import TimeSince from "../../TimeSince.vue";
5
5
import routeLinks from " @/router/routeLinks.ts" ;
6
6
import Message , { MessageIntent , MessageStatus , SagaInfo } from " @/resources/Message.ts" ;
7
7
import { NServiceBusHeaders } from " @/resources/Header.ts" ;
8
- import { ControlButton , Controls } from " @vue-flow/controls" ;
8
+ import { Controls } from " @vue-flow/controls" ;
9
9
import { useMessageStore } from " @/stores/MessageStore.ts" ;
10
10
import LoadingSpinner from " @/components/LoadingSpinner.vue" ;
11
11
import { storeToRefs } from " pinia" ;
@@ -204,7 +204,7 @@ onMounted(async () => {
204
204
});
205
205
206
206
async function layoutGraph() {
207
- nodes .value = layout (nodes .value , edges .value , showAddress . value );
207
+ nodes .value = layout (nodes .value , edges .value );
208
208
209
209
await nextTick (() => {
210
210
if (store .state .data .id ) {
@@ -213,42 +213,31 @@ async function layoutGraph() {
213
213
});
214
214
}
215
215
216
- const showAddress = ref (true );
217
-
218
- async function toggleAddress() {
219
- showAddress .value = ! showAddress .value ;
220
- await layoutGraph ();
221
- }
222
-
223
- const blackColor = hexToCSSFilter (" #000000" ).filter ;
224
- const greenColor = hexToCSSFilter (" #1E5E3C" ).filter ;
225
216
const errorColor = hexToCSSFilter (" #be514a" ).filter ;
217
+ const selectedErrorColor = hexToCSSFilter (" #e8e6e8" ).filter ;
226
218
</script >
227
219
228
220
<template >
229
221
<div v-if =" store.conversationData.failed_to_load" class =" alert alert-info" >FlowDiagram data is unavailable.</div >
230
222
<LoadingSpinner v-else-if =" store.conversationData.loading" />
231
223
<div v-else id =" tree-container" >
232
224
<VueFlow :nodes =" nodes" :edges =" edges" :min-zoom =" 0.1" :max-zoom =" 1.2" :only-render-visible-elements =" true" @nodes-initialized =" layoutGraph" >
233
- <Controls :show-interactive =" false" position =" top-left" class =" controls" >
234
- <ControlButton v-tippy =" showAddress ? `Hide endpoints` : `Show endpoints`" @click =" toggleAddress" >
235
- <i class =" fa pa-flow-endpoint" :style =" { filter: showAddress ? greenColor : blackColor }" ></i >
236
- </ControlButton >
237
- </Controls >
225
+ <Controls :show-interactive =" false" position =" top-left" class =" controls" />
238
226
<template #node-message =" { id , data }: { id: string ; data : NodeData } " >
239
- <div v-if =" showAddress" >
240
- <TextEllipses class =" address" :text =" `${data.sendingEndpoint.name}@${data.sendingEndpoint.host}`" />
241
- </div >
227
+ <TextEllipses class =" address" :text =" `${data.sendingEndpoint.name}@${data.sendingEndpoint.host}`" />
242
228
<div class =" node" :class =" { error: data.isError, 'current-message': id === store.state.data.id }" >
243
229
<div class =" node-text" >
244
- <i class =" fa" :class =" { 'pa-flow-timeout': data.isTimeout, 'pa-flow-command': data.isCommand, 'pa-flow-event': data.isEvent }" v-tippy =" data.type" />
245
- <div class =" lead" >
246
- <strong >
247
- <RouterLink v-if =" data.isError" :to =" { path: routeLinks.messages.failedMessage.link(id), query: { back: backLink } }" ><TextEllipses style =" width : 204px " :text =" data.label" ellipses-style =" LeftSide" /></RouterLink >
248
- <RouterLink v-else :to =" { path: routeLinks.messages.successMessage.link(data.messageId, id), query: { back: backLink } }" ><TextEllipses style =" width : 204px " :text =" data.label" ellipses-style =" LeftSide" /></RouterLink >
249
- </strong >
230
+ <i
231
+ class =" fa"
232
+ :style =" data.isError && id === store.state.data.id ? { filter: selectedErrorColor } : {}"
233
+ :class =" { 'pa-flow-timeout': data.isTimeout, 'pa-flow-command': data.isCommand, 'pa-flow-event': data.isEvent }"
234
+ v-tippy =" data.type"
235
+ />
236
+ <div class =" typeName" >
237
+ <RouterLink v-if =" data.isError" :to =" { path: routeLinks.messages.failedMessage.link(id), query: { back: backLink } }" ><TextEllipses style =" width : 204px " :text =" data.label" ellipses-style =" LeftSide" /></RouterLink >
238
+ <RouterLink v-else :to =" { path: routeLinks.messages.successMessage.link(data.messageId, id), query: { back: backLink } }" ><TextEllipses style =" width : 204px " :text =" data.label" ellipses-style =" LeftSide" /></RouterLink >
250
239
</div >
251
- <i v-if =" data.isError" class =" fa pa-flow-failed" :style =" id !== store.state.data.id ? { filter: errorColor } : {}" />
240
+ <i v-if =" data.isError" class =" fa pa-flow-failed" :style =" id !== store.state.data.id ? { filter: errorColor } : { filter: selectedErrorColor }" />
252
241
<div class =" time-sent" >
253
242
<time-since class =" time-since" :date-utc =" data.timeSent" />
254
243
</div >
@@ -264,9 +253,7 @@ const errorColor = hexToCSSFilter("#be514a").filter;
264
253
</div >
265
254
</div >
266
255
</div >
267
- <div v-if =" showAddress" >
268
- <TextEllipses class =" address" :text =" `${data.receivingEndpoint.name}@${data.receivingEndpoint.host}`" />
269
- </div >
256
+ <TextEllipses class =" address" :text =" `${data.receivingEndpoint.name}@${data.receivingEndpoint.host}`" />
270
257
</template >
271
258
</VueFlow >
272
259
</div >
@@ -347,10 +334,14 @@ const errorColor = hexToCSSFilter("#be514a").filter;
347
334
margin-right : 5px ;
348
335
}
349
336
350
- .node-text .lead {
337
+ .node-text .typeName {
351
338
display : inline-block ;
352
339
position : relative ;
353
- top : 4px ;
340
+ font-weight : bold ;
341
+ }
342
+
343
+ .node-text a {
344
+ color : #777f7f ;
354
345
}
355
346
356
347
.address {
@@ -369,6 +360,15 @@ const errorColor = hexToCSSFilter("#be514a").filter;
369
360
background-color : #be514a !important ;
370
361
}
371
362
363
+ .current-message.error .node-text .typeName a {
364
+ color : #e8e6e8 ;
365
+ font-weight : 900 ;
366
+ }
367
+
368
+ .current-message.error .node-text .time-since {
369
+ color : #e8e6e8 ;
370
+ }
371
+
372
372
.error {
373
373
border-color : #be514a ;
374
374
}
@@ -386,14 +386,6 @@ const errorColor = hexToCSSFilter("#be514a").filter;
386
386
text-decoration : underline ;
387
387
}
388
388
389
- .pa-flow-endpoint {
390
- background-image : url (" @/assets/endpoint.svg" );
391
- background-position : center ;
392
- background-repeat : no-repeat ;
393
- height : 15px ;
394
- width : 15px ;
395
- }
396
-
397
389
.pa-flow-failed {
398
390
background-image : url (" @/assets/failed-msg.svg" );
399
391
background-position : center ;
0 commit comments