From 242496c5ee1f938b1d42c944f4440e59fb31fc0b Mon Sep 17 00:00:00 2001 From: Yann Robin Date: Mon, 10 Feb 2020 10:58:32 +0000 Subject: [PATCH] [Bf] - fix IP sorting - fixes inex/IXP-Manager#21 --- database/Repositories/IPv4Address.php | 1 + database/Repositories/IPv6Address.php | 1 + resources/views/ip-address/list.foil.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/database/Repositories/IPv4Address.php b/database/Repositories/IPv4Address.php index 8f33743f5..7fc22864b 100644 --- a/database/Repositories/IPv4Address.php +++ b/database/Repositories/IPv4Address.php @@ -72,6 +72,7 @@ public function getAllForList( int $vlanid = null ) $dql = "SELECT ip.id as id, ip.address as address, + inet_aton(ip.address) as aton, v.name AS vlan, v.id as vlanid, vli.id AS vliid, diff --git a/database/Repositories/IPv6Address.php b/database/Repositories/IPv6Address.php index 129ee17c6..62b6e13bb 100644 --- a/database/Repositories/IPv6Address.php +++ b/database/Repositories/IPv6Address.php @@ -101,6 +101,7 @@ public function getAllForList( int $vlanid = null ) $dql = "SELECT ip.id AS id, ip.address AS address, + hex( inet6_aton( ip.address ) ) as aton, v.name AS vlan, v.id AS vlanid, vli.id AS vliid, diff --git a/resources/views/ip-address/list.foil.php b/resources/views/ip-address/list.foil.php index a4d505e0d..de570d5a8 100644 --- a/resources/views/ip-address/list.foil.php +++ b/resources/views/ip-address/list.foil.php @@ -103,7 +103,7 @@ ips as $ip ):?> - + ee( $ip[ 'address' ] ) ?>