You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/schemas/importDesign/schema.tsx
+58-14
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,7 @@ const importDesignSchema = {
22
22
if: {
23
23
properties: {
24
24
designType: {
25
-
not: {
26
-
const: 'Helm Chart'
27
-
}
25
+
const: 'Helm Chart'
28
26
}
29
27
}
30
28
},
@@ -36,7 +34,7 @@ const importDesignSchema = {
36
34
default: 'URL Import',
37
35
'x-rjsf-grid-area': '12',
38
36
description:
39
-
"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."
37
+
"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."
40
38
}
41
39
},
42
40
allOf: [
@@ -53,7 +51,7 @@ const importDesignSchema = {
53
51
file: {
54
52
type: 'string',
55
53
format: 'file',
56
-
description: 'Browse the design file from your file system',
54
+
description: 'Browse the Helm Chart file from your file system',
57
55
'x-rjsf-grid-area': '12'
58
56
}
59
57
},
@@ -75,7 +73,7 @@ const importDesignSchema = {
75
73
format: 'uri',
76
74
title: 'URL',
77
75
description:
78
-
'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',
76
+
'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',
79
77
'x-rjsf-grid-area': '12'
80
78
}
81
79
},
@@ -90,22 +88,68 @@ const importDesignSchema = {
90
88
if: {
91
89
properties: {
92
90
designType: {
93
-
const: 'Helm Chart'
91
+
not: {
92
+
const: 'Helm Chart'
93
+
}
94
94
}
95
95
}
96
96
},
97
97
then: {
98
98
properties: {
99
-
url: {
100
-
type: 'string',
101
-
format: 'uri',
102
-
title: 'URL',
99
+
uploadType: {
100
+
title: 'Upload method',
101
+
enum: ['File Upload','URL Import'],
102
+
default: 'URL Import',
103
+
'x-rjsf-grid-area': '12',
103
104
description:
104
-
'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',
105
-
'x-rjsf-grid-area': '12'
105
+
"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."
106
106
}
107
107
},
108
-
required: ['url']
108
+
allOf: [
109
+
{
110
+
if: {
111
+
properties: {
112
+
uploadType: {
113
+
const: 'File Upload'
114
+
}
115
+
}
116
+
},
117
+
then: {
118
+
properties: {
119
+
file: {
120
+
type: 'string',
121
+
format: 'file',
122
+
description: 'Browse the design file from your file system',
123
+
'x-rjsf-grid-area': '12'
124
+
}
125
+
},
126
+
required: ['file']
127
+
}
128
+
},
129
+
{
130
+
if: {
131
+
properties: {
132
+
uploadType: {
133
+
const: 'URL Import'
134
+
}
135
+
}
136
+
},
137
+
then: {
138
+
properties: {
139
+
url: {
140
+
type: 'string',
141
+
format: 'uri',
142
+
title: 'URL',
143
+
description:
144
+
'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',
0 commit comments