mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 01:25:36 -05:00
Set original database for connection done through connection dialog (#17266)
* check if database connection * Change name of isMaster and remove import * Set to false * take out connecttodatabase * remove connecttodatabase * Original database * remove empty string check * clean * set original database for when saving connection * pass unit test * map -> find * PR changes * Comments for original database
This commit is contained in:
@@ -150,7 +150,7 @@ export class AsmtResultsViewComponent extends TabChild implements IAssessmentCom
|
||||
let self = this;
|
||||
const profile = this._commonService.connectionManagementService.connectionInfo.connectionProfile;
|
||||
|
||||
this.isServerMode = !profile.databaseName || Utils.isMaster(profile);
|
||||
this.isServerMode = !profile.databaseName || Utils.isServerConnection(profile);
|
||||
|
||||
if (this.isServerMode) {
|
||||
this.placeholderNoResultsLabel = nls.localize('asmt.TargetInstanceComplient', "Instance {0} is totally compliant with the best practices. Good job!", profile.serverName);
|
||||
|
||||
@@ -40,7 +40,7 @@ export class DashboardComponent extends AngularDisposable implements OnInit {
|
||||
this._register(this.themeService.onDidColorThemeChange(this.updateTheme, this));
|
||||
this.updateTheme(this.themeService.getColorTheme());
|
||||
const profile: IConnectionProfile = this._bootstrapService.getOriginalConnectionProfile();
|
||||
if (profile && (!profile.databaseName || Utils.isMaster(profile))) {
|
||||
if (profile && (!profile.databaseName || Utils.isServerConnection(profile))) {
|
||||
// Route to the server page as this is the default database
|
||||
this._router.navigate(['server-dashboard']).catch(onUnexpectedError);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ suite('Connection Utilities tests', () => {
|
||||
|
||||
|
||||
test('isMaster - test if isMaster recognizes Connection Profile as server connection', () => {
|
||||
assert(ConnectionUtils.isMaster(connection));
|
||||
assert(ConnectionUtils.isServerConnection(connection));
|
||||
});
|
||||
|
||||
test('parseTimeString - test if time is parsed correctly', () => {
|
||||
|
||||
Reference in New Issue
Block a user