feat: Endpoint 支持 oracle 版本

This commit is contained in:
Jiangjie.Bai
2022-07-13 16:04:48 +08:00
committed by Jiangjie.Bai
parent 6c78f04d12
commit 273a6cbb3b
4 changed files with 17 additions and 2 deletions

View File

@@ -4,11 +4,14 @@
<script>
import { GenericCreateUpdatePage } from '@/layout/components'
import { getDatabaseTypeFieldsMap } from '@/views/applications/DatabaseApp/const'
export default {
components: {
GenericCreateUpdatePage
},
data() {
const appType = this.$route.query.type || 'mysql'
const fieldsMap = getDatabaseTypeFieldsMap(appType)
return {
fields: [
[this.$t('common.Basic'), ['name', 'type', 'domain']],
@@ -29,7 +32,7 @@ export default {
}
},
attrs: {
fields: ['host', 'port', 'database'],
fields: fieldsMap,
fieldsMeta: {
host: {
type: 'input'

View File

@@ -0,0 +1,10 @@
import { ORACLE } from '../const'
export function getDatabaseTypeFieldsMap(type) {
switch (type) {
case ORACLE:
return ['host', 'port', 'database', 'version']
default:
return ['host', 'port', 'database']
}
}

View File

@@ -23,7 +23,8 @@ export default {
this.$t('applications.port'),
[
'http_port', 'https_port', 'ssh_port', 'rdp_port',
'mysql_port', 'mariadb_port', 'postgresql_port', 'redis_port'
'mysql_port', 'mariadb_port', 'postgresql_port', 'redis_port',
'oracle_11g_port', 'oracle_12c_port'
]
],
[this.$t('common.Other'), ['comment']]

View File

@@ -23,6 +23,7 @@ export default {
'http_port', 'https_port', 'ssh_port',
'rdp_port', 'mysql_port', 'mariadb_port',
'postgresql_port', 'redis_port',
'oracle_11g_port', 'oracle_12c_port',
'date_created', 'comment', 'actions'
],
columnsShow: {