Revert "feat: Action redesign: Updating Mongo plugin form config" (#35903)
Reverts appsmithorg/appsmith#35883 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced user-friendly configurations for various MongoDB operations, including "AGGREGATE," "COUNT," "DELETE," "DISTINCT," "FIND," "INSERT," "RAW," and "UPDATE." - Enhanced dynamic dropdowns for selecting collections and streamlined input sections for constructing queries. - **Bug Fixes** - Simplified the structure of the input text controls for better usability and responsiveness in UI design. - **Refactor** - Cleaned up unnecessary elements in the codebase to improve maintainability and performance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
cfab57f5be
commit
5aef087000
|
|
@ -84,10 +84,7 @@ export function InputText(props: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div
|
<div className={`t--${props?.name}`} style={customStyle}>
|
||||||
className={`t--${props?.name} uqi-dynamic-input-text`}
|
|
||||||
style={customStyle}
|
|
||||||
>
|
|
||||||
{/* <div style={customStyle}> */}
|
{/* <div style={customStyle}> */}
|
||||||
<StyledDynamicTextField
|
<StyledDynamicTextField
|
||||||
dataTreePath={dataTreePath}
|
dataTreePath={dataTreePath}
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* DynamicInputTextControl min height and width removed */
|
|
||||||
& :global(.uqi-dynamic-input-text) {
|
|
||||||
width: unset !important;
|
|
||||||
min-height: unset !important;
|
|
||||||
}
|
|
||||||
/* Removable section ends here */
|
/* Removable section ends here */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"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}}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"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\" } ]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"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}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,394 +1,61 @@
|
||||||
{
|
{
|
||||||
"editor": [
|
"editor": [
|
||||||
{
|
{
|
||||||
"controlType": "SECTION_V2",
|
"controlType": "SECTION",
|
||||||
"identifier": "SECTION-ONE",
|
"identifier": "SELECTOR",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"controlType": "DOUBLE_COLUMN_ZONE",
|
"label": "Command",
|
||||||
"identifier": "SO-Z1",
|
"description": "Choose method you would like to use to query the database",
|
||||||
"children": [
|
"configProperty": "actionConfiguration.formData.command.data",
|
||||||
|
"controlType": "DROP_DOWN",
|
||||||
|
"initialValue": "FIND",
|
||||||
|
"options": [
|
||||||
{
|
{
|
||||||
"label": "Command",
|
"label": "Find document(s)",
|
||||||
"description": "Choose method you would like to use to query the database",
|
"value": "FIND"
|
||||||
"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": "Collection",
|
"label": "Insert document(s)",
|
||||||
"configProperty": "actionConfiguration.formData.collection.data",
|
"value": "INSERT"
|
||||||
"controlType": "DROP_DOWN",
|
|
||||||
"evaluationSubstitutionType": "TEMPLATE",
|
|
||||||
"propertyName": "get_collections",
|
|
||||||
"fetchOptionsConditionally": true,
|
|
||||||
"alternateViewTypes": ["json"],
|
|
||||||
"conditionals": {
|
|
||||||
"show": "{{actionConfiguration.formData.command.data !== 'RAW'}}",
|
|
||||||
"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": "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": "Limit",
|
|
||||||
"configProperty": "actionConfiguration.formData.aggregate.limit.data",
|
|
||||||
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
|
|
||||||
"evaluationSubstitutionType": "TEMPLATE",
|
|
||||||
"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",
|
"label": "Update document(s)",
|
||||||
"configProperty": "actionConfiguration.formData.find.projection.data",
|
"value": "UPDATE"
|
||||||
"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",
|
"label": "Delete document(s)",
|
||||||
"configProperty": "actionConfiguration.formData.find.skip.data",
|
"value": "DELETE"
|
||||||
"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": "",
|
"label": "Count",
|
||||||
"configProperty": "actionConfiguration.formData.body.data",
|
"value": "COUNT"
|
||||||
"propertyName": "rawWithTemplateSubstitute",
|
},
|
||||||
"controlType": "QUERY_DYNAMIC_TEXT",
|
{
|
||||||
"evaluationSubstitutionType": "TEMPLATE",
|
"label": "Distinct",
|
||||||
"conditionals": {
|
"value": "DISTINCT"
|
||||||
"show": "{{actionConfiguration.formData.command.data === 'RAW' && actionConfiguration.formData.smartSubstitution.data === false}}"
|
},
|
||||||
}
|
{
|
||||||
|
"label": "Aggregate",
|
||||||
|
"value": "AGGREGATE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Raw",
|
||||||
|
"value": "RAW"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"aggregate.json",
|
||||||
|
"count.json",
|
||||||
|
"delete.json",
|
||||||
|
"distinct.json",
|
||||||
|
"find.json",
|
||||||
|
"insert.json",
|
||||||
|
"update.json",
|
||||||
|
"raw.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user