Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from layer5io:master #40

Merged
merged 3 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 58 additions & 14 deletions src/schemas/importDesign/schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ const importDesignSchema = {
if: {
properties: {
designType: {
not: {
const: 'Helm Chart'
}
const: 'Helm Chart'
}
}
},
Expand All @@ -36,7 +34,7 @@ const importDesignSchema = {
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."
"Choose the method you prefer to upload your Helm Chart design file. Select 'File Upload' if you have the file on your local system, or 'URL Import' if you have the file hosted online."
}
},
allOf: [
Expand All @@ -53,7 +51,7 @@ const importDesignSchema = {
file: {
type: 'string',
format: 'file',
description: 'Browse the design file from your file system',
description: 'Browse the Helm Chart file from your file system',
'x-rjsf-grid-area': '12'
}
},
Expand All @@ -75,7 +73,7 @@ const importDesignSchema = {
format: 'uri',
title: 'URL',
description:
'Provide the URL of the design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
'Provide the URL of the Helm Chart design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
'x-rjsf-grid-area': '12'
}
},
Expand All @@ -90,22 +88,68 @@ const importDesignSchema = {
if: {
properties: {
designType: {
const: 'Helm Chart'
not: {
const: 'Helm Chart'
}
}
}
},
then: {
properties: {
url: {
type: 'string',
format: 'uri',
title: 'URL',
uploadType: {
title: 'Upload method',
enum: ['File Upload', 'URL Import'],
default: 'URL Import',
'x-rjsf-grid-area': '12',
description:
'Provide the URL of the design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
'x-rjsf-grid-area': '12'
"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."
}
},
required: ['url']
allOf: [
{
if: {
properties: {
uploadType: {
const: 'File Upload'
}
}
},
then: {
properties: {
file: {
type: 'string',
format: 'file',
description: 'Browse the design file from your file system',
'x-rjsf-grid-area': '12'
}
},
required: ['file']
}
},
{
if: {
properties: {
uploadType: {
const: 'URL Import'
}
}
},
then: {
properties: {
url: {
type: 'string',
format: 'uri',
title: 'URL',
description:
'Provide the URL of the design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
'x-rjsf-grid-area': '12'
}
},
required: ['url']
}
}
],
required: ['uploadType']
}
},
{
Expand Down
Loading