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: "" },
|
2021-07-11 09:03:32 +02:00
|
|
|
length: { value: "", required: true, validate: (v) => v > 4 },
|
2021-07-11 06:16:21 +02:00
|
|
|
setTo: { value: "" },
|
2021-07-11 09:03:32 +02:00
|
|
|
isNumberDisabled: { value: false, require: true },
|
|
|
|
isSpecialCharsDisabled: { value: false, require: true },
|
|
|
|
isSpaceDisabled: { value: false, require: true },
|
2021-07-11 06:16:21 +02:00
|
|
|
},
|
|
|
|
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 09:03:32 +02:00
|
|
|
<label for="node-input-setTo"><i class="fa fa-ellipsis-h"></i> to</label>
|
2021-07-11 06:16:21 +02:00
|
|
|
<input type="text" id="node-input-setTo">
|
2021-07-09 03:49:18 +02:00
|
|
|
</div>
|
2021-07-11 09:03:32 +02:00
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-isNumberDisabled"> Disable Number</label>
|
|
|
|
<input type="checkbox" id="node-input-isNumberDisabled">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-isSpecialCharsDisabled"> Disable Special chars</label>
|
|
|
|
<input type="checkbox" id="node-input-isSpecialCharsDisabled">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-input-isSpaceDisabled"> Disable Space</label>
|
|
|
|
<input type="checkbox" id="node-input-isSpaceDisabled">
|
|
|
|
</div>
|
2021-07-09 03:49:18 +02:00
|
|
|
</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>
|
2021-07-11 09:41:51 +02:00
|
|
|
<dd> Password length. It must be 5 or bigger number. </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-11 09:03:32 +02:00
|
|
|
<dt>Disable options</dt>
|
|
|
|
<dd> Excludes the characters from the generated password. </dd>
|
2021-07-09 03:49:18 +02:00
|
|
|
</dl>
|
2021-07-11 09:03:32 +02:00
|
|
|
</script>
|