Skip to content

Commit c8b6fcc

Browse files
Merge branch 'main' into backend_ai_table_schema_reponses
2 parents 105e873 + 7a7ddf2 commit c8b6fcc

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h2 class="connectionInfo__connectionTitle">{{ $any(connectionItem).displayTitle
3131
<span class="mat-body-2">{{ supportedDatabasesTitles[connectionItem.connection.type] }}</span>
3232
</div>
3333
</div>
34-
@if (connectionItem.accessLevel === 'edit') {
34+
@if (connectionItem.accessLevel === 'edit' && supportsSchemaEditing(connectionItem.connection.type)) {
3535
<a mat-button color="accent"
3636
class="connectionSchemaButton"
3737
routerLink="/edit-database-schema/{{connectionItem.connection.id}}"

frontend/src/app/components/connections-list/own-connections/own-connections.component.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { firstValueFrom } from 'rxjs';
1010
import { supportedDatabasesTitles, supportedOrderedDatabases } from 'src/app/consts/databases';
1111
import { AlertActionType, AlertType } from 'src/app/models/alert';
1212
import { CompanyMember, CompanyMemberRole } from 'src/app/models/company';
13-
import { ConnectionItem } from 'src/app/models/connection';
13+
import { ConnectionItem, DBtype } from 'src/app/models/connection';
1414
import { UiSettings } from 'src/app/models/ui-settings';
1515
import { SubscriptionPlans, User } from 'src/app/models/user';
1616
import { CompanyService } from 'src/app/services/company.service';
@@ -114,6 +114,17 @@ export class OwnConnectionsComponent implements OnInit, OnChanges {
114114
this._uiSettings.updateGlobalSetting('connectionsListCollapsed', true);
115115
}
116116

117+
supportsSchemaEditing(type: DBtype | string): boolean {
118+
return (
119+
type === DBtype.Postgres ||
120+
type === DBtype.MySQL ||
121+
type === DBtype.Oracle ||
122+
type === DBtype.MSSQL ||
123+
type === DBtype.DB2 ||
124+
type === DBtype.ClickHouse
125+
);
126+
}
127+
117128
getMainTitle(database: string): string {
118129
const title = this.supportedDatabasesTitles[database] || database;
119130
const match = title.match(/^([^(]+)/);

frontend/src/app/components/edit-database-schema/schema-diagram-viewer/schema-diagram-viewer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h3 class="schema-diagram__title">{{ title }}</h3>
3434
</div>
3535

3636
@if (sidebarOpen()) {
37-
<aside class="schema-diagram__sidebar">
37+
<aside class="schema-diagram__sidebar" (wheel)="$event.stopPropagation()">
3838
<div class="schema-diagram__sidebar-search">
3939
<mat-icon class="schema-diagram__sidebar-search-icon">search</mat-icon>
4040
<input type="text" placeholder="Search tables"

0 commit comments

Comments
 (0)