Make all messages defined in i18n variables (#136)
*Motivation*
make sure the UI can be switched smoothly between english and chinese
diff --git a/.gitignore b/.gitignore
index fec4592..e94490a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,3 +42,4 @@
testdb
build/
*.db
+front-end/data/
diff --git a/front-end/src/components/Breadcrumb/index.vue b/front-end/src/components/Breadcrumb/index.vue
index 2ec25e5..40f97da 100644
--- a/front-end/src/components/Breadcrumb/index.vue
+++ b/front-end/src/components/Breadcrumb/index.vue
@@ -47,7 +47,7 @@
'path': matched[i].path,
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Management'
+ 'title': this.$i18n.t('breadcrumb.management')
}
})
}
@@ -56,21 +56,21 @@
route.push({
'path': '/management/clusters',
'meta': {
- 'title': 'Clusters'
+ 'title': this.$i18n.t('breadcrumb.clusters')
},
'redirect': matched[i].redirect
})
route.push({
'path': '/management/clusters/' + pathList[3] + '/cluster?tab=brokers',
'meta': {
- 'title': 'Brokers'
+ 'title': this.$i18n.t('breadcrumb.brokers')
},
'redirect': matched[i].redirect
})
route.push({
'path': matched[i].path,
'meta': {
- 'title': 'BrokerInfo'
+ 'title': this.$i18n.t('breadcrumb.brokerInfo')
},
'redirect': matched[i].redirect
})
@@ -78,21 +78,21 @@
route.push({
'path': '/management/clusters',
'meta': {
- 'title': 'Clusters'
+ 'title': this.$i18n.t('breadcrumb.clusters')
},
'redirect': matched[i].redirect
})
route.push({
'path': '/management/clusters/' + pathList[3] + '/cluster?tab=isolationPolicies',
'meta': {
- 'title': 'IsolationPolicies'
+ 'title': this.$i18n.t('breadcrumb.isolationPolicies')
},
'redirect': matched[i].redirect
})
route.push({
'path': matched[i].path,
'meta': {
- 'title': 'IsolationPolicieInfo'
+ 'title': this.$i18n.t('breadcrumb.isolationPolicyInfo')
},
'redirect': matched[i].redirect
})
@@ -100,21 +100,21 @@
route.push({
'path': '/management/clusters',
'meta': {
- 'title': 'Clusters'
+ 'title': this.$i18n.t('breadcrumb.clusters')
},
'redirect': matched[i].redirect
})
route.push({
'path': '/management/clusters/' + pathList[3] + '/cluster?tab=failureDomains',
'meta': {
- 'title': 'FailureDomains'
+ 'title': this.$i18n.t('breadcrumb.failureDomains')
},
'redirect': matched[i].redirect
})
route.push({
'path': matched[i].path,
'meta': {
- 'title': 'FailureDomainInfo'
+ 'title': this.$i18n.t('breadcrumb.failureDomainInfo')
},
'redirect': matched[i].redirect
})
@@ -122,14 +122,14 @@
route.push({
'path': '/management/clusters',
'meta': {
- 'title': 'Clusters'
+ 'title': this.$i18n.t('breadcrumb.clusters')
},
'redirect': matched[i].redirect
})
route.push({
'path': matched[i].path,
'meta': {
- 'title': 'ClusterInfo'
+ 'title': this.$i18n.t('breadcrumb.clusterInfo')
},
'redirect': matched[i].redirect
})
@@ -137,7 +137,7 @@
route.push({
'path': '/management/clusters',
'meta': {
- 'title': 'Clusters'
+ 'title': this.$i18n.t('breadcrumb.clusters')
},
'redirect': matched[i].redirect
})
@@ -145,7 +145,7 @@
route.push({
'path': '/management/tenants',
'meta': {
- 'title': 'Tenants'
+ 'title': this.$i18n.t('breadcrumb.tenants')
},
'redirect': matched[i].redirect
})
@@ -153,35 +153,35 @@
'path': '/management/tenants/tenantInfo/' + pathList[3] + '?tab=namespaces',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Namespaces'
+ 'title': this.$i18n.t('breadcrumb.namespaces')
}
})
route.push({
'path': '/management/namespaces/' + pathList[4] + '/' + pathList[5] + '/namespace' + '?tab=topics',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Topics'
+ 'title': this.$i18n.t('breadcrumb.topics')
}
})
route.push({
'path': '/management/topics/' + pathList[3] + '/' + pathList[4] + '/' + pathList[5] + '/' + pathList[6] + '/topic',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Subscriptions'
+ 'title': this.$i18n.t('breadcrumb.subscriptions')
}
})
route.push({
'path': matched[i].path,
'redirect': matched[i].redirect,
'meta': {
- 'title': 'SubscriptionInfo'
+ 'title': this.$i18n.t('breadcrumb.subscriptionInfo')
}
})
} else if (pathList.indexOf('topics') === 2) {
route.push({
'path': '/management/tenants',
'meta': {
- 'title': 'Tenants'
+ 'title': this.$i18n.t('breadcrumb.tenants')
},
'redirect': matched[i].redirect
})
@@ -189,21 +189,21 @@
'path': '/management/tenants/tenantInfo/' + pathList[3] + '?tab=namespaces',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Namespaces'
+ 'title': this.$i18n.t('breadcrumb.namespaces')
}
})
route.push({
'path': '/management/namespaces/' + pathList[4] + '/' + pathList[5] + '/namespace' + '?tab=topics',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Topics'
+ 'title': this.$i18n.t('breadcrumb.topics')
}
})
route.push({
'path': matched[i].path,
'redirect': matched[i].redirect,
'meta': {
- 'title': 'TopicInfo'
+ 'title': this.$i18n.t('breadcrumb.topicInfo')
}
})
} else if (pathList.indexOf('namespaces') === 2) {
@@ -211,21 +211,21 @@
'path': '/management/tenants',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Tenants'
+ 'title': this.$i18n.t('breadcrumb.tenants')
}
})
route.push({
'path': '/management/tenants/tenantInfo/' + pathList[3] + '?tab=namespaces',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Namespaces'
+ 'title': this.$i18n.t('breadcrumb.namespaces')
}
})
route.push({
'path': matched[i].path,
'redirect': matched[i].redirect,
'meta': {
- 'title': 'NamespaceInfo'
+ 'title': this.$i18n.t('breadcrumb.namespaceInfo')
}
})
} else if (pathList.indexOf('tenantInfo') === 3) {
@@ -233,14 +233,14 @@
'path': '/management/tenants',
'redirect': matched[i].redirect,
'meta': {
- 'title': 'Tenants'
+ 'title': this.$i18n.t('breadcrumb.tenants')
}
})
route.push({
'path': matched[i].path,
'redirect': matched[i].redirect,
'meta': {
- 'title': 'TenantInfo'
+ 'title': this.$i18n.t('breadcrumb.tenantInfo')
}
})
}
diff --git a/front-end/src/components/LangSelect/index.vue b/front-end/src/components/LangSelect/index.vue
index ef5f2c4..31cc80d 100644
--- a/front-end/src/components/LangSelect/index.vue
+++ b/front-end/src/components/LangSelect/index.vue
@@ -6,7 +6,6 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="language==='zh'" command="zh">中文</el-dropdown-item>
<el-dropdown-item :disabled="language==='en'" command="en">English</el-dropdown-item>
- <el-dropdown-item :disabled="language==='es'" command="es">Español</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
diff --git a/front-end/src/lang/en.js b/front-end/src/lang/en.js
index eb2ad07..960ec92 100644
--- a/front-end/src/lang/en.js
+++ b/front-end/src/lang/en.js
@@ -1,12 +1,12 @@
/*
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
@@ -94,6 +94,13 @@
thirdparty: 'Or connect with',
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !'
},
+ sidebar: {
+ clusters: 'Clusters',
+ clusterInfo: 'Cluster Details',
+ tenants: 'Tenants',
+ namespaces: 'Namespaces',
+ topics: 'Topics'
+ },
documentation: {
documentation: 'Documentation',
github: 'Github Repository'
@@ -207,17 +214,64 @@
closeOthers: 'Close Others',
closeAll: 'Close All'
},
+ breadcrumb: {
+ management: 'Management',
+ clusters: 'Clusters',
+ clusterInfo: 'Cluster Details',
+ brokers: 'Brokers',
+ brokerInfo: 'Broker Details',
+ isolationPolicies: 'Isolation Policies',
+ isolationPolicyInfo: 'Isolation Policy Details',
+ failureDomains: 'Failure Domains',
+ failureDomainInfo: 'Faillure Domain Details',
+ tenants: 'Tenants',
+ tenantInfo: 'Tenant Details',
+ namespaces: 'Namespaces',
+ namespaceInfo: 'Namespace Details',
+ topics: 'Topics',
+ topicInfo: 'Topic Details',
+ subscriptions: 'Subscriptions',
+ subscriptionInfo: 'Subscription Details'
+ },
tabs: {
config: 'CONFIG',
broker: 'BROKER',
bookie: 'BOOKIE',
namespace: 'NAMESPACE',
overview: 'OVERVIEW',
- topic: 'TOPIC',
+ topic: 'TOPICS',
policies: 'POLICIES',
configuration: 'CONFIGURATION',
failuredomains: 'FAILURE DOMAINS',
- isolationpolicies: 'ISOLATION POLICIES'
+ isolationpolicies: 'ISOLATION POLICIES',
+ storage: 'STORAGE'
+ },
+ role: {
+ roleAlreadyExists: 'Role already exists'
+ },
+ role_actions: {
+ consume: 'consume',
+ produce: 'produce',
+ functions: 'functions'
+ },
+ subscription_auth_mode: {
+ none: 'None',
+ prefix: 'Prefix'
+ },
+ backlog_policy: {
+ consumer_backlog_eviction: 'consumer_backlog_eviction',
+ producer_exception: 'producer_exception',
+ producer_request_hold: 'producer_request_hold'
+ },
+ schema_bc: {
+ full: 'Full',
+ forward: 'Forward',
+ backward: 'Backward',
+ always: 'Always Compatible',
+ auto_update_disabled: 'AutoUpdate Disabled',
+ backward_transitive: 'Backward Transitive',
+ forward_transitive: 'Forward Transitive',
+ full_transitive: 'Full Transitive'
},
common: {
dangerZone: 'Danger Zone',
@@ -235,7 +289,7 @@
},
tenant: {
label: 'Tenant',
- name: 'Tenant Name',
+ name: 'Tenant',
searchTenant: 'Search Tenants',
newTenant: 'New Tenant',
deleteTenant: 'Delete Tenant',
@@ -248,18 +302,29 @@
allowedClustersContent: 'This is Allowed Clusters Content',
adminRolesContent: 'This is Admin Roles Content',
permissions: 'Permissions',
- newRole: '+ New Role'
+ newRole: '+ New Role',
+ tenantIsRequired: 'Tenant Name is required',
+ clusterIsRequired: 'Please select allowed clusters for a tenant',
+ createTenantSuccessNotification: 'Successfully create a tenant',
+ deleteTenantSuccessNotification: 'Successfully delete a tenant',
+ roleAlreadyExists: 'Role already exists',
+ updateRolesSuccessNotification: 'Successfully update roles for this tenant',
+ updateClustersSuccessNotification: 'Successfully update allowed clusters for this tenant'
},
namespace: {
label: 'Namespace',
- name: 'Namespace Name',
- namespaceNumber: 'Namespace Number',
+ name: 'Namespace',
+ namespaceNumber: 'Namespaces',
newNamespace: 'New Namespace',
deleteNamespace: 'Delete Namespace',
inputNamespaceMessage: 'Please input namespace',
newTopic: 'New Topic',
searchTopics: 'Search Topics',
deleteNamespaceMessage: 'Are you sure you want to delete this namespace?',
+ namespaceNameIsRequired: 'Namespace name is required',
+ createNsSuccessNotification: 'Successfully create a namespace',
+ deleteNsSuccessNotification: 'Successfully delete the namespace',
+ searchNamespaces: 'Search namespaces',
policy: {
label: 'Policy',
name: 'Policy Name',
@@ -357,7 +422,8 @@
antiAffinity: 'Anti Affinity',
antiAffinityGroup: 'Anti Affinity Group',
antiAffinityGroupContent: 'This is antiAffinityGroupContent',
- inputAntiAffinityGroup: 'Please input Anti Affinity Group'
+ inputAntiAffinityGroup: 'Please input Anti Affinity Group',
+ roleAlreadyExists: 'This role already exists'
},
clearBacklog: 'Clear Backlog',
bundle: {
@@ -367,12 +433,45 @@
split: 'Split',
unload: 'Unload',
bundleInfoContent: 'This is Bundle Info'
+ },
+ notification: {
+ updatePersistenceSuccess: 'Successfully update persistence settings for this namespace!',
+ updateBacklogQuotaSuccess: 'Successfully update backlog quota settings for this namespace!',
+ splitBundleSuccess: 'Successfully split a namespace bundle for this namespace!',
+ unloadAllBundlesSuccess: 'Successfully unload all the namespace bundles for this namespace!',
+ unloadBundleSuccess: 'Successfully unload a namespace bundle for this namespace!',
+ clearBacklogSuccess: 'Successfully clear backlog for this namespace!',
+ clearBundleBacklogSuccess: 'Successfully clear backlog of a namespace bundle for this namespace!',
+ updateReplicatedClustersSuccess: 'Successfully update replicated clusters for this namespace!',
+ updateSubscriptionAuthModeSuccess: 'Successfully update subscription authentication mode for this namespace!',
+ addRoleSuccess: 'Successfully add a role for this namespace!',
+ removeRoleSuccess: 'Successfully remove a role from this namespace!',
+ updateSchemaAutoUpdateStrategySuccess: 'Successfully change schema auto-update strategy for this namespace!',
+ enableSchemaValidationEnforcedSuccess: 'Successfully enable schema validation for this namespace!',
+ disableSchemaValidationEnforcedSuccess: 'Successfully disable schema validation for this namespace!',
+ updateMessageTTLSuccess: 'Successfully set message TTL for this namespace!',
+ updateRetentionSuccess: 'Successfully set message retention policy for this namespace!',
+ updateCompactionThresholdSuccess: 'Successfully set compaction threshold for this namespace!',
+ updateOffloadThresholdSuccess: 'Successfully set offload threshold for this namespace!',
+ updateOffloadDeletionLagSuccess: 'Successfully update offload deletion lag for this namespace!',
+ setMaxProducersSuccess: 'Successfully set max producers per topic for this namespace!',
+ setMaxConsumersSuccess: 'Successfully set max consumers per topic for this namespace!',
+ setMaxConsumersPerSubscriptionSuccess: 'Successfully set max consumers per subscription for this namespace!',
+ setDispatchRateSuccess: 'Successfully set max dispatch rate per topic for this namespace!',
+ setDispatchRatePerSubscriptionSuccess: 'Successfully set max dispatch rate per subscription for this namespace!',
+ setSubscribeRateSuccess: 'Successfully set max subscribe rate per topic for this namespace!',
+ setAntiAffinityGroupSuccess: 'Successfully set anti-affinity group for this namespace!',
+ enableEncryptionSuccess: 'Successfully enable message encryption for this namespace!',
+ disableEncryptionSuccess: 'Successfully disable message encryption for this namespace!',
+ enableDeduplicationSuccess: 'Successfully enable message de-duplication for this namespace!',
+ disableDeduplicationSuccess: 'Successfully disable message de-duplication for this namespace!'
}
},
topic: {
label: 'Topic',
- name: 'Topic Name',
- topicNumber: 'Topic Number',
+ name: 'Topic',
+ topicName: 'Topic Name',
+ topicNumber: 'Topics',
newTopic: 'New Topic',
deleteTopic: 'Delete Topic',
delete: 'Delete',
@@ -380,8 +479,8 @@
nonPersistent: 'Non-persistent',
partition: 'Partition',
partitions: 'Partitions',
- partitionNumber: 'Partition Number',
- topicDomain: 'Topic Domain',
+ partitionNumber: 'Partitions',
+ topicDomain: 'Domain',
addRole: 'Add Role',
producer: {
label: 'Producer',
@@ -389,7 +488,7 @@
producers: 'Producers',
producerId: 'Producer Id',
producerName: 'Producer Name',
- producerNumber: 'Producer Number',
+ producerNumber: 'Producers',
avgMsgSize: 'Avg Msg Size',
address: 'Address',
since: 'Since'
@@ -399,7 +498,7 @@
name: 'Subscription Name',
subscriptions: 'Subscriptions',
type: 'Type',
- subscriptionNumber: 'Subscription Number',
+ subscriptionNumber: 'Subscriptions',
msgExpired: 'Msg Expired',
backlog: 'Backlog',
skip: 'SKIP',
@@ -452,6 +551,15 @@
address: 'Address',
since: 'Since'
},
+ notification: {
+ createTopicSuccess: 'Successfully create a topic!',
+ deleteTopicSuccess: 'Successfully delete the topic!',
+ deletePartitionedTopicSuccess: 'Successfully delete the partitioned topic!',
+ unloadTopicSuccess: 'Successfully unload the topic!',
+ terminateTopicSuccess: 'Successfully terminate the topic!',
+ startCompactionSuccess: 'Successfully start compacting the topic!',
+ startOffloadSuccess: 'Successfully start offloading the topic!'
+ },
info: 'INFO',
column: 'column',
data: 'data',
diff --git a/front-end/src/lang/es.js b/front-end/src/lang/es.js
deleted file mode 100755
index a3795a3..0000000
--- a/front-end/src/lang/es.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export default {
- route: {
- dashboard: 'Panel de control',
- introduction: 'Introducción',
- documentation: 'Documentación',
- guide: 'Guía',
- permission: 'Permisos',
- pagePermission: 'Permisos de la página',
- directivePermission: 'Permisos de la directiva',
- icons: 'Iconos',
- components: 'Componentes',
- componentIndex: 'Introducción',
- tinymce: 'Tinymce',
- markdown: 'Markdown',
- jsonEditor: 'Editor JSON',
- dndList: 'Lista Dnd',
- splitPane: 'Panel dividido',
- avatarUpload: 'Subir avatar',
- dropzone: 'Subir ficheros',
- sticky: 'Sticky',
- countTo: 'CountTo',
- componentMixin: 'Mixin',
- backToTop: 'Ir arriba',
- dragDialog: 'Drag Dialog',
- dragSelect: 'Drag Select',
- dragKanban: 'Drag Kanban',
- charts: 'Gráficos',
- keyboardChart: 'Keyboard Chart',
- lineChart: 'Gráfico de líneas',
- mixChart: 'Mix Chart',
- example: 'Ejemplo',
- nested: 'Rutas anidadass',
- menu1: 'Menu 1',
- 'menu1-1': 'Menu 1-1',
- 'menu1-2': 'Menu 1-2',
- 'menu1-2-1': 'Menu 1-2-1',
- 'menu1-2-2': 'Menu 1-2-2',
- 'menu1-3': 'Menu 1-3',
- menu2: 'Menu 2',
- Table: 'Tabla',
- dynamicTable: 'Tabla dinámica',
- dragTable: 'Arrastrar tabla',
- inlineEditTable: 'Editor',
- complexTable: 'Complex Table',
- treeTable: 'Tree Table',
- customTreeTable: 'Custom TreeTable',
- tab: 'Pestaña',
- form: 'Formulario',
- createArticle: 'Crear artículo',
- editArticle: 'Editar artículo',
- articleList: 'Listado de artículos',
- errorPages: 'Páginas de error',
- page401: '401',
- page404: '404',
- errorLog: 'Registro de errores',
- excel: 'Excel',
- exportExcel: 'Exportar a Excel',
- selectExcel: 'Export seleccionado',
- uploadExcel: 'Subir Excel',
- zip: 'Zip',
- exportZip: 'Exportar a Zip',
- theme: 'Tema',
- clipboardDemo: 'Clipboard',
- i18n: 'I18n',
- externalLink: 'Enlace externo'
- },
- navbar: {
- logOut: 'Salir',
- dashboard: 'Panel de control',
- github: 'Github',
- screenfull: 'Pantalla completa',
- theme: 'Tema',
- size: 'Tamaño global'
- },
- login: {
- title: 'Formulario de acceso',
- logIn: 'Acceso',
- username: 'Usuario',
- password: 'Contraseña',
- any: 'nada',
- thirdparty: 'Conectar con',
- thirdpartyTips: 'No se puede simular en local, así que combine su propia simulación de negocios. ! !'
- },
- documentation: {
- documentation: 'Documentación',
- github: 'Repositorio Github'
- },
- permission: {
- roles: 'Tus permisos',
- switchRoles: 'Cambiar permisos'
- },
- guide: {
- description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
- button: 'Ver guía'
- },
- components: {
- documentation: 'Documentación',
- tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
- dropzoneTips: 'Because my business has special needs, and has to upload images to qiniu, so instead of a third party, I chose encapsulate it by myself. It is very simple, you can see the detail code in @/components/Dropzone.',
- stickyTips: 'when the page is scrolled to the preset position will be sticky on the top.',
- backToTopTips1: 'When the page is scrolled to the specified position, the Back to Top button appears in the lower right corner',
- backToTopTips2: 'You can customize the style of the button, show / hide, height of appearance, height of the return. If you need a text prompt, you can use element-ui el-tooltip elements externally',
- imageUploadTips: 'Since I was using only the vue@1 version, and it is not compatible with mockjs at the moment, I modified it myself, and if you are going to use it, it is better to use official version.'
- },
- table: {
- dynamicTips1: 'Fixed header, sorted by header order',
- dynamicTips2: 'Not fixed header, sorted by click order',
- dragTips1: 'Orden por defecto',
- dragTips2: 'The after dragging order',
- title: 'Título',
- importance: 'Importancia',
- type: 'Tipo',
- remark: 'Remark',
- search: 'Buscar',
- add: 'Añadir',
- export: 'Exportar',
- reviewer: 'reviewer',
- id: 'ID',
- date: 'Fecha',
- author: 'Autor',
- readings: 'Lector',
- status: 'Estado',
- actions: 'Acciones',
- edit: 'Editar',
- publish: 'Publicar',
- draft: 'Draft',
- delete: 'Eliminar',
- cancel: 'Cancelar',
- confirm: 'Confirmar'
- },
- errorLog: {
- tips: 'Please click the bug icon in the upper right corner',
- description: 'Now the management system are basically the form of the spa, it enhances the user experience, but it also increases the possibility of page problems, a small negligence may lead to the entire page deadlock. Fortunately Vue provides a way to catch handling exceptions, where you can handle errors or report exceptions.',
- documentation: 'Documento de introducción'
- },
- excel: {
- export: 'Exportar',
- selectedExport: 'Exportar seleccionados',
- placeholder: 'Por favor escribe un nombre de fichero'
- },
- zip: {
- export: 'Exportar',
- placeholder: 'Por favor escribe un nombre de fichero'
- },
- theme: {
- change: 'Cambiar tema',
- documentation: 'Documentación del tema',
- tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
- },
- tagsView: {
- refresh: 'Actualizar',
- close: 'Cerrar',
- closeOthers: 'Cerrar otros',
- closeAll: 'Cerrar todos'
- }
-}
diff --git a/front-end/src/lang/index.js b/front-end/src/lang/index.js
index 2b92f75..63ad8a0 100644
--- a/front-end/src/lang/index.js
+++ b/front-end/src/lang/index.js
@@ -16,10 +16,8 @@
import Cookies from 'js-cookie'
import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang
-import elementEsLocale from 'element-ui/lib/locale/lang/es'// element-ui lang
import enLocale from './en'
import zhLocale from './zh'
-import esLocale from './es'
Vue.use(VueI18n)
@@ -31,10 +29,6 @@
zh: {
...zhLocale,
...elementZhLocale
- },
- es: {
- ...esLocale,
- ...elementEsLocale
}
}
diff --git a/front-end/src/lang/zh.js b/front-end/src/lang/zh.js
index c5ae412..e94a25f 100644
--- a/front-end/src/lang/zh.js
+++ b/front-end/src/lang/zh.js
@@ -94,6 +94,13 @@
thirdparty: '第三方登录',
thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!'
},
+ sidebar: {
+ clusters: 'Clusters',
+ clusterInfo: 'Cluster Details',
+ tenants: 'Tenants',
+ namespaces: 'Namespaces',
+ topics: 'Topics'
+ },
documentation: {
documentation: '文档',
github: 'Github 地址'
@@ -207,17 +214,64 @@
closeOthers: '关闭其它',
closeAll: '关闭所有'
},
+ breadcrumb: {
+ management: 'Management',
+ clusters: 'Clusters',
+ clusterInfo: 'Cluster Details',
+ brokers: 'Brokers',
+ brokerInfo: 'Broker Details',
+ isolationPolicies: 'Isolation Policies',
+ isolationPolicyInfo: 'Isolation Policy Details',
+ failureDomains: 'Failure Domains',
+ failureDomainInfo: 'Faillure Domain Details',
+ tenants: 'Tenants',
+ tenantInfo: 'Tenant Details',
+ namespaces: 'Namespaces',
+ namespaceInfo: 'Namespace Details',
+ topics: 'Topics',
+ topicInfo: 'Topic Details',
+ subscriptions: 'Subscriptions',
+ subscriptionInfo: 'Subscription Details'
+ },
tabs: {
config: 'CONFIG',
broker: 'BROKER',
bookie: 'BOOKIE',
namespace: 'NAMESPACE',
overview: 'OVERVIEW',
- topic: 'TOPIC',
+ topic: 'TOPICS',
policies: 'POLICIES',
configuration: 'CONFIGURATION',
failuredomains: 'FAILURE DOMAINS',
- isolationpolicies: 'ISOLATION POLICIES'
+ isolationpolicies: 'ISOLATION POLICIES',
+ storage: 'STORAGE'
+ },
+ role: {
+ roleAlreadyExists: 'Role already exists'
+ },
+ role_actions: {
+ consume: 'consume',
+ produce: 'produce',
+ functions: 'functions'
+ },
+ subscription_auth_mode: {
+ none: 'None',
+ prefix: 'Prefix'
+ },
+ backlog_policy: {
+ consumer_backlog_eviction: 'consumer_backlog_eviction',
+ producer_exception: 'producer_exception',
+ producer_request_hold: 'producer_request_hold'
+ },
+ schema_bc: {
+ full: 'Full',
+ forward: 'Forward',
+ backward: 'Backward',
+ always: 'Always Compatible',
+ auto_update_disabled: 'AutoUpdate Disabled',
+ backward_transitive: 'Backward Transitive',
+ forward_transitive: 'Forward Transitive',
+ full_transitive: 'Full Transitive'
},
common: {
dangerZone: 'Danger Zone',
@@ -248,7 +302,14 @@
allowedClustersContent: 'This is Allowed Clusters Content',
adminRolesContent: 'This is Admin Roles Content',
permissions: 'Permissions',
- newRole: '+ New Role'
+ newRole: '+ New Role',
+ tenantIsRequired: 'Tenant Name is required',
+ clusterIsRequired: 'Please select allowed clusters for a tenant',
+ createTenantSuccessNotification: 'Successfully create a tenant',
+ deleteTenantSuccessNotification: 'Successfully delete a tenant',
+ roleAlreadyExists: 'Role already exists',
+ updateRolesSuccessNotification: 'Successfully update roles for this tenant',
+ updateClustersSuccessNotification: 'Successfully update allowed clusters for this tenant'
},
namespace: {
label: 'Namespace',
@@ -260,6 +321,10 @@
newTopic: 'New Topic',
searchTopics: 'Search Topics',
deleteNamespaceMessage: 'Are you sure you want to delete this namespace?',
+ namespaceNameIsRequired: 'Namespace name is required',
+ createNsSuccessNotification: 'Successfully create a namespace',
+ deleteNsSuccessNotification: 'Successfully delete the namespace',
+ searchNamespaces: 'Search namespaces',
policy: {
label: 'Policy',
name: 'Policy Name',
@@ -357,7 +422,8 @@
antiAffinity: 'Anti Affinity',
antiAffinityGroup: 'Anti Affinity Group',
antiAffinityGroupContent: 'This is antiAffinityGroupContent',
- inputAntiAffinityGroup: 'Please input Anti Affinity Group'
+ inputAntiAffinityGroup: 'Please input Anti Affinity Group',
+ roleAlreadyExists: 'This role already exists'
},
clearBacklog: 'Clear Backlog',
bundle: {
@@ -367,12 +433,45 @@
split: 'Split',
unload: 'Unload',
bundleInfoContent: 'This is Bundle Info'
+ },
+ notification: {
+ updatePersistenceSuccess: 'Successfully update persistence settings for this namespace!',
+ updateBacklogQuotaSuccess: 'Successfully update backlog quota settings for this namespace!',
+ splitBundleSuccess: 'Successfully split a namespace bundle for this namespace!',
+ unloadAllBundlesSuccess: 'Successfully unload all the namespace bundles for this namespace!',
+ unloadBundleSuccess: 'Successfully unload a namespace bundle for this namespace!',
+ clearBacklogSuccess: 'Successfully clear backlog for this namespace!',
+ clearBundleBacklogSuccess: 'Successfully clear backlog of a namespace bundle for this namespace!',
+ updateReplicatedClustersSuccess: 'Successfully update replicated clusters for this namespace!',
+ updateSubscriptionAuthModeSuccess: 'Successfully update subscription authentication mode for this namespace!',
+ addRoleSuccess: 'Successfully add a role for this namespace!',
+ removeRoleSuccess: 'Successfully remove a role from this namespace!',
+ updateSchemaAutoUpdateStrategySuccess: 'Successfully change schema auto-update strategy for this namespace!',
+ enableSchemaValidationEnforcedSuccess: 'Successfully enable schema validation for this namespace!',
+ disableSchemaValidationEnforcedSuccess: 'Successfully disable schema validation for this namespace!',
+ updateMessageTTLSuccess: 'Successfully set message TTL for this namespace!',
+ updateRetentionSuccess: 'Successfully set message retention policy for this namespace!',
+ updateCompactionThresholdSuccess: 'Successfully set compaction threshold for this namespace!',
+ updateOffloadThresholdSuccess: 'Successfully set offload threshold for this namespace!',
+ updateOffloadDeletionLagSuccess: 'Successfully update offload deletion lag for this namespace!',
+ setMaxProducersSuccess: 'Successfully set max producers per topic for this namespace!',
+ setMaxConsumersSuccess: 'Successfully set max consumers per topic for this namespace!',
+ setMaxConsumersPerSubscriptionSuccess: 'Successfully set max consumers per subscription for this namespace!',
+ setDispatchRateSuccess: 'Successfully set max dispatch rate per topic for this namespace!',
+ setDispatchRatePerSubscriptionSuccess: 'Successfully set max dispatch rate per subscription for this namespace!',
+ setSubscribeRateSuccess: 'Successfully set max subscribe rate per topic for this namespace!',
+ setAntiAffinityGroupSuccess: 'Successfully set anti-affinity group for this namespace!',
+ enableEncryptionSuccess: 'Successfully enable message encryption for this namespace!',
+ disableEncryptionSuccess: 'Successfully disable message encryption for this namespace!',
+ enableDeduplicationSuccess: 'Successfully enable message de-duplication for this namespace!',
+ disableDeduplicationSuccess: 'Successfully disable message de-duplication for this namespace!'
}
},
topic: {
label: 'Topic',
name: 'Topic Name',
- topicNumber: 'Topic Number',
+ topicName: 'Topic Name',
+ topicNumber: 'Topics',
newTopic: 'New Topic',
deleteTopic: 'Delete Topic',
delete: 'Delete',
@@ -452,6 +551,15 @@
address: 'Address',
since: 'Since'
},
+ notification: {
+ createTopicSuccess: 'Successfully create a topic!',
+ deleteTopicSuccess: 'Successfully delete the topic!',
+ deletePartitionedTopicSuccess: 'Successfully delete the partitioned topic!',
+ unloadTopicSuccess: 'Successfully unload the topic!',
+ terminateTopicSuccess: 'Successfully terminate the topic!',
+ startCompactionSuccess: 'Successfully start compacting the topic!',
+ startOffloadSuccess: 'Successfully start offloading the topic!'
+ },
info: 'INFO',
column: 'column',
data: 'data',
@@ -482,7 +590,13 @@
brokerServiceUrlPrefix: 'Broker Service Url',
brokerServiceUrlTlsPrefix: 'Broker Service Url (TLS)',
deleteClusterMessage: 'Are you sure you want to delete this policy?',
- replicatedCluster: 'Replicated Clusters'
+ replicatedCluster: 'Replicated Clusters',
+ addClusterSuccessNotification: 'Successfully add a cluster',
+ deleteClusterSuccessNotification: 'Successfully delete a cluster',
+ clusterNameIsRequired: 'Cluster name is required',
+ serviceUrlIsRequired: 'Service URL is required',
+ deleteClusterDialogCaption: 'Delete Cluster',
+ updateClusterSuccessNotification: 'Successfully update a cluster'
},
broker: {
label: 'Broker',
@@ -512,7 +626,12 @@
newFd: 'New FailureDomain',
updateFd: 'Update Failure Domain',
deleteFd: 'Delete Failure Domain',
- deleteFdMessage: 'Are you sure you want to delete this domain?'
+ deleteFdMessage: 'Are you sure you want to delete this domain?',
+ domainNameIsRequired: 'Domain Name is required',
+ deleteDomainDialogCaption: 'Delete Failure Domain',
+ createFdSuccessNotification: 'Successfully create a failure domain',
+ deleteFdSuccessNotification: 'Successfully delete a failure domain',
+ updateFdSuccessNotification: 'Successfully update a failure domain'
},
// isolation policies
ip: {
@@ -538,6 +657,40 @@
brokerUsageThresholdPh: 'Please input broker usage threshold',
minimalAvailableBrokerLabel: 'Minimal Available Brokers',
minimalAvailableBrokerPh: 'Please input minimalAvailableBroker',
- deletePolicyMessage: 'Are you sure you want to delete this policy?'
+ deletePolicyMessage: 'Are you sure you want to delete this policy?',
+ deletePolicyDialogCaption: 'Delete Isolation Policy',
+ deletePolicySuccessNotification: 'Successfully delete an isolation policy',
+ policyNameCannotBeEmpty: 'Policy name cannot be empty',
+ regexCannotBeEmpty: 'Namespace regex cannot be empty',
+ nsRegexAlreadyExists: 'Namespace regex already exists',
+ primaryBrokerRegexCannotBeEmpty: 'Primary broker regex cannot be empty',
+ primaryBrokerRegexAlreadyExists: 'Primary broker regex already exists',
+ secondaryBrokerRegexCannotBeEmpty: 'Secondary broker regex cannot be empty',
+ secondaryBrokerRegexAlreadyExists: 'Secondary broker regex already exists',
+ numLimitShouldGreaterThan0: 'Minimal available brokers should be greater than 0',
+ usageThresholdShouldGreaterThan0: 'Broker usage threshold should be greater than 0',
+ updatePolicySuccessNotification: 'Successfully update an ioslation policy'
+ },
+ // environment
+ env: {
+ buttonNewEnv: 'New Environment',
+ colHeadingEnv: 'Environment Name',
+ colHeadingServiceUrl: 'Service URL',
+ newEnvDialogCaption: 'New Environment',
+ newEnvNamePlaceHolder: 'Please input environment name',
+ newEnvNameLabel: 'Environment Name',
+ newEnvServiceUrlPlaceHolder: 'Please input environment service url',
+ newEnvServiceUrlLabel: 'Service URL',
+ updateEnvDialogCaption: 'Update Environment',
+ updateEnvNameLabel: 'Environment Name',
+ updateEnvServiceUrlPlaceHolder: 'Please input environment service url',
+ updateEnvServiceUrlLabel: 'Service URL',
+ deleteEnvDialogCaption: 'Delete Environment',
+ deleteEnvDialogText: 'Are you sure you want to delete this environment?',
+ envNameIsRequired: 'Environment Name is required',
+ serviceUrlIsRequired: 'Service URL is required',
+ addEnvSuccessNotification: 'Successfully add an environment',
+ deleteEnvSuccessNotification: 'Successfully delete an environment',
+ updateEnvSuccessNotification: 'Successfully update an environment'
}
}
diff --git a/front-end/src/views/management/namespaces/namespace.vue b/front-end/src/views/management/namespaces/namespace.vue
index b70b4f5..f2e635f 100644
--- a/front-end/src/views/management/namespaces/namespace.vue
+++ b/front-end/src/views/management/namespaces/namespace.vue
@@ -27,7 +27,7 @@
</el-table>
<h4>
Bundles
- <el-tooltip :content="bundleInfoContent" class="item" effect="dark" placement="top">
+ <el-tooltip :content="$t('namespace.bundle.bundleInfoContent')" class="item" effect="dark" placement="top">
<i class="el-icon-info"/>
</el-tooltip>
</h4>
@@ -84,7 +84,7 @@
<span>{{ scope.row.partitions }}</span>
</template>
</el-table-column>
- <el-table-column :label="$t('topic.persistent')" min-width="30px" align="center">
+ <el-table-column :label="$t('topic.topicDomain')" min-width="30px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.persistent }}</span>
</template>
@@ -101,22 +101,22 @@
</el-table-column>
<el-table-column :label="$t('common.inMsg')" min-width="30px" align="center">
<template slot-scope="scope">
- <span>{{ scope.row.inMsg }}</span>
+ <i class="el-icon-download" style="margin-right: 2px"/><span>{{ scope.row.inMsg }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common.outMsg')" min-width="30px" align="center">
<template slot-scope="scope">
- <span>{{ scope.row.outMsg }}</span>
+ <i class="el-icon-upload2" style="margin-right: 2px"/><span>{{ scope.row.outMsg }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common.inBytes')" min-width="30px" align="center">
<template slot-scope="scope">
- <span>{{ scope.row.inBytes }}</span>
+ <i class="el-icon-download" style="margin-right: 2px"/><span>{{ scope.row.inBytes }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common.outBytes')" min-width="30px" align="center">
<template slot-scope="scope">
- <span>{{ scope.row.outBytes }}</span>
+ <i class="el-icon-upload2" style="margin-right: 2px"/><span>{{ scope.row.outBytes }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common.storageSize')" min-width="30px" align="center">
@@ -134,7 +134,7 @@
<div class="component-item">
<div class="section-title">
<span>{{ $t('namespace.policy.replicatedCluster') }}</span>
- <el-tooltip :content="replicatedClustersContent" class="item" effect="dark" placement="top">
+ <el-tooltip :content="$t('namespace.policy.replicatedClustersContent')" class="item" effect="dark" placement="top">
<i class="el-icon-info"/>
</el-tooltip>
</div>
@@ -615,10 +615,10 @@
<el-radio :label="$t('topic.nonPersistent')"/>
</el-radio-group>
</el-form-item>
- <el-form-item :label="$t('topic.name')" prop="topic">
+ <el-form-item :label="$t('topic.topicName')" prop="topic">
<el-input v-model="form.topic"/>
</el-form-item>
- <el-form-item :label="$t('topic.partition')" prop="partition">
+ <el-form-item :label="$t('topic.partitions')" prop="partition">
<el-input v-model="form.partitions"/>
</el-form-item>
<el-form-item>
@@ -703,7 +703,7 @@
inBytes: 0,
outBytes: 0
}],
- replicatedClustersContent: this.$i18n.t('namespace.replicatedClustersContent'),
+ replicatedClustersContent: this.$i18n.t('namespace.policy.replicatedClustersContent'),
replicationClustersValue: [],
replicationClustersOptions: [],
dynamicValidateForm: {
@@ -720,23 +720,23 @@
roleMapOptions: {},
roleOptions: [{
value: 'consume',
- label: 'consume'
+ label: this.$i18n.t('role_actions.consume')
}, {
value: 'produce',
- label: 'produce'
+ label: this.$i18n.t('role_actions.produce')
}, {
value: 'functions',
- label: 'functions'
+ label: this.$i18n.t('role_actions.functions')
}],
authorizationContent: this.$i18n.t('namespace.policy.authorizationContent'),
subscriptionAuthenticationMode: '',
subscriptionAuthenticationModeContent: this.$i18n.t('namespace.policy.subscriptionAuthenticationModeContent'),
subscriptionAuthenticationModeOptions: [{
value: 'None',
- label: 'None'
+ label: this.$i18n.t('subscription_auth_mode.none')
}, {
value: 'Prefix',
- label: 'Prefix'
+ label: this.$i18n.t('subscription_auth_mode.prefix')
}],
replicationFactorContent: this.$i18n.t('namespace.policy.replicationFactorContent'),
form: {
@@ -751,9 +751,9 @@
autoUpdateStrategy: '',
messageTTL: '',
retentionTime: '',
- encryptionRequireRadio: 'Disabled',
- deduplicationRadio: 'Disabled',
- schemaValidationEnforcedRadio: 'Disabled',
+ encryptionRequireRadio: this.$i18n.t('common.disabled'),
+ deduplicationRadio: this.$i18n.t('common.disabled'),
+ schemaValidationEnforcedRadio: this.$i18n.t('common.disabled'),
dispatchRatePerTopicBytes: '',
dispatchRatePerTopicMessage: '',
dispatchRatePerTopicPeriod: '',
@@ -778,56 +778,56 @@
backlogRententionPolicyRadio: 'consumer_backlog_eviction',
backlogRententionPolicyOption: [{
value: 'consumer_backlog_eviction',
- label: 'consumer_backlog_eviction'
+ label: this.$i18n.t('backlog_policy.consumer_backlog_eviction')
}, {
value: 'producer_exception',
- label: 'producer_exception'
+ label: this.$i18n.t('backlog_policy.producer_exception')
}, {
value: 'producer_request_hold',
- lable: 'producer_request_hold'
+ label: this.$i18n.t('backlog_policy.producer_request_hold')
}],
encryptionRequireContent: this.$i18n.t('namespace.policy.encryptionRequireContent'),
encryptionRequireOption: [{
value: 'Enabled',
- label: 'Enabled'
+ label: this.$i18n.t('common.enabled')
}, {
value: 'Disabled',
- label: 'Disabled'
+ label: this.$i18n.t('common.disabled')
}],
deduplicationContent: this.$i18n.t('namespace.policy.deduplicationContent'),
deduplication: '',
deduplicationOption: [{
value: 'Enabled',
- label: 'Enabled'
+ label: this.$i18n.t('common.enabled')
}, {
value: 'Disabled',
- label: 'Disabled'
+ label: this.$i18n.t('common.disabled')
}],
autoUpdateStrategyContent: this.$i18n.t('namespace.policy.autoUpdateStrategyContent'),
autoUpdateStrategyOption: [{
value: 'Full',
- label: 'Full'
- }, {
- value: 'Forward',
- label: 'Forward'
- }, {
- value: 'Backward',
- label: 'Backward'
- }, {
- value: 'AlwaysCompatible',
- label: 'Always Compatible'
- }, {
- value: 'AutoUpdateDisabled',
- label: 'AutoUpdateDisabled'
- }, {
- value: 'BackwardTransitive',
- label: 'BackwardTransitive'
- }, {
- value: 'ForwardTransitive',
- label: 'ForwardTransitive'
+ label: this.$i18n.t('schema_bc.full')
}, {
value: 'FullTransitive',
- label: 'FullTransitive'
+ label: this.$i18n.t('schema_bc.full_transitive')
+ }, {
+ value: 'Forward',
+ label: this.$i18n.t('schema_bc.forward')
+ }, {
+ value: 'ForwardTransitive',
+ label: this.$i18n.t('schema_bc.forward_transitive')
+ }, {
+ value: 'Backward',
+ label: this.$i18n.t('schema_bc.backward')
+ }, {
+ value: 'BackwardTransitive',
+ label: this.$i18n.t('schema_bc.backward_transitive')
+ }, {
+ value: 'AlwaysCompatible',
+ label: this.$i18n.t('schema_bc.always')
+ }, {
+ value: 'AutoUpdateDisabled',
+ label: this.$i18n.t('schema_bc.auto_update_disabled')
}],
schemaValidationEnforcedContent: this.$i18n.t('namespace.policy.schemaValidationEnforcedContent'),
schemaValidationEnforced: '',
@@ -863,10 +863,11 @@
dialogFormVisible: false,
dialogStatus: '',
textMap: {
- create: this.$i18n.t('topic.newTopic')
+ create: this.$i18n.t('topic.newTopic'),
+ delete: this.$i18n.t('namespace.deleteNamespace')
},
currentTabName: '',
- bundleInfoContent: this.$i18n.t('bundleInfoContent')
+ bundleInfoContent: this.$i18n.t('namespace.bundle.bundleInfoContent')
}
},
created() {
@@ -1121,7 +1122,7 @@
revokePermissions(this.tenantNamespace, tag).then(response => {
this.$notify({
title: 'success',
- message: 'Add success',
+ message: this.$i18n.t('namespace.notification.removeRoleSuccess'),
type: 'success',
duration: 3000
})
@@ -1140,17 +1141,17 @@
if (inputValue) {
if (this.roleMap.hasOwnProperty(inputValue)) {
this.$message({
- message: 'This role is exist',
+ message: this.$i18n.t('namespace.policy.roleAlreadyExists'),
type: 'error'
})
this.inputVisible = false
this.inputValue = ''
return
}
- grantPermissions(this.currentNamespace, inputValue, this.roleMap[inputValue]).then(response => {
+ grantPermissions(this.tenantNamespace, inputValue, this.roleMap[inputValue]).then(response => {
this.$notify({
title: 'success',
- message: 'Add success',
+ message: this.$i18n.t('namespace.notification.addRoleSuccess'),
type: 'success',
duration: 3000
})
@@ -1177,7 +1178,7 @@
setPersistence(this.tenantNamespace, data).then(response => {
this.$notify({
title: 'success',
- message: 'Set persistence success for namespace',
+ message: this.$i18n.t('namespace.notification.updatePersistenceSuccess'),
type: 'success',
duration: 3000
})
@@ -1191,7 +1192,7 @@
setBacklogQuota(this.tenantNamespace, data).then(response => {
this.$notify({
title: 'success',
- message: 'Add Backlog Quota success for namespace',
+ message: this.$i18n.t('namespace.notification.updateBacklogQuotaSuccess'),
type: 'success',
duration: 3000
})
@@ -1201,7 +1202,7 @@
splitBundle(this.tenantNamespace, row.bundle, false).then(response => {
this.$notify({
title: 'success',
- message: 'splitBundle success for namespace',
+ message: this.$i18n.t('namespace.notification.splitBundleSuccess'),
type: 'success',
duration: 3000
})
@@ -1213,7 +1214,7 @@
unload(this.tenantNamespace).then(response => {
this.$notify({
title: 'success',
- message: 'Unload success for namespace',
+ message: this.$i18n.t('namespace.notification.unloadAllBundlesSuccess'),
type: 'success',
duration: 3000
})
@@ -1225,7 +1226,7 @@
unloadBundle(this.tenantNamespace, row.bundle).then(response => {
this.$notify({
title: 'success',
- message: 'Unload success for namespace',
+ message: this.$i18n.t('namespace.notification.unloadBundleSuccess'),
type: 'success',
duration: 3000
})
@@ -1237,7 +1238,7 @@
clearBacklog(this.tenantNamespace).then(response => {
this.$notify({
title: 'success',
- message: 'clearBacklog success for namespace',
+ message: this.$i18n.t('namespace.notification.clearBacklogSuccess'),
type: 'success',
duration: 3000
})
@@ -1247,7 +1248,7 @@
clearBundleBacklog(this.tenantNamespace, row.bundle).then(response => {
this.$notify({
title: 'success',
- message: 'clearBacklog success for bundle',
+ message: this.$i18n.t('namespace.notification.clearBundleBacklogSuccess'),
type: 'success',
duration: 3000
})
@@ -1257,7 +1258,7 @@
setClusters(this.tenantNamespace, this.replicationClustersValue).then(response => {
this.$notify({
title: 'success',
- message: 'Add clusters success for namespace',
+ message: this.$i18n.t('namespace.notification.updateReplicatedClustersSuccess'),
type: 'success',
duration: 3000
})
@@ -1271,35 +1272,39 @@
setSubscriptionAuthMode(this.tenantNamespace, subAuthMode).then(response => {
this.$notify({
title: 'success',
- message: 'success',
+ message: this.$i18n.t('namespace.notification.updateSubscriptionAuthModeSuccess'),
type: 'success',
duration: 3000
})
})
},
handleEncryption() {
- var encryptionRequire = false
+ let encryptionRequire = false
+ let successMessage = this.$i18n.t('namespace.notification.disableEncryptionSuccess')
if (this.form.encryptionRequireRadio === 'Enabled') {
encryptionRequire = true
+ successMessage = this.$i18n.t('namespace.notification.enableEncryptionSuccess')
}
setEncryptionRequired(this.tenantNamespace, encryptionRequire).then(response => {
this.$notify({
title: 'success',
- message: 'success',
+ message: successMessage,
type: 'success',
duration: 3000
})
})
},
handleDeduplication() {
- var deduplication = false
+ let deduplication = false
+ let successMessage = this.$i18n.t('namespace.notification.disableDeduplicationSuccess')
if (this.form.deduplicationRadio === 'Enabled') {
deduplication = true
+ successMessage = this.$i18n.t('namespace.notification.enableDeduplicationSuccess')
}
setDeduplication(this.tenantNamespace, deduplication).then(response => {
this.$notify({
title: 'success',
- message: 'Set deduplication success for namespace',
+ message: successMessage,
type: 'success',
duration: 3000
})
@@ -1327,7 +1332,7 @@
setSchemaAutoupdateStrategy(this.tenantNamespace, strategy).then(response => {
this.$notify({
title: 'success',
- message: 'Set SchemaAutoupdateStrategy success',
+ message: this.$i18n.t('namespace.notification.updateSchemaAutoUpdateStrategySuccess'),
type: 'success',
duration: 3000
})
@@ -1335,13 +1340,15 @@
},
handleSchemaValidationEnforced() {
var schemaValidation = false
+ var successMessage = this.$i18n.t('namespace.notification.disableSchemaValidationEnforcedSuccess')
if (this.form.schemaValidationEnforcedRadio === 'Enabled') {
schemaValidation = true
+ successMessage = this.$i18n.t('namespace.notification.enableSchemaValidationEnforcedSuccess')
}
setSchemaValidationEnforced(this.tenantNamespace, schemaValidation).then(response => {
this.$notify({
title: 'success',
- message: 'Set SchemaValidationEnforced success',
+ message: successMessage,
type: 'success',
duration: 3000
})
@@ -1351,7 +1358,7 @@
setMessageTtl(this.tenantNamespace, parseInt(this.form.messageTTL)).then(response => {
this.$notify({
title: 'success',
- message: 'Set messageTTL success for namespace',
+ message: this.$i18n.t('namespace.notification.updateMessageTTLSuccess'),
type: 'success',
duration: 3000
})
@@ -1362,7 +1369,7 @@
setRetention(this.tenantNamespace, data).then(response => {
this.$notify({
title: 'success',
- message: 'Set Retention success for namespace',
+ message: this.$i18n.t('namespace.notification.updateRetentionSuccess'),
type: 'success',
duration: 3000
})
@@ -1372,7 +1379,7 @@
setCompactionThreshold(this.tenantNamespace, this.form.compactionThreshold).then(response => {
this.$notify({
title: 'success',
- message: 'Set threshold success',
+ message: this.$i18n.t('namespace.notification.updateCompactionThresholdSuccess'),
type: 'success',
duration: 3000
})
@@ -1382,7 +1389,7 @@
setOffloadThreshold(this.tenantNamespace, this.form.offloadThreshold).then(response => {
this.$notify({
title: 'success',
- message: 'Set threshold success',
+ message: this.$i18n.t('namespace.notification.updateOffloadThresholdSuccess'),
type: 'success',
duration: 3000
})
@@ -1392,7 +1399,7 @@
setOffloadDeletionLag(this.tenantNamespace, this.form.offloadDeletionLag).then(response => {
this.$notify({
title: 'success',
- message: 'Set DeletionLag success',
+ message: this.$i18n.t('namespace.notification.updateOffloadDeletionLagSuccess'),
type: 'success',
duration: 3000
})
@@ -1402,7 +1409,7 @@
setMaxProducersPerTopic(this.tenantNamespace, this.form.maxProducersPerTopic).then(response => {
this.$notify({
title: 'success',
- message: 'Set max producers per topic success',
+ message: this.$i18n.t('namespace.notification.setMaxProducersSuccess'),
type: 'success',
duration: 3000
})
@@ -1412,7 +1419,7 @@
setMaxConsumersPerTopic(this.tenantNamespace, this.form.maxConsumersPerTopic).then(response => {
this.$notify({
title: 'success',
- message: 'Set max consumers per topic success',
+ message: this.$i18n.t('namespace.notification.setMaxConsumersSuccess'),
type: 'success',
duration: 3000
})
@@ -1422,7 +1429,7 @@
setMaxConsumersPerSubscription(this.tenantNamespace, this.form.maxConsumerPerSub).then(response => {
this.$notify({
title: 'success',
- message: 'Set max subscription per topic success',
+ message: this.$i18n.t('namespace.notification.setMaxConsumersPerSubscriptionSuccess'),
type: 'success',
duration: 3000
})
@@ -1437,7 +1444,7 @@
setDispatchRate(this.tenantNamespace, data).then(response => {
this.$notify({
title: 'success',
- message: 'set DispatchRate success for namespace',
+ message: this.$i18n.t('namespace.notification.setDispatchRateSuccess'),
type: 'success',
duration: 3000
})
@@ -1452,7 +1459,7 @@
setSubscriptionDispatchRate(this.tenantNamespace, data).then(response => {
this.$notify({
title: 'success',
- message: 'set subscription dispatchRate success for namespace',
+ message: this.$i18n.t('namespace.notification.setDispatchRatePerSubscriptionSuccess'),
type: 'success',
duration: 3000
})
@@ -1466,7 +1473,7 @@
setSubscribeRate(this.tenantNamespace, data).then(response => {
this.$notify({
title: 'success',
- message: 'set subscription dispatchRate success for namespace',
+ message: this.$i18n.t('namespace.notification.setSubscribeRateSuccess'),
type: 'success',
duration: 3000
})
@@ -1476,7 +1483,7 @@
setAntiAffinityGroup(this.tenantNamespace, this.form.antiAffinityGroup).then(response => {
this.$notify({
title: 'success',
- message: 'Set AntiAffinityGroup success for namespace',
+ message: this.$i18n.t('namespace.notification.setAntiAffinityGroupSuccess'),
type: 'success',
duration: 3000
})
@@ -1490,7 +1497,7 @@
deleteNamespace(this.tenantNamespace).then((response) => {
this.$notify({
title: 'success',
- message: 'delete success',
+ message: this.$i18n.t('namespace.deleteNsSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -1512,7 +1519,7 @@
this.form.topic, parseInt(this.form.partitions)).then(() => {
this.$notify({
title: 'success',
- message: 'create topic success',
+ message: this.$i18n.t('topic.notification.createTopicSuccess'),
type: 'success',
duration: 2000
})
diff --git a/front-end/src/views/management/tenants/index.vue b/front-end/src/views/management/tenants/index.vue
index ef8fd21..4cceedd 100644
--- a/front-end/src/views/management/tenants/index.vue
+++ b/front-end/src/views/management/tenants/index.vue
@@ -32,12 +32,27 @@
</el-table-column>
<el-table-column :label="$t('tenant.allowedClustersLabel')" align="center" min-width="100px">
<template slot-scope="scope">
- <span>{{ scope.row.allowedClusters }}</span>
+ <span
+ v-for="tag in scope.row.allowedClusters"
+ :key="tag"
+ :type="primary"
+ class="list-el-tag">
+ <router-link :to="'/management/clusters/' + tag + '/cluster?tab=brokers'" class="link-type">
+ {{ tag }}
+ </router-link>
+ </span>
</template>
</el-table-column>
<el-table-column :label="$t('tenant.adminRolesLabel')" align="center" min-width="100px">
<template slot-scope="scope">
- <span>{{ scope.row.adminRoles }}</span>
+ <el-tag
+ v-for="tag in scope.row.adminRoles"
+ :key="tag"
+ :type="primary"
+ effect="dark"
+ class="list-el-tag">
+ {{ tag }}
+ </el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width">
@@ -132,8 +147,8 @@
delete: this.$i18n.t('tenant.deleteTenant')
},
rules: {
- tenant: [{ required: true, message: 'Tenant is required', trigger: 'blur' }],
- clusters: [{ required: true, message: 'Cluster is required', trigger: 'blur' }]
+ tenant: [{ required: true, message: this.$i18n.t('tenant.tenantIsRequired'), trigger: 'blur' }],
+ clusters: [{ required: true, message: this.$i18n.t('tenant.clusterIsRequired'), trigger: 'blur' }]
},
inputVisible: false,
inputValue: '',
@@ -153,19 +168,27 @@
this.listLoading = true
fetchTenants().then(response => {
for (var i = 0; i < response.data.total; i++) {
- let allowedClusters = '-'
- let adminRoles = '-'
+ let allowedClusters = ''
+ let adminRoles = ''
if (response.data.data[i]['allowedClusters'].length > 0) {
allowedClusters = response.data.data[i]['allowedClusters']
}
if (response.data.data[i]['adminRoles'].length > 0) {
adminRoles = response.data.data[i]['adminRoles']
}
+ let adminRolesArray = []
+ if (adminRoles !== '') {
+ adminRolesArray = adminRoles.split(',')
+ }
+ let allowedClustersArray = []
+ if (allowedClusters !== '') {
+ allowedClustersArray = allowedClusters.split(',')
+ }
this.localList.push({
'tenant': response.data.data[i]['tenant'],
'namespace': response.data.data[i]['namespaces'],
- 'allowedClusters': allowedClusters,
- 'adminRoles': adminRoles
+ 'allowedClusters': allowedClustersArray,
+ 'adminRoles': adminRolesArray
})
}
this.total = response.data.total
@@ -253,7 +276,7 @@
this.dialogFormVisible = false
this.$notify({
title: 'success',
- message: 'create success',
+ message: this.$i18n.t('tenant.createTenantSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -270,7 +293,7 @@
deleteTenant(this.form.tenant).then((response) => {
this.$notify({
title: 'success',
- message: 'delete success',
+ message: this.$i18n.t('tenant.deleteTenantSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -294,7 +317,7 @@
if (this.form.dynamicRoles.indexOf(this.inputValue) >= 0) {
this.$notify({
title: 'error',
- message: 'Role is exists',
+ message: this.$i18n.t('tenant.roleAlreadyExists'),
type: 'error',
duration: 2000
})
@@ -310,6 +333,10 @@
</script>
<style>
+.list-el-tag {
+ margin-left: 2px;
+ margin-right: 2px;
+}
.el-form {
margin-left: 0% !important;
margin-right: 0% !important;
diff --git a/front-end/src/views/management/tenants/tenant.vue b/front-end/src/views/management/tenants/tenant.vue
index 9393cbd..7cb6e95 100644
--- a/front-end/src/views/management/tenants/tenant.vue
+++ b/front-end/src/views/management/tenants/tenant.vue
@@ -13,7 +13,7 @@
<el-tab-pane :label="$t('tabs.namespace')" name="namespaces">
<div class="filter-container">
<el-input
- :placeholder="$t('table.namespace')"
+ :placeholder="$t('namespace.searchNamespaces')"
v-model="searchNamespace"
style="width: 200px;"
@keyup.enter.native="handleFilterNamespace"/>
@@ -183,7 +183,7 @@
dialogFormVisible: false,
dialogStatus: '',
rules: {
- namespace: [{ required: true, message: 'namespace is required', trigger: 'blur' }]
+ namespace: [{ required: true, message: this.$i18n.t('namespace.namespaceNameIsRequired'), trigger: 'blur' }]
},
currentTabName: '',
textMap: {
@@ -215,7 +215,7 @@
updateTenant(this.postForm.tenant, data).then(() => {
this.$notify({
title: 'success',
- message: 'Update role success',
+ message: this.$i18n.t('tenant.updateRolesSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -241,7 +241,7 @@
if (this.dynamicRoles.indexOf(this.inputValue) >= 0) {
this.$notify({
title: 'error',
- message: 'Role is exists',
+ message: this.$i18n.t('tenant.roleAlreadyExists'),
type: 'error',
duration: 2000
})
@@ -257,7 +257,7 @@
updateTenant(this.postForm.tenant, data).then(() => {
this.$notify({
title: 'success',
- message: 'Update role success',
+ message: this.$i18n.t('tenant.updateRolesSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -286,7 +286,7 @@
updateTenant(this.postForm.tenant, data).then(() => {
this.$notify({
title: 'success',
- message: 'Update cluster success',
+ message: this.$i18n.t('tenant.updateClustersSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -300,7 +300,7 @@
deleteTenant(this.postForm.tenant).then((response) => {
this.$notify({
title: 'success',
- message: 'delete success',
+ message: this.$i18n.t('tenant.deleteTenantSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -358,7 +358,7 @@
this.dialogFormVisible = false
this.$notify({
title: 'success',
- message: 'create success',
+ message: this.$i18n.t('namespace.createNsSuccessNotification'),
type: 'success',
duration: 2000
})
@@ -392,7 +392,7 @@
deleteNamespace(tenantNamespace).then((response) => {
this.$notify({
title: 'success',
- message: 'delete success',
+ message: this.$i18n.t('namespace.deleteNsSuccessNotification'),
type: 'success',
duration: 2000
})
diff --git a/front-end/src/views/management/topics/partitionedTopic.vue b/front-end/src/views/management/topics/partitionedTopic.vue
index 8d164e3..96ff8db 100644
--- a/front-end/src/views/management/topics/partitionedTopic.vue
+++ b/front-end/src/views/management/topics/partitionedTopic.vue
@@ -88,9 +88,6 @@
</el-row>
</el-tab-pane>
<el-tab-pane label="POLICIES" name="policies">
- <h4>{{ $t('topic.partitionedTopicName') }}</h4>
- <hr class="split-line">
- <span>{{ partitionedTopicName }}</span>
<h4>{{ $t('topic.policy.authentication') }}
<el-tooltip :content="authorizationContent" class="item" effect="dark" placement="top">
<i class="el-icon-info"/>
@@ -322,7 +319,7 @@
if (inputValue) {
if (this.roleMap.hasOwnProperty(inputValue)) {
this.$message({
- message: 'This role is exist',
+ message: this.$i18n.t('role.roleAlreadyExists'),
type: 'error'
})
this.inputVisible = false
@@ -355,7 +352,7 @@
deletePartitionTopic(this.postForm.persistent, this.tenantNamespaceTopic).then(response => {
this.$notify({
title: 'success',
- message: 'Delete partitioned topic success',
+ message: this.$i18n.t('topic.notification.deletePartitionedTopicSuccess'),
type: 'success',
duration: 3000
})
diff --git a/front-end/src/views/management/topics/topic.vue b/front-end/src/views/management/topics/topic.vue
index 55ca9ca..2d6842f 100644
--- a/front-end/src/views/management/topics/topic.vue
+++ b/front-end/src/views/management/topics/topic.vue
@@ -185,7 +185,7 @@
</el-col>
</el-row>
</el-tab-pane>
- <el-tab-pane v-if="nonPersistent===false" :label="$t('topic.subscription.storage')" name="storage">
+ <el-tab-pane v-if="nonPersistent===false" :label="$t('tabs.storage')" name="storage">
<el-row :gutter="12">
<el-col :span="8">
<el-card>
@@ -287,8 +287,7 @@
</el-col>
</el-row>
</el-tab-pane>
- <el-tab-pane :label="$t('topic.policy.policies')" name="policies">
- <span>{{ topicName }}</span>
+ <el-tab-pane :label="$t('tabs.policies')" name="policies">
<h4>{{ $t('topic.policy.authentication') }}
<el-tooltip :content="authorizationContent" class="item" effect="dark" placement="top">
<i class="el-icon-info"/>
@@ -427,13 +426,13 @@
roleMapOptions: {},
roleOptions: [{
value: 'consume',
- label: 'consume'
+ label: this.$i18n.t('role_actions.consume')
}, {
value: 'produce',
- label: 'produce'
+ label: this.$i18n.t('role_actions.produce')
}, {
value: 'functions',
- label: 'functions'
+ label: this.$i18n.t('role_actions.functions')
}],
authorizationContent: this.$i18n.t('topic.policy.authorizationContent'),
topicName: '',
@@ -677,7 +676,7 @@
unload(this.postForm.persistent, this.getFullTopic()).then(response => {
this.$notify({
title: 'success',
- message: 'Unload topic success',
+ message: this.$i18n.t('topic.notification.unloadTopicSuccess'),
type: 'success',
duration: 3000
})
@@ -687,7 +686,7 @@
terminate(this.postForm.persistent, this.getFullTopic()).then(response => {
this.$notify({
title: 'success',
- message: 'Terminate topic success',
+ message: this.$i18n.t('topic.notification.terminateTopicSuccess'),
type: 'success',
duration: 3000
})
@@ -708,7 +707,7 @@
if (inputValue) {
if (this.roleMap.hasOwnProperty(inputValue)) {
this.$message({
- message: 'This role is exist',
+ message: this.$i18n.t('role.roleAlreadyExists'),
type: 'error'
})
this.inputVisible = false
@@ -744,7 +743,7 @@
compact(this.postForm.persistent, this.getFullTopic()).then(response => {
this.$notify({
title: 'success',
- message: 'Start topic compaction requested',
+ message: this.$i18n.t('topic.notification.startCompactionSuccess'),
type: 'success',
duration: 3000
})
@@ -755,7 +754,7 @@
offload(this.postForm.persistent, this.getFullTopic()).then(response => {
this.$notify({
title: 'success',
- message: 'Start topic offload requested',
+ message: this.$i18n.t('topic.notification.startOffloadSuccess'),
type: 'success',
duration: 3000
})
@@ -770,7 +769,7 @@
deleteTopic(this.postForm.persistent, this.getFullTopic()).then(response => {
this.$notify({
title: 'success',
- message: 'Delete topic success',
+ message: this.$i18n.t('topic.notification.deleteTopicSuccess'),
type: 'success',
duration: 3000
})