Initial project deploy dialog (#10288)

* connection picking dialog for deploy

* add data source option

* fix errors

* merge fix

* show connection name instead of connection string if there is one

* remove unnecessary async

* async (#10292)

* Revert "async (#10292)"

This reverts commit c94139aa45d8f1d868ebd251f3016315718b56ae.

* add a few tests

* addressing comments

* remove cancel click handler

* remove text box for generate script file path because it will just open up a new editor with the script

* fix test

Co-authored-by: Amir Omidi <amomidi@microsoft.com>
This commit is contained in:
Kim Santiago
2020-05-11 18:12:29 -07:00
committed by GitHub
parent 301ce1cf87
commit f3d36c1b86
7 changed files with 347 additions and 3 deletions

View File

@@ -23,6 +23,10 @@ export class ApiWrapper {
return azdata.connection.getCurrentConnection();
}
public openConnectionDialog(): Thenable<azdata.connection.Connection> {
return azdata.connection.openConnectionDialog();
}
public getCredentials(connectionId: string): Thenable<{ [name: string]: string }> {
return azdata.connection.getCredentials(connectionId);
}

View File

@@ -10,6 +10,7 @@ const localize = nls.loadMessageBundle();
// Placeholder values
export const dataSourcesFileName = 'datasources.json';
export const sqlprojExtension = '.sqlproj';
export const initialCatalogSetting = 'Initial Catalog';
// UI Strings
@@ -21,6 +22,23 @@ export const newDatabaseProjectName = localize('newDatabaseProjectName', "New da
export const sqlDatabaseProject = localize('sqlDatabaseProject', "SQL database project");
export function newObjectNamePrompt(objectType: string) { return localize('newObjectNamePrompt', 'New {0} name:', objectType); }
// Deploy dialog strings
export const deployDialogName = localize('deployDialogName', "Deploy Database");
export const deployDialogOkButtonText = localize('deployDialogOkButtonText', "Deploy");
export const cancelButtonText = localize('cancelButtonText', "Cancel");
export const generateScriptButtonText = localize('generateScriptButtonText', "Generate Script");
export const targetDatabaseSettings = localize('targetDatabaseSettings', "Target Database Settings");
export const databaseNameLabel = localize('databaseNameLabel', "Database");
export const deployScriptNameLabel = localize('deployScriptName', "Deploy script name");
export const targetConnectionLabel = localize('targetConnectionLabel', "Target Connection");
export const editConnectionButtonText = localize('editConnectionButtonText', "Edit");
export const clearButtonText = localize('clearButtonText', "Clear");
export const dataSourceRadioButtonLabel = localize('dataSourceRadioButtonLabel', "Data sources");
export const connectionRadioButtonLabel = localize('connectionRadioButtonLabel', "Connections");
export const selectConnectionRadioButtonsTitle = localize('selectconnectionRadioButtonsTitle', "Specify connection from:");
export const dataSourceDropdownTitle = localize('dataSourceDropdownTitle', "Data source");
// Error messages
export const multipleSqlProjFiles = localize('multipleSqlProjFilesSelected', "Multiple .sqlproj files selected; please select only one.");