mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 13:15:24 +00:00
fix pagination
This commit is contained in:
parent
0b27ff7aa2
commit
10fd4d1d8e
@ -378,7 +378,10 @@ function searchDashboards(pageIndex?: any) {
|
||||
const arr = list.filter((d: { name: string }) =>
|
||||
d.name.includes(searchText.value)
|
||||
);
|
||||
dashboards.value = arr.splice(pageIndex || 0, pageSize);
|
||||
dashboards.value = arr.splice(
|
||||
(pageIndex - 1 || 0) * pageSize,
|
||||
pageSize * (pageIndex || 1)
|
||||
);
|
||||
}
|
||||
|
||||
function reloadTemplates() {
|
||||
|
@ -174,7 +174,10 @@ function clickEndpoint(scope: any) {
|
||||
);
|
||||
}
|
||||
function changePage(pageIndex: number) {
|
||||
endpoints.value = searchEndpoints.value.splice(pageIndex - 1, pageSize);
|
||||
endpoints.value = searchEndpoints.value.splice(
|
||||
(pageIndex - 1 || 0) * pageSize,
|
||||
pageSize * (pageIndex || 1)
|
||||
);
|
||||
}
|
||||
function searchList() {
|
||||
const currentEndpoints = selectorStore.pods.filter((d: { label: string }) =>
|
||||
|
@ -180,7 +180,10 @@ function clickInstance(scope: any) {
|
||||
}
|
||||
|
||||
function changePage(pageIndex: number) {
|
||||
instances.value = searchInstances.value.splice(pageIndex - 1, pageSize);
|
||||
instances.value = searchInstances.value.splice(
|
||||
(pageIndex - 1 || 0) * pageSize,
|
||||
pageSize * (pageIndex || 1)
|
||||
);
|
||||
}
|
||||
|
||||
function searchList() {
|
||||
|
@ -226,7 +226,10 @@ function objectSpanMethod(param: any): any {
|
||||
}
|
||||
}
|
||||
function changePage(pageIndex: number) {
|
||||
services.value = selectorStore.services.splice(pageIndex - 1, pageSize);
|
||||
services.value = services.value.splice(
|
||||
(pageIndex - 1 || 0) * pageSize,
|
||||
pageSize * (pageIndex || 1)
|
||||
);
|
||||
}
|
||||
function searchList() {
|
||||
searchServices.value = selectorStore.services.filter((d: { label: string }) =>
|
||||
|
Loading…
Reference in New Issue
Block a user