mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
* wip * wip * database selector table * fixed db icon * wip * fixed assessment results table * replaced large query * fix build error * updated spacing and other fixes * removed commented code * added search bar, fix margins, disable checkbox for offline db * change width of checkbox column * changed api to require databases * Revert "changed api to require databases" This reverts commit 20fe2d8bd223bae90dfb09609225a1781267a01d. * removed optional flag from databases parameter * removed icons on assessment dialog page * formatting changes, fixed search * bump STS * bumped extension version number * one excludeDbs
44 lines
1.6 KiB
TypeScript
44 lines
1.6 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as mssql from '../mssql';
|
|
import { AppContext } from '../appContext';
|
|
import { SqlOpsDataClient, ISqlOpsFeature } from 'dataprotocol-client';
|
|
import { ClientCapabilities } from 'vscode-languageclient';
|
|
import * as constants from '../constants';
|
|
import * as contracts from '../contracts';
|
|
|
|
export class SqlMigrationService implements mssql.ISqlMigrationService {
|
|
public static asFeature(context: AppContext): ISqlOpsFeature {
|
|
return class extends SqlMigrationService {
|
|
constructor(client: SqlOpsDataClient) {
|
|
super(context, client);
|
|
}
|
|
|
|
fillClientCapabilities(capabilities: ClientCapabilities): void {
|
|
}
|
|
|
|
initialize(): void {
|
|
}
|
|
};
|
|
}
|
|
|
|
private constructor(context: AppContext, protected readonly client: SqlOpsDataClient) {
|
|
context.registerService(constants.SqlMigrationService, this);
|
|
}
|
|
|
|
async getAssessments(ownerUri: string, databases: string[]): Promise<mssql.AssessmentResult | undefined> {
|
|
let params: contracts.SqlMigrationAssessmentParams = { ownerUri: ownerUri, databases: databases };
|
|
try {
|
|
return this.client.sendRequest(contracts.GetSqlMigrationAssessmentItemsRequest.type, params);
|
|
}
|
|
catch (e) {
|
|
this.client.logFailedRequest(contracts.GetSqlMigrationAssessmentItemsRequest.type, e);
|
|
}
|
|
|
|
return undefined;
|
|
}
|
|
}
|