hello, i want to create an alarm table but i can not found how to design it, also I want to display the date of the alarm but it displays the date in real time, as it appears twice, I don't know why
if anyone can help me I will be grateful
[{"id":"b2b27f11.74dbe","type":"function","z":"4aea35b2.b0688c","name":"","func":"const offset = 1; //CMT+0\nvar dh = new Date( new Date().getTime() + offset * 3600 * 1000);\nlet t = new Date(dh).toJSON().slice(0, 19).replace('T', ' ');\nlet keys = Object.keys(msg.payload);\nlet values = Object.values(msg.payload);\nlet arr = [];\n\nkeys.forEach((el, index) => {\n \n if (values[index]) { // if alarm true\n arr.push({\n title: keys[index],\n value: values[index],\n Time: t\n \n }) \n } // end of if\n \n})\n\n// sorting alphabetically // needs testing\n/*arr.sort(function(a, b) {\n var titleA = a.title.toUpperCase(); // ignore upper and lowercase\n var titleB = b.title.toUpperCase(); // ignore upper and lowercase\n if (titleA < titleB) {\n return -1;\n }\n if (titleA > titleB) {\n return 1;\n }\n\n // title must be equal\n return 0;\n});\n\n*/\nmsg.payload = arr;\n//msg.payload = [arr, Time];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":680,"wires":[["92ed6d5a.e101a8","c2988d9.3c7be7","c7a9d042.af62b","269ff2f5.36785e"]]},{"id":"c7a9d042.af62b","type":"ui_template","z":"4aea35b2.b0688c","group":"d8c473c2.474058","name":"Active Alarm","order":1,"width":0,"height":0,"format":"<style scoped>\n table {margin-bottom:180px}\n td {font-weight:800; padding-right:100px;}\n</style>\n\n<table id=\"table\" border=\"0.5\">\n<tr>\n<td>Title</td>\n<td>Status</td>\n<td>Time</td>\n</tr>\n<tr ng-repeat=\"alarm in msg.payload\">\n <td ng-if=\"alarm.value='true'\">{{alarm.title}}</td>\n <td ng-if=\"alarm.value='true'\">{{alarm.value}}</td>\n <td ng-if=\"alarm.value='true'\">{{alarm.Time}}</td>\n <td>{{alarm.title}}</td>\n <td>{{alarm.value}}</td>\n <td>{{alarm.Time}}</td>\n</tr>\n</table>\n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":1090,"y":680,"wires":[[]]},{"id":"d8c473c2.474058","type":"ui_group","name":"List","tab":"d463fbe2.68b3c8","order":2,"disp":true,"width":12,"collapse":false},{"id":"d463fbe2.68b3c8","type":"ui_tab","name":"Alarmes","icon":"report_problem","order":7,"disabled":false,"hidden":false}]