mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Cleaning up logs components
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
7141a5afff
commit
4ba0c3f9ef
@ -147,12 +147,12 @@ export class PodLogList extends React.Component<Props> {
|
|||||||
const active = isActiveOverlay(rowIndex, index);
|
const active = isActiveOverlay(rowIndex, index);
|
||||||
const lastItem = index === pieces.length - 1;
|
const lastItem = index === pieces.length - 1;
|
||||||
const overlayValue = matches.next().value;
|
const overlayValue = matches.next().value;
|
||||||
const overlay = !lastItem ?
|
const overlay = !lastItem
|
||||||
<span
|
? <span
|
||||||
className={cssNames("overlay", { active })}
|
className={cssNames("overlay", { active })}
|
||||||
dangerouslySetInnerHTML={{ __html: ansiToHtml(overlayValue) }}
|
dangerouslySetInnerHTML={{ __html: ansiToHtml(overlayValue) }}
|
||||||
/> :
|
/>
|
||||||
null;
|
: null;
|
||||||
contents.push(
|
contents.push(
|
||||||
<React.Fragment key={piece + index}>
|
<React.Fragment key={piece + index}>
|
||||||
<span dangerouslySetInnerHTML={{ __html: ansiToHtml(piece) }} />
|
<span dangerouslySetInnerHTML={{ __html: ansiToHtml(piece) }} />
|
||||||
|
|||||||
@ -22,11 +22,9 @@ export class PodLogs extends React.Component<Props> {
|
|||||||
private logListElement = React.createRef<PodLogList>(); // A reference for VirtualList component
|
private logListElement = React.createRef<PodLogList>(); // A reference for VirtualList component
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
disposeOnUnmount(this, [
|
disposeOnUnmount(this,
|
||||||
reaction(() => this.props.tab.id, async () => {
|
reaction(() => this.props.tab.id, this.reload, { fireImmediately: true })
|
||||||
await this.reload();
|
);
|
||||||
}, { fireImmediately: true }),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get tabData() {
|
get tabData() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user