File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
assets/components/LogViewer Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1515 ></textarea >
1616 <div class =" label" >
1717 <span class =" label-text-alt text-error" v-if =" error" >{{ error }}</span >
18- <span class =" label-text-alt" v-else >Total {{ results.numRows }} records</span >
18+ <span class =" label-text-alt" v-else >
19+ Total {{ results.numRows }} records
20+ <template v-if =" results .numRows > pageLimit " >. Showing first {{ page.numRows }}.</template ></span
21+ >
1922 </div >
2023 </label >
2124 </section >
@@ -58,6 +61,7 @@ const query = ref("SELECT * FROM logs");
5861const error = ref <string | null >(null );
5962const debouncedQuery = debouncedRef (query , 500 );
6063const evaluating = ref (false );
64+ const pageLimit = 1000 ;
6165
6266const url = withBase (
6367 ` /api/hosts/${container .host }/containers/${container .id }/logs?stdout=1&stderr=1&everything&jsonOnly ` ,
@@ -118,6 +122,6 @@ whenever(evaluating, () => {
118122const columns = computed (() =>
119123 results .value .numRows > 0 ? Object .keys (results .value .get (0 ) as Record <string , any >) : [],
120124);
121- const page = computed (() => (results .value .numRows > 0 ? results .value .slice (0 , 20 ) : []));
125+ const page = computed (() => (results .value .numRows > 0 ? results .value .slice (0 , pageLimit ) : []));
122126 </script >
123127<style lang="postcss" scoped></style >
You can’t perform that action at this time.
0 commit comments