diff --git a/frontend/src/app/app.component.html b/frontend/src/app/app.component.html index ac5197fba..d70645d72 100644 --- a/frontend/src/app/app.component.html +++ b/frontend/src/app/app.component.html @@ -200,13 +200,13 @@ class="action"> Login - Sign up - + diff --git a/frontend/src/app/components/company/company.component.html b/frontend/src/app/components/company/company.component.html index 92240981f..2414587af 100644 --- a/frontend/src/app/components/company/company.component.html +++ b/frontend/src/app/components/company/company.component.html @@ -491,7 +491,7 @@

Configure DNS Records

-
+
Your admin panel address: {{companyCustomDomainHostname}}
diff --git a/frontend/src/app/components/dashboard/dashboard.component.html b/frontend/src/app/components/dashboard/dashboard.component.html index 47ac5ff4b..4990d2469 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.html +++ b/frontend/src/app/components/dashboard/dashboard.component.html @@ -99,6 +99,7 @@

Rocketadmin can not find any tables

[isTestConnection]="currentConnectionIsTest" [accessLevel]="currentConnectionAccessLevel" [tables]="tablesList" + [folders]="tableFolders" (openFilters)="openTableFilters($event)" (removeFilter)="removeFilter($event)" (resetAllFilters)="clearAllFilters()" diff --git a/frontend/src/app/components/dashboard/dashboard.component.spec.ts b/frontend/src/app/components/dashboard/dashboard.component.spec.ts index db7e11707..eeb620509 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.spec.ts +++ b/frontend/src/app/components/dashboard/dashboard.component.spec.ts @@ -22,7 +22,8 @@ describe('DashboardComponent', () => { }, get currentConnectionAccessLevel(): AccessLevel { return AccessLevel.None; - } + }, + getTablesFolders: () => of([]) }; const fakeRouter = jasmine.createSpyObj('Router', {navigate: Promise.resolve('')}); diff --git a/frontend/src/app/components/dashboard/dashboard.component.ts b/frontend/src/app/components/dashboard/dashboard.component.ts index 13acc1979..376717b06 100644 --- a/frontend/src/app/components/dashboard/dashboard.component.ts +++ b/frontend/src/app/components/dashboard/dashboard.component.ts @@ -3,7 +3,9 @@ import { Angulartics2, Angulartics2Module } from 'angulartics2'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { ConnectionSettingsUI, UiSettings } from 'src/app/models/ui-settings'; import { CustomEvent, TableProperties } from 'src/app/models/table'; -import { map } from 'rxjs/operators'; +import { TableCategory } from 'src/app/models/connection'; +import { Folder } from './db-table-view/db-table-view.component'; +import { first, map } from 'rxjs/operators'; import { AlertComponent } from '../ui-components/alert/alert.component'; import { BannerComponent } from '../ui-components/banner/banner.component'; @@ -101,6 +103,7 @@ export class DashboardComponent implements OnInit, OnDestroy { public isAIpanelOpened: boolean = false; public uiSettings: ConnectionSettingsUI; + public tableFolders: Folder[] = []; constructor( private _connections: ConnectionsService, @@ -153,6 +156,8 @@ export class DashboardComponent implements OnInit, OnDestroy { this.getData(); console.log('getData from ngOnInit'); }); + + this.loadTableFolders(); } ngOnDestroy() { @@ -429,4 +434,24 @@ export class DashboardComponent implements OnInit, OnDestroy { this.shownTableTitles = !this.shownTableTitles; this._uiSettings.updateConnectionSetting(this.connectionID, 'shownTableTitles', this.shownTableTitles); } + + private loadTableFolders() { + this._connections.getTablesFolders(this.connectionID).subscribe({ + next: (categories: TableCategory[]) => { + if (categories && categories.length > 0) { + this.tableFolders = categories.map(cat => ({ + id: cat.category_id, + name: cat.category_name, + tableIds: cat.tables + })); + } else { + this.tableFolders = []; + } + }, + error: (error) => { + console.error('Error fetching table folders:', error); + this.tableFolders = []; + } + }); + } } diff --git a/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.html b/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.html index 5dd7b8391..8dd2adf21 100644 --- a/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.html +++ b/frontend/src/app/components/dashboard/db-table-view/db-table-view.component.html @@ -4,25 +4,25 @@

{{ displayName }}

Table - - - -
+ + + + + {{table.normalizedTableName}} + + + + + {{table.normalizedTableName}} + + + + + {{table.normalizedTableName}} - - - + + + -