mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Disable checkbox for blocking migration issues (#15131)
* disable checkbox for blocking issues * wip * disable checkbox fixes * fix strings
This commit is contained in:
1
extensions/mssql/src/mssql.d.ts
vendored
1
extensions/mssql/src/mssql.d.ts
vendored
@@ -523,6 +523,7 @@ export interface SqlMigrationImpactedObjectInfo {
|
|||||||
export interface SqlMigrationAssessmentResultItem {
|
export interface SqlMigrationAssessmentResultItem {
|
||||||
rulesetVersion: string;
|
rulesetVersion: string;
|
||||||
rulesetName: string;
|
rulesetName: string;
|
||||||
|
ruleId: string;
|
||||||
targetType: azdata.sqlAssessment.SqlAssessmentTargetType;
|
targetType: azdata.sqlAssessment.SqlAssessmentTargetType;
|
||||||
targetName: string;
|
targetName: string;
|
||||||
checkId: string;
|
checkId: string;
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ const headerRight: azdata.CssStyles = {
|
|||||||
'border-bottom': '1px solid'
|
'border-bottom': '1px solid'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const blockingIssues: Array<string> = [
|
||||||
|
'MultipleLogFiles',
|
||||||
|
'FileStream',
|
||||||
|
'MIDatabaseSize'
|
||||||
|
];
|
||||||
|
|
||||||
export class SqlDatabaseTree {
|
export class SqlDatabaseTree {
|
||||||
private _view!: azdata.ModelView;
|
private _view!: azdata.ModelView;
|
||||||
private _instanceTable!: azdata.DeclarativeTableComponent;
|
private _instanceTable!: azdata.DeclarativeTableComponent;
|
||||||
@@ -802,15 +808,19 @@ export class SqlDatabaseTree {
|
|||||||
// Reset the dbName list so that it is in sync with the table
|
// Reset the dbName list so that it is in sync with the table
|
||||||
this._dbNames = this._model._assessmentResults.databaseAssessments.map(da => da.name);
|
this._dbNames = this._model._assessmentResults.databaseAssessments.map(da => da.name);
|
||||||
this._model._assessmentResults.databaseAssessments.forEach((db) => {
|
this._model._assessmentResults.databaseAssessments.forEach((db) => {
|
||||||
|
let selectable = true;
|
||||||
|
if (db.issues.find(item => blockingIssues.includes(item.ruleId))) {
|
||||||
|
selectable = false;
|
||||||
|
}
|
||||||
this._databaseTableValues.push(
|
this._databaseTableValues.push(
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
value: selectedDbs.includes(db.name),
|
value: selectedDbs.includes(db.name),
|
||||||
enabled: db.issues.length === 0,
|
style: styleLeft,
|
||||||
style: styleLeft
|
enabled: selectable
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: this.createIconTextCell((db.issues.length === 0) ? IconPathHelper.sqlDatabaseLogo : IconPathHelper.sqlDatabaseWarningLogo, db.name),
|
value: this.createIconTextCell((selectable) ? IconPathHelper.sqlDatabaseLogo : IconPathHelper.sqlDatabaseWarningLogo, db.name),
|
||||||
style: styleLeft
|
style: styleLeft
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user