From 53ba23c61f71033ba8239657eb45cf98bebc0a60 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 16 Dec 2025 17:07:06 +0100 Subject: [PATCH 01/10] Add pollIntervalSeconds field to poll files node output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new field to the "All results" output payload that reports the poll interval duration in seconds, alongside the existing nextPoll timestamp. This makes it easier for downstream nodes to understand the polling schedule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 4 ++++ docs/seqera_nodes/poll_files.md | 1 + nodes/datalink-poll.html | 7 ++++++- nodes/datalink-poll.js | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bccbb5b..2a99d63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [Unreleased] + +- Poll files node: Added `pollIntervalSeconds` field to output payload alongside `nextPoll` + ## [1.4.1] - 2025-11-16 - Bugfix: Don't use absolute paths for internal API calls for config setup diff --git a/docs/seqera_nodes/poll_files.md b/docs/seqera_nodes/poll_files.md index be7c93c..2102c7f 100644 --- a/docs/seqera_nodes/poll_files.md +++ b/docs/seqera_nodes/poll_files.md @@ -46,6 +46,7 @@ Both messages include the same properties: - `msg.payload.resourceType`, `msg.payload.resourceRef`, `msg.payload.provider` – Data Link metadata. - `msg.files` – Convenience array of fully-qualified object names (strings). - `msg.payload.nextPoll` (only on **All results** output) – ISO timestamp of the next scheduled poll. +- `msg.payload.pollIntervalSeconds` (only on **All results** output) – Poll interval duration in seconds. ## How new files are detected diff --git a/nodes/datalink-poll.html b/nodes/datalink-poll.html index c2b7075..13d4aa7 100644 --- a/nodes/datalink-poll.html +++ b/nodes/datalink-poll.html @@ -86,9 +86,14 @@ Both outputs have the following properties: -: payload (array) : Fle information aggregated from the API (array of objects). +: payload (array) : File information aggregated from the API (array of objects). : files (array) : File names (array of strings). +The "All results" output also includes: + +: payload.nextPoll (string) : ISO timestamp of the next scheduled poll. +: payload.pollIntervalSeconds (number) : Poll interval duration in seconds. + All typed-input fields are identical to the _List files_ node with the addition of **poll frequency**. diff --git a/nodes/datalink-poll.js b/nodes/datalink-poll.js index 75775d7..13deb84 100644 --- a/nodes/datalink-poll.js +++ b/nodes/datalink-poll.js @@ -74,6 +74,7 @@ module.exports = function (RED) { resourceRef: result.resourceRef, provider: result.provider, nextPoll: new Date(Date.now() + node.pollFrequencySec * 1000).toISOString(), + pollIntervalSeconds: node.pollFrequencySec, }, files: result.files.map((it) => `${result.resourceRef}/${it}`), }; From 877003e33f65ff5e13ee8e3fedff74aa9072dda1 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Wed, 17 Dec 2025 10:58:29 +0100 Subject: [PATCH 02/10] Data links poll: disable 'every poll' output by default. Make it a config option to include it again. Hoping to avoid people connecting it to stuff without reading the docs. --- CHANGELOG.md | 1 + docs/seqera_nodes/poll_files.md | 17 +++++++++++------ nodes/datalink-poll.html | 29 ++++++++++++++++++++++++----- nodes/datalink-poll.js | 11 ++++++++++- 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a99d63..9907470 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased] - Poll files node: Added `pollIntervalSeconds` field to output payload alongside `nextPoll` +- Poll files node: "All results" output is now hidden by default, with a checkbox option to enable it ## [1.4.1] - 2025-11-16 diff --git a/docs/seqera_nodes/poll_files.md b/docs/seqera_nodes/poll_files.md index 2102c7f..7be944d 100644 --- a/docs/seqera_nodes/poll_files.md +++ b/docs/seqera_nodes/poll_files.md @@ -29,18 +29,23 @@ This node automatically monitors a Data Link for _changes_, making it perfect fo - **Max results** (default **100**): Maximum number of objects to return per poll. - **Depth** (default **0**): Folder recursion depth. - **Poll frequency** (default **15 min**): Interval between polls. +- **Output all results on every poll** (default **off**): When enabled, adds a second output that emits all files on every poll. - **Workspace ID**: Override the workspace ID from the Config node. All properties work the same as the [list files](list_files.md) node, plus automatic polling. -## Outputs (two) +## Outputs -The node has two outputs that fire at different times: +By default, the node has a single output: + +1. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. + +When **Output all results on every poll** is enabled, the node has two outputs: 1. **All results** – Emitted every poll with the full, filtered list of files. 2. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. -Both messages include the same properties: +Both outputs include the same properties: - `msg.payload.files` – Array of file objects from the API. - `msg.payload.resourceType`, `msg.payload.resourceRef`, `msg.payload.provider` – Data Link metadata. @@ -54,7 +59,7 @@ The node tracks seen files in its context storage. On each poll: 1. Fetch the current list of files from the Data Link 2. Compare against the list from the previous poll -3. If new files are found, emit them on output 2 +3. If new files are found, emit them on the "New results" output 4. Update the stored list for the next comparison The comparison is based on the full file path. Files that are deleted and re-uploaded will be detected as "new". @@ -75,7 +80,7 @@ See the [configuration documentation](configuration.md#required-token-permission 1. Add a **poll-files** node and configure the Data Link 2. Set **pollFrequency** to your desired interval (e.g., `5:00` for 5 minutes) -3. Connect output 2 (New results) to a **workflow-launch** node +3. Connect the output (New results) to a **workflow-launch** node 4. Configure the launch node to use the file paths from `msg.files` 5. Deploy @@ -84,7 +89,7 @@ Now every time a new file appears in the Data Link, a workflow will automaticall ### Trigger only on specific file types 1. Set **pattern**: `.*\.bam$` to only detect BAM files -2. Connect output 2 to your processing logic +2. Connect the output to your processing logic 3. The node will only emit when new BAM files appear ## Notes diff --git a/nodes/datalink-poll.html b/nodes/datalink-poll.html index 13d4aa7..990c29b 100644 --- a/nodes/datalink-poll.html +++ b/nodes/datalink-poll.html @@ -20,6 +20,11 @@ +
+ + + Output all results on every poll +
@@ -67,6 +72,7 @@ ### Inputs : pollFrequency (string) : Poll frequency (default `15 minutes`). Can be configured in seconds, minutes, hours, or days. +: outputAllPolls (boolean) : Enable the "All results" output (disabled by default). : dataLinkName (string) : The name of the data explorer link. : basePath (string) : Path within the data link to start browsing. Leave blank for the root. : prefix (string) : Optional prefix filter for results (applies to folders and files) @@ -79,10 +85,10 @@ ### Outputs -The node has two outputs: +The node has one or two outputs depending on configuration: -1. All results on every poll. -2. New objects since the previous poll (nothing sent if no new objects). +1. **All results** (optional, disabled by default) – Emitted every poll with the full list of files. +2. **New results** – Emitted only when new objects are detected since the previous poll. Both outputs have the following properties: @@ -102,14 +108,19 @@ category: "seqera", color: "#A9A1C6", inputs: 0, - outputs: 2, + outputs: 1, icon: "icons/data-explorer.svg", align: "left", paletteLabel: "Poll files", label: function () { return this.name || "Poll files"; }, - outputLabels: ["All objects", "Only new objects"], + outputLabels: function (index) { + if (this.outputAllPolls) { + return index === 0 ? "All objects" : "Only new objects"; + } + return "Only new objects"; + }, defaults: { name: { value: "" }, seqera: { value: "", type: "seqera-config" }, @@ -133,6 +144,7 @@ pollFrequency: { value: "15" }, pollUnits: { value: "minutes" }, returnType: { value: "files" }, + outputAllPolls: { value: false }, }, oneditprepare: function () { function ti(id, val, type, def = "str") { @@ -154,6 +166,9 @@ $("#node-input-pollFrequency").val(this.pollFrequency || "15"); $("#node-input-pollUnits").val(this.pollUnits || "minutes"); + // Output all polls checkbox + $("#node-input-outputAllPolls").prop("checked", this.outputAllPolls || false); + $("#node-input-returnType").val(this.returnType || "files"); // Add auto-complete for datalink name when type is "str" @@ -265,6 +280,10 @@ this.pollFrequency = $("#node-input-pollFrequency").val(); this.pollUnits = $("#node-input-pollUnits").val(); + // Save output all polls checkbox and update outputs count + this.outputAllPolls = $("#node-input-outputAllPolls").prop("checked"); + this.outputs = this.outputAllPolls ? 2 : 1; + this.returnType = $("#node-input-returnType").val(); }, }); diff --git a/nodes/datalink-poll.js b/nodes/datalink-poll.js index 13deb84..565b9a9 100644 --- a/nodes/datalink-poll.js +++ b/nodes/datalink-poll.js @@ -30,6 +30,7 @@ module.exports = function (RED) { node.depthProp = config.depth; node.depthPropType = config.depthType; node.returnType = config.returnType || "files"; // files|folders|all + node.outputAllPolls = config.outputAllPolls || false; // Poll frequency configuration const unitMultipliers = { @@ -100,7 +101,15 @@ module.exports = function (RED) { previousNamesSet = new Set(result.items.map((it) => it.name)); node.status({ fill: "green", shape: "dot", text: `${result.items.length} items: ${formatDateTime()}` }); - node.send([msgAll, msgNew]); + + // Send to outputs based on configuration + if (node.outputAllPolls) { + // Two outputs: [All results, New results] + node.send([msgAll, msgNew]); + } else { + // Single output: [New results only] + node.send([msgNew]); + } } catch (err) { node.error(`Seqera datalink poll failed: ${err.message}`); node.status({ fill: "red", shape: "dot", text: `error: ${formatDateTime()}` }); From de4a03218d2aa2a6abfee71cc77f035a23c884d0 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Wed, 17 Dec 2025 11:13:16 +0100 Subject: [PATCH 03/10] Poll files: Add a new output that sends events when files are deleted --- CHANGELOG.md | 1 + docs/seqera_nodes/poll_files.md | 25 ++++++++++++++----------- nodes/datalink-poll.html | 15 +++++++++------ nodes/datalink-poll.js | 32 ++++++++++++++++++++++++++------ 4 files changed, 50 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9907470..554bed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Poll files node: Added `pollIntervalSeconds` field to output payload alongside `nextPoll` - Poll files node: "All results" output is now hidden by default, with a checkbox option to enable it +- Poll files node: Added new "Deleted results" output that fires when files are removed from the Data Link ## [1.4.1] - 2025-11-16 diff --git a/docs/seqera_nodes/poll_files.md b/docs/seqera_nodes/poll_files.md index 7be944d..b1f79d3 100644 --- a/docs/seqera_nodes/poll_files.md +++ b/docs/seqera_nodes/poll_files.md @@ -1,8 +1,8 @@ # Poll files -**Periodically list a Seqera Data Explorer Data Link and emit messages when new objects appear.** +**Periodically list a Seqera Data Explorer Data Link and emit messages when objects are added or deleted.** -This node automatically monitors a Data Link for _changes_, making it perfect for event-driven workflows that trigger when new files are uploaded. +This node automatically monitors a Data Link for _changes_, making it perfect for event-driven workflows that trigger when files are uploaded or removed. !!! note @@ -29,23 +29,25 @@ This node automatically monitors a Data Link for _changes_, making it perfect fo - **Max results** (default **100**): Maximum number of objects to return per poll. - **Depth** (default **0**): Folder recursion depth. - **Poll frequency** (default **15 min**): Interval between polls. -- **Output all results on every poll** (default **off**): When enabled, adds a second output that emits all files on every poll. +- **Output all results on every poll** (default **off**): When enabled, adds an extra output that emits all files on every poll. - **Workspace ID**: Override the workspace ID from the Config node. All properties work the same as the [list files](list_files.md) node, plus automatic polling. ## Outputs -By default, the node has a single output: +By default, the node has two outputs: 1. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. +2. **Deleted results** – Emitted only when one or more objects are _deleted_ since the last poll. -When **Output all results on every poll** is enabled, the node has two outputs: +When **Output all results on every poll** is enabled, the node has three outputs: 1. **All results** – Emitted every poll with the full, filtered list of files. 2. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. +3. **Deleted results** – Emitted only when one or more objects are _deleted_ since the last poll. -Both outputs include the same properties: +All outputs include the same properties: - `msg.payload.files` – Array of file objects from the API. - `msg.payload.resourceType`, `msg.payload.resourceRef`, `msg.payload.provider` – Data Link metadata. @@ -53,20 +55,21 @@ Both outputs include the same properties: - `msg.payload.nextPoll` (only on **All results** output) – ISO timestamp of the next scheduled poll. - `msg.payload.pollIntervalSeconds` (only on **All results** output) – Poll interval duration in seconds. -## How new files are detected +## How changes are detected The node tracks seen files in its context storage. On each poll: 1. Fetch the current list of files from the Data Link 2. Compare against the list from the previous poll 3. If new files are found, emit them on the "New results" output -4. Update the stored list for the next comparison +4. If files are missing (deleted), emit them on the "Deleted results" output +5. Update the stored list for the next comparison -The comparison is based on the full file path. Files that are deleted and re-uploaded will be detected as "new". +The comparison is based on the full file path. Files that are deleted and re-uploaded will be detected as "deleted" then "new" on subsequent polls. !!! info - The very first poll after the node is created sees everything as new and is handled as a special case. It does not output new results. + The very first poll after the node is created sees everything as new and is handled as a special case. It does not output new or deleted results. ## Required permissions @@ -94,7 +97,7 @@ Now every time a new file appears in the Data Link, a workflow will automaticall ## Notes -- The first poll after deployment/restart does **not** emit to the "New results" output (it initializes the tracking state) +- The first poll after deployment/restart does **not** emit to the "New results" or "Deleted results" outputs (it initializes the tracking state) - The tracking is reset on each Node-RED restart or flow redeployment - Very frequent polling (< 30 seconds) may impact API rate limits - Custom message properties are preserved in outputs (e.g., `msg._context`) diff --git a/nodes/datalink-poll.html b/nodes/datalink-poll.html index 990c29b..f628a2a 100644 --- a/nodes/datalink-poll.html +++ b/nodes/datalink-poll.html @@ -85,12 +85,13 @@ ### Outputs -The node has one or two outputs depending on configuration: +The node has two or three outputs depending on configuration: 1. **All results** (optional, disabled by default) – Emitted every poll with the full list of files. 2. **New results** – Emitted only when new objects are detected since the previous poll. +3. **Deleted results** – Emitted only when objects are deleted since the previous poll. -Both outputs have the following properties: +All outputs have the following properties: : payload (array) : File information aggregated from the API (array of objects). : files (array) : File names (array of strings). @@ -108,7 +109,7 @@ category: "seqera", color: "#A9A1C6", inputs: 0, - outputs: 1, + outputs: 2, icon: "icons/data-explorer.svg", align: "left", paletteLabel: "Poll files", @@ -117,9 +118,11 @@ }, outputLabels: function (index) { if (this.outputAllPolls) { - return index === 0 ? "All objects" : "Only new objects"; + // 3 outputs: All, New, Deleted + return ["All objects", "New objects", "Deleted objects"][index]; } - return "Only new objects"; + // 2 outputs: New, Deleted + return ["New objects", "Deleted objects"][index]; }, defaults: { name: { value: "" }, @@ -282,7 +285,7 @@ // Save output all polls checkbox and update outputs count this.outputAllPolls = $("#node-input-outputAllPolls").prop("checked"); - this.outputs = this.outputAllPolls ? 2 : 1; + this.outputs = this.outputAllPolls ? 3 : 2; this.returnType = $("#node-input-returnType").val(); }, diff --git a/nodes/datalink-poll.js b/nodes/datalink-poll.js index 565b9a9..cd5c950 100644 --- a/nodes/datalink-poll.js +++ b/nodes/datalink-poll.js @@ -80,7 +80,10 @@ module.exports = function (RED) { files: result.files.map((it) => `${result.resourceRef}/${it}`), }; - // Second output: only new items since previous poll + // Build set of current names for comparison + const currentNamesSet = new Set(result.items.map((it) => it.name)); + + // New items since previous poll let msgNew = null; if (previousNamesSet) { const newItems = result.items.filter((it) => !previousNamesSet.has(it.name)); @@ -97,18 +100,35 @@ module.exports = function (RED) { } } + // Deleted items since previous poll + let msgDeleted = null; + if (previousNamesSet) { + const deletedNames = [...previousNamesSet].filter((name) => !currentNamesSet.has(name)); + if (deletedNames.length) { + msgDeleted = { + payload: { + files: deletedNames.map((name) => ({ name })), + resourceType: result.resourceType, + resourceRef: result.resourceRef, + provider: result.provider, + }, + files: deletedNames.map((name) => `${result.resourceRef}/${name}`), + }; + } + } + // Update cache - previousNamesSet = new Set(result.items.map((it) => it.name)); + previousNamesSet = currentNamesSet; node.status({ fill: "green", shape: "dot", text: `${result.items.length} items: ${formatDateTime()}` }); // Send to outputs based on configuration if (node.outputAllPolls) { - // Two outputs: [All results, New results] - node.send([msgAll, msgNew]); + // Three outputs: [All results, New results, Deleted results] + node.send([msgAll, msgNew, msgDeleted]); } else { - // Single output: [New results only] - node.send([msgNew]); + // Two outputs: [New results, Deleted results] + node.send([msgNew, msgDeleted]); } } catch (err) { node.error(`Seqera datalink poll failed: ${err.message}`); From 89a3149ffb6f71742661aed5bb7bc70b40a3f83b Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 18 Dec 2025 13:32:22 +0100 Subject: [PATCH 04/10] Update datalink-poll tests for outputAllPolls configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests were written for upstream's 2-output structure (All, New) but the current implementation uses outputAllPolls to control outputs: - Default: 2 outputs (New, Deleted) - outputAllPolls=true: 3 outputs (All, New, Deleted) Updated 7 tests to use outputAllPolls: true and 3-output wire config. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- test/datalink-poll_spec.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/test/datalink-poll_spec.js b/test/datalink-poll_spec.js index 7c6c26d..ea0599a 100644 --- a/test/datalink-poll_spec.js +++ b/test/datalink-poll_spec.js @@ -299,7 +299,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "60", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], ["helper2"]], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], ["helper2"], []], }, { id: "helper1", type: "helper" }, { id: "helper2", type: "helper" }, @@ -428,7 +429,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "1", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], ["helper2"]], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], ["helper2"], []], }, { id: "helper1", type: "helper" }, { id: "helper2", type: "helper" }, @@ -504,7 +506,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "60", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], ["helper2"]], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], ["helper2"], []], }, { id: "helper1", type: "helper" }, { id: "helper2", type: "helper" }, @@ -558,7 +561,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "1", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], ["helper2"]], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], ["helper2"], []], }, { id: "helper1", type: "helper" }, { id: "helper2", type: "helper" }, @@ -631,7 +635,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "60", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], []], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], [], []], }, { id: "helper1", type: "helper" }, ]; @@ -670,7 +675,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "60", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], []], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], [], []], }, { id: "helper1", type: "helper" }, ]; @@ -781,7 +787,8 @@ describe("seqera-datalink-poll Node", function () { pollFrequency: "1", pollUnits: "seconds", returnType: "all", - wires: [["helper1"], []], + outputAllPolls: true, // Enable 3-output mode: [All, New, Deleted] + wires: [["helper1"], [], []], }, { id: "helper1", type: "helper" }, ]; From 6a8ddec7f92163ab0d847a82e37db9d91bad8d9c Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 18 Dec 2025 14:11:18 +0100 Subject: [PATCH 05/10] Rename checkbox label --- docs/seqera_nodes/poll_files.md | 4 ++-- nodes/datalink-poll.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/seqera_nodes/poll_files.md b/docs/seqera_nodes/poll_files.md index b1f79d3..1cdf086 100644 --- a/docs/seqera_nodes/poll_files.md +++ b/docs/seqera_nodes/poll_files.md @@ -29,7 +29,7 @@ This node automatically monitors a Data Link for _changes_, making it perfect fo - **Max results** (default **100**): Maximum number of objects to return per poll. - **Depth** (default **0**): Folder recursion depth. - **Poll frequency** (default **15 min**): Interval between polls. -- **Output all results on every poll** (default **off**): When enabled, adds an extra output that emits all files on every poll. +- **Show output port output on every poll** (default **off**): When enabled, adds an extra output that emits all files on every poll. - **Workspace ID**: Override the workspace ID from the Config node. All properties work the same as the [list files](list_files.md) node, plus automatic polling. @@ -41,7 +41,7 @@ By default, the node has two outputs: 1. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. 2. **Deleted results** – Emitted only when one or more objects are _deleted_ since the last poll. -When **Output all results on every poll** is enabled, the node has three outputs: +When **Show output port output on every poll** is enabled, the node has three outputs: 1. **All results** – Emitted every poll with the full, filtered list of files. 2. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. diff --git a/nodes/datalink-poll.html b/nodes/datalink-poll.html index f628a2a..c5e99be 100644 --- a/nodes/datalink-poll.html +++ b/nodes/datalink-poll.html @@ -23,7 +23,7 @@
- Output all results on every poll + Show output port output on every poll
From 8f8f6118ff8a339cec409aabea21cad6ea276ecd Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 18 Dec 2025 14:37:37 +0100 Subject: [PATCH 06/10] Poll data links: improve side panel form --- docs/seqera_nodes/poll_files.md | 8 +++--- nodes/datalink-poll.html | 44 +++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/docs/seqera_nodes/poll_files.md b/docs/seqera_nodes/poll_files.md index 1cdf086..c408a2b 100644 --- a/docs/seqera_nodes/poll_files.md +++ b/docs/seqera_nodes/poll_files.md @@ -22,14 +22,14 @@ This node automatically monitors a Data Link for _changes_, making it perfect fo - **Seqera config**: Reference to the seqera-config node containing API credentials and default workspace settings. - **Node name**: Optional custom name for the node in the editor. - **Data Link name** (required): Display name of the Data Link. Supports autocomplete. +- **Return type** (default **files**): `files`, `folders` or `all`. +- **Poll frequency** (default **15 min**): Interval between polls. +- **Every poll / Show output port** (default **off**): When enabled, adds an extra output that emits all files on every poll. - **Base path**: Path within the Data Link to start from. - **Prefix**: Prefix filter applied to both files and folders. - **Pattern**: Regular-expression filter applied to files after the prefix filter. -- **Return type** (default **files**): `files`, `folders` or `all`. - **Max results** (default **100**): Maximum number of objects to return per poll. - **Depth** (default **0**): Folder recursion depth. -- **Poll frequency** (default **15 min**): Interval between polls. -- **Show output port output on every poll** (default **off**): When enabled, adds an extra output that emits all files on every poll. - **Workspace ID**: Override the workspace ID from the Config node. All properties work the same as the [list files](list_files.md) node, plus automatic polling. @@ -41,7 +41,7 @@ By default, the node has two outputs: 1. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. 2. **Deleted results** – Emitted only when one or more objects are _deleted_ since the last poll. -When **Show output port output on every poll** is enabled, the node has three outputs: +When **Every poll / Show output port** is enabled, the node has three outputs: 1. **All results** – Emitted every poll with the full, filtered list of files. 2. **New results** – Emitted only when one or more _new_ objects are detected since the last poll. diff --git a/nodes/datalink-poll.html b/nodes/datalink-poll.html index c5e99be..5a26ef7 100644 --- a/nodes/datalink-poll.html +++ b/nodes/datalink-poll.html @@ -9,6 +9,20 @@
+ +
+ + +
+
+ + +
+
@@ -21,24 +35,22 @@
- - - Show output port output on every poll + +
- -
- - -
-
- - -
+
From 2b7c2f4ca030f304d8863813ef325d8adae804e6 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 18 Dec 2025 15:14:40 +0100 Subject: [PATCH 07/10] Tweak help text in node --- nodes/datalink-poll.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nodes/datalink-poll.html b/nodes/datalink-poll.html index 5a26ef7..356a612 100644 --- a/nodes/datalink-poll.html +++ b/nodes/datalink-poll.html @@ -83,25 +83,26 @@ ### Inputs -: pollFrequency (string) : Poll frequency (default `15 minutes`). Can be configured in seconds, minutes, hours, or days. -: outputAllPolls (boolean) : Enable the "All results" output (disabled by default). : dataLinkName (string) : The name of the data explorer link. +: returnType (string) : Select whether to return files, folders or everything. +: pollFrequency (string) : Poll frequency (default `15 minutes`). Can be configured in seconds, minutes, hours, or days. +: outputAllPolls (boolean) : Show the "every poll" output port. Emits an output file listing on every poll event, irrespective of changes (disabled by default). : basePath (string) : Path within the data link to start browsing. Leave blank for the root. : prefix (string) : Optional prefix filter for results (applies to folders and files) : pattern (string) : Optional regex pattern filter for results (applies to files only) -: returnType (string) : Select whether to return files, folders or everything. : maxResults (number) : Maximum number of results to return (default 100). +: depth (number) : Folder recursion depth (default 0). : workspaceId (string) : Override the workspace ID from the config node. -All inputs support msg._, flow._, global.\*, env, or JSONata expressions via the **typedInput**. +All inputs support `msg`, `flow`, `global`, `env`, or JSONata expressions via the **typedInput**. ### Outputs The node has two or three outputs depending on configuration: -1. **All results** (optional, disabled by default) – Emitted every poll with the full list of files. -2. **New results** – Emitted only when new objects are detected since the previous poll. -3. **Deleted results** – Emitted only when objects are deleted since the previous poll. +1. **All results** (optional, disabled by default) - Emitted every poll with the full list of files. +2. **New results** - Emitted only when new objects are detected since the previous poll. +3. **Deleted results** - Emitted only when objects are deleted since the previous poll. All outputs have the following properties: @@ -113,7 +114,6 @@ : payload.nextPoll (string) : ISO timestamp of the next scheduled poll. : payload.pollIntervalSeconds (number) : Poll interval duration in seconds. -All typed-input fields are identical to the _List files_ node with the addition of **poll frequency**.