Skip to content

Conversation

@rmartinoscar
Copy link
Member

Closes #1495

@rmartinoscar rmartinoscar requested review from Boy132 and lancepioch July 7, 2025 12:39
@rmartinoscar rmartinoscar self-assigned this Jul 7, 2025
@Boy132 Boy132 requested a review from Copilot July 8, 2025 08:09

This comment was marked as outdated.

@mkaulfers
Copy link

Related to this? #1508

@Boy132 Boy132 requested a review from Copilot July 10, 2025 06:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the IP selection dropdown in the Allocations relation manager to exclude IPs already used by allocations on the same port, while still including the current allocation’s IP.

  • Exclude IPs that are already allocated to the same port
  • Prepend the current allocation’s IP and enforce uniqueness
  • Convert the resulting collection to an array for options
Comments suppressed due to low confidence (1)

app/Filament/Admin/Resources/NodeResource/RelationManagers/AllocationsRelationManager.php:65

  • The new filtering logic should be covered by unit or feature tests to ensure that IPs are correctly excluded or included based on port and current allocation.
                    ->options(fn (Allocation $allocation) => collect($this->getOwnerRecord()->ipAddresses())

@rmartinoscar rmartinoscar merged commit c5528a6 into main Jul 10, 2025
25 checks passed
@rmartinoscar rmartinoscar deleted the issue/1495 branch July 10, 2025 06:59
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

500 when changing allocation's ip using Select

4 participants