-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into ml-anomaly-embedd…
…able-refactor-ui-actions
- Loading branch information
Showing
66 changed files
with
3,184 additions
and
653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React, { Suspense, ComponentType, ReactElement } from 'react'; | ||
import { EuiLoadingSpinner, EuiErrorBoundary } from '@elastic/eui'; | ||
|
||
/** | ||
* A HOC which supplies React.Suspense with a fallback component, and a `EuiErrorBoundary` to contain errors. | ||
* @param Component A component deferred by `React.lazy` | ||
* @param fallback A fallback component to render while things load; default is `EuiLoadingSpinner` | ||
*/ | ||
export const withSuspense = <P extends {}>( | ||
Component: ComponentType<P>, | ||
fallback: ReactElement | null = <EuiLoadingSpinner /> | ||
) => (props: P) => ( | ||
<EuiErrorBoundary> | ||
<Suspense fallback={fallback}> | ||
<Component {...props} /> | ||
</Suspense> | ||
</EuiErrorBoundary> | ||
); | ||
|
||
export const LazyDashboardPicker = React.lazy(() => import('./dashboard_picker')); | ||
|
||
export const LazySavedObjectSaveModalDashboard = React.lazy( | ||
() => import('./saved_object_save_modal_dashboard') | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { OnSaveProps, SaveModalState } from '../../../../plugins/saved_objects/public'; | ||
|
||
interface SaveModalDocumentInfo { | ||
id?: string; | ||
title: string; | ||
description?: string; | ||
} | ||
|
||
export interface SaveModalDashboardProps { | ||
documentInfo: SaveModalDocumentInfo; | ||
canSaveByReference: boolean; | ||
objectType: string; | ||
onClose: () => void; | ||
onSave: (props: OnSaveProps & { dashboardId: string | null; addToLibrary: boolean }) => void; | ||
tagOptions?: React.ReactNode | ((state: SaveModalState) => React.ReactNode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.