From 507c485113ddf327528e331405593af037a351e2 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Wed, 23 Dec 2020 11:51:43 +0300 Subject: [PATCH] Fixing logs scrolling state (#1847) * Passing raw logs to PodLogs child components Signed-off-by: Alex Andreev * Avoid autoscrolling while user is scrolling Signed-off-by: Alex Andreev * Removing status panel from log controls Signed-off-by: Alex Andreev --- src/renderer/components/dock/info-panel.tsx | 12 +++-- .../components/dock/pod-log-controls.tsx | 13 +++-- src/renderer/components/dock/pod-log-list.tsx | 53 +++++++++++++------ .../components/dock/pod-log-search.tsx | 5 +- .../components/dock/pod-logs.store.ts | 44 ++++++++++----- src/renderer/components/dock/pod-logs.tsx | 27 +++------- 6 files changed, 95 insertions(+), 59 deletions(-) diff --git a/src/renderer/components/dock/info-panel.tsx b/src/renderer/components/dock/info-panel.tsx index 4f36d47fc3..34e456fdd6 100644 --- a/src/renderer/components/dock/info-panel.tsx +++ b/src/renderer/components/dock/info-panel.tsx @@ -27,6 +27,7 @@ interface OptionalProps { showSubmitClose?: boolean; showInlineInfo?: boolean; showNotifications?: boolean; + showStatusPanel?: boolean; } @observer @@ -38,6 +39,7 @@ export class InfoPanel extends Component { showSubmitClose: true, showInlineInfo: true, showNotifications: true, + showStatusPanel: true, }; @observable error = ""; @@ -93,7 +95,7 @@ export class InfoPanel extends Component { } render() { - const { className, controls, submitLabel, disableSubmit, error, submittingMessage, showButtons, showSubmitClose } = this.props; + const { className, controls, submitLabel, disableSubmit, error, submittingMessage, showButtons, showSubmitClose, showStatusPanel } = this.props; const { submit, close, submitAndClose, waiting } = this; const isDisabled = !!(disableSubmit || waiting || error); @@ -102,9 +104,11 @@ export class InfoPanel extends Component {
{controls}
-
- {waiting ? <> {submittingMessage} : this.renderErrorIcon()} -
+ {showStatusPanel && ( +
+ {waiting ? <> {submittingMessage} : this.renderErrorIcon()} +
+ )} {showButtons && ( <>