You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "Fine0830 (via GitHub)" <gi...@apache.org> on 2026/01/05 09:50:56 UTC
[PR] fix: correct logic for the log pagination [skywalking-booster-ui]
Fine0830 opened a new pull request, #515:
URL: https://github.com/apache/skywalking-booster-ui/pull/515
Fixes https://github.com/apache/skywalking/issues/13646
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: correct logic for the log pagination [skywalking-booster-ui]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #515:
URL: https://github.com/apache/skywalking-booster-ui/pull/515#discussion_r2660911462
##########
src/views/dashboard/related/log/List.vue:
##########
@@ -54,11 +54,14 @@ limitations under the License. -->
const logStore = useLogStore();
const dashboardStore = useDashboardStore();
const type = ref<string>(dashboardStore.layerId === "BROWSER" ? "browser" : "service");
- const pageSize = ref<number>(15);
+ const pageSize = ref<number>(PageSizeDefault);
const total = computed(() =>
- logStore.logs.length === pageSize.value
- ? pageSize.value * logStore.conditions.paging.pageNum + 1
- : pageSize.value * logStore.conditions.paging.pageNum,
+ logStore.logs.length < pageSize.value
+ ? pageSize.value * logStore.conditions.paging.pageNum
+ : pageSize.value * logStore.conditions.paging.pageNum + 1,
+ );
+ const displayLogs = computed(() =>
+ logStore.logs.length === pageSize.value ? logStore.logs.slice(0, pageSize.value) : logStore.logs,
);
Review Comment:
The displayLogs computed property has redundant logic. When logStore.logs.length equals pageSize.value, it slices the array to pageSize.value, which produces the same result as returning the array directly. The slice operation in this condition serves no purpose and adds unnecessary computation.
```suggestion
const displayLogs = computed(() => logStore.logs);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: correct logic for the log pagination [skywalking-booster-ui]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #515:
URL: https://github.com/apache/skywalking-booster-ui/pull/515
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org