Skip to content

Commit 9cf0ac4

Browse files
committed
scroll on list instead of view, allowing the table headers to always be visible
1 parent 322f801 commit 9cf0ac4

File tree

2 files changed

+48
-22
lines changed

2 files changed

+48
-22
lines changed

src/Frontend/src/components/audit/AuditList.vue

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,31 @@ function formatDotNetTimespan(timespan: string) {
6666
</script>
6767

6868
<template>
69-
<RefreshConfig id="auditListRefresh" @change="store.updateRefreshTimer" @manual-refresh="store.refresh" />
70-
<section role="table" aria-label="endpoint-instances">
71-
<!--Table headings-->
72-
<div role="row" aria-label="column-headers" class="row table-head-row" :style="{ borderTop: 0 }">
73-
<div role="columnheader" :aria-label="ColumnNames.Status" class="status">
74-
<SortableColumn :sort-by="ColumnNames.Status" v-model="sortByInstances" :default-ascending="true">Status</SortableColumn>
75-
</div>
76-
<div role="columnheader" :aria-label="ColumnNames.MessageId" class="col-3">
77-
<SortableColumn :sort-by="ColumnNames.MessageId" v-model="sortByInstances" :default-ascending="true">Message Id</SortableColumn>
78-
</div>
79-
<div role="columnheader" :aria-label="ColumnNames.MessageType" class="col-3">
80-
<SortableColumn :sort-by="ColumnNames.MessageType" v-model="sortByInstances" :default-ascending="true">Type</SortableColumn>
81-
</div>
82-
<div role="columnheader" :aria-label="ColumnNames.TimeSent" class="col-2">
83-
<SortableColumn :sort-by="ColumnNames.TimeSent" v-model="sortByInstances">Time Sent</SortableColumn>
84-
</div>
85-
<div role="columnheader" :aria-label="ColumnNames.ProcessingTime" class="col-2">
86-
<SortableColumn :sort-by="ColumnNames.ProcessingTime" v-model="sortByInstances">Processing Time</SortableColumn>
69+
<section class="section-table" role="table" aria-label="endpoint-instances">
70+
<div class="header">
71+
<RefreshConfig id="auditListRefresh" @change="store.updateRefreshTimer" @manual-refresh="store.refresh" />
72+
<!--Table headings-->
73+
<div role="row" aria-label="column-headers" class="row table-head-row" :style="{ borderTop: 0 }">
74+
<div role="columnheader" :aria-label="ColumnNames.Status" class="status">
75+
<SortableColumn :sort-by="ColumnNames.Status" v-model="sortByInstances" :default-ascending="true">Status</SortableColumn>
76+
</div>
77+
<div role="columnheader" :aria-label="ColumnNames.MessageId" class="col-3">
78+
<SortableColumn :sort-by="ColumnNames.MessageId" v-model="sortByInstances" :default-ascending="true">Message Id</SortableColumn>
79+
</div>
80+
<div role="columnheader" :aria-label="ColumnNames.MessageType" class="col-3">
81+
<SortableColumn :sort-by="ColumnNames.MessageType" v-model="sortByInstances" :default-ascending="true">Type</SortableColumn>
82+
</div>
83+
<div role="columnheader" :aria-label="ColumnNames.TimeSent" class="col-2">
84+
<SortableColumn :sort-by="ColumnNames.TimeSent" v-model="sortByInstances">Time Sent</SortableColumn>
85+
</div>
86+
<div role="columnheader" :aria-label="ColumnNames.ProcessingTime" class="col-2">
87+
<SortableColumn :sort-by="ColumnNames.ProcessingTime" v-model="sortByInstances">Processing Time</SortableColumn>
88+
</div>
8789
</div>
8890
</div>
8991
<!--Table rows-->
9092
<!--NOTE: currently the DataView pages on the client only: we need to make it server data aware (i.e. the total will be the count from the server, not the length of the data we have locally)-->
91-
<div role="rowgroup" aria-label="endpoints">
93+
<div class="messages" role="rowgroup" aria-label="messages">
9294
<div role="row" :aria-label="message.message_id" class="row grid-row" v-for="message in messages" :key="message.id">
9395
<div role="cell" aria-label="status" class="status" :title="statusToName(message.status)">
9496
<div class="status-icon" :class="statusToIcon(message.status)"></div>
@@ -131,8 +133,16 @@ function formatDotNetTimespan(timespan: string) {
131133
display: block;
132134
}
133135
134-
.instances-muted {
135-
font-weight: bold;
136+
.section-table {
137+
overflow: auto;
138+
flex: 1;
139+
display: flex;
140+
flex-direction: column;
141+
}
142+
143+
.messages {
144+
flex: 1;
145+
overflow: auto;
136146
}
137147
138148
.status {

src/Frontend/src/views/AuditView.vue

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import AuditList from "@/components/audit/AuditList.vue";
88
<LicenseExpired />
99
<template v-if="!licenseStatus.isExpired">
1010
<div class="container">
11-
<div class="row">
11+
<div class="row title">
1212
<div class="col-12">
1313
<h1>All Messages</h1>
1414
</div>
@@ -19,3 +19,19 @@ import AuditList from "@/components/audit/AuditList.vue";
1919
</div>
2020
</template>
2121
</template>
22+
23+
<style scoped>
24+
.container,
25+
.row {
26+
display: flex;
27+
flex-direction: column;
28+
max-height: 100%;
29+
flex: 1;
30+
min-height: 0;
31+
}
32+
33+
.row.title {
34+
flex: 0;
35+
min-height: fit-content;
36+
}
37+
</style>

0 commit comments

Comments
 (0)