Proposed change node-red-node-ui-table

I am trying to get the CPU core data into a table, but it doesn't seem to be responding.
I think this is because I selected "replaceData" instead of "addRow". I think this needs to have a modified function such that if the row doesn't exist, that "replaceData" does the "addRow" function.

I have added the flow. I am trying to get the table working but it is just fighting me the whole way.

3/28/2021

I have modified the flow and it seems to stay for the first minute every 5 seconds, but then it just stops. I am getting something major wrong here but reading the documentation over and over, I'm missing something. I still think this node needs additional functionality. Like clear then add, or overlay.

[{"id":"2be04c82.d0af74","type":"inject","z":"9cf3a6d.1104258","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":"","topic":"","payload":"","payloadType":"date","x":110,"y":180,"wires":[["adb6f7be.abf3c","91195322.040808","7655202e.fc799"]]},{"id":"e1fa1ea7.173b1","type":"cpu","z":"9cf3a6d.1104258","name":"","msgCore":true,"msgOverall":true,"msgArray":true,"msgTemp":true,"x":550,"y":180,"wires":[["6d173ba6.bbcbbc"]]},{"id":"f382b9e8.b63bb","type":"ui_table","z":"9cf3a6d.1104258","group":"9cb4bc4d.96552","name":"","order":5,"width":18,"height":3,"columns":[{"field":"Name","title":"Name","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"Model","title":"Model","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"Speed","title":"Speed","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"Utilization","title":"Utilization","width":"","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":1210,"y":200,"wires":[]},{"id":"536bb20d.5ff6ac","type":"function","z":"9cf3a6d.1104258","name":"","func":"array = {\n    command: \"replaceData\",\n    arguments: [\n        {\n            \"Name\": msg.topic,\n            \"Model\": msg.model,\n            \"Speed\": msg.speed,\n            \"Utilization\": msg.payload\n            },\n        true\n    ],\n    returnPromise: false\n}\nmsg.payload = array;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":160,"wires":[["2f00dcbf.20db8c","48f6addf.a5f7e4","370719a5.4acc7e"]]},{"id":"6d173ba6.bbcbbc","type":"switch","z":"9cf3a6d.1104258","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"temperature","vt":"str"},{"t":"cont","v":"core_","vt":"str"},{"t":"eq","v":"overall","vt":"str"},{"t":"eq","v":"all_cores","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":750,"y":180,"wires":[[],["536bb20d.5ff6ac"],[],[]]},{"id":"adb6f7be.abf3c","type":"delay","z":"9cf3a6d.1104258","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"15","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":360,"y":180,"wires":[["e1fa1ea7.173b1"]]},{"id":"2f00dcbf.20db8c","type":"debug","z":"9cf3a6d.1104258","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1070,"y":260,"wires":[]},{"id":"48f6addf.a5f7e4","type":"change","z":"9cf3a6d.1104258","name":"","rules":[{"t":"change","p":"payload.command","pt":"msg","from":"replaceData","fromt":"str","to":"addRow","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":160,"wires":[["f382b9e8.b63bb","2f00dcbf.20db8c"]]},{"id":"370719a5.4acc7e","type":"delay","z":"9cf3a6d.1104258","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1060,"y":200,"wires":[["f382b9e8.b63bb"]]},{"id":"9cb4bc4d.96552","type":"ui_group","name":"System","tab":"ad4a1223.94ae8","order":2,"disp":true,"width":30,"collapse":false},{"id":"ad4a1223.94ae8","type":"ui_tab","z":"9cf3a6d.1104258","name":"Raspbery PI (Control Panel)","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.