Skip to content

Commit

Permalink
webui: Improve UI of links for viewing search results in context. (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao authored Aug 19, 2024
1 parent 86299ca commit e1f3f2a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@
word-break: break-word;
}

.search-results-file-link {
margin-top: 0.25rem;

color: grey;
font-family: 'Roboto', sans-serif;
font-size: 0.875rem;
font-weight: 400;
line-height: 1.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import Table from "react-bootstrap/Table";
import dayjs from "dayjs";

import {
faFileLines,
faSort,
faSortDown,
faSortUp,
faSquareUpRight,
} from "@fortawesome/free-solid-svg-icons";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";

Expand Down Expand Up @@ -125,10 +125,6 @@ const SearchResultsTable = ({
Log message
</div>
</th>
{isExtractIrSupported &&
<th className={"search-results-th"}>
<div className={"search-results-table-header"}>&nbsp;</div>
</th>}
</tr>
</thead>
<tbody>
Expand All @@ -143,20 +139,23 @@ const SearchResultsTable = ({
<pre className={"search-results-content search-results-message"}>
{result.message}
</pre>
{isExtractIrSupported &&
<div className={"search-results-file-link"}>
<FontAwesomeIcon icon={faFileLines}/>
{" "}
<a
className={"search-results-file-link"}
rel={"noopener noreferrer"}
target={"_blank"}
title={"View log event in context"}
href={`${Meteor.settings.public.LogViewerWebuiUrl
}?origFileId=${result.orig_file_id}` +
`&logEventIdx=${result.log_event_ix}`}
>
{result.orig_file_path}
</a>
</div>}
</td>
{isExtractIrSupported &&
<td>
<a
rel={"noopener noreferrer"}
target={"_blank"}
title={"View log event in context"}
href={`${Meteor.settings.public.LogViewerWebuiUrl
}?origFileId=${result.orig_file_id}` +
`&logEventIdx=${result.log_event_ix}`}
>
<FontAwesomeIcon icon={faSquareUpRight}/>
</a>
</td>}
</tr>
))}
</tbody>
Expand Down

0 comments on commit e1f3f2a

Please sign in to comment.