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

    Sorting of list on the Virtual IPs page

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    1 Posts 1 Posters 1.1k 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.
    • S
      ssheikh
      last edited by

      I often have a relatively large number of VIPs. It would be helpful if the list on the firewall_virtual_ip.php page was sorted by IP address.

      I played around with it a bit and was able to get it somewhat sorted.

      In both firewall_virtual_ip.php and firewall_virtual_ip_edit.php I added the msort line:

      
      ...
      
      if (!is_array($config['virtualip']['vip'])) {
              $config['virtualip']['vip'] = array();
      
      }
      $a_vip = &$config['virtualip']['vip'];
      
      $a_vip = msort($a_vip, "subnet");
      ...
      
      

      Its not a perfect sort but it makes finding VIPs in there a bit easier.

      Anyone see a problem with this approach?

      Thanks,

      Shahid

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