From fe8975690fe8d18d255e0f617bfea919691684d0 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 26 Aug 2024 15:19:01 +0530 Subject: [PATCH 1/4] updating first section of mongo db plugin config --- .../src/main/resources/editor/root.json | 141 ++++++++++++------ 1 file changed, 97 insertions(+), 44 deletions(-) diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json index 7d1c79dc8ef9..6f6abdcdffa9 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json @@ -1,61 +1,114 @@ { "editor": [ { - "controlType": "SECTION", - "identifier": "SELECTOR", + "controlType": "SECTION_V2", + "identifier": "SECTION-ONE", "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": "SO-Z1", + "children": [ { - "label": "Find document(s)", - "value": "FIND" + "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" + } + ] }, { - "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": "Collection", + "configProperty": "actionConfiguration.formData.collection.data", + "controlType": "DROP_DOWN", + "evaluationSubstitutionType": "TEMPLATE", + "propertyName": "get_collections", + "fetchOptionsConditionally": true, + "alternateViewTypes": ["json"], + "identifier": "AGG-COLLECTION", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}", + "fetchDynamicValues": { + "condition": "{{true}}", + "config": { + "params": { + "requestType": "_GET_STRUCTURE", + "displayType": "DROP_DOWN" + } + } + } + } + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z2", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}" + }, + "children": [ { - "label": "Aggregate", - "value": "AGGREGATE" - }, + "label": "Array of pipelines", + "configProperty": "actionConfiguration.formData.aggregate.arrayPipelines.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "[{ $project: { tags: 1 } }, { $unwind: \"$tags\" }, { $group: { _id: \"$tags\", count: { $sum : 1 } } } ]" + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SO-Z3", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}" + }, + "children": [ { - "label": "Raw", - "value": "RAW" + "label": "Limit", + "configProperty": "actionConfiguration.formData.aggregate.limit.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "initialValue": "10" } ] } ] } - ], - "files": [ - "aggregate.json", - "count.json", - "delete.json", - "distinct.json", - "find.json", - "insert.json", - "update.json", - "raw.json" ] } From de81997e66b43c443f9b8db5822f7f2f60e9ad65 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 26 Aug 2024 19:21:09 +0530 Subject: [PATCH 2/4] updating the config for mongodb plugin --- .../src/main/resources/editor/aggregate.json | 57 ---- .../src/main/resources/editor/count.json | 50 --- .../src/main/resources/editor/delete.json | 69 ----- .../src/main/resources/editor/distinct.json | 57 ---- .../src/main/resources/editor/find.json | 79 ----- .../src/main/resources/editor/insert.json | 50 --- .../src/main/resources/editor/raw.json | 36 --- .../src/main/resources/editor/root.json | 284 +++++++++++++++++- .../src/main/resources/editor/update.json | 77 ----- 9 files changed, 282 insertions(+), 477 deletions(-) delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json delete mode 100644 app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json deleted file mode 100644 index 323f7f760c4b..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "identifier": "AGGREGATE", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Array of pipelines", - "configProperty": "actionConfiguration.formData.aggregate.arrayPipelines.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "[{ $project: { tags: 1 } }, { $unwind: \"$tags\" }, { $group: { _id: \"$tags\", count: { $sum : 1 } } } ]" - } - ] - }, - { - "label": "Limit", - "configProperty": "actionConfiguration.formData.aggregate.limit.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "initialValue": "10" - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json deleted file mode 100644 index 70a9ddc79895..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "identifier": "COUNT", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'COUNT'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Query", - "configProperty": "actionConfiguration.formData.count.query.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{rating : {$gte : 9}}" - } - ] - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json deleted file mode 100644 index d5fce44dbbe1..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "identifier": "DELETE", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'DELETE'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Query", - "configProperty": "actionConfiguration.formData.delete.query.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{rating : {$gte : 9}}" - }, - { - "label": "Limit", - "configProperty": "actionConfiguration.formData.delete.limit.data", - "controlType": "DROP_DOWN", - "-subtitle": "Allowed values: SINGLE, ALL", - "-tooltipText": "Allowed values: SINGLE, ALL", - "-alternateViewTypes": ["json"], - "initialValue": "SINGLE", - "options": [ - { - "label": "Single document", - "value": "SINGLE" - }, - { - "label": "All matching documents", - "value": "ALL" - } - ] - } - ] - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json deleted file mode 100644 index ab4bfc4fb0d0..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "identifier": "DISTINCT", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'DISTINCT'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Query", - "configProperty": "actionConfiguration.formData.distinct.query.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{rating : {$gte : 9}}" - }, - { - "label": "Key", - "configProperty": "actionConfiguration.formData.distinct.key.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "name" - } - ] - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json deleted file mode 100644 index 741a77885283..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "identifier": "FIND", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'FIND'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Query", - "configProperty": "actionConfiguration.formData.find.query.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{rating : {$gte : 9}}" - }, - { - "label": "Sort", - "configProperty": "actionConfiguration.formData.find.sort.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{name : 1}" - }, - { - "label": "Projection", - "configProperty": "actionConfiguration.formData.find.projection.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{name : 1}" - }, - { - "label": "Limit", - "configProperty": "actionConfiguration.formData.find.limit.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "10" - }, - { - "label": "Skip", - "configProperty": "actionConfiguration.formData.find.skip.data", - "controlType": "QUERY_DYNAMIC_INPUT_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "0" - } - ] - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json deleted file mode 100644 index e70f7f903bc9..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "identifier": "INSERT", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'INSERT'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Documents", - "configProperty": "actionConfiguration.formData.insert.documents.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "[ { _id: 1, user: \"abc123\", status: \"A\" } ]" - } - ] - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json deleted file mode 100644 index 6829311c3817..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "identifier": "RAW", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'RAW'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "", - "propertyName": "rawWithSmartSubstitute", - "configProperty": "actionConfiguration.formData.body.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "evaluationSubstitutionType": "SMART_SUBSTITUTE", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'RAW' && actionConfiguration.formData.smartSubstitution.data === true}}" - } - }, - { - "label": "", - "configProperty": "actionConfiguration.formData.body.data", - "propertyName": "rawWithTemplateSubstitute", - "controlType": "QUERY_DYNAMIC_TEXT", - "evaluationSubstitutionType": "TEMPLATE", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'RAW' && actionConfiguration.formData.smartSubstitution.data === false}}" - } - } - ] - } - ] -} diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json index 6f6abdcdffa9..badb0936ff6a 100644 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json +++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json @@ -57,9 +57,8 @@ "propertyName": "get_collections", "fetchOptionsConditionally": true, "alternateViewTypes": ["json"], - "identifier": "AGG-COLLECTION", "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}", + "show": "{{actionConfiguration.formData.command.data !== 'RAW'}}", "fetchDynamicValues": { "condition": "{{true}}", "config": { @@ -107,6 +106,287 @@ "initialValue": "10" } ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z4", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'COUNT'}}" + }, + "children": [ + { + "label": "Query", + "configProperty": "actionConfiguration.formData.count.query.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{rating : {$gte : 9}}" + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z5", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'DELETE'}}" + }, + "children": [ + { + "label": "Query", + "configProperty": "actionConfiguration.formData.delete.query.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{rating : {$gte : 9}}" + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SO-Z6", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'DELETE'}}" + }, + "children": [ + { + "label": "Limit", + "configProperty": "actionConfiguration.formData.delete.limit.data", + "controlType": "DROP_DOWN", + "-subtitle": "Allowed values: SINGLE, ALL", + "-tooltipText": "Allowed values: SINGLE, ALL", + "-alternateViewTypes": ["json"], + "initialValue": "SINGLE", + "options": [ + { + "label": "Single document", + "value": "SINGLE" + }, + { + "label": "All matching documents", + "value": "ALL" + } + ] + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z7", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'DISTINCT'}}" + }, + "children": [ + { + "label": "Query", + "configProperty": "actionConfiguration.formData.distinct.query.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{rating : {$gte : 9}}" + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SO-Z8", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'DISTINCT'}}" + }, + "children": [ + { + "label": "Key", + "configProperty": "actionConfiguration.formData.distinct.key.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "name" + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z9", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'FIND'}}" + }, + "children": [ + { + "label": "Query", + "configProperty": "actionConfiguration.formData.find.query.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{rating : {$gte : 9}}" + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SO-Z10", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'FIND'}}" + }, + "children": [ + { + "label": "Sort", + "configProperty": "actionConfiguration.formData.find.sort.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{name : 1}" + }, + { + "label": "Projection", + "configProperty": "actionConfiguration.formData.find.projection.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{name : 1}" + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SO-Z11", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'FIND'}}" + }, + "children": [ + { + "label": "Limit", + "configProperty": "actionConfiguration.formData.find.limit.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "10" + }, + { + "label": "Skip", + "configProperty": "actionConfiguration.formData.find.skip.data", + "controlType": "QUERY_DYNAMIC_INPUT_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "0" + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z12", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'INSERT'}}" + }, + "children": [ + { + "label": "Documents", + "configProperty": "actionConfiguration.formData.insert.documents.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "[ { _id: 1, user: \"abc123\", status: \"A\" } ]" + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z13", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'UPDATE'}}" + }, + "children": [ + { + "label": "Query", + "configProperty": "actionConfiguration.formData.updateMany.query.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{rating : {$gte : 9}}" + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z14", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'UPDATE'}}" + }, + "children": [ + { + "label": "Update", + "configProperty": "actionConfiguration.formData.updateMany.update.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "inputType": "JSON", + "evaluationSubstitutionType": "TEMPLATE", + "placeholderText": "{ $inc: { score: 1 } }" + } + ] + }, + { + "controlType": "DOUBLE_COLUMN_ZONE", + "identifier": "SO-Z15", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'UPDATE'}}" + }, + "children": [ + { + "label": "Limit", + "configProperty": "actionConfiguration.formData.updateMany.limit.data", + "controlType": "DROP_DOWN", + "-subtitle": "Allowed values: SINGLE, ALL", + "-tooltipText": "Allowed values: SINGLE, ALL", + "-alternateViewTypes": ["json"], + "initialValue": "SINGLE", + "options": [ + { + "label": "Single document", + "value": "SINGLE" + }, + { + "label": "All matching documents", + "value": "ALL" + } + ] + } + ] + }, + { + "controlType": "SINGLE_COLUMN_ZONE", + "identifier": "SO-Z16", + "label": "Query", + "description": "Optional", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'RAW'}}" + }, + "children": [ + { + "label": "", + "propertyName": "rawWithSmartSubstitute", + "configProperty": "actionConfiguration.formData.body.data", + "controlType": "QUERY_DYNAMIC_TEXT", + "evaluationSubstitutionType": "SMART_SUBSTITUTE", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'RAW' && actionConfiguration.formData.smartSubstitution.data === true}}" + } + }, + { + "label": "", + "configProperty": "actionConfiguration.formData.body.data", + "propertyName": "rawWithTemplateSubstitute", + "controlType": "QUERY_DYNAMIC_TEXT", + "evaluationSubstitutionType": "TEMPLATE", + "conditionals": { + "show": "{{actionConfiguration.formData.command.data === 'RAW' && actionConfiguration.formData.smartSubstitution.data === false}}" + } + } + ] } ] } diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json deleted file mode 100644 index bcd4aae93c70..000000000000 --- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "identifier": "UPDATE", - "controlType": "SECTION", - "conditionals": { - "show": "{{actionConfiguration.formData.command.data === 'UPDATE'}}" - }, - "children": [ - { - "controlType": "SECTION", - "label": "Select collection to query", - "children": [ - { - "label": "Collection", - "configProperty": "actionConfiguration.formData.collection.data", - "controlType": "DROP_DOWN", - "evaluationSubstitutionType": "TEMPLATE", - "propertyName": "get_collections", - "fetchOptionsConditionally": true, - "alternateViewTypes": ["json"], - "conditionals": { - "fetchDynamicValues": { - "condition": "{{true}}", - "config": { - "params": { - "requestType": "_GET_STRUCTURE", - "displayType": "DROP_DOWN" - } - } - } - } - } - ] - }, - { - "controlType": "SECTION", - "label": "Query", - "description": "Optional", - "children": [ - { - "label": "Query", - "configProperty": "actionConfiguration.formData.updateMany.query.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{rating : {$gte : 9}}" - }, - { - "label": "Update", - "configProperty": "actionConfiguration.formData.updateMany.update.data", - "controlType": "QUERY_DYNAMIC_TEXT", - "inputType": "JSON", - "evaluationSubstitutionType": "TEMPLATE", - "placeholderText": "{ $inc: { score: 1 } }" - }, - { - "label": "Limit", - "configProperty": "actionConfiguration.formData.updateMany.limit.data", - "controlType": "DROP_DOWN", - "-subtitle": "Allowed values: SINGLE, ALL", - "-tooltipText": "Allowed values: SINGLE, ALL", - "-alternateViewTypes": ["json"], - "initialValue": "SINGLE", - "options": [ - { - "label": "Single document", - "value": "SINGLE" - }, - { - "label": "All matching documents", - "value": "ALL" - } - ] - } - ] - } - ] -} From c2cb0d0b57c37637c63b8b2575739b8e4339bc91 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Mon, 26 Aug 2024 19:22:36 +0530 Subject: [PATCH 3/4] adding classname --- .../src/components/formControls/DynamicInputTextControl.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/client/src/components/formControls/DynamicInputTextControl.tsx b/app/client/src/components/formControls/DynamicInputTextControl.tsx index 874a8c9e9e32..752dbede4233 100644 --- a/app/client/src/components/formControls/DynamicInputTextControl.tsx +++ b/app/client/src/components/formControls/DynamicInputTextControl.tsx @@ -84,7 +84,10 @@ export function InputText(props: { } } return ( -
+
{/*
*/} Date: Mon, 26 Aug 2024 19:30:47 +0530 Subject: [PATCH 4/4] updating styles of dynamic input text control --- .../src/pages/Editor/ActionForm/Zone/styles.module.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/client/src/pages/Editor/ActionForm/Zone/styles.module.css b/app/client/src/pages/Editor/ActionForm/Zone/styles.module.css index 6b04213740de..4daaaddf8341 100644 --- a/app/client/src/pages/Editor/ActionForm/Zone/styles.module.css +++ b/app/client/src/pages/Editor/ActionForm/Zone/styles.module.css @@ -47,6 +47,11 @@ } } } + /* DynamicInputTextControl min height and width removed */ + & :global(.uqi-dynamic-input-text) { + width: unset !important; + min-height: unset !important; + } /* Removable section ends here */ }