chore: improve api descs for banned

This commit is contained in:
zhouzb 2022-09-30 15:05:01 +08:00
parent 09500f1f45
commit d1a15f1a43
1 changed files with 34 additions and 49 deletions

View File

@ -2,112 +2,97 @@ emqx_mgmt_api_banned {
list_banned_api {
desc {
en: """List banned."""
zh: """列出黑名单"""
}
label {
en: """List Banned"""
zh: """列出黑名单"""
en: """List all currently banned client IDs, usernames and IP addresses."""
zh: """列出目前所有被封禁的客户端 ID、用户名和 IP 地址。"""
}
}
create_banned_api {
desc {
en: """Create banned."""
zh: """创建黑名单"""
en: """Add a client ID, username or IP address to the blacklist."""
zh: """添加一个客户端 ID、用户名或者 IP 地址到黑名单。"""
}
}
create_banned_api_response400 {
desc {
en: """Banned already existed, or bad args."""
zh: """黑名单已存在,或参数格式有错误"""
en: """Bad request, possibly due to wrong parameters or the existence of a banned object."""
zh: """错误的请求,可能是参数错误或封禁对象已存在等原因。"""
}
}
delete_banned_api {
desc {
en: """Delete banned"""
zh: """删除黑名单"""
en: """Remove a client ID, username or IP address from the blacklist."""
zh: """将一个客户端 ID、用户名或者 IP 地址从黑名单中删除。"""
}
}
delete_banned_api_response404 {
desc {
en: """Banned not found. May be the banned time has been exceeded"""
zh: """黑名单未找到,可能为已经超期失效"""
}
}
create_banned {
desc {
en: """List banned."""
zh: """列出黑名单"""
}
label {
en: """List Banned"""
zh: """列出黑名单"""
en: """The banned object was not found in the blacklist."""
zh: """未在黑名单中找到该封禁对象。"""
}
}
as {
desc {
en: """Banned type clientid, username, peerhost"""
zh: """黑名单类型,可选 clientid、username、peerhost"""
en: """Ban method, which can be client ID, username or IP address."""
zh: """封禁方式,可以通过客户端 ID、用户名或者 IP 地址等方式进行封禁。"""
}
label {
en: """Banned Type"""
zh: """黑名单类型"""
en: """Ban Method"""
zh: """封禁方式"""
}
}
who {
desc {
en: """Client info as banned type"""
zh: """设备信息"""
en: """Ban object, specific client ID, username or IP address."""
zh: """封禁对象,具体的客户端 ID、用户名或者 IP 地址。"""
}
label {
en: """Banned Info"""
zh: """黑名单信息"""
en: """Ban Object"""
zh: """封禁对象"""
}
}
by {
desc {
en: """Commander"""
zh: """黑名单创建者"""
en: """Initiator of the ban."""
zh: """封禁的发起者。"""
}
label {
en: """Commander"""
zh: """黑名单创建者"""
en: """Ban Initiator"""
zh: """封禁发起者"""
}
}
reason {
desc {
en: """Banned reason"""
zh: """黑名单创建原因"""
en: """Banned reason, record the reason why the current object was banned."""
zh: """封禁原因,记录当前对象被封禁的原因。"""
}
label {
en: """Reason"""
zh: """原因"""
en: """Banned Reason"""
zh: """封禁原因"""
}
}
at {
desc {
en: """Create banned time, rfc3339, now if not specified"""
zh: """黑名单创建时间,默认为当前"""
en: """The start time of the ban, the format is rfc3339, the default is the time when the operation was initiated."""
zh: """封禁的起始时间,格式为 rfc3339默认为发起操作的时间。"""
}
label {
en: """Create banned time"""
zh: """黑名单创建时间"""
en: """Ban Time"""
zh: """封禁时间"""
}
}
until {
desc {
en: """Cancel banned time, rfc3339, now + 5 minute if not specified"""
zh: """黑名单结束时间,默认为创建时间 + 5 分钟"""
en: """The end time of the ban, the formula is rfc3339, the default is the time when the operation was initiated + 5 minutes."""
zh: """封禁的结束时间,式为 rfc3339默认为发起操作的时间 + 5 分钟。"""
}
label {
en: """Cancel banned time"""
zh: """黑名单结束时间"""
en: """Ban End Time"""
zh: """封禁结束时间"""
}
}
}