Codebase list fudgec2 / 9efa3053-3ebd-43b9-ba52-25607284fb4a/upstream ServerApp / templates / CampaignGraph.html
9efa3053-3ebd-43b9-ba52-25607284fb4a/upstream

Tree @9efa3053-3ebd-43b9-ba52-25607284fb4a/upstream (Download .tar.gz)

CampaignGraph.html @9efa3053-3ebd-43b9-ba52-25607284fb4a/upstreamraw · history · blame

{% extends "ImplantMain.html" %}
{% block main2 %}

<div class="m-0 p-3">
    <h4>Existing Implants & Stagers: {{ campaign }}</h4>
    <p>This is currently a placeholder page which will show command frequency</p>
<canvas id="myChart" width="400" height="200"></canvas>
<script>
function get_implant_data (){
    $.ajax({
            url:"/{{cid}}/Graphs",
            type:"POST",
            success: function (response) {
                console.log("++"+response+"++")
                }});
    a = {
        labels:['a','b','c','d','e','f','g','h'],
        datasets: [{
        label:'example_1',
        backgroundcolor:'#098765',
        bordercolor:'#000011',
        data: [11,2,3,7,5,6]
        }],
    }
    return a
}
options = {
    responsive: true,
    title:{
        text: "Campaign: {{ campaign }} communication history",
        display: true,
        },
     scales:{
        xAxes: [{display:true,scaleLabel:{display:true,labelString:'time'}}],
        yAxes: [{display:true,scaleLabel:{display:true,labelString:'cmd frequency'}}]
        }

    }

data = get_implant_data()
var ctx = document.getElementById("myChart").getContext('2d');
var myLineChart = new Chart(ctx, {
    type: 'line',
    data: data,
    options: options
});
</script>
</div>
{% endblock %}