mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Full dependency inversion of <Dock> and all current tab kinds (#4757)
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Co-authored-by: Sebastian Malton <sebastian@malton.name> Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
152 files changed
+3423
-2617
No files matched your search
@@ -19,6 +19,7 @@ import { array, boundMethod, cssNames } from "../../../utils";
|
||||
import { VirtualList } from "../../virtual-list";
|
||||
import { ToBottom } from "./to-bottom";
|
||||
import type { LogTabViewModel } from "../logs/logs-view-model";
|
||||
import { Spinner } from "../../spinner";
|
||||
|
||||
export interface LogListProps {
|
||||
model: LogTabViewModel;
|
||||
@@ -210,12 +211,18 @@ export class LogList extends React.Component<LogListProps> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const rowHeights = array.filled(this.logs.length, this.lineHeight);
|
||||
if (this.props.model.isLoading.get()) {
|
||||
return (
|
||||
<div className="LogList flex box grow align-center justify-center">
|
||||
<Spinner />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!this.logs.length) {
|
||||
return (
|
||||
<div className="LogList flex box grow align-center justify-center">
|
||||
There are no logs available for container
|
||||
There are no logs available for container {this.props.model.logTabData.get()?.selectedContainer}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -224,7 +231,7 @@ export class LogList extends React.Component<LogListProps> {
|
||||
<div className={cssNames("LogList flex" )}>
|
||||
<VirtualList
|
||||
items={this.logs}
|
||||
rowHeights={rowHeights}
|
||||
rowHeights={array.filled(this.logs.length, this.lineHeight)}
|
||||
getRow={this.getLogRow}
|
||||
onScroll={this.onScroll}
|
||||
outerRef={this.virtualListDiv}
|
||||
|
||||
Reference in new issue
Block a user