anchor.diff:    #L%
     --%><!DOCTYPE html>
   <% String FAILED_STATE = application.getInitParameter("failed-state");
  -   String DONE_STATE = application.getInitParameter("done-state");
  -   String WORKFLOWSTATEMONITOR_SERVICE = application.getInitParameter("workflowstatemonitorservice");
  -%><html lang="en">
  +    String DONE_STATE = application.getInitParameter("done-state");
  +    String WORKFLOWSTATEMONITOR_SERVICE = application.getInitParameter("workflowstatemonitorservice");
  +%>
  +<html lang="en">
   <head>
       <title>Ingest Monitor</title>
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
positive.code: <script type="text/javascript" src="bootstrap/js/bootstrap.min.js">
  </script>
  <script type="text/javascript">
      function show(state) {
          var items = [];
          $.each(state, function(id, content) {
              items.push('<tr><td>' + content.entity.name + ' <a href="#" onClick="update(\'states/' + content.entity.name
                                 + '/\', \'Details for ' + content.entity.name
                                 + '\'); return false">(details)</a></td><td>' + new Date(content.date) + '</td><td>'
                                 + content.component + ': ' + content.stateName + '</td><td>' + (content.message == null
                      ? '' : content.message) + '</td></tr>');
          });
  
          $('<tbody/>', {
  
negative.code: 
      }
  
      function update(path, title, allStates) {
          lastPath = path;
          lastTitle = title;
          lastAllStates = allStates;
  
          $('h1').replaceWith('<h1>' + title + '</h1>');
          if (allStates) {
              $.getJSON('<%= WORKFLOWSTATEMONITOR_SERVICE %>' + path, show);
          } else {
              $.getJSON('<%= WORKFLOWSTATEMONITOR_SERVICE %>' + path, noAllStatesShow);
          }
      }
  
      $(document).ready(function() {
          update('states/?excludes=<%= DONE_STATE %>&excludes=<%= FAILED_STATE %>&onlyLast=true', 'Files in progress',
                 true);
  
          $("button#inprogress").click(function() {
              update('states/?excludes=<%= DONE_STATE %>&excludes=<%= FAILED_STATE %>&onlyLast=true', 'Files in progress',
                     true);
          });
  
          $("button#failed").click(function() {
              update('states/?includes=<%= FAILED_STATE %>&onlyLast=true', 'Failed files', true);
          });
  
          $("button#done").click(function() {
              update('states/?includes=<%= DONE_STATE %>&onlyLast=true', 'Completed files', true);
          });
  
          $("button#reload").click(function() {
              update(lastPath, lastTitle, lastAllStates);
          });
  
      })
  </script>
  </body>
  