[SQL Migration] Properly respect user's encryptConnection and trustServerCertificate settings (#21824)

* WIP

* Always get latest current connection

* Update more references

* Clean up

* Clean up

* vbump

* Update comments

* Address PR feedback

* Separate into helper methods
This commit is contained in:
Raymond Truong
2023-02-08 10:12:11 -08:00
committed by GitHub
parent 99a924dbcd
commit 480d8e2cd0
25 changed files with 206 additions and 154 deletions

View File

@@ -15,6 +15,7 @@ import { SelectMigrationServiceDialog } from '../dialog/selectMigrationService/s
import { logError, TelemetryViews } from '../telemetry';
import { AdsMigrationStatus, ServiceContextChangeEvent, TabBase } from './tabBase';
import { DashboardStatusBar } from './DashboardStatusBar';
import { getSourceConnectionId } from '../api/sqlUtils';
interface IActionMetadata {
title?: string,
@@ -764,11 +765,10 @@ export class DashboardTab extends TabBase<DashboardTab> {
})
.component();
const connectionProfile = await azdata.connection.getCurrentConnection();
this.disposables.push(
this.serviceContextChangedEvent.event(
async (e) => {
if (e.connectionId === connectionProfile.connectionId) {
if (e.connectionId === await getSourceConnectionId()) {
await this.updateServiceContext(this._serviceContextButton);
await this.refresh();
}