Skip to content

Commit

Permalink
feat: add workspace creator page
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <wonglam@amazon.com>
  • Loading branch information
wanglam committed Jun 9, 2023
1 parent 11a5ad4 commit a811702
Show file tree
Hide file tree
Showing 4 changed files with 418 additions and 4 deletions.
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';
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: [] },
],
},
];
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>
);
};
Loading

0 comments on commit a811702

Please sign in to comment.