Pārlūkot izejas kodu

Merge branch 'collection-pickers': pick collections rather than typing them

fszontagh 1 mēnesi atpakaļ
vecāks
revīzija
a0133e3d20

+ 6 - 0
nodes/core/http-request.js

@@ -72,6 +72,12 @@ const configSchema = {
       default: false
     },
     downloadCollection: {
+        dynamicOptions: {
+            source: 'storage.collections',
+            labelField: 'name',
+            valueField: 'name',
+            filter: { access: 'read-write' }
+        },
       type: 'string',
       title: 'Storage Collection',
       default: 'downloads',

+ 6 - 0
nodes/image/image.js

@@ -45,6 +45,12 @@ const configSchema = {
             showWhen: { field: 'inputSource', value: 'url' }
         },
         storageCollection: {
+            dynamicOptions: {
+                source: 'storage.collections',
+                labelField: 'name',
+                valueField: 'name',
+                filter: {}
+            },
             type: 'string',
             title: 'Storage Collection',
             description: 'Collection name for stored image',

+ 6 - 0
nodes/sdcpp/sdcpp-fetch-output.js

@@ -60,6 +60,12 @@ const configSchema = {
             default: false
         },
         collection: {
+            dynamicOptions: {
+                source: 'storage.collections',
+                labelField: 'name',
+                valueField: 'name',
+                filter: { access: 'read-write' }
+            },
             type: 'string',
             title: 'Collection',
             description: 'Storage collection to save into. Must not begin with an underscore, those silently lose writes',

+ 12 - 0
nodes/triggers/database-change.js

@@ -11,6 +11,12 @@ const configSchema = {
     type: 'object',
     properties: {
         collection: {
+            dynamicOptions: {
+                source: 'storage.collections',
+                labelField: 'name',
+                valueField: 'name',
+                filter: {}
+            },
             type: 'string',
             title: 'Collection',
             description: 'Collection to watch'
@@ -40,6 +46,12 @@ const configSchema = {
             default: false
         },
         cursorCollection: {
+            dynamicOptions: {
+                source: 'storage.collections',
+                labelField: 'name',
+                valueField: 'name',
+                filter: { access: 'read-write' }
+            },
             type: 'string',
             title: 'Cursor Collection',
             default: 'watch_cursors'

+ 6 - 0
nodes/triggers/file-watch.js

@@ -33,6 +33,12 @@ const configSchema = {
             default: false
         },
         cursorCollection: {
+            dynamicOptions: {
+                source: 'storage.collections',
+                labelField: 'name',
+                valueField: 'name',
+                filter: { access: 'read-write' }
+            },
             type: 'string',
             title: 'Cursor Collection',
             description: 'Collection holding the last-seen state',