Slight tweak to Wake on Lan (WOL) node

This commit is contained in:
Dave C-J 2014-01-19 11:59:29 +00:00
parent 88e89e7232
commit 03484169e3
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
<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-tips">Tip: leave blank if you want to use <b>msg.mac</b></div>
<div class="form-tips">Tip: leave blank if you want to use <b>msg.mac</b> to dynamically set target mac address.</div>
</script>
<script type="text/x-red" data-help-name="wake on lan">

View File

@ -20,7 +20,7 @@ var chk = /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/;
function WOLnode(n) {
RED.nodes.createNode(this,n);
this.mac = n.mac
this.mac = n.mac.trim();
var node = this;
this.on("input", function(msg) {
@ -32,7 +32,7 @@ function WOLnode(n) {
if (error) { node.warn(error); }
});
}
else { node.warn("WOL: bad mac address "+mac); }
else { node.warn('WOL: bad mac address "'+mac+'"'); }
}
else { node.warn("WOL: no mac address specified"); }
}