resource deployment extension (#5464)

* initial checkin

* exclude from default ads package

* keep extensions.js in sync

* address review feedback

* PR comments
This commit is contained in:
Alan Ren
2019-05-13 22:38:59 -07:00
committed by GitHub
parent 99d00e2057
commit b1b58f2550
28 changed files with 1011 additions and 16 deletions
@@ -0,0 +1,5 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
@@ -0,0 +1,24 @@
/*---------------------------------------------------------------------------------------------
* 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 vscode = require('vscode');
import { ResourceDeploymentDialog } from './ui/resourceDeploymentDialog';
export function activate(context: vscode.ExtensionContext) {
vscode.commands.registerCommand('azdata.resource.sql-image.deploy', () => {
let dialog = new ResourceDeploymentDialog();
dialog.open();
});
vscode.commands.registerCommand('azdata.resource.sql-bdc.deploy', () => {
let dialog = new ResourceDeploymentDialog();
dialog.open();
});
}
// this method is called when your extension is deactivated
export function deactivate(): void {
}
+9
View File
@@ -0,0 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference types='@types/node'/>
@@ -0,0 +1,31 @@
/*---------------------------------------------------------------------------------------------
* 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 azdata from 'azdata';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
export class ResourceDeploymentDialog {
private dialogObject: azdata.window.Dialog;
constructor() {
this.dialogObject = azdata.window.createModelViewDialog(localize('deploymentDialog.title', 'Install SQL Server'), 'resourceDeploymentDialog', true);
}
private initializeDialog() {
let tab = azdata.window.createTab('');
tab.registerContent((view: azdata.ModelView) => {
let text = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({ value: 'place holder' }).component();
return view.initializeModel(text);
});
this.dialogObject.content = [tab];
}
public open(): void {
this.initializeDialog();
azdata.window.openDialog(this.dialogObject);
}
}