Skip to content

Commit 0acc260

Browse files
committed
Change order that allocations are loaded in on the allocation listing
1 parent 22511c8 commit 0acc260

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1818

1919
### Changed
2020
* Changed behavior of allocation IP Address/Ports box to automatically store the value entered if a user unfocuses the field without hitting space.
21+
* c order in which allocations are displayed to prioritize those with servers attached (in ascending IP & port order) followed by ascending IP & port order where no server is attached.
2122

2223
## v0.7.0-beta.3 (Derelict Dermodactylus)
2324
### Fixed

app/Repositories/Eloquent/NodeRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function loadLocationAndServerCount(Node $node, bool $refresh = false): N
106106
public function loadNodeAllocations(Node $node, bool $refresh = false): Node
107107
{
108108
$node->setRelation('allocations',
109-
$node->allocations()->orderBy('ip', 'asc')->orderBy('port', 'asc')->with('server')->paginate(50)
109+
$node->allocations()->orderByRaw('server_id IS NOT NULL DESC, server_id IS NULL')->orderByRaw('INET_ATON(ip) ASC')->orderBy('port', 'asc')->with('server')->paginate(50)
110110
);
111111

112112
return $node;

resources/lang/en/admin/node.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
'location_required' => 'You must have at least one location configured before you can add a node to this panel.',
1919
'node_created' => 'Successfully created new node. You can automatically configure the daemon on this machine by visiting the \'Configuration\' tab. <strong>Before you can add any servers you must first allocate at least one IP address and port.</strong>',
2020
'node_updated' => 'Node information has been updated. If any daemon settings were changed you will need to reboot it for those changes to take effect.',
21-
'unallocated_deleted' => 'Deleted all unallocatred ports for <code>:ip</code>.',
21+
'unallocated_deleted' => 'Deleted all un-allocated ports for <code>:ip</code>.',
2222
],
2323
];

0 commit comments

Comments
 (0)