diff --git a/webapp/src/gql/producer.gql.js b/webapp/src/gql/producer.gql.js index ce9b6e6b..ebf71a03 100644 --- a/webapp/src/gql/producer.gql.js +++ b/webapp/src/gql/producer.gql.js @@ -37,7 +37,6 @@ export const NODES_QUERY = gql` $offset: Int = 0 $limit: Int = 21 $where: producer_bool_exp - $nodeFilter: node_bool_exp ) { info: producer_aggregate(where: $where) { producers: aggregate { @@ -57,7 +56,7 @@ export const NODES_QUERY = gql` total_votes_percent rank updated_at - nodes(where: $nodeFilter) { + nodes { info: endpoints_aggregate( where: { response: { _contains: { status: 200 } } } ) { diff --git a/webapp/src/hooks/customHooks/useNodeState.js b/webapp/src/hooks/customHooks/useNodeState.js index c4cfb0e4..49ef2c70 100644 --- a/webapp/src/hooks/customHooks/useNodeState.js +++ b/webapp/src/hooks/customHooks/useNodeState.js @@ -36,7 +36,6 @@ const useNodeState = () => { ...prev.where, nodes: nodesFilter, }, - nodeFilter: nodesFilter, })) }, [filters.name, setPagination]) @@ -47,7 +46,7 @@ const useNodeState = () => { if (!producer?.nodes?.length) return [] producer.nodes.sort((a, b) => { - return getOrderNode(a) < getOrderNode(b) + return getOrderNode(b) - getOrderNode(a) }) return producer.nodes.length diff --git a/webapp/src/hooks/customHooks/useSearchState.js b/webapp/src/hooks/customHooks/useSearchState.js index f169e47e..88955a7b 100644 --- a/webapp/src/hooks/customHooks/useSearchState.js +++ b/webapp/src/hooks/customHooks/useSearchState.js @@ -42,7 +42,6 @@ const useSearchState = ({ query, ...options }) => { where: pagination.where, offset: (pagination.page - 1) * pagination.limit, limit: pagination.limit, - nodeFilter: pagination.nodeFilter, endpointFilter: pagination.endpointFilter, }, }) @@ -52,7 +51,6 @@ const useSearchState = ({ query, ...options }) => { pagination.page, pagination.limit, pagination.offset, - pagination.nodeFilter, pagination.endpointFilter ])