diff --git a/packages/nc-gui/components/webhook/CallLog.vue b/packages/nc-gui/components/webhook/CallLog.vue index 1fdf3c0a43..fd1aaa540a 100644 --- a/packages/nc-gui/components/webhook/CallLog.vue +++ b/packages/nc-gui/components/webhook/CallLog.vue @@ -38,13 +38,31 @@ async function loadHookLogs(page = currentPage, limit = currentLimit) { offset: limit * (page - 1), limit, }) - hookLogs.value = list + hookLogs.value = parseHookLog(list) totalRows = pageInfo.totalRows ?? 0 } catch (e: any) { message.error(await extractSdkResponseErrorMsg(e)) } } +function parseHookLog(hookLogs: any) { + for (const hookLog of hookLogs) { + if (hookLog?.response) { + hookLog.response = parseProp(hookLog.response) + } + if (hookLog?.response?.config?.data) { + hookLog.response.config.data = parseProp(hookLog.response.config.data) + } + if (hookLog?.payload) { + hookLog.payload = parseProp(hookLog.payload) + } + if (hookLog?.notification) { + hookLog.notification = parseProp(hookLog.notification) + } + } + return hookLogs +} + onBeforeMount(async () => { if (showLogs.value) { await loadHookLogs(currentPage, currentLimit) @@ -86,52 +104,53 @@ onBeforeMount(async () => {
{{ parseProp(hookLog.response).config.headers }}+
{{ hookLog.response.config.headers }}
{{ parseProp(hookLog.response).headers }}+
{{ hookLog.response.headers }}
{{ parseProp(parseProp(hookLog.response).config.data) }}+
{{ hookLog.response.config.data }}
{{ parseProp(hookLog.payload) }}+
{{ hookLog.payload }}