Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/src/views/application/ApplicationSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ const ttsModelOptions = ref<any>(null)
const triggerDrawerRef = ref<InstanceType<typeof TriggerDrawer>>()

const openCreateTriggerDrawer = () => {
triggerDrawerRef.value?.open()
triggerDrawerRef.value?.open(undefined, 'APPLICATION', id)
}
const openEditTriggerDrawer = (trigger: any) => {
triggerDrawerRef.value?.open(trigger.id)
Expand Down
10 changes: 9 additions & 1 deletion ui/src/views/trigger/component/TriggerDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,21 @@ const init = (trigger_id: string) => {
})
}
const current_trigger_id = ref<string>()
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 = () => {
Expand Down