Skip to content

Commit

Permalink
Improve typing of ResponseError attributes, and fix TS errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Oct 12, 2021
1 parent dbc7a8e commit 68b97e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion x-pack/plugins/upgrade_assistant/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export type ClusterUpgradeState = 'isPreparingForUpgrade' | 'isUpgrading' | 'isU
export interface ResponseError {
statusCode: number;
message: string | Error;
attributes?: Record<string, any>;
attributes?: {
allNodesUpgraded: boolean;
};
}

export enum ReindexStep {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export const App = ({ history }: { history: ScopedHistory }) => {
<EuiEmptyPrompt body={<EuiLoadingSpinner size="l" />} />
</EuiPageContent>
);
return;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import { useCallback, useState, useEffect } from 'react';
import useInterval from 'react-use/lib/useInterval';

import { SystemIndicesFlyout, SystemIndicesFlyoutProps } from './flyout';
import { useAppContext } from '../../../app_context';
import type { ResponseError } from '../../../lib/api';
import { GlobalFlyout } from '../../../../shared_imports';
import { SYSTEM_INDICES_MIGRATION_POLL_INTERVAL_MS } from '../../../../../common/constants';
import type { ResponseError } from '../../../../../common/types';
import { GlobalFlyout } from '../../../../shared_imports';
import { useAppContext } from '../../../app_context';
import { SystemIndicesFlyout, SystemIndicesFlyoutProps } from './flyout';

const FLYOUT_ID = 'migrateSystemIndicesFlyout';
const { useGlobalFlyout } = GlobalFlyout;
Expand Down

0 comments on commit 68b97e4

Please sign in to comment.