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
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
add license header

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
* feat: add workspace creator page

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: integrate with application workspace template

Signed-off-by: Lin Wang <wonglam@amazon.com>

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

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: update filter condition to align with collapsible nav

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
* fix: validation & query

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: modify file name to reduce confusion

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: add landing logic to retrive workspace id

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: add worklist observable

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* fix: type error

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* fix: type error

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: make client more robust

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: use Subject

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
* feat: integrate with workspace create API

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: update to i18n text for toast

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
* feat: add currentWorkspace$

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* fix: type error

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

* feat: add emit on currentWorkspace$

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Add workspace dropdown list 

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>
Signed-off-by: suzhou <suzhou@amazon.com>
Co-authored-by: SuZhoue-Joe <suzhou@amazon.com>
* feat: init workspace menu stage 1

Signed-off-by: tygao <tygao@amazon.com>

* fix: remove port diff

Signed-off-by: tygao <tygao@amazon.com>

* feat: update menu logic

Signed-off-by: tygao <tygao@amazon.com>

---------

Signed-off-by: tygao <tygao@amazon.com>
* fix import error

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix osd bootstrap failure

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
* feat: add workspace overview page

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: move paths to common constants

Signed-off-by: Lin Wang <wonglam@amazon.com>

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

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: change to currentWorkspace$ in workspace client

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
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 <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
)

* change to currentWorkspace, wrap title using i18n

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* change import

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* directly return [] if currentWorkspace is null

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
* feat: update workspace switch

Signed-off-by: tygao <tygao@amazon.com>

* fix: fix switch error

Signed-off-by: tygao <tygao@amazon.com>

* fix: fix prettier after merge

Signed-off-by: tygao <tygao@amazon.com>

* chore: remove extra code after merge

Signed-off-by: tygao <tygao@amazon.com>

---------

Signed-off-by: tygao <tygao@amazon.com>
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 <yuyezhu@amazon.com>

* make reserved workspace name readonly

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

---------

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
…project#195)

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

Signed-off-by: Lin Wang <wonglam@amazon.com>

* address PR comments and add annotations

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Hailong-am and others added 2 commits October 9, 2023 14:08
* add more unit test cases

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* throw error with all errorObjects

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
…ch-project#196)

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

* temp: add unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add function test for workspace CRUD routes

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: use saved objects client instead of internal repository

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update CHANGELOG

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: exclude permission check wrapper

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add integration test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add configuration

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: enable workspace flag when run workspace related test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: change to equal 3

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: make permissions field optional

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: make permissions as optional params

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: make permissions params optional

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
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 <wonglam@amazon.com>

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

Signed-off-by: Lin Wang <wonglam@amazon.com>

* test: remove timeout

Signed-off-by: Lin Wang <wonglam@amazon.com>

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

Signed-off-by: Lin Wang <wonglam@amazon.com>

* fix: workspaces can't be query

Signed-off-by: Lin Wang <wonglam@amazon.com>

* update to latest license header

Signed-off-by: Lin Wang <wonglam@amazon.com>

* remove skip migrate and remove keyword suffix

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
…ct#198)

* feat: add permission check for bulkCreate when overwrite

Signed-off-by: tygao <tygao@amazon.com>

* chore: update name and assertion

Signed-off-by: tygao <tygao@amazon.com>

* fix: update validation logic

Signed-off-by: tygao <tygao@amazon.com>

* fix: update get throw error

Signed-off-by: tygao <tygao@amazon.com>

---------

Signed-off-by: tygao <tygao@amazon.com>
1. remove unnecessary workspace menu register
2. expose interface from chrome service to allow customize left nav header

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
* feat: add in memory validate remove unnecessary saved object get call

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: renaming validateSavedObjectsACL and remove log flag

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
…workspaces (opensearch-project#218)

Signed-off-by: Lin Wang <wonglam@amazon.com>
…nit test for mountWrapper (opensearch-project#224)

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

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
(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 <suzhou@amazon.com>

* feat: some update

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update snapshot

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
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 <tygao@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
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 <wonglam@amazon.com>

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

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

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

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* refactor: assigned copied saved objects to new variables

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Co-authored-by: Yulong Ruan <ruanyu1@gmail.com>
Hailong-am and others added 6 commits October 16, 2023 10:58
* support disable permission check for workspace

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix typos

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
…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 <suzhou@amazon.com>

* feat: add unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless test object id

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update snapshot

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: move formatUrlWithWorkspaceId to core/public/utils

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless variable

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless variable

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimization

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimization

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimization

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: move workspace/utils to core

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: move workspace/utils to core

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimization

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add space under license

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
(cherry picked from commit 43e91fa)

* feat: some sync

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: modify import path

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
…ce (opensearch-project#229)

* Add unit test for delete saved objects by workspace

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Add comments for workspace clean up

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
…earch-project#226)

* ui update: workspace create page

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* implement cancel button and wrap string with i18n

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* eslint fix

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* breadcrumb bug fix

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* workspace create unit tests

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* bug fix

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* update bread crumbs for workspace create page

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* udpate test case

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* optimize create page ui

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* update test file

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* change library category definition

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* remove key definition

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* change default permission type to Read

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* refactor bottom bar and cancel modal into components

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* declare consts outside functional components

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* remove key definition

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* refactor bottom bar and cancel model

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

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

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>

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

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>

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

Co-authored-by: SuZhou-Joe <suzhou@amazon.com>

* wrap string with i18n

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* reimplement tab selection to enum

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* fix data-test-subj duplicate bug

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* update tests and id

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* update UI

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* track the number of errors

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* add test cases

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* resolve conflicts

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* hide permission section when workspace permission is not enabled

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* sort permissions decreasingly

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* update test file

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* feat: remove some error and optimize mock

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* update test file

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* refactor with EuiTab

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* remove sort logic

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* remove unused import

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

---------

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
…pensearch-project#235)

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

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* refactor code with useMemo

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

---------

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
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 <wonglam@amazon.com>

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

* refactor: simplify sample data saved object id prefix logic

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

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

rename appendPrefix to addPrefix

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>

* refactor: assigned copied saved objects to new variables

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Co-authored-by: Yulong Ruan <ruanyu1@gmail.com>
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