Skip to content

Commit

Permalink
shell: Fix bugs found by TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollmer committed Jan 8, 2025
1 parent ac58a25 commit 21cd1b3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions pkg/shell/failures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const EarlyFailureReady = ({
reconnect = false,
troubleshoot = false,
onTroubleshoot = () => {},
watchdog_problem,
onReconnect = () => {},
} : {
loading?: boolean,
Expand All @@ -78,7 +77,6 @@ const EarlyFailureReady = ({
reconnect?: boolean,
troubleshoot?: boolean,
onTroubleshoot?: () => void,
watchdog_problem?: string,
onReconnect?: () => void,
}) => {
return (
Expand Down Expand Up @@ -109,10 +107,9 @@ export const Disconnected = ({ problem }) => {
return (
<EarlyFailureReady title={_("Disconnected")}
reconnect
watchdog_problem={problem}
onReconnect={() => {
cockpit.sessionStorage.clear();
window.location.reload(true);
window.location.reload();
}}
paragraph={cockpit.message(problem)} />
);
Expand Down
2 changes: 1 addition & 1 deletion pkg/shell/hosts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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")}
Expand Down
1 change: 0 additions & 1 deletion pkg/shell/superuser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ const UnlockDialog = ({ proxy, host }) => {
<FormGroup
fieldId="switch-to-admin-access-password"
label={prompt.prompt}
validated={!error ? "default" : validated || "error"}
>
<TextInput
autoFocus // eslint-disable-line jsx-a11y/no-autofocus
Expand Down

0 comments on commit 21cd1b3

Please sign in to comment.