Skip to content

Commit d96f87a

Browse files
committed
add css style to the search box
1 parent 9e3d361 commit d96f87a

File tree

1 file changed

+33
-17
lines changed

1 file changed

+33
-17
lines changed

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

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,17 @@ const filteredHeaders = computed(() => {
2121
</script>
2222

2323
<template>
24-
<div class="searchheader">
25-
<input v-model="searchTerm" type="search" placeholder="Search for a header key or value" class="search-input" />
24+
<div>
25+
<div class="row filters">
26+
<div class="col">
27+
<div class="text-search-container">
28+
<div class="text-search">
29+
<input type="search" aria-label="Filter by name" v-model="searchTerm" class="form-control format-text" placeholder="Search for a header key or value..." />
30+
</div>
31+
</div>
32+
</div>
33+
</div>
2634
</div>
27-
2835
<table class="table" v-if="filteredHeaders.length > 0 && !props.message.headersNotFound">
2936
<tbody>
3037
<tr class="interactiveList" v-for="(header, index) in filteredHeaders" :key="index">
@@ -38,6 +45,7 @@ const filteredHeaders = computed(() => {
3845
</tr>
3946
</tbody>
4047
</table>
48+
4149
<!-- Message if filtered list is empty -->
4250
<div v-if="filteredHeaders.length <= 0 && !props.message.headersNotFound" class="alert alert-warning">No headers found matching the search term.</div>
4351
<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>
@@ -49,21 +57,8 @@ const filteredHeaders = computed(() => {
4957
align-items: top;
5058
gap: 0.4rem;
5159
}
52-
.searchheader {
53-
display: flex;
54-
align-items: center;
55-
margin-bottom: 10px;
56-
}
57-
58-
/* Style for the search input */
59-
.search-input {
60-
padding: 5px;
61-
margin-right: 10px;
62-
width: 100%;
63-
max-width: 40rem;
64-
}
6560
66-
/* Style for the empty filtered list message */
61+
/* empty filtered list message */
6762
.alert-warning {
6863
margin-top: 10px;
6964
color: #856404;
@@ -72,4 +67,25 @@ const filteredHeaders = computed(() => {
7267
padding: 10px;
7368
border-radius: 5px;
7469
}
70+
71+
.text-search-container {
72+
display: flex;
73+
flex-direction: row;
74+
}
75+
.text-search {
76+
width: 100%;
77+
max-width: 40rem;
78+
}
79+
.format-text {
80+
font-weight: unset;
81+
font-size: 14px;
82+
min-width: 120px;
83+
}
84+
.filters {
85+
background-color: #f3f3f3;
86+
margin-top: 5px;
87+
border: #8c8c8c 1px solid;
88+
border-radius: 3px;
89+
padding: 5px;
90+
}
7591
</style>

0 commit comments

Comments
 (0)