Added more nodes
This commit is contained in:
parent
a33c6da509
commit
1dc5e9fdb1
16 changed files with 228 additions and 10 deletions
65
node-red-grist/get-records.html
Normal file
65
node-red-grist/get-records.html
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<script type="text/javascript">
|
||||
RED.nodes.registerType('grist-get-records', {
|
||||
name: "Get records",
|
||||
category: 'grist',
|
||||
color: '#00bb00',
|
||||
defaults: {
|
||||
server: { value: "", type: "grist-server", required: true },
|
||||
document: { value: "", type: "grist-document", required: true },
|
||||
tableId: { value: "", required: true },
|
||||
filter: { value: "", required: false }
|
||||
},
|
||||
inputs: 1,
|
||||
outputs: 1,
|
||||
icon: "font-awesome/fa-table",
|
||||
label: function () {
|
||||
return this.tableId ? `[Get] ${this.tableId}` : "Get records";
|
||||
|
||||
},
|
||||
paletteLabel: "Get records",
|
||||
oneditprepare: function () {
|
||||
$("#node-input-filter").typedInput({
|
||||
type: "json",
|
||||
types: ["json", "str"]
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-template-name="grist-get-records">
|
||||
<div class="form-row">
|
||||
<label for="node-input-document"><i class="fa fa-file-text"></i> Document</label>
|
||||
<input type="text" id="node-input-document" placeholder="Document">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-server"><i class="fa fa-server"></i> Server</label>
|
||||
<input type="text" id="node-input-server" placeholder="Server">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-tableId"><i class="fa fa-table"></i> Table Name</label>
|
||||
<input type="text" id="node-input-tableId" placeholder="Table Name">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-filter"><i class="fa fa-filter"></i> Filter</label>
|
||||
<input type="text" id="node-input-filter">
|
||||
</div>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="grist-get-records">
|
||||
<p>Retrieves records from a grist table.</p>
|
||||
<h3>Inputs</h3>
|
||||
<p>
|
||||
The input message object is available for the <code>filter</code> property via mustache template syntax.
|
||||
</p>
|
||||
<h3>Outputs</h3>
|
||||
<p>
|
||||
Array of grist rows (records).
|
||||
</p>
|
||||
<h3>Attributes</h3>
|
||||
<p>
|
||||
<code>filter</code> JSON object with filter definition. Supports mustache syntax for templates.</p>
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue