mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
Agent - Accessibility Bugs (WIP) (#5807)
* fix accessbility issue where tabbing would get wrong focus * dialogs open one at a time * get focus on filter headers * added tool tips to proxy dialog * added labels to step dialog
This commit is contained in:
@@ -22,7 +22,13 @@ const localize = nls.loadMessageBundle();
|
||||
* The main controller class that initializes the extension
|
||||
*/
|
||||
export class MainController {
|
||||
|
||||
protected _context: vscode.ExtensionContext;
|
||||
private jobDialog: JobDialog;
|
||||
private jobStepDialog: JobStepDialog;
|
||||
private alertDialog: AlertDialog;
|
||||
private operatorDialog: OperatorDialog;
|
||||
private proxyDialog: ProxyDialog;
|
||||
|
||||
// PUBLIC METHODS //////////////////////////////////////////////////////
|
||||
public constructor(context: vscode.ExtensionContext) {
|
||||
@@ -39,8 +45,12 @@ export class MainController {
|
||||
*/
|
||||
public activate(): void {
|
||||
vscode.commands.registerCommand('agent.openJobDialog', async (ownerUri: string, jobInfo: azdata.AgentJobInfo) => {
|
||||
let dialog = new JobDialog(ownerUri, jobInfo);
|
||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||
if (!this.jobDialog || (this.jobDialog && !this.jobDialog.isOpen)) {
|
||||
this.jobDialog = new JobDialog(ownerUri, jobInfo);
|
||||
}
|
||||
if (!this.jobDialog.isOpen) {
|
||||
this.jobDialog.dialogName ? await this.jobDialog.openDialog(this.jobDialog.dialogName) : await this.jobDialog.openDialog();
|
||||
}
|
||||
});
|
||||
vscode.commands.registerCommand('agent.openNewStepDialog', (ownerUri: string, server: string, jobInfo: azdata.AgentJobInfo, jobStepInfo: azdata.AgentJobStepInfo) => {
|
||||
AgentUtils.getAgentService().then(async (agentService) => {
|
||||
@@ -53,20 +63,33 @@ export class MainController {
|
||||
let dialog = new PickScheduleDialog(ownerUri, jobName);
|
||||
await dialog.showDialog();
|
||||
});
|
||||
vscode.commands.registerCommand('agent.openAlertDialog', (ownerUri: string, jobInfo: azdata.AgentJobInfo, alertInfo: azdata.AgentAlertInfo) => {
|
||||
AgentUtils.getAgentService().then(async (agentService) => {
|
||||
let jobData: JobData = new JobData(ownerUri, jobInfo, agentService);
|
||||
let dialog = new AlertDialog(ownerUri, jobData, alertInfo, false);
|
||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||
});
|
||||
vscode.commands.registerCommand('agent.openAlertDialog', async (ownerUri: string, jobInfo: azdata.AgentJobInfo, alertInfo: azdata.AgentAlertInfo) => {
|
||||
if (!this.alertDialog || (this.alertDialog && !this.alertDialog.isOpen)) {
|
||||
await AgentUtils.getAgentService().then(async (agentService) => {
|
||||
let jobData: JobData = new JobData(ownerUri, jobInfo, agentService);
|
||||
this.alertDialog = new AlertDialog(ownerUri, jobData, alertInfo, false);
|
||||
});
|
||||
}
|
||||
if (!this.alertDialog.isOpen) {
|
||||
this.alertDialog.dialogName ? await this.alertDialog.openDialog(this.alertDialog.dialogName) : await this.alertDialog.openDialog();
|
||||
}
|
||||
});
|
||||
vscode.commands.registerCommand('agent.openOperatorDialog', async (ownerUri: string, operatorInfo: azdata.AgentOperatorInfo) => {
|
||||
let dialog = new OperatorDialog(ownerUri, operatorInfo);
|
||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||
if (!this.operatorDialog || (this.operatorDialog && !this.operatorDialog.isOpen)) {
|
||||
this.operatorDialog = new OperatorDialog(ownerUri, operatorInfo);
|
||||
}
|
||||
if (!this.operatorDialog.isOpen) {
|
||||
this.operatorDialog.dialogName ? await this.operatorDialog.openDialog(this.operatorDialog.dialogName) : await this.operatorDialog.openDialog();
|
||||
}
|
||||
});
|
||||
vscode.commands.registerCommand('agent.openProxyDialog', async (ownerUri: string, proxyInfo: azdata.AgentProxyInfo, credentials: azdata.CredentialInfo[]) => {
|
||||
let dialog = new ProxyDialog(ownerUri, proxyInfo, credentials);
|
||||
dialog.dialogName ? await dialog.openDialog(dialog.dialogName) : await dialog.openDialog();
|
||||
if (!this.proxyDialog || (this.proxyDialog && !this.proxyDialog.isOpen)) {
|
||||
this.proxyDialog = new ProxyDialog(ownerUri, proxyInfo, credentials);
|
||||
}
|
||||
if (!this.proxyDialog.isOpen) {
|
||||
this.proxyDialog.dialogName ? await this.proxyDialog.openDialog(this.proxyDialog.dialogName) : await this.proxyDialog.openDialog();
|
||||
}
|
||||
this.proxyDialog.dialogName ? await this.proxyDialog.openDialog(this.proxyDialog.dialogName) : await this.proxyDialog.openDialog();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user