diff --git a/README.md b/README.md index 475903d4..9379a3fd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -## 动态可观测线程池,通过对 JDK 线程池的增强,以及扩展三方框架底层线程池等功能,为业务系统提高线上运行保障能力 +## 动态可观测线程池,提高系统运行保障能力 [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) @@ -115,7 +115,7 @@ For full documentation & more details, visit: [Docs](https://www.hippo4j.cn) - [[ JavaGuide ]](https://github.com/Snailclimb/JavaGuide):一份涵盖大部分 Java 程序员所需要掌握的核心知识。 - [[ toBeBetterJavaer ]](https://github.com/itwanger/toBeBetterJavaer):一份通俗易懂、风趣幽默的 Java 学习指南。 - [[ Jpom ]](https://gitee.com/dromara/Jpom):简而轻的低侵入式在线构建、自动部署、日常运维、项目监控软件。 -- [[ CongoMall ]](https://sourl.cn/VERS4y):刚果商城基于 DDD 开发,内置分布式锁、分布式事务、分库分表、消息队列、服务监控等功能。 +- [[ CongoMall ]](https://magestack.cn):刚果商城,不一样的 C 端商城系统,包含商城核心业务和基础架构两大模块。 ### 贡献者 diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 7bcb12c3..7bb7d102 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -116,7 +116,7 @@ const config = { position: 'left', }, { - href: 'https://sourl.cn/Fyp7y4', + href: 'https://magestack.cn', label: '👉 刚果商城', position: 'left', }, diff --git a/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/AbstractWebThreadPoolService.java b/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/AbstractWebThreadPoolService.java index e5084092..03014af3 100644 --- a/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/AbstractWebThreadPoolService.java +++ b/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/AbstractWebThreadPoolService.java @@ -22,21 +22,19 @@ import cn.hippo4j.common.model.ThreadPoolBaseInfo; import cn.hippo4j.common.model.ThreadPoolParameter; import cn.hippo4j.common.model.ThreadPoolParameterInfo; import cn.hippo4j.common.model.ThreadPoolRunStateInfo; -import io.undertow.Undertow; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; -import org.springframework.util.ReflectionUtils; -import java.lang.reflect.Field; import java.util.concurrent.Executor; /** * Abstract web thread pool service. */ @Slf4j +@Order(Ordered.HIGHEST_PRECEDENCE) public abstract class AbstractWebThreadPoolService implements WebThreadPoolService, ApplicationRunner { private final IWebThreadPoolHandlerSupport support; diff --git a/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/DefaultAbstractWebThreadPoolService.java b/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/DefaultAbstractWebThreadPoolService.java index ebb98f0e..e519c5b6 100644 --- a/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/DefaultAbstractWebThreadPoolService.java +++ b/hippo4j-adapter/hippo4j-adapter-web/src/main/java/cn/hippo4j/adapter/web/DefaultAbstractWebThreadPoolService.java @@ -18,22 +18,28 @@ package cn.hippo4j.adapter.web; import cn.hippo4j.common.config.ApplicationContextHolder; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.web.context.WebServerApplicationContext; import org.springframework.boot.web.server.WebServer; import org.springframework.context.ApplicationContext; +import org.springframework.util.ReflectionUtils; +import java.lang.reflect.Field; import java.util.concurrent.Executor; /** * Default WebThreadPoolService abstract class, * reuses common capabilities for web container operations. */ +@Slf4j public abstract class DefaultAbstractWebThreadPoolService extends AbstractWebThreadPoolService { public DefaultAbstractWebThreadPoolService(IWebThreadPoolHandlerSupport support) { super(support); } + private static final String STARTED_FIELD_NAME = "started"; + /** * Get the internal abstract method of the web container thread pool, * to be implemented by subclasses. diff --git a/hippo4j-common/pom.xml b/hippo4j-common/pom.xml index 5f56c500..efba01a7 100644 --- a/hippo4j-common/pom.xml +++ b/hippo4j-common/pom.xml @@ -13,7 +13,7 @@ 5.2.21.RELEASE 5.2.15.RELEASE 5.2.21.RELEASE - 5.2.22.RELEASE + 5.2.23.RELEASE diff --git a/hippo4j-core/src/main/java/cn/hippo4j/core/plugin/impl/TaskTimeoutNotifyAlarmPlugin.java b/hippo4j-core/src/main/java/cn/hippo4j/core/plugin/impl/TaskTimeoutNotifyAlarmPlugin.java index a3026619..be5726d3 100644 --- a/hippo4j-core/src/main/java/cn/hippo4j/core/plugin/impl/TaskTimeoutNotifyAlarmPlugin.java +++ b/hippo4j-core/src/main/java/cn/hippo4j/core/plugin/impl/TaskTimeoutNotifyAlarmPlugin.java @@ -94,7 +94,7 @@ public class TaskTimeoutNotifyAlarmPlugin extends AbstractTaskTimerPlugin { */ @Override protected void processTaskTime(long taskExecuteTime) { - if (taskExecuteTime <= executeTimeOut) { + if (executeTimeOut <= 0 || taskExecuteTime <= executeTimeOut) { return; } threadPoolCheckAlarm.asyncSendExecuteTimeOutAlarm(threadPoolId, taskExecuteTime, executeTimeOut, threadPoolExecutor); diff --git a/hippo4j-spring-boot/hippo4j-config-spring-boot-1x-starter/src/main/java/cn/hippo4j/config/springboot1x/starter/web/AbstractWebThreadPoolService1x.java b/hippo4j-spring-boot/hippo4j-config-spring-boot-1x-starter/src/main/java/cn/hippo4j/config/springboot1x/starter/web/AbstractWebThreadPoolService1x.java index 333a4d07..148a5deb 100644 --- a/hippo4j-spring-boot/hippo4j-config-spring-boot-1x-starter/src/main/java/cn/hippo4j/config/springboot1x/starter/web/AbstractWebThreadPoolService1x.java +++ b/hippo4j-spring-boot/hippo4j-config-spring-boot-1x-starter/src/main/java/cn/hippo4j/config/springboot1x/starter/web/AbstractWebThreadPoolService1x.java @@ -20,18 +20,25 @@ package cn.hippo4j.config.springboot1x.starter.web; import cn.hippo4j.adapter.web.AbstractWebThreadPoolService; import cn.hippo4j.adapter.web.IWebThreadPoolHandlerSupport; import cn.hippo4j.common.config.ApplicationContextHolder; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.context.embedded.EmbeddedServletContainer; import org.springframework.boot.context.embedded.EmbeddedWebApplicationContext; +import org.springframework.util.ReflectionUtils; + +import java.lang.reflect.Field; /** * Abstract class for adapting WebThreadPoolService to Spring 1.x version. */ +@Slf4j public abstract class AbstractWebThreadPoolService1x extends AbstractWebThreadPoolService { public AbstractWebThreadPoolService1x(IWebThreadPoolHandlerSupport support) { super(support); } + private static final String STARTED_FIELD_NAME = "started"; + /** * Get the embedded Servlet container from the Spring application context. */ @@ -46,4 +53,5 @@ public abstract class AbstractWebThreadPoolService1x extends AbstractWebThreadPo public Integer getPort() { return getContainer().getPort(); } + } diff --git a/hippo4j-ui/src/components/Breadcrumb/index.vue b/hippo4j-ui/src/components/Breadcrumb/index.vue index e224ff73..0637e734 100755 --- a/hippo4j-ui/src/components/Breadcrumb/index.vue +++ b/hippo4j-ui/src/components/Breadcrumb/index.vue @@ -2,8 +2,8 @@ - {{ item.meta.title }} - {{ item.meta.title }} + {{ $t(item.meta.title) }} + {{ $t(item.meta.title) }} diff --git a/hippo4j-ui/src/layout/components/Navbar.vue b/hippo4j-ui/src/layout/components/Navbar.vue index 283431ff..57cbb912 100755 --- a/hippo4j-ui/src/layout/components/Navbar.vue +++ b/hippo4j-ui/src/layout/components/Navbar.vue @@ -29,7 +29,7 @@ Profile --> - Dashboard + {{ this.$t('menu.dashboard') }} {{ $t('system.logOut') }} diff --git a/hippo4j-ui/src/layout/components/Sidebar/SidebarItem.vue b/hippo4j-ui/src/layout/components/Sidebar/SidebarItem.vue index 4a3c1a0b..52746998 100755 --- a/hippo4j-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/hippo4j-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -3,14 +3,14 @@ { NProgress.start(); // set page title - document.title = getPageTitle(to.meta.title); + document.title = getPageTitle(i18n.t(to.meta.title)); // determine whether the user has logged in const hasToken = getToken(); diff --git a/hippo4j-ui/src/router/index.js b/hippo4j-ui/src/router/index.js index 3e1b5c9a..bf3e9fd1 100755 --- a/hippo4j-ui/src/router/index.js +++ b/hippo4j-ui/src/router/index.js @@ -47,7 +47,7 @@ export const constantRoutes = [ path: 'dashboard', component: () => import('@/views/dashboard/admin/index'), name: 'Dashboard', - meta: { title: '运行报表', icon: 'dashboard2', affix: true }, + meta: { title: 'menu.dashboard', icon: 'dashboard2', affix: true }, }, ], }, @@ -107,13 +107,13 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/tenantList', name: 'tenant', - meta: { title: '租户管理', icon: 'lessee' }, + meta: { title: 'menu.tenantManage', icon: 'lessee' }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/tenant/index'), - meta: { title: '租户管理', icon: 'lessee' }, + meta: { title: 'menu.tenantManage', icon: 'lessee' }, }, ], }, @@ -122,13 +122,13 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/itemList', name: 'item', - meta: { title: '项目管理', icon: 'item' }, + meta: { title: 'menu.itemManage', icon: 'item' }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/item/index'), - meta: { title: '项目管理', icon: 'item' }, + meta: { title: 'menu.itemManage', icon: 'item' }, }, ], }, @@ -138,25 +138,25 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/dynamic/thread-pool', name: 'thread-pool', - meta: { title: '动态线程池', icon: 'pool' }, + meta: { title: 'menu.dynamicThreadPool', icon: 'pool' }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/threadpool/index'), - meta: { title: '线程池管理' }, + meta: { title: 'menu.threadPoolManage' }, }, { path: 'instance', name: 'instance', component: () => import('@/views/hippo4j/instance/index'), - meta: { title: '线程池实例' }, + meta: { title: 'menu.threadPoolInstance' }, }, { path: 'monitor', name: 'monitor', component: () => import('@/views/hippo4j/monitor/index'), - meta: { title: '线程池监控' }, + meta: { title: 'menu.threadPoolMonitor' }, }, ], }, @@ -165,25 +165,25 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/server', name: 'server-thread-pool', - meta: { title: '容器线程池', icon: 'vessel' }, + meta: { title: 'menu.containerThreadPool', icon: 'vessel' }, children: [ { path: 'tomcat', name: 'tomcat', component: () => import('@/views/hippo4j/server/tomcat/index'), - meta: { title: 'Tomcat' }, + meta: { title: 'menu.tomcat' }, }, { path: 'undertow', name: 'undertow', component: () => import('@/views/hippo4j/server/undertow/index'), - meta: { title: 'Undertow' }, + meta: { title: 'menu.undertow' }, }, { path: 'jetty', name: 'jetty', component: () => import('@/views/hippo4j/server/jetty/index'), - meta: { title: 'Jetty' }, + meta: { title: 'menu.jetty' }, }, ], }, @@ -192,49 +192,49 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/other', name: 'other-thread-pool', - meta: { title: '框架线程池', icon: 'other' }, + meta: { title: 'menu.frameworkThreadPool', icon: 'other' }, children: [ { path: 'dubbo', name: 'dubbo', component: () => import('@/views/hippo4j/other/dubbo/index'), - meta: { title: 'Dubbo' }, + meta: { title: 'menu.dubbo' }, }, { path: 'hystrix', name: 'hystrix', component: () => import('@/views/hippo4j/other/hystrix/index'), - meta: { title: 'Hystrix' }, + meta: { title: 'menu.hystrix' }, }, { path: 'rabbitmq', name: 'rabbitmq', component: () => import('@/views/hippo4j/other/rabbitmq/index'), - meta: { title: 'RabbitMQ' }, + meta: { title: 'menu.rabbitMQ' }, }, { path: 'rocketmq', name: 'rocketmq', component: () => import('@/views/hippo4j/other/rocketmq/index'), - meta: { title: 'RocketMQ' }, + meta: { title: 'menu.rocketMQ' }, }, { path: 'alibaba-dubbo', name: 'alibaba-dubbo', component: () => import('@/views/hippo4j/other/alibaba-dubbo/index'), - meta: { title: 'AlibabaDubbo' }, + meta: { title: 'menu.alibabaDubbo' }, }, { path: 'rabbitmq-stream', name: 'rabbitmq-stream', component: () => import('@/views/hippo4j/other/rabbitmq-stream/index'), - meta: { title: 'RabbitMQStream' }, + meta: { title: 'menu.rabbitMQStream' }, }, { path: 'rocketmq-stream', name: 'rocketmq-stream', component: () => import('@/views/hippo4j/other/rocketmq-stream/index'), - meta: { title: 'RocketMQStream' }, + meta: { title: 'menu.rocketMQStream' }, }, ], }, @@ -243,13 +243,13 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/verifyList', name: 'config-modification-verify', - meta: { title: '线程池审核', icon: 'audit', roles: ['ROLE_MANAGE', 'ROLE_ADMIN'] }, + meta: { title: 'menu.threadPoolAudit', icon: 'audit', roles: ['ROLE_MANAGE', 'ROLE_ADMIN'] }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/verify/index'), - meta: { title: '线程池审核', icon: 'audit' }, + meta: { title: 'menu.threadPoolAudit', icon: 'audit' }, }, ], }, @@ -258,13 +258,13 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/notifyList', name: 'notify', - meta: { title: '通知报警', icon: 'notify' }, + meta: { title: 'menu.notifyAlarm', icon: 'notify' }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/notify/index'), - meta: { title: '通知报警', icon: 'notify' }, + meta: { title: 'menu.notifyAlarm', icon: 'notify' }, }, ], }, @@ -273,13 +273,13 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/userList', name: 'user', - meta: { title: '用户权限', icon: 'user', roles: ['ROLE_ADMIN'] }, + meta: { title: 'menu.userAuthority', icon: 'user', roles: ['ROLE_ADMIN'] }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/user/index'), - meta: { title: '用户权限', icon: 'user' }, + meta: { title: 'menu.userAuthority', icon: 'user' }, }, ], }, @@ -288,13 +288,13 @@ export const asyncRoutes = [ component: Layout, redirect: '/hippo4j/logList', name: 'log', - meta: { title: '日志管理', icon: 'log' }, + meta: { title: 'menu.logManage', icon: 'log' }, children: [ { path: 'index', name: 'index', component: () => import('@/views/hippo4j/log/index'), - meta: { title: '日志管理', icon: 'log' }, + meta: { title: 'menu.logManage', icon: 'log' }, }, ], }, @@ -305,7 +305,7 @@ export const asyncRoutes = [ children: [ { path: 'https://hippo4j.cn', - meta: { title: '官网外链', icon: 'link' }, + meta: { title: 'menu.officialWebsite', icon: 'link' }, }, ], }, diff --git a/hippo4j-ui/src/views/hippo4j/instance/index.vue b/hippo4j-ui/src/views/hippo4j/instance/index.vue index 3c750ac4..f88ad0c3 100755 --- a/hippo4j-ui/src/views/hippo4j/instance/index.vue +++ b/hippo4j-ui/src/views/hippo4j/instance/index.vue @@ -358,7 +358,7 @@ v-model="temp.executeTimeOut" :placeholder="$t('threadPool.executionTimeoutUnit')" controls-position="right" - :min="0" + :min="-1" :max="999999" /> diff --git a/hippo4j-ui/src/views/hippo4j/log/index.vue b/hippo4j-ui/src/views/hippo4j/log/index.vue index a06be2bb..dbe0e3c3 100755 --- a/hippo4j-ui/src/views/hippo4j/log/index.vue +++ b/hippo4j-ui/src/views/hippo4j/log/index.vue @@ -4,21 +4,21 @@ @@ -29,7 +29,7 @@ icon="el-icon-search" @click="fetchData" > - 搜索 + {{ $t('common.query') }} - + - + - + - + - + - + @@ -80,45 +80,45 @@ - + - + - + - + - + @@ -227,8 +227,8 @@ export default { this.fetchData(); this.dialogFormVisible = false; this.$notify({ - title: 'Success', - message: 'Created Successfully', + title: this.$t('message.success'), + message: this.$t('message.createdSuccess'), type: 'success', duration: 2000, }); @@ -252,8 +252,8 @@ export default { this.fetchData(); this.dialogFormVisible = false; this.$notify({ - title: 'Success', - message: 'Update Successfully', + title: this.$t('message.success'), + message: this.$t('message.updateSuccess'), type: 'success', duration: 2000, }); @@ -266,8 +266,8 @@ export default { jobProjectApi.deleted(row.tenantId).then((response) => { this.fetchData(); this.$notify({ - title: 'Success', - message: 'Delete Successfully', + title: this.$t('message.success'), + message: this.$t('message.deleteSuccess'), type: 'success', duration: 2000, }); diff --git a/hippo4j-ui/src/views/hippo4j/monitor/index.vue b/hippo4j-ui/src/views/hippo4j/monitor/index.vue index 58d14f69..4ff000dd 100755 --- a/hippo4j-ui/src/views/hippo4j/monitor/index.vue +++ b/hippo4j-ui/src/views/hippo4j/monitor/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- +
@@ -248,10 +248,10 @@ - + - + - + @@ -293,7 +290,7 @@ - Confirm + {{ $t('common.confirm') }} @@ -380,14 +377,14 @@ export default { create: 'Create', }, rules: { - tenantId: [{ required: true, message: 'this is required', trigger: 'blur' }], - itemId: [{ required: true, message: 'this is required', trigger: 'blur' }], - tpId: [{ required: true, message: 'this is required', trigger: 'blur' }], - receives: [{ required: true, message: 'this is required', trigger: 'blur' }], - secretKey: [{ required: true, message: 'this is required', trigger: 'blur' }], - platform: [{ required: true, message: 'this is required', trigger: 'blur' }], - configType: [{ required: true, message: 'this is required', trigger: 'blur' }], - enable: [{ required: true, message: 'this is required', trigger: 'blur' }], + tenantId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + itemId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + tpId: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + receives: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + secretKey: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + platform: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + configType: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], + enable: [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }], }, temp: { id: undefined, @@ -479,8 +476,8 @@ export default { this.fetchData(); this.dialogFormVisible = false; this.$notify({ - title: 'Success', - message: 'Created Successfully', + title: this.$t('message.success'), + message: this.$t('message.createdSuccess'), type: 'success', duration: 2000, }); @@ -509,8 +506,8 @@ export default { this.fetchData(); this.dialogFormVisible = false; this.$notify({ - title: 'Success', - message: 'Update Successfully', + title: this.$t('message.success'), + message: this.$t('message.updateSuccess'), type: 'success', duration: 2000, }); @@ -519,9 +516,9 @@ export default { }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -531,8 +528,8 @@ export default { notifyApi.deleted(row).then((response) => { this.fetchData(); this.$notify({ - title: 'Success', - message: 'Delete Successfully', + title: this.$t('message.success'), + message: this.$t('message.deleteSuccess'), type: 'success', duration: 2000, }); @@ -543,8 +540,8 @@ export default { notifyApi.enable(row).then((response) => { this.fetchData(); this.$notify({ - title: 'Success', - message: 'Delete Successfully', + title: this.$t('message.success'), + message: this.$t('message.updateSuccess'), type: 'success', duration: 2000, }); @@ -557,7 +554,7 @@ export default { this.rules['interval'] = []; } if (configType != null && configType != undefined && alarmType === true) { - this.rules['interval'] = [{ required: true, message: 'this is required', trigger: 'blur' }]; + this.rules['interval'] = [{ required: true, message: this.$t('message.requiredError'), trigger: 'blur' }]; } }, diff --git a/hippo4j-ui/src/views/hippo4j/other/alibaba-dubbo/index.vue b/hippo4j-ui/src/views/hippo4j/other/alibaba-dubbo/index.vue index da1e1761..6ce9c7ad 100755 --- a/hippo4j-ui/src/views/hippo4j/other/alibaba-dubbo/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/alibaba-dubbo/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -134,7 +134,7 @@ label-position="left" label-width="110px" > - + - + - + @@ -283,19 +283,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -333,7 +333,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -385,13 +385,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -497,7 +497,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/other/dubbo/index.vue b/hippo4j-ui/src/views/hippo4j/other/dubbo/index.vue index 530275f6..ad3847f0 100755 --- a/hippo4j-ui/src/views/hippo4j/other/dubbo/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/dubbo/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -134,7 +134,7 @@ label-position="left" label-width="110px" > - + - + - +
@@ -283,19 +283,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -333,7 +333,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -385,13 +385,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -497,7 +497,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/other/hystrix/index.vue b/hippo4j-ui/src/views/hippo4j/other/hystrix/index.vue index 1162ed67..79dc1f2d 100755 --- a/hippo4j-ui/src/views/hippo4j/other/hystrix/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/hystrix/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -134,7 +134,7 @@ label-position="left" label-width="110px" > - + - + - +
@@ -283,19 +283,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -333,7 +333,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -385,13 +385,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -497,7 +497,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/other/rabbitmq-stream/index.vue b/hippo4j-ui/src/views/hippo4j/other/rabbitmq-stream/index.vue index b2c4918c..14b72fc9 100755 --- a/hippo4j-ui/src/views/hippo4j/other/rabbitmq-stream/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/rabbitmq-stream/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -133,7 +133,7 @@ label-position="left" label-width="110px" > - + - + - +
@@ -282,19 +282,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -332,7 +332,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -384,13 +384,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -496,7 +496,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/other/rabbitmq/index.vue b/hippo4j-ui/src/views/hippo4j/other/rabbitmq/index.vue index 9dabd398..adf993e9 100755 --- a/hippo4j-ui/src/views/hippo4j/other/rabbitmq/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/rabbitmq/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -134,7 +134,7 @@ label-position="left" label-width="110px" > - + - + - +
@@ -283,19 +283,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -333,7 +333,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -381,13 +381,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -493,7 +493,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/other/rocketmq-stream/index.vue b/hippo4j-ui/src/views/hippo4j/other/rocketmq-stream/index.vue index f64b9c78..5bea453b 100755 --- a/hippo4j-ui/src/views/hippo4j/other/rocketmq-stream/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/rocketmq-stream/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -133,7 +133,7 @@ label-position="left" label-width="110px" > - + - + - +
@@ -282,19 +282,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -332,7 +332,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -384,13 +384,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -496,7 +496,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/other/rocketmq/index.vue b/hippo4j-ui/src/views/hippo4j/other/rocketmq/index.vue index 17c4fb9a..a37fd516 100755 --- a/hippo4j-ui/src/views/hippo4j/other/rocketmq/index.vue +++ b/hippo4j-ui/src/views/hippo4j/other/rocketmq/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }} - 重置 + {{ $t('common.reset') }}
- + - + - + - + - + - + @@ -110,7 +110,7 @@ --> - + @@ -134,7 +134,7 @@ label-position="left" label-width="110px" > - + - + - +
@@ -283,19 +283,19 @@ export default { }, fetchData() { if (!this.listQuery.mark) { - this.$message.warning('线程池类型不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolType') })); return; } if (!this.listQuery.tenantId) { - this.$message.warning('租户不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') })); return; } if (!this.listQuery.itemId) { - this.$message.warning('项目不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') })); return; } if (!this.listQuery.threadPoolKey) { - this.$message.warning('线程池标识不允许为空'); + this.$message.warning(this.$t('message.emptyWarning', { name: this. $t('frameworkThreadPool.threadPoolID') })); return; } this.listLoading = true; @@ -333,7 +333,7 @@ export default { if (valid) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { this.$message({ - message: '最大线程必须大于等于核心线程', + message: this.$t('threadPool.threadsNumErrorTip'), type: 'warning', }); return; @@ -385,13 +385,13 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('修改线程池失败'); + this.$message.error(this.$t('message.updateFailure')); }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); }, @@ -497,7 +497,7 @@ export default { }) .catch((error) => { console.log(error); - this.$message.error('查询失败,请尝试刷新页面'); + this.$message.error(this.$t('message.queryFailure')); }); }, }, diff --git a/hippo4j-ui/src/views/hippo4j/server/jetty/index.vue b/hippo4j-ui/src/views/hippo4j/server/jetty/index.vue index 6b4c9709..487ceac0 100755 --- a/hippo4j-ui/src/views/hippo4j/server/jetty/index.vue +++ b/hippo4j-ui/src/views/hippo4j/server/jetty/index.vue @@ -3,7 +3,7 @@
- 搜索 + {{ $t('common.query') }}
- + - + - + - + - + - + - + - + - + @@ -108,81 +106,81 @@ width="1000px" >