Fix Manage Tenant is disabled always in Tenant Summary (#1211)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>

Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2021-11-10 16:00:59 -08:00
committed by GitHub
parent 3b69d9809e
commit fae0135f69

View File

@@ -67,12 +67,22 @@ export const getLimitSizes = (resourceQuotas: IQuotas) => {
};
export const tenantIsOnline = (tenant: ITenant): boolean => {
var isOnline = true;
if (tenant.currentState === "") {
return false;
}
if (tenant.health_status !== "green" && tenant.health_status !== "yellow") {
if (
!tenant.status &&
tenant.health_status !== "green" &&
tenant.health_status !== "yellow"
) {
return false;
}
return isOnline;
if (
tenant.status &&
tenant.status.health_status !== "green" &&
tenant.status.health_status !== "yellow"
) {
return false;
}
return true;
};