mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
add strict to redisout and fa-icons
This commit is contained in:
parent
2b423fe9be
commit
fea68d4eda
@ -16,17 +16,17 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="redis out">
|
||||
<div class="form-row node-input-hostname">
|
||||
<label for="node-input-hostname"><i class="icon-bookmark"></i> Host</label>
|
||||
<label for="node-input-hostname"><i class="fa fa-bookmark"></i> Host</label>
|
||||
<input class="input-append-left" type="text" id="node-input-hostname" placeholder="127.0.0.1" style="width: 40%;" ><button id="node-input-hostname-lookup" class="btn input-append-right"><span class="caret"></span></button>
|
||||
<label for="node-input-port" style="margin-left: 10px; width: 35px; "> Port</label>
|
||||
<input type="text" id="node-input-port" placeholder="6379" style="width:45px">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-key"><i class="icon-briefcase"></i> Key</label>
|
||||
<label for="node-input-key"><i class="fa fa-key"></i> Key</label>
|
||||
<input type="text" id="node-input-key" placeholder="Redis Key">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-type"><i class="icon-th"></i> Type</label>
|
||||
<label for="node-input-type"><i class="fa fa-th"></i> Type</label>
|
||||
<select type="text" id="node-input-structtype" style="width: 150px;">
|
||||
<option value="string">String</option>
|
||||
<option value="hash">Hash</option>
|
||||
@ -35,7 +35,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
<div class="form-tips">
|
||||
|
@ -15,6 +15,7 @@
|
||||
**/
|
||||
|
||||
module.exports = function(RED) {
|
||||
"use strict";
|
||||
var util = require("util");
|
||||
var redis = require("redis");
|
||||
|
||||
@ -41,7 +42,7 @@ module.exports = function(RED) {
|
||||
},
|
||||
close: function(connection) {
|
||||
connection._nodeCount -= 1;
|
||||
if (connection._nodeCount == 0) {
|
||||
if (connection._nodeCount === 0) {
|
||||
if (connection) {
|
||||
clearTimeout(connection.retry_timer);
|
||||
connection.end();
|
||||
@ -100,12 +101,9 @@ module.exports = function(RED) {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.on("close", function() {
|
||||
redisConnectionPool.close(node.client);
|
||||
});
|
||||
}
|
||||
|
||||
RED.nodes.registerType("redis out",RedisOutNode);
|
||||
|
||||
RedisOutNode.prototype.close = function() {
|
||||
redisConnectionPool.close(this.client);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user