refactor model components to not reference any dashboard services (#1168)

* refactor model components to not reference any dashboard services
This commit is contained in:
Leila Lali
2018-04-18 11:48:20 -07:00
committed by GitHub
parent 134f76c17f
commit d3f0ac7954
36 changed files with 422 additions and 224 deletions

View File

@@ -7,6 +7,7 @@ import { Injectable, forwardRef, Inject, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { DashboardServiceInterface } from './dashboardServiceInterface.service';
import { CommonServiceInterface } from 'sql/services/common/commonServiceInterface.service';
import { MenuItem, IBreadcrumbService } from 'sql/base/browser/ui/breadcrumb/interfaces';
import { ConnectionProfile } from 'sql/parts/connection/common/connectionProfile';
@@ -23,9 +24,11 @@ export class BreadcrumbService implements IBreadcrumbService {
public breadcrumbItem: Subject<MenuItem[]>;
private itemBreadcrums: MenuItem[];
private _currentPage: BreadcrumbClass;
private _bootstrap: DashboardServiceInterface;
constructor( @Inject(forwardRef(() => DashboardServiceInterface)) private _bootstrap: DashboardServiceInterface) {
_bootstrap.onUpdatePage(() => {
constructor( @Inject(forwardRef(() => CommonServiceInterface)) private commonService: CommonServiceInterface) {
this._bootstrap = commonService as DashboardServiceInterface;
this._bootstrap.onUpdatePage(() => {
this.setBreadcrumbs(this._currentPage);
});
this.breadcrumbItem = new Subject<MenuItem[]>();