here is a patch to compact the traffic totals output



  • It removes the ratio columns, allowing for more interfaces to show on one screen.

    Use the System_Patches package then you can add this as a patch in that.

    Set path strip count to 0

    Base directory to /

    --- /usr/local/www/status_traffic_totals.php   2018-05-23 22:04:39.000000000 +0100
    +++ /usr/local/www/status_traffic_totals.php     2019-08-30 12:37:10.926071000 +0100
    @@ -1055,7 +1055,7 @@
                    for(var i = 0; i < data.length; i += 2) {
                            var key = data[i].key.substring(0,data[i].key.length-5);
     
    -                       header += '<th>' + key + ' TX</th><th>' + key + ' RX</th><th>' + key + ' Ratio</th><th>' + key + ' Total</th>';
    +                       header += '<th>' + key + ' TX</th><th>' + key + ' RX</th><th>' + key + ' Total</th>';
                    }
     
                    header += '</tr>';
    @@ -1147,7 +1147,7 @@
                                                    totalUnit = 'TiB';
                                            }
     
    -                                       body += '<td>' + tx.toFixed(2) + ' ' + txUnit + '</td><td>' + rx.toFixed(2) + ' ' + rxUnit + '</td><td>' + ratio.toFixed(2) + '</td><td>' + total.toFixed(2) + ' ' + totalUnit + '</td>';
    +                                       body += '<td>' + tx.toFixed(2) + ' ' + txUnit + '</td><td>' + rx.toFixed(2) + ' ' + rxUnit + '</td><td>' + total.toFixed(2) + ' ' + totalUnit + '</td>';
     
                                    }
     
    @@ -1260,7 +1260,7 @@
                                                    totalUnit = 'TiB';
                                            }
     
    -                                       body += '<td>' + tx.toFixed(2) + ' ' + txUnit + '</td><td>' + rx.toFixed(2) + ' ' + rxUnit + '</td><td>' + ratio.toFixed(2) + '</td><td>' + total.toFixed(2) + ' ' + totalUnit + '</td>';
    +                                       body += '<td>' + tx.toFixed(2) + ' ' + txUnit + '</td><td>' + rx.toFixed(2) + ' ' + rxUnit + '</td><td>' + total.toFixed(2) + ' ' + totalUnit + '</td>';
                                    }
     
                                    body += '</tr>';
    

Log in to reply