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

Feature/workspace #1

Draft
wants to merge 174 commits into
base: main
Choose a base branch
from
Draft

Feature/workspace #1

wants to merge 174 commits into from

Conversation

Hailong-am
Copy link
Owner

Description

Issues Resolved

Screenshot

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

ruanyl and others added 30 commits September 15, 2023 15:49
add license header

Signed-off-by: Yulong Ruan <[email protected]>
* feat: add workspace creator page

Signed-off-by: Lin Wang <[email protected]>

* feat: integrate with application workspace template

Signed-off-by: Lin Wang <[email protected]>

* feat: add max-width and remove image wrapper if not exists

Signed-off-by: Lin Wang <[email protected]>

* feat: update filter condition to align with collapsible nav

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
* fix: validation & query

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: modify file name to reduce confusion

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add landing logic to retrive workspace id

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: make client more robust

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: use Subject

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
* feat: integrate with workspace create API

Signed-off-by: Lin Wang <[email protected]>

* feat: update to i18n text for toast

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
* feat: add currentWorkspace$

Signed-off-by: SuZhoue-Joe <[email protected]>

* fix: type error

Signed-off-by: SuZhoue-Joe <[email protected]>

* feat: add emit on currentWorkspace$

Signed-off-by: SuZhoue-Joe <[email protected]>

---------

Signed-off-by: SuZhoue-Joe <[email protected]>
Add workspace dropdown list 

---------

Signed-off-by: zhichao-aws <[email protected]>
Signed-off-by: SuZhoue-Joe <[email protected]>
Signed-off-by: suzhou <[email protected]>
Co-authored-by: SuZhoue-Joe <[email protected]>
* feat: init workspace menu stage 1

Signed-off-by: tygao <[email protected]>

* fix: remove port diff

Signed-off-by: tygao <[email protected]>

* feat: update menu logic

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
* fix import error

Signed-off-by: Hailong Cui <[email protected]>

* fix osd bootstrap failure

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
* feat: add workspace overview page

Signed-off-by: Lin Wang <[email protected]>

* refactor: move paths to common constants

Signed-off-by: Lin Wang <[email protected]>

* feat: add workspace overview item by custom nav in start phase

Signed-off-by: Lin Wang <[email protected]>

* refactor: change to currentWorkspace$ in workspace client

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
fix failed test snapshots

temporary fix: fetch functional test from main branch

fixed git error which cannot find ref due to feature branch `workspace`
not exists on repo opensearch-dashboards-functional-test

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
)

* change to currentWorkspace, wrap title using i18n

Signed-off-by: zhichao-aws <[email protected]>

* change import

Signed-off-by: zhichao-aws <[email protected]>

* directly return [] if currentWorkspace is null

Signed-off-by: zhichao-aws <[email protected]>

---------

Signed-off-by: zhichao-aws <[email protected]>
* feat: update workspace switch

Signed-off-by: tygao <[email protected]>

* fix: fix switch error

Signed-off-by: tygao <[email protected]>

* fix: fix prettier after merge

Signed-off-by: tygao <[email protected]>

* chore: remove extra code after merge

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
yuye-aws and others added 3 commits September 25, 2023 16:30
* hide delete button on workspace setting page for reserved workspaces

Signed-off-by: yuye-aws <[email protected]>

* make reserved workspace name readonly

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
…project#195)

* feat: remove management permission mode and clearify library permission mode usage

Signed-off-by: Lin Wang <[email protected]>

* address PR comments and add annotations

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Hailong-am and others added 2 commits October 9, 2023 14:08
* add more unit test cases

Signed-off-by: Hailong Cui <[email protected]>

* throw error with all errorObjects

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
…ch-project#196)

