bigml-nodered
Version:
BigML bindings for Nodered
178 lines (159 loc) • 6.27 kB
HTML
<style>
.bigml_node_label { fill: white; }
#palette-BigML .palette_node { color: white; }
#red-ui-palette-BigML .red-ui-palette-label { color: white; }
</style>
<script type="text/javascript">
RED.nodes.registerType('fusion', {
category: 'BigML',
color: '#454957',
defaults: {"name":{"value":"fusion","required":true},"description":{"value":""},"field_maps":{"value":null},"models":{"value":""},"tags":{"value":""},"category":{"value":0},"webhook":{"value":""},"reify":{"value":false}},
inputs:1,
outputs:1,
inputLabels: 'dataset',
outputLabels: 'fusion',
icon: 'icon_fusion.png',
label: function() {
return this.name || 'Fusion';
},
labelStyle: function() {
return this.name?"bigml_node_label":"";
},
});
</script>
<script type="text/x-red" data-template-name="fusion">
<div class="form-row">
<label for="node-input-name">
<i class="icon-tag"></i> Name
</label>
<input type=text id=node-input-name value='fusion'>
</div>
<div class="form-row">
<label for="node-input-description">
<i class="icon-tag"></i> Description
</label>
<input type=text id=node-input-description >
</div>
<div class="form-row">
<label for="node-input-field_maps">
<i class="icon-tag"></i> Field maps
</label>
<input type=text id=node-input-field_maps placeholder='{
"model/52bc7fd03c1920e4a3000016": {
"000000":"000023",
"000001":"000024",
"000002":"00003a"},
"ensemble/52bc80233c1920e4a300001a": {
"000000":"000023",
"000001":"000004",
"000002":"00000f"}}' >
</div>
<div class="form-row">
<label for="node-input-models">
<i class="icon-tag"></i> Models
</label>
<input type=text id=node-input-models placeholder='[
"model/5af06df94e17277501000010"
"model/5af06df84e17277502000019"
"deepnet/5af06df84e17277502000016"
"ensemble/5af06df74e1727750100000d"]' >
</div>
<div class="form-row">
<label for="node-input-tags">
<i class="icon-tag"></i> Tags
</label>
<input type=text id=node-input-tags placeholder='["A tag", "Another Tag"]' >
</div>
<div class="form-row">
<label for="node-input-category">
<i class="icon-tag"></i> Category
</label>
<select id=node-input-category value='0'><option value=5>5</option> <option value=Healthcare>Healthcare</option></select>
</div>
<div class="form-row">
<label for="node-input-webhook">
<i class="icon-tag"></i> Webhook
</label>
<input type=text id=node-input-webhook >
</div>
<div class="form-row">
<label for="node-input-reify">
<i class="icon-tag"></i> Reify
</label>
<input type=checkbox id=node-input-reify value='false'>
</div>
</script>
<script type="text/html" data-help-name="fusion">
<p>Create BigML Fusion.</p>
<h3>Details</h3>
<p>This node support all inputs defined in
<a href='https://bigml.com/api/fusions' target=blank>BigML REST
API</a>. By default, it expects to receive
a <code>dataset</code> input (see below for more details) and
it will output the <code>fusion</code> field of the created
resource.
</p>
<p>However, you can override default inputs and outputs by defining
the node port label so they match the desired input or output as
specified below.</p>
<p>Only when the node is used with the <code>reify</code> option
enabled, it will actually hit BigML and do its work there. This
generally means some resources will be created and sent through as
node outputs.</p>
<p>When the node is used with the <code>reify</code>option disabled,
it will generate WhizzML code and send it through to the next node
in the flow without hitting BigML. All WhizzML code created by this
node (and others) when not in <code>reify</code> mode is accumulated
and executed as a single WhizzML script by the first
downstream <code>reified</code> node.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>Name
<span class="property-type">:text</span>
</dt>
<dd>A name for this node.</dd>
<dt>Description
<span class="property-type">:text</span>
</dt>
<dd></dd>
<dt>Field maps
<span class="property-type">:text</span>
</dt>
<dd>A dictionary keyed by a submodel id and object values. Each entry maps fields in the submodel to fields in the fusion</dd>
<dt>Models
<span class="property-type">:text</span>
</dt>
<dd>A list with fusion submodel resource/ids or or list of maps using the key id for each submodel resource/id, and any other key/values for additional meta-information on the model.</dd>
<dt>Tags
<span class="property-type">:text</span>
</dt>
<dd>A list of tags to identify the resource.</dd>
<dt>Category
<span class="property-type">:select</span>
</dt>
<dd></dd>
<dt>Webhook
<span class="property-type">:text</span>
</dt>
<dd>A webhook url and an optional secret phrase.</dd>
<dt>Reify
<span class="property-type">:boolean</span>
</dt>
<dd>Execute the WhizzML code generated at this (and upstream) node(s). You need to enable this option if you want to get a result from your flow that you can pass to a non-BigML node.</dd>
</dl>
<h3>Outputs</h3>
<ol class="node-ports">
<dl class="message-properties">
<dt>payload <span class="property-type">string or
JSON</span></dt>
<dd>the <code>fusion</code> of the created
BigML entity.</dd>
<dt>whizzml <span class="property-type">string</dt>
<dd>(only for <code>reified</code> nodes) the
generated WhizzML code which is fed into the next
node.
<dt>wzStack <span class="property-type">object</dt>
<dd>(only for <code>reified</code> nodes) private.
</dl>
</ol>
</script>