YchKhan commited on
Commit
280017c
·
verified ·
1 Parent(s): 5a4e751

Update templates/index.html

Browse files

add extract insight when analyzing all in once

Files changed (1) hide show
  1. templates/index.html +12 -0
templates/index.html CHANGED
@@ -906,6 +906,18 @@
906
  scoreCell.style.fontWeight = 'bold';
907
  scoreCell.style.textAlign = 'center';
908
  }
 
 
 
 
 
 
 
 
 
 
 
 
909
  } else {
910
  scoreCell.innerHTML = 'No data';
911
  justificationCell.innerHTML = 'Analysis failed';
 
906
  scoreCell.style.fontWeight = 'bold';
907
  scoreCell.style.textAlign = 'center';
908
  }
909
+ // Add "Extract Insights" button to the justify cell - for Analyze All function
910
+ const insightsButton = document.createElement('button');
911
+ insightsButton.textContent = 'Extract Insights';
912
+ insightsButton.className = 'action-button insights-button';
913
+ insightsButton.style.marginTop = '5px';
914
+ insightsButton.style.fontSize = '0.8em';
915
+ insightsButton.onclick = function(e) {
916
+ e.preventDefault();
917
+ extractInsights(urlLink.href, row);
918
+ };
919
+ justificationCell.appendChild(document.createElement('br'));
920
+ justificationCell.appendChild(insightsButton);
921
  } else {
922
  scoreCell.innerHTML = 'No data';
923
  justificationCell.innerHTML = 'Analysis failed';