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

feat: Action redesign: Updating the config for MongoDB plugin to use sections and zones format #36098

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export function InputText(props: {
}
}
return (
<div className={`t--${props?.name}`} style={customStyle}>
<div
className={`t--${props?.name} uqi-dynamic-input-text`}
style={customStyle}
>
{/* <div style={customStyle}> */}
<StyledDynamicTextField
dataTreePath={dataTreePath}
Expand Down
5 changes: 5 additions & 0 deletions app/client/src/pages/Editor/ActionForm/Zone/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
}
}
}
/* DynamicInputTextControl min height and width removed */
& :global(.uqi-dynamic-input-text) {
width: unset !important;
min-height: unset !important;
}

/* Remove when code editor min width is resolved in DynamicTextFeildControl */
& :global(.dynamic-text-field-control) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "AGGREGATE",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Select collection to query",
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "AGGREGATE-Z1",
"children": [
{
"label": "Collection",
Expand All @@ -32,9 +32,8 @@
]
},
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "AGGREGATE-Z2",
"children": [
{
"label": "Array of pipelines",
Expand All @@ -47,11 +46,17 @@
]
},
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.aggregate.limit.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"evaluationSubstitutionType": "TEMPLATE",
"initialValue": "10"
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "AGGREGATE-Z3",
"children": [
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.aggregate.limit.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"evaluationSubstitutionType": "TEMPLATE",
"initialValue": "10"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "COUNT",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'COUNT'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Select collection to query",
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "COUNT-Z1",
"children": [
{
"label": "Collection",
Expand All @@ -32,9 +32,8 @@
]
},
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "COUNT-Z2",
"children": [
{
"label": "Query",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "DELETE",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DELETE'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Select collection to query",
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "DELETE-Z1",
"children": [
{
"label": "Collection",
Expand All @@ -32,9 +32,8 @@
]
},
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "DELETE-Z2",
"children": [
{
"label": "Query",
Expand All @@ -43,7 +42,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
},
}
]
},
{
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "DELETE-Z3",
"children": [
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.delete.limit.data",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "DISTINCT",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DISTINCT'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Select collection to query",
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "DISTINCT-Z1",
"children": [
{
"label": "Collection",
Expand All @@ -32,9 +32,8 @@
]
},
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "DISTINCT-Z2",
"children": [
{
"label": "Query",
Expand All @@ -43,7 +42,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
},
}
]
},
{
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "DISTINCT-Z3",
"children": [
{
"label": "Key",
"configProperty": "actionConfiguration.formData.distinct.key.data",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "FIND",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'FIND'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Select collection to query",
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "FIND-Z1",
"children": [
{
"label": "Collection",
Expand All @@ -32,17 +32,22 @@
]
},
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "FIND-Z2",
"children": [
{
"label": "Query",
"configProperty": "actionConfiguration.formData.find.query.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
},
}
]
},
{
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "FIND-Z3",
"children": [
{
"label": "Sort",
"configProperty": "actionConfiguration.formData.find.sort.data",
Expand All @@ -58,7 +63,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{name : 1}"
},
}
]
},
{
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "FIND-Z4",
"children": [
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.find.limit.data",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "INSERT",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'INSERT'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Select collection to query",
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "INSERT-Z1",
"children": [
{
"label": "Collection",
Expand All @@ -32,9 +32,8 @@
]
},
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "INSERT-Z2",
"children": [
{
"label": "Documents",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"controlType": "SECTION_V2",
"identifier": "RAW",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'RAW'}}"
},
"children": [
{
"controlType": "SECTION",
"label": "Query",
"description": "Optional",
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "RAW-Z1",
"children": [
{
"label": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
{
"editor": [
{
"controlType": "SECTION",
"controlType": "SECTION_V2",
"identifier": "SELECTOR",
"children": [
{
"label": "Command",
"description": "Choose method you would like to use to query the database",
"configProperty": "actionConfiguration.formData.command.data",
"controlType": "DROP_DOWN",
"initialValue": "FIND",
"options": [
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "SELECTOR-Z1",
"children": [
{
"label": "Find document(s)",
"value": "FIND"
},
{
"label": "Insert document(s)",
"value": "INSERT"
},
{
"label": "Update document(s)",
"value": "UPDATE"
},
{
"label": "Delete document(s)",
"value": "DELETE"
},
{
"label": "Count",
"value": "COUNT"
},
{
"label": "Distinct",
"value": "DISTINCT"
},
{
"label": "Aggregate",
"value": "AGGREGATE"
},
{
"label": "Raw",
"value": "RAW"
"label": "Command",
"description": "Choose method you would like to use to query the database",
"configProperty": "actionConfiguration.formData.command.data",
"controlType": "DROP_DOWN",
"initialValue": "FIND",
"options": [
{
"label": "Find document(s)",
"value": "FIND"
},
{
"label": "Insert document(s)",
"value": "INSERT"
},
{
"label": "Update document(s)",
"value": "UPDATE"
},
{
"label": "Delete document(s)",
"value": "DELETE"
},
{
"label": "Count",
"value": "COUNT"
},
{
"label": "Distinct",
"value": "DISTINCT"
},
{
"label": "Aggregate",
"value": "AGGREGATE"
},
{
"label": "Raw",
"value": "RAW"
}
]
}
]
}
Expand Down
Loading
Loading