<commit_before>var service = new CloudSyncClient(document.location.href + "api/rest/");

function refreshTasks() {
  service.listTasks(function(data) {
//    doSection(data.tasks, "Active Task", "tasks-active", getActiveTaskHtml);
    doSection(data.tasks, "On-demand Task", "tasks-ondemand", getOnDemandTaskHtml);
    doSection(data.tasks, "Scheduled Task", "tasks-scheduled", getScheduledTaskHtml);
  });
  service.listTaskLogs(function(data) {
    doSection(data.tasklogs, "Completed Task Record", "tasks-completed", getTaskLogHtml);
  });
}

function refreshSets() {
  service.listObjectSets(function(data) {
    doSection(data.objectsets, "Built-in Set", "sets-built-in", getBuiltInSetHtml);
    doSection(data.objectsets, "Custom Set", "sets-custom", getCustomSetHtml);
  });
}

function refreshStores() {
  service.listObjectStores(function(data) {
    doSection(data.objectstores, "DuraCloud-based Store", "stores-duracloud", getDuraCloudStoreHtml);
    doSection(data.objectstores, "Fedora-based Store", "stores-fedora", getFedoraStoreHtml);
  });
}

function getActiveTaskHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>Pause</button>";
  html += "  <button>Abort</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getOnDemandTaskHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button class='button-pauseTask'>Pause</button>";
  html += "  <button class='button-abortTask'>Abort</button>";
  html += "  <button class='button-runTask'>Run</button>";
  html += "  <button class='button-editTask'>Edit</button>";
  html += "  <button class='button-deleteTask'>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getScheduledTaskHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button class='button-pauseTask'>Pause</button>";
  html += "  <button class='button-abortTask'>Abort</button>";
  html += "  <button class='button-runTask'>Run</button>";
  html += "  <button class='button-editTask'>Edit</button>";
  html += "  <button class='button-deleteTask'>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getTaskLogHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>View Log</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getBuiltInSetHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>Test</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getCustomSetHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>Test</button>";
  html += "  <button>Edit</button>";
  html += "  <button>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getDuraCloudStoreHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>Count Objects</button>";
  html += "  <button>Edit</button>";
  html += "  <button>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;<commit_msg>Test = List Matching Objects in UI<commit_after>var service = new CloudSyncClient(document.location.href + "api/rest/");

function refreshTasks() {
  service.listTasks(function(data) {
//    doSection(data.tasks, "Active Task", "tasks-active", getActiveTaskHtml);
    doSection(data.tasks, "On-demand Task", "tasks-ondemand", getOnDemandTaskHtml);
    doSection(data.tasks, "Scheduled Task", "tasks-scheduled", getScheduledTaskHtml);
  });
  service.listTaskLogs(function(data) {
    doSection(data.tasklogs, "Completed Task Record", "tasks-completed", getTaskLogHtml);
  });
}

function refreshSets() {
  service.listObjectSets(function(data) {
    doSection(data.objectsets, "Built-in Set", "sets-built-in", getBuiltInSetHtml);
    doSection(data.objectsets, "Custom Set", "sets-custom", getCustomSetHtml);
  });
}

function refreshStores() {
  service.listObjectStores(function(data) {
    doSection(data.objectstores, "DuraCloud-based Store", "stores-duracloud", getDuraCloudStoreHtml);
    doSection(data.objectstores, "Fedora-based Store", "stores-fedora", getFedoraStoreHtml);
  });
}

function getActiveTaskHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>Pause</button>";
  html += "  <button>Abort</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getOnDemandTaskHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button class='button-pauseTask'>Pause</button>";
  html += "  <button class='button-abortTask'>Abort</button>";
  html += "  <button class='button-runTask'>Run</button>";
  html += "  <button class='button-editTask'>Edit</button>";
  html += "  <button class='button-deleteTask'>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getScheduledTaskHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button class='button-pauseTask'>Pause</button>";
  html += "  <button class='button-abortTask'>Abort</button>";
  html += "  <button class='button-runTask'>Run</button>";
  html += "  <button class='button-editTask'>Edit</button>";
  html += "  <button class='button-deleteTask'>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getTaskLogHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>View Log</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getBuiltInSetHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>List Matching Objects</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getCustomSetHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>List Matching Objects</button>";
  html += "  <button>Edit</button>";
  html += "  <button>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
  });
  html += "</div>";
  return html;
}

function getDuraCloudStoreHtml(item) {
  var html = "";
  html += "<div class='item-actions'>";
  html += "  <button>Count Objects</button>";
  html += "  <button>Edit</button>";
  html += "  <button>Delete</button>";
  html += "</div>";
  html += "<div class='item-attributes'>Attributes:";
  $.each(item, function(key, value) {
    html += "<br/>" + key + ": " + value;
{'fraction_non_alphanumeric': 0.21936349225704183, 'fraction_numerical': 0.0, 'mean_word_length': 4.201014584654407, 'pattern_counts': {'":': 14, '<': 151, '<?xml version=': 0, '>': 151, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6723664', 'n_tokens_mistral': 2739, 'n_tokens_neox': 2724, 'n_words': 538}