Complete the text translation of the 'Container Thread Pool' module (#1139)

* Complete the text translation of the 'Thread Pool Monitor' page

* Complete the text translation of the 'Container Thread Pool' module
pull/1140/head
Svamei 2 years ago committed by GitHub
parent 37930e140a
commit 13d90653fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,7 @@
<div class="filter-container"> <div class="filter-container">
<el-select <el-select
v-model="listQuery.tenantId" v-model="listQuery.tenantId"
placeholder="租户(必填)" :placeholder="$t('tenantManage.tenantRequired')"
style="width: 220px" style="width: 220px"
filterable filterable
class="filter-item" class="filter-item"
@ -18,7 +18,7 @@
</el-select> </el-select>
<el-select <el-select
v-model="listQuery.itemId" v-model="listQuery.itemId"
placeholder="项目(必填)" :placeholder="$t('projectManage.itemRequired')"
style="width: 220px" style="width: 220px"
filterable filterable
class="filter-item" class="filter-item"
@ -38,7 +38,7 @@
icon="el-icon-search" icon="el-icon-search"
@click="fetchData" @click="fetchData"
> >
搜索 {{ $t('common.query') }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
@ -50,55 +50,53 @@
max-height="714" max-height="714"
highlight-current-row highlight-current-row
> >
<el-table-column label="序号" fixed width="95"> <el-table-column :label="$t('common.num')" fixed width="95">
<template slot-scope="scope">{{ scope.$index + 1 }}</template> <template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column label="实例标识" width="260"> <el-table-column :label="$t('threadPoolInstance.instanceID')" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link> <el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Active" width="120"> <el-table-column :label="$t('threadPoolInstance.active')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.active | statusFilter"> <el-tag :type="scope.row.active | statusFilter">
{{ scope.row.active }} {{ scope.row.active }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="核心线程" width="120"> <el-table-column :label="$t('threadPool.coreSize')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="success" :underline="false">{{ scope.row.coreSize }}</el-link> <el-link type="success" :underline="false">{{ scope.row.coreSize }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最大线程" width="120"> <el-table-column :label="$t('threadPool.maximumSize')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="danger" :underline="false">{{ scope.row.maximumSize }}</el-link> <el-link type="danger" :underline="false">{{ scope.row.maximumSize }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="队列类型" width="260"> <el-table-column :label="$t('threadPool.queueType')" width="260">
<template slot-scope="scope">{{ scope.row.queueType }}</template> <template slot-scope="scope">{{ scope.row.queueType }}</template>
</el-table-column> </el-table-column>
<el-table-column label="队列容量" width="160"> <el-table-column :label="$t('threadPool.queueCapacity')" width="160">
<template slot-scope="scope">{{ scope.row.queueCapacity }}</template> <template slot-scope="scope">{{ scope.row.queueCapacity }}</template>
</el-table-column> </el-table-column>
<el-table-column label="拒绝策略" width="260"> <el-table-column :label="$t('threadPool.rejectedHandler')" width="260">
<template slot-scope="scope">{{ scope.row.rejectedName }}</template> <template slot-scope="scope">{{ scope.row.rejectedName }}</template>
</el-table-column> </el-table-column>
<el-table-column label="空闲回收" width="100"> <el-table-column :label="$t('threadPool.keepAliveTime')" width="100">
<template slot-scope="scope">{{ scope.row.keepAliveTime }}</template> <template slot-scope="scope">{{ scope.row.keepAliveTime }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" :label="$t('common.operation')"
width="90" width="90"
align="center" align="center"
fixed="right" fixed="right"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" size="small" @click="handleInfo(row)"> </el-button> <el-button type="text" size="small" @click="handleInfo(row)"> {{ $t('common.detail') }} </el-button>
<el-button type="text" :disabled="isEditDisabled" size="small" @click="handleUpdate(row)"> <el-button type="text" :disabled="isEditDisabled" size="small" @click="handleUpdate(row)">{{ $t('common.edit') }} </el-button>
编辑
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -108,81 +106,81 @@
width="1000px" width="1000px"
> >
<template> <template>
<el-descriptions class="margin-top" title="负载信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.LoadInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 当前负载 </template> <template slot="label"> {{ $t('threadPoolInstance.CurrentLoad') }} </template>
{{ runTimeTemp.currentLoad }} {{ runTimeTemp.currentLoad }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 峰值负载 </template> <template slot="label"> {{ $t('threadPoolInstance.PeakLoad') }} </template>
{{ runTimeTemp.peakLoad }} {{ runTimeTemp.peakLoad }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 剩余内存 </template> <template slot="label"> {{ $t('threadPoolInstance.RemainingMemory') }} </template>
{{ runTimeTemp.freeMemory }} {{ runTimeTemp.freeMemory }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 内存占比 </template> <template slot="label"> {{ $t('threadPoolInstance.MemoryRatio') }} </template>
{{ runTimeTemp.memoryProportion }} {{ runTimeTemp.memoryProportion }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="线程信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.threadInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 核心线程 </template> <template slot="label"> {{ $t('threadPool.coreSize') }} </template>
{{ runTimeTemp.coreSize }} {{ runTimeTemp.coreSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 当前线程 </template> <template slot="label"> {{ $t('threadPoolInstance.currentSize') }} </template>
{{ runTimeTemp.poolSize }} {{ runTimeTemp.poolSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 最大线程 </template> <template slot="label"> {{ $t('threadPool.maximumSize') }} </template>
{{ runTimeTemp.maximumSize }} {{ runTimeTemp.maximumSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 活跃线程 </template> <template slot="label"> {{ $t('threadPoolInstance.activeSize') }} </template>
{{ runTimeTemp.activeSize }} {{ runTimeTemp.activeSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 同存最大线程 </template> <template slot="label"> {{ $t('threadPoolInstance.largestSize') }} </template>
{{ runTimeTemp.largestPoolSize }} {{ runTimeTemp.largestPoolSize }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="队列信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.queueInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列容量 </template> <template slot="label"> {{ $t('threadPool.queueCapacity') }} </template>
{{ runTimeTemp.queueCapacity }} {{ runTimeTemp.queueCapacity }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列元素 </template> <template slot="label"> {{ $t('threadPoolInstance.queueCount') }} </template>
{{ runTimeTemp.queueSize }} {{ runTimeTemp.queueSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列剩余容量 </template> <template slot="label"> {{ $t('threadPoolInstance.queueRemainingCapacity') }} </template>
{{ runTimeTemp.queueRemainingCapacity }} {{ runTimeTemp.queueRemainingCapacity }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 阻塞队列 </template> <template slot="label"> {{ $t('threadPoolInstance.queueType') }} </template>
{{ runTimeTemp.queueType }} {{ runTimeTemp.queueType }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="其它信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.otherInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 任务总量 </template> <template slot="label"> {{ $t('threadPoolInstance.totalTask') }} </template>
{{ runTimeTemp.completedTaskCount }} {{ runTimeTemp.completedTaskCount }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 最后更新时间 </template> <template slot="label"> {{ $t('threadPoolInstance.lastUpdateTime') }} </template>
{{ runTimeTemp.clientLastRefreshTime }} {{ runTimeTemp.clientLastRefreshTime }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 拒绝策略 </template> <template slot="label"> {{ $t('threadPool.rejectedHandler') }} </template>
{{ runTimeTemp.rejectedName }} {{ runTimeTemp.rejectedName }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -190,11 +188,11 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="instanceDialogFormVisible = false"> <el-button @click="instanceDialogFormVisible = false">
<i class="el-icon-close" /> <i class="el-icon-close" />
{{ $t('common.close') }}
</el-button> </el-button>
<el-button type="primary" @click="handleInfo()"> <el-button type="primary" @click="handleInfo()">
<i class="el-icon-refresh-right" /> <i class="el-icon-refresh-right" />
{{ $t('common.refresh') }}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -206,7 +204,7 @@
label-position="left" label-position="left"
label-width="110px" label-width="110px"
> >
<el-form-item label="核心线程" prop="coreSize"> <el-form-item :label="$t('threadPool.coreSize')" prop="coreSize">
<template> <template>
<el-input-number <el-input-number
v-model="temp.coreSize" v-model="temp.coreSize"
@ -216,7 +214,7 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="最大线程" prop="maximumSize"> <el-form-item :label="$t('threadPool.maximumSize')" prop="maximumSize">
<template> <template>
<el-input-number <el-input-number
v-model="temp.maximumSize" v-model="temp.maximumSize"
@ -226,13 +224,13 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="全部修改" prop="allUpdate"> <el-form-item :label="$t('threadPoolInstance.changeAll')" prop="allUpdate">
<el-switch v-model="temp.allUpdate"></el-switch> <el-switch v-model="temp.allUpdate"></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> 取消 </el-button> <el-button @click="dialogFormVisible = false"> {{ $t('common.cancel') }} </el-button>
<el-button type="primary" @click="updateData()"> </el-button> <el-button type="primary" @click="updateData()"> {{$t('common.confirm')}} </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogPluginVisible" title="Reading statistics"> <el-dialog :visible.sync="dialogPluginVisible" title="Reading statistics">
@ -352,11 +350,11 @@ export default {
}, },
fetchData() { fetchData() {
if (!this.listQuery.tenantId) { if (!this.listQuery.tenantId) {
this.$message.warning('租户不允许为空'); this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') }));
return; return;
} }
if (!this.listQuery.itemId) { if (!this.listQuery.itemId) {
this.$message.warning('项目不允许为空'); this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') }));
return; return;
} }
this.listLoading = true; this.listLoading = true;
@ -474,7 +472,7 @@ export default {
if (valid) { if (valid) {
if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) {
this.$message({ this.$message({
message: '最大线程必须大于等于核心线程', message: this.$t('threadPool.threadsNumErrorTip'),
type: 'warning', type: 'warning',
}); });
return; return;
@ -482,7 +480,7 @@ export default {
const clientAddressList = []; const clientAddressList = [];
const tempData = { const tempData = {
corePoolSize: this.temp.coreSize, corePoolSize: this.temp.coreSize,
itemId: this.temp.itemId, temId: this.temp.itemId,
tenantId: this.temp.tenantId, tenantId: this.temp.tenantId,
maximumPoolSize: this.temp.maximumSize, maximumPoolSize: this.temp.maximumSize,
keepAliveTime: this.temp.keepAliveTime, keepAliveTime: this.temp.keepAliveTime,
@ -520,14 +518,14 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message.error('查询失败,请尝试刷新页面'); this.$message.error(this.$t('message.queryFailure'));
}); });
}, },
openDelConfirm(name) { openDelConfirm(name) {
return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), {
confirmButtonText: '确定', confirmButtonText: this.$t('common.ok'),
cancelButtonText: '取消', cancelButtonText: this.$t('common.cancel'),
type: 'warning', type: 'warning',
}); });
}, },
@ -634,7 +632,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message.error('查询失败,请尝试刷新页面'); this.$message.error(this.$t('message.queryFailure'));
}); });
}, },
}, },

@ -3,7 +3,7 @@
<div class="filter-container"> <div class="filter-container">
<el-select <el-select
v-model="listQuery.tenantId" v-model="listQuery.tenantId"
placeholder="租户(必填)" :placeholder="$t('tenantManage.tenantRequired')"
style="width: 220px" style="width: 220px"
filterable filterable
class="filter-item" class="filter-item"
@ -18,7 +18,7 @@
</el-select> </el-select>
<el-select <el-select
v-model="listQuery.itemId" v-model="listQuery.itemId"
placeholder="项目(必填)" :placeholder="$t('projectManage.itemRequired')"
style="width: 220px" style="width: 220px"
filterable filterable
class="filter-item" class="filter-item"
@ -38,7 +38,7 @@
icon="el-icon-search" icon="el-icon-search"
@click="fetchData" @click="fetchData"
> >
搜索 {{ $t('common.query') }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
@ -50,53 +50,53 @@
max-height="714" max-height="714"
highlight-current-row highlight-current-row
> >
<el-table-column label="序号" fixed width="95"> <el-table-column :label="$t('common.num')" fixed width="95">
<template slot-scope="scope">{{ scope.$index + 1 }}</template> <template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column label="实例标识" width="260"> <el-table-column :label="$t('threadPoolInstance.instanceID')" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link> <el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Active" width="120"> <el-table-column :label="$t('threadPoolInstance.active')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.active | statusFilter"> <el-tag :type="scope.row.active | statusFilter">
{{ scope.row.active }} {{ scope.row.active }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="核心线程" width="120"> <el-table-column :label="$t('threadPool.coreSize')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="success" :underline="false">{{ scope.row.coreSize }}</el-link> <el-link type="success" :underline="false">{{ scope.row.coreSize }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最大线程" width="120"> <el-table-column :label="$t('threadPool.maximumSize')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="danger" :underline="false">{{ scope.row.maximumSize }}</el-link> <el-link type="danger" :underline="false">{{ scope.row.maximumSize }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="队列类型" width="260"> <el-table-column :label="$t('threadPool.queueType')" width="260">
<template slot-scope="scope">{{ scope.row.queueType }}</template> <template slot-scope="scope">{{ scope.row.queueType }}</template>
</el-table-column> </el-table-column>
<el-table-column label="队列容量" width="160"> <el-table-column :label="$t('threadPool.queueCapacity')" width="160">
<template slot-scope="scope">{{ scope.row.queueCapacity }}</template> <template slot-scope="scope">{{ scope.row.queueCapacity }}</template>
</el-table-column> </el-table-column>
<el-table-column label="拒绝策略" width="260"> <el-table-column :label="$t('threadPool.rejectedHandler')" width="260">
<template slot-scope="scope">{{ scope.row.rejectedName }}</template> <template slot-scope="scope">{{ scope.row.rejectedName }}</template>
</el-table-column> </el-table-column>
<el-table-column label="空闲回收" width="100"> <el-table-column :label="$t('threadPool.keepAliveTime')" width="100">
<template slot-scope="scope">{{ scope.row.keepAliveTime }}</template> <template slot-scope="scope">{{ scope.row.keepAliveTime }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" :label="$t('common.operation')"
width="90" width="90"
align="center" align="center"
fixed="right" fixed="right"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" size="small" @click="handleInfo(row)"> </el-button> <el-button type="text" size="small" @click="handleInfo(row)"> {{ $t('common.detail') }} </el-button>
<el-button type="text" size="small" @click="handleUpdate(row)"> </el-button> <el-button type="text" size="small" @click="handleUpdate(row)"> {{ $t('common.edit') }} </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -106,81 +106,81 @@
width="1000px" width="1000px"
> >
<template> <template>
<el-descriptions class="margin-top" title="负载信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.LoadInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 当前负载 </template> <template slot="label"> {{ $t('threadPoolInstance.CurrentLoad') }} </template>
{{ runTimeTemp.currentLoad }} {{ runTimeTemp.currentLoad }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 峰值负载 </template> <template slot="label"> {{ $t('threadPoolInstance.PeakLoad') }} </template>
{{ runTimeTemp.peakLoad }} {{ runTimeTemp.peakLoad }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 剩余内存 </template> <template slot="label"> {{ $t('threadPoolInstance.RemainingMemory') }} </template>
{{ runTimeTemp.freeMemory }} {{ runTimeTemp.freeMemory }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 内存占比 </template> <template slot="label"> {{ $t('threadPoolInstance.MemoryRatio') }} </template>
{{ runTimeTemp.memoryProportion }} {{ runTimeTemp.memoryProportion }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="线程信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.threadInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 核心线程 </template> <template slot="label"> {{ $t('threadPool.coreSize') }} </template>
{{ runTimeTemp.coreSize }} {{ runTimeTemp.coreSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 当前线程 </template> <template slot="label"> {{ $t('threadPoolInstance.currentSize') }} </template>
{{ runTimeTemp.poolSize }} {{ runTimeTemp.poolSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 最大线程 </template> <template slot="label"> {{ $t('threadPool.maximumSize') }} </template>
{{ runTimeTemp.maximumSize }} {{ runTimeTemp.maximumSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 活跃线程 </template> <template slot="label"> {{ $t('threadPoolInstance.activeSize') }} </template>
{{ runTimeTemp.activeSize }} {{ runTimeTemp.activeSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 同存最大线程 </template> <template slot="label"> {{ $t('threadPoolInstance.largestSize') }} </template>
{{ runTimeTemp.largestPoolSize }} {{ runTimeTemp.largestPoolSize }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="队列信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.queueInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列容量 </template> <template slot="label"> {{ $t('threadPool.queueCapacity') }} </template>
{{ runTimeTemp.queueCapacity }} {{ runTimeTemp.queueCapacity }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列元素 </template> <template slot="label"> {{ $t('threadPoolInstance.queueCount') }} </template>
{{ runTimeTemp.queueSize }} {{ runTimeTemp.queueSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列剩余容量 </template> <template slot="label"> {{ $t('threadPoolInstance.queueRemainingCapacity') }} </template>
{{ runTimeTemp.queueRemainingCapacity }} {{ runTimeTemp.queueRemainingCapacity }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 阻塞队列 </template> <template slot="label"> {{ $t('threadPoolInstance.queueType') }} </template>
{{ runTimeTemp.queueType }} {{ runTimeTemp.queueType }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="其它信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.otherInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 任务总量 </template> <template slot="label"> {{ $t('threadPoolInstance.totalTask') }} </template>
{{ runTimeTemp.completedTaskCount }} {{ runTimeTemp.completedTaskCount }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 最后更新时间 </template> <template slot="label"> {{ $t('threadPoolInstance.lastUpdateTime') }} </template>
{{ runTimeTemp.clientLastRefreshTime }} {{ runTimeTemp.clientLastRefreshTime }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 拒绝策略 </template> <template slot="label"> {{ $t('threadPool.rejectedHandler') }} </template>
{{ runTimeTemp.rejectedName }} {{ runTimeTemp.rejectedName }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -188,11 +188,11 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="instanceDialogFormVisible = false"> <el-button @click="instanceDialogFormVisible = false">
<i class="el-icon-close" /> <i class="el-icon-close" />
{{ $t('common.close') }}
</el-button> </el-button>
<el-button type="primary" @click="handleInfo()"> <el-button type="primary" @click="handleInfo()">
<i class="el-icon-refresh-right" /> <i class="el-icon-refresh-right" />
{{ $t('common.refresh') }}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -204,7 +204,7 @@
label-position="left" label-position="left"
label-width="110px" label-width="110px"
> >
<el-form-item label="核心线程" prop="coreSize"> <el-form-item :label="$t('threadPool.coreSize')" prop="coreSize">
<template> <template>
<el-input-number <el-input-number
v-model="temp.coreSize" v-model="temp.coreSize"
@ -214,7 +214,7 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="最大线程" prop="maximumSize"> <el-form-item :label="$t('threadPool.maximumSize')" prop="maximumSize">
<template> <template>
<el-input-number <el-input-number
v-model="temp.maximumSize" v-model="temp.maximumSize"
@ -224,7 +224,7 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="空闲回收时间" prop="keepAliveTime"> <el-form-item :label="$t('threadPool.keepAliveTime')" prop="keepAliveTime">
<template> <template>
<el-input-number <el-input-number
v-model="temp.keepAliveTime" v-model="temp.keepAliveTime"
@ -234,13 +234,13 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="全部修改" prop="allUpdate"> <el-form-item :label="$t('threadPoolInstance.changeAll')" prop="allUpdate">
<el-switch v-model="temp.allUpdate"></el-switch> <el-switch v-model="temp.allUpdate"></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> 取消 </el-button> <el-button @click="dialogFormVisible = false"> {{ $t('common.cancel') }} </el-button>
<el-button type="primary" @click="updateData()"> </el-button> <el-button type="primary" @click="updateData()"> {{$t('common.confirm')}} </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogPluginVisible" title="Reading statistics"> <el-dialog :visible.sync="dialogPluginVisible" title="Reading statistics">
@ -272,7 +272,7 @@ export default {
UAT: 'warning', UAT: 'warning',
PROD: 'danger', PROD: 'danger',
}; };
return statusMap[status]; return statusMap[status]
}, },
}, },
data() { data() {
@ -360,11 +360,11 @@ export default {
}, },
fetchData() { fetchData() {
if (!this.listQuery.tenantId) { if (!this.listQuery.tenantId) {
this.$message.warning('租户不允许为空'); this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') }));
return; return;
} }
if (!this.listQuery.itemId) { if (!this.listQuery.itemId) {
this.$message.warning('项目不允许为空'); this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') }));
return; return;
} }
this.listLoading = true; this.listLoading = true;
@ -482,7 +482,7 @@ export default {
if (valid) { if (valid) {
if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) {
this.$message({ this.$message({
message: '最大线程必须大于等于核心线程', message: this.$t('threadPool.threadsNumErrorTip'),
type: 'warning', type: 'warning',
}); });
return; return;
@ -528,14 +528,14 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message.error('查询失败,请尝试刷新页面'); this.$message.error(this.$t('message.queryFailure'));
}); });
}, },
openDelConfirm(name) { openDelConfirm(name) {
return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), {
confirmButtonText: '确定', confirmButtonText: this.$t('common.ok'),
cancelButtonText: '取消', cancelButtonText: this.$t('common.cancel'),
type: 'warning', type: 'warning',
}); });
}, },
@ -642,7 +642,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message.error('查询失败,请尝试刷新页面'); this.$message.error(this.$t('message.queryFailure'));
}); });
}, },
}, },

@ -3,7 +3,7 @@
<div class="filter-container"> <div class="filter-container">
<el-select <el-select
v-model="listQuery.tenantId" v-model="listQuery.tenantId"
placeholder="租户(必填)" :placeholder="$t('tenantManage.tenantRequired')"
style="width: 220px" style="width: 220px"
filterable filterable
class="filter-item" class="filter-item"
@ -18,7 +18,7 @@
</el-select> </el-select>
<el-select <el-select
v-model="listQuery.itemId" v-model="listQuery.itemId"
placeholder="项目(必填)" :placeholder="$t('projectManage.itemRequired')"
style="width: 220px" style="width: 220px"
filterable filterable
class="filter-item" class="filter-item"
@ -38,7 +38,7 @@
icon="el-icon-search" icon="el-icon-search"
@click="fetchData" @click="fetchData"
> >
搜索 {{ $t('common.query') }}
</el-button> </el-button>
</div> </div>
<el-table <el-table
@ -50,55 +50,53 @@
max-height="714" max-height="714"
highlight-current-row highlight-current-row
> >
<el-table-column label="序号" fixed width="95"> <el-table-column :label="$t('common.num')" fixed width="95">
<template slot-scope="scope">{{ scope.$index + 1 }}</template> <template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column label="实例标识" width="260"> <el-table-column :label="$t('threadPoolInstance.instanceID')" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link> <el-link type="primary" :underline="false">{{ scope.row.identify }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="Active" width="120"> <el-table-column :label="$t('threadPoolInstance.active')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.active | statusFilter"> <el-tag :type="scope.row.active | statusFilter">
{{ scope.row.active }} {{ scope.row.active }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="核心线程" width="120"> <el-table-column :label="$t('threadPool.coreSize')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="success" :underline="false">{{ scope.row.coreSize }}</el-link> <el-link type="success" :underline="false">{{ scope.row.coreSize }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最大线程" width="120"> <el-table-column :label="$t('threadPool.maximumSize')" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="danger" :underline="false">{{ scope.row.maximumSize }}</el-link> <el-link type="danger" :underline="false">{{ scope.row.maximumSize }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="队列类型" width="260"> <el-table-column :label="$t('threadPool.queueType')" width="260">
<template slot-scope="scope">{{ scope.row.queueType }}</template> <template slot-scope="scope">{{ scope.row.queueType }}</template>
</el-table-column> </el-table-column>
<el-table-column label="队列容量" width="160"> <el-table-column :label="$t('threadPool.queueCapacity')" width="160">
<template slot-scope="scope">{{ scope.row.queueCapacity }}</template> <template slot-scope="scope">{{ scope.row.queueCapacity }}</template>
</el-table-column> </el-table-column>
<el-table-column label="拒绝策略" width="260"> <el-table-column :label="$t('threadPool.rejectedHandler')" width="260">
<template slot-scope="scope">{{ scope.row.rejectedName }}</template> <template slot-scope="scope">{{ scope.row.rejectedName }}</template>
</el-table-column> </el-table-column>
<el-table-column label="空闲回收" width="100"> <el-table-column :label="$t('threadPool.keepAliveTime')" width="100">
<template slot-scope="scope">{{ scope.row.keepAliveTime }}</template> <template slot-scope="scope">{{ scope.row.keepAliveTime }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" :label="$t('common.operation')"
width="90" width="90"
align="center" align="center"
fixed="right" fixed="right"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" size="small" @click="handleInfo(row)"> </el-button> <el-button type="text" size="small" @click="handleInfo(row)"> {{ $t('common.detail') }} </el-button>
<el-button type="text" :disabled="isEditDisabled" size="small" @click="handleUpdate(row)"> <el-button type="text" :disabled="isEditDisabled" size="small" @click="handleUpdate(row)"> {{ $t('common.edit') }} </el-button>
编辑
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -108,81 +106,81 @@
width="1000px" width="1000px"
> >
<template> <template>
<el-descriptions class="margin-top" title="负载信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.LoadInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 当前负载 </template> <template slot="label"> {{ $t('threadPoolInstance.CurrentLoad') }} </template>
{{ runTimeTemp.currentLoad }} {{ runTimeTemp.currentLoad }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 峰值负载 </template> <template slot="label"> {{ $t('threadPoolInstance.PeakLoad') }} </template>
{{ runTimeTemp.peakLoad }} {{ runTimeTemp.peakLoad }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 剩余内存 </template> <template slot="label"> {{ $t('threadPoolInstance.RemainingMemory') }} </template>
{{ runTimeTemp.freeMemory }} {{ runTimeTemp.freeMemory }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 内存占比 </template> <template slot="label"> {{ $t('threadPoolInstance.MemoryRatio') }} </template>
{{ runTimeTemp.memoryProportion }} {{ runTimeTemp.memoryProportion }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="线程信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.threadInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 核心线程 </template> <template slot="label"> {{ $t('threadPool.coreSize') }} </template>
{{ runTimeTemp.coreSize }} {{ runTimeTemp.coreSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 当前线程 </template> <template slot="label"> {{ $t('threadPoolInstance.currentSize') }} </template>
{{ runTimeTemp.poolSize }} {{ runTimeTemp.poolSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 最大线程 </template> <template slot="label"> {{ $t('threadPool.maximumSize') }} </template>
{{ runTimeTemp.maximumSize }} {{ runTimeTemp.maximumSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 活跃线程 </template> <template slot="label"> {{ $t('threadPoolInstance.activeSize') }} </template>
{{ runTimeTemp.activeSize }} {{ runTimeTemp.activeSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 同存最大线程 </template> <template slot="label"> {{ $t('threadPoolInstance.largestSize') }} </template>
{{ runTimeTemp.largestPoolSize }} {{ runTimeTemp.largestPoolSize }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="队列信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.queueInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列容量 </template> <template slot="label"> {{ $t('threadPool.queueCapacity') }} </template>
{{ runTimeTemp.queueCapacity }} {{ runTimeTemp.queueCapacity }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列元素 </template> <template slot="label"> {{ $t('threadPoolInstance.queueCount') }} </template>
{{ runTimeTemp.queueSize }} {{ runTimeTemp.queueSize }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 队列剩余容量 </template> <template slot="label"> {{ $t('threadPoolInstance.queueRemainingCapacity') }} </template>
{{ runTimeTemp.queueRemainingCapacity }} {{ runTimeTemp.queueRemainingCapacity }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 阻塞队列 </template> <template slot="label"> {{ $t('threadPoolInstance.queueType') }} </template>
{{ runTimeTemp.queueType }} {{ runTimeTemp.queueType }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<br /> <br />
<br /> <br />
<el-descriptions class="margin-top" title="其它信息" :column="3" :size="size" border> <el-descriptions class="margin-top" :title="$t('threadPoolInstance.otherInformation')" :column="3" :size="size" border>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 任务总量 </template> <template slot="label"> {{ $t('threadPoolInstance.totalTask') }} </template>
{{ runTimeTemp.completedTaskCount }} {{ runTimeTemp.completedTaskCount }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 最后更新时间 </template> <template slot="label"> {{ $t('threadPoolInstance.lastUpdateTime') }} </template>
{{ runTimeTemp.clientLastRefreshTime }} {{ runTimeTemp.clientLastRefreshTime }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> 拒绝策略 </template> <template slot="label"> {{ $t('threadPool.rejectedHandler') }} </template>
{{ runTimeTemp.rejectedName }} {{ runTimeTemp.rejectedName }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -190,11 +188,11 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="instanceDialogFormVisible = false"> <el-button @click="instanceDialogFormVisible = false">
<i class="el-icon-close" /> <i class="el-icon-close" />
{{ $t('common.close') }}
</el-button> </el-button>
<el-button type="primary" @click="handleInfo()"> <el-button type="primary" @click="handleInfo()">
<i class="el-icon-refresh-right" /> <i class="el-icon-refresh-right" />
{{ $t('common.refresh') }}
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -206,7 +204,7 @@
label-position="left" label-position="left"
label-width="110px" label-width="110px"
> >
<el-form-item label="核心线程" prop="coreSize"> <el-form-item :label="$t('threadPool.coreSize')" prop="coreSize">
<template> <template>
<el-input-number <el-input-number
v-model="temp.coreSize" v-model="temp.coreSize"
@ -216,7 +214,7 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="最大线程" prop="maximumSize"> <el-form-item :label="$t('threadPool.maximumSize')" prop="maximumSize">
<template> <template>
<el-input-number <el-input-number
v-model="temp.maximumSize" v-model="temp.maximumSize"
@ -226,7 +224,7 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="空闲回收时间" prop="keepAliveTime"> <el-form-item :label="$t('threadPool.keepAliveTime')" prop="keepAliveTime">
<template> <template>
<el-input-number <el-input-number
v-model="temp.keepAliveTime" v-model="temp.keepAliveTime"
@ -236,13 +234,13 @@
></el-input-number> ></el-input-number>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="全部修改" prop="allUpdate"> <el-form-item :label="$t('threadPoolInstance.changeAll')" prop="allUpdate">
<el-switch v-model="temp.allUpdate"></el-switch> <el-switch v-model="temp.allUpdate"></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> 取消 </el-button> <el-button @click="dialogFormVisible = false"> {{ $t('common.cancel') }} </el-button>
<el-button type="primary" @click="updateData()"> </el-button> <el-button type="primary" @click="updateData()"> {{$t('common.confirm')}} </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogPluginVisible" title="Reading statistics"> <el-dialog :visible.sync="dialogPluginVisible" title="Reading statistics">
@ -362,11 +360,11 @@ export default {
}, },
fetchData() { fetchData() {
if (!this.listQuery.tenantId) { if (!this.listQuery.tenantId) {
this.$message.warning('租户不允许为空'); this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('tenantManage.tenant') }));
return; return;
} }
if (!this.listQuery.itemId) { if (!this.listQuery.itemId) {
this.$message.warning('项目不允许为空'); this.$message.warning(this.$t('message.emptyWarning', { name: this.$t('projectManage.item') }));
return; return;
} }
this.listLoading = true; this.listLoading = true;
@ -484,7 +482,7 @@ export default {
if (valid) { if (valid) {
if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) { if (parseInt(this.temp.maximumSize) < parseInt(this.temp.coreSize)) {
this.$message({ this.$message({
message: '最大线程必须大于等于核心线程', message: this.$t('threadPool.threadsNumErrorTip'),
type: 'warning', type: 'warning',
}); });
return; return;
@ -492,7 +490,7 @@ export default {
const clientAddressList = []; const clientAddressList = [];
const tempData = { const tempData = {
corePoolSize: this.temp.coreSize, corePoolSize: this.temp.coreSize,
temId: this.temp.itemId, itemId: this.temp.itemId,
tenantId: this.temp.tenantId, tenantId: this.temp.tenantId,
maximumPoolSize: this.temp.maximumSize, maximumPoolSize: this.temp.maximumSize,
keepAliveTime: this.temp.keepAliveTime, keepAliveTime: this.temp.keepAliveTime,
@ -530,14 +528,14 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message.error('查询失败,请尝试刷新页面'); this.$message.error(this.$t('message.queryFailure'));
}); });
}, },
openDelConfirm(name) { openDelConfirm(name) {
return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), {
confirmButtonText: '确定', confirmButtonText: this.$t('common.ok'),
cancelButtonText: '取消', cancelButtonText: this.$t('common.cancel'),
type: 'warning', type: 'warning',
}); });
}, },
@ -644,7 +642,7 @@ export default {
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message.error('查询失败,请尝试刷新页面'); this.$message.error(this.$t('message.queryFailure'));
}); });
}, },
}, },

Loading…
Cancel
Save