@gregoriusrippenstein/node-red-contrib-introspection 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,12 +60,22 @@ module.exports = function(RED) {
60
60
  "Authorization": "Bearer " + access_token
61
61
  }
62
62
  }).then( res => {
63
- node.status({fill:"green",shape:"dot",text:"Good"});
64
- setTimeout( function() { node.status({}) }, 450);
63
+ var bodySize = res.body.length;
64
+
65
65
  send( {
66
66
  ...msg,
67
67
  payload: res.body
68
68
  });
69
+
70
+ node.status({fill:"green",shape:"dot",text:"Good"});
71
+ setTimeout( function() {
72
+ node.status({
73
+ fill: "blue",
74
+ shape: "dot",
75
+ text: "Flow size: " + bodySize
76
+ })
77
+ }, 450);
78
+
69
79
  }).catch( err => {
70
80
  node.status({fill:"red",shape:"dot",text:"Failed"});
71
81
  node.error(err)
@@ -88,12 +98,21 @@ module.exports = function(RED) {
88
98
  {headers: {"Node-RED-API-Version": cfg.flowVersion}}
89
99
  ).then( res => {
90
100
  if ( res.statusCode == 200 ) {
101
+ var bodySize = res.body.length;
102
+
91
103
  send( {
92
104
  ...msg,
93
105
  payload: res.body
94
106
  });
107
+
95
108
  node.status({fill:"green",shape:"dot",text:"Good"});
96
- setTimeout( function() { node.status({}) }, 450);
109
+ setTimeout( function() {
110
+ node.status({
111
+ fill: "blue",
112
+ shape: "dot",
113
+ text: "Flow size: " + bodySize
114
+ })
115
+ }, 450);
97
116
  } else {
98
117
  node.error( res );
99
118
  node.status({fill:"red",shape:"dot",text:"Failed"});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gregoriusrippenstein/node-red-contrib-introspection",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "keywords": [
5
5
  "node-red"
6
6
  ],