Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workspace] Add workspace id in basePath #6060

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "feat: add feature flag check"
This reverts commit 64b3645.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Mar 12, 2024
commit a5fd308add14113abbab2ad96b38dec7fc6cc5b0
14 changes: 3 additions & 11 deletions src/core/public/http/http_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,9 @@ export class HttpService implements CoreService<HttpSetup, HttpStart> {
public setup({ injectedMetadata, fatalErrors }: HttpDeps): HttpSetup {
const opensearchDashboardsVersion = injectedMetadata.getOpenSearchDashboardsVersion();
let clientBasePath = '';
const plugins = injectedMetadata.getPlugins();
const findWorkspaceConfig = plugins.find((plugin) => plugin.id === 'workspace');
// Only try to get workspace id from url when workspace feature is enabled
if (findWorkspaceConfig) {
const workspaceId = getWorkspaceIdFromUrl(
window.location.href,
injectedMetadata.getBasePath()
);
if (workspaceId) {
clientBasePath = `${WORKSPACE_PATH_PREFIX}/${workspaceId}`;
}
const workspaceId = getWorkspaceIdFromUrl(window.location.href);
if (workspaceId) {
clientBasePath = `${WORKSPACE_PATH_PREFIX}/${workspaceId}`;
}
const basePath = new BasePath(
injectedMetadata.getBasePath(),
Expand Down