Skip to content

Commit

Permalink
Sync code from refs/heads/dev/1.9.1 to enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Jun 25, 2024
2 parents 6e2f7e3 + 59db1e5 commit 0a90f00
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/common/docLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const createDocLinks = (lang: string): DocMap => {
applyLicense: `https://www.emqx.com/${lang}/apply-licenses/emqx?${QUERY_FOR_LICENSE}`,
moreAboutMqtt: `https://www.emqx.com/${lang}/blog/category/mqtt?${QUERY_FOR_HELP}`,
contactUs: `https://www.emqx.com/${lang}/contact?${QUERY_FOR_HELP}`,
datadogIntegration: `https://docs.datadoghq.com/integrations/emqx/`,
datadogIntegration: `https://docs.emqx.com/${lang}/enterprise/${EMQX_VERSION}/observability/datadog.html`,
feedback: lang === 'zh' ? 'https://askemq.com/c/emqx/5' : 'https://www.emqx.io/forum/c/emqx/5',
learnConfig: `https://docs.emqx.com/${lang}/enterprise/${EMQX_VERSION}/configuration/configuration.html?${QUERY_FOR_HELP}`,
restAPI: `https://docs.emqx.com/${lang}/enterprise/${EMQX_VERSION}/admin/api.html?${QUERY_FOR_HELP}`,
Expand Down
24 changes: 15 additions & 9 deletions src/hooks/Schema/useSchemaFormRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,21 @@ export default (): {
ruleMap[pathToSet] = [
{
validator: (rule, value, callback) => {
const msNum = transTimeStrToMS(value)
const min = minimum ? transTimeStrToMS(minimum as string) : undefined
const max = maximum ? transTimeStrToMS(maximum as string) : undefined
if (typeof msNum === 'number') {
if (!isUndefined(min) && !isString(min) && msNum < min) {
return callback(new Error(tl('durationMinimumError', { min: minimum as string })))
}
if (!isUndefined(max) && !isString(max) && msNum > max) {
return callback(new Error(tl('durationMaximumError', { max: maximum as string })))
if (!isUndefined(value)) {
const msNum = transTimeStrToMS(value)
const min = minimum ? transTimeStrToMS(minimum as string) : undefined
const max = maximum ? transTimeStrToMS(maximum as string) : undefined
if (typeof msNum === 'number') {
if (!isUndefined(min) && !isString(min) && msNum < min) {
return callback(
new Error(tl('durationMinimumError', { min: minimum as string })),
)
}
if (!isUndefined(max) && !isString(max) && msNum > max) {
return callback(
new Error(tl('durationMaximumError', { max: maximum as string })),
)
}
}
}
callback()
Expand Down
16 changes: 8 additions & 8 deletions src/i18n/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ export default {
},
messageOut: {
zh: '消息接收',
en: 'Receiving Messages',
en: 'Received Messages',
},
currentMessageOutRate: {
zh: '消息接收速率:',
en: 'Incoming Rate:',
en: 'Receiving Rate:',
},
messageIn: {
zh: '消息发布',
en: 'Publishing Messages',
en: 'Published Messages',
},
currentMessageInRate: {
zh: '消息发布速率:',
Expand Down Expand Up @@ -503,7 +503,7 @@ export default {
en: 'Number of client authorization passes',
},
authorization_deny: {
zh: '总的拒绝授权次数(包括命中缓存,和规则未匹配时默认通过的)',
zh: '总的拒绝授权次数(包括命中缓存,和规则未匹配时默认拒绝的)',
en: 'Number of client authorization failures',
},
authorization_matched_allow: {
Expand Down Expand Up @@ -554,8 +554,8 @@ export default {
en: 'Number of messages dropped due to no subscribers',
},
messages_dropped_await_pubrel_timeout: {
zh: '由于等待 PUBREL 报文超时',
en: 'Number of messages dropped due to await PUBREL timeout',
zh: '由于等待 PUBREL 报文超时而被丢弃的消息数量',
en: 'Number of messages dropped due to timeout waiting for PUBREL message',
},
messages_forward: {
zh: '向其他节点转发的消息数量',
Expand Down Expand Up @@ -732,8 +732,8 @@ export default {
en: 'Number of received PUBCOMP messages with occupied identifiers',
},
packets_pubcomp_missed: {
zh: '发送的 PUBCOMP 报文数量',
en: 'Number of missed PUBCOMP packets',
zh: '接收的未知报文标识符 PUBCOMP 报文数量',
en: 'Number of received PUBCOMP messages with unknown identifiers',
},
packets_subscribe_received: {
zh: '接收的 SUBSCRIBE 报文数量',
Expand Down

0 comments on commit 0a90f00

Please sign in to comment.