UNPKG

node-red-contrib-osisoft-omf

Version:

Helps create node-red omf messages for OCS or connector relay

76 lines (69 loc) 3.37 kB
<!--- Copyright 2017 Derek Endres - OSIsoft, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0> Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---> <script type="text/x-red" data-template-name="osisoft-omf-type"> <div class="form-row"> <label for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-urlconfig"><i class="icon-tag"></i> URL Configuration</label> <input type="text" id="node-input-urlconfig" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-headersconfig"><i class="icon-tag"></i> Headers Configuration</label> <input type="text" id="node-input-headersconfig" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-typconfig"><i class="icon-tag"></i> Type Configuration</label> <input type="text" id="node-input-typconfig" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="osisoft-omf-type"> <p>A node that helps organize OMF types. All fields are mustachable.</p> <h3>General Details</h3> <dl class="message-properties"> <dt class="optional">URL Configuration <span class="property-type">object</span></dt> <dd>If configured in this node, the message.url field is set to this value.</dd> <dt class="optional">Headers Configuration <span class="property-type">object</span></dt> <dd>If configured in this node, message.headers field is set to this value.</dd> <dt class="optional">Type Configuration for Container <span class="property-type">object</span></dt> <dd>If configured in this node, the payload has a Type added to it, if it is a Type array, otherwise a type array with this is started in the payload.</dd> </dl> <h3>Output</h3> <dl class="message-properties"> <dt class="optional">url<span class="property-type">string</span></dt> <dd>The url to send to. If not specifed this is unmodified</dd> <dt class="optional">headers<span class="property-type">object</span></dt> <dd>The headers to send with. If not specifed this is unmodified</dd> <dt>payload<span class="property-type">object</span></dt> <dd>OMF Type Array compliant object.</dd> </dl> </script> <script type="text/javascript"> RED.nodes.registerType('osisoft-omf-type',{ category: 'OSIsoft', color: '#C0DEED', defaults: { name: {value:""}, typconfig: {type:"osisoft-omf-type-bridge", required:false}, headersconfig: {type:"osisoft-omf-headers-bridge", required:false}, urlconfig: {type:"osisoft-omf-url", required:false}, }, inputs:1, outputs:1, icon: "OSIsoft.png", label: function() { return this.name||"osisoft-omf-type"; } }); </script>