Browse Source

feat(nc-gui): revise call log display logic

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
505c8f84d7
  1. 11
      packages/nc-gui/components/webhook/CallLog.vue

11
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 () => {
if (showLogs.value) {
await loadHookLogs(currentPage, currentLimit)
}
})
</script>
@ -53,14 +59,18 @@ onBeforeMount(async () => {
The NC_AUTOMATION_LOG_LEVEL is set to ERROR, only error logs will be displayed.
</span>
<span v-if="appInfo.automationLogLevel === 'ALL'">
<span v-if="appInfo.ee">
The NC_AUTOMATION_LOG_LEVEL is set to ALL, both error and success logs will be displayed.
</span>
<span v-else> Upgrade to Enterprise Edition to show all the logs. </span>
</span>
<span>
<!-- TODO: update the link -->
For additional configuration options, please refer the documentation <a href="#" target="_blank">here</a>.
</span>
</a-card>
<div v-if="showLogs">
<a-empty v-if="!hookLogs.length" />
<a-layout v-else>
<a-layout-content>
@ -134,6 +144,7 @@ onBeforeMount(async () => {
</a-layout-footer>
</a-layout>
</div>
</div>
</template>
<style scoped lang="scss">

Loading…
Cancel
Save