mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 08:55:22 +00:00
update pages
This commit is contained in:
parent
9b8a939e62
commit
cda73845bb
@ -65,17 +65,6 @@ limitations under the License. -->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
background
|
||||
small
|
||||
layout="prev, pager, next"
|
||||
:page-size="pageSize"
|
||||
:total="selectorStore.pods.length"
|
||||
@current-change="changePage"
|
||||
@prev-click="changePage"
|
||||
@next-click="changePage"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@ -117,7 +106,6 @@ const selectorStore = useSelectorStore();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const chartLoading = ref<boolean>(false);
|
||||
const endpoints = ref<Endpoint[]>([]);
|
||||
const pageSize = 10;
|
||||
const searchText = ref<string>("");
|
||||
|
||||
queryEndpoints();
|
||||
@ -133,9 +121,7 @@ async function queryEndpoints() {
|
||||
ElMessage.error(resp.errors);
|
||||
return;
|
||||
}
|
||||
endpoints.value = selectorStore.pods.filter(
|
||||
(d: unknown, index: number) => index < pageSize
|
||||
);
|
||||
endpoints.value = selectorStore.pods;
|
||||
queryEndpointMetrics(endpoints.value);
|
||||
}
|
||||
async function queryEndpointMetrics(currentPods: Endpoint[]) {
|
||||
@ -180,14 +166,6 @@ function clickEndpoint(scope: any) {
|
||||
`/dashboard/${d.layer}/${d.entity}/${selectorStore.currentService.id}/${scope.row.id}/${d.name}`
|
||||
);
|
||||
}
|
||||
function changePage(pageIndex: number) {
|
||||
endpoints.value = selectorStore.pods.filter((d: unknown, index: number) => {
|
||||
if (index >= (pageIndex - 1) * pageSize && index < pageIndex * pageSize) {
|
||||
return d;
|
||||
}
|
||||
});
|
||||
queryEndpointMetrics(endpoints.value);
|
||||
}
|
||||
async function searchList() {
|
||||
await queryEndpoints();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user