2021-07-11 06:16:21 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
const nodeName = "password-generator";
|
|
|
|
RED.nodes.registerType(nodeName, {
|
|
|
|
category: "function",
|
|
|
|
color: "#D8BFD8",
|
|
|
|
defaults: {
|
|
|
|
name: { value: "" },
|
|
|
|
length: { value: "", required: true, validate: RED.validators.number() },
|
|
|
|
setTo: { value: "" },
|
|
|
|
},
|
|
|
|
inputs: 1,
|
|
|
|
outputs: 1,
|
|
|
|
icon: "font-awesome/fa-key",
|
|
|
|
label: function () {
|
|
|
|
return this.name || nodeName;
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
2021-07-09 03:49:18 +02:00
|
|
|
<script type="text/html" data-template-name="password-generator">
|
|
|
|
<div class="form-row">
|
2021-07-11 06:16:21 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
2021-07-09 03:49:18 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2021-07-11 06:16:21 +02:00
|
|
|
<label for="node-input-length"> Length</label>
|
|
|
|
<input type="text" id="node-input-length">
|
2021-07-09 03:49:18 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2021-07-11 06:16:21 +02:00
|
|
|
<label for="node-input-setTo"><i class="fa fa-ellipsis-he"></i> to</label>
|
|
|
|
<input type="text" id="node-input-setTo">
|
2021-07-09 03:49:18 +02:00
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/html" data-help-name="password-generator">
|
|
|
|
<p>Send incoming message only when the value of the specified key path changes.</p>
|
|
|
|
|
|
|
|
<h3>Configuration</h3>
|
|
|
|
<dl class="message-properties">
|
2021-07-11 06:16:21 +02:00
|
|
|
<dt>Length</dt>
|
|
|
|
<dd> Password length. </dd>
|
2021-07-09 03:49:18 +02:00
|
|
|
<dt>to</dt>
|
2021-07-11 06:16:21 +02:00
|
|
|
<dd> The property to set generated password. </dd>
|
2021-07-09 03:49:18 +02:00
|
|
|
</dl>
|
|
|
|
</script>
|