-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow_Node-Red.txt
1 lines (1 loc) · 23.4 KB
/
flow_Node-Red.txt
1
[{"id":"e09e4458.492d38","type":"http in","z":"ac65deec.0ec91","name":"Chatbot online- Agente Cognitivo de Segurança","url":"/asiagentecognitivo","method":"get","upload":false,"swaggerDoc":"","x":363.00000762939453,"y":294.0000057220459,"wires":[["85e78520.9c5f58"]]},{"id":"85e78520.9c5f58","type":"template","z":"ac65deec.0ec91","name":"Conversation BOT Template","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>\n\t Agente Virtual - Agente Cognitivo de Segurança\n\t</title>\n\t<link rel=\"stylesheet\"\n type=\"text/css\"\n href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" />\n </head>\n <body>\n\n <div class=\"container-fluid\">\n <div id=\"no-script\"class=\"bg-info\">\n This application needs JavaScript enabled in your browser!\n </div>\n <div id=\"id_contextdump\"></div>\n\n <h1>Agente Cognitivo de Segurança</h1>\n\t <div class=\"alert alert-success\" role=\"alert\" id=id_botchathistory></div>\n\t \n\t <div>\n\t <form>\n\t <div class=\"form-group\">\n \n <label for=\"id_chattext\" class=\"col-sm-2 col-form-label\">Você: </label>\n <div class=\"col-sm-10\">\n <input type=\"text\" name=\"chattext\" id=\"id_chattext\">\n </div>\n \n <br/><br/>\n\t \n\t </div>\n\n\t </form>\n\t <button type=\"button\" class=\"btn btn-primary\" onclick=\"javascript:onChatClick()\">Enviar</button>\n\t </div>\n </div>\n <script type=\"text/javascript\" src=\"https://code.jquery.com/jquery-2.1.4.min.js\"></script>\n <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\"></script>\n\n <script type=\"text/javascript\">\n \n $(document).ready(function() {\n javascriptCheck();\n \t$('#id_contextdump').hide();\n });\n\n // if javascript is enabled on the browser then can\n // remove the warning message\n function javascriptCheck() {\n $('#no-script').remove();\n }\n \n function createNewDiv(who, message) {\n console.log('002-001'); \n var txt = who + ' : ' + message;\n return $('<div></div>').text(txt);\n }\n\n function chat(person, txt) {\n $('#id_botchathistory').append(createNewDiv(person, txt));\n } \n \n function processOK(response) {\n console.log('003-001');\n console.log(response);\n console.log(response.botresponse.messageout);\n console.log(response.botresponse.messageout.output.text);\n console.log(response.botresponse.messageout.context);\n chat('Agente Virtual', response.botresponse.messageout.output.text); \n $('#id_contextdump').data('convContext', response.botresponse.messageout.context);\n }\n \n function processNotOK() {\n chat('Error', 'Error whilst attempting to talk to Bot');\n }\n \n function invokeAjax(message) {\n var contextdata = $('#id_contextdump').data('convContext');\n console.log('checking stashed context data');\n console.log(contextdata);\n \n \n //var ajaxData = \"msgdata=\" + message;\n var ajaxData = {};\n ajaxData.msgdata = message;\n if (contextdata) {\n ajaxData.context = contextdata; \n }\n\n $.ajax({\n type: 'POST',\n url: 'asichatagentecognitivo',\n data: ajaxData,\n success: processOK,\n error: processNotOK\n });\n }\n \n // User has entered some text.\n function onChatClick() {\n console.log('001-001');\n var txt = $('#id_chattext').val();\n chat('Você', txt); \n invokeAjax(txt);\n console.log('001-002');\n }\n \n \n </script>\n </body>\n</html>\n","x":748,"y":312,"wires":[["f3e22d5.3100dd"]]},{"id":"f3e22d5.3100dd","type":"http response","z":"ac65deec.0ec91","name":"","x":1138,"y":312,"wires":[]},{"id":"2d323d79.8f8fd2","type":"http in","z":"ac65deec.0ec91","name":"Aplicativo - Agente Cognitivo de Segurança","url":"/asichatagentecognitivo","method":"post","upload":false,"swaggerDoc":"","x":264.00001525878906,"y":370.523473739624,"wires":[["16856e4b.f1d082"]]},{"id":"bdfaa94d.426088","type":"http response","z":"ac65deec.0ec91","name":"","x":1138,"y":372,"wires":[]},{"id":"16856e4b.f1d082","type":"function","z":"ac65deec.0ec91","name":"Pre Service Processing","func":"flow.set(\"RespostaAssistente\",\"Ok, variavel utilizada\");\n\n// stash away incoming data\nmsg.mydata = {};\nmsg.mydata.messagein = msg.req.body.msgdata;\nmsg.payload = msg.mydata.messagein;\n\nmsg.params = { \"context\": msg.req.body.context};\n\nreturn msg;","outputs":1,"noerr":0,"x":638,"y":372,"wires":[["59596cfd.c0e714"]]},{"id":"eb39b515.332da8","type":"function","z":"ac65deec.0ec91","name":"Post Service Processing","func":"//Resposta = \"Ok, executado\";\n//Resposta = flow.get(\"RespostaAssistente\");\n\nmsg.mydata.messageout = msg.payload;\n\n//msg.mydata.messageout.output.text = Resposta;\n\nmsg.payload = {};\nmsg.payload.botresponse = msg.mydata;\n\nreturn msg;","outputs":1,"noerr":0,"x":918,"y":372,"wires":[["bdfaa94d.426088"]]},{"id":"72fc1a04.8c2944","type":"ui_form","z":"ac65deec.0ec91","name":"","label":"","group":"abaac7d2.4e6c58","order":1,"width":"0","height":"0","options":[{"label":"O que gostaria de fazer ?","value":"pergunta","type":"text","required":false}],"formValue":{"pergunta":""},"payload":"","topic":"pergunta","x":252,"y":459.3334484100342,"wires":[["c2371d2c.7555f"]]},{"id":"c2371d2c.7555f","type":"function","z":"ac65deec.0ec91","name":"Trata campos do formulário","func":"msg.user = msg.payload.usuario;\nmsg.payload = msg.payload.pergunta;\nreturn msg;","outputs":1,"noerr":0,"x":369.50001525878906,"y":535.3333911895752,"wires":[["59596cfd.c0e714"]]},{"id":"419a3218.1480ec","type":"function","z":"ac65deec.0ec91","name":"InformaAlerta do App","func":"if (msg.verifica == \"AvaliacaoDeSeguranca\"){\n msg.payload = 5;\n msg.topic = \"Alto\";\n}else{\n msg.payload = 2;\n msg.topic = \"Baixo\";\n\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":1072.3812713623047,"y":566.9608135223389,"wires":[["4ba4791.5c1d888"]]},{"id":"65115e33.fe715","type":"ui_text","z":"ac65deec.0ec91","group":"abaac7d2.4e6c58","order":2,"width":0,"height":0,"name":"Mensagem","label":"Mensagem","format":"{{msg.payload}}","layout":"row-center","x":1281.3812103271484,"y":638.9608173370361,"wires":[]},{"id":"7a4f97b9.e865b8","type":"function","z":"ac65deec.0ec91","name":"Exibe Imagem","func":"if (msg.verifica == \"piadas\"){\n msg.payload = \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxASEBUPEBIQFQ8QFRAVDxAVEA8VEA8QFRUYFhUVFRUYHSggGBonGxUVIjEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGi0lHyUtLS8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAOEA4QMBEQACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAAAgMEBQYBBwj/xABFEAACAQICBgYHBAcIAgMAAAABAgADEQQFBhIhMUFREyJhcZGhBzJCUoGx0RQjcsEzYoKSssLSFUNTc5Oi4fCDsyREVP/EABsBAQACAwEBAAAAAAAAAAAAAAABAgMEBQYH/8QANREAAgECBQEFBgUFAQEAAAAAAAECAxEEBRIhMUETIjJRYXGBkaGx0QYUQlLBFSMz4fByU//aAAwDAQACEQMRAD8A9xgBACAEAIAQAgBACAEARUqqN5A7yJhq16VJXnJL3kqLfCIz5jTHG/cDObUzzBwdtV/YrmVUKj6DLZsvBW8hNOf4korwwb+BkWFl5iP7W/U/3f8AEwv8SrpT+ZP5V+Yf2t+p/u/4hfiVdafzH5V+Ytc1XireIMyw/EtF+KDXwIeFl5jyZlTPEjvBm5Sz3BzdnJr2oxvDzXQkU6qt6pB7iJ0qWIpVVeEk/YzG4tcocmcqEAIAQAgBACAEAIAQAgBACAEAIAQAgBAOEyHJJXYIOIzNF2L1j2bvGcPF57h6Pdh3n6bL4/Y2IYecudiBUx1V9gNuxd/jvnArZvjMQ9MHZeUfvz9DZVCnDkEwTnadnaTtmOnluJrO83b27sOtCO0SQmXrxJPlN+nk9JLvtsxuu3wPrhkHsj47ZuQ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mOpow/Goo7lJ+kyRyKf6pr4FHmK6RfxJVHRmmPWdz3WUTap5HRXibfyMMswqPhFhh8poJ6tNb8z1j5zfpYDD0vDD47/U1p4ipPmROm4YQgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBACAf/9k=\";\n}\n\nif (msg.verifica == \"AvaliacaoDeSeguranca\"){\n msg.payload = \"https://www.ibm.com/cloud-computing/social/images/scsb-security-lead.png\";\n}\n\n\nreturn msg;","outputs":1,"noerr":0,"x":1040.3810272216797,"y":733.960901260376,"wires":[["a10c2ce3.1fd01"]]},{"id":"c19ca2b0.8c735","type":"function","z":"ac65deec.0ec91","name":"InformaTexto","func":"//var texto = msg.payload.output.text;\n\nif (msg.verifica == \"AvaliacaoDeSeguranca\"){\n msg.payload = texto = \"Ok, chamei o time de segurança.\";\n}else{\n msg.payload = texto = \"Hora da diverção.\";\n}\n\n//msg.payload = texto;\n\nreturn msg;","outputs":1,"noerr":0,"x":1043.3811111450195,"y":653.9608173370361,"wires":[["65115e33.fe715","f6784999.3edc18","52e068a6.902b28"]]},{"id":"f6784999.3edc18","type":"ui_audio","z":"ac65deec.0ec91","name":"","group":"abaac7d2.4e6c58","voice":"16","always":true,"x":1270.3812522888184,"y":702.9608879089355,"wires":[]},{"id":"a10c2ce3.1fd01","type":"ui_template","z":"ac65deec.0ec91","group":"abaac7d2.4e6c58","name":"","order":3,"width":"12","height":"6","format":" <div ng-show=\"!setMedia[$index]\" class=\"col-xs-12 col-sm-12 col-md-5\">\n <img ng-src=\"{{msg.payload}}\" width=\"500px\">\n </div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1279.8890228271484,"y":755.4842615127563,"wires":[[]]},{"id":"4a370f4d.0b9f4","type":"function","z":"ac65deec.0ec91","name":"Avalia o incidente","func":"msg.payload = msg.payload;\n//msg.verifica = \"\";\n//msg.maturidade = \"\";\n\nif ( msg.payload.intents != 0 && msg.payload.intents.length >0 ){\n var intents = msg.payload.intents;\n \n for(var intent of intents){\n if(intent.intent == \"piadas\"){\n msg.verifica = \"piadas\";\n }\n if(intent.intent == \"AvaliacaoDeSeguranca\"){\n msg.verifica = \"AvaliacaoDeSeguranca\";\n } \n \n }\n \n}\n\nif ( msg.payload.entities != 0 && msg.payload.entities.length >0 ){\n var entities = msg.payload.entities;\n \n for(var entity of entities ){\n \n if(entity.entity == \"piadas\"){\n msg.verifica = \"piadas\";\n }\n \n if(entity.entity == \"AvaliacaoDeSeguranca\"){\n msg.verifica = \"AvaliacaoDeSeguranca\";\n } \n \n }\n\n}\n\n\nreturn msg;","outputs":1,"noerr":0,"x":575.0000457763672,"y":640.4372100830078,"wires":[["10556f6a.c4b6b1"]]},{"id":"4ba4791.5c1d888","type":"ui_gauge","z":"ac65deec.0ec91","name":"","group":"abaac7d2.4e6c58","order":4,"width":0,"height":0,"gtype":"gage","title":"Medidor de importância","label":"%","format":"{{value}}","min":0,"max":"5","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1334.8334197998047,"y":562.6276245117188,"wires":[]},{"id":"52e068a6.902b28","type":"debug","z":"ac65deec.0ec91","name":"","active":true,"console":"false","complete":"payload","x":1271.0188751220703,"y":828.0251483917236,"wires":[]},{"id":"10556f6a.c4b6b1","type":"switch","z":"ac65deec.0ec91","name":"Separa Assuntos","property":"verifica","propertyType":"msg","rules":[{"t":"cont","v":"piadas","vt":"str"},{"t":"cont","v":"AvaliacaoDeSeguranca","vt":"str"},{"t":"else"}],"checkall":"true","outputs":3,"x":789.0234985351562,"y":661.0352468490601,"wires":[["419a3218.1480ec","c19ca2b0.8c735","7a4f97b9.e865b8"],["419a3218.1480ec","c19ca2b0.8c735","7a4f97b9.e865b8"],[]]},{"id":"59596cfd.c0e714","type":"watson-conversation-v1","z":"ac65deec.0ec91","name":"Watson Assistant","workspaceid":"","multiuser":false,"context":false,"empty-payload":false,"default-endpoint":false,"service-endpoint":"","x":643.0000305175781,"y":488.52344608306885,"wires":[["eb39b515.332da8","4a370f4d.0b9f4"]]},{"id":"abaac7d2.4e6c58","type":"ui_group","z":"","name":"Agente Cognitivo de Segurança","tab":"c7d07c7c.f8d1e","disp":true,"width":"12","collapse":false},{"id":"c7d07c7c.f8d1e","type":"ui_tab","z":"","name":"agentecognitivo","icon":"dashboard"}]