2013-10-30 21:38:23 +01:00
|
|
|
|
2020-02-17 23:42:56 +01:00
|
|
|
<script type="text/html" data-template-name="leveldbase">
|
2013-11-10 18:01:19 +01:00
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-config-input-db"><i class="fa fa-briefcase"></i> Database</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<input type="text" id="node-config-input-db" placeholder="database path/name">
|
|
|
|
</div>
|
2020-02-17 23:42:56 +01:00
|
|
|
<div class="form-row">
|
|
|
|
<label for="node-config-input-encoding"><i class="fa fa-random"></i> Values are</label>
|
2021-03-12 14:17:23 +01:00
|
|
|
|
2020-02-17 23:42:56 +01:00
|
|
|
<select type="text" id="node-config-input-encoding">
|
|
|
|
<option value="utf8">text</option>
|
|
|
|
<option value="json">JSON</option>
|
|
|
|
<option value="binary">binary</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2013-10-30 21:38:23 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2013-11-10 18:01:19 +01:00
|
|
|
RED.nodes.registerType('leveldbase',{
|
|
|
|
category: 'config',
|
|
|
|
defaults: {
|
2020-02-17 23:42:56 +01:00
|
|
|
db: {value:"",required:true},
|
|
|
|
encoding: {value:"utf8"}
|
2013-11-10 18:01:19 +01:00
|
|
|
},
|
|
|
|
label: function() {
|
|
|
|
return this.db;
|
|
|
|
}
|
|
|
|
});
|
2013-10-30 21:38:23 +01:00
|
|
|
</script>
|
|
|
|
|
2020-02-17 23:42:56 +01:00
|
|
|
<script type="text/html" data-template-name="leveldb in">
|
2013-11-10 18:01:19 +01:00
|
|
|
<div class="form-row node-input-level">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-level"><i class="fa fa-briefcase"></i> Database</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<input type="text" id="node-input-level">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
2013-10-30 21:38:23 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2013-11-10 18:01:19 +01:00
|
|
|
RED.nodes.registerType('leveldb in',{
|
|
|
|
category: 'storage-input',
|
|
|
|
color:"#dbb84d",
|
|
|
|
defaults: {
|
|
|
|
level: {type:"leveldbase",required:true},
|
|
|
|
name: {value:""}
|
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:1,
|
|
|
|
icon: "leveldb.png",
|
|
|
|
label: function() {
|
|
|
|
var levelNode = RED.nodes.node(this.level);
|
|
|
|
return this.name||(levelNode?levelNode.label():"leveldb");
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
2013-10-30 21:38:23 +01:00
|
|
|
</script>
|
|
|
|
|
2020-02-17 23:42:56 +01:00
|
|
|
<script type="text/html" data-template-name="leveldb out">
|
2013-11-10 18:01:19 +01:00
|
|
|
<div class="form-row node-input-level">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-level"><i class="fa fa-briefcase"></i> Database</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<input type="text" id="node-input-level">
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-operation"><i class="fa fa-wrench"></i> Operation</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<select type="text" id="node-input-operation" style="display: inline-block; vertical-align: top;">
|
|
|
|
<option value="store">Store</option>
|
|
|
|
<option value="delete">Delete</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2013-11-10 18:01:19 +01:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
2013-10-30 21:38:23 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2013-11-10 18:01:19 +01:00
|
|
|
RED.nodes.registerType('leveldb out',{
|
|
|
|
category: 'storage-output',
|
|
|
|
color:"#dbb84d",
|
|
|
|
defaults: {
|
|
|
|
level: {type:"leveldbase",required:true},
|
|
|
|
operation: {value:"store"},
|
|
|
|
name: {value:""}
|
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:0,
|
|
|
|
icon: "leveldb.png",
|
|
|
|
align: "right",
|
|
|
|
label: function() {
|
|
|
|
var levelNode = RED.nodes.node(this.level);
|
|
|
|
return this.name||(levelNode?levelNode.label():"leveldb");
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
2013-10-30 21:38:23 +01:00
|
|
|
</script>
|