Skip to content

Commit

Permalink
Merge pull request inex#618 from inex/fix-sorting-ip
Browse files Browse the repository at this point in the history
[Bf] - fix IP sorting - fixes inex#21
  • Loading branch information
barryo authored Feb 10, 2020
2 parents 96ea4c6 + 242496c commit fd761ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions database/Repositories/IPv4Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions database/Repositories/IPv6Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion resources/views/ip-address/list.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<tbody>
<?php foreach( $t->ips as $ip ):?>
<tr>
<td>
<td data-order="<?= $t->ee( $ip[ 'aton' ] ) ?>">
<?= $t->ee( $ip[ 'address' ] ) ?>
</td>
<td>
Expand Down

0 comments on commit fd761ee

Please sign in to comment.