analyzer/webui/ferret.js
// we can switch to WebSockets if it's too slow
we can switch to WebSockets if it's too slow
we can switch to WebSockets if it ' s too slow
function startRecording() {
  recording = true;
  resetSearchRecordButton("Search");
  clearDemoPanel();
  clearResultsPanel();
  $.ajax ({
    url: "http://127.0.0.1:8080/entry-point/pollForEvents?reset=true",
    type: "GET",
    dataType: "json",
    mimeType: "application/json", 
    success: function (data) {
      console.log(data);
      $("#status").html("Polling ...");
      setTimeout(pollForEvents, 500);
    },
    error: function(xhr, status, error) {
      console.log(xhr);
      $("#status").html("Failed polling attempt...");
      alert("Error: " + xhr);
    } 
  });
}
function startRecording ( ) { recording = true ; resetSearchRecordButton ( "Search" ) ; clearDemoPanel ( ) ; clearResultsPanel ( ) ; $ . ajax ( { url : "http://127.0.0.1:8080/entry-point/pollForEvents?reset=true" , type : "GET" , dataType : "json" , mimeType : "application/json" , success : function ( data ) { console . log ( data ) ; $ ( "#status" ) . html ( "Polling ..." ) ; setTimeout ( pollForEvents , 500 ) ; } , error : function ( xhr , status , error ) { console . log ( xhr ) ; $ ( "#status" ) . html ( "Failed polling attempt..." ) ; alert ( "Error: " + xhr ) ; } } ) ; }
we can switch to WebSockets if it's too slow
we can switch to WebSockets if it ' s too slow