Change order that allocations are loaded in on the allocation listing
This commit is contained in:
parent
22511c8e24
commit
0acc260b81
3 changed files with 3 additions and 2 deletions
|
@ -18,6 +18,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Changed behavior of allocation IP Address/Ports box to automatically store the value entered if a user unfocuses the field without hitting space.
|
* Changed behavior of allocation IP Address/Ports box to automatically store the value entered if a user unfocuses the field without hitting space.
|
||||||
|
* 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.
|
||||||
|
|
||||||
## v0.7.0-beta.3 (Derelict Dermodactylus)
|
## v0.7.0-beta.3 (Derelict Dermodactylus)
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -106,7 +106,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
|
||||||
public function loadNodeAllocations(Node $node, bool $refresh = false): Node
|
public function loadNodeAllocations(Node $node, bool $refresh = false): Node
|
||||||
{
|
{
|
||||||
$node->setRelation('allocations',
|
$node->setRelation('allocations',
|
||||||
$node->allocations()->orderBy('ip', 'asc')->orderBy('port', 'asc')->with('server')->paginate(50)
|
$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)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $node;
|
return $node;
|
||||||
|
|
|
@ -18,6 +18,6 @@ return [
|
||||||
'location_required' => 'You must have at least one location configured before you can add a node to this panel.',
|
'location_required' => 'You must have at least one location configured before you can add a node to this panel.',
|
||||||
'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>',
|
'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>',
|
||||||
'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.',
|
'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.',
|
||||||
'unallocated_deleted' => 'Deleted all unallocatred ports for <code>:ip</code>.',
|
'unallocated_deleted' => 'Deleted all un-allocated ports for <code>:ip</code>.',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue