-
Notifications
You must be signed in to change notification settings - Fork 0
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 #212
[Workspace]Add workspace id in basePath #212
Conversation
Signed-off-by: SuZhou-Joe <[email protected]>
Codecov Report
@@ Coverage Diff @@
## workspace-pr-integr #212 +/- ##
=======================================================
- Coverage 66.06% 61.62% -4.44%
=======================================================
Files 3386 2981 -405
Lines 64872 57676 -7196
Branches 10455 9314 -1141
=======================================================
- Hits 42858 35545 -7313
- Misses 19446 20039 +593
+ Partials 2568 2092 -476
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 757 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
services: { application, http }, | ||
} = useOpenSearchDashboards(); | ||
const goBackToHome = () => { | ||
window.location.href = formatUrlWithWorkspaceId( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, just another thought, instead of calling formatUrlWithWorkspaceId
, perhaps we can refactor getUrlForApp
like this:
getUrlForApp: (appId, {path, absolute = false, withoutWorkspace = false}) => ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I do not know if we should do that as I think getUrlForApp
is a method to handle path without knowing basePath
, though under the hood it uses bathPath.prepend to format url.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, that makes sense
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-workspace workspace
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-workspace
# Create a new branch
git switch --create backport/backport-212-to-workspace
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43e91faec7ab11131207f598668b073f727ef073
# Push it to GitHub
git push --set-upstream origin backport/backport-212-to-workspace
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-workspace Then, create a pull request where the |
) * [Workspace]Add workspace id in basePath (#212) * 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]> (cherry picked from commit 43e91fa) * feat: some sync Signed-off-by: SuZhou-Joe <[email protected]> * feat: remove useless code Signed-off-by: SuZhou-Joe <[email protected]> * fix: modify import path Signed-off-by: SuZhou-Joe <[email protected]> * fix: unit test Signed-off-by: SuZhou-Joe <[email protected]> * fix: unit test Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]>
* 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]>
* [Workspace]Add workspace id in basePath (#212) * 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]> * feat: add CHANGELOG Signed-off-by: SuZhou-Joe <[email protected]> * feat: add feature flag check Signed-off-by: SuZhou-Joe <[email protected]> * feat: make the pr smaller Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize with a more strict check Signed-off-by: SuZhou-Joe <[email protected]> * fix: unit test error Signed-off-by: SuZhou-Joe <[email protected]> * feat: remove useless code Signed-off-by: SuZhou-Joe <[email protected]> * feat: add a unit test case Signed-off-by: SuZhou-Joe <[email protected]> * feat: better merge Signed-off-by: SuZhou-Joe <[email protected]> * feat: rename the workspaceBasePath to clientBasePath Signed-off-by: SuZhou-Joe <[email protected]> * fix: snapshot Signed-off-by: SuZhou-Joe <[email protected]> * feat: rename withoutWorkspace to withoutClientBasePath Signed-off-by: SuZhou-Joe <[email protected]> * Revert "feat: add feature flag check" This reverts commit 64b3645. Signed-off-by: SuZhou-Joe <[email protected]> * Revert "fix: unit test error" This reverts commit 80bed72. Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize comment and test cases description Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize comment Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]>
* 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]>
…pensearch-project#6422) * [Workspace]Add workspace id in basePath (#212) * 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]> * feat: add CHANGELOG Signed-off-by: SuZhou-Joe <[email protected]> * feat: add feature flag check Signed-off-by: SuZhou-Joe <[email protected]> * feat: make the pr smaller Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize with a more strict check Signed-off-by: SuZhou-Joe <[email protected]> * fix: unit test error Signed-off-by: SuZhou-Joe <[email protected]> * feat: remove useless code Signed-off-by: SuZhou-Joe <[email protected]> * feat: add a unit test case Signed-off-by: SuZhou-Joe <[email protected]> * feat: better merge Signed-off-by: SuZhou-Joe <[email protected]> * feat: rename the workspaceBasePath to clientBasePath Signed-off-by: SuZhou-Joe <[email protected]> * fix: snapshot Signed-off-by: SuZhou-Joe <[email protected]> * feat: rename withoutWorkspace to withoutClientBasePath Signed-off-by: SuZhou-Joe <[email protected]> * Revert "feat: add feature flag check" This reverts commit 64b3645. Signed-off-by: SuZhou-Joe <[email protected]> * Revert "fix: unit test error" This reverts commit 80bed72. Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize comment and test cases description Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize comment Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]> (cherry picked from commit 3073926) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Issues Resolved
Screenshot
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr