diff --git a/public/app/features/datasources/utils/passwordHandlers.test.ts b/public/app/features/datasources/utils/passwordHandlers.test.ts index 2dddc4fc130..f1bf86f34eb 100644 --- a/public/app/features/datasources/utils/passwordHandlers.test.ts +++ b/public/app/features/datasources/utils/passwordHandlers.test.ts @@ -2,7 +2,7 @@ import { createResetHandler, PasswordFieldEnum, Ctrl } from './passwordHandlers' describe('createResetHandler', () => { Object.keys(PasswordFieldEnum).forEach(fieldKey => { - const field = PasswordFieldEnum[fieldKey]; + const field: any = PasswordFieldEnum[fieldKey as any]; it(`should reset existing ${field} field`, () => { const event: any = { diff --git a/public/app/features/datasources/utils/passwordHandlers.ts b/public/app/features/datasources/utils/passwordHandlers.ts index f7bcdc1aec2..25f9298fb3d 100644 --- a/public/app/features/datasources/utils/passwordHandlers.ts +++ b/public/app/features/datasources/utils/passwordHandlers.ts @@ -15,8 +15,14 @@ export enum PasswordFieldEnum { */ export type Ctrl = { current: { - secureJsonFields: {}; - secureJsonData?: {}; + secureJsonFields: { + [key: string]: boolean; + }; + secureJsonData?: { + [key: string]: string; + }; + password?: string; + basicAuthPassword?: string; }; };