Skip to content

Commit

Permalink
pick up workspaceEnabled changes
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Oct 17, 2023
1 parent ccb9170 commit 2308c6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ describe('SavedObjectsTable', () => {
edit: false,
delete: false,
},
workspaces: {
enabled: false,
},
};

http.post.mockResolvedValue([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class SavedObjectsTable extends Component<SavedObjectsTableProps, SavedOb
isIncludeReferencesDeepChecked: true,
currentWorkspaceId: this.props.workspaces.currentWorkspaceId$.getValue(),
availableWorkspaces: this.props.workspaces.workspaceList$.getValue(),
workspaceEnabled: this.props.workspaces.workspaceEnabled$.getValue(),
workspaceEnabled: this.props.applications.capabilities.workspaces.enabled,
};
}

Expand Down Expand Up @@ -317,10 +317,6 @@ export class SavedObjectsTable extends Component<SavedObjectsTableProps, SavedOb
this.workspacesSubscription = workspace.workspaceList$.subscribe((workspaceList) => {
this.setState({ availableWorkspaces: workspaceList });
});

this.workspacesEnabledSubscription = workspace.workspaceEnabled$.subscribe((enabled) => {
this.setState({ workspaceEnabled: enabled });
});
};

fetchSavedObject = (type: string, id: string) => {
Expand Down

0 comments on commit 2308c6d

Please sign in to comment.