mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 01:25:38 -05:00
Bootstrap Service Abstract injection (#1534)
* change to generic injection * formatting * fixed missed merge * change to keep a record of the services per selector * formatting * adding back in tests * apply back tests * remove fundamentally broken test
This commit is contained in:
@@ -98,7 +98,7 @@ export class CreateLoginEditor extends BaseEditor {
|
||||
connection: input.getConnectionProfile(),
|
||||
ownerUri: input.getUri()
|
||||
};
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
let uniqueSelector = bootstrapAngular(this.instantiationService,
|
||||
CreateLoginModule,
|
||||
this.getContainer(),
|
||||
CREATELOGIN_SELECTOR,
|
||||
|
||||
@@ -122,7 +122,7 @@ export class DashboardEditor extends BaseEditor {
|
||||
|
||||
input.hasBootstrapped = true;
|
||||
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
let uniqueSelector = bootstrapAngular(this.instantiationService,
|
||||
DashboardModule,
|
||||
this._dashboardContainer,
|
||||
DASHBOARD_SELECTOR,
|
||||
|
||||
@@ -54,7 +54,7 @@ export class BackupDialog extends Modal {
|
||||
* Get the bootstrap params and perform the bootstrap
|
||||
*/
|
||||
private bootstrapAngular(bodyContainer: HTMLElement) {
|
||||
this._uniqueSelector = this._instantiationService.invokeFunction(bootstrapAngular,
|
||||
this._uniqueSelector = bootstrapAngular(this._instantiationService,
|
||||
BackupModule,
|
||||
bodyContainer,
|
||||
BACKUP_SELECTOR,
|
||||
|
||||
@@ -110,7 +110,7 @@ export class EditDataResultsEditor extends BaseEditor {
|
||||
// to events from the backing data service
|
||||
const parent = input.container;
|
||||
let params: IEditDataComponentParams = { dataService: dataService };
|
||||
this._instantiationService.invokeFunction(bootstrapAngular,
|
||||
bootstrapAngular(this._instantiationService,
|
||||
EditDataModule,
|
||||
parent,
|
||||
EDITDATA_SELECTOR,
|
||||
|
||||
@@ -170,7 +170,7 @@ export class QueryResultsEditor extends BaseEditor {
|
||||
// Otherwise many components will be left around and be subscribed
|
||||
// to events from the backing data service
|
||||
let params: IQueryComponentParams = { dataService: dataService };
|
||||
this._instantiationService.invokeFunction(bootstrapAngular,
|
||||
bootstrapAngular(this._instantiationService,
|
||||
QueryOutputModule,
|
||||
this.getContainer(),
|
||||
QUERY_OUTPUT_SELECTOR,
|
||||
|
||||
@@ -111,7 +111,7 @@ export class QueryPlanEditor extends BaseEditor {
|
||||
planXml: input.planXml
|
||||
};
|
||||
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
let uniqueSelector = bootstrapAngular(this.instantiationService,
|
||||
QueryPlanModule,
|
||||
this.getContainer(),
|
||||
QUERYPLAN_SELECTOR,
|
||||
|
||||
@@ -69,7 +69,7 @@ export class TaskDialogEditor extends BaseEditor {
|
||||
private revealElementWithTagName(tagName: string, parent: HTMLElement): void {
|
||||
let elementToReveal: HTMLElement;
|
||||
|
||||
for(let i = 0; i < parent.children.length; i++) {
|
||||
for (let i = 0; i < parent.children.length; i++) {
|
||||
let child: HTMLElement = <HTMLElement>parent.children[i];
|
||||
if (child.tagName && child.tagName.toLowerCase() === tagName && !elementToReveal) {
|
||||
elementToReveal = child;
|
||||
@@ -92,7 +92,7 @@ export class TaskDialogEditor extends BaseEditor {
|
||||
let params: ITaskDialogComponentParams = {
|
||||
ownerUri: input.getUri()
|
||||
};
|
||||
let uniqueSelector = this.instantiationService.invokeFunction(bootstrapAngular,
|
||||
let uniqueSelector = bootstrapAngular(this.instantiationService,
|
||||
TaskDialogModule,
|
||||
this.getContainer(),
|
||||
TASKDIALOG_SELECTOR,
|
||||
|
||||
Reference in New Issue
Block a user