From 7a8d35b98665b613f19f01eaf1cc80792d522a0b Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Thu, 17 Feb 2022 10:56:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=20MongoDB=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84=E7=BA=B3=E7=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/cn.json | 3 ++- src/i18n/langs/en.json | 3 ++- src/views/applications/DatabaseApp/DatabaseAppList.vue | 5 +++++ .../SystemUserCreateUpdate/CommonUser/index.vue | 1 + .../SystemUser/SystemUserList/CommonUserList.vue | 6 ++++++ src/views/perms/const.js | 10 +++++++++- 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 37d309402..74cbf8f8f 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -45,11 +45,12 @@ "vmware_client":"Vmware Client", "custom":"Custom", "mysql": "MySQL", - "redis": "Redis", "oracle": "Oracle", "postgresql": "PostgreSQL", "mariadb": "MariaDB", "sqlserver": "SQLServer", + "redis": "Redis", + "mongodb": "MongoDB", "k8s": "Kubernetes" }, "applicationsCategory": { diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 71ebfd89e..8c0577d51 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -40,11 +40,12 @@ "vmware_client":"Vmware Client", "custom":"Custom", "mysql": "MySQL", - "redis": "Redis", "oracle": "Oracle", "postgresql": "PostgreSQL", "mariadb": "MariaDB", "sqlserver": "SQLServer", + "redis": "Redis", + "mongodb": "MongoDB", "k8s": "kubernetes" }, "applicationsCategory": { diff --git a/src/views/applications/DatabaseApp/DatabaseAppList.vue b/src/views/applications/DatabaseApp/DatabaseAppList.vue index 9750da02e..9af8b5589 100644 --- a/src/views/applications/DatabaseApp/DatabaseAppList.vue +++ b/src/views/applications/DatabaseApp/DatabaseAppList.vue @@ -44,6 +44,11 @@ export default { title: 'Redis', has: true, group: this.$t('assets.NoSQLProtocol') + }, + { + name: 'mongodb', + title: 'MongoDB', + has: this.$store.getters.hasValidLicense } ] return { diff --git a/src/views/assets/SystemUser/SystemUserCreateUpdate/CommonUser/index.vue b/src/views/assets/SystemUser/SystemUserCreateUpdate/CommonUser/index.vue index 9fb5d5bc3..e04768b75 100644 --- a/src/views/assets/SystemUser/SystemUserCreateUpdate/CommonUser/index.vue +++ b/src/views/assets/SystemUser/SystemUserCreateUpdate/CommonUser/index.vue @@ -48,6 +48,7 @@ export default { case 'mariadb': case 'sqlserver': case 'redis': + case 'mongodb': return Database case 'k8s': return K8S diff --git a/src/views/assets/SystemUser/SystemUserList/CommonUserList.vue b/src/views/assets/SystemUser/SystemUserList/CommonUserList.vue index 252d51639..65c9368e9 100644 --- a/src/views/assets/SystemUser/SystemUserList/CommonUserList.vue +++ b/src/views/assets/SystemUser/SystemUserList/CommonUserList.vue @@ -138,6 +138,12 @@ export default { has: true, group: this.$t('assets.NoSQLProtocol') }, + { + name: 'MongoDB', + title: 'MongoDB', + type: 'primary', + has: this.$store.getters.hasValidLicense + }, { name: 'K8S', title: 'K8S', diff --git a/src/views/perms/const.js b/src/views/perms/const.js index e851e9725..6c1c347cc 100644 --- a/src/views/perms/const.js +++ b/src/views/perms/const.js @@ -43,12 +43,13 @@ export const REMOTE_APP = [ ] export const MYSQL = 'mysql' -export const REDIS = 'redis' export const ORACLE = 'oracle' export const POSTGRESQL = 'postgresql' export const MARIADB = 'mariadb' export const DATABASE_CATEGORY = 'db' export const SQLSERVER = 'sqlserver' +export const REDIS = 'redis' +export const MONGODB = 'mongodb' export const DATABASE = [ { @@ -94,6 +95,13 @@ export const DATABASE = [ category: DATABASE_CATEGORY, has: true, group: i18n.t('applications.NoSQLProtocol') + }, + { + name: MONGODB, + title: i18n.t(`applications.applicationsType.${MONGODB}`), + type: 'primary', + category: DATABASE_CATEGORY, + has: hasLicence } ]