mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 09:35:39 -05:00
* fixed right click context menu bug in jobs view * added stepInfo and edit job WIP * show jobs in job edit * added schedule description on select schedule * fetch schedules during history and show in edit job * added alerts to job histories and show in edit * made history calls async * filter menus now close when esc is pressed * fixed bug where clicking on error row wouldnt populate job details * added functionality to delete steps in a job * added real time adding steps in edit job
72 lines
3.0 KiB
TypeScript
72 lines
3.0 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
'use strict';
|
|
|
|
import * as nls from 'vscode-nls';
|
|
import * as sqlops from 'sqlops';
|
|
import * as vscode from 'vscode';
|
|
import { AlertDialog } from './dialogs/alertDialog';
|
|
import { JobDialog } from './dialogs/jobDialog';
|
|
import { OperatorDialog } from './dialogs/operatorDialog';
|
|
import { ProxyDialog } from './dialogs/proxyDialog';
|
|
import { JobStepDialog } from './dialogs/jobStepDialog';
|
|
import { PickScheduleDialog } from './dialogs/pickScheduleDialog';
|
|
|
|
const localize = nls.loadMessageBundle();
|
|
|
|
/**
|
|
* The main controller class that initializes the extension
|
|
*/
|
|
export class MainController {
|
|
protected _context: vscode.ExtensionContext;
|
|
|
|
// PUBLIC METHODS //////////////////////////////////////////////////////
|
|
public constructor(context: vscode.ExtensionContext) {
|
|
this._context = context;
|
|
}
|
|
|
|
public static showNotYetImplemented(): void {
|
|
vscode.window.showInformationMessage(
|
|
localize('mainController.notImplemented', "This feature is under development. Check-out the latest insiders build if you'd like to try out the most recent changes!"));
|
|
}
|
|
|
|
/**
|
|
* Activates the extension
|
|
*/
|
|
public activate(): void {
|
|
vscode.commands.registerCommand('agent.openJobDialog', (ownerUri: string, jobInfo: sqlops.AgentJobInfo) => {
|
|
let dialog = new JobDialog(ownerUri, jobInfo);
|
|
dialog.openDialog();
|
|
});
|
|
vscode.commands.registerCommand('agent.openNewStepDialog', (ownerUri: string, server: string, stepId: number) => {
|
|
let dialog = new JobStepDialog(ownerUri, server, stepId);
|
|
dialog.openDialog();
|
|
});
|
|
vscode.commands.registerCommand('agent.openPickScheduleDialog', (ownerUri: string) => {
|
|
let dialog = new PickScheduleDialog(ownerUri);
|
|
dialog.showDialog();
|
|
});
|
|
vscode.commands.registerCommand('agent.openAlertDialog', (ownerUri: string, alertInfo: sqlops.AgentAlertInfo, jobs: string[]) => {
|
|
let dialog = new AlertDialog(ownerUri, alertInfo, jobs);
|
|
dialog.openDialog();
|
|
});
|
|
vscode.commands.registerCommand('agent.openOperatorDialog', (ownerUri: string, operatorInfo: sqlops.AgentOperatorInfo) => {
|
|
let dialog = new OperatorDialog(ownerUri, operatorInfo);
|
|
dialog.openDialog();
|
|
});
|
|
vscode.commands.registerCommand('agent.openProxyDialog', (ownerUri: string, proxyInfo: sqlops.AgentProxyInfo, credentials: sqlops.CredentialInfo[]) => {
|
|
let dialog = new ProxyDialog(ownerUri, proxyInfo, credentials);
|
|
dialog.openDialog();
|
|
MainController.showNotYetImplemented();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Deactivates the extension
|
|
*/
|
|
public deactivate(): void {
|
|
}
|
|
}
|