From e48aec12f58295daf7118d0b691a5d21e43b2d7b Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Thu, 26 Sep 2024 09:54:51 -0700 Subject: [PATCH] feat: shows first 1000 records now --- assets/components/LogViewer/LogAnalytics.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/components/LogViewer/LogAnalytics.vue b/assets/components/LogViewer/LogAnalytics.vue index 5ff498ec..97014d7f 100644 --- a/assets/components/LogViewer/LogAnalytics.vue +++ b/assets/components/LogViewer/LogAnalytics.vue @@ -15,7 +15,10 @@ >
{{ error }} - Total {{ results.numRows }} records + + Total {{ results.numRows }} records +
@@ -58,6 +61,7 @@ const query = ref("SELECT * FROM logs"); const error = ref(null); const debouncedQuery = debouncedRef(query, 500); const evaluating = ref(false); +const pageLimit = 1000; const url = withBase( `/api/hosts/${container.host}/containers/${container.id}/logs?stdout=1&stderr=1&everything&jsonOnly`, @@ -118,6 +122,6 @@ whenever(evaluating, () => { const columns = computed(() => results.value.numRows > 0 ? Object.keys(results.value.get(0) as Record) : [], ); -const page = computed(() => (results.value.numRows > 0 ? results.value.slice(0, 20) : [])); +const page = computed(() => (results.value.numRows > 0 ? results.value.slice(0, pageLimit) : []));