Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    here is a patch to compact the traffic totals output

    Scheduled Pinned Locked Moved Traffic Monitoring
    1 Posts 1 Posters 293 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chrcoluk
      last edited by chrcoluk

      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>';
      

      pfSense CE 2.8.0

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.