mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
* - Added coming soon message for learn more. - Potential fix for learn more message * Renaming of controller to sqlMigrationService * Surfacing some errors -Azure account is stale error -Migration Service creation error. * Adding refresh azure token validation. * Fixing some errors pointed during PR -Fixing property names -Fixing count * Fixing migration status - Adding special error handling for resource not found error - Deleting unfound migrations from local cache - Using prefetched migration status for view all Misc fixes: - Using SQL server version name instead of number - Fixing Icons on sku recommendation page - Fixing table column width in cutover dialog - Adding spinner button to refresh. * Fixing all strings in migration service page and dialog * fixed a string error in create service dialog * Adding source config page to migration to support windows auth Some refactorings for sqlDatabaseTree (still WIP) * refactoring assessments code 1 introducing new interface for server assessments * Filtering out non windows sql vms Retaining selections made by user on assessments dialog * Fix compile errors on sqlDatabaseTree * Exposing migration status errors in cutover dialog * Updating extension verion * Correcting typos Fixing compilation erros Removing en-us from url Fixing function names Make UI calls unblocking * Unblocking dialog in case of failed assessments Localizing string removing blocking code from UI Fixing comments * Fixed broken assessment page logic
74 lines
3.0 KiB
TypeScript
74 lines
3.0 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 azdata from 'azdata';
|
|
export class SqlAssessmentResult {
|
|
async createComponent(view: azdata.ModelView): Promise<azdata.Component> {
|
|
|
|
const title = this.createTitleComponent(view);
|
|
const impact = this.createImpactComponent(view);
|
|
const recommendation = this.createRecommendationComponent(view);
|
|
const moreInfo = this.createMoreInfoComponent(view);
|
|
const impactedObjects = this.createImpactedObjectsComponent(view);
|
|
|
|
return view.modelBuilder.divContainer().withItems([title, impact, recommendation, moreInfo, impactedObjects]).component();
|
|
}
|
|
|
|
private createTitleComponent(view: azdata.ModelView): azdata.TextComponent {
|
|
const title = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
|
value: 'Azure SQL Managed Instance does not support multiple log files', // TODO: Get this string from the actual results
|
|
});
|
|
|
|
return title.component();
|
|
}
|
|
|
|
private createImpactComponent(view: azdata.ModelView): azdata.TextComponent {
|
|
const impact = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
|
title: 'Impact', // TODO localize
|
|
value: 'SQL Server allows a database to log transactions across multiple files. This databases uses multiple log files' // TODO: Get this string from the actual results
|
|
});
|
|
|
|
return impact.component();
|
|
}
|
|
|
|
private createRecommendationComponent(view: azdata.ModelView): azdata.TextComponent {
|
|
const recommendation = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
|
title: 'Recommendation', // TODO localize
|
|
value: 'Azure SQL Managed Instance allows a single log file per database only. Please delete all but one of the log files before migrating this database.' // TODO: Get this string from the actual results
|
|
});
|
|
|
|
return recommendation.component();
|
|
}
|
|
|
|
private createMoreInfoComponent(view: azdata.ModelView): azdata.TextComponent {
|
|
const moreInfo = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
|
title: 'More info', // TODO localize
|
|
value: '{0}',
|
|
links: [
|
|
{
|
|
text: 'Managed instance T-SQL differences - Azure SQL Database', // TODO: Get this string from the actual results
|
|
url: 'https://microsoft.com' // TODO: Get this string from the actual results
|
|
}
|
|
]
|
|
});
|
|
|
|
return moreInfo.component();
|
|
}
|
|
|
|
private createImpactedObjectsComponent(view: azdata.ModelView): azdata.TableComponent {
|
|
const impactedObjects = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
|
title: 'Impacted Objects',
|
|
columns: [
|
|
'Type', // TODO localize
|
|
'Name',
|
|
],
|
|
data: [
|
|
['Database', 'AAAW2008P7'] // TODO: Get this string from the actual results
|
|
]
|
|
});
|
|
|
|
return impactedObjects.component();
|
|
}
|
|
}
|