Have default values in add database dialog input boxes (#12155)

* show default values in text boxes

* add sqlcmd formatting

* add tests

* Add some sqlcmd variable name validation

* Addressing comments

* fixes after merge

* fix test

* don't localize OtherServer

* fix for windows

* one more fix

* fix test
This commit is contained in:
Kim Santiago
2020-09-11 14:05:39 -07:00
committed by GitHub
parent 61ceb72cea
commit a567ff6de4
8 changed files with 196 additions and 29 deletions

View File

@@ -849,7 +849,7 @@ export class FileProjectEntry extends ProjectEntry {
}
public pathForSqlProj(): string {
return utils.convertSlashesForSqlProj(this.fsUri.path);
return utils.convertSlashesForSqlProj(this.fsUri.fsPath);
}
}

View File

@@ -58,7 +58,7 @@ async function readConnectionString(xmlDoc: any): Promise<{ connectionId: string
if (xmlDoc.documentElement.getElementsByTagName(constants.targetConnectionString).length > 0) {
const targetConnectionString = xmlDoc.documentElement.getElementsByTagName(constants.TargetConnectionString)[0].textContent;
const dataSource = new SqlConnectionDataSource('temp', targetConnectionString);
const dataSource = new SqlConnectionDataSource('', targetConnectionString);
let server: string = '';
let username: string = '';
const connectionProfile = dataSource.getConnectionProfile();
@@ -74,7 +74,7 @@ async function readConnectionString(xmlDoc: any): Promise<{ connectionId: string
const connection = await azdata.connection.openConnectionDialog(undefined, connectionProfile);
connId = connection.connectionId;
server = connection.options['server'];
username = connection.options['username'];
username = connection.options['user'];
}
targetConnection = `${server} (${username})`;