perf: 已锁定的ip按钮增加个数显示

This commit is contained in:
“huailei000”
2023-12-13 17:14:40 +08:00
committed by huailei
parent 6daa16b3ca
commit d900a8d5a3
4 changed files with 16 additions and 2 deletions

View File

@@ -5,10 +5,12 @@
size="mini"
type="primary"
@click="onOpenDialog"
>{{ $tc('common.View') }}</el-button>
>
{{ $tc('common.View') }}
<span>({{ $tc('setting.LockedIP', ipCounts ) }})</span>
</el-button>
</div>
<Dialog
v-if="visible"
:visible.sync="visible"
:title="title"
width="40%"
@@ -54,6 +56,7 @@ export default {
remoteMeta: {},
visible: false,
form: this.value,
ipCounts: 0,
config: {
url: this.url,
hasSaveContinue: false,
@@ -63,7 +66,15 @@ export default {
}
}
},
created() {
this.getLockedIp()
},
methods: {
getLockedIp() {
this.$axios.get('/api/v1/settings/security/block-ip/').then(res => {
this.ipCounts = res.count
})
},
onOpenDialog() {
this.visible = true
}

View File

@@ -1628,6 +1628,7 @@
"setting": {
"BlockedIPS": "Blocked IPS",
"ViewBlockedIPSHelpText": "View the list of locked IPs",
"LockedIP": "Locked IPs {count}",
"Unblock": "Unblock",
"BulkUnblock": "BulkUnblock",
"AppOps": "Task center",

View File

@@ -1616,6 +1616,7 @@
"setting": {
"BlockedIPS": "ロックされたIP",
"ViewBlockedIPSHelpText": "ロックされたIPリストの表示",
"LockedIP": "ロックされた IP {count} 個",
"Unblock": "ロック解除",
"BulkUnblock": "一括ロック解除",
"AppOps": "タスクセンター",

View File

@@ -1610,6 +1610,7 @@
"Passkey": "Passkey",
"BlockedIPS": "已锁定的 IP",
"ViewBlockedIPSHelpText": "查看已被锁定的 IP 列表",
"LockedIP": "已锁定 IP {count} 个",
"Unblock": "解锁",
"BulkUnblock": "批量解锁",
"AppOps": "任务中心",