diff --git a/ui/src/views/application/ApplicationSetting.vue b/ui/src/views/application/ApplicationSetting.vue index 8dafcf5bc18..6bc9cc46857 100644 --- a/ui/src/views/application/ApplicationSetting.vue +++ b/ui/src/views/application/ApplicationSetting.vue @@ -958,7 +958,7 @@ const ttsModelOptions = ref(null) const triggerDrawerRef = ref>() const openCreateTriggerDrawer = () => { - triggerDrawerRef.value?.open() + triggerDrawerRef.value?.open(undefined, 'APPLICATION', id) } const openEditTriggerDrawer = (trigger: any) => { triggerDrawerRef.value?.open(trigger.id) diff --git a/ui/src/views/trigger/component/TriggerDrawer.vue b/ui/src/views/trigger/component/TriggerDrawer.vue index 13a624eb1c9..9f6c7862266 100644 --- a/ui/src/views/trigger/component/TriggerDrawer.vue +++ b/ui/src/views/trigger/component/TriggerDrawer.vue @@ -601,13 +601,21 @@ const init = (trigger_id: string) => { }) } const current_trigger_id = ref() -const open = (trigger_id?: string) => { +const open = (trigger_id?: string, source_type?: string, source_id?: string) => { is_edit.value = trigger_id ? true : false current_trigger_id.value = trigger_id drawer.value = true if (trigger_id) { init(trigger_id) } + if (source_type && source_id) { + if (source_type == 'APPLICATION') { + applicationRefresh({ application_ids: [source_id] }) + } + if (source_type == 'TOOL') { + toolRefresh({ tool_ids: [source_id] }) + } + } } const close = () => {