File tree Expand file tree Collapse file tree
db-credentials-forms/cassandra-credentials-form Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import { UserService } from 'src/app/services/user.service';
4444import { environment } from 'src/environments/environment' ;
4545import googlIPsList from 'src/app/consts/google-IP-addresses' ;
4646import 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' ,
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments