|
493 |
++nchanges; |
493 |
++nchanges; |
494 |
|
494 |
|
495 |
// check whether a redirect to a new IP address is necessary |
495 |
// check whether a redirect to a new IP address is necessary |
496 |
if ( umc_url === null ) { |
496 |
if ( umc_url === null && orgVal === window.location.host && newVal ) { |
497 |
if ( ikey == 'interfaces/eth0/address' && newVal ) { |
497 |
var interfacesRegexp = /interfaces\/eth[^\/]+(\/ipv6)?.*\/address/; |
498 |
umc_url = 'https://' + newVal + '/umc/'; |
498 |
var match = interfacesRegexp.exec(ikey); |
499 |
} else if ( ikey == 'interfaces/eth0/ipv6/default/address' && newVal ) { |
499 |
if (match) { |
500 |
umc_url = 'https://[' + newVal + ']/umc/'; |
500 |
var ipv4 = !match[1]; |
|
|
501 |
if ( ipv4 ) { |
502 |
umc_url = 'https://' + newVal + '/umc/'; |
503 |
} else { |
504 |
umc_url = 'https://[' + newVal + ']/umc/'; |
505 |
} |
501 |
} |
506 |
} |
502 |
} |
507 |
} |
503 |
} |
508 |
} |