@hypericon/node-red-hypertable
Version:
Node-RED plugin to interact with Hypertable
72 lines (61 loc) • 2.5 kB
HTML
<!-- 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: 'network',
color: '#EDF2F7',
defaults: {
name: { value: "" },
connection: { value: "", type: "hypertable-connection" },
// baseUrl: { value: "https://hypertable.cloud", required: true },
// projectId: { value: "", required: true },
collectionId: { value: "", required: true },
},
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>
<!-- <div class="form-tips">The ID of the Collection in Hypertable</div> -->
<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>Some useful info</p>
<h3>Outputs</h3>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">string | buffer</span>
</dt>
<h3>Details</h3>
<p>Some more information about the node.</p>
</script>