From f585799baccc3c8c3627cb29f078d9834e2ca154 Mon Sep 17 00:00:00 2001 From: Tian Tan Date: Mon, 16 Jun 2025 13:39:14 +0800 Subject: [PATCH 1/2] chore: expand partials when schema supports it --- .../entities-plugins/src/components/PluginConfigCard.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/entities/entities-plugins/src/components/PluginConfigCard.vue b/packages/entities/entities-plugins/src/components/PluginConfigCard.vue index db57bf5c2b..326285e6de 100644 --- a/packages/entities/entities-plugins/src/components/PluginConfigCard.vue +++ b/packages/entities/entities-plugins/src/components/PluginConfigCard.vue @@ -225,7 +225,7 @@ const props = defineProps({ /** Whether to expand partial in config */ expandPartial: { type: Boolean, - default: true, + default: false, }, }) @@ -233,12 +233,15 @@ const { i18n: { t } } = composables.useI18n() const pluginMetaData = composables.usePluginMetaData() const { setFieldType } = composables.usePluginHelpers() const { getPropValue } = useHelpers() - +// only expand partials if the schema supports it or if the expandPartial prop is set to true +const supportPartials = computed(() => { + return schema.value?.support_partials?.length || props.expandPartial +}) const fetchUrl = computed( () => endpoints.item[props.config.app]?.[props.scopedEntityType ? 'forEntity' : 'all'] .replace(/{entityType}/gi, props.scopedEntityType) .replace(/{entityId}/gi, props.scopedEntityId) - .concat(props.expandPartial ? '?expand_partials=true' : ''), + .concat(supportPartials.value ? '?expand_partials=true' : ''), ) // schema for the basic properties From c6dbf911b8ea7c1a595bb8ce81585fc79da8fbc3 Mon Sep 17 00:00:00 2001 From: Tian Tan Date: Mon, 16 Jun 2025 17:41:20 +0800 Subject: [PATCH 2/2] fix: more precise redis detection --- .../entities-plugins/src/components/PluginConfigCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/entities/entities-plugins/src/components/PluginConfigCard.vue b/packages/entities/entities-plugins/src/components/PluginConfigCard.vue index 326285e6de..fafc24cec9 100644 --- a/packages/entities/entities-plugins/src/components/PluginConfigCard.vue +++ b/packages/entities/entities-plugins/src/components/PluginConfigCard.vue @@ -235,7 +235,7 @@ const { setFieldType } = composables.usePluginHelpers() const { getPropValue } = useHelpers() // only expand partials if the schema supports it or if the expandPartial prop is set to true const supportPartials = computed(() => { - return schema.value?.support_partials?.length || props.expandPartial + return Object.keys(schema.value?.supported_partials || {}).some(key => key === 'redis-ce' || key === 'redis-ee') || props.expandPartial }) const fetchUrl = computed( () => endpoints.item[props.config.app]?.[props.scopedEntityType ? 'forEntity' : 'all']