<commit_before>
<ul id="navbar">
    <li><a href="@routes.Application.index">Home</a></li>
    <li><a class="active" href="@routes.Application.builder">Workflow Builder</a></li>
    <li><a href="@routes.Application.createaccount">Register</a></li>
    @if(session.get("uid").equals("1")) {
        <li><a href="@routes.Application.manager">User Management</a></li>
    }
    @if(session.get("uid") == null) {
        <li><a href="@routes.Application.login">Login</a></li>
    } else {
        <li><a href="@routes.Application.logout">Logout</a></li>
    }
</ul>

@main(title = "The Kurator 'helloworld' application") {

<h1>Workflow Builder</h1>

<script type="text/javascript">
    jsPlumb.ready(function() {
        jsPlumb.setContainer($("#canvas"));

        function addInput(name) {
            var input = $("<div class='input'>" + name + "</div>").dblclick(function() {
                jsPlumb.remove(this);
            });
            $("#canvas").append(input);
            jsPlumb.draggable(input);

            var endpoint = jsPlumb.addEndpoint(input, { anchor:"Right", isSource:true });
        }

        function addOutput(name) {
            var output = $("<div class='output'>" + name + "</div>").dblclick(function() {
                jsPlumb.remove(this);
            });

            $("#canvas").append(output);
            jsPlumb.draggable(output);
            var endpoint = jsPlumb.addEndpoint(output, { anchor:"Left", isTarget:true });
        }

        function addActor(name) {
            var actor = $("<div class='actor'>" + name + "</div>").dblclick(function() {
                jsPlumb.remove(this);
            });

            $("#canvas").append(actor);
            jsPlumb.draggable(actor);

            var inEnpoint = jsPlumb.addEndpoint(actor, { anchor:"Left", isTarget:true });
            var outEnpoint = jsPlumb.addEndpoint(actor, { anchor:"Right", isSource:true });
        }

        var actorConfig = [
            {
                name: "ReadInput",
                type: "input"
            },
            {
                name: "WriteDQReport",
                type: "output"
            },
            {
                name: "RunGeoValidation",
                type: "actor"
            },
            {
                name: "MapToFramework",
                type: "actor"
            }
        ];

        $.each(actorConfig, function(i, obj) {
            $("#actorSelect").append("<option value='" + i + "'>" + obj.name + " </option>");
        });

        $("#addActorButton").click(function() {
            var value = $("#actorSelect").val();
            var actor = actorConfig[value];

            if (actor.type === "input") {
                addInput(actor.name);
            } else if (actor.type === "actor") {
                addActor(actor.name);
            } else if (actor.type === "output") {
                addOutput(actor.name);
            }
        });
    });
</script>

<div id="toolbox">
    <span>Actor: </span>
    <select id="actorSelect">

    </select>

    <button id="addActorButton">Add Actor</button><commit_msg>ISSUE: PURPOSE: Changing list of actors available on the workflow builder page.  DESCRIPTION: Adding some actors from kurator-fp-validation dwca workflow to show in the demo.<commit_after>
<ul id="navbar">
    <li><a href="@routes.Application.index">Home</a></li>
    <li><a class="active" href="@routes.Application.builder">Workflow Builder</a></li>
    <li><a href="@routes.Application.createaccount">Register</a></li>
    @if(session.get("uid").equals("1")) {
        <li><a href="@routes.Application.manager">User Management</a></li>
    }
    @if(session.get("uid") == null) {
        <li><a href="@routes.Application.login">Login</a></li>
    } else {
        <li><a href="@routes.Application.logout">Logout</a></li>
    }
</ul>

@main(title = "The Kurator 'helloworld' application") {

<h1>Workflow Builder</h1>

<script type="text/javascript">
    jsPlumb.ready(function() {
        jsPlumb.setContainer($("#canvas"));

        function addInput(name) {
            var input = $("<div class='input'>" + name + "</div>").dblclick(function() {
                jsPlumb.remove(this);
            });
            $("#canvas").append(input);
            jsPlumb.draggable(input);

            var endpoint = jsPlumb.addEndpoint(input, { anchor:"Right", isSource:true });
        }

        function addOutput(name) {
            var output = $("<div class='output'>" + name + "</div>").dblclick(function() {
                jsPlumb.remove(this);
            });

            $("#canvas").append(output);
            jsPlumb.draggable(output);
            var endpoint = jsPlumb.addEndpoint(output, { anchor:"Left", isTarget:true });
        }

        function addActor(name) {
            var actor = $("<div class='actor'>" + name + "</div>").dblclick(function() {
                jsPlumb.remove(this);
            });

            $("#canvas").append(actor);
            jsPlumb.draggable(actor);

            var inEnpoint = jsPlumb.addEndpoint(actor, { anchor:"Left", isTarget:true });
            var outEnpoint = jsPlumb.addEndpoint(actor, { anchor:"Right", isSource:true });
        }

        var actorConfig = [
            {
                name: "ReadInput",
                type: "input"
            },
            {
                name: "WriteDQReport",
                type: "output"
            },
            {
                name: "VertNetGeoValidator",
                type: "actor"
            },
            {
                name: "ScientificNameValidator",
                type: "actor"
            },
            {
                name: "BasisOfRecValidator",
                type: "actor"
            },
            {
                name: "DateValidator",
                type: "actor"
            },
            {
                name: "FP-GeoValidator",
                type: "actor"
            }
        ];

        $.each(actorConfig, function(i, obj) {
            $("#actorSelect").append("<option value='" + i + "'>" + obj.name + " </option>");
        });

        $("#addActorButton").click(function() {
            var value = $("#actorSelect").val();
            var actor = actorConfig[value];

            if (actor.type === "input") {
                addInput(actor.name);
            } else if (actor.type === "actor") {
                addActor(actor.name);
            } else if (actor.type === "output") {
                addOutput(actor.name);
            }
        });
    });
</script>

<div id="toolbox">
    <span>Actor: </span>
    <select id="actorSelect">

    </select>

    <button id="addActorButton">Add Actor</button>
{'fraction_non_alphanumeric': 0.17232610321615557, 'fraction_numerical': 0.0008975317875841437, 'mean_word_length': 1.8033542976939203, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, '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': '6246533', 'n_tokens_mistral': 1952, 'n_tokens_neox': 1889, 'n_words': 325}