UNPKG

@hypericon/node-red-hypertable

Version:

Node-RED plugin to interact with Hypertable

91 lines (74 loc) 3.18 kB
<!-- Node HTML file docs: https://nodered.org/docs/creating-nodes/node-html --> <!-- the main node definition that is registered with the editor --> <script type="text/javascript"> RED.nodes.registerType('read-collection', { category: 'storage', color: '#EDF2F7', defaults: { name: { value: "" }, connection: { value: "", type: "hypertable-connection" }, // baseUrl: { value: "https://hypertable.cloud", required: true }, // projectId: { value: "", required: true }, collectionId: { value: "" }, }, inputs: 1, outputs: 1, icon: "hypertable-logo-h.png", label: function () { return this.name || "read collection"; }, paletteLabel: "read collection", }); </script> <!-- the node edit template --> <!-- Docs: https://nodered.org/docs/creating-nodes/edit-dialog --> <script type="text/html" data-template-name="read-collection"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-connection"><i class="fa fa-database"></i> Connection</label> <input type="text" id="node-input-connection" placeholder="Hypertable Connection"> </div> <!-- <div class="form-row"> <label for="node-input-projectId"><i class="fa fa-database"></i> Project ID</label> <input type="text" id="node-input-projectId" placeholder="Project ID"> </div> --> <!-- <div class="form-tips">The ID of the Project in Hypertable</div> --> <div class="form-row"> <label for="node-input-collectionId"><i class="fa fa-table"></i> Collection ID</label> <input type="text" id="node-input-collectionId" placeholder="Collection ID"> </div> <p>(or set <code>msg.collectionId</code> instead)</p> <!-- <div class="form-row"> <button type="button" class="red-ui-button">Test</button> </div> --> <!-- <div class="form-tips"><b>Tip:</b> This is here to help.</div> --> </script> <!-- the help text --> <script type="text/html" data-help-name="read-collection"> <!-- The first p tag is used as a tooltip --> <p>Reads the definition of a specified Hypertable collection</p> <h3>Inputs</h3> <dl class="message-properties"> <dt class="optional">collectionId <span class="property-type">string</span> </dt> <dd>The ID of the collection to read</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>collection <span class="property-type">object</span> </dt> <dd>The details of the specified collection</dd> </dl> <h3>Details</h3> <p>The ID of the Hypertable collection is specified either in the node properties, or in <code>msg.collectionId</code>.</p> <h3>References</h3> <ul> <li><a href="https://hypertable.co.uk/docs/hypertable/features/collections">Hypertable docs - collections</a></li> <li><a href="https://hypertable.co.uk/docs/developers/hypertable-api#operation/Get%20Collection">Hypertable API docs - get collection endpoint</a></li> </ul> </script>