* Patch/first pr (opensearch-project#194)

* temp: add unit test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add function test for workspace CRUD routes

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: use saved objects client instead of internal repository

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update CHANGELOG

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: exclude permission check wrapper

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add integration test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: add configuration

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: enable workspace flag when run workspace related test

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: change to equal 3

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: test

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: make permissions field optional

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: make permissions as optional params

Signed-off-by: SuZhou-Joe <[email protected]>

* fix: make permissions params optional

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
wanglam and others added 9 commits October 9, 2023 17:25
…search-project#206)

* fix: logic passed after validate failed

Signed-off-by: Lin Wang <[email protected]>

* test: add integration tests for workspace saved objects client wrapper

Signed-off-by: Lin Wang <[email protected]>

* test: remove timeout

Signed-off-by: Lin Wang <[email protected]>

* test: refactor with fixed scoped client and ignore delete error in clear all

Signed-off-by: Lin Wang <[email protected]>

* fix: workspaces can't be query

Signed-off-by: Lin Wang <[email protected]>

* update to latest license header

Signed-off-by: Lin Wang <[email protected]>

* remove skip migrate and remove keyword suffix

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
…ct#198)

* feat: add permission check for bulkCreate when overwrite

Signed-off-by: tygao <[email protected]>

* chore: update name and assertion

Signed-off-by: tygao <[email protected]>

* fix: update validation logic

Signed-off-by: tygao <[email protected]>

* fix: update get throw error

Signed-off-by: tygao <[email protected]>

---------

Signed-off-by: tygao <[email protected]>
1. remove unnecessary workspace menu register
2. expose interface from chrome service to allow customize left nav header

---------

Signed-off-by: Yulong Ruan <[email protected]>
* feat: add in memory validate remove unnecessary saved object get call

Signed-off-by: Lin Wang <[email protected]>

* refactor: renaming validateSavedObjectsACL and remove log flag

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
…nit test for mountWrapper (opensearch-project#224)

* feat: add unit test for mountWrapper (opensearch-project#223)

Signed-off-by: SuZhou-Joe <[email protected]>
(cherry picked from commit 0906bf4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add patch

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: some update

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update snapshot

Signed-off-by: SuZhou-Joe <[email protected]>

---------

Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: tygao <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Hailong-am pushed a commit that referenced this pull request Oct 13, 2023
…ect#210)

* feat: import sample data saved objects to workspace

Signed-off-by: Lin Wang <[email protected]>

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

* refactor: assigned copied saved objects to new variables

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
Hailong-am and others added 6 commits October 16, 2023 10:58
* support disable permission check for workspace

Signed-off-by: Hailong Cui <[email protected]>

* fix typos

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
…ch-project#212) (opensearch-project#225)

* [Workspace]Add workspace id in basePath (opensearch-project#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]>
…ce (opensearch-project#229)

* Add unit test for delete saved objects by workspace

Signed-off-by: Hailong Cui <[email protected]>

* Add comments for workspace clean up

Signed-off-by: Hailong Cui <[email protected]>

---------

Signed-off-by: Hailong Cui <[email protected]>
…earch-project#226)

* ui update: workspace create page

Signed-off-by: yuye-aws <[email protected]>

* implement cancel button and wrap string with i18n

Signed-off-by: yuye-aws <[email protected]>

* eslint fix

Signed-off-by: yuye-aws <[email protected]>

* breadcrumb bug fix

Signed-off-by: yuye-aws <[email protected]>

* workspace create unit tests

Signed-off-by: yuye-aws <[email protected]>

* bug fix

Signed-off-by: yuye-aws <[email protected]>

* update bread crumbs for workspace create page

Signed-off-by: yuye-aws <[email protected]>

* udpate test case

Signed-off-by: yuye-aws <[email protected]>

* optimize create page ui

Signed-off-by: yuye-aws <[email protected]>

* update test file

Signed-off-by: yuye-aws <[email protected]>

* change library category definition

Signed-off-by: yuye-aws <[email protected]>

* remove key definition

Signed-off-by: yuye-aws <[email protected]>

* change default permission type to Read

Signed-off-by: yuye-aws <[email protected]>

* refactor bottom bar and cancel modal into components

Signed-off-by: yuye-aws <[email protected]>

* declare consts outside functional components

Signed-off-by: yuye-aws <[email protected]>

* remove key definition

Signed-off-by: yuye-aws <[email protected]>

* refactor bottom bar and cancel model

Signed-off-by: yuye-aws <[email protected]>

* Update src/plugins/workspace/public/components/workspace_updater/workspace_updater.tsx

Co-authored-by: SuZhou-Joe <[email protected]>

* Update src/plugins/workspace/public/components/workspace_creator/workspace_permission_setting_panel.tsx

Co-authored-by: SuZhou-Joe <[email protected]>

* Update src/plugins/workspace/public/components/workspace_creator/workspace_permission_setting_panel.tsx

Co-authored-by: SuZhou-Joe <[email protected]>

* wrap string with i18n

Signed-off-by: yuye-aws <[email protected]>

* reimplement tab selection to enum

Signed-off-by: yuye-aws <[email protected]>

* fix data-test-subj duplicate bug

Signed-off-by: yuye-aws <[email protected]>

* update tests and id

Signed-off-by: yuye-aws <[email protected]>

* update UI

Signed-off-by: yuye-aws <[email protected]>

* track the number of errors

Signed-off-by: yuye-aws <[email protected]>

* add test cases

Signed-off-by: yuye-aws <[email protected]>

* resolve conflicts

Signed-off-by: yuye-aws <[email protected]>

* hide permission section when workspace permission is not enabled

Signed-off-by: yuye-aws <[email protected]>

* sort permissions decreasingly

Signed-off-by: yuye-aws <[email protected]>

* update test file

Signed-off-by: yuye-aws <[email protected]>

* feat: remove some error and optimize mock

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: update

Signed-off-by: SuZhou-Joe <[email protected]>

* update test file

Signed-off-by: yuye-aws <[email protected]>

* refactor with EuiTab

Signed-off-by: yuye-aws <[email protected]>

* remove sort logic

Signed-off-by: yuye-aws <[email protected]>

* remove unused import

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
…pensearch-project#235)

* feature: cannot delete last admin user/group in workspace settings

Signed-off-by: yuye-aws <[email protected]>

* refactor code with useMemo

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Hailong-am pushed a commit that referenced this pull request Feb 27, 2024
…ect#210)

* feat: import sample data saved objects to workspace

Signed-off-by: Lin Wang <[email protected]>

* refactor: simplify sample data saved object id prefix logic (#1)

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <[email protected]>

* fix: align the prefix order of sample data install and uninstall

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>

* refactor: assigned copied saved objects to new variables

Signed-off-by: Lin Wang <[email protected]>

---------

Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants