Skip to content

Commit

Permalink
[Workspace] Add workspace overview page (#6584) (#6641)
Browse files Browse the repository at this point in the history
* workspace overview page



address review comments



address ux review comments



Add workspace overview to breadCrumb



getting start modal & settings tab



home breadcrumb



fix rebase issue



tmp enable management



add workspace overview collapsed into localStorage



getting start modal



page layout



Add test cases



fix breadcrumb



* fix merge issue



* fix wrong dataSourceManagement id



* Changeset file for PR #6584 created/updated

* update page layout



* overview tab layout update



* fix workspace overview page breadcrumb



* collapsed setting to be workspace level



* fix workspace_overview_modal unit test



* Update src/plugins/workspace/public/components/workspace_overview/getting_start_card.tsx




* Update src/plugins/workspace/public/components/workspace_overview/workspace_overview_settings.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* Update src/plugins/workspace/public/components/workspace_overview/getting_start_modal.tsx




* address review comments



* address review comments



* fix setBreadcrumbs issue



* wording change of breadcrumbs



* udpate breadcrumb subscription to be a better name



* Add unit test



---------




(cherry picked from commit 9c884b0)

Signed-off-by: Hailong Cui <[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: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: SuZhou-Joe <[email protected]>
  • Loading branch information
4 people authored Apr 26, 2024
1 parent 7dbb5a0 commit 278177b
Show file tree
Hide file tree
Showing 19 changed files with 1,589 additions and 20 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/6584.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- [Workspace] Add workspace overview page ([#6584](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6584))
42 changes: 42 additions & 0 deletions src/plugins/workspace/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';
import { AppCategory } from '../../../core/types';

export const WORKSPACE_FATAL_ERROR_APP_ID = 'workspace_fatal_error';
export const WORKSPACE_CREATE_APP_ID = 'workspace_create';
export const WORKSPACE_LIST_APP_ID = 'workspace_list';
Expand Down Expand Up @@ -37,3 +40,42 @@ export const PRIORITY_FOR_WORKSPACE_ID_CONSUMER_WRAPPER = -3;
export const PRIORITY_FOR_WORKSPACE_UI_SETTINGS_WRAPPER = -2;
export const PRIORITY_FOR_WORKSPACE_CONFLICT_CONTROL_WRAPPER = -1;
export const PRIORITY_FOR_PERMISSION_CONTROL_WRAPPER = 0;

export const WORKSPACE_APP_CATEGORIES: Record<string, AppCategory> = Object.freeze({
// below categories are for workspace
getStarted: {
id: 'getStarted',
label: i18n.translate('core.ui.getStarted.label', {
defaultMessage: 'Get started',
}),
order: 10000,
},
dashboardAndReport: {
id: 'dashboardReport',
label: i18n.translate('core.ui.dashboardReport.label', {
defaultMessage: 'Dashboard and report',
}),
order: 11000,
},
investigate: {
id: 'investigate',
label: i18n.translate('core.ui.investigate.label', {
defaultMessage: 'Investigate',
}),
order: 12000,
},
detect: {
id: 'detect',
label: i18n.translate('core.ui.detect.label', {
defaultMessage: 'Detect',
}),
order: 13000,
},
searchSolution: {
id: 'searchSolution',
label: i18n.translate('core.ui.searchSolution.label', {
defaultMessage: 'Build search solution',
}),
order: 14000,
},
});
19 changes: 19 additions & 0 deletions src/plugins/workspace/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { WorkspaceListApp } from './components/workspace_list_app';
import { WorkspaceUpdaterProps } from './components/workspace_updater';
import { Services } from './types';
import { WorkspaceCreatorProps } from './components/workspace_creator/workspace_creator';
import { WorkspaceOverviewApp } from './components/workspace_overview_app';
import { WorkspaceOverviewProps } from './components/workspace_overview/workspace_overview';

export const renderCreatorApp = (
{ element }: AppMountParameters,
Expand Down Expand Up @@ -75,3 +77,20 @@ export const renderListApp = ({ element }: AppMountParameters, services: Service
ReactDOM.unmountComponentAtNode(element);
};
};

export const renderOverviewApp = (
{ element }: AppMountParameters,
services: Services,
props: WorkspaceOverviewProps
) => {
ReactDOM.render(
<OpenSearchDashboardsContextProvider services={services}>
<WorkspaceOverviewApp {...props} />
</OpenSearchDashboardsContextProvider>,
element
);

return () => {
ReactDOM.unmountComponentAtNode(element);
};
};

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

Loading

0 comments on commit 278177b

Please sign in to comment.