mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix VM Page displaying MI assessment results (#15190)
* fix vm page displaying mi assessment results * vm page fix
This commit is contained in:
@@ -364,6 +364,7 @@ export const INSTANCE = localize('sql.migration.instance', "Instance");
|
|||||||
export const WARNINGS = localize('sql.migration.warnings', "Warnings");
|
export const WARNINGS = localize('sql.migration.warnings', "Warnings");
|
||||||
export const IMPACTED_OBJECTS = localize('sql.migration.impacted.objects', "Impacted Objects");
|
export const IMPACTED_OBJECTS = localize('sql.migration.impacted.objects', "Impacted Objects");
|
||||||
export const OBJECT_DETAILS = localize('sql.migration.object.details', "Object details");
|
export const OBJECT_DETAILS = localize('sql.migration.object.details', "Object details");
|
||||||
|
export const ASSESSMENT_RESULTS = localize('sql.migration.assessmen.results', "Assessment Results");
|
||||||
export const TYPES_LABEL = localize('sql.migration.type.label', "Type:");
|
export const TYPES_LABEL = localize('sql.migration.type.label', "Type:");
|
||||||
export const NAMES_LABEL = localize('sql.migration.name.label', "Names:");
|
export const NAMES_LABEL = localize('sql.migration.name.label', "Names:");
|
||||||
export const DESCRIPTION = localize('sql.migration.description', "Description");
|
export const DESCRIPTION = localize('sql.migration.description', "Description");
|
||||||
|
|||||||
@@ -179,8 +179,12 @@ export class SqlDatabaseTree {
|
|||||||
this._databaseTable.onRowSelected(({ row }) => {
|
this._databaseTable.onRowSelected(({ row }) => {
|
||||||
|
|
||||||
this._databaseTable.focus();
|
this._databaseTable.focus();
|
||||||
|
if (this._targetType === MigrationTargetType.SQLMI) {
|
||||||
this._activeIssues = this._model._assessmentResults?.databaseAssessments[row].issues;
|
this._activeIssues = this._model._assessmentResults?.databaseAssessments[row].issues;
|
||||||
this._selectedIssue = this._model._assessmentResults?.databaseAssessments[row].issues[0];
|
this._selectedIssue = this._model._assessmentResults?.databaseAssessments[row].issues[0];
|
||||||
|
} else {
|
||||||
|
this._activeIssues = [];
|
||||||
|
}
|
||||||
this._dbName.value = this._dbNames[row];
|
this._dbName.value = this._dbNames[row];
|
||||||
this._recommendationTitle.value = constants.ISSUES_COUNT(this._activeIssues.length);
|
this._recommendationTitle.value = constants.ISSUES_COUNT(this._activeIssues.length);
|
||||||
this._recommendation.value = constants.ISSUES_DETAILS;
|
this._recommendation.value = constants.ISSUES_DETAILS;
|
||||||
@@ -349,7 +353,7 @@ export class SqlDatabaseTree {
|
|||||||
value: constants.NO_ISSUES_FOUND_VM,
|
value: constants.NO_ISSUES_FOUND_VM,
|
||||||
CSSStyles: {
|
CSSStyles: {
|
||||||
'font-size': '14px',
|
'font-size': '14px',
|
||||||
'width': '400px',
|
'width': '100%',
|
||||||
'margin': '10px 0px 0px 0px',
|
'margin': '10px 0px 0px 0px',
|
||||||
'text-align': 'left'
|
'text-align': 'left'
|
||||||
}
|
}
|
||||||
@@ -359,7 +363,7 @@ export class SqlDatabaseTree {
|
|||||||
value: constants.NO_ISSUES_FOUND_MI,
|
value: constants.NO_ISSUES_FOUND_MI,
|
||||||
CSSStyles: {
|
CSSStyles: {
|
||||||
'font-size': '14px',
|
'font-size': '14px',
|
||||||
'width': '400px',
|
'width': '100%',
|
||||||
'margin': '10px 0px 0px 0px',
|
'margin': '10px 0px 0px 0px',
|
||||||
'text-align': 'left'
|
'text-align': 'left'
|
||||||
}
|
}
|
||||||
@@ -744,6 +748,7 @@ export class SqlDatabaseTree {
|
|||||||
|
|
||||||
public refreshResults(): void {
|
public refreshResults(): void {
|
||||||
const assessmentResults: azdata.DeclarativeTableCellValue[][] = [];
|
const assessmentResults: azdata.DeclarativeTableCellValue[][] = [];
|
||||||
|
if (this._model._targetType === MigrationTargetType.SQLMI) {
|
||||||
if (this._activeIssues.length === 0) {
|
if (this._activeIssues.length === 0) {
|
||||||
/// show no issues here
|
/// show no issues here
|
||||||
this._assessmentsTable.updateCssStyles({
|
this._assessmentsTable.updateCssStyles({
|
||||||
@@ -768,6 +773,20 @@ export class SqlDatabaseTree {
|
|||||||
'display': 'none'
|
'display': 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this._assessmentsTable.updateCssStyles({
|
||||||
|
'display': 'none',
|
||||||
|
'border-right': 'none'
|
||||||
|
});
|
||||||
|
this._assessmentContainer.updateCssStyles({
|
||||||
|
'display': 'none'
|
||||||
|
});
|
||||||
|
this._noIssuesContainer.updateCssStyles({
|
||||||
|
'display': 'flex'
|
||||||
|
});
|
||||||
|
this._recommendationTitle.value = constants.ASSESSMENT_RESULTS;
|
||||||
|
this._recommendation.value = '';
|
||||||
|
}
|
||||||
this._activeIssues.forEach((v) => {
|
this._activeIssues.forEach((v) => {
|
||||||
assessmentResults.push(
|
assessmentResults.push(
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user