diff --git a/static/css/main.css b/static/css/main.css index fdea32b5..11910e9c 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -243,6 +243,9 @@ border-top-color:#34495e } +.chartist-chart { + height:175px; +} .chartist-legend { list-style: none; diff --git a/static/js/app/campaigns.js b/static/js/app/campaigns.js index 32288a3c..8a30953f 100644 --- a/static/js/app/campaigns.js +++ b/static/js/app/campaigns.js @@ -1,3 +1,12 @@ +// labels is a map of campaign statuses to +// CSS classes +var labels = { + "In progress" : "label-primary", + "Queued" : "label-info", + "Completed" : "label-success", + "Error" : "label-danger" +} + // Save attempts to POST to /campaigns/ function save(){ var campaign = { @@ -56,10 +65,11 @@ $(document).ready(function(){ $("#campaignTable").show() campaignTable = $("#campaignTable").DataTable(); $.each(campaigns, function(i, campaign){ + label = labels[campaign.status] || "label-default"; campaignTable.row.add([ campaign.name, moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a'), - "" + campaign.status + "", + "" + campaign.status + "", "
Phishing Success Overview
Average Phishing Results
- +