From 21cd1b3863901b7f1b5b86b0164f957520144d44 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Thu, 2 Jan 2025 12:35:23 +0200 Subject: [PATCH] shell: Fix bugs found by TypeScript --- pkg/shell/failures.tsx | 5 +---- pkg/shell/hosts.tsx | 2 +- pkg/shell/superuser.tsx | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/shell/failures.tsx b/pkg/shell/failures.tsx index 8c9992b15931..6e2f8e3d0f04 100644 --- a/pkg/shell/failures.tsx +++ b/pkg/shell/failures.tsx @@ -69,7 +69,6 @@ const EarlyFailureReady = ({ reconnect = false, troubleshoot = false, onTroubleshoot = () => {}, - watchdog_problem, onReconnect = () => {}, } : { loading?: boolean, @@ -78,7 +77,6 @@ const EarlyFailureReady = ({ reconnect?: boolean, troubleshoot?: boolean, onTroubleshoot?: () => void, - watchdog_problem?: string, onReconnect?: () => void, }) => { return ( @@ -109,10 +107,9 @@ export const Disconnected = ({ problem }) => { return ( { cockpit.sessionStorage.clear(); - window.location.reload(true); + window.location.reload(); }} paragraph={cockpit.message(problem)} /> ); diff --git a/pkg/shell/hosts.tsx b/pkg/shell/hosts.tsx index 5c835c3f5f0a..6dfef84ca63c 100644 --- a/pkg/shell/hosts.tsx +++ b/pkg/shell/hosts.tsx @@ -271,7 +271,7 @@ export class CockpitHosts extends React.Component { selector={this.props.selector} groups={groups} item_render={render} - sorting={(_a, _b) => true} + sorting={(_a, _b) => 1} filtering={this.filterHosts} current={label} jump={() => console.error("internal error: jump not supported in hosts selector")} diff --git a/pkg/shell/superuser.tsx b/pkg/shell/superuser.tsx index aa9911248ec3..5bdc78e5b165 100644 --- a/pkg/shell/superuser.tsx +++ b/pkg/shell/superuser.tsx @@ -160,7 +160,6 @@ const UnlockDialog = ({ proxy, host }) => {