Skip to content

Commit 0e6717c

Browse files
Simplify column headers.
1 parent 7b3f83f commit 0e6717c

File tree

5 files changed

+44
-116
lines changed

5 files changed

+44
-116
lines changed

src/Frontend/src/components/ColumnHeader.vue

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,25 @@ function toggleSort() {
4141
<span v-if="isSortActive">
4242
<i role="img" :class="sortIcon" :aria-label="sortIcon"></i>
4343
</span>
44-
<tippy v-if="slots.help" max-width="400px" :interactive="props.interactiveHelp">
45-
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
46-
<template #content>
47-
<slot name="help" />
48-
</template>
49-
</tippy>
5044
</span>
45+
<tippy v-if="slots.help" max-width="400px" :interactive="props.interactiveHelp">
46+
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
47+
<template #content>
48+
<slot name="help" />
49+
</template>
50+
</tippy>
5151
</button>
5252
<div v-else class="column-header">
5353
<span>
5454
{{ props.label }}
5555
<span class="table-header-unit"><slot name="unit"></slot></span>
56-
<tippy v-if="slots.help" max-width="400px" :interactive="props.interactiveHelp">
57-
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
58-
<template #content>
59-
<slot name="help" />
60-
</template>
61-
</tippy>
6256
</span>
57+
<tippy v-if="slots.help" max-width="400px" :interactive="props.interactiveHelp">
58+
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
59+
<template #content>
60+
<slot name="help" />
61+
</template>
62+
</tippy>
6363
</div>
6464
</div>
6565
</div>
@@ -75,6 +75,12 @@ function toggleSort() {
7575
display: flex;
7676
flex-wrap: wrap;
7777
}
78+
.column-header span,
79+
.column-header-button span {
80+
text-transform: uppercase;
81+
display: inline-block;
82+
text-align: left;
83+
}
7884
.column-header-button {
7985
background: none;
8086
border: none;
@@ -86,12 +92,6 @@ function toggleSort() {
8692
align-items: end;
8793
}
8894
89-
.column-header-button span {
90-
text-transform: uppercase;
91-
display: inline-block;
92-
text-align: left;
93-
}
94-
9595
.column-header-button:hover span {
9696
text-decoration: underline;
9797
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ async function toggleAlerts(instance: EndpointsView) {
159159
<!--Table headings-->
160160
<div role="row" aria-label="column-headers" class="row table-head-row" :style="{ borderTop: 0 }">
161161
<ColumnHeader :name="ColumnNames.InstanceName" label="Host Name" columnClass="col-6" v-model="sortByInstances" sortable default-ascending />
162-
<ColumnHeader :name="ColumnNames.LastHeartbeat" label="Last Heartbeat" columnClass="col-2" :sortable="true" v-model="sortByInstances" />
162+
<ColumnHeader :name="ColumnNames.LastHeartbeat" label="Last Heartbeat" columnClass="col-2" v-model="sortByInstances" sortable />
163163
<ColumnHeader :name="ColumnNames.MuteToggle" label="Mute Alerts" columnClass="col-2 centre" v-model="sortByInstances">
164164
<template #help>Mute an instance when you are planning to take the instance offline to do maintenance or some other reason. This will prevent alerts on the dashboard.</template>
165165
</ColumnHeader>
166-
<ColumnHeader name="actions" label="Actions" columnClass="col-1" :sortable="false" :interactive-help="true" v-model="sortByInstances">
166+
<ColumnHeader name="actions" label="Actions" columnClass="col-1" interactive-help v-model="sortByInstances">
167167
<template #help>
168168
<div class="d-flex align-items-center p-1">
169169
<button type="button" class="btn btn-danger btn-ms text-nowrap me-3" @click="deleteAllInstances()"><i class="fa fa-trash text-white" /> Delete</button>
170-
<span style="text-transform: none">Delete an instance when that instance has been decommissioned.</span>
170+
<span>Delete an instance when that instance has been decommissioned.</span>
171171
</div>
172172
</template>
173173
</ColumnHeader>

src/Frontend/src/components/heartbeats/HeartbeatsList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function endpointHealth(endpoint: LogicalEndpoint) {
4444
<div role="row" aria-label="column-headers" class="row table-head-row" :style="{ borderTop: 0 }">
4545
<ColumnHeader v-if="columns.includes(ColumnNames.Name)" :name="ColumnNames.Name" label="Name" columnClass="col-6" sortable v-model="sortByInstances" default-ascending />
4646
<ColumnHeader v-if="columns.includes(ColumnNames.InstancesDown)" :name="ColumnNames.InstancesDown" label="Instances Down" columnClass="col-2" sortable v-model="sortByInstances" default-ascending />
47-
<ColumnHeader v-if="columns.includes(ColumnNames.InstancesTotal)" :name="ColumnNames.InstancesTotal" label="Instances Total" columnClass="col-2" sortable v-model="sortByInstances" default-ascending />
47+
<ColumnHeader v-if="columns.includes(ColumnNames.InstancesTotal)" :name="ColumnNames.InstancesTotal" label="Instances" columnClass="col-2" sortable v-model="sortByInstances" default-ascending />
4848
<ColumnHeader v-if="columns.includes(ColumnNames.LastHeartbeat)" :name="ColumnNames.LastHeartbeat" label="Last Heartbeat" columnClass="col-2" sortable v-model="sortByInstances" />
4949
<ColumnHeader v-if="columns.includes(ColumnNames.Tracked)" :name="ColumnNames.Tracked" label="Track Instances" columnClass="col-1 centre" sortable v-model="sortByInstances" />
5050
<ColumnHeader v-if="columns.includes(ColumnNames.TrackToggle)" :name="ColumnNames.TrackToggle" label="Track Instances" columnClass="col-2 centre" sortable v-model="sortByInstances" />

src/Frontend/src/components/monitoring/EndpointList.vue

Lines changed: 22 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,38 @@
11
<script setup lang="ts">
2-
import EndpointListColumnHeader from "./EndpointListColumnHeader.vue";
2+
import ColumnHeader from "../ColumnHeader.vue";
33
import EndpointListRow, { columnName } from "./EndpointListRow.vue";
44
import { useMonitoringStore } from "@/stores/MonitoringStore";
55
import { storeToRefs } from "pinia";
66
77
const monitoringStore = useMonitoringStore();
88
const { 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-
];
609
</script>
6110

6211
<template>
6312
<section role="table" aria-label="endpoint-list">
6413
<!--Table headings-->
6514
<div role="row" aria-label="column-headers" class="table-head-row">
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-
/>
15+
<ColumnHeader :name="columnName.ENDPOINTNAME" label="Endpoint name" column-class="table-first-col" v-model="activeColumn" sortable default-ascending />
16+
<ColumnHeader :name="columnName.QUEUELENGTH" label="Queue length" column-class="table-col" v-model="activeColumn" sortable :sort-by="monitoringStore.endpointListIsGrouped ? '' : columnName.QUEUELENGTH">
17+
<template #unit>(msgs)</template>
18+
<template #help>Queue length: The number of messages waiting to be processed in the input queue(s) of the endpoint.</template>
19+
</ColumnHeader>
20+
<ColumnHeader :name="columnName.THROUGHPUT" label="Throughput" column-class="table-col" v-model="activeColumn" sortable :sort-by="monitoringStore.endpointListIsGrouped ? '' : columnName.THROUGHPUT">
21+
<template #unit>(msgs/s)</template>
22+
<template #help>Throughput: The number of messages per second successfully processed by a receiving endpoint.</template>
23+
</ColumnHeader>
24+
<ColumnHeader :name="columnName.SCHEDULEDRETRIES" label="Scheduled retries" column-class="table-col" v-model="activeColumn" sortable :sort-by="monitoringStore.endpointListIsGrouped ? '' : columnName.SCHEDULEDRETRIES">
25+
<template #unit>(msgs/s)</template>
26+
<template #help>Scheduled retries: The number of messages per second scheduled for retries (immediate or delayed).</template>
27+
</ColumnHeader>
28+
<ColumnHeader :name="columnName.PROCESSINGTIME" label="Processing time" column-class="table-col" v-model="activeColumn" sortable :sort-by="monitoringStore.endpointListIsGrouped ? '' : columnName.PROCESSINGTIME">
29+
<template #unit>(t)</template>
30+
<template #help>Processing time: The time taken for a receiving endpoint to successfully process a message.</template>
31+
</ColumnHeader>
32+
<ColumnHeader :name="columnName.CRITICALTIME" label="Critical time" column-class="table-col" v-model="activeColumn" sortable :sort-by="monitoringStore.endpointListIsGrouped ? '' : columnName.CRITICALTIME">
33+
<template #unit>(t)</template>
34+
<template #help>Critical time: The elapsed time from when a message was sent, until it was successfully processed by a receiving endpoint.</template>
35+
</ColumnHeader>
7736
</div>
7837
<div>
7938
<div v-if="monitoringStore.endpointListIsGrouped" role="rowgroup" aria-label="grouped-endpoints">

src/Frontend/src/components/monitoring/EndpointListColumnHeader.vue

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)