Skip to content

Commit

Permalink
fix(web.hosting): fix ip information if ipcountry is selected
Browse files Browse the repository at this point in the history
ref: MANAGER-16625

Signed-off-by: Guillaume Hyenne <[email protected]>
  • Loading branch information
ghyenne committed Jan 10, 2025
1 parent f04e35c commit d897575
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ angular
domainWithoutSubdomain: /^([^.]+\.[^.]+)$/,
};

$scope.getHostingIp = (hosting, activeCDN, ipv6) =>
hosting[
(activeCDN === 'ACTIVE' ? 'hostingIp' : 'clusterIp') +
(ipv6 ? 'v6' : '')
];
$scope.getHostingIp = (hosting, activeCDN, ipv6) => {
const selectedCountryIp = $scope.selected.countryIp;
return selectedCountryIp
? selectedCountryIp[ipv6 ? 'ipv6' : 'ip']
: hosting[
(activeCDN === 'ACTIVE' ? 'hostingIp' : 'clusterIp') +
(ipv6 ? 'v6' : '')
];
};

$scope.isPathValid = () =>
Hosting.constructor.isPathValid($scope.selected.path);
Expand Down Expand Up @@ -168,7 +172,7 @@ angular
$scope.model.hosting &&
$scope.model.options &&
$scope.model.domainsCount >=
$scope.model.capabilities.attachedDomains &&
$scope.model.capabilities?.attachedDomains &&
!$scope.model.moreThanOneDomainCountWithOneAttached
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default {
firewall: '=',
hosting: '<',
ipLocation: '=',
ipv6: '=',
ownLog: '=',
ownLogDomain: '=',
path: '=',
Expand Down

0 comments on commit d897575

Please sign in to comment.