Skip to content

Commit 278177b

Browse files
opensearch-trigger-bot[bot]github-actions[bot]opensearch-changeset-bot[bot]SuZhou-Joe
authored
[Workspace] Add workspace overview page (#6584) (#6641)
* 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 <ihailong@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: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
1 parent 7dbb5a0 commit 278177b

19 files changed

+1589
-20
lines changed

changelogs/fragments/6584.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
feat:
2+
- [Workspace] Add workspace overview page ([#6584](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6584))

src/plugins/workspace/common/constants.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
import { i18n } from '@osd/i18n';
7+
import { AppCategory } from '../../../core/types';
8+
69
export const WORKSPACE_FATAL_ERROR_APP_ID = 'workspace_fatal_error';
710
export const WORKSPACE_CREATE_APP_ID = 'workspace_create';
811
export const WORKSPACE_LIST_APP_ID = 'workspace_list';
@@ -37,3 +40,42 @@ export const PRIORITY_FOR_WORKSPACE_ID_CONSUMER_WRAPPER = -3;
3740
export const PRIORITY_FOR_WORKSPACE_UI_SETTINGS_WRAPPER = -2;
3841
export const PRIORITY_FOR_WORKSPACE_CONFLICT_CONTROL_WRAPPER = -1;
3942
export const PRIORITY_FOR_PERMISSION_CONTROL_WRAPPER = 0;
43+
44+
export const WORKSPACE_APP_CATEGORIES: Record<string, AppCategory> = Object.freeze({
45+
// below categories are for workspace
46+
getStarted: {
47+
id: 'getStarted',
48+
label: i18n.translate('core.ui.getStarted.label', {
49+
defaultMessage: 'Get started',
50+
}),
51+
order: 10000,
52+
},
53+
dashboardAndReport: {
54+
id: 'dashboardReport',
55+
label: i18n.translate('core.ui.dashboardReport.label', {
56+
defaultMessage: 'Dashboard and report',
57+
}),
58+
order: 11000,
59+
},
60+
investigate: {
61+
id: 'investigate',
62+
label: i18n.translate('core.ui.investigate.label', {
63+
defaultMessage: 'Investigate',
64+
}),
65+
order: 12000,
66+
},
67+
detect: {
68+
id: 'detect',
69+
label: i18n.translate('core.ui.detect.label', {
70+
defaultMessage: 'Detect',
71+
}),
72+
order: 13000,
73+
},
74+
searchSolution: {
75+
id: 'searchSolution',
76+
label: i18n.translate('core.ui.searchSolution.label', {
77+
defaultMessage: 'Build search solution',
78+
}),
79+
order: 14000,
80+
},
81+
});

src/plugins/workspace/public/application.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { WorkspaceListApp } from './components/workspace_list_app';
1414
import { WorkspaceUpdaterProps } from './components/workspace_updater';
1515
import { Services } from './types';
1616
import { WorkspaceCreatorProps } from './components/workspace_creator/workspace_creator';
17+
import { WorkspaceOverviewApp } from './components/workspace_overview_app';
18+
import { WorkspaceOverviewProps } from './components/workspace_overview/workspace_overview';
1719

1820
export const renderCreatorApp = (
1921
{ element }: AppMountParameters,
@@ -75,3 +77,20 @@ export const renderListApp = ({ element }: AppMountParameters, services: Service
7577
ReactDOM.unmountComponentAtNode(element);
7678
};
7779
};
80+
81+
export const renderOverviewApp = (
82+
{ element }: AppMountParameters,
83+
services: Services,
84+
props: WorkspaceOverviewProps
85+
) => {
86+
ReactDOM.render(
87+
<OpenSearchDashboardsContextProvider services={services}>
88+
<WorkspaceOverviewApp {...props} />
89+
</OpenSearchDashboardsContextProvider>,
90+
element
91+
);
92+
93+
return () => {
94+
ReactDOM.unmountComponentAtNode(element);
95+
};
96+
};

src/plugins/workspace/public/components/workspace_overview/__snapshots__/workspace_overview.test.tsx.snap

Lines changed: 260 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)