node-red-contrib-melview
Version:
Set of node red nodes to communicate with the melview API
53 lines (50 loc) • 1.82 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('melview-connection', {
category: 'config',
defaults: {
melviewEndpoint: {
value: "api.melview.net",
required: true
},
appVersion: {
value: "4.3.1104",
required: true
},
username: {
value: "",
required: true
},
},
label: function () {
let labelText = 'Melview Connection';
if(this.username != null)
{
labelText = `${labelText} (${this.username})`;
}
return labelText;
},
credentials: {
password: {type: "password"}
},
});
</script>
<script type="text/html" data-template-name="melview-connection">
<div class="form-row">
<label for="node-config-input-melviewEndpoint"><i class="icon-bookmark"></i> Melview Endpoint</label>
<input type="text" id="node-config-input-melviewEndpoint">
</div>
<div class="form-row">
<label for="node-config-input-appVersion"><i class="icon-bookmark"></i> AppVersion</label>
<select id="node-config-input-appVersion" class="power-dependant">
<option value="4.3.1104">4.3.1104</option>
</select>
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="icon-tag"></i> Username</label>
<input type="text" id="node-config-input-username">
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="icon-tag"></i> Password</label>
<input type="password" id="node-config-input-password">
</div>
</script>