Splits the work of the assessment dialog into smaller managable chunks (#12172)

* Splits the work of the assessment dialog into smaller managable chunks

* Use the new assessment dialog page
This commit is contained in:
Amir Omidi
2020-09-08 17:22:23 -07:00
committed by GitHub
parent 9ed274fb39
commit f56e09cfa1
9 changed files with 264 additions and 137 deletions

View File

@@ -0,0 +1,47 @@
/*---------------------------------------------------------------------------------------------
* 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 { AssessmentDialogComponent } from './model/assessmentDialogComponent';
export class SqlDatabaseTree extends AssessmentDialogComponent {
async createComponent(view: azdata.ModelView): Promise<azdata.Component> {
return view.modelBuilder.divContainer().withItems([
this.createTableComponent(view)
]
).component();
}
private createTableComponent(view: azdata.ModelView): azdata.DeclarativeTableComponent {
const table = view.modelBuilder.declarativeTable().withProperties<azdata.DeclarativeTableProperties>(
{
columns: [
{
displayName: 'Database', // TODO localize
valueType: azdata.DeclarativeDataType.string,
width: 50,
isReadOnly: true,
showCheckAll: true
},
{
displayName: '', // Incidents
valueType: azdata.DeclarativeDataType.string,
width: 5,
isReadOnly: true,
showCheckAll: false
}
],
data: [
['DB1', '1'],
['DB2', '0']
],
width: '200px'
}
);
return table.component();
}
}