Skip to content

Commit c21eba3

Browse files
Merge pull request #961 from rocket-admin/ai-panel
dashboard: move AI error into AI chat
2 parents 146dc3a + f62d8ec commit c21eba3

19 files changed

+388
-27
lines changed

frontend/src/app/app.component.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
position: sticky;
2121
top: 0;
22+
z-index: 2;
2223
}
2324

2425
.nav-bar_exterior {

frontend/src/app/app.module.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { BrowserModule, Title } from '@angular/platform-browser';
55
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
66
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
77
import { IColorConfig, NgxThemeModule } from "@brumeilde/ngx-theme";
8+
import { MarkdownModule, MarkdownService, provideMarkdown } from "ngx-markdown";
89
import { Router, RouterModule } from '@angular/router';
910

1011
import { AccountDeleteConfirmationComponent } from './components/user-settings/account-delete-confirmation/account-delete-confirmation.component';
@@ -27,6 +28,7 @@ import { BreadcrumbsComponent } from './components/ui-components/breadcrumbs/bre
2728
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
2829
import { ClipboardModule } from '@angular/cdk/clipboard';
2930
import { CodeEditorModule } from '@ngstack/code-editor';
31+
import { CodeRowComponent } from "./components/ui-components/row-fields/code/code.component";
3032
import { CompanyComponent } from './components/company/company.component';
3133
import { CompanyMemberInvitationComponent } from './components/company-member-invitation/company-member-invitation.component';
3234
import { ConfigModule } from './modules/config.module';
@@ -41,11 +43,13 @@ import { DateFilterComponent } from './components/ui-components/filter-fields/da
4143
import { DateRowComponent } from './components/ui-components/row-fields/date/date.component';
4244
import { DateTimeFilterComponent } from './components/ui-components/filter-fields/date-time/date-time.component';
4345
import { DateTimeRowComponent } from './components/ui-components/row-fields/date-time/date-time.component';
46+
import { Db2CredentialsFormComponent } from "./components/connect-db/db-credentials-forms/db2-credentials-form/db2-credentials-form.component";
4447
import { DbActionLinkDialogComponent } from './components/dashboard/db-action-link-dialog/db-action-link-dialog.component';
4548
import { DbConnectionConfirmDialogComponent } from './components/connect-db/db-connection-confirm-dialog/db-connection-confirm-dialog.component';
4649
import { DbConnectionDeleteDialogComponent } from './components/connect-db/db-connection-delete-dialog/db-connection-delete-dialog.component';
4750
import { DbConnectionIpAccessDialogComponent } from './components/connect-db/db-connection-ip-access-dialog/db-connection-ip-access-dialog.component';
4851
import { DbTableActionsComponent } from "./components/dashboard/db-table-actions/db-table-actions.component";
52+
import { DbTableAiPanelComponent } from "./components/dashboard/db-table-ai-panel/db-table-ai-panel.component";
4953
import { DbTableComponent } from './components/dashboard/db-table/db-table.component';
5054
import { DbTableExportDialogComponent } from './components/dashboard/db-table-export-dialog/db-table-export-dialog.component';
5155
import { DbTableFiltersDialogComponent } from './components/dashboard/db-table-filters-dialog/db-table-filters-dialog.component';
@@ -58,6 +62,7 @@ import { DbTablesListComponent } from './components/dashboard/db-tables-list/db-
5862
import { DeleteMemberDialogComponent } from './components/company/delete-member-dialog/delete-member-dialog.component';
5963
import { DragDropModule } from '@angular/cdk/drag-drop';
6064
import { DynamicModule } from 'ng-dynamic-component';
65+
import { DynamodbCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/dynamodb-credentials-form/dynamodb-credentials-form.component";
6166
import { EmailChangeComponent } from './components/email-change/email-change.component';
6267
import { EmailValidationDirective } from "./directives/emailValidator.directive";
6368
import { EmailVerificationComponent } from './components/email-verification/email-verification.component';
@@ -75,6 +80,7 @@ import { HostnameValidationDirective } from "./directives/hostnameValidator.dire
7580
import { IconPickerComponent } from './components/ui-components/icon-picker/icon-picker.component';
7681
import { IdFilterComponent } from "./components/ui-components/filter-fields/id/id.component";
7782
import { IdRowComponent } from "./components/ui-components/row-fields/id/id.component";
83+
import { ImageRowComponent } from "./components/ui-components/row-fields/image/image.component";
7884
import { InfoDialogComponent } from './components/audit/info-dialog/info-dialog.component';
7985
import { InviteMemberDialogComponent } from './components/company/invite-member-dialog/invite-member-dialog.component';
8086
import { IpAddressButtonComponent } from './components/ui-components/ip-address-button/ip-address-button.component';
@@ -87,13 +93,15 @@ import { MasterEncryptionPasswordComponent } from "./components/connect-db/maste
8793
import { MasterPasswordDialogComponent } from './components/master-password-dialog/master-password-dialog.component';
8894
import { MaterialModule } from './modules/material.module';
8995
import { MongodbCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/mongodb-credentials-form/mongodb-credentials-form.component";
96+
import { MssqlCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/mssql-credentials-form/mssql-credentials-form.component";
9097
import { MysqlCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/mysql-credentials-form/mysql-credentials-form.component";
9198
import { NewVersionComponent } from './components/new-version/new-version.component';
9299
import { NgmatTableQueryReflectorModule } from './modules/ngmat-table-query-reflector.module';
93100
import { NgxStripeModule } from 'ngx-stripe';
94101
import { NotificationsService } from './services/notifications.service';
95102
import { NumberFilterComponent } from './components/ui-components/filter-fields/number/number.component';
96103
import { NumberRowComponent } from './components/ui-components/row-fields/number/number.component';
104+
import { OracledbCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/oracledb-credentials-form/oracledb-credentials-form.component";
97105
import { PageLoaderComponent } from './components/page-loader/page-loader.component';
98106
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
99107
import { PasswordChangeComponent } from './components/password-change/password-change.component';
@@ -137,6 +145,8 @@ import { TimeRowComponent } from './components/ui-components/row-fields/time/tim
137145
import { TokenInterceptor } from './services/token.interceptor';
138146
import { UpgradeComponent } from './components/upgrade/upgrade.component';
139147
import { UpgradeSuccessComponent } from './components/upgrade-success/upgrade-success.component';
148+
import { UrlRowComponent } from "./components/ui-components/row-fields/url/url.component";
149+
import { UrlValidatorDirective } from "./directives/url-validator.directive";
140150
import { UserAddDialogComponent } from './components/users/user-add-dialog/user-add-dialog.component';
141151
import { UserDeleteDialogComponent } from './components/users/user-delete-dialog/user-delete-dialog.component';
142152
import { UserDeletedSuccessComponent } from './components/user-deleted-success/user-deleted-success.component';
@@ -148,15 +158,6 @@ import { WidgetComponent } from "./components/dashboard/db-table-widgets/widget/
148158
import { WidgetDeleteDialogComponent } from './components/dashboard/db-table-widgets/widget-delete-dialog/widget-delete-dialog.component';
149159
import { environment } from '../environments/environment';
150160
import { provideZxvbnServiceForPSM } from 'angular-password-strength-meter/zxcvbn';
151-
import { OracledbCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/oracledb-credentials-form/oracledb-credentials-form.component";
152-
import { MssqlCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/mssql-credentials-form/mssql-credentials-form.component";
153-
import { DynamodbCredentialsFormComponent } from "./components/connect-db/db-credentials-forms/dynamodb-credentials-form/dynamodb-credentials-form.component";
154-
import { CodeRowComponent } from "./components/ui-components/row-fields/code/code.component";
155-
import { ImageRowComponent } from "./components/ui-components/row-fields/image/image.component";
156-
import { UrlValidatorDirective } from "./directives/url-validator.directive";
157-
import { DbTableAiPanelComponent } from "./components/dashboard/db-table-ai-panel/db-table-ai-panel.component";
158-
import { MarkdownModule, MarkdownService, provideMarkdown } from "ngx-markdown";
159-
import { UrlRowComponent } from "./components/ui-components/row-fields/url/url.component";
160161

161162
type Palettes = { primaryPalette: string, accentedPalette: string, warnPalette: string };
162163
type Colors = { myColorName: string };
@@ -318,7 +319,8 @@ const saasExtraProviders = (environment as any).saas ? [
318319
DynamodbCredentialsFormComponent,
319320
ImageRowComponent,
320321
DbTableAiPanelComponent,
321-
UrlRowComponent
322+
UrlRowComponent,
323+
Db2CredentialsFormComponent
322324
],
323325
providers: [
324326
ConnectionsService,

frontend/src/app/components/connect-db/connect-db.component.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
grid-row: 5 / span 4;
2929
}
3030

31+
@media (width <= 600px) {
32+
.credentials-fieldset {
33+
display: flex;
34+
flex-direction: column;
35+
}
36+
}
37+
3138
.credentials-fieldset-no-warning {
3239
display: grid;
3340
grid-template-columns: subgrid;
@@ -36,6 +43,13 @@
3643
grid-row: 4 / span 4;
3744
}
3845

46+
@media (width <= 600px) {
47+
.credentials-fieldset-no-warning {
48+
display: flex;
49+
flex-direction: column;
50+
}
51+
}
52+
3953
.mat-h1 {
4054
margin-top: 2vw;
4155
}

frontend/src/app/components/connect-db/connect-db.component.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,20 @@ <h1 class="mat-h1 connectForm__fullLine">
154154
(masterKeyChange)="handleMasterKeyChange($event)">
155155
</app-mssql-credentials-form>
156156

157+
<app-db2-credentials-form *ngIf="db.type === 'ibmdb2' && db.connectionType === 'direct'"
158+
[ngClass]="{
159+
'credentials-fieldset': !db.isTestConnection,
160+
'credentials-fieldset-no-warning': db.isTestConnection
161+
}"
162+
[connection]="db"
163+
[submitting]="submitting"
164+
[accessLevel]="accessLevel"
165+
[masterKey]="masterKey"
166+
[readonly]="(accessLevel === 'readonly' || db.isTestConnection) && db.id"
167+
(switchToAgent)="switchToAgent"
168+
(masterKeyChange)="handleMasterKeyChange($event)">
169+
</app-db2-credentials-form>
170+
157171
<div *ngIf="db.connectionType === 'agent'" class="connectForm__fullLine instruction">
158172

159173
<div class="instruction__docker">
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.connectForm__hostname,
2+
.connectForm__port {
3+
padding-bottom: 20px;
4+
}
5+
6+
@media (width <= 600px) {
7+
.connectForm__hostname {
8+
padding-bottom: 44px;
9+
}
10+
11+
.connectForm__port {
12+
padding-bottom: 0;
13+
}
14+
}

0 commit comments

Comments
 (0)