fix(console): initialize provider options (#5520)

fix: provider options initializer
This commit is contained in:
Max Peintner 2023-03-22 09:53:07 +01:00 committed by GitHub
parent 9257cf7086
commit e9df06df38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 9 additions and 17 deletions

View File

@ -105,7 +105,6 @@ export class MembershipsTableComponent implements OnInit, OnDestroy {
this.adminService this.adminService
.listIAMMemberRoles() .listIAMMemberRoles()
.then((resp) => { .then((resp) => {
console.log(resp);
this.membershipRoleOptions = resp.rolesList; this.membershipRoleOptions = resp.rolesList;
this.loadingRoles = false; this.loadingRoles = false;
}) })

View File

@ -38,7 +38,6 @@ export class SecretGeneratorComponent implements OnInit {
.then((generators) => { .then((generators) => {
if (generators.resultList) { if (generators.resultList) {
this.generators = generators.resultList; this.generators = generators.resultList;
console.log(this.generators);
} }
}) })
.catch((error) => { .catch((error) => {

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderAzureADComponent { export class ProviderAzureADComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
private service!: ManagementService | AdminService; private service!: ManagementService | AdminService;

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderGithubESComponent { export class ProviderGithubESComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public updateClientSecret: boolean = false; public updateClientSecret: boolean = false;

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderGithubComponent { export class ProviderGithubComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
private service!: ManagementService | AdminService; private service!: ManagementService | AdminService;

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderGitlabSelfHostedComponent { export class ProviderGitlabSelfHostedComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
private service!: ManagementService | AdminService; private service!: ManagementService | AdminService;

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderGitlabComponent { export class ProviderGitlabComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
private service!: ManagementService | AdminService; private service!: ManagementService | AdminService;

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderGoogleComponent { export class ProviderGoogleComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
private service!: ManagementService | AdminService; private service!: ManagementService | AdminService;

View File

@ -29,7 +29,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderJWTComponent { export class ProviderJWTComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT; public serviceType: PolicyComponentServiceType = PolicyComponentServiceType.MGMT;
@ -50,7 +50,6 @@ export class ProviderJWTComponent {
) { ) {
this.route.data.pipe(take(1)).subscribe((data) => { this.route.data.pipe(take(1)).subscribe((data) => {
this.serviceType = data.serviceType; this.serviceType = data.serviceType;
console.log(data.serviceType);
switch (this.serviceType) { switch (this.serviceType) {
case PolicyComponentServiceType.MGMT: case PolicyComponentServiceType.MGMT:

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderOAuthComponent { export class ProviderOAuthComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public updateClientSecret: boolean = false; public updateClientSecret: boolean = false;

View File

@ -30,7 +30,7 @@ import { PolicyComponentServiceType } from '../../policies/policy-component-type
}) })
export class ProviderOIDCComponent { export class ProviderOIDCComponent {
public showOptional: boolean = false; public showOptional: boolean = false;
public options: Options = new Options(); public options: Options = new Options().setIsCreationAllowed(true).setIsLinkingAllowed(true);
public id: string | null = ''; public id: string | null = '';
public updateClientSecret: boolean = false; public updateClientSecret: boolean = false;

View File

@ -70,7 +70,6 @@ export class ProjectGrantDetailComponent {
this.mgmtService this.mgmtService
.getProjectGrantByID(this.grantid, this.projectid) .getProjectGrantByID(this.grantid, this.projectid)
.then((resp) => { .then((resp) => {
console.log(resp);
if (resp.projectGrant) { if (resp.projectGrant) {
this.grant = resp.projectGrant; this.grant = resp.projectGrant;

View File

@ -41,12 +41,10 @@ export class EditDialogComponent implements OnInit {
} }
public setCountryCallingCode(): void { public setCountryCallingCode(): void {
console.log(this);
let value = (this.dialogForm.controls[this.controlKey]?.value as string) || ''; let value = (this.dialogForm.controls[this.controlKey]?.value as string) || '';
this.countryPhoneCodes.forEach((code) => (value = value.replace(`+${code.countryCallingCode}`, ''))); this.countryPhoneCodes.forEach((code) => (value = value.replace(`+${code.countryCallingCode}`, '')));
value = value.trim(); value = value.trim();
this.dialogForm.controls[this.controlKey]?.setValue('+' + this.selected?.countryCallingCode + ' ' + value); this.dialogForm.controls[this.controlKey]?.setValue('+' + this.selected?.countryCallingCode + ' ' + value);
console.log(this);
} }
ngOnInit(): void { ngOnInit(): void {

View File

@ -198,7 +198,6 @@ export class UserDetailComponent implements OnInit {
.generateMachineSecret(this.user.id) .generateMachineSecret(this.user.id)
.then((resp) => { .then((resp) => {
this.toast.showInfo('USER.TOAST.SECRETGENERATED', true); this.toast.showInfo('USER.TOAST.SECRETGENERATED', true);
console.log(resp.clientSecret);
this.dialog.open(MachineSecretDialogComponent, { this.dialog.open(MachineSecretDialogComponent, {
data: { data: {
clientId: resp.clientId, clientId: resp.clientId,

View File

@ -26,7 +26,6 @@ export function ensureOrgExists(ctx: Context, name: string) {
} }
export function isDefaultOrg(ctx: Context, orgId: string): Cypress.Chainable<boolean> { export function isDefaultOrg(ctx: Context, orgId: string): Cypress.Chainable<boolean> {
console.log('huhu', orgId);
return cy return cy
.request({ .request({
method: 'GET', method: 'GET',