<commit_before>// Save attempts to POST to /campaigns/
function save(){
    var targets = [{}]
    var group = {
        name: $("#name").val(),
        targets: targets
    }
    // Submit the campaign
    api.groups.post(group)
    .success(function(data){
        successFlash("Campaign successfully launched!")
        load()
        dismiss()
    })
    .error(function(data){
        $("#modal\\.flashes").empty().append("<div style=\"text-align:center\" class=\"alert alert-danger\">\
            <i class=\"fa fa-exclamation-circle\"></i> " + data.responseJSON.message + "</div>")
    })
}

function dismiss(){
    $("#modal\\.flashes").empty()
    $("#modal").modal('hide')
}

function groupAdd(name){
    groups.append({
        name: name
    })
}

function edit(group){
    if (group == "new") {
        console.log("new")
        group = {}
    }
    targets = $("#targetsTable").dataTable()
    // Handle Addition
    $("#targetForm").submit(function(){
        targets.DataTable()
        .row.add([
            $("#firstName").val(),
            $("#lastName").val(),
            $("#email").val(),
            $("#position").val(),
            '<span><i class="fa fa-trash-o"></i></span>'
        ])
        .draw()
        $("#targetForm>div>input").val('')
        $("#firstName").focus()
        return false
    })
    // Handle Deletion
    $("#targetsTable").on("click", "span>i.fa-trash-o", function(){
        targets.DataTable()
        .row( $(this).parents('tr') )
        .remove()
        .draw();
    })
}

function load(){
    api.groups.get()
    .success(function(groups){
        if (groups.length > 0){<commit_msg>Fixed pointer css<commit_after>// Save attempts to POST to /campaigns/
function save(){
    var targets = [{}]
    var group = {
        name: $("#name").val(),
        targets: targets
    }
    // Submit the campaign
    api.groups.post(group)
    .success(function(data){
        successFlash("Campaign successfully launched!")
        load()
        dismiss()
    })
    .error(function(data){
        $("#modal\\.flashes").empty().append("<div style=\"text-align:center\" class=\"alert alert-danger\">\
            <i class=\"fa fa-exclamation-circle\"></i> " + data.responseJSON.message + "</div>")
    })
}

function dismiss(){
    $("#modal\\.flashes").empty()
    $("#modal").modal('hide')
}

function groupAdd(name){
    groups.append({
        name: name
    })
}

function edit(group){
    if (group == "new") {
        console.log("new")
        group = {}
    }
    targets = $("#targetsTable").dataTable()
    // Handle Addition
    $("#targetForm").submit(function(){
        targets.DataTable()
        .row.add([
            $("#firstName").val(),
            $("#lastName").val(),
            $("#email").val(),
            $("#position").val(),
            '<span style="cursor:pointer;"><i class="fa fa-trash-o"></i></span>'
        ])
        .draw()
        $("#targetForm>div>input").val('')
        $("#firstName").focus()
        return false
    })
    // Handle Deletion
    $("#targetsTable").on("click", "span>i.fa-trash-o", function(){
        targets.DataTable()
        .row( $(this).parents('tr') )
        .remove()
        .draw();
    })
}

function load(){
    api.groups.get()
    .success(function(groups){
        if (groups.length > 0){
{'fraction_non_alphanumeric': 0.21183894230769232, 'fraction_numerical': 0.0006009615384615385, 'mean_word_length': 2.140566037735849, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, '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': '7622874', 'n_tokens_mistral': 991, 'n_tokens_neox': 995, 'n_words': 180}