Complete the text translation of the 'Notify Alarm' page (#1142)

pull/1143/head
Svamei 2 years ago committed by GitHub
parent 8718e1aebd
commit 45289532a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,7 +21,8 @@ export default {
queryFailure: 'The query fails. Please refresh the page',
updateFailure:'Failed to modify thread pool',
auditApprovedMessage: 'This operation will accept thread pool change requests. Do you want to continue?',
auditRejectionMessage: 'This operation will reject the thread pool change request. Do you want to continue?'
auditRejectionMessage: 'This operation will reject the thread pool change request. Do you want to continue?',
inputMessage: 'Please input {target}',
},
// 公共
@ -168,5 +169,21 @@ export default {
threadPoolInstance: 'ThreadPool Instance',
containerThreadPool: 'Container ThreadPool',
frameworkThreadPool: 'Framework ThreadPool',
}
},
//通知报警
notifyAlarm: {
platform: 'Platform',
type: 'Type',
enabled: 'Enabled',
interval: 'Interval',
receiver: 'Receiver',
enabling: 'Enabling',
disabling: 'Disabling',
token: 'Token',
receiverTip: 'Use English commas for multiple recipients and separate them (be careful not to have spaces)\n' +
'-Ding: Fill in the phone number\n' +
'-WeChat: Fill in \'userid\' and it will be sent to the user as a @ message, otherwise fill in the name, such as: XiaomaGe\n' +
'-Lark: Fill in with \'ou_\' the unique user ID at the beginning will be sent to the user as a @ message, and filling in the phone number is normal@'
},
}

@ -21,7 +21,8 @@ export default {
queryFailure: '查询失败,请尝试刷新页面',
updateFailure:'修改线程池失败',
auditApprovedMessage: '此操作将接受线程池变更申请, 是否继续?',
auditRejectionMessage: '此操作将拒绝线程池变更申请, 是否继续?'
auditRejectionMessage: '此操作将拒绝线程池变更申请, 是否继续?',
inputMessage: '请输入{target}',
},
// 公共
@ -168,5 +169,21 @@ export default {
threadPoolInstance: '线程池实例',
containerThreadPool: '容器线程池',
frameworkThreadPool: '框架线程池',
}
},
//通知报警
notifyAlarm: {
platform: '通知平台',
type: '通知类型',
enabled: '是否启用',
interval: '通知间隔',
receiver: '接收者',
enabling: '启用',
disabling: '禁用',
token: 'Token',
receiverTip: '多个接收者使用英文逗号 , 分割 (注意不要有空格)\n' +
'- 钉钉:填写手机号\n' +
'- 企微填写user_id会以@的消息发给用户,否则填写姓名,如:小马哥\n' +
'- 飞书填写ou_开头用户唯一标识会以@的消息发给用户,填写手机号则是普通的@"'
},
}

