Skip to content

Commit 5ed3f25

Browse files
committed
Change description field type to textarea
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent a484199 commit 5ed3f25

14 files changed

+27
-10
lines changed

common/interfaces.ts

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export type MDSQueryParams = {
2727

2828
export type ConfigFieldType =
2929
| 'string'
30+
| 'textArea'
3031
| 'json'
3132
| 'jsonArray'
3233
| 'jsonString'

public/configs/ingest_processors/copy_ingest_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class CopyIngestProcessor extends Processor {
4949
},
5050
{
5151
id: 'description',
52-
type: 'string',
52+
type: 'textArea',
5353
},
5454
{
5555
id: 'tag',

public/configs/ingest_processors/text_chunking_ingest_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class TextChunkingIngestProcessor extends Processor {
6464
},
6565
{
6666
id: 'description',
67-
type: 'string',
67+
type: 'textArea',
6868
},
6969
{
7070
id: 'tag',

public/configs/ingest_processors/text_embedding_ingest_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class TextEmbeddingIngestProcessor extends Processor {
2121
this.optionalFields = [
2222
{
2323
id: 'description',
24-
type: 'string',
24+
type: 'textArea',
2525
},
2626
{
2727
id: 'tag',

public/configs/ingest_processors/text_image_embedding_ingest_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class TextImageEmbeddingIngestProcessor extends Processor {
2525
this.optionalFields = [
2626
{
2727
id: 'description',
28-
type: 'string',
28+
type: 'textArea',
2929
},
3030
{
3131
id: 'tag',

public/configs/ml_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export abstract class MLProcessor extends Processor {
6060
},
6161
{
6262
id: 'description',
63-
type: 'string',
63+
type: 'textArea',
6464
},
6565
];
6666
}

public/configs/search_response_processors/collapse_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class CollapseProcessor extends Processor {
3333
},
3434
{
3535
id: 'description',
36-
type: 'string',
36+
type: 'textArea',
3737
},
3838
{
3939
id: 'ignore_failure',

public/configs/search_response_processors/normalization_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class NormalizationProcessor extends Processor {
3434
},
3535
{
3636
id: 'description',
37-
type: 'string',
37+
type: 'textArea',
3838
},
3939
{
4040
id: 'tag',

public/configs/search_response_processors/rerank_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class RerankProcessor extends Processor {
4141
},
4242
{
4343
id: 'description',
44-
type: 'string',
44+
type: 'textArea',
4545
},
4646
{
4747
id: 'ignore_failure',

public/configs/sort_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export abstract class SortProcessor extends Processor {
3434
},
3535
{
3636
id: 'description',
37-
type: 'string',
37+
type: 'textArea',
3838
},
3939
{
4040
id: 'tag',

public/configs/split_processor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export abstract class SplitProcessor extends Processor {
3939
},
4040
{
4141
id: 'description',
42-
type: 'string',
42+
type: 'textArea',
4343
},
4444
{
4545
id: 'tag',

public/pages/workflow_detail/workflow_inputs/config_field_list.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ export function ConfigFieldList(props: ConfigFieldListProps) {
5050
);
5151
break;
5252
}
53+
case 'textArea': {
54+
el = (
55+
<EuiFlexItem key={idx}>
56+
<TextField
57+
label={camelCaseToTitleString(field.id)}
58+
fieldPath={fieldPath}
59+
showError={true}
60+
textArea={true}
61+
/>
62+
<EuiSpacer size={CONFIG_FIELD_SPACER_SIZE} />
63+
</EuiFlexItem>
64+
);
65+
break;
66+
}
5367
case 'select': {
5468
el = (
5569
<EuiFlexItem key={idx}>

public/utils/config_to_form_utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function searchIndexConfigToFormik(
125125
export function getInitialValue(fieldType: ConfigFieldType): ConfigFieldValue {
126126
switch (fieldType) {
127127
case 'string':
128+
case 'textArea':
128129
case 'select':
129130
case 'jsonLines': {
130131
return '';

public/utils/config_to_schema_utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export function getFieldSchema(
152152

153153
switch (field.type) {
154154
case 'string':
155+
case 'textArea':
155156
case 'select': {
156157
baseSchema = defaultStringSchema;
157158
break;

0 commit comments

Comments
 (0)