mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
[SQL Migration] Misc UI improvements (#20723)
* Add TrustServerCertificate to request body * Preselect all dbs for migration * Make disabled checkbox not auto selected * Clarify assessment results in card * Fix incorrect number of dbs ready for migration without issues to MI * Fix SQL DB assessment results incorrectly greying out dbs with MI blocking issues * Revert "Clarify assessment results in card" This reverts commit e8b83f3c19a20ba29133aaa68c4644b04d4154fe. * Revert "Fix incorrect number of dbs ready for migration without issues to MI" This reverts commit d4e10875d132dd218d95be91ae7d46672e247706. * Revert "Fix SQL DB assessment results incorrectly greying out dbs with MI blocking issues" This reverts commit e2a7dcd7352d1c215052a2f6f3f6130fc710eff8. * Add new fields * Fix null reference exception in SKU rec with save and close * Remove unused files * Warnings for in progress migrations in list view * Fix unscrollable assessment results * Fix updating SKU parameters before recommendations are ready * Remove checksum info box * Address PR feedback
This commit is contained in:
@@ -45,14 +45,9 @@ export class AssessmentResultsDialog {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
dialog.registerContent(async (view) => {
|
||||
try {
|
||||
/**
|
||||
* When using 100% height in the dialog, the container extends beyond the screen.
|
||||
* This causes a vertical scrollbar to appear. To fix that, 33px needs to be
|
||||
* subtracted from 100%.
|
||||
*/
|
||||
const flex = view.modelBuilder.flexContainer().withLayout({
|
||||
flexFlow: 'row',
|
||||
height: 'calc( 100% - 33px )',
|
||||
height: '100%',
|
||||
width: '100%'
|
||||
}).component();
|
||||
flex.addItem(await this._tree.createRootContainer(dialog, view), { flex: '1 1 auto' });
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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';
|
||||
import * as loc from '../../constants/strings';
|
||||
|
||||
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().withProps({
|
||||
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().withProps({
|
||||
title: loc.IMPACT,
|
||||
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().withProps({
|
||||
title: loc.RECOMMENDATION,
|
||||
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().withProps({
|
||||
title: loc.MORE_INFO,
|
||||
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().withProps({
|
||||
title: 'Impacted Objects',
|
||||
columns: [
|
||||
loc.TYPE,
|
||||
loc.NAME
|
||||
],
|
||||
data: [
|
||||
['Database', 'AAAW2008P7'] // TODO: Get this string from the actual results
|
||||
]
|
||||
});
|
||||
|
||||
return impactedObjects.component();
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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 SqlAssessmentResultList {
|
||||
async createComponent(view: azdata.ModelView): Promise<azdata.Component> {
|
||||
|
||||
return view.modelBuilder.divContainer().withItems([
|
||||
this.createListComponent(view)
|
||||
]
|
||||
).component();
|
||||
}
|
||||
|
||||
private createListComponent(view: azdata.ModelView): azdata.ListBoxComponent {
|
||||
const list = view.modelBuilder.listBox().withProps({
|
||||
values: [
|
||||
'Filestream not supported in Azure SQL Managed Instance',
|
||||
'Number of Log files per database something something',
|
||||
]
|
||||
});
|
||||
|
||||
return list.component();
|
||||
}
|
||||
}
|
||||
@@ -835,14 +835,11 @@ export class SqlDatabaseTree {
|
||||
let instanceTableValues: azdata.DeclarativeTableCellValue[][] = [];
|
||||
this._databaseTableValues = [];
|
||||
this._dbNames = this._model._databasesForAssessment;
|
||||
const selectedDbs = (this._targetType === MigrationTargetType.SQLVM)
|
||||
? this._model._vmDbs
|
||||
: (this._targetType === MigrationTargetType.SQLMI)
|
||||
? this._model._miDbs
|
||||
: this._model._sqldbDbs;
|
||||
|
||||
this._serverName = (await this._model.getSourceConnectionProfile()).serverName;
|
||||
|
||||
// pre-select the entire list
|
||||
const selectedDbs = this._dbNames.filter(db => this._model._databasesForAssessment.includes(db));
|
||||
|
||||
if (this._targetType === MigrationTargetType.SQLVM || !this._model._assessmentResults) {
|
||||
instanceTableValues = [[
|
||||
{
|
||||
@@ -893,7 +890,7 @@ export class SqlDatabaseTree {
|
||||
}
|
||||
this._databaseTableValues.push([
|
||||
{
|
||||
value: selectedDbs.includes(db.name),
|
||||
value: selectedDbs.includes(db.name) && selectable,
|
||||
style: styleLeft,
|
||||
enabled: selectable
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user