Fixed dynamically created link for selenium#47
Open
KarishoK27 wants to merge 3 commits intoAccenture:masterfrom
KarishoK27:master
Open
Fixed dynamically created link for selenium#47KarishoK27 wants to merge 3 commits intoAccenture:masterfrom KarishoK27:master
KarishoK27 wants to merge 3 commits intoAccenture:masterfrom
KarishoK27:master
Conversation
luismsousa
reviewed
Jun 21, 2018
luismsousa
left a comment
There was a problem hiding this comment.
@KarishoK27 can you update the string to remove the hardcoded HTTP?
resources/release_note/js/appRN.js
Outdated
| return "http://"+ host + "." + window.location.host+ (window.location.host.indexOf(".xip.io") > -1 ? "" : ".xip.io/"); | ||
| var ipformat = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; | ||
| if (window.location.hostname.match(ipformat)) { | ||
| return "http://" + host + "." + window.location.host + ".xip.io"; |
There was a problem hiding this comment.
Hi @KarishoK27 can you replace this to add the protocol dynamically by using the window.location.protocol method?
it should look something like this:
return window.location.protocol + "//" + host + "." + window.location.host + ".xip.io";
resources/release_note/js/appRN.js
Outdated
| if (window.location.hostname.match(ipformat)) { | ||
| return "http://" + host + "." + window.location.host + ".xip.io"; | ||
| } else { | ||
| return "http://" + host + "." + window.location.host; |
There was a problem hiding this comment.
same on this line:
by using the window.location.protocol method?
it should look something like this:
return window.location.protocol + "//" + host + "." + window.location.host;
luismsousa
approved these changes
Jun 22, 2018
Contributor
|
Could it be switched to "nip.io" instead please? Reason being is that nip doesn't have the "resolving text to IPs" problem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If ADOP is running at URL that contains domain, function createURL was creating URL for selenium that looks like this
http://selenium.54.237.225.72.nip.io.xip.io///grid/consoleSuch link are not working, so you need manually remove.xip.io.Added to function block that checks hostname. If ADOP hostname is IP address, function is adding
.xip.ioto the end of link. If hostname contains domain, function will not add.xip.io.Also removed extra '/' from URL ending part for selenium.