forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lin Wang <wonglam@amazon.com>
- Loading branch information
Showing
4 changed files
with
418 additions
and
4 deletions.
There are no files selected for viewing
9 changes: 5 additions & 4 deletions
9
src/plugins/workspace/public/components/workspace_creator/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import React from 'react'; | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export const WorkspaceCreator = () => { | ||
return <div>TODO</div>; | ||
}; | ||
export { WorkspaceCreator } from './workspace_creator'; |
81 changes: 81 additions & 0 deletions
81
src/plugins/workspace/public/components/workspace_creator/sample_data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export const defaultTemplates = [ | ||
{ | ||
name: 'Search', | ||
image: '', | ||
description: | ||
'Intro paragraph blur about observability, key features, and why you’d want to create an observability workspace.', | ||
keyFeatures: ['Logs', 'Applications', 'Metrics', 'Synthetics', 'Traces', 'Etc'], | ||
}, | ||
{ | ||
name: 'Observability', | ||
image: '', | ||
description: | ||
'Intro paragraph blur about observability, key features, and why you’d want to create an observability workspace.', | ||
keyFeatures: ['Logs', 'Applications', 'Metrics', 'Synthetics', 'Traces', 'Etc'], | ||
}, | ||
{ | ||
name: 'Security Analytics', | ||
image: '', | ||
description: | ||
'Intro paragraph blur about observability, key features, and why you’d want to create an observability workspace.', | ||
keyFeatures: ['Logs', 'Applications', 'Metrics', 'Synthetics', 'Traces', 'Etc'], | ||
}, | ||
{ | ||
name: 'General Analytics', | ||
image: '', | ||
description: | ||
'Intro paragraph blur about observability, key features, and why you’d want to create an observability workspace.', | ||
keyFeatures: ['Logs', 'Applications', 'Metrics', 'Synthetics', 'Traces', 'Etc'], | ||
}, | ||
]; | ||
|
||
export const defaultFeatureOrGroups = [ | ||
{ | ||
name: 'Analytics', | ||
features: [ | ||
{ id: '1', name: 'Data Explorer', template: ['Observability'] }, | ||
{ id: '2', name: 'Dashboard', template: ['Observability'] }, | ||
{ id: '3', name: 'Visualize', template: ['Observability'] }, | ||
{ id: '4', name: 'Maps', template: ['Observability'] }, | ||
], | ||
}, | ||
{ | ||
name: 'Observability', | ||
features: [ | ||
{ id: '5', name: 'Logs', template: ['Observability'] }, | ||
{ id: '6', name: 'Metrics', template: ['Observability'] }, | ||
{ id: '7', name: 'Traces', template: ['Observability'] }, | ||
{ id: '8', name: 'Applications', template: ['Observability'] }, | ||
], | ||
}, | ||
{ | ||
name: 'Alerting', | ||
features: [ | ||
{ id: '9', name: 'Alerts', template: [] }, | ||
{ id: '10', name: 'Monitories', template: [] }, | ||
], | ||
}, | ||
{ | ||
name: 'Security Analytics', | ||
features: [ | ||
{ id: '11', name: 'Findings', template: [] }, | ||
{ id: '12', name: 'Alerts', template: [] }, | ||
{ id: '13', name: 'Detectors', template: [] }, | ||
{ id: '14', name: 'Rules', template: [] }, | ||
], | ||
}, | ||
{ id: '15', name: 'Notifications', template: [] }, | ||
{ | ||
name: 'Machine Learning', | ||
features: [ | ||
{ id: '16', name: 'Detectors', template: [] }, | ||
{ id: '17', name: 'Models', template: [] }, | ||
{ id: '18', name: 'etc', template: [] }, | ||
], | ||
}, | ||
]; |
22 changes: 22 additions & 0 deletions
22
src/plugins/workspace/public/components/workspace_creator/workspace_creator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiSpacer, EuiTitle } from '@elastic/eui'; | ||
|
||
import { WorkspaceForm } from './workspace_form'; | ||
import { defaultTemplates, defaultFeatureOrGroups } from './sample_data'; | ||
|
||
export const WorkspaceCreator = () => { | ||
return ( | ||
<div> | ||
<EuiTitle> | ||
<h1>Create Workspace</h1> | ||
</EuiTitle> | ||
<EuiSpacer /> | ||
<WorkspaceForm templates={defaultTemplates} featureOrGroups={defaultFeatureOrGroups} /> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.