-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* feat: enable workspace id in basePath Signed-off-by: SuZhou-Joe <[email protected]> * feat: add unit test Signed-off-by: SuZhou-Joe <[email protected]> * feat: remove useless test object id Signed-off-by: SuZhou-Joe <[email protected]> * feat: add unit test Signed-off-by: SuZhou-Joe <[email protected]> * feat: add unit test Signed-off-by: SuZhou-Joe <[email protected]> * feat: update snapshot Signed-off-by: SuZhou-Joe <[email protected]> * feat: move formatUrlWithWorkspaceId to core/public/utils Signed-off-by: SuZhou-Joe <[email protected]> * feat: remove useless variable Signed-off-by: SuZhou-Joe <[email protected]> * feat: remove useless variable Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimization Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimization Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimization Signed-off-by: SuZhou-Joe <[email protected]> * feat: move workspace/utils to core Signed-off-by: SuZhou-Joe <[email protected]> * feat: move workspace/utils to core Signed-off-by: SuZhou-Joe <[email protected]> * feat: update comment Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize code Signed-off-by: SuZhou-Joe <[email protected]> * feat: update unit test Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimization Signed-off-by: SuZhou-Joe <[email protected]> * feat: add space under license Signed-off-by: SuZhou-Joe <[email protected]> * fix: unit test Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,4 +157,4 @@ describe('BasePath', () => { | |
).toEqual('/client_base_path/remove'); | ||
}); | ||
}); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
"savedObjects" | ||
], | ||
"optionalPlugins": [], | ||
"requiredBundles": [] | ||
"requiredBundles": ["opensearchDashboardsReact"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { AppMountParameters, ScopedHistory } from '../../../core/public'; | ||
import { OpenSearchDashboardsContextProvider } from '../../opensearch_dashboards_react/public'; | ||
import { WorkspaceFatalError } from './components/workspace_fatal_error'; | ||
import { Services } from './types'; | ||
|
||
export const renderFatalErrorApp = (params: AppMountParameters, services: Services) => { | ||
const { element } = params; | ||
const history = params.history as ScopedHistory<{ error?: string }>; | ||
ReactDOM.render( | ||
<OpenSearchDashboardsContextProvider services={services}> | ||
<WorkspaceFatalError error={history.location.state.error} /> | ||
</OpenSearchDashboardsContextProvider>, | ||
element | ||
); | ||
|
||
return () => { | ||
ReactDOM.unmountComponentAtNode(element); | ||
}; | ||
}; |