mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 09:35:41 -05:00
Set dashboard DB to master only for MSSQL provider (#4321)
This commit is contained in:
@@ -48,8 +48,15 @@ export class ServerDashboardPage extends DashboardPage implements OnInit {
|
||||
@Inject(IConfigurationService) configurationService: IConfigurationService
|
||||
) {
|
||||
super(dashboardService, el, _cd, instantiationService, notificationService, angularEventingService, configurationService);
|
||||
// revert back to default database
|
||||
this._letDashboardPromise = this.dashboardService.connectionManagementService.changeDatabase('master');
|
||||
|
||||
// special-case handling for MSSQL data provider
|
||||
let connInfo = this.dashboardService.connectionManagementService.connectionInfo;
|
||||
if (connInfo && connInfo.providerId === 'MSSQL') {
|
||||
// revert back to default database
|
||||
this._letDashboardPromise = this.dashboardService.connectionManagementService.changeDatabase('master');
|
||||
} else {
|
||||
this._letDashboardPromise = Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
Reference in New Issue
Block a user