diff --git a/src/app/shared/admin/clusters/add-cluster/add-cluster.component.ts b/src/app/shared/admin/clusters/add-cluster/add-cluster.component.ts index 844446721c1fd42e007e95cb7428d5c96e679f2b..4e378297410c397dc24e3f6cfa320d0e60aeec3f 100644 --- a/src/app/shared/admin/clusters/add-cluster/add-cluster.component.ts +++ b/src/app/shared/admin/clusters/add-cluster/add-cluster.component.ts @@ -163,10 +163,12 @@ export class AddClusterComponent implements OnInit { } public setInitialValues() { - this.cluster.ingress.controllerConfigOption = IngressControllerConfigOption.USE_EXISTING; - this.cluster.ingress.controllerChartName = ""; - this.cluster.ingress.controllerChartArchive = ""; - this.cluster.ingress.resourceConfigOption = IngressResourceConfigOption.DEPLOY_FROM_CHART; + if (this.cluster.ingress !== undefined) { + this.cluster.ingress.controllerConfigOption = IngressControllerConfigOption.USE_EXISTING; + this.cluster.ingress.controllerChartName = ""; + this.cluster.ingress.controllerChartArchive = ""; + this.cluster.ingress.resourceConfigOption = IngressResourceConfigOption.DEPLOY_FROM_CHART; + } } diff --git a/src/app/shared/users/privileges/userprivileges.component.spec.ts b/src/app/shared/users/privileges/userprivileges.component.spec.ts index 52c435ec048487b482d39d3959eea70c73194fdc..21cc3d3313de33a6c38a2e27b323da8df697f574 100644 --- a/src/app/shared/users/privileges/userprivileges.component.spec.ts +++ b/src/app/shared/users/privileges/userprivileges.component.spec.ts @@ -18,9 +18,9 @@ describe('UserPrivilegesComponent', () => { const authServiceSpy = createSpyObj('AuthService', ['hasRole']); authServiceSpy.hasRole.and.returnValue(true) - const domainServiceSpy = createSpyObj('DomainService', ['getGlobalDomainId', 'getAll', 'getMyDomains']) + const domainServiceSpy = createSpyObj('DomainService', ['getGlobalDomainId', 'getAllBase', 'getMyDomains']) domainServiceSpy.getGlobalDomainId.and.returnValue(1) - domainServiceSpy.getAll.and.returnValue(of([])) + domainServiceSpy.getAllBase.and.returnValue(of([])) domainServiceSpy.getMyDomains.and.returnValue(of([])) TestBed.configureTestingModule({