<div class="col-xs-12 col-md-6">
<div class="widget">
    <div class="widget-header" style="-webkit-box-shadow: 0 0 3px rgba(0,0,0,.2);-moz-box-shadow: 0 0 3px rgba(0,0,0,.2);box-shadow: 0 0 3px rgba(0,0,0,.2);
">
        <span class="widget-caption">
            <i id="currentsequence_spinner" style="display: none;" class="fa fa-spinner fa-spin"></i>
            <?php echo $this->lang->line("RUNNINGCASHSEQUENCES"); ?></span>
    </div>
    <div class="widget-body" style="-webkit-box-shadow: 0 0 3px rgba(0,0,0,.2);-moz-box-shadow: 0 0 3px rgba(0,0,0,.2);box-shadow: 0 0 3px rgba(0,0,0,.2);
">
        <table class="table table-hover">
            <thead >
                <tr>
                    <th>
                        #
                    </th>
                    <th>
                        <?php echo $this->lang->line("HOST"); ?>
                    </th>
                    <th>
                        <?php echo $this->lang->line("RUNNINGSEQUENCE"); ?>
                    </th>
                    <th>
                        <?php echo $this->lang->line("DATEFROM"); ?>
                    </th>
                    <th>
                        <?php echo $this->lang->line("AMOUNT"); ?>
                    </th>
                </tr>
            </thead>
            <tbody id="currentsequence">

            </tbody>
        </table>
    </div>
</div>
</div>
<script>
$(document).ready(function() {
    $("#currentsequence_spinner").show();
        $.ajax({ url: "<?= base_url() ?>dashboard/databoxes/currentsequence",
                    data: { count: 5},
                    dataType: "json",
                    type: "POST",
                    success: function(data){
                        var html = '';
                var len = data.length;
                for (var i = 0; i< len; i++) {
                 
            html+="<tr style='font-size: 12px'>"+
            "<td>"+(i+1)+"</td>"+        
            "<td>"+data[i].host+"</td>"+
                    "<td style='text-align: center'>"+data[i].sequence+"</td>"+    
                    "<td>"+data[i].datestart+"</td>"+
                    "<td style='text-align:right;'>"+data[i].totalamount+"</td>"+
               "</tr>";
            
            
                }
                $("#currentsequence").append(html);
                $("#currentsequence_spinner").hide();
                    }
                });
    
});
</script>