Skip to content

Commit cab9c19

Browse files
committed
added styles and message for no matching search term result
1 parent ec78482 commit cab9c19

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/Frontend/src/components/messages/HeadersView.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function clearSearch() {
2929
<button v-if="searchTerm" title="Clear" @click="clearSearch" class="clear-btn">X</button>
3030
</div>
3131

32-
<table class="table" v-if="!props.message.headersNotFound">
32+
<table class="table" v-if="filteredHeaders.length > 0 && !props.message.headersNotFound">
3333
<tbody>
3434
<tr class="interactiveList" v-for="(header, index) in filteredHeaders" :key="index">
3535
<td nowrap="nowrap">{{ header.key }}</td>
@@ -42,6 +42,8 @@ function clearSearch() {
4242
</tr>
4343
</tbody>
4444
</table>
45+
<!-- Message if filtered list is empty -->
46+
<div v-else class="alert alert-warning">No headers found matching the search term.</div>
4547
<div v-if="props.message.headersNotFound" class="alert alert-info">Could not find message headers. This could be because the message URL is invalid or the corresponding message was processed and is no longer tracked by ServiceControl.</div>
4648
</template>
4749

@@ -75,4 +77,17 @@ function clearSearch() {
7577
margin: 0;
7678
font-weight: bold;
7779
}
80+
81+
.clear-btn:hover {
82+
color: #000;
83+
}
84+
/* Style for the empty filtered list message */
85+
.alert-warning {
86+
margin-top: 10px;
87+
color: #856404;
88+
background-color: #fff3cd;
89+
border-color: #ffeeba;
90+
padding: 10px;
91+
border-radius: 5px;
92+
}
7893
</style>

0 commit comments

Comments
 (0)