perf: Postgresql add ssl mode

This commit is contained in:
feng 2024-09-13 17:46:46 +08:00 committed by feng626
parent 9b7c4ed353
commit 4221bdb2ab

View File

@ -27,7 +27,7 @@ export default {
let tlsFields = ['use_ssl', 'ca_cert'] let tlsFields = ['use_ssl', 'ca_cert']
const platformFieldsMap = { const platformFieldsMap = {
redis: ['client_cert', 'client_key'], redis: ['client_cert', 'client_key'],
postgresql: ['client_cert', 'client_key', 'allow_invalid_cert'], postgresql: ['client_cert', 'client_key', 'pg_ssl_mode'],
mysql: ['client_cert', 'client_key', 'allow_invalid_cert'], mysql: ['client_cert', 'client_key', 'allow_invalid_cert'],
mongodb: ['client_key', 'allow_invalid_cert'] mongodb: ['client_key', 'allow_invalid_cert']
} }
@ -52,7 +52,14 @@ export default {
}, },
use_ssl: { use_ssl: {
label: this.$t('UseSSL'), label: this.$t('UseSSL'),
component: 'el-switch' component: 'el-switch',
on: {
change: ([event], updateForm) => {
updateForm({
pg_ssl_mode: event ? 'require' : 'prefer'
})
}
}
}, },
allow_invalid_cert: { allow_invalid_cert: {
label: this.$t('AllowInvalidCert'), label: this.$t('AllowInvalidCert'),