From 505c8f84d7e0106eb443047cc766ffc20aebc791 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 30 Mar 2023 14:28:47 +0800 Subject: [PATCH] feat(nc-gui): revise call log display logic --- .../nc-gui/components/webhook/CallLog.vue | 141 ++++++++++-------- 1 file changed, 76 insertions(+), 65 deletions(-) diff --git a/packages/nc-gui/components/webhook/CallLog.vue b/packages/nc-gui/components/webhook/CallLog.vue index b4779f2812..d8a4c97153 100644 --- a/packages/nc-gui/components/webhook/CallLog.vue +++ b/packages/nc-gui/components/webhook/CallLog.vue @@ -22,6 +22,10 @@ const currentPage = $ref(1) const currentLimit = $ref(10) +const showLogs = computed( + () => !(appInfo.value.automationLogLevel === 'OFF' || (appInfo.value.automationLogLevel === 'ALL' && !appInfo.value.ee)), +) + async function loadHookLogs(page = currentPage, limit = currentLimit) { try { // cater empty records @@ -38,7 +42,9 @@ async function loadHookLogs(page = currentPage, limit = currentLimit) { } onBeforeMount(async () => { - await loadHookLogs(currentPage, currentLimit) + if (showLogs.value) { + await loadHookLogs(currentPage, currentLimit) + } }) @@ -53,7 +59,10 @@ onBeforeMount(async () => { The NC_AUTOMATION_LOG_LEVEL is set to “ERROR”, only error logs will be displayed. - The NC_AUTOMATION_LOG_LEVEL is set to “ALL”, both error and success logs will be displayed. + + The NC_AUTOMATION_LOG_LEVEL is set to “ALL”, both error and success logs will be displayed. + + Upgrade to Enterprise Edition to show all the logs. @@ -61,78 +70,80 @@ onBeforeMount(async () => { - - - - - - -
-
-
Request
-
{{ parseProp(hookLog.response).config.headers }}
-
+
+
+
Request
+
{{ parseProp(hookLog.response).config.headers }}
+
-
-
Response
-
{{ parseProp(hookLog.response).headers }}
-
+
+
Response
+
{{ parseProp(hookLog.response).headers }}
+
-
-
Payload
-
{{ parseProp(parseProp(hookLog.response).config.data) }}
+
+
Payload
+
{{ parseProp(parseProp(hookLog.response).config.data) }}
+
-
-
-
- {{ hookLog.error_message }} -
-
-
Payload
-
{{ parseProp(hookLog.payload) }}
+
+
+ {{ hookLog.error_message }} +
+
+
Payload
+
{{ parseProp(hookLog.payload) }}
+
-
- - - - - - - + + + + + + + +