-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: Fix IPv6 task links #5992
UI: Fix IPv6 task links #5992
Conversation
This doesn’t guarantee that an IPv6 address will be rendered as sometimes it’s only generating one task, to be continued…
Matching against the port was surely inadequate!
This fails for the moment!
Previously, if the IPv6 network was the second task, it wasn’t being asserted against.
@@ -76,37 +76,58 @@ module('Acceptance | allocation detail', function(hooks) { | |||
}); | |||
|
|||
test('each task row should list high-level information for the task', async function(assert) { | |||
const task = server.db.taskStates.where({ allocationId: allocation.id }).sortBy('name')[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was only checking the first task, but since there can only be one IP per task, I need at least two tasks to check both V4 and V6 IPs, so this now loops over the tasks.
The Mirage scenario override is so you can visit a demonstration here, I’ll remove before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the display of the address should also include the brackets.
I did some perusing of the spec which states that all ipv6 urls should include brackets, port or otherwise.
To use a literal IPv6 address in a URL, the literal address should be
enclosed in "[" and "]" characters. For example the following
literal IPv6 addresses:
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
1080:0:0:0:8:800:200C:4171
3ffe:2a00:100:7031::1
1080::8:800:200C:417A
::192.9.5.5
::FFFF:129.144.52.38
2010:836B:4179::836B:4179
would be represented as in the following example URLs:
http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
http://[1080:0:0:0:8:800:200C:417A]/index.html
http://[3ffe:2a00:100:7031::1]
http://[1080::8:800:200C:417A]/foo
http://[::192.9.5.5]/ipng
http://[::FFFF:129.144.52.38]:80/index.html
http://[2010:836B:4179::836B:4179]
Given this, I'm wondering if there's an opportunity to push the bracket logic up into the model or serializer?
I wasn’t sure about what it should look like in the link text, as I don’t know that I’ve come across such displays without the I can move it into the serialiser. I searched and only found one other use of |
I’m closing this in favour of #6007, which addresses the problem at the serialiser level. |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This updates the
href
of task row links to handle IPv6 addresses properly; see the hover address in the corner: