mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	snap node - remove extraneous console logging
This commit is contained in:
		| @@ -1,9 +1,9 @@ | |||||||
| { | { | ||||||
|     "name"          : "node-red-node-snmp", |     "name"          : "node-red-node-snmp", | ||||||
|     "version"       : "0.0.7", |     "version"       : "0.0.8", | ||||||
|     "description"   : "A Node-RED node that looks for SNMP oids.", |     "description"   : "A Node-RED node that looks for SNMP oids.", | ||||||
|     "dependencies"  : { |     "dependencies"  : { | ||||||
|         "net-snmp"  : "1.1.13" |         "net-snmp"  : "^1.1.19" | ||||||
|     }, |     }, | ||||||
|     "repository" : { |     "repository" : { | ||||||
|         "type":"git", |         "type":"git", | ||||||
|   | |||||||
| @@ -76,7 +76,7 @@ module.exports = function(RED) { | |||||||
|  |  | ||||||
|         function responseCb(error, table) { |         function responseCb(error, table) { | ||||||
|             if (error) { |             if (error) { | ||||||
|                 console.error(error.toString()); |                 le.error(error.toString()); | ||||||
|             } else { |             } else { | ||||||
|                 var indexes = []; |                 var indexes = []; | ||||||
|                 for (var index in table) { |                 for (var index in table) { | ||||||
| @@ -93,10 +93,10 @@ module.exports = function(RED) { | |||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     columns.sort(sortInt); |                     columns.sort(sortInt); | ||||||
|                     console.log("row index = " + indexes[i]); |                     // console.log("row index = " + indexes[i]); | ||||||
|                     for (var j = 0; j < columns.length; j++) { |                     // for (var j = 0; j < columns.length; j++) { | ||||||
|                         console.log("  column " + columns[j] + " = " + table[indexes[i]][columns[j]]); |                     //     console.log("  column " + columns[j] + " = " + table[indexes[i]][columns[j]]); | ||||||
|                     } |                     // } | ||||||
|                 } |                 } | ||||||
|                 msg.payload = table; |                 msg.payload = table; | ||||||
|                 node.send(msg); |                 node.send(msg); | ||||||
| @@ -146,7 +146,7 @@ module.exports = function(RED) { | |||||||
|                     node.error(snmp.varbindError(varbinds[i])); |                     node.error(snmp.varbindError(varbinds[i])); | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|                     console.log(varbinds[i].oid + "|" + varbinds[i].value); |                     //console.log(varbinds[i].oid + "|" + varbinds[i].value); | ||||||
|                     response.add({oid: varbinds[i].oid, value: varbinds[i].value}); |                     response.add({oid: varbinds[i].oid, value: varbinds[i].value}); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
| @@ -195,7 +195,7 @@ module.exports = function(RED) { | |||||||
|                     node.error(snmp.varbindError(varbinds[i])); |                     node.error(snmp.varbindError(varbinds[i])); | ||||||
|                 } |                 } | ||||||
|                 else { |                 else { | ||||||
|                     console.log(varbinds[i].oid + "|" + varbinds[i].value); |                     //console.log(varbinds[i].oid + "|" + varbinds[i].value); | ||||||
|                     response.add({oid: varbinds[i].oid, value: varbinds[i].value}); |                     response.add({oid: varbinds[i].oid, value: varbinds[i].value}); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user