11<script setup lang="ts">
2- import SortableColumn from " ../../components/SortableColumn .vue" ;
2+ import EndpointListColumnHeader from " ./EndpointListColumnHeader .vue" ;
33import EndpointListRow , { columnName } from " ./EndpointListRow.vue" ;
44import { useMonitoringStore } from " @/stores/MonitoringStore" ;
55import { storeToRefs } from " pinia" ;
66
77const monitoringStore = useMonitoringStore ();
88const { sortBy : activeColumn } = storeToRefs (monitoringStore );
9+
10+ type EndpointListColumn = {
11+ name: columnName ;
12+ displayName: string ;
13+ displayUnit? : string ;
14+ sort: string ;
15+ toolTip? : string ;
16+ };
17+
18+ const columns: EndpointListColumn [] = [
19+ {
20+ name: columnName .ENDPOINTNAME ,
21+ displayName: " Endpoint name" ,
22+ sort: columnName .ENDPOINTNAME ,
23+ },
24+ {
25+ name: columnName .QUEUELENGTH ,
26+ displayName: " Queue Length" ,
27+ displayUnit: " (MSGS)" ,
28+ sort: monitoringStore .endpointListIsGrouped ? " " : columnName .QUEUELENGTH ,
29+ toolTip: " Queue length: The number of messages waiting to be processed in the input queue(s) of the endpoint." ,
30+ },
31+ {
32+ name: columnName .THROUGHPUT ,
33+ displayName: " Throughput" ,
34+ displayUnit: " (msgs/s)" ,
35+ sort: monitoringStore .endpointListIsGrouped ? " " : columnName .THROUGHPUT ,
36+ toolTip: " Throughput: The number of messages per second successfully processed by a receiving endpoint." ,
37+ },
38+ {
39+ name: columnName .SCHEDULEDRETRIES ,
40+ displayName: " Scheduled retries" ,
41+ displayUnit: " (msgs/s)" ,
42+ sort: monitoringStore .endpointListIsGrouped ? " " : columnName .SCHEDULEDRETRIES ,
43+ toolTip: " Scheduled retries: The number of messages per second scheduled for retries (immediate or delayed)." ,
44+ },
45+ {
46+ name: columnName .PROCESSINGTIME ,
47+ displayName: " Processing Time" ,
48+ displayUnit: " (t)" ,
49+ sort: monitoringStore .endpointListIsGrouped ? " " : columnName .PROCESSINGTIME ,
50+ toolTip: " Processing time: The time taken for a receiving endpoint to successfully process a message." ,
51+ },
52+ {
53+ name: columnName .CRITICALTIME ,
54+ displayName: " Critical Time" ,
55+ displayUnit: " (t)" ,
56+ sort: monitoringStore .endpointListIsGrouped ? " " : columnName .CRITICALTIME ,
57+ toolTip: " Critical time: The elapsed time from when a message was sent, until it was successfully processed by a receiving endpoint." ,
58+ },
59+ ];
960 </script >
1061
1162<template >
1263 <section role =" table" aria-label =" endpoint-list" >
1364 <!-- Table headings-->
1465 <div role =" row" aria-label =" column-headers" class =" table-head-row" >
15- <div role =" columnheader" :aria-label =" columnName.ENDPOINTNAME" class =" table-first-col" >
16- <SortableColumn :sort-by =" columnName.ENDPOINTNAME" v-model =" activeColumn" :default-ascending =" true" >Endpoint name</SortableColumn >
17- </div >
18- <div role =" columnheader" :aria-label =" columnName.QUEUELENGTH" class =" table-col" >
19- <SortableColumn :sort-by =" monitoringStore.endpointListIsGrouped ? '' : columnName.QUEUELENGTH" v-model =" activeColumn" v-tippy =" 'Queue length: The number of messages waiting to be processed in the input queue(s) of the endpoint.'"
20- >Queue Length<template #unit >(MSGS)</template >
21- </SortableColumn >
22- </div >
23- <div role =" columnheader" :aria-label =" columnName.THROUGHPUT" class =" table-col" >
24- <SortableColumn :sort-by =" monitoringStore.endpointListIsGrouped ? '' : columnName.THROUGHPUT" v-model =" activeColumn" v-tippy =" 'Throughput: The number of messages per second successfully processed by a receiving endpoint.'"
25- >Throughput<template #unit >(msgs/s)</template >
26- </SortableColumn >
27- </div >
28- <div role =" columnheader" :aria-label =" columnName.SCHEDULEDRETRIES" class =" table-col" >
29- <SortableColumn :sort-by =" monitoringStore.endpointListIsGrouped ? '' : columnName.SCHEDULEDRETRIES" v-model =" activeColumn" v-tippy =" 'Scheduled retries: The number of messages per second scheduled for retries (immediate or delayed).'"
30- >Scheduled retries <template #unit >(msgs/s)</template >
31- </SortableColumn >
32- </div >
33- <div role =" columnheader" :aria-label =" columnName.PROCESSINGTIME" class =" table-col" >
34- <SortableColumn :sort-by =" monitoringStore.endpointListIsGrouped ? '' : columnName.PROCESSINGTIME" v-model =" activeColumn" v-tippy =" 'Processing time: The time taken for a receiving endpoint to successfully process a message.'"
35- >Processing Time <template #unit >(t)</template >
36- </SortableColumn >
37- </div >
38- <div role =" columnheader" :aria-label =" columnName.CRITICALTIME" class =" table-col" >
39- <SortableColumn
40- :sort-by =" monitoringStore.endpointListIsGrouped ? '' : columnName.CRITICALTIME"
41- v-model =" activeColumn"
42- v-tippy =" 'Critical time: The elapsed time from when a message was sent, until it was successfully processed by a receiving endpoint.'"
43- >Critical Time <template #unit >(t)</template >
44- </SortableColumn >
45- </div >
66+ <EndpointListColumnHeader
67+ v-for =" (column, i) in columns"
68+ :key =" column.name"
69+ :columnName =" column.name"
70+ :columnSort =" column.sort"
71+ :displayName =" column.displayName"
72+ :displayUnit =" column.displayUnit"
73+ :toolTip =" column.toolTip"
74+ :isFirstCol =" i === 0"
75+ v-model =" activeColumn"
76+ />
4677 </div >
4778 <div >
4879 <div v-if =" monitoringStore.endpointListIsGrouped" role =" rowgroup" aria-label =" grouped-endpoints" >
@@ -68,6 +99,7 @@ const { sortBy: activeColumn } = storeToRefs(monitoringStore);
6899
69100<style scoped>
70101@import " ./endpoint.css" ;
102+ @import " ./endpointTables.css" ;
71103
72104.endpoint-group-title {
73105 font-size : 14px ;
0 commit comments