mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 17:54:37 +00:00
feat: Endpoint 支持 oracle 版本
This commit is contained in:
committed by
Jiangjie.Bai
parent
6c78f04d12
commit
273a6cbb3b
@@ -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'
|
||||
|
10
src/views/applications/DatabaseApp/const.js
Normal file
10
src/views/applications/DatabaseApp/const.js
Normal 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']
|
||||
}
|
||||
}
|
@@ -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']]
|
||||
|
@@ -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: {
|
||||
|
Reference in New Issue
Block a user