Skip to content

Commit

Permalink
fix(client): incorrect connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinplemelon authored and ysfscream committed Nov 7, 2024
1 parent 580bfbe commit 2f66c47
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions src/views/Clients/Clients.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@
:current-page="page"
:hasnext="hasNext"
:page-size="limit"
:total="clientsCount"
:page-sizes="defaultPageSizeOpt"
:layout="paginationLayout"
@size-change="handleSizeChange"
Expand All @@ -177,7 +176,6 @@ export default defineComponent({

<script lang="ts" setup>
import { batchDisconnectClients, exactSearchClient, listClients } from '@/api/clients'
import { loadCurrentMetrics } from '@/api/common'
import {
SEARCH_FORM_RES_PROPS as colProps,
DEFAULT_PAGE_SIZE_OPT as defaultPageSizeOpt,
Expand Down Expand Up @@ -404,7 +402,6 @@ const loadNodeClients = async (isBack = false) => {
? await handleExactSearchClient(sendParams)
: await listClients(sendParams)
tableData.value = data
updateClientsCount()
setCursor(page.value + 1, meta.cursor)
updateParams({ page: page.value, ...pageParams.value, ...params.value })
updateCursorMap(routeName.value, cursorMap.value)
Expand Down Expand Up @@ -453,18 +450,18 @@ const getParamsFromQuery = () => {
}
const paginationLayout = computed(() => {
const withFilters = Object.entries(params.value).filter(([, value]) => !!value).length > 0
return `${withFilters ? '' : 'total, '}sizes, prev, next`
// const withFilters = Object.entries(params.value).filter(([, value]) => !!value).length > 0
return `sizes, prev, next`
})
const clientsCount = ref<number>(0)
const updateClientsCount = async () => {
try {
const { connections } = await loadCurrentMetrics()
clientsCount.value = connections
} catch (error) {
//
}
}
// const clientsCount = ref<number>(0)
// const updateClientsCount = async () => {
// try {
// const { connections } = await loadCurrentMetrics()
// clientsCount.value = connections
// } catch (error) {
// //
// }
// }
getParamsFromQuery()
loadNodeClients()
Expand Down

0 comments on commit 2f66c47

Please sign in to comment.