deployment extensibility (#7394)

* rename button and update dialog button width

* make deployment resource type contributable

* conflicts

* fix card width hight issue

* comments
This commit is contained in:
Alan Ren
2019-09-27 10:13:38 -07:00
committed by GitHub
parent 6ef415d0e6
commit 6385443a4c
8 changed files with 425 additions and 323 deletions

View File

@@ -5,12 +5,12 @@
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { DialogInfo } from './interfaces';
import { NotebookBasedDialogInfo } from './interfaces';
import { NotebookService } from './services/notebookService';
import { PlatformService } from './services/platformService';
import { ResourceTypeService } from './services/resourceTypeService';
import { ToolsService } from './services/toolsService';
import { NotebookInputDialog } from './ui/notebookInputDialog';
import { DeploymentInputDialog } from './ui/deploymentInputDialog';
import { ResourceTypePickerDialog } from './ui/resourceTypePickerDialog';
const localize = nls.loadMessageBundle();
@@ -33,7 +33,7 @@ export function activate(context: vscode.ExtensionContext) {
if (filtered.length !== 1) {
vscode.window.showErrorMessage(localize('resourceDeployment.UnknownResourceType', 'The resource type: {0} is not defined', resourceTypeName));
} else {
const dialog = new ResourceTypePickerDialog(context, toolsService, resourceTypeService, filtered[0]);
const dialog = new ResourceTypePickerDialog(toolsService, resourceTypeService, filtered[0]);
dialog.open();
}
};
@@ -44,11 +44,11 @@ export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('azdata.resource.sql-bdc.deploy', () => {
openDialog('sql-bdc');
});
vscode.commands.registerCommand('azdata.resource.deploy', () => {
openDialog('sql-bdc');
vscode.commands.registerCommand('azdata.resource.deploy', (resourceType: string = 'sql-image') => {
openDialog(resourceType);
});
vscode.commands.registerCommand('azdata.openNotebookInputDialog', (dialogInfo: DialogInfo) => {
const dialog = new NotebookInputDialog(notebookService, dialogInfo);
vscode.commands.registerCommand('azdata.openNotebookInputDialog', (dialogInfo: NotebookBasedDialogInfo) => {
const dialog = new DeploymentInputDialog(notebookService, dialogInfo);
dialog.open();
});
}