analyzer/webui/ferret.js
//display summary results from a query that's been submitted
display summary results from a query that's been submitted
display summary results from a query that ' s been submitted
function displaySummaryResults(resultSummaries) {
  resetSearchRecordButton("Record");
  console.log(resultSummaries);
  var container = $("#results-container-panel");
  container.empty();
  for (rsIdx in resultSummaries) {    
    colorIdx = 0;
    var rSummary = resultSummaries[rsIdx];
    if (rSummary != null && rSummary.size > 0) {
      var cluster_label=jQuery('<div/>', {
        id: "result-summary-label-" + rsIdx,
        class: "result-summary-label"
      });
      cluster_label.append(rSummary.displayName + " (" + rSummary.size + ")");
      container.append(cluster_label);
      var chart_container = jQuery('<div/>', {
        id: "result-summary-chart-container-" + rsIdx,
        class: "result-summary-chart-container"
      });
      container.append(chart_container);
      var attributeSummaries = resultSummaries[rsIdx].attrSummaries;
      for (var attrName in attributeSummaries) {
        constructChartForAttribute(rsIdx, rSummary, attrName, attributeSummaries, chart_container);
      }
    } else {
   		var msg = "";
   		if (rsIdx == 0) {
   		  msg = "No strong matches";
   		} else if (rsIdx == 1) {
   		  msg = "No elongations";
   		} else if (rsIdx == 2) {
   		  msg = "No alternate endings";
   		} else if (rsIdx == 3) {
   		  msg = "No weak matches";
   		}
   		var cluster_label=jQuery('<div/>', {
        id: "result-summary-label-" + rsIdx,
        class: "result-summary-label"
      });
      cluster_label.append(msg);
      container.append(cluster_label);
    }
  }
}
function displaySummaryResults ( resultSummaries ) { resetSearchRecordButton ( "Record" ) ; console . log ( resultSummaries ) ; var container = $ ( "#results-container-panel" ) ; container . empty ( ) ; for ( rsIdx in resultSummaries ) { colorIdx = 0 ; var rSummary = resultSummaries [ rsIdx ] ; if ( rSummary != null && rSummary . size > 0 ) { var cluster_label = jQuery ( '<div/>' , { id : "result-summary-label-" + rsIdx , class : "result-summary-label" } ) ; cluster_label . append ( rSummary . displayName + " (" + rSummary . size + ")" ) ; container . append ( cluster_label ) ; var chart_container = jQuery ( '<div/>' , { id : "result-summary-chart-container-" + rsIdx , class : "result-summary-chart-container" } ) ; container . append ( chart_container ) ; var attributeSummaries = resultSummaries [ rsIdx ] . attrSummaries ; for ( var attrName in attributeSummaries ) { constructChartForAttribute ( rsIdx , rSummary , attrName , attributeSummaries , chart_container ) ; } } else { var msg = "" ; if ( rsIdx == 0 ) { msg = "No strong matches" ; } else if ( rsIdx == 1 ) { msg = "No elongations" ; } else if ( rsIdx == 2 ) { msg = "No alternate endings" ; } else if ( rsIdx == 3 ) { msg = "No weak matches" ; } var cluster_label = jQuery ( '<div/>' , { id : "result-summary-label-" + rsIdx , class : "result-summary-label" } ) ; cluster_label . append ( msg ) ; container . append ( cluster_label ) ; } } }
display summary results from a query that's been submitted
display summary results from a query that ' s been submitted
// we get back four result set summaries by default // each result set summary contains a set of attribute summaries // we want to create a chart for each individual attribute