Skip to content
Merged
7 changes: 7 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@layer5/meshery-design-embed": "^0.4.0",
"@layer5/schemas": "^0.0.6-6",
"@mui/material": "^5.15.11",
"@types/mui-datatables": "*",
"billboard.js": "^3.14.3",
Expand Down
18 changes: 9 additions & 9 deletions src/schemas/createAndEditEnvironment/schema.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { EnvironmentDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';

Check failure on line 1 in src/schemas/createAndEditEnvironment/schema.tsx

View workflow job for this annotation

GitHub Actions / compatibility-check (18)

Module '"@layer5/schemas"' has no exported member 'EnvironmentDefinitionV1Beta1OpenApiSchema'.

const environmentSchema = EnvironmentDefinitionV1Beta1OpenApiSchema.components.schemas;
const createAndEditEnvironmentSchema = {
title: 'Environment',
required: ['name'],
properties: {
description: {
description:
'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).',
description: environmentSchema.environmentPayload.properties.description.description,
format: 'textarea',
title: 'Description',
type: 'string',
type: environmentSchema.environmentPayload.properties.description.type,
'x-rjsf-grid-area': '12'
},
name: {
description:
'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.',
description: environmentSchema.environmentPayload.properties.name.description,
title: 'Name',
type: 'string',
type: environmentSchema.environmentPayload.properties.name.type,
'x-rjsf-grid-area': '12'
},
organization: {
type: 'string',
type: environmentSchema.environmentPayload.properties.OrganizationID.type,
title: 'Organization',
description:
'Select an organization in which you want to create this new environment. Keep in mind that the organization cannot be changed after creation.',
description: environmentSchema.environmentPayload.properties.OrganizationID.description,
enum: [],
enumNames: [],
'x-rjsf-grid-area': '12'
Expand Down
20 changes: 10 additions & 10 deletions src/schemas/createAndEditWorkspace/schema.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
/**
* Schema for create or edit workspace modals
*/
import { WorkspaceDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';

Check failure on line 4 in src/schemas/createAndEditWorkspace/schema.tsx

View workflow job for this annotation

GitHub Actions / compatibility-check (20)

Module '"@layer5/schemas"' has no exported member 'WorkspaceDefinitionV1Beta1OpenApiSchema'.

const workspaceSchema = WorkspaceDefinitionV1Beta1OpenApiSchema.components.schemas;
const createAndEditWorkspace = {
properties: {
description: {
description:
"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)",
description: workspaceSchema.workspacePayload.properties.description.description,
format: 'textarea',
title: 'Description',
type: 'string',
type: workspaceSchema.workspacePayload.properties.description.type,
'x-rjsf-grid-area': '12'
},
name: {
description:
'Provide a name that meaningfully represents this workspace. You can change the name of the workspace even after its creation.',
description: workspaceSchema.workspacePayload.properties.name.description,
title: 'Name',
type: 'string',
type: workspaceSchema.workspacePayload.properties.name.type,
'x-rjsf-grid-area': '12'
},
organization: {
type: 'string',
description:
'Select an organization in which you want to create this new workspace. Keep in mind that the organization cannot be changed after creation.',
type: workspaceSchema.workspacePayload.properties.organization_id.type,
description: workspaceSchema.workspacePayload.properties.organization_id.description,
title: 'Organization',
enum: [],
enumNames: [],
'x-rjsf-grid-area': '12'
}
},
type: 'object',
required: ['name', 'organization']
required: workspaceSchema.workspacePayload.required
};

export default createAndEditWorkspace;
35 changes: 14 additions & 21 deletions src/schemas/importDesign/schema.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
import { DesignDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';

const DesignSchema = DesignDefinitionV1Beta1OpenApiSchema.components.schemas;

const importDesignSchema = {
type: 'object',
properties: {
name: {
type: 'string',
type: DesignSchema.MesheryPatternImportRequestBody.properties.name.type,
title: 'Design file name',
default: 'Untitled Design',
default: DesignSchema.MesheryPatternImportRequestBody.properties.name.default,
'x-rjsf-grid-area': '12',
description:
'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.'
description: DesignSchema.MesheryPatternImportRequestBody.properties.name.description
},
// designType: {
// title: 'Design type',
// enum: ['Helm Chart', 'Kubernetes Manifest', 'Docker Compose', 'Meshery Design'],
// 'x-rjsf-grid-area': '6',
// description:
// "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"
// },

uploadType: {
title: 'Upload method',
enum: ['File Upload', 'URL Import'],
default: 'URL Import',
'x-rjsf-grid-area': '12',
description:
"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."
description: DesignSchema.MesheryPatternImportRequestBody.description
}
},

Expand All @@ -39,10 +34,9 @@ const importDesignSchema = {
then: {
properties: {
file: {
type: 'string',
format: 'file',
description:
'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',
type: DesignSchema.MesheryPatternImportRequestBody.properties.file.type,
format: DesignSchema.MesheryPatternImportRequestBody.properties.file.format,
description: DesignSchema.MesheryPatternImportRequestBody.properties.file.description,
'x-rjsf-grid-area': '12'
}
},
Expand All @@ -60,11 +54,10 @@ const importDesignSchema = {
then: {
properties: {
url: {
type: 'string',
format: 'uri',
type: DesignSchema.MesheryPatternImportRequestBody.properties.url.type,
format: DesignSchema.MesheryPatternImportRequestBody.properties.url.format,
title: 'URL',
description:
'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',
description: DesignSchema.MesheryPatternImportRequestBody.properties.url.description,
'x-rjsf-grid-area': '12'
}
},
Expand Down
28 changes: 12 additions & 16 deletions src/schemas/importModel/schema.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { ModelDefinitionV1Beta1OpenApiSchema } from '@layer5/schemas';

const ModelSchema = ModelDefinitionV1Beta1OpenApiSchema.components.schemas;
const importModelSchema = {
type: 'object',
required: ['uploadType'],
properties: {
uploadType: {
type: 'string',
type: ModelSchema.ImportRequest.properties.uploadType.type,
title: 'Upload method',
enum: ['File Import', 'URL Import', 'CSV Import'],
enumDescriptions: [
'Upload a model file (.tar, .tar.gz, .tgz) from your local system',
'Import a model file using a direct URL to the source',
'Upload separate CSV files for model definitions, components, and their relationships'
],
enumDescriptions: ModelSchema.ImportRequest.properties.uploadType.enumDescriptions,
default: 'Select the Upload Method',
'x-rjsf-grid-area': '12',
description:
"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."
description: ModelSchema.ImportRequest.properties.uploadType.description
}
},
allOf: [
Expand All @@ -29,10 +27,9 @@ const importModelSchema = {
then: {
properties: {
file: {
type: 'string',
format: 'file',
description:
'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',
type: ModelSchema.ImportBody.oneOf[0].properties.modelFile?.type,
format: ModelSchema.ImportBody.oneOf[0].properties.modelFile?.format,
description: ModelSchema.ImportBody.oneOf[0].properties.modelFile?.description,
'x-rjsf-grid-area': '12'
}
},
Expand All @@ -50,11 +47,10 @@ const importModelSchema = {
then: {
properties: {
url: {
type: 'string',
format: 'uri',
type: ModelSchema.ImportBody.oneOf[1].properties.url?.type,
format: ModelSchema.ImportBody.oneOf[1].properties.url?.format,
title: 'URL',
description:
'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',
description: ModelSchema.ImportBody.oneOf[1].properties.url?.description,
'x-rjsf-grid-area': '12',
disabled: true
}
Expand Down
44 changes: 17 additions & 27 deletions src/schemas/publishCatalogItem/schema.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { CatalogDataDefinitionV1Alpha1OpenApiSchema } from '@layer5/schemas';

const CatalogDataDefinitionV1Alpha1Schema =
CatalogDataDefinitionV1Alpha1OpenApiSchema.components.schemas.CatalogData;
/**
* Schema for publish catalog item modal;
* Can be use for publishing filters and designs
Expand All @@ -6,51 +10,37 @@ const publishCatalogItemSchema = {
type: 'object',
properties: {
compatibility: {
type: 'array',
type: CatalogDataDefinitionV1Alpha1Schema.properties.compatibility.type,
title: 'Technology',
items: {
enum: ['kubernetes'],
type: 'string'
},
items: CatalogDataDefinitionV1Alpha1Schema.properties.compatibility.items,
uniqueItems: true,
minItems: 1,
description:
'A list of technologies included in or implicated by this design; a list of relevant technology tags.',
'x-rjsf-grid-area': 6
},
pattern_caveats: {
type: 'string',
title: 'Caveats and Considerations',
description:
'Specific stipulations to consider and known behaviors to be aware of when using this design.',
type: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.type,
title: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.title,
description: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.description,
format: 'textarea',
'x-rjsf-grid-area': 12,
'x-encode-in-uri': true
},
pattern_info: {
type: 'string',
title: 'Description',
description: 'Purpose of the design along with its intended and unintended uses.',
type: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.type,
title: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.title,
description: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.description,
format: 'textarea',
'x-rjsf-grid-area': 12,
'x-encode-in-uri': true
},
type: {
type: 'string',
title: 'Type',
enum: [
'Deployment',
'Observability',
'Resiliency',
'Scaling',
'Security',
'Traffic-management',
'Troubleshooting',
'Workloads'
],
default: 'Deployment',
description:
'Categorization of the type of design or operational flow depicted in this design.',
type: CatalogDataDefinitionV1Alpha1Schema.properties.type.type,
title: CatalogDataDefinitionV1Alpha1Schema.properties.type.title,
enum: CatalogDataDefinitionV1Alpha1Schema.properties.type.enum,
default: CatalogDataDefinitionV1Alpha1Schema.properties.type.default,
description: CatalogDataDefinitionV1Alpha1Schema.properties.type.description,
'x-rjsf-grid-area': 6
}
},
Expand Down
Loading