Skip to content

Commit

Permalink
feat: Postgresql support ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
feng626 committed Sep 10, 2024
1 parent 8bb2c66 commit 385555f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/views/assets/Asset/AssetCreateUpdate/DatabaseCreateUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export default {
const platform = this.$route.query.type
const baseFields = [[this.$t('Basic'), ['db_name']]]
let tlsFields = ['use_ssl', 'ca_cert']
switch (platform) {
case 'redis':
tlsFields = tlsFields.concat(['client_cert', 'client_key'])
break
case 'mysql':
tlsFields = tlsFields.concat(['client_cert', 'client_key', 'allow_invalid_cert'])
break
case 'mongodb':
tlsFields = tlsFields.concat(['client_key', 'allow_invalid_cert'])
break
const platformFieldsMap = {
redis: ['client_cert', 'client_key'],
postgresql: ['client_cert', 'client_key', 'allow_invalid_cert'],
mysql: ['client_cert', 'client_key', 'allow_invalid_cert'],
mongodb: ['client_key', 'allow_invalid_cert']
}
if (platformFieldsMap[platform]) {
tlsFields = tlsFields.concat(platformFieldsMap[platform])
}
if (tlsFields.length > 2) {
const secureField = [
this.$t('Secure'), tlsFields, 2
Expand Down

0 comments on commit 385555f

Please sign in to comment.