-
Notifications
You must be signed in to change notification settings - Fork 1
/
flows.json
1 lines (1 loc) · 37.6 KB
/
flows.json
1
[{"id":"4c9db140.6e2bc8","type":"tab","label":"ThemeJournalistDashboard","disabled":false,"info":""},{"id":"a07555e0.71565","type":"http in","z":"4c9db140.6e2bc8","name":"","url":"/ui","method":"get","upload":false,"swaggerDoc":"","x":110,"y":840,"wires":[["4eaf78b9.608b7"]]},{"id":"4eaf78b9.608b7","type":"ui_form","z":"4c9db140.6e2bc8","name":"","label":"","group":"be581179.c0fcf","order":1,"width":"5","height":"5","options":[{"label":"Theme Input","value":"ThemeInp","type":"text","required":true,"rows":null}],"formValue":{"ThemeInp":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","x":290,"y":840,"wires":[["7caf4dbf.8eddcc","fd040cda.e598f","66fcb55b.6acce4","2eb8ae3a.75bab2"]]},{"id":"7caf4dbf.8eddcc","type":"function","z":"4c9db140.6e2bc8","name":"","func":"var url = \"https://heroku-article-production.herokuapp.com/processTheme/\";\nmsg.payload = url+msg.payload.ThemeInp\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":140,"y":900,"wires":[["fefb7336.fdc9c8"]]},{"id":"fefb7336.fdc9c8","type":"http request","z":"4c9db140.6e2bc8","name":"","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://heroku-article-production.herokuapp.com/processTheme/{{post}}","tls":"","persist":false,"proxy":"","authType":"","x":410,"y":920,"wires":[["d47ed797.d77f"]]},{"id":"d47ed797.d77f","type":"json","z":"4c9db140.6e2bc8","name":"","property":"payload","action":"","pretty":true,"x":110,"y":980,"wires":[["3a30da19.2aea5e","41716e7c.632b2","a38965bb.23c2e"]]},{"id":"3a30da19.2aea5e","type":"ui_template","z":"4c9db140.6e2bc8","d":true,"group":"ae7d536.8a200b","name":"","order":2,"width":"14","height":"10","format":"<html>\n <body>\n <h1>Journalist A</h1>\n <!--<h2>US President Elections</h2>-->\n <div>\n \n <form action=\"/ui\" method=\"POST\"> \n<table>\n<tr class=\"summaryStyle\" ng-repeat='value in msg.payload'>\n<td><input id=\"{{value.title}}\" type=\"checkbox\" name = \"theme_title\" class='checkboxstyle' value=\"{{value.title}}\" ng-model = \"value.checked\" ng-click=\"openTitle(value)\" />{{value.title}}\n </td>\n <tr>\n</tr>\n</table>\n<br/>\n<table>\n <tr><input type=\"submit\" value=\"Add\" ng-click=\"buttonclickfunc()\" /></tr>\n \n </table>\n </form>\n</div>\n </body>\n</html>\n\n<script>\nvar details = [];\n\n(function(){\n // window.headlines ={'summarydetails':''};\n\n scope.openTitle = function(choice){\n if (choice.checked == null || choice.checked == false) {\n details.push(choice.title);\n\n}\nif (choice.checked == true){\n for(i=0;i<details.length;i++)\n {\n if(choice.title == details[i]) \n {\n details.splice(i, 1)\n }\n }\n} \n\n }\n scope.buttonclickfunc = function(){\n console.log(details)\n \n }\n \n})();\n\n\n</script>\n\n<style>\n.checkboxstyle{\n color:red;\n}\n</style>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":640,"y":960,"wires":[["66fcb55b.6acce4","32712762.859788"]]},{"id":"af9e0f3a.9718f","type":"debug","z":"4c9db140.6e2bc8","name":"If no response","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1240,"y":1040,"wires":[]},{"id":"fd040cda.e598f","type":"debug","z":"4c9db140.6e2bc8","d":true,"name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":820,"wires":[]},{"id":"32712762.859788","type":"switch","z":"4c9db140.6e2bc8","d":true,"name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":1040,"wires":[["af9e0f3a.9718f"],["88a1bae8.4b052"]]},{"id":"88a1bae8.4b052","type":"debug","z":"4c9db140.6e2bc8","name":"DB In","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.[1]","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":1100,"wires":[]},{"id":"def2c7ec.af2e7","type":"mongodb3 in","z":"4c9db140.6e2bc8","d":true,"service":"_ext_","configNode":"8054866b.f39028","name":"","collection":"JournalistTemplate","operation":"insert","x":1150,"y":1180,"wires":[["8c6f4e64.a3a95"]]},{"id":"8c6f4e64.a3a95","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1250,"y":1220,"wires":[]},{"id":"66fcb55b.6acce4","type":"http response","z":"4c9db140.6e2bc8","d":true,"name":"","statusCode":"","headers":{},"x":770,"y":880,"wires":[]},{"id":"ddf21488.25f65","type":"http in","z":"4c9db140.6e2bc8","d":true,"name":"","url":"/","method":"post","upload":false,"swaggerDoc":"","x":650,"y":1040,"wires":[["3a30da19.2aea5e"]]},{"id":"f050f40d.b3a22","type":"ui_dropdown","z":"4c9db140.6e2bc8","name":"","label":"","tooltip":"TOPIC ID","place":"Select Topic ID","group":"1328b415.e37d7c","order":0,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"","value":1,"type":"num"}],"payload":"","topic":"","x":100,"y":1260,"wires":[["293a7b87.b89844"]]},{"id":"41716e7c.632b2","type":"function","z":"4c9db140.6e2bc8","name":"","func":"var value;\nvar value1;\n// var topics = new Array();\nvar dict = {};\nfor (value in msg.payload) {\n \n \n dict[value] = value;\n}\n\nmsg.payload = [dict];\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":100,"y":1080,"wires":[["1cfa14d3.1211c3"]]},{"id":"1cfa14d3.1211c3","type":"change","z":"4c9db140.6e2bc8","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":120,"y":1200,"wires":[["f050f40d.b3a22"]]},{"id":"293a7b87.b89844","type":"change","z":"4c9db140.6e2bc8","name":"topic_id","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload1","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":160,"y":1360,"wires":[["a38965bb.23c2e","978dbb46.aa064"]]},{"id":"978dbb46.aa064","type":"debug","z":"4c9db140.6e2bc8","d":true,"name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":330,"y":1440,"wires":[]},{"id":"a38965bb.23c2e","type":"function","z":"4c9db140.6e2bc8","name":"","func":"\n// var theme_json = msg.payload\nif (context.get('theme_json') == undefined){\n \n context.set('theme_json',msg.payload);\n \n \n \n}else{\n\n var theme_json=context.get('theme_json');\n msg.payload = theme_json[msg.payload1]\n return msg; \n\n}\n\n\n// var count=context.get('count') || 0;\n// count +=1;\n// msg.payload=\"F1 \"+msg.payload+\" \"+count;\n// context.set('count',count);\n// return msg;\n// //\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":1060,"wires":[["978dbb46.aa064","68fba0c9.244f9","65663c88.4cba2c"]]},{"id":"68fba0c9.244f9","type":"ui_template","z":"4c9db140.6e2bc8","group":"ae7d536.8a200b","name":"","order":2,"width":"11","height":"12","format":"<html>\n <body>\n \n <!--<h2>US President Elections</h2>-->\n <div>\n \n <form action=\"/ui\" method=\"POST\"> \n \n <h1>Primary Snippets Title</h1>\n<table>\n<tr class=\"summaryStyle\" ng-repeat='value in msg.payload[\"primary_snippets\"]'>\n<td><input id=\"{{value.title}}\" type=\"checkbox\" name = \"primary_snippets\" class='checkboxstyle' value=\"{{value.title}}\" ng-model = \"value.checked\" ng-click=\"openTitle(value)\" />{{value.title}}\n <br/>\n <textarea rows=\"4\" cols=\"75\" readonly> {{value.snippet_description}} </textarea>\n </td>\n <tr>\n</tr>\n</table>\n<br/>\n<h1>Secondary Snippets Title</h1>\n<table>\n<tr class=\"summaryStyle\" ng-repeat='value in msg.payload[\"secondary_snippets\"]'>\n<td><input id=\"{{value.title}}\" type=\"checkbox\" name = \"secondary_snippets\" class='checkboxstyle' value=\"{{value.title}}\" ng-model = \"value.checked\" ng-click=\"openTitle(value)\" />{{value.title}}\n <br/>\n <textarea rows=\"4\" cols=\"75\" readonly> {{value.snippet_description}} </textarea>\n </td>\n <tr>\n</tr>\n</table>\n<br/>\n<h1>Theme Summary</h1>\n <textarea rows=\"4\" cols=\"75\" name =\"theme_summary\" readonly> {{msg.payload[\"summary\"]}} </textarea>\n\n<br/>\n<table>\n <tr><input type=\"submit\" value=\"Add\" ng-click=\"buttonclickfunc()\" /></tr>\n \n </table>\n </form>\n</div>\n </body>\n</html>\n\n<script>\nvar details = [];\n\n(function(){\n // window.headlines ={'summarydetails':''};\n\n scope.openTitle = function(choice){\n if (choice.checked == null || choice.checked == false) {\n details.push(choice.title);\n\n}\nif (choice.checked == true){\n for(i=0;i<details.length;i++)\n {\n if(choice.title == details[i]) \n {\n details.splice(i, 1)\n }\n }\n} \n\n }\n scope.buttonclickfunc = function(){\n console.log(details)\n \n }\n \n})();\n\n\n</script>\n\n<style>\n.checkboxstyle{\n color:red;\n}\n</style>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":600,"y":1180,"wires":[["83037c87.8b1a4","a653ac5f.d5a788","880b5a06.7ed9f8"]]},{"id":"83037c87.8b1a4","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":1360,"wires":[]},{"id":"65663c88.4cba2c","type":"debug","z":"4c9db140.6e2bc8","d":true,"name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":1120,"wires":[]},{"id":"2f662598.016942","type":"http in","z":"4c9db140.6e2bc8","name":"","url":"/ui","method":"post","upload":false,"swaggerDoc":"","x":440,"y":1280,"wires":[["68fba0c9.244f9","880b5a06.7ed9f8"]]},{"id":"a653ac5f.d5a788","type":"http response","z":"4c9db140.6e2bc8","name":"","statusCode":"","headers":{},"x":890,"y":1240,"wires":[]},{"id":"2eb8ae3a.75bab2","type":"http response","z":"4c9db140.6e2bc8","name":"","statusCode":"","headers":{},"x":440,"y":820,"wires":[]},{"id":"880b5a06.7ed9f8","type":"template","z":"4c9db140.6e2bc8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<!DOCTYPE html>\n<html>\n<body>\n<form action=\"/uii\" method=\"POST\"> \n<h1>The onclick Event </h1>\n\n\n<p>The onclick event is used to trigger a function when an element is clicked on.</p>\n\n<p>Click the button to trigger a function that will output \"Hello World\" in a p element with id=\"demo\".</p>\n\n<button onclick=\"myFunction()\">Click me</button>\n\n<p id=\"demo\"></p>\n\n<script>\nfunction myFunction() {\n document.getElementById(\"demo\").innerHTML = \"Hello World\";\n}\n</script>\n\n</body>\n<head>\n <style>\n h1 {\n border-top: 50px solid red;\n}\n </style>\n </head>\n</html>","output":"str","x":680,"y":1320,"wires":[["83037c87.8b1a4","83b34574.22e04","7cffa7a6.69ce6","f3fc29e1.6fed","bcbb994e.deb7b"]]},{"id":"83b34574.22e04","type":"template","z":"4c9db140.6e2bc8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<!DOCTYPE html>\n<html>\n<body>\n<form action=\"/ui\" method=\"GET\"> \n<h1>The onclick Event2222</h1>\n\n<p>The onclick event is used to trigger a function when an element is clicked on.</p>\n\n<p>Click the button to trigger a function that will output \"Hello World\" in a p element with id=\"demo\".</p>\n\n<button onclick=\"myFunction()\">Click me222</button>\n\n<p id=\"demo\"></p>\n\n<script>\nfunction myFunction() {\n document.getElementById(\"demo\").innerHTML = \"Hello World\";\n}\n</script>\n\n</body>\n</html>","output":"str","x":690,"y":1520,"wires":[["83037c87.8b1a4","585718aa.bdf148"]]},{"id":"7cffa7a6.69ce6","type":"http response","z":"4c9db140.6e2bc8","name":"","statusCode":"","headers":{},"x":890,"y":1460,"wires":[]},{"id":"585718aa.bdf148","type":"http response","z":"4c9db140.6e2bc8","name":"","statusCode":"","headers":{},"x":890,"y":1580,"wires":[]},{"id":"a77e588.772ad28","type":"http in","z":"4c9db140.6e2bc8","name":"","url":"/ui","method":"get","upload":false,"swaggerDoc":"","x":570,"y":1580,"wires":[["83b34574.22e04"]]},{"id":"a950455b.66dd6","type":"http in","z":"4c9db140.6e2bc8","name":"","url":"/uii","method":"post","upload":false,"swaggerDoc":"","x":520,"y":1440,"wires":[["880b5a06.7ed9f8"]]},{"id":"f3fc29e1.6fed","type":"ui_button","z":"4c9db140.6e2bc8","name":"","group":"7c848862.a3f978","order":0,"width":0,"height":0,"passthru":false,"label":"Accept","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":450,"y":1520,"wires":[[]]},{"id":"bcbb994e.deb7b","type":"ui_button","z":"4c9db140.6e2bc8","name":"","group":"269b86f.2136cfa","order":0,"width":0,"height":0,"passthru":false,"label":"Reject","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":430,"y":1560,"wires":[[]]},{"id":"2234f190.459dbe","type":"http in","z":"4c9db140.6e2bc8","name":"","url":"/ui","method":"get","upload":false,"swaggerDoc":"","x":90,"y":140,"wires":[["c468384b.ed42f","3540c164.77a976"]]},{"id":"df2bc1b1.e55a","type":"http response","z":"4c9db140.6e2bc8","name":"","statusCode":"","headers":{},"x":450,"y":140,"wires":[]},{"id":"c468384b.ed42f","type":"ui_form","z":"4c9db140.6e2bc8","name":"","label":"","group":"f6ca74d7.e5ac68","order":1,"width":0,"height":0,"options":[{"label":"Theme Input","value":"ThemeInp","type":"text","required":true,"rows":null}],"formValue":{"ThemeInp":""},"payload":"","submit":"submit","cancel":"cancel","topic":"msg.topic","x":250,"y":140,"wires":[["df2bc1b1.e55a","9674ff85.753d88","887c5939.653388"]]},{"id":"9674ff85.753d88","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":170,"y":240,"wires":[]},{"id":"887c5939.653388","type":"mongodb3 in","z":"4c9db140.6e2bc8","service":"_ext_","configNode":"65e5b6c8.c9cca8","name":"","collection":"JournalistTemplate","operation":"insert","x":470,"y":240,"wires":[["1178ae6a.0c90ca","284c824d.eeb68e"]]},{"id":"1178ae6a.0c90ca","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":240,"wires":[]},{"id":"284c824d.eeb68e","type":"function","z":"4c9db140.6e2bc8","name":"Request","func":"msg.payload = {};\nmsg.collection = 'JournalistTemplate';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":420,"wires":[["50d5023f.3a2bcc"]]},{"id":"21d2ff4a.35a978","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":870,"y":640,"wires":[]},{"id":"df07dbcf.ec3068","type":"ui_dropdown","z":"4c9db140.6e2bc8","d":true,"name":"","label":"Editor","tooltip":"","place":"","group":"4947a073.c456d8","order":0,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Assign","value":"Assign","type":"str"},{"label":"Review","value":"Review","type":"str"},{"label":"Send","value":"Send","type":"str"}],"payload":"","topic":"","x":110,"y":620,"wires":[["189afd79.fbd4e3"]]},{"id":"189afd79.fbd4e3","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":290,"y":620,"wires":[]},{"id":"50d5023f.3a2bcc","type":"mongodb-var in","z":"4c9db140.6e2bc8","service":"_ext_","configNode":"64f611d1.7a2608","name":"MongoDB","collection":"JournalistTemplate","operation":"find.toArray","x":451,"y":460,"wires":[["fa423672.0ac58","d31e8b72.79e08"]]},{"id":"fa423672.0ac58","type":"ui_template","z":"4c9db140.6e2bc8","d":true,"group":"d0df9aa4.a00c6","name":"Editor","order":2,"width":"0","height":"0","format":"<html>\n <body>\n <h1>Select Theme to Assign</h1>\n <!--<h2>US President Elections</h2>-->\n <div>\n \n <form action = \"/ui\" method=\"POST\"> \n \n <select name=\"theme\">\n<option value=\"\">Select Theme</option>\n<option ng-repeat='value in msg.payload' value=\"{{value.ThemeInp}}\">{{value.ThemeInp}}</option>\n</select>\n <br/>\n <select class=\"form-control form-control-sm\" name=\"journalist_dd\" id=\"journalist_dd\">\n <option value=\"All\">Select Journalist</option>\n <option value=\"a\">Journalist A</option>\n <option value=\"b\">Journalist B</option>\n <option value=\"c\">Journalist C</option>\n </select><br/>\n<!--<table>-->\n<!--<tr class=\"summaryStyle\" ng-repeat='value in msg.payload'>-->\n<!--<td><input id=\"{{value.Theme Inp}}\" type=\"checkbox\" name = \"theme_title\" class='checkboxstyle' value=\"{{value.Theme Inp}}\" ng-model = \"value.checked\" ng-click=\"openTitle(value)\" />{{value.Theme Inp}}-->\n<!-- </td>-->\n<!-- <tr>-->\n<!--</tr>-->\n<!--</table>-->\n<br/>\n<input type=\"submit\" value=\"Submit\" />\n\n </form>\n</div>\n </body>\n</html>\n\n<script>\nvar details = [];\n\n(function(){\n // window.headlines ={'summarydetails':''};\n\n scope.openTitle = function(choice){\n if (choice.checked == null || choice.checked == false) {\n details.push(choice.title);\n\n}\nif (choice.checked == true){\n for(i=0;i<details.length;i++)\n {\n if(choice.title == details[i]) \n {\n details.splice(i, 1)\n }\n }\n} \n\n }\n scope.buttonclickfunc = function(){\n console.log(details)\n \n }\n \n})();\n\n\n</script>\n\n<style>\n.checkboxstyle{\n color:red;\n}\n</style>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":671,"y":500,"wires":[["73e14ed3.eb44f8","21d2ff4a.35a978","4eaf78b9.608b7"]]},{"id":"c8c94013.019a48","type":"http in","z":"4c9db140.6e2bc8","name":"","url":"/ui","method":"post","upload":false,"swaggerDoc":"","x":300,"y":520,"wires":[["fa423672.0ac58","d31e8b72.79e08"]]},{"id":"73e14ed3.eb44f8","type":"http response","z":"4c9db140.6e2bc8","name":"","statusCode":"","headers":{},"x":741,"y":440,"wires":[]},{"id":"d31e8b72.79e08","type":"ui_template","z":"4c9db140.6e2bc8","group":"d0df9aa4.a00c6","name":"Editor","order":2,"width":"0","height":"0","format":"<html>\n <body>\n <h1>Select Theme to Assign</h1>\n <!--<h2>US President Elections</h2>-->\n <div>\n \n <form action = \"/ui\" method=\"POST\"> \n \n <select name=\"theme\">\n<option value=\"\">Select Theme</option>\n<option ng-repeat='value in msg.payload' value=\"{{value.ThemeInp}}\">{{value.ThemeInp}}</option>\n</select>\n <br/>\n <select class=\"form-control form-control-sm\" name=\"journalist_dd\" id=\"journalist_dd\">\n <option value=\"All\">Select Journalist</option>\n <option value=\"AT\">Awanish Tiwari</option>\n <option value=\"DL\">Divya L</option>\n <option value=\"RG\">Rameshwar Gupta</option>\n <option value=\"RL\">Rohit L</option>\n </select>\n <br/>\n <select class=\"form-control form-control-sm\" name=\"task_dd\" id=\"task_dd\">\n <option value=\"All\">Select Task</option>\n <option value=\"AssignState1\">Assign article</option>\n <!-- <option value=\"IdleState1\">IDLE</option>-->\n <option value=\"ReviewState1\">Review</option>\n <option value=\"IdleState2\">IDLE</option><br/>\n<!--<table>-->\n<!--<tr class=\"summaryStyle\" ng-repeat='value in msg.payload'>-->\n<!--<td><input id=\"{{value.Theme Inp}}\" type=\"checkbox\" name = \"theme_title\" class='checkboxstyle' value=\"{{value.Theme Inp}}\" ng-model = \"value.checked\" ng-click=\"openTitle(value)\" />{{value.Theme Inp}}-->\n<!-- </td>-->\n<!-- <tr>-->\n<!--</tr>-->\n<!--</table>-->\n\n<input type=\"submit\" value=\"Submit\" /><br/>\n\n </form>\n</div>\n </body>\n</html>\n\n<script>\nvar details = [];\n\n(function(){\n // window.headlines ={'summarydetails':''};\n\n scope.openTitle = function(choice){\n if (choice.checked == null || choice.checked == false) {\n details.push(choice.title);\n\n}\nif (choice.checked == true){\n for(i=0;i<details.length;i++)\n {\n if(choice.title == details[i]) \n {\n details.splice(i, 1)\n }\n }\n} \n\n }\n scope.buttonclickfunc = function(){\n console.log(details)\n \n }\n \n})();\n\n\n</script>\n\n<style>\n.checkboxstyle{\n color:red;\n}\n</style>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":590,"y":560,"wires":[["73e14ed3.eb44f8","21d2ff4a.35a978","4eaf78b9.608b7","c9a4d685.e11b28","49b87219.5c3174"]]},{"id":"c9a4d685.e11b28","type":"switch","z":"4c9db140.6e2bc8","name":"Notiffication","property":"payload.journalist_dd","propertyType":"msg","rules":[{"t":"eq","v":"AT","vt":"str"},{"t":"eq","v":"DL","vt":"str"},{"t":"eq","v":"RG","vt":"str"},{"t":"eq","v":"RL","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1010,"y":440,"wires":[["f7589e38.740f98"],["b88f050c.602d98"],["c952b97d.5d549"],["9320be23.fe4898"]]},{"id":"f7589e38.740f98","type":"template","z":"4c9db140.6e2bc8","name":"MS Teams - AT","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"@type\": \"MessageCard\",\n \"@context\": \"http://schema.org/extensions\",\n \"themeColor\": \"0076D7\",\n \"summary\": \"Hello Awanish you have been assigned a new task\",\n \"sections\": [{\n \"activityTitle\": \"![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)BBC NEWS - Editor assigned a new task\",\n \"activitySubtitle\": \"Hello Awanish you have been assigned a new task - Check the email notification awatiwari@gmail.com\",\n \"activityImage\": \"https://teamsnodesample.azurewebsites.net/static/img/image5.png\",\n \"facts\": [{\n \"name\": \"AWANISH TIWARI\",\n \"value\": \"Journalist ID:1\"\n }, {\n \"name\": \"Theme\",\n \"value\": \"Covid 19\"\n }, {\n \"name\": \"Status\",\n \"value\": \"Active\"\n }],\n \"markdown\": true\n }],\n \"potentialAction\": [{\n \"@type\": \"ActionCard\",\n \"name\": \"Add a comment\",\n \"inputs\": [{\n \"@type\": \"TextInput\",\n \"id\": \"comment\",\n \"isMultiline\": false,\n \"title\": \"Add a comment here for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Add comment\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Set due date\",\n \"inputs\": [{\n \"@type\": \"DateInput\",\n \"id\": \"dueDate\",\n \"title\": \"Enter a due date for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Change status\",\n \"inputs\": [{\n \"@type\": \"MultichoiceInput\",\n \"id\": \"list\",\n \"title\": \"Select a status\",\n \"isMultiSelect\": \"false\",\n \"choices\": [{\n \"display\": \"In Progress\",\n \"value\": \"1\"\n }, {\n \"display\": \"Review Article\",\n \"value\": \"2\"\n }, {\n \"display\": \"Closed\",\n \"value\": \"3\"\n }]\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n\n \n \n }]\n}","output":"str","x":1320,"y":260,"wires":[["f71b2b0c.4cb2"]]},{"id":"9320be23.fe4898","type":"template","z":"4c9db140.6e2bc8","name":"MS Team - RL","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"@type\": \"MessageCard\",\n \"@context\": \"http://schema.org/extensions\",\n \"themeColor\": \"0076D7\",\n \"summary\": \"Hello Rohit you have been assigned a new task\",\n \"sections\": [{\n \"activityTitle\": \"![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)BBC NEWS - Editor assigned a new task\",\n \"activitySubtitle\": \"Hello Rohith you have been assigned a new task -Check the email notification sent to rohitlnarayan@gmail.com\",\n \"activityImage\": \"https://teamsnodesample.azurewebsites.net/static/img/image5.png\",\n \"facts\": [{\n \"name\": \"ROHITH LAKS\",\n \"value\": \"Journalist ID:2\"\n \n }, {\n \"name\": \"Theme\",\n \"value\": \"US - Election\"\n }, {\n \"name\": \"Status\",\n \"value\": \"Active\"\n }],\n \"markdown\": true\n }],\n \"potentialAction\": [{\n \"@type\": \"ActionCard\",\n \"name\": \"Add a comment\",\n \"inputs\": [{\n \"@type\": \"TextInput\",\n \"id\": \"comment\",\n \"isMultiline\": false,\n \"title\": \"Add a comment here for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Add comment\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Set due date\",\n \"inputs\": [{\n \"@type\": \"DateInput\",\n \"id\": \"dueDate\",\n \"title\": \"Enter a due date for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Change status\",\n \"inputs\": [{\n \"@type\": \"MultichoiceInput\",\n \"id\": \"list\",\n \"title\": \"Select a status\",\n \"isMultiSelect\": \"false\",\n \"choices\": [{\n \"display\": \"In Progress\",\n \"value\": \"1\"\n }, {\n \"display\": \"Review Article\",\n \"value\": \"2\"\n }, {\n \"display\": \"Closed\",\n \"value\": \"3\"\n }]\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n\n \n \n }]\n}","output":"str","x":1280,"y":420,"wires":[["87e0f221.a4d4"]]},{"id":"b88f050c.602d98","type":"template","z":"4c9db140.6e2bc8","name":"MS Team - DL","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"@type\": \"MessageCard\",\n \"@context\": \"http://schema.org/extensions\",\n \"themeColor\": \"0076D7\",\n \"summary\": \"Hello Divya you have been assigned a new task\",\n \"sections\": [{\n \"activityTitle\": \"![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)BBC NEWS - Editor assigned a new task\",\n \"activitySubtitle\": \"Hello Divya you have been assigned a new task -Check the email notification sent to divyareddy8596@gmail.com\",\n \"activityImage\": \"https://teamsnodesample.azurewebsites.net/static/img/image5.png\",\n \"facts\": [{\n \"name\": \"DIVYA LAKSHMINARAYANA\",\n \"value\": \"Journalist ID: 3\"\n \n }, {\n \"name\": \"Theme\",\n \"value\": \"XYZ\"\n }, {\n \"name\": \"Status\",\n \"value\": \"Active\"\n }],\n \"markdown\": true\n }],\n \"potentialAction\": [{\n \"@type\": \"ActionCard\",\n \"name\": \"Add a comment\",\n \"inputs\": [{\n \"@type\": \"TextInput\",\n \"id\": \"comment\",\n \"isMultiline\": false,\n \"title\": \"Add a comment here for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Add comment\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Set due date\",\n \"inputs\": [{\n \"@type\": \"DateInput\",\n \"id\": \"dueDate\",\n \"title\": \"Enter a due date for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Change status\",\n \"inputs\": [{\n \"@type\": \"MultichoiceInput\",\n \"id\": \"list\",\n \"title\": \"Select a status\",\n \"isMultiSelect\": \"false\",\n \"choices\": [{\n \"display\": \"In Progress\",\n \"value\": \"1\"\n }, {\n \"display\": \"Review Article\",\n \"value\": \"2\"\n }, {\n \"display\": \"Closed\",\n \"value\": \"3\"\n }]\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n\n \n \n }]\n}","output":"str","x":1300,"y":320,"wires":[["278af30d.a30c2c"]]},{"id":"c952b97d.5d549","type":"template","z":"4c9db140.6e2bc8","name":"MS Team - RG","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"@type\": \"MessageCard\",\n \"@context\": \"http://schema.org/extensions\",\n \"themeColor\": \"0076D7\",\n \"summary\": \"Hello Rameshwar you have been assigned a new task\",\n \"sections\": [{\n \"activityTitle\": \"![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)BBC NEWS - Editor assigned a new task\",\n \"activitySubtitle\": \"Hello Rameshwar you have been assigned a new task -Check the email notification\",\n \"activityImage\": \"https://teamsnodesample.azurewebsites.net/static/img/image5.png\",\n \"facts\": [{\n \"name\": \"RAMESHWAR GUPTA\",\n \"value\": \"Journalist ID : 4\"\n \n }, {\n \"name\": \"Theme\",\n \"value\": \"ABCD\"\n }, {\n \"name\": \"Status\",\n \"value\": \"Active\"\n }],\n \"markdown\": true\n }],\n \"potentialAction\": [{\n \"@type\": \"ActionCard\",\n \"name\": \"Add a comment\",\n \"inputs\": [{\n \"@type\": \"TextInput\",\n \"id\": \"comment\",\n \"isMultiline\": false,\n \"title\": \"Add a comment here for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Add comment\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Set due date\",\n \"inputs\": [{\n \"@type\": \"DateInput\",\n \"id\": \"dueDate\",\n \"title\": \"Enter a due date for this task\"\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n }, {\n \"@type\": \"ActionCard\",\n \"name\": \"Change status\",\n \"inputs\": [{\n \"@type\": \"MultichoiceInput\",\n \"id\": \"list\",\n \"title\": \"Select a status\",\n \"isMultiSelect\": \"false\",\n \"choices\": [{\n \"display\": \"In Progress\",\n \"value\": \"1\"\n }, {\n \"display\": \"Review Article\",\n \"value\": \"2\"\n }, {\n \"display\": \"Closed\",\n \"value\": \"3\"\n }]\n }],\n \"actions\": [{\n \"@type\": \"HttpPOST\",\n \"name\": \"Save\",\n \"target\": \"http://...\"\n }]\n\n \n \n }]\n}","output":"str","x":1300,"y":380,"wires":[["aab5a146.651c38"]]},{"id":"f71b2b0c.4cb2","type":"http request","z":"4c9db140.6e2bc8","name":"MS Teams - AT","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://outlook.office.com/webhook/0802001e-f4f6-46c2-9754-c99bbba30c90@93f33571-550f-43cf-b09f-cd331338d086/IncomingWebhook/765599c9c30041a7b0bcc3c3694208b8/f7181179-23a9-49a2-8a79-f1a2ba085007","tls":"","persist":false,"proxy":"","authType":"","x":1540,"y":260,"wires":[[]]},{"id":"87e0f221.a4d4","type":"http request","z":"4c9db140.6e2bc8","name":"MS Team - RL","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://outlook.office.com/webhook/0802001e-f4f6-46c2-9754-c99bbba30c90@93f33571-550f-43cf-b09f-cd331338d086/IncomingWebhook/765599c9c30041a7b0bcc3c3694208b8/f7181179-23a9-49a2-8a79-f1a2ba085007","tls":"","persist":false,"proxy":"","authType":"","x":1500,"y":420,"wires":[[]]},{"id":"278af30d.a30c2c","type":"http request","z":"4c9db140.6e2bc8","name":"MS Team - DL","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://outlook.office.com/webhook/0802001e-f4f6-46c2-9754-c99bbba30c90@93f33571-550f-43cf-b09f-cd331338d086/IncomingWebhook/765599c9c30041a7b0bcc3c3694208b8/f7181179-23a9-49a2-8a79-f1a2ba085007","tls":"","persist":false,"proxy":"","authType":"","x":1520,"y":320,"wires":[[]]},{"id":"aab5a146.651c38","type":"http request","z":"4c9db140.6e2bc8","name":"MS Team - RG","method":"POST","ret":"txt","paytoqs":"ignore","url":"https://outlook.office.com/webhook/0802001e-f4f6-46c2-9754-c99bbba30c90@93f33571-550f-43cf-b09f-cd331338d086/IncomingWebhook/765599c9c30041a7b0bcc3c3694208b8/f7181179-23a9-49a2-8a79-f1a2ba085007","tls":"","persist":false,"proxy":"","authType":"","x":1500,"y":380,"wires":[[]]},{"id":"49b87219.5c3174","type":"debug","z":"4c9db140.6e2bc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":900,"y":780,"wires":[]},{"id":"1f73351.6109f4b","type":"comment","z":"4c9db140.6e2bc8","name":"Theme insertion to MongoDB","info":"Theme need to be inserted and gets stored in MongoDB","x":140,"y":200,"wires":[]},{"id":"d53070a0.536238","type":"comment","z":"4c9db140.6e2bc8","name":"Theme extraction from DB","info":"","x":130,"y":460,"wires":[]},{"id":"7d48eb94.61902c","type":"mongodb3 in","z":"4c9db140.6e2bc8","service":"_ext_","configNode":"8054866b.f39028","name":"","collection":"JournalistTemplate","operation":"collection","x":460,"y":40,"wires":[["df2bc1b1.e55a"]]},{"id":"3540c164.77a976","type":"ui_button","z":"4c9db140.6e2bc8","name":"","group":"f6ca74d7.e5ac68","order":1,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":230,"y":80,"wires":[["7d48eb94.61902c"]]},{"id":"aa2af4f3.c8226","type":"comment","z":"4c9db140.6e2bc8","name":"Teams Notification","info":"","x":1010,"y":380,"wires":[]},{"id":"def430b6.1f2e28","type":"comment","z":"4c9db140.6e2bc8","name":"Clear MongoDB collection","info":"","x":130,"y":40,"wires":[]},{"id":"be581179.c0fcf","type":"ui_group","z":"4c9db140.6e2bc8","name":"Theme search for title display","tab":"cf04cf62.c2d49","order":1,"disp":true,"width":"6","collapse":true},{"id":"ae7d536.8a200b","type":"ui_group","z":"4c9db140.6e2bc8","name":"Title and Summary Display of the selected Topic ID","tab":"cf04cf62.c2d49","order":1,"disp":true,"width":"15","collapse":true},{"id":"8054866b.f39028","type":"mongodb3","z":"","uri":"mongodb+srv://rlakshminar6:VcMBtnje2OBJ4yWX@cluster0.aukoj.azure.mongodb.net/JournalistSandbox?retryWrites=true&w=majority","name":"JournalistSandbox","options":"","parallelism":"-1"},{"id":"1328b415.e37d7c","type":"ui_group","z":"","name":"Topic ID","tab":"cf04cf62.c2d49","order":2,"disp":true,"width":"6","collapse":true},{"id":"7c848862.a3f978","type":"ui_group","z":"4c9db140.6e2bc8","name":"Editor Console","tab":"cf04cf62.c2d49","order":3,"disp":true,"width":"6","collapse":false},{"id":"269b86f.2136cfa","type":"ui_group","z":"4c9db140.6e2bc8","name":"Editor Console","tab":"cf04cf62.c2d49","order":2,"disp":true,"width":"6","collapse":false},{"id":"f6ca74d7.e5ac68","type":"ui_group","z":"4c9db140.6e2bc8","name":"Theme Input","tab":"c11d8e0a.7f15a8","order":2,"disp":true,"width":"6","collapse":false},{"id":"65e5b6c8.c9cca8","type":"mongodb3","z":"","uri":"mongodb+srv://rlakshminar6:VcMBtnje2OBJ4yWX@cluster0.aukoj.azure.mongodb.net/JournalistSandbox?retryWrites=true&w=majority","name":"JournalistSandbox","options":"","parallelism":"-1"},{"id":"4947a073.c456d8","type":"ui_group","name":"Api","tab":"ed2b4f9d.66dd3","order":1,"disp":true,"width":"6","collapse":false},{"id":"64f611d1.7a2608","type":"mongodb-var","z":"","uri":"mongodb+srv://rlakshminar6:VcMBtnje2OBJ4yWX@cluster0.aukoj.azure.mongodb.net/JournalistSandbox?retryWrites=true&w=majority","name":"JournalistSandbox","options":"","parallelism":"-1"},{"id":"d0df9aa4.a00c6","type":"ui_group","z":"","name":"Editor","tab":"b039e28a.c03818","order":1,"disp":true,"width":"15","collapse":false},{"id":"cf04cf62.c2d49","type":"ui_tab","z":"","name":"AI Nerve- BBC News","icon":"Search Button","disabled":false,"hidden":false},{"id":"c11d8e0a.7f15a8","type":"ui_tab","z":"4c9db140.6e2bc8","name":"AI Nerve - Theme Input","icon":"AI Nerve- Theme Input","disabled":false,"hidden":false},{"id":"ed2b4f9d.66dd3","type":"ui_tab","name":"AI Nerve- BBC News","icon":"Search Button","disabled":false,"hidden":false},{"id":"b039e28a.c03818","type":"ui_tab","z":"","name":"AI Nerve - Editor","icon":"newstest","disabled":false,"hidden":false}]