Skip to content

Commit

Permalink
Merge pull request #2903 from emqx/dev/1.10.0
Browse files Browse the repository at this point in the history
Sync code from refs/heads/dev/1.10.0 to enterprise
  • Loading branch information
Kinplemelon authored Aug 21, 2024
2 parents 7ad0f7b + 4794234 commit 09fcd0b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 13 deletions.
8 changes: 8 additions & 0 deletions src/components/ArrayEditor.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<p class="value" v-if="readonly">
{{ Array.isArray(modelValue) ? modelValue.join(', ') : modelValue }}
</p>
<el-select
v-else
class="array-editor"
v-model="selected"
multiple
Expand Down Expand Up @@ -36,6 +40,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
readonly: {
type: Boolean,
default: false,
},
})
const emit = defineEmits(['update:modelValue'])
Expand Down
10 changes: 9 additions & 1 deletion src/components/ListenerDrawer/ListenerDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,15 @@
<el-row :gutter="20" v-if="!gatewayName">
<el-col :span="24"><el-divider /></el-col>
<el-col :span="12">
<el-form-item :label="tl('showLimiter')"> </el-form-item>
<el-form-item>
<template #label>
<form-item-label
:label="tl('showLimiter')"
:desc="tl('showLimiterDesc')"
desc-marked
/>
</template>
</el-form-item>
</el-col>
<el-col :span="12" />
<el-col v-if="!typesWithoutMaxConnectionRate.includes(listenerRecord.type)" :span="12">
Expand Down
31 changes: 21 additions & 10 deletions src/components/SchemaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -676,17 +676,28 @@ const SchemaForm = defineComponent({
return ele
}
case 'oneof': {
const props = { modelValue, items: property.oneOf }
if (isComplexOneof(property)) {
return (
<OneofRefs
{...props}
property={property}
colSpan={getColSpan(property)}
getText={getText}
readonly
/>
)
const props = {
modelValue,
property,
getText,
items: property.oneOf,
readonly: true,
colSpan: getColSpan(property),
}
if (property.useNewCom) {
return (
<OneofRefsSelect
{...props}
key={property.path}
fieldValue={modelValue}
onChange={(selectedProperty: any) =>
handleSelectOneof(property, selectedProperty)
}
/>
)
}
return <OneofRefs {...props} />
}
return <p class="value">{modelValue}</p>
}
Expand Down
8 changes: 6 additions & 2 deletions src/i18n/Gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,12 @@ export default {
zh: '启用 CRL 检查',
},
showLimiter: {
zh: '速率限制(可选)',
en: 'Limiter (Optional)',
zh: '速率限制',
en: 'Limiter',
},
showLimiterDesc: {
zh: '速率限制为可选配置。默认空白值表示未开启限制。设置具体数值来启用限制,如需关闭已开启的限制,请将其值设为 `infinity。`',
en: 'Rate limiting is optional. Default empty values indicate that limits are not enabled. Set specific numeric values to enable limits, or set to `infinity` to disable enabled limits.',
},
customConfig: {
zh: '自定义配置',
Expand Down

0 comments on commit 09fcd0b

Please sign in to comment.