Skip to content

Commit

Permalink
Log UI work, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Sep 27, 2024
1 parent ab46309 commit 7e4fe01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/observability/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestGetLogs(t *testing.T) {
maxLogLines := 100
search := ""

logEntryResponse, err := o.getLogs(now, now, 0, maxLogLines, 0, search)
logEntryResponse, err := o.getLogs(now, now, 0, maxLogLines, 0, search, []string{}, []KeyValue{})
if err != nil {
t.Fatalf("get logs error: %s", err)
}
Expand Down
30 changes: 21 additions & 9 deletions webapp/src/Routes/Logs/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,27 @@ export function Logs() {
<Button variant="default" size="xs">Columns</Button>
</Popover.Target>
<Popover.Dropdown>
<MultiSelect
searchable
hidePickedOptions
comboboxProps={{ offset: 0, withinPortal: false}}
data={data?.pages[0].tags.map((tag) => { return tag.key })}
value={columns}
onChange={setColumns}
size="xs"
/>
{data?.pages[0].tags
.filter((element, i) => {
if(i === 0 || element.key !== data?.pages[0].tags[i-1].key) {
return true
} else {
return false
}
})
.map((element) => {
return (
<Checkbox
key={element.key}
label={element.key}
radius="xs"
size="xs"
style={{marginBottom: 3}}
onChange={(event) => event.currentTarget.checked ? setColumns([...columns, element.key]) : setColumns(columns.filter((column) => { return column !== element.key } ))}
checked={columns.some((column) => column === element.key)}
/>
)
})}
</Popover.Dropdown>
</Popover>
<Popover width={300} position="bottom" withArrow shadow="md">
Expand Down

0 comments on commit 7e4fe01

Please sign in to comment.