mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-27 23:30:30 -04:00
Dashboard Minor code cleanup (#894)
* minor code clean up for dashboard * formatting
This commit is contained in:
@@ -19,10 +19,9 @@ export enum BreadcrumbClass {
|
||||
};
|
||||
|
||||
@Injectable()
|
||||
export class BreadcrumbService implements IBreadcrumbService, OnDestroy {
|
||||
export class BreadcrumbService implements IBreadcrumbService {
|
||||
public breadcrumbItem: Subject<MenuItem[]>;
|
||||
private itemBreadcrums: MenuItem[];
|
||||
private _disposables: IDisposable[] = [];
|
||||
private _currentPage: BreadcrumbClass;
|
||||
|
||||
constructor( @Inject(forwardRef(() => DashboardServiceInterface)) private _bootstrap: DashboardServiceInterface) {
|
||||
@@ -42,7 +41,7 @@ export class BreadcrumbService implements IBreadcrumbService, OnDestroy {
|
||||
private getBreadcrumbsLink(page: BreadcrumbClass): MenuItem[] {
|
||||
this.itemBreadcrums = [];
|
||||
let profile = this._bootstrap.connectionManagementService.connectionInfo.connectionProfile;
|
||||
this.itemBreadcrums.push({ label: nls.localize('homeCrumb', 'Home')});
|
||||
this.itemBreadcrums.push({ label: nls.localize('homeCrumb', 'Home') });
|
||||
switch (page) {
|
||||
case BreadcrumbClass.DatabasePage:
|
||||
this.itemBreadcrums.push(this.getServerBreadcrumb(profile));
|
||||
@@ -67,8 +66,4 @@ export class BreadcrumbService implements IBreadcrumbService, OnDestroy {
|
||||
routerLink: ['database-dashboard']
|
||||
};
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this._disposables = dispose(this._disposables);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user