Skip to content

Commit bf226bb

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/site/babel/runtime-7.27.0
2 parents b43d2fd + 6f31d84 commit bf226bb

File tree

6 files changed

+53
-56
lines changed

6 files changed

+53
-56
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"@emotion/react": "^11.11.3",
100100
"@emotion/styled": "^11.11.0",
101101
"@layer5/meshery-design-embed": "^0.4.0",
102+
"@layer5/schemas": "^0.0.6-8",
102103
"@mui/material": "^5.15.11",
103104
"@types/mui-datatables": "*",
104105
"billboard.js": "^3.14.3",

src/schemas/createAndEditEnvironment/schema.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1+
import { EnvironmentDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';
2+
3+
const environmentSchema = EnvironmentDefinitionV1Beta1OpenApiSchema.components.schemas;
14
const createAndEditEnvironmentSchema = {
25
title: 'Environment',
36
required: ['name'],
47
properties: {
58
description: {
6-
description:
7-
'An environment is a collection of resources, such as connections & credentail. Provide a detailed description to clarify the purpose of this environment and the types of resources it encompasses. You can modify the description at any time. Learn more about environments [here](https://docs.meshery.io/concepts/logical/environments).',
9+
description: environmentSchema.environmentPayload.properties.description.description,
810
format: 'textarea',
911
title: 'Description',
10-
type: 'string',
12+
type: environmentSchema.environmentPayload.properties.description.type,
1113
'x-rjsf-grid-area': '12'
1214
},
1315
name: {
14-
description:
15-
'An environment is a collection of resources. Provide a name that meaningfully represents these resources. You can change the name of the environment even after its creation.',
16+
description: environmentSchema.environmentPayload.properties.name.description,
1617
title: 'Name',
17-
type: 'string',
18+
type: environmentSchema.environmentPayload.properties.name.type,
1819
'x-rjsf-grid-area': '12'
1920
},
2021
organization: {
21-
type: 'string',
22+
type: environmentSchema.environmentPayload.properties.OrganizationID.type,
2223
title: 'Organization',
23-
description:
24-
'Select an organization in which you want to create this new environment. Keep in mind that the organization cannot be changed after creation.',
24+
description: environmentSchema.environmentPayload.properties.OrganizationID.description,
2525
enum: [],
2626
enumNames: [],
2727
'x-rjsf-grid-area': '12'
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
/**
22
* Schema for create or edit workspace modals
33
*/
4+
import { WorkspaceDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';
5+
6+
const workspaceSchema = WorkspaceDefinitionV1Beta1OpenApiSchema.components.schemas;
47
const createAndEditWorkspace = {
58
properties: {
69
description: {
7-
description:
8-
"Workspaces serve as a virtual space for your team-based work, allows you to control access and more, Provide a detailed description to clarify the purpose of this workspace. Remember you can changes description of workspace after it's creations too. Learn more about workspaces [here](https://docs.meshery.io/concepts/logical/workspaces)",
10+
description: workspaceSchema.workspacePayload.properties.description.description,
911
format: 'textarea',
1012
title: 'Description',
11-
type: 'string',
13+
type: workspaceSchema.workspacePayload.properties.description.type,
1214
'x-rjsf-grid-area': '12'
1315
},
1416
name: {
15-
description:
16-
'Provide a name that meaningfully represents this workspace. You can change the name of the workspace even after its creation.',
17+
description: workspaceSchema.workspacePayload.properties.name.description,
1718
title: 'Name',
18-
type: 'string',
19+
type: workspaceSchema.workspacePayload.properties.name.type,
1920
'x-rjsf-grid-area': '12'
2021
},
2122
organization: {
22-
type: 'string',
23-
description:
24-
'Select an organization in which you want to create this new workspace. Keep in mind that the organization cannot be changed after creation.',
23+
type: workspaceSchema.workspacePayload.properties.organization_id.type,
24+
description: workspaceSchema.workspacePayload.properties.organization_id.description,
2525
title: 'Organization',
2626
enum: [],
2727
enumNames: [],
2828
'x-rjsf-grid-area': '12'
2929
}
3030
},
3131
type: 'object',
32-
required: ['name', 'organization']
32+
required: workspaceSchema.workspacePayload.required
3333
};
3434

3535
export default createAndEditWorkspace;

src/schemas/importDesign/schema.tsx

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1+
import { DesignDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';
2+
3+
const DesignSchema = DesignDefinitionV1Beta1OpenApiSchema.components.schemas;
4+
15
const importDesignSchema = {
26
type: 'object',
37
properties: {
48
name: {
5-
type: 'string',
9+
type: DesignSchema.MesheryPatternImportRequestBody.properties.name.type,
610
title: 'Design file name',
7-
default: 'Untitled Design',
11+
default: DesignSchema.MesheryPatternImportRequestBody.properties.name.default,
812
'x-rjsf-grid-area': '12',
9-
description:
10-
'Provide a name for your design file. This name will help you identify the file more easily. You can also change the name of your design after importing it.'
13+
description: DesignSchema.MesheryPatternImportRequestBody.properties.name.description
1114
},
12-
// designType: {
13-
// title: 'Design type',
14-
// enum: ['Helm Chart', 'Kubernetes Manifest', 'Docker Compose', 'Meshery Design'],
15-
// 'x-rjsf-grid-area': '6',
16-
// description:
17-
// "Select the type of design you are uploading. The 'Design Type' determines the format, structure, and content of the file you are uploading. Choose the appropriate design type that matches the nature of your file. Checkout https://docs.meshery.io/guides/configuration-management/creating-a-meshery-design to learn more about designs"
18-
// },
1915

2016
uploadType: {
2117
title: 'Upload method',
2218
enum: ['File Upload', 'URL Import'],
2319
default: 'URL Import',
2420
'x-rjsf-grid-area': '12',
25-
description:
26-
"Choose the method you prefer to upload your design file. Select 'File Upload' if you have the file on your local system, or 'URL Import' if you have the file hosted online."
21+
description: DesignSchema.MesheryPatternImportRequestBody.description
2722
}
2823
},
2924

@@ -39,10 +34,9 @@ const importDesignSchema = {
3934
then: {
4035
properties: {
4136
file: {
42-
type: 'string',
43-
format: 'file',
44-
description:
45-
'Supported formats: Kubernetes Manifests, Helm Charts, Docker Compose, and Meshery Designs. See [Import Designs Documentation](https://docs.meshery.io/guides/configuration-management/importing-designs#import-designs-using-meshery-ui) for details',
37+
type: DesignSchema.MesheryPatternImportRequestBody.properties.file.type,
38+
format: DesignSchema.MesheryPatternImportRequestBody.properties.file.format,
39+
description: DesignSchema.MesheryPatternImportRequestBody.properties.file.description,
4640
'x-rjsf-grid-area': '12'
4741
}
4842
},
@@ -60,11 +54,10 @@ const importDesignSchema = {
6054
then: {
6155
properties: {
6256
url: {
63-
type: 'string',
64-
format: 'uri',
57+
type: DesignSchema.MesheryPatternImportRequestBody.properties.url.type,
58+
format: DesignSchema.MesheryPatternImportRequestBody.properties.url.format,
6559
title: 'URL',
66-
description:
67-
'Provide the URL of the file you want to import. This should be a direct URL to a single file, for example: https://raw.github.com/your-design-file.yaml. Also, ensure that design is in a supported format: Kubernetes Manifest, Helm Chart, Docker Compose, or Meshery Design. See [Import Designs Documentation](https://docs.meshery.io/guides/configuration-management/importing-designs#import-designs-using-meshery-ui) for details',
60+
description: DesignSchema.MesheryPatternImportRequestBody.properties.url.description,
6861
'x-rjsf-grid-area': '12'
6962
}
7063
},

src/schemas/importModel/schema.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1+
import { ModelDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';
2+
3+
const ModelSchema = ModelDefinitionV1Beta1OpenApiSchema.components.schemas;
14
const importModelSchema = {
25
type: 'object',
36
required: ['uploadType'],
47
properties: {
58
uploadType: {
6-
type: 'string',
9+
type: ModelSchema.ImportRequest.properties.uploadType.type,
710
title: 'Upload method',
811
enum: ['File Import', 'URL Import', 'CSV Import'],
9-
enumDescriptions: [
10-
'Upload a model file (.tar, .tar.gz, .tgz) from your local system',
11-
'Import a model file using a direct URL to the source',
12-
'Upload separate CSV files for model definitions, components, and their relationships'
13-
],
12+
enumDescriptions: ModelSchema.ImportRequest.properties.uploadType.enumDescriptions,
1413
default: 'Select the Upload Method',
1514
'x-rjsf-grid-area': '12',
16-
description:
17-
"Choose the method you prefer to upload your model file. Select 'File Import' or 'CSV Import' if you have the file on your local system or 'URL Import' if you have the file hosted online."
15+
description: ModelSchema.ImportRequest.properties.uploadType.description
1816
}
1917
},
2018
allOf: [
@@ -29,10 +27,9 @@ const importModelSchema = {
2927
then: {
3028
properties: {
3129
file: {
32-
type: 'string',
33-
format: 'file',
34-
description:
35-
'Supported model file formats are: .tar, .tar.gz, and .tgz. See [Import Models Documentation](https://docs.meshery.io/guides/configuration-management/importing-models#import-models-using-meshery-ui) for details',
30+
type: ModelSchema.ImportBody.oneOf[0].properties.modelFile?.type,
31+
format: ModelSchema.ImportBody.oneOf[0].properties.modelFile?.format,
32+
description: ModelSchema.ImportBody.oneOf[0].properties.modelFile?.description,
3633
'x-rjsf-grid-area': '12'
3734
}
3835
},
@@ -50,11 +47,10 @@ const importModelSchema = {
5047
then: {
5148
properties: {
5249
url: {
53-
type: 'string',
54-
format: 'uri',
50+
type: ModelSchema.ImportBody.oneOf[1].properties.url?.type,
51+
format: ModelSchema.ImportBody.oneOf[1].properties.url?.format,
5552
title: 'URL',
56-
description:
57-
'A direct URL to a single model file, for example: https://raw.github.com/your-model-file.tar. Supported model file formats are: .tar, .tar.gz, and .tgz. \n\nFor bulk import of your model use the GitHub connection or CSV files. See [Import Models Documentation](https://docs.meshery.io/guides/configuration-management/importing-models#import-models-using-meshery-ui) for details',
53+
description: ModelSchema.ImportBody.oneOf[1].properties.url?.description,
5854
'x-rjsf-grid-area': '12',
5955
disabled: true
6056
}

0 commit comments

Comments
 (0)