mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Add target platform dropdown to new project dialog (#16091)
* add target platform as an option in create project api * move constant * WIP * show versions in dialog and create project with selected version * validate version * add error messages * add test * change version to target platform * cleanup * more cleanup * use withProps
This commit is contained in:
@@ -225,6 +225,9 @@ export function notValidVariableName(name: string) { return localize('notValidVa
|
||||
export function cantAddCircularProjectReference(project: string) { return localize('cantAddCircularProjectReference', "A reference to project '{0}' cannot be added. Adding this project as a reference would cause a circular dependency", project); }
|
||||
export function unableToFindSqlCmdVariable(variableName: string) { return localize('unableToFindSqlCmdVariable', "Unable to find SQLCMD variable '{0}'", variableName); }
|
||||
export function unableToFindDatabaseReference(reference: string) { return localize('unableToFindReference', "Unable to find database reference {0}", reference); }
|
||||
export function invalidGuid(guid: string) { return localize('invalidGuid', "Specified GUID is invalid: {0}", guid); }
|
||||
export function invalidTargetPlatform(targetPlatform: string, supportedTargetPlatforms: string[]) { return localize('invalidTargetPlatform', "Invalid target platform: {0}. Supported target platforms: {1}", targetPlatform, supportedTargetPlatforms.toString()); }
|
||||
|
||||
|
||||
// Action types
|
||||
export const deleteAction = localize('deleteAction', 'Delete');
|
||||
@@ -348,6 +351,7 @@ export const sameDatabaseExampleUsage = 'SELECT * FROM [Schema1].[Table1]';
|
||||
export function differentDbSameServerExampleUsage(db: string) { return `SELECT * FROM [${db}].[Schema1].[Table1]`; }
|
||||
export function differentDbDifferentServerExampleUsage(server: string, db: string) { return `SELECT * FROM [${server}].[${db}].[Schema1].[Table1]`; }
|
||||
|
||||
// Target platforms
|
||||
export const targetPlatformToVersion: Map<string, string> = new Map<string, string>([
|
||||
[SqlTargetPlatform.sqlServer2005, '90'],
|
||||
[SqlTargetPlatform.sqlServer2008, '100'],
|
||||
@@ -363,7 +367,8 @@ export const targetPlatformToVersion: Map<string, string> = new Map<string, stri
|
||||
// DW is special since the system dacpac folder has a different name from the target platform
|
||||
export const AzureDwFolder = 'AzureDw';
|
||||
|
||||
export const defaultDSP = targetPlatformToVersion.get(SqlTargetPlatform.sqlServer2019)!;
|
||||
export const defaultTargetPlatform = SqlTargetPlatform.sqlServer2019;
|
||||
export const defaultDSP = targetPlatformToVersion.get(defaultTargetPlatform)!;
|
||||
|
||||
/**
|
||||
* Returns the name of the target platform of the version of sql
|
||||
|
||||
Reference in New Issue
Block a user