Skip to content

Commit

Permalink
fix(web.hosting): fix diag on main domain for multisite
Browse files Browse the repository at this point in the history
ref: MANAGER-16626

Signed-off-by: Guillaume Hyenne <[email protected]>
  • Loading branch information
ghyenne committed Jan 10, 2025
1 parent 87fd370 commit f04e35c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
<td class="text-center">
<span
class="oui-badge"
data-ng-if="domain.displayName !== hosting.serviceName"
data-ng-if="!isMainDomain(hosting, domain)"
data-ng-click="openDiagnosticModal(domain, HOSTING_TAB_DOMAINS.A_RECORD)"
data-oui-tooltip="{{ getDiagnosticTooltip(domain, HOSTING_TAB_DOMAINS.A_RECORD) }}"
data-oui-tooltip-placement="bottom"
Expand All @@ -228,7 +228,7 @@
</span>
<span
class="oui-badge"
data-ng-if="domain.displayName !== hosting.serviceName"
data-ng-if="!isMainDomain(hosting, domain)"
data-ng-click="openDiagnosticModal(domain, HOSTING_TAB_DOMAINS.AAAA_RECORD)"
data-oui-tooltip="{{ getDiagnosticTooltip(domain, HOSTING_TAB_DOMAINS.AAAA_RECORD) }}"
data-oui-tooltip-placement="bottom"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,21 @@ angular
);
};

function isMainDomain(hosting, domain) {
$scope.isMainDomain = function isMainDomain(hosting, domain) {
return ['ovh.net', 'hosting.ovh.net']
.map(
(suffix) => `${hosting.primaryLogin}.${hosting.cluster}.${suffix}`,
)
.some((mainDomain) => mainDomain === domain.name);
}
};

$scope.isUpdateDomainDisabled = function isUpdateDomainDisabled(
hosting,
domain,
) {
return (
domain.status === HOSTING_STATUS.UPDATING ||
isMainDomain(hosting, domain)
$scope.isMainDomain(hosting, domain)
);
};

Expand Down

0 comments on commit f04e35c

Please sign in to comment.