Skip to content

Commit a78583a

Browse files
committed
Merge remote-tracking branch 'origin/enterprise-2.2.x' into enterprise
2 parents 7548961 + 5b1dc3f commit a78583a

27 files changed

Lines changed: 786 additions & 299 deletions

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"dependencies": {
2020
"@element-plus/icons-vue": "^1.1.0",
2121
"@emqx/shared-ui-components": "~0.0.17",
22-
"@emqx/shared-ui-constants": "~0.0.10",
23-
"@emqx/shared-ui-i18n": "~0.0.74",
24-
"@emqx/shared-ui-utils": "~0.0.25",
22+
"@emqx/shared-ui-constants": "~0.0.11",
23+
"@emqx/shared-ui-i18n": "~0.0.78",
24+
"@emqx/shared-ui-utils": "~0.0.26",
2525
"@highlightjs/vue-plugin": "^2.1.0",
2626
"@vue-flow/core": "^1.20.1",
2727
"ajv": "^8.17.1",

pnpm-lock.yaml

Lines changed: 25 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api/tlsManagement.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export const getGlobalCertBundleInfo = (name: string): Promise<CertBundleInfo> =
2323

2424
export const deleteGlobalCertBundle = (
2525
name: string,
26-
options?: { kind?: CertKind; forceDelete?: boolean },
26+
options?: { kind?: CertKind },
2727
): Promise<void> => {
28-
const { kind, forceDelete } = options ?? {}
28+
const { kind } = options ?? {}
2929
return http.delete(`/certs/global/name/${encodeURIComponent(name)}`, {
30-
params: { kind, ...(forceDelete ? { force_delete: true } : {}) },
30+
params: { kind },
3131
errorsHandleCustom: CERT_CUSTOM_ERRORS,
3232
})
3333
}
@@ -57,13 +57,13 @@ export const getNamespaceCertBundleInfo = (
5757
export const deleteNamespaceCertBundle = (
5858
namespace: string,
5959
name: string,
60-
options?: { kind?: CertKind; forceDelete?: boolean },
60+
options?: { kind?: CertKind },
6161
): Promise<void> => {
62-
const { kind, forceDelete } = options ?? {}
62+
const { kind } = options ?? {}
6363
return http.delete(
6464
`/certs/ns/${encodeURIComponent(namespace)}/name/${encodeURIComponent(name)}`,
6565
{
66-
params: { kind, ...(forceDelete ? { force_delete: true } : {}) },
66+
params: { kind },
6767
errorsHandleCustom: CERT_CUSTOM_ERRORS,
6868
},
6969
)

src/common/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ export const SEARCH_FORM_RES_PROPS = { sm: 12, md: 12, lg: 6 }
360360
const defaultUnexposedConfig = {
361361
zone: 'default',
362362
access_rules: ['allow all'],
363+
allow_log_packet_data_from: '',
363364
enable_authn: true,
364365
}
365366

src/common/scopes.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
import type { DashboardScopes, UnsetScopes } from '@/types/systemModule'
22

33
export const UNSET_SCOPES: UnsetScopes = 'unset'
4-
export const LEGACY_UNSET_SCOPES = UNSET_SCOPES
54

65
export const isUnsetScopes = (scopes: unknown): scopes is UnsetScopes => scopes === UNSET_SCOPES
76

8-
export const isLegacyUnsetScopes = isUnsetScopes
9-
107
export const normalizeScopes = (scopes: DashboardScopes): string[] | undefined =>
118
Array.isArray(scopes) ? scopes : undefined
129

1310
export const hasSelectedScopes = (scopes: DashboardScopes): scopes is string[] =>
1411
Array.isArray(scopes) && scopes.length > 0
15-
16-
export const sanitizeScopesForSubmit = <T extends { scopes?: DashboardScopes }>(data: T): T => {
17-
if (!Array.isArray(data.scopes) || data.scopes.length === 0) {
18-
delete data.scopes
19-
}
20-
return data
21-
}

src/components/TLSConfig/CertBundleDrawer.vue

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
v-model="isInUseDialogShow"
3333
:referencing-configs="certInUseError?.referencingConfigs"
3434
is-cert-file
35-
@force-delete="handleForceDelete"
3635
/>
3736
</template>
3837

@@ -147,7 +146,7 @@ const isSubmitting = ref(false)
147146
const isInUseDialogShow = ref(false)
148147
const certInUseError = ref<CertInUseError | null>(null)
149148
150-
const { submitCertBundle, removeUselessCerts, forceRemoveCerts } = useCertBundle()
149+
const { submitCertBundle, removeUselessCerts } = useCertBundle()
151150
152151
const finishSubmit = () => {
153152
const message = isEditing.value ? t('Base.updateSuccess') : t('Base.createSuccess')
@@ -165,7 +164,7 @@ const submit = async () => {
165164
try {
166165
await removeUselessCerts(formData.value, initialFormData)
167166
} catch (removeError: any) {
168-
if (removeError?.failedKinds) {
167+
if (removeError?.referencingConfigs) {
169168
certInUseError.value = removeError
170169
isInUseDialogShow.value = true
171170
return
@@ -180,16 +179,4 @@ const submit = async () => {
180179
isSubmitting.value = false
181180
}
182181
}
183-
184-
const handleForceDelete = async () => {
185-
if (!certInUseError.value) {
186-
return
187-
}
188-
try {
189-
await forceRemoveCerts(formData.value, certInUseError.value.failedKinds)
190-
finishSubmit()
191-
} catch (error) {
192-
//
193-
}
194-
}
195182
</script>

src/components/TLSConfig/CertBundleForm.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,20 @@
3737
<template v-if="confMethod === CertBundleType.Regular">
3838
<el-form-item prop="chain" label="TLS Cert">
3939
<CertFileInput
40-
class="TLS-input"
4140
v-model="record.chain"
4241
:is-edit="isEditing"
4342
:placeholder="t('Base.certPlaceholder')"
4443
/>
4544
</el-form-item>
4645
<el-form-item prop="key" label="TLS Key">
4746
<CertFileInput
48-
class="TLS-input"
4947
v-model="record.key"
5048
:is-edit="isEditing"
5149
:placeholder="t('Base.keyFilePlaceholder')"
5250
/>
5351
</el-form-item>
5452
<el-form-item prop="key_password" :label="t('Base.keyPassword')">
5553
<CertFileInput
56-
class="TLS-input"
5754
v-model="record.key_password"
5855
:is-edit="isEditing"
5956
:placeholder="t('Base.keyFilePlaceholder')"
@@ -72,7 +69,6 @@
7269

7370
<el-form-item v-else prop="acc_key" :label="t('Base.acmeKey')">
7471
<CertFileInput
75-
class="TLS-input"
7672
v-model="record.acc_key"
7773
:is-edit="isEditing"
7874
:accept="`${CER_FILE_ACCEPTS},.json`"
@@ -81,7 +77,6 @@
8177

8278
<el-form-item prop="ca" label="CA Cert">
8379
<CertFileInput
84-
class="TLS-input"
8580
v-model="record.ca"
8681
:is-edit="isEditing"
8782
:placeholder="t('Base.certPlaceholder')"

src/components/TLSConfig/CertBundleInUseDialog.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
</ul>
3030
<template #footer>
3131
<CancelButton @click="isVisible = false" />
32-
<el-button type="danger" @click="handleForceDelete">
33-
{{ tl('forceDelete') }}
34-
</el-button>
3532
</template>
3633
</el-dialog>
3734
</template>
@@ -58,7 +55,6 @@ const props = defineProps<{
5855
5956
const emit = defineEmits<{
6057
(e: 'update:modelValue', value: boolean): void
61-
(e: 'forceDelete'): void
6258
}>()
6359
6460
const { tl } = useI18nTl('BasicConfig')
@@ -196,11 +192,6 @@ const moduleGroups = computed((): RefGroup[] => {
196192
},
197193
)
198194
})
199-
200-
const handleForceDelete = () => {
201-
isVisible.value = false
202-
emit('forceDelete')
203-
}
204195
</script>
205196

206197
<style lang="scss">

src/hooks/Rule/bridge/useSchemaBridgePropsLayout.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export default (
7878
'required_acks',
7979
'partition_count_refresh_interval',
8080
'max_inflight',
81+
'max_batch_age',
82+
'max_retries',
83+
'reconnect_delay',
8184
'query_mode',
8285
'sync_query_timeout',
8386
'buffer',
@@ -383,7 +386,7 @@ export default (
383386
fieldStartIndex,
384387
),
385388
[BridgeType.BigQuery]: createOrderObj(
386-
getPathArrInParameters(['dataset', 'table']),
389+
getPathArrInParameters(['project_id', 'dataset', 'table']),
387390
fieldStartIndex,
388391
),
389392
[BridgeType.Bigtable]: createOrderObj(

src/hooks/Rule/connector/useSchemaConnectorPropsLayout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default (
6565
'allow_auto_topic_creation',
6666
'min_metadata_refresh_interval',
6767
'metadata_request_timeout',
68+
'request_timeout',
6869
'socket_opts.sndbuf',
6970
'socket_opts.recbuf',
7071
'socket_opts.tcp_keepalive',

0 commit comments

Comments
 (0)