Skip to content

Commit 5697d9d

Browse files
Merge pull request #1346 from rocket-admin/fixes
Fixes
2 parents f821961 + 283ee25 commit 5697d9d

7 files changed

Lines changed: 11 additions & 12 deletions

File tree

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,9 @@ <h1 class="mat-h1 connectForm__fullLine">
3030
[disabled]="submitting"
3131
[(ngModel)]="db.type"
3232
(ngModelChange)="dbTypeChange()" >
33-
<mat-option value="mysql">MySQL</mat-option>
34-
<mat-option value="postgres">PostgreSQL</mat-option>
35-
<mat-option value="mongodb">MongoDB</mat-option>
36-
<mat-option value="dynamodb" *ngIf="db.connectionType === 'direct'">DynamoDB</mat-option>
37-
<mat-option value="cassandra">Cassandra</mat-option>
38-
<mat-option value="oracledb">Oracle</mat-option>
39-
<mat-option value="mssql">MS SQL</mat-option>
40-
<mat-option value="ibmdb2">IBM DB2</mat-option>
33+
<mat-option *ngFor="let dbType of supportedOrderedDatabases" [value]="dbType">
34+
{{supportedDatabasesTitles[dbType]}}
35+
</mat-option>
4136
</mat-select>
4237
</mat-form-field>
4338

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { UserService } from 'src/app/services/user.service';
4444
import { environment } from 'src/environments/environment';
4545
import googlIPsList from 'src/app/consts/google-IP-addresses';
4646
import isIP from 'validator/lib/isIP';
47+
import { supportedDatabasesTitles, supportedOrderedDatabases } from 'src/app/consts/databases';
4748

4849
@Component({
4950
selector: 'app-connect-db',
@@ -90,6 +91,8 @@ export class ConnectDBComponent implements OnInit {
9091
message: null
9192
}
9293

94+
public supportedOrderedDatabases = supportedOrderedDatabases;
95+
public supportedDatabasesTitles = supportedDatabasesTitles;
9396
public ports = {
9497
[DBtype.MySQL]: '3306',
9598
[DBtype.Postgres]: '5432',

frontend/src/app/components/connect-db/db-credentials-forms/cassandra-credentials-form/cassandra-credentials-form.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
data-testid="connection-hostname-input"
55
angulartics2On="change"
66
angularticsAction="Connection creds {{ connection.id ? 'edit' : 'add' }}: hostname is edited"
7-
required hostnameValidator="mongodb"
7+
required hostnameValidator
88
[readonly]="(accessLevel === 'readonly' || connection.isTestConnection) && connection.id"
99
[disabled]="submitting"
1010
[(ngModel)]="connection.host">
1111
<mat-hint>
1212
<span>
13-
E.g. <strong><code>mongodb+srv://my-test-db.8a8grvb.mongoconnection.net</code></strong>.
14-
Connections from internal IPs (e.g. localhost) are not supported.
13+
E.g. <strong><code>cassandra.us-west-1.amazonaws.com</code></strong><br>
14+
Connections from internal IPs (e.g. localhost) are not supported
1515
</span>
1616
</mat-hint>
1717

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
@media (width <= 600px) {
212212
.connectionItem {
213213
flex: initial;
214+
max-width: 100%;
214215
}
215216
}
216217

frontend/src/app/consts/databases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ export const supportedDatabasesTitles = {
1616
dynamodb: "DynamoDB",
1717
cassandra: "Cassandra",
1818
oracledb: "OracleDB",
19-
mssql: "MSSQL",
19+
mssql: "SQL Server",
2020
ibmdb2: "IBM DB2"
2121
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)