Commit 0446d923 authored by Luca Lamorte's avatar Luca Lamorte

fix render issue on verdict

parent ba9e08ab
{"component": "gui_tt", "url": "amqp://f-interop:Cowabunga@finterop-mq.noc.onelab.eu:443/3a1a9839-fe85-4038-aa8e-a48f3821c3d5", "orchestrator": "http://193.190.127.250/", "connected": false, "exchange": "default", "version": "0.0.1"}
\ No newline at end of file
{"url": "amqp://f-interop:Cowabunga@finterop-mq.noc.onelab.eu:443/demo-privacy-1", "exchange": "default", "orchestrator": "http://193.190.127.250/", "component": "gui_tt", "connected": false, "version": "0.0.1"}
\ No newline at end of file
......@@ -205,7 +205,6 @@ function checkPrivacyMessage(msg){
function show_verdict(){
$.get( "html/verdict", function( data ) {
console.log("VERDICT:"+data)
$("#add_page_here").html( data );
loadJsonReport('/verdict/json')
......
<div class="container" style="overflow:auto;">
<div class="container">
<div id="report"/>
<div id="report" style="overflow:scroll; min-height: 800px"/>
</div>
<script>
var list_packets
function show_packet_details(id, token){
var output = JSON.stringify(list_packets[id]["_source"]["layers"]["coap"]["coap.payload"])
output.replaceAll(token, "<strong styles='color:red'>"+token+"</strong>")
var regex = new RegExp(token, 'g');
output = output.replace(regex, "<strong style='color:red;font-size: 1.2em'>"+token+"</strong>")
var show_form = document.getElementById('show-pkt-detail')
show_form .classList.remove("hide");
show_form.innerHTML = output
......@@ -86,7 +86,7 @@
"<td>CoAP</td>" +
"<td>" + conversations[c].anomalies[a].detected_token + "</td>" +
"<td class='"+color_tag+"'>" + conversations[c].anomalies[a].privacy_tag + "</td>"+
"<td> <a href='#' onclick='show_packet_details("+conversations[c].anomalies[a].pkt_id+","+ conversations[c].anomalies[a].detected_token +")'>Show Payload</a></td></tr>";
"<td> <a href='#' onclick='show_packet_details("+conversations[c].anomalies[a].pkt_id+",\""+ conversations[c].anomalies[a].detected_token +"\")'>Show Payload</a></td></tr>";
index += 1;
}
......@@ -96,8 +96,9 @@
output += "<div class='text-right'><span class='label label-success'>Clean conversation</span> </div></div>";
}
output +="</div><br>";
}
}
output+= "<br><br> <p> Copyright @2017</p><br><br><br><br>"
//document.write(output);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment