From: Nizamudeen A Date: Thu, 30 Sep 2021 07:47:15 +0000 (+0530) Subject: mgr/dashboard: Taking care of deprecation warnings and other errors X-Git-Tag: v17.1.0~769^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f7d73d0420147300cbd6189620495498d27ec861;p=ceph-ci.git mgr/dashboard: Taking care of deprecation warnings and other errors 1. deprecation group is deprecated: This API is not typesafe and can result in issues with Closure Compiler renaming. Use the `FormBuilder#group` overload with `AbstractControlOptions` instead. 2. cypress/integration/rgw/users.po.ts(113,23): error TS2345: Argument of type 'void' is not assignable to parameter of type 'string'. 3. Cannot find module 'isomorphic-form-data' from 'node_modules/swagger-ui/dist/swagger-ui.js' Fixes: https://tracker.ceph.com/issues/50268 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts index 7ded71f59a9..a4266f989e0 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/users.po.ts @@ -109,7 +109,7 @@ export class UsersPageHelper extends PageHelper { // creating this user to edit for the test this.navigateTo('create'); this.create(tenant, uname, 'xxx', 'xxx@xxx', '50'); - + const name = tenant + '$' + uname; this.navigateEdit(name); // put invalid email to make field invalid diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-builder.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-builder.ts index 307407a2fc5..9741b1e6377 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-builder.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-builder.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; +import { AbstractControlOptions, FormBuilder } from '@angular/forms'; import { CdFormGroup } from './cd-form-group'; @@ -12,7 +12,7 @@ import { CdFormGroup } from './cd-form-group'; export class CdFormBuilder extends FormBuilder { group( controlsConfig: { [key: string]: any }, - extra: { [key: string]: any } | null = null + extra: AbstractControlOptions | null = null ): CdFormGroup { const form = super.group(controlsConfig, extra); return new CdFormGroup(form.controls, form.validator, form.asyncValidator);