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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
33bb32c
setup workspace plugin project skeleton
ruanyl Jun 7, 2023
f7c76eb
test: add unit tests
ruanyl Jun 9, 2023
e7d4a62
workspace template init commit
Hailong-am Jun 9, 2023
dba3c12
refacter workspace template into hooks
Hailong-am Jun 9, 2023
010c62c
refacter workspace template hooks
Hailong-am Jun 9, 2023
378f077
update coverImage comments
Hailong-am Jun 9, 2023
8f9b956
feature: add public/workspaces service
SuZhou-Joe Jun 7, 2023
8a31975
feat: add interfaces for workspaces client
SuZhou-Joe Jun 8, 2023
08d22f8
feat: add interfaces for workspaces client
SuZhou-Joe Jun 8, 2023
26d3783
feat: add interfaces for workspaces client
SuZhou-Joe Jun 8, 2023
fc4437f
feat: implement workspaces service
SuZhou-Joe Jun 12, 2023
c96d139
feat: changes to client type interface
SuZhou-Joe Jun 13, 2023
ba26ff1
feat: changes to client implement
SuZhou-Joe Jun 13, 2023
93882ad
feat: implement more for workspaces service
SuZhou-Joe Jun 13, 2023
aa0d70a
feat: implement more for workspaces service
SuZhou-Joe Jun 13, 2023
8fb8972
feat: implement more for workspaces service
SuZhou-Joe Jun 13, 2023
c6c7cf5
feat: add workspace creator page (#5)
wanglam Jun 14, 2023
27198dc
Add validation when load page (#8)
SuZhou-Joe Jun 15, 2023
7024525
feat: use BehaviorObject and optimize code (#14)
SuZhou-Joe Jun 15, 2023
5105abc
feat: integrate with workspace create API (#13)
wanglam Jun 15, 2023
cbebb5e
Add currentWorkspace$ (#15)
SuZhou-Joe Jun 16, 2023
b560945
register plugin with workspace template (#16)
Hailong-am Jun 16, 2023
0ed84c1
workspace dropdown list (#9)
zhichao-aws Jun 16, 2023
2b143cd
init workspace menu stage 1 (#12)
raintygao Jun 16, 2023
c596448
Fix template registration import error (#21)
Hailong-am Jun 16, 2023
309efba
Add workspace overview page (#19)
wanglam Jun 19, 2023
61b29c3
feat: navigate to workspace create page after button clicked (#23)
wanglam Jun 19, 2023
0f92bdb
fix failed test snapshots (#22)
ruanyl Jun 19, 2023
ec02b38
change to currentWorkspace, wrap title using i18n (#20)
zhichao-aws Jun 20, 2023
6aa12fa
add workspace switch (#17)
raintygao Jun 20, 2023
138e338
Add update workspace page (#25)
gaobinlong Jun 21, 2023
8fcd966
Delete Workspace (#24)
yuye-aws Jun 21, 2023
beaebd9
feat: redirect to overview page after workspace switch (#26)
wanglam Jun 25, 2023
fffd073
update menu filter logic (#28)
raintygao Jun 25, 2023
d937138
feat: redirect to workspace overview page after created success (#29)
wanglam Jun 25, 2023
d0d795d
[Feature] Complied saved_objects create/find (#18)
SuZhou-Joe Jun 25, 2023
82f776a
feat: redirect to workspace update page after workspace switch (#30)
wanglam Jun 25, 2023
18a5a09
Move delete button to update page (#27)
yuye-aws Jun 25, 2023
7b05287
fix: linting error
ruanyl Jun 26, 2023
e9e0592
remove duplicate EuiPage (#34)
Hailong-am Jun 26, 2023
751da2e
remove clear button, add the width of create button (#33)
zhichao-aws Jun 26, 2023
c57d78e
rename OpenSearch Plugins to OpenSearch Features
ruanyl Jun 27, 2023
f80d94c
Add some logic check when overwrite a saved object (#32)
SuZhou-Joe Jun 29, 2023
2e1a560
Add color, icon and defaultVISTheme for workspace (#36)
wanglam Jul 5, 2023
f2d7607
feat: add workspace list (#39)
raintygao Jul 6, 2023
9c3871d
Feature/menu change (#37)
SuZhou-Joe Jul 7, 2023
b1c9361
feat: different left menu and exit workspace (#38)
yuye-aws Jul 7, 2023
5ac2f3d
feat: make url stateful (#35)
SuZhou-Joe Jul 10, 2023
526d745
Fix build error and part of test error (#42)
raintygao Jul 11, 2023
e9df45f
feat: optimize code (#40)
SuZhou-Joe Jul 11, 2023
15ad166
fix: bootstrap error (#43)
SuZhou-Joe Jul 12, 2023
f348f01
feat: add workspace permission control interface (#41)
wanglam Jul 13, 2023
bc66ae3
allow user to turn on/off workspace from advance settings (#46)
ruanyl Jul 14, 2023
7f5656e
fix: unit test failure (#50)
SuZhou-Joe Jul 17, 2023
5bd20ec
Add workspace column into saved objects table (#44)
Hailong-am Jul 18, 2023
fe67d2c
fix missing mocks of workspacesSetup
ruanyl Jul 19, 2023
58bf926
Integrate workspace service into saved object management (#31)
SuZhou-Joe Jul 20, 2023
8cdd6a7
Feature: hide workspace from saved objects management page. (#45)
SuZhou-Joe Jul 21, 2023
34b0bc5
Add copy saved objects among workspaces functionality (#53)
gaobinlong Jul 21, 2023
6f5c215
add workspace saved objects client wrapper (#51)
wanglam Jul 21, 2023
f48755f
Refactor navigation links from left menu hard code to workspace plugi…
yuye-aws Jul 24, 2023
3a859b3
fix: osd bootstrap error (#57)
yuye-aws Jul 24, 2023
aac424d
feat: filter out ADMIN application and add feature dependency logic (…
wanglam Jul 24, 2023
110b3b1
feat: do not register app when feature flag is off (#56)
SuZhou-Joe Jul 24, 2023
3f83418
Sort category and non-category nav link according to order in left me…
yuye-aws Jul 26, 2023
b12e203
Refactor: Assign default value for filtered nav links (#64)
yuye-aws Jul 31, 2023
3bfab75
Permission control service for saved objects (#63)
SuZhou-Joe Jul 31, 2023
326b864
Remove server side workspace feature flag check (#69)
ruanyl Aug 2, 2023
b3cf57c
apply workspace permission check when bulk creating object (#66)
raintygao Aug 2, 2023
55dca3e
Register application "See more", "Home", "Create" and "Workspace Sett…
yuye-aws Aug 3, 2023
5649e4f
Add acl permission related functions (#65)
gaobinlong Aug 3, 2023
5f543b3
share saved objects to workspace api (#67)
Hailong-am Aug 3, 2023
b01cd4b
Feat remove feature group (#72)
wanglam Aug 3, 2023
62cbed7
feat: remove template section (#73)
raintygao Aug 4, 2023
a6538c5
Integration ACL check with saved objects. (#74)
SuZhou-Joe Aug 7, 2023
0a6e368
feat: add permission control section to workspace form (#75)
wanglam Aug 8, 2023
6910346
write permisions outside instead of workspace attributes (#79)
wanglam Aug 9, 2023
e8dcf49
Refactor UI setting register (#77)
ruanyl Aug 9, 2023
d04380b
refactor: simplified ACL transformPermission function (#78)
ruanyl Aug 9, 2023
bef80c2
Change public objects logic & Search with ACL control (#71)
SuZhou-Joe Aug 9, 2023
041d9fc
Refactor workspace server plugin (#82)
ruanyl Aug 11, 2023
ac222dd
add workspace filter into saved objects page (#76)
Hailong-am Aug 11, 2023
561a331
add permission check when updating workspace (#81)
raintygao Aug 11, 2023
46218ab
Show objects without workspace info when no workspaces are provided i…
SuZhou-Joe Aug 11, 2023
86d6570
feat: call saved objects with internal user (#80)
wanglam Aug 15, 2023
60804aa
feat: workspace context menu and picker menu (#86)
yuye-aws Aug 16, 2023
b6008f4
fix: permission check error (#88)
SuZhou-Joe Aug 17, 2023
89094a4
fix: redirect to home only when delete and exit workspace successfull…
yuye-aws Aug 17, 2023
99a3922
feat: add management permission for workspace create user (#92)
wanglam Aug 18, 2023
19ccc14
refactor: in left menu, move recently viewed from top to middle (#87)
yuye-aws Aug 21, 2023
ac6acd9
refactor: register workspace dropdown menu to left menu (#90)
ruanyl Aug 21, 2023
306231a
move index pattern to Library (#91)
Hailong-am Aug 21, 2023
6ce61a1
create workspace bug fix: navigate to workspace overview after create…
yuye-aws Aug 22, 2023
fe8bb1e
feat: accomplish dashboard_admin (#95)
SuZhou-Joe Aug 22, 2023
3fde67a
fix: incorrect permission modes when checking workspace permissions (…
SuZhou-Joe Aug 22, 2023
a7fbb39
fix: two "Overview"s under library section (#94)
yuye-aws Aug 22, 2023
f70cfa1
supports configure workspace features with wildcard (#96)
ruanyl Aug 22, 2023
c9f4b5f
update feature config of public workspace (#99)
ruanyl Aug 24, 2023
83f7759
fix: redirect error (#105)
SuZhou-Joe Aug 24, 2023
3d9fb63
feat: register data source as application (#101)
SuZhou-Joe Aug 24, 2023
f5dd0f3
fix import error on workspace updater (#107)
yuye-aws Aug 24, 2023
5ce834e
fix: make importing workspace-specific objects as copy (#62)
SuZhou-Joe Aug 24, 2023
7df3659
Change workspace id to 6 random characters (#100)
ruanyl Aug 25, 2023
08d55e1
add workspace attribute check and refactor saved object acl check (#93)
raintygao Aug 25, 2023
c885d08
filter non-configurable workspace features in workspace configuration…
raintygao Aug 25, 2023
763dd94
feat: filter applications according to categories (#103)
yuye-aws Aug 25, 2023
212bc94
[Refractor] Feature flag (#102)
SuZhou-Joe Aug 28, 2023
2bd8627
feat: register advanced settings under Management library (#111)
SuZhou-Joe Aug 29, 2023
674ff2b
fix: update snapshot for collapsible_nav.test.tsx and header.test.tsx…
yuye-aws Aug 29, 2023
7605fe9
index pattern always show under library (#115)
Hailong-am Aug 30, 2023
bfd5415
feat: duplicate selected objects (#113)
yuye-aws Aug 30, 2023
43c144f
add workspace name duplication check (#117)
Hailong-am Aug 31, 2023
cb3e7c1
feat: customize management workspace (#122)
yuye-aws Sep 4, 2023
342ee33
feat: remove workspace switch droplist and create workspace button (#…
raintygao Sep 5, 2023
92b204c
cleanup: move WORKSPACE_TYPE constant to core/utils/constants (#129)
SuZhou-Joe Sep 6, 2023
d413363
Update backport.yml installation id
ruanyl Sep 6, 2023
43b87c1
Revert "[Refractor] Feature flag (#102)" (#124)
ruanyl Sep 6, 2023
12855ad
fix: type import on WORKSPACE_TYPE (#131)
SuZhou-Joe Sep 6, 2023
a23b39c
Setup mechanism for register customized query DSL logic (#128)
SuZhou-Joe Sep 6, 2023
2d3800b
refactor: derive currentWorkspace in workspaces_service (#126)
ruanyl Sep 6, 2023
c1d6ec2
Saved objects page change (#123)
Hailong-am Sep 7, 2023
1f3582a
fix: cypress test (#116)
SuZhou-Joe Sep 11, 2023
00132f8
fix: workspace permission entire update (#132)
wanglam Sep 11, 2023
d17a233
Add workspaces parameter to resolve_import_errors API (#133)
gaobinlong Sep 11, 2023
8fe771c
Add debug log when encounters permission check failure (#125)
gaobinlong Sep 11, 2023
9b202e1
feat: duplicate all and single objects (#121)
yuye-aws Sep 11, 2023
b5f004b
Delete saved object when deleting workspace (#84)
Hailong-am Sep 12, 2023
65c07a6
feat: import sample data saved objects to workspace (#118)
wanglam Sep 13, 2023
39cc54a
feat: make workspace permission first row deletable for workspace cre…
wanglam Sep 13, 2023
0a4b5c9
Refractor: remove `processFindOptions` and `getPermissionQuery` metho…
SuZhou-Joe Sep 13, 2023
db5b60a
Self host runner (#140)
SuZhou-Joe Sep 14, 2023
461cffb
Remove pulic workspace logic for share API (#149)
Hailong-am Sep 14, 2023
e5039e2
Retire dashboards management (#138)
raintygao Sep 14, 2023
b16631e
Replace savedObjectReposiotry with savedObjectClient for workspace na…
Hailong-am Sep 14, 2023
83cbacc
disable github workflows running on windows for development (#161)
ruanyl Sep 15, 2023
17c063b
feat: management workspace customization (#153)
yuye-aws Sep 15, 2023
bd68902
update header snapshot (#164)
yuye-aws Sep 15, 2023
47e10e4
refactor: remove dashboard admin implementation (#159)
ruanyl Sep 15, 2023
04516cf
fix: ftr (#167)
raintygao Sep 15, 2023
3ecaf7d
Refractor: move permission control service to workspace directory and…
SuZhou-Joe Sep 15, 2023
543487d
fix failed tests of discover 2.0 (#175)
ruanyl Sep 18, 2023
6bc618a
fix failed tests after syncing with main (#174)
ruanyl Sep 18, 2023
cfa9c4b
feat: skip permission validate when no workspaces and permissions att…
wanglam Sep 18, 2023
e296a5d
Fix typo (#176)
ruanyl Sep 18, 2023
93b1e44
remove exit workspace logic (#179)
yuye-aws Sep 18, 2023
4bccdea
Feat: setup reserved workspaces when calling list workspaces API (#178)
SuZhou-Joe Sep 20, 2023
ccd0520
feat: Duplicate dashboard visualize (#148)
yuye-aws Sep 20, 2023
33e90ec
feat: use passed ACLSearchParams.permissionModes (#181)
wanglam Sep 20, 2023
a2abcf2
fix failed ut for index pattern and retire dashboard management (#188)
Hailong-am Sep 20, 2023
e3b7da3
feat: optimize logic when checkConflict and bulkCreate (#189)
SuZhou-Joe Sep 23, 2023
ecff529
add unit tests for workspace core service (#191) (#197)
ruanyl Sep 25, 2023
25b9e5c
Support to display workspace feature configured with wildcard (#186)
ruanyl Sep 25, 2023
03b2452
feat: reserved workspace customization (#202)
yuye-aws Sep 25, 2023
29ccc20
Feat remove management permission mode in acl permission (#195)
wanglam Sep 25, 2023
37171cf
bug fix: hide workspace overview and setting when no workspace (#205)
yuye-aws Oct 8, 2023
8132e14
Add more unit test for share/delete api (#184)
Hailong-am Oct 9, 2023
cef4ce7
[Backport workspace]Patch/first pr (#194) (#196)
SuZhou-Joe Oct 9, 2023
8505341
Add integration test for workspace saved objects client wrapper (#206)
wanglam Oct 9, 2023
5a26f70
add permission check for bulkCreate when overwrite (#198)
raintygao Oct 10, 2023
b935e36
Refactor workspace context menu register (#207)
ruanyl Oct 10, 2023
2771ff9
feat: remove unnecessary saved object get call (#214)
wanglam Oct 11, 2023
c57e880
Workspace enabled flag to capabilities service (#219)
ruanyl Oct 11, 2023
b22111a
fix: create and bulkCreate can not be override with permitted target …
wanglam Oct 12, 2023
e36a7b6
[Backport workspace] patch with retire dashboard management and add …
opensearch-workspace-development[bot] Oct 12, 2023
a74a6ee
navigate to create workspace/workspaces list page without refreshing …
ruanyl Oct 12, 2023
dd486e9
refactor: assigned copied saved objects to new variables (#227)
wanglam Oct 13, 2023
2964934
Support disable permission check on workspace (#228)
Hailong-am Oct 16, 2023
9b8bdf6
[Backport workspace][Workspace]Add workspace id in basePath (#212) (#…
SuZhou-Joe Oct 16, 2023
7a72a73
[Backport workspace]Add unit test for delete saved objects by workspa…
Hailong-am Oct 16, 2023
f00cb3c
feat: update create workspace page UI and implement unit tests (#226)
yuye-aws Oct 17, 2023
1ac7ec4
feature: cannot delete last admin user/group in workspace settings (#…
yuye-aws Oct 19, 2023
4e09ab4
Add simple string query flags options to find method
Hailong-am Oct 17, 2023
0c43103
fix osd boostrap
Hailong-am Oct 23, 2023
711f536
Add unit test
Hailong-am Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/add-untriaged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
apply-label:
runs-on: ubuntu-latest
runs-on: arc-runner-set
steps:
- uses: actions/github-script@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
backport:
runs-on: ubuntu-latest
runs-on: arc-runner-set
permissions:
contents: write
pull-requests: write
Expand All @@ -31,7 +31,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
# opensearch-trigger-bot installation ID
installation_id: 22958780
installation_id: 41494816

- name: Backport
uses: VachaShah/[email protected]
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [arc-runner-set]
group: [1, 2, 3, 4]
include:
- os: ubuntu-latest
- os: arc-runner-set
name: Linux
- os: windows-latest
name: Windows
runs-on: ${{ matrix.os }}
steps:
- name: Configure git's autocrlf (Windows only)
Expand Down Expand Up @@ -92,13 +90,13 @@ jobs:

- name: Run linter
# ciGroup 1 of unit-tests is shorter and Linux is faster
if: matrix.group == 1 && matrix.os == 'ubuntu-latest'
if: matrix.group == 1 && matrix.os == 'arc-runner-set'
id: linter
run: yarn lint

- name: Validate NOTICE file
# ciGroup 1 of unit-tests is shorter and Linux is faster
if: matrix.group == 1 && matrix.os == 'ubuntu-latest'
if: matrix.group == 1 && matrix.os == 'arc-runner-set'
id: notice-validate
run: yarn notice:validate

Expand Down Expand Up @@ -130,13 +128,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [arc-runner-set]
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
include:
- os: ubuntu-latest
- os: arc-runner-set
name: Linux
- os: windows-latest
name: Windows
runs-on: ${{ matrix.os }}
steps:
- run: echo Running functional tests for ciGroup${{ matrix.group }}
Expand Down Expand Up @@ -217,21 +213,16 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
- os: arc-runner-set
name: Linux x64
ext: tar.gz
suffix: linux-x64
script: build-platform --linux --skip-os-packages
- os: ubuntu-latest
- os: arc-runner-set
name: Linux ARM64
ext: tar.gz
suffix: linux-arm64
script: build-platform --linux-arm --skip-os-packages
- os: windows-latest
name: Windows x64
ext: zip
suffix: windows-x64
script: build-platform --windows --skip-os-packages
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down Expand Up @@ -307,8 +298,9 @@ jobs:
retention-days: 1

bwc-tests:
if: false
needs: [build-min-artifact-tests]
runs-on: ubuntu-latest
runs-on: arc-runner-set
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
options: --user 1001
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
runs-on: ubuntu-latest
runs-on: arc-runner-set
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_doc_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
jobs:
create-issue:
if: ${{ github.event.label.name == 'needs-documentation' }}
runs-on: ubuntu-latest
runs-on: arc-runner-set
name: Create Documentation Issue
steps:
- name: GitHub App token
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
cypress-tests:
runs-on: ubuntu-latest
runs-on: arc-runner-set
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
options: --user 1001
Expand Down Expand Up @@ -55,7 +55,8 @@ jobs:
with:
path: ${{ env.FTR_PATH }}
repository: opensearch-project/opensearch-dashboards-functional-test
ref: '${{ github.base_ref }}'
# revert this to '${{ github.base_ref }}'
ref: 'workspace'

- name: Get Cypress version
id: cypress_version
Expand Down Expand Up @@ -88,7 +89,7 @@ jobs:
name: ftr-cypress-screenshots
path: ${{ env.FTR_PATH }}/cypress/screenshots
retention-days: 1

- uses: actions/upload-artifact@v3
if: always()
with:
Expand All @@ -101,4 +102,4 @@ jobs:
with:
name: ftr-cypress-results
path: ${{ env.FTR_PATH }}/cypress/results
retention-days: 1
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/delete_backport_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
delete-branch:
runs-on: ubuntu-latest
runs-on: arc-runner-set
if: startsWith(github.event.pull_request.head.ref,'backport/')
steps:
- name: Delete merged branch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-workflow-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-action:
runs-on: ubuntu-latest
runs-on: arc-runner-set
permissions:
pull-requests: write
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/links_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
linkchecker:

runs-on: ubuntu-latest
runs-on: arc-runner-set

steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Adds Data explorer framework and implements Discover using it ([#4806](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4806))
- [Theme] Use themes' definitions to render the initial view ([#4936](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4936/))
- [Theme] Make `next` theme the default ([#4854](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4854/))
- [Workspace] Setup workspace skeleton and implement basic CRUD API ([#5075](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5075/))

### 🐛 Bug Fixes

Expand Down
6 changes: 6 additions & 0 deletions config/opensearch_dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,9 @@

# Set the value of this setting to true to enable plugin augmentation on Dashboard
# vis_augmenter.pluginAugmentationEnabled: true

# Set the value to true enable workspace feature
# workspace.enabled: false
# Set the value to false to disable permission check on workspace
# Permission check depends on OpenSearch Dashboards has authentication enabled, set it to false if no authentication is configured
# workspace.permission.enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const loginPage = new LoginPage(cy);

describe('verify the advanced settings are saved', () => {
beforeEach(() => {
miscUtils.visitPage('app/management/opensearch-dashboards/settings');
miscUtils.visitPage('app/settings');
loginPage.enterUserName('admin');
loginPage.enterPassword('admin');
loginPage.submit();
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/with-security/helpers/generate_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const loginPage = new LoginPage(cy);

describe('Generating BWC test data with security', () => {
beforeEach(() => {
miscUtils.visitPage('app/management/opensearch-dashboards/settings');
miscUtils.visitPage('app/settings');
loginPage.enterUserName('admin');
loginPage.enterPassword('admin');
loginPage.submit();
Expand All @@ -29,7 +29,7 @@ describe('Generating BWC test data with security', () => {
});

it('adds advanced settings', () => {
miscUtils.visitPage('app/management/opensearch-dashboards/settings');
miscUtils.visitPage('app/settings');
cy.get('[data-test-subj="advancedSetting-editField-theme:darkMode"]').click();
cy.get('[data-test-subj="advancedSetting-editField-timeline:max_buckets"]').type(
'{selectAll}4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const miscUtils = new MiscUtils(cy);

describe('verify the advanced settings are saved', () => {
beforeEach(() => {
miscUtils.visitPage('app/management/opensearch-dashboards/settings');
miscUtils.visitPage('app/settings');
});

it('the dark mode is on', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Generating BWC test data without security', () => {
miscUtils.visitPage('app');
});
it('adds advanced settings', () => {
miscUtils.visitPage('app/management/opensearch-dashboards/settings');
miscUtils.visitPage('app/settings');
cy.get('[data-test-subj="advancedSetting-editField-theme:darkMode"]').click();
cy.get('[data-test-subj="advancedSetting-editField-timeline:max_buckets"]').type(
'{selectAll}4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const createStartContractMock = (): jest.Mocked<CapabilitiesStart> => ({
catalogue: {},
management: {},
navLinks: {},
workspaces: {},
}),
});

Expand Down
13 changes: 13 additions & 0 deletions src/core/public/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { IUiSettingsClient } from '../ui_settings';
import { SavedObjectsStart } from '../saved_objects';
import { AppCategory } from '../../types';
import { ScopedHistory } from './scoped_history';
import { WorkspacesStart } from '../workspace';

/**
* Accessibility status of an application.
Expand Down Expand Up @@ -244,6 +245,16 @@ export interface App<HistoryLocationState = unknown> {
* ```
*/
exactRoute?: boolean;

/**
* The dependencies of one application, required feature will be automatic select and can't
* be unselect in the workspace configuration.
*/
dependencies?: {
[key: string]: {
type: 'required' | 'optional';
};
};
}

/**
Expand Down Expand Up @@ -334,6 +345,8 @@ export interface AppMountContext {
injectedMetadata: {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
};
/** {@link WorkspacesService} */
workspaces: WorkspacesStart;
};
}

Expand Down
10 changes: 10 additions & 0 deletions src/core/public/chrome/chrome_service.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ import type { PublicMethodsOf } from '@osd/utility-types';
import { ChromeBadge, ChromeBreadcrumb, ChromeService, InternalChromeStart } from './';
import { getLogosMock } from '../../common/mocks';

const createSetupContractMock = () => {
return {
registerCollapsibleNavHeader: jest.fn(),
};
};

const createStartContractMock = () => {
const startContract: DeeplyMockedKeys<InternalChromeStart> = {
getHeaderComponent: jest.fn(),
navLinks: {
getNavLinks$: jest.fn(),
getFilteredNavLinks$: jest.fn(),
setFilteredNavLinks: jest.fn(),
has: jest.fn(),
get: jest.fn(),
getAll: jest.fn(),
Expand Down Expand Up @@ -95,6 +103,7 @@ const createStartContractMock = () => {
type ChromeServiceContract = PublicMethodsOf<ChromeService>;
const createMock = () => {
const mocked: jest.Mocked<ChromeServiceContract> = {
setup: jest.fn(),
start: jest.fn(),
stop: jest.fn(),
};
Expand All @@ -105,4 +114,5 @@ const createMock = () => {
export const chromeServiceMock = {
create: createMock,
createStartContract: createStartContractMock,
createSetupContract: createSetupContractMock,
};
2 changes: 2 additions & 0 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { notificationServiceMock } from '../notifications/notifications_service.
import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock';
import { ChromeService } from './chrome_service';
import { getAppInfo } from '../application/utils';
import { workspacesServiceMock } from '../workspace/workspaces_service.mock';

class FakeApp implements App {
public title = `${this.id} App`;
Expand All @@ -67,6 +68,7 @@ function defaultStartDeps(availableApps?: App[]) {
injectedMetadata: injectedMetadataServiceMock.createStartContract(),
notifications: notificationServiceMock.createStartContract(),
uiSettings: uiSettingsServiceMock.createStartContract(),
workspaces: workspacesServiceMock.createStartContract(),
};

if (availableApps) {
Expand Down
Loading