Skip to content

Commit e8e19b6

Browse files
remove partiaFlag require cehck
1 parent c332ef9 commit e8e19b6

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

node-red-contrib-treeview/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-treeview",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Custom treeView strcture of data saved into cloudantDb for Dri-list application.",
55
"node-red": {
66
"nodes": {

node-red-contrib-treeview/treeView/treeView.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
database: { value:"", required:true },
77
username : { value:"", required:true },
88
password : { value:"", required:true },
9-
operation : { value:"", required: true},
10-
flagMode: {value: "", required: true},
9+
operation : { value:"", required: true}
1110
},
1211
inputs:1,
1312
outputs:1,

node-red-contrib-treeview/treeView/treeView.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,11 @@ module.exports = function(RED) {
5050
localMsg = {};
5151
localMsg.fn_name = record.fn_name;
5252
localMsg.payload = payload;
53-
//console.log(count);
54-
//console.log(localMsg);
5553
action_array.push(localMsg);
5654
count++;
5755
}
5856
}
59-
60-
61-
57+
6258
if(operation == "test"){
6359
// changeing true/false string to boolean value;
6460
partialFlag = JSON.parse(config.flagMode);
@@ -72,14 +68,11 @@ module.exports = function(RED) {
7268
});
7369
});
7470
}else if( operation == "prod"){
75-
//reset_db_new(msg, false, partialFlag, function(return_object1){
76-
//console.log('return_object1', return_object1);
77-
treeViewHelper.process_msg(action_array, function(return_object){
78-
console.log(JSON.stringify(return_object));
79-
msg.payload = return_object;
80-
node.send(msg);
81-
});
82-
//});
71+
treeViewHelper.process_msg(action_array, function(return_object){
72+
console.log(JSON.stringify(return_object));
73+
msg.payload = return_object;
74+
node.send(msg);
75+
});
8376
}else{
8477
msg.payload = "Un-specified operation for Tree view node.";
8578
node.send(msg);
@@ -88,6 +81,7 @@ module.exports = function(RED) {
8881

8982
function reset_db_new(msg, isReset, partialFlag, callback){
9083
var node_original = {}, nodes = [];
84+
partialFlag = partialFlag || true ;
9185

9286
if (partialFlag) {
9387
node_original = msg.node_original1;

0 commit comments

Comments
 (0)