1+ import { Component , OnDestroy , OnInit } from '@angular/core' ;
2+ import { ConnectionSettingsUI , UiSettings } from 'src/app/models/ui-settings' ;
3+ import { CustomEvent , TableProperties } from 'src/app/models/table' ;
4+
5+ import { AlertComponent } from '../ui-components/alert/alert.component' ;
16import { SelectionModel } from '@angular/cdk/collections' ;
27import { CommonModule } from '@angular/common' ;
38import { HttpErrorResponse } from '@angular/common/http' ;
4- import { Component , OnDestroy , OnInit } from '@angular/core' ;
59import { MatButtonModule } from '@angular/material/button' ;
610import { MatDialog , MatDialogModule } from '@angular/material/dialog' ;
711import { MatIconModule } from '@angular/material/icon' ;
@@ -15,8 +19,6 @@ import { first, map } from 'rxjs/operators';
1519import { getComparatorsFromUrl } from 'src/app/lib/parse-filter-params' ;
1620import { ServerError } from 'src/app/models/alert' ;
1721import { TableCategory } from 'src/app/models/connection' ;
18- import { CustomEvent , TableProperties } from 'src/app/models/table' ;
19- import { ConnectionSettingsUI , UiSettings } from 'src/app/models/ui-settings' ;
2022import { User } from 'src/app/models/user' ;
2123import { CompanyService } from 'src/app/services/company.service' ;
2224import { ConnectionsService } from 'src/app/services/connections.service' ;
@@ -27,7 +29,6 @@ import { UiSettingsService } from 'src/app/services/ui-settings.service';
2729import { environment } from 'src/environments/environment' ;
2830import { normalizeTableName } from '../../lib/normalize' ;
2931import { PlaceholderTableViewComponent } from '../skeletons/placeholder-table-view/placeholder-table-view.component' ;
30- import { AlertComponent } from '../ui-components/alert/alert.component' ;
3132import { BannerComponent } from '../ui-components/banner/banner.component' ;
3233import { ContentLoaderComponent } from '../ui-components/content-loader/content-loader.component' ;
3334import { DbActionLinkDialogComponent } from './db-table-view/db-action-link-dialog/db-action-link-dialog.component' ;
@@ -76,14 +77,12 @@ export class DashboardComponent implements OnInit, OnDestroy {
7677 public currentPage : number = 1 ;
7778 public shownTableTitles : boolean = true ;
7879 public connectionID : string ;
79- // public isTestConnection: boolean = false;
8080 public filters : object = { } ;
8181 public comparators : object ;
8282 public pageIndex : number ;
8383 public pageSize : number ;
8484 public sortColumn : string ;
8585 public sortOrder : 'ASC' | 'DESC' ;
86-
8786 public loading : boolean = true ;
8887 public isServerError : boolean = false ;
8988 public serverError : ServerError ;
@@ -131,10 +130,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
131130 }
132131
133132 ngOnInit ( ) {
134- this . connectionID = this . _connections . currentConnectionID ;
135- // this.isTestConnection = this._connections.currentConnection.isTestConnection;
136- this . dataSource = new TablesDataSource ( this . _tables , this . _connections , this . _uiSettings , this . _tableRow ) ;
137-
133+ this . connectionID = this . _connections . currentConnectionID ;
134+ this . dataSource = new TablesDataSource ( this . _tables , this . _connections , this . _tableRow ) ;
138135 this . _tableState . cast . subscribe ( ( row ) => {
139136 this . selectedRow = row ;
140137 } ) ;
@@ -384,7 +381,6 @@ export class DashboardComponent implements OnInit, OnDestroy {
384381 this . uiSettings = settings ?. connections [ this . connectionID ] ;
385382 this . shownTableTitles = settings ?. connections [ this . connectionID ] ?. shownTableTitles ?? true ;
386383
387- const shownColumns = this . uiSettings ?. tables [ this . selectedTableName ] ?. shownColumns ;
388384 this . dataSource . fetchRows ( {
389385 connectionID : this . connectionID ,
390386 tableName : this . selectedTableName ,
@@ -393,8 +389,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
393389 sortColumn : this . sortColumn ,
394390 sortOrder : this . sortOrder ,
395391 filters : this . filters ,
396- search,
397- shownColumns,
392+ search
398393 } ) ;
399394 } ) ;
400395 }
0 commit comments