Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan
- [#225](https://github.com/kobsio/kobs/pull/225): [core] :warning: _Breaking change:_ :warning: Change options handling accross all plugins and re-add `time` property.
- [#229](https://github.com/kobsio/kobs/pull/229): [opsgenie] Allow users to overwrite the selected time range in a dashboard for an Opsgenie panel via the new `interval` property.
- [#230](https://github.com/kobsio/kobs/pull/230): [dashboards] Add special variables `__timeStart` and `__timeEnd` for dashboards.
- [#231](https://github.com/kobsio/kobs/pull/231): [klogs] Highlight expanded row and do not use index as key. The same changes were also applied for the Elasticsearch plugin.

## [v0.7.0](https://github.com/kobsio/kobs/releases/tag/v0.7.0) (2021-11-19)

Expand Down
6 changes: 3 additions & 3 deletions plugins/elasticsearch/src/components/panel/LogsDocument.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { TableText, Td, Tr } from '@patternfly/react-table';
import { TableText, Tbody, Td, Tr } from '@patternfly/react-table';

import { formatTime, getProperty } from '../../utils/helpers';
import { IDocument } from '../../utils/interfaces';
Expand Down Expand Up @@ -36,7 +36,7 @@ const LogsDocument: React.FunctionComponent<ILogsDocumentProps> = ({
];

return (
<React.Fragment>
<Tbody isExpanded={isExpanded}>
<Tr>
<Td
noPadding={true}
Expand Down Expand Up @@ -66,7 +66,7 @@ const LogsDocument: React.FunctionComponent<ILogsDocumentProps> = ({
</Td>
<Td />
</Tr>
</React.Fragment>
</Tbody>
);
};

Expand Down
32 changes: 16 additions & 16 deletions plugins/elasticsearch/src/components/panel/LogsDocuments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const LogsDocuments: React.FunctionComponent<ILogsDocumentsProps> = ({
const [page, setPage] = useState<IPage>({ page: 1, perPage: 100 });

return (
<TableComposable aria-label="Logs" variant={TableVariant.compact} borders={false}>
<TableComposable aria-label="Logs" variant={TableVariant.compact} borders={true}>
<Thead>
<Tr>
<Th />
Expand All @@ -39,21 +39,21 @@ const LogsDocuments: React.FunctionComponent<ILogsDocumentsProps> = ({
<Th />
</Tr>
</Thead>
<Tbody>
{documents
? documents
.slice((page.page - 1) * page.perPage, page.page * page.perPage)
.map((document, index) => (
<LogsDocument
key={index}
document={document}
fields={fields}
addFilter={addFilter}
selectField={selectField}
/>
))
: null}
</Tbody>

{documents
? documents
.slice((page.page - 1) * page.perPage, page.page * page.perPage)
.map((document, index) => (
<LogsDocument
key={document['_id'] + index}
document={document}
fields={fields}
addFilter={addFilter}
selectField={selectField}
/>
))
: null}

{documents && (
<Tbody>
<Tr>
Expand Down
2 changes: 1 addition & 1 deletion plugins/klogs/src/components/panel/LogsDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const LogsDocument: React.FunctionComponent<ILogsDocumentProps> = ({
];

return (
<Tbody>
<Tbody isExpanded={isExpanded}>
<Tr>
<Td
noPadding={true}
Expand Down
5 changes: 3 additions & 2 deletions plugins/klogs/src/components/panel/LogsDocuments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const LogsDocuments: React.FunctionComponent<ILogsDocumentsProps> = ({
}, [documents]);

return (
<TableComposable aria-label="Logs" variant={TableVariant.compact} borders={false}>
<TableComposable aria-label="Logs" variant={TableVariant.compact} borders={true}>
<Thead>
<Tr>
<Th />
Expand Down Expand Up @@ -99,12 +99,13 @@ const LogsDocuments: React.FunctionComponent<ILogsDocumentsProps> = ({
<Th />
</Tr>
</Thead>

{documents
? documents
.slice((page.page - 1) * page.perPage, page.page * page.perPage)
.map((document, index) => (
<LogsDocument
key={index}
key={document['timestamp'] + index}
document={document}
fields={fields}
addFilter={addFilter}
Expand Down