@ -3,7 +3,7 @@
<div class="filter-container">
<el-select
v-model="listQuery.tenantId"
placeholder="租户"
:placeholder="$t('tenantManage.tenant')"
style="width: 220px"
filterable
class="filter-item"
@ -18,7 +18,7 @@
</el-select>
<el-select
v-model="listQuery.itemId"
placeholder="项目"
:placeholder="$t('projectManage.item')"
style="width: 220px"
filterable
class="filter-item"
@ -33,7 +33,7 @@
</el-select>
<el-select
v-model="listQuery.tpId"
placeholder="线程池"
:placeholder="$t('threadPool.threadPool')"
style="width: 220px"
filterable
class="filter-item"
@ -52,7 +52,7 @@
icon="el-icon-search"
@click="fetchData"
>
搜索
{{ $t('common.query') }}
</el-button>
<el-button
class="filter-item"
@ -61,7 +61,7 @@
icon="el-icon-edit"
@click="handleCreate"
>
添加
{{ $t('common.insert') }}
</el-button>
</div>
<el-table
@ -72,29 +72,29 @@
border
highlight-current-row
>
<el-table-column label="序号" fixed width="95">
<el-table-column fixed :label="$t('common.num')" width="95">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="租户" width="150">
<el-table-column :label="$t('tenantManage.tenant')" width="150">
<template slot-scope="scope">{{ scope.row.tenantId }}</template>
</el-table-column>
<el-table-column label="项目" width="260">
<el-table-column :label="$t('projectManage.item')" width="260">
<template slot-scope="scope">{{ scope.row.itemId }}</template>
</el-table-column>
<el-table-column label="线程池" width="260">
<el-table-column :label="$t('threadPool.threadPool')" width="260">
<template slot-scope="scope">{{ scope.row.tpId }}</template>
</el-table-column>
<el-table-column label="通知平台" width="150">
<el-table-column :label="$t('notifyAlarm.platform')" width="150">
<template slot-scope="scope">
<el-tag> {{ scope.row.platform }}</el-tag>
</template>
</el-table-column>
<el-table-column label="通知类型" width="150">
<el-table-column :label="$t('notifyAlarm.type')" width="150">
<template slot-scope="scope">
<el-tag type="success">{{ scope.row.type }}</el-tag>
</template>
</el-table-column>
<el-table-column label="是否启用" width="100">
<el-table-column :label="$t('notifyAlarm.enabled')" width="100">
<template slot-scope="scope">
<el-tooltip :content="'Switch value: ' + scope.row.enable" placement="top">
<el-switch
@ -109,34 +109,34 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="通知间隔" width="150">
<el-table-column :label="$t('notifyAlarm.interval')" width="150">
<template slot-scope="scope">{{ scope.row.interval | intervals }}</template>
</el-table-column>
<el-table-column label="接收者" width="200">
<el-table-column :label="$t('notifyAlarm.receiver')" width="200">
<template slot-scope="scope">{{ scope.row.receives | ellipsis }}</template>
</el-table-column>
<el-table-column label="创建时间" width="180">
<el-table-column :label="$t('common.createTime')" width="180">
<template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
</el-table-column>
<el-table-column label="修改时间" width="180">
<el-table-column :label="$t('common.updateTime')" width="180">
<template slot-scope="scope">{{ scope.row.gmtModified }}</template>
</el-table-column>
<el-table-column
label="操作"
:label="$t('common.operation')"
fixed="right"
width="90"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="{ row }">
<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>
<el-button
v-if="row.status !== 'deleted'"
size="small"
type="text"
@click="handleDelete(row)"
>
删除
{{$t('common.delete')}}
</el-button>
</template>
</el-table-column>
@ -157,10 +157,10 @@
:model="temp"
label-width="80px"
>
<el-form-item v-if="isEdit" label="租户" prop="tenantId">
<el-form-item v-if="isEdit" :label="$t('tenantManage.tenant')" prop="tenantId">
<el-select
v-model="temp.tenantId"
placeholder="请选择租户"
:placeholder="$t('message.selectMessage', { target: $t('tenantManage.tenant') })"
style="display: block"
:disabled="dialogStatus === 'create' ? false : true"
@change="tenantTempSelectList()"
@ -173,10 +173,10 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="isEdit" label="项目" prop="itemId">
<el-form-item v-if="isEdit" :label="$t('projectManage.item')" prop="itemId">
<el-select
v-model="temp.itemId"
placeholder="请选择项目"
:placeholder="$t('message.selectMessage', { target: $t('projectManage.item') })"
style="display: block"
:disabled="dialogStatus === 'create' ? false : true"
@change="itemTempSelectList()"
@ -189,10 +189,10 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="isEdit" label="线程池" prop="tpId">
<el-form-item v-if="isEdit" :label="$t('threadPool.threadPool')" prop="tpId">
<el-select
v-model="temp.tpId"
placeholder="线程池"
:placeholder="$t('threadPool.threadPool')"
style="display: block"
:disabled="dialogStatus === 'create' ? false : true"
>
@ -205,7 +205,7 @@
</el-select>
</el-form-item>
<el-form-item label="通知平台" prop="platform">
<el-form-item :label="$t('notifyAlarm.platform')" prop="platform">
<template>
<div>
<el-radio-group v-model="temp.platform">
@ -216,18 +216,18 @@
</div>
</template>
</el-form-item>
<el-form-item label="是否启用" prop="enable">
<el-form-item :label="$t('notifyAlarm.enabled')" prop="enable">
<template>
<div>
<el-radio-group v-model="temp.enable">
<el-radio-button :label="1">启用</el-radio-button>
<el-radio-button :label="0">停用</el-radio-button>
<el-radio-button :label="1">{{ $t('notifyAlarm.enabling') }}</el-radio-button>
<el-radio-button :label="0">{{ $t('notifyAlarm.disabling') }}</el-radio-button>
</el-radio-group>
</div>
</template>
</el-form-item>
<el-form-item label="通知类型" prop="configType">
<el-form-item :label="$t('notifyAlarm.type')" prop="configType">
<!-- <el-tooltip :content="123">
<i class="el-icon-question"/>
</el-tooltip>-->
@ -248,10 +248,10 @@
</div>
</template>
</el-form-item>
<el-form-item label="报警间隔" prop="interval">
<el-form-item :label="$t('notifyAlarm.interval')" prop="interval">
<el-input-number
v-model="temp.interval"
placeholder="报警间隔 / Min"
:placeholder= "$t('notifyAlarm.interval') + ' / Min'"
controls-position="right"
:min="0"
:max="999999"
@ -259,31 +259,28 @@
/>
</el-form-item>
<el-form-item label="Token" prop="secretKey">
<el-form-item :label="$t('notifyAlarm.token')" prop="secretKey">
<el-input
v-model="temp.secretKey"
type="textarea"
placeholder="请输入 Token"
:placeholder="$t('message.inputMessage', { target: $t('notifyAlarm.token') })"
show-word-limit
/>
</el-form-item>
<el-form-item label="接收者" prop="receives">
<el-form-item :label="$t('notifyAlarm.receiver')" prop="receives">
<el-input
v-model="temp.receives"
type="textarea"
:autosize="{ minRows: 4, maxRows: 4 }"
placeholder="多个接收者使用英文逗号 , 分割 (注意不要有空格)
- 钉钉填写手机号
- 企微填写user_id会以@的消息发给用户否则填写姓名小马哥
- 飞书填写ou_开头用户唯一标识会以@的消息发给用户填写手机号则是普通的@"
:placeholder="$t('notifyAlarm.receiverTip')"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cleanForm()"> </el-button>
<el-button @click="cleanForm()"> {{ $t('common.cancel') }} </el-button>
<el-button type="primary" @click="dialogStatus === 'create' ? createData() : updateData()">
确认
{{ $t('common.confirm') }}
</el-button>
</div>
</el-dialog>
@ -293,7 +290,7 @@
<el-table-column prop="pv" label="Pv" />
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogPvVisible = false">Confirm</el-button>
<el-button type="primary" @click="dialogPvVisible = false">{{ $t('common.confirm') }}</el-button>
</span>
</el-dialog>
</div>
@ -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' }];
}
},

Loading…
Cancel
Save