Skip to content

Elasticsearch db#1446

Merged
lyubov-voloshko merged 3 commits into
mainfrom
elasticsearch-db
Nov 21, 2025
Merged

Elasticsearch db#1446
lyubov-voloshko merged 3 commits into
mainfrom
elasticsearch-db

Conversation

@lyubov-voloshko

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 21, 2025 14:42
@lyubov-voloshko lyubov-voloshko merged commit bac305a into main Nov 21, 2025
12 checks passed
@lyubov-voloshko lyubov-voloshko deleted the elasticsearch-db branch November 21, 2025 14:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for Elasticsearch as a new database type to the application. The changes introduce Elasticsearch to the database type enum, add corresponding UI components for managing Elasticsearch connections, and configure appropriate display/edit components for Elasticsearch data types.

  • Added Elasticsearch to the database type enum and configuration files
  • Created a new ElasticCredentialsFormComponent for managing Elasticsearch connection credentials
  • Configured type mappings for displaying and editing Elasticsearch data (string, number, boolean, date, object, array, binary)

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/app/models/connection.ts Added Elasticsearch to the DBtype enum
frontend/src/app/consts/databases.ts Added Elasticsearch to supported databases list and titles
frontend/src/app/consts/table-display-types.ts Configured display components for Elasticsearch data types
frontend/src/app/consts/record-view-types.ts Configured record view components for Elasticsearch data types
frontend/src/app/consts/record-edit-types.ts Configured edit components for Elasticsearch data types
frontend/src/app/components/connect-db/db-credentials-forms/elastic-credentials-form/elastic-credentials-form.component.ts Created TypeScript component extending BaseCredentialsFormComponent
frontend/src/app/components/connect-db/db-credentials-forms/elastic-credentials-form/elastic-credentials-form.component.html Created HTML template for Elasticsearch connection form with hostname, port, username, password, and advanced settings
frontend/src/app/components/connect-db/db-credentials-forms/elastic-credentials-form/elastic-credentials-form.component.spec.ts Added unit test for the ElasticCredentialsFormComponent
frontend/src/app/components/connect-db/db-credentials-forms/elastic-credentials-form/elastic-credentials-form.component.css Added responsive styling for the Elasticsearch credentials form
frontend/src/app/components/connect-db/connect-db.component.ts Imported ElasticCredentialsFormComponent and added default port (9200) for Elasticsearch
frontend/src/app/components/connect-db/connect-db.component.html Integrated ElasticCredentialsFormComponent into the connection form

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +78 to +89
<mat-form-field appearance="outline" class="advanced-settings__fullLine">
<mat-label>Username</mat-label>
<input matInput name="username" #username="ngModel"
data-testid="connection-username-input"
angulartics2On="change"
angularticsAction="Connection creds {{ connection.id ? 'edit' : 'add' }}: username is edited"
[readonly]="(accessLevel === 'readonly' || connection.isTestConnection) && connection.id"
[disabled]="submitting"
[(ngModel)]="connection.username">
<mat-error *ngIf="username.errors?.required && (username.invalid && username.touched)">Username should not be empty</mat-error>
</mat-form-field>

Copilot AI Nov 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate "Username" field. This field is already defined at lines 38-48 with required validation. The duplicate field in the advanced settings section (lines 78-88) should be removed. For comparison, other credential forms like Postgres only have the username field once in the main form section, not duplicated in advanced settings.

Suggested change
<mat-form-field appearance="outline" class="advanced-settings__fullLine">
<mat-label>Username</mat-label>
<input matInput name="username" #username="ngModel"
data-testid="connection-username-input"
angulartics2On="change"
angularticsAction="Connection creds {{ connection.id ? 'edit' : 'add' }}: username is edited"
[readonly]="(accessLevel === 'readonly' || connection.isTestConnection) && connection.id"
[disabled]="submitting"
[(ngModel)]="connection.username">
<mat-error *ngIf="username.errors?.required && (username.invalid && username.touched)">Username should not be empty</mat-error>
</mat-form-field>

Copilot uses AI. Check for mistakes.
<mat-error *ngIf="sshUsername.errors?.required && (sshUsername.invalid && sshUsername.touched)">SSH username should not be empty</mat-error>
</mat-form-field>

<mat-checkbox class="checkbox-line advanced-settings__fullLine" name="ssl" #ssh="ngModel"

Copilot AI Nov 21, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect variable reference: the variable name should be #ssl but it's currently set to #ssh. This line creates a template reference variable for the SSL checkbox, so it should match the field it's referencing. Change #ssh="ngModel" to #ssl="ngModel".

Suggested change
<mat-checkbox class="checkbox-line advanced-settings__fullLine" name="ssl" #ssh="ngModel"
<mat-checkbox class="checkbox-line advanced-settings__fullLine" name="ssl" #ssl="ngModel"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants