mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Migrate cert validation error handling to mssql extension (#21829)
This commit is contained in:
@@ -8,6 +8,8 @@ import { WizardModal } from 'sql/workbench/services/dialog/browser/wizardModal';
|
||||
import { Dialog, Wizard } from 'sql/workbench/services/dialog/common/dialogTypes';
|
||||
import { IModalOptions } from 'sql/workbench/browser/modal/modal';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ErrorMessageDialog } from 'sql/workbench/services/errorMessage/browser/errorMessageDialog';
|
||||
import { IErrorDialogOptions } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
export const DefaultDialogOptions: IModalOptions = { hasBackButton: false, width: 'narrow', hasErrors: true, hasSpinner: true };
|
||||
export const DefaultWizardOptions: IModalOptions = { hasBackButton: false, width: 'wide', hasErrors: true, hasSpinner: true };
|
||||
@@ -51,4 +53,15 @@ export class CustomDialogService {
|
||||
public getWizardModal(wizard: Wizard): WizardModal | undefined {
|
||||
return this._wizardModals.get(wizard);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows error dialog customized with given options
|
||||
* @param options Error Dialog options to customize error message dialog.
|
||||
*/
|
||||
public async openCustomErrorDialog(options: IErrorDialogOptions): Promise<string | undefined> {
|
||||
let dialog = this._instantiationService.createInstance(ErrorMessageDialog);
|
||||
dialog.render();
|
||||
let result = await dialog.openCustomAsync(options);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user