Skip to content

Commit 856fc34

Browse files
Merge pull request #1145 from rocket-admin/fixes
Fixes
2 parents 734b419 + 5ec7cb8 commit 856fc34

6 files changed

Lines changed: 19 additions & 6 deletions

File tree

frontend/src/app/components/connections-list/connections-list.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="wrapper">
33
<div *ngIf="companyName; else companyNameLoader" class="pageTitleHeader">
44
<div class="pageTitle">
5-
<h1 class="mat-headline-4 pageTitle__name">{{companyName}}</h1>
5+
<h1 class="mat-headline-4 pageTitle__name" data-testid="company-name">{{companyName}}</h1>
66
<a mat-icon-button *ngIf="currentUser.role === 'ADMIN'"
77
routerLink="/company"
88
class="companyEditLink">
@@ -211,7 +211,6 @@ <h2 class="connectionInfo__connectionTitle">{{ titles[connectionItem.connection.
211211
<rect width="240" height="240" transform="translate(0 0.000976562)" fill="#A664DA"/>
212212
<path d="M176.214 93.941H140.892C135.682 93.941 133.099 90.0115 135.13 85.2209L147.846 55.3742C150.738 48.5968 147.074 43.0557 139.7 43.0557H106.763C103.54 43.0557 99.8749 45.484 98.6166 48.4422L83.3178 84.3601C80.7791 90.2985 84.0022 95.1552 90.4484 95.1552H124.225C127.956 95.1552 131.333 97.3849 132.79 100.807L147.846 136.128C149.899 140.941 147.294 144.871 142.084 144.871H63.3831C60.16 144.871 56.4954 147.299 55.2371 150.257L40.5785 184.63C37.6866 191.407 41.3512 196.948 48.7246 196.948H125.329C128.552 196.948 132.216 194.52 133.475 191.562L150.517 151.56C151.952 148.204 155.22 146.041 158.862 146.041H192.131C198.82 146.041 202.131 141.007 199.504 134.87L184.36 99.3497C183.102 96.3915 179.437 93.9631 176.214 93.9631V93.941Z" fill="white"/>
213213
</svg>
214-
215214
</a>
216215

217216
<a mat-flat-button *ngIf="currentUser.role === 'ADMIN' || currentUser.role === 'DB_ADMIN'"

frontend/src/app/components/dashboard/dashboard.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { AlertComponent } from '../ui-components/alert/alert.component';
99
import { BannerComponent } from '../ui-components/banner/banner.component';
1010
import { BbBulkActionConfirmationDialogComponent } from './db-bulk-action-confirmation-dialog/db-bulk-action-confirmation-dialog.component';
1111
import { CommonModule } from '@angular/common';
12+
import { CompanyService } from 'src/app/services/company.service';
1213
import { ConnectionsService } from 'src/app/services/connections.service';
1314
import { ContentLoaderComponent } from '../ui-components/content-loader/content-loader.component';
1415
import { DbActionLinkDialogComponent } from './db-action-link-dialog/db-action-link-dialog.component';
@@ -39,7 +40,6 @@ import { environment } from 'src/environments/environment';
3940
import { getComparatorsFromUrl } from 'src/app/lib/parse-filter-params';
4041
import { normalizeTableName } from '../../lib/normalize'
4142
import { omitBy } from "lodash";
42-
import { CompanyService } from 'src/app/services/company.service';
4343

4444
interface DataToActivateActions {
4545
action: CustomEvent,
@@ -129,6 +129,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
129129
}
130130

131131
get defaultTableToOpen () {
132+
console.log('dashboard component get defaultTableToOpen');
133+
console.log(this._connections.defaultTableToOpen);
132134
return this._connections.defaultTableToOpen;
133135
}
134136

frontend/src/app/components/dashboard/db-table/db-table.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ <h2 class="mat-h2 table-name">{{ displayName }}</h2>
362362
</a>
363363
</div>
364364

365-
<mat-paginator
365+
<mat-paginator data-testid="table-paginator"
366366
[pageSize]="30"
367367
[pageSizeOptions]="[10, 30, 100, 300]"
368368
[showFirstLastButtons]="!tableData.largeDataset">

frontend/src/app/components/db-table-row-edit/db-table-row-edit.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ export class DbTableRowEditComponent implements OnInit {
397397
}
398398

399399
updateField = (updatedValue: any, field: string) => {
400+
console.log('updateField');
401+
console.log(field);
402+
console.log(updatedValue);
400403
if (typeof(updatedValue) === 'object' && updatedValue !== null) {
401404
for (const prop of Object.getOwnPropertyNames(this.tableRowValues[field])) {
402405
delete this.tableRowValues[field][prop];
@@ -410,6 +413,9 @@ export class DbTableRowEditComponent implements OnInit {
410413
if (this.keyAttributesFromURL && Object.keys(this.keyAttributesFromURL).includes(field)) {
411414
this.isPrimaryKeyUpdated = true
412415
};
416+
console.log('this.tableRowValues[field]');
417+
console.log(this.tableRowValues[field]);
418+
console.log(this.tableRowValues);
413419
}
414420

415421
getFormattedUpdatedRow = () => {

frontend/src/app/components/ui-components/row-fields/foreign-key/foreign-key.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import { MatIconModule } from '@angular/material/icon';
1212
import { MatInputModule } from '@angular/material/input';
1313
import { MatSpinner } from '@angular/material/progress-spinner';
1414
import { MatTooltipModule } from '@angular/material/tooltip';
15-
import { Subject } from 'rxjs';
16-
import { TablesService } from 'src/app/services/tables.service';
1715
import { RouterModule } from '@angular/router';
16+
import { Subject } from 'rxjs';
1817
import { TableForeignKey } from 'src/app/models/table';
18+
import { TablesService } from 'src/app/services/tables.service';
1919

2020
interface Suggestion {
2121
displayString: string;
@@ -134,6 +134,8 @@ export class ForeignKeyRowComponent extends BaseRowFieldComponent {
134134
if (currentRow !== undefined) {
135135
this.currentFieldValue = currentRow.fieldValue;
136136
// this.currentFieldQueryParams = Object.assign({}, ...this.primaeyKeys.map((primaeyKey) => ({[primaeyKey.column_name]: currentRow[primaeyKey.column_name]})));
137+
console.log(this.label + 'this.currentFieldValue');
138+
console.log(this.currentFieldValue);
137139
this.onFieldChange.emit(this.currentFieldValue);
138140
} else {
139141
this.fetching = true;

frontend/src/app/services/connections.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export class ConnectionsService {
104104
}
105105

106106
get defaultTableToOpen() {
107+
console.log('connections service get defaultTableToOpen');
108+
console.log(this.defaultDisplayTable);
107109
return this.defaultDisplayTable;
108110
}
109111

@@ -156,6 +158,8 @@ export class ConnectionsService {
156158
console.log('setConnectionInfo ui');
157159
this.connectionLogo = res.connectionProperties.logo_url;
158160
this.companyName = res.connectionProperties.company_name;
161+
console.log('connections service setConnectionInfo res.connectionProperties.default_showing_table;');
162+
console.log(res.connectionProperties.default_showing_table);
159163
this.defaultDisplayTable = res.connectionProperties.default_showing_table;
160164
this.isCustomAccentedColor = !!res.connectionProperties.secondary_color;
161165
this._themeService.updateColors({ palettes: { primaryPalette: res.connectionProperties.primary_color, accentedPalette: res.connectionProperties.secondary_color }});

0 commit comments

Comments
 (0)