Skip to content

Commit

Permalink
refresh some more tables on the dashboard when you manager your valid… (
Browse files Browse the repository at this point in the history
#386)

* refresh some more tables on the dashboard when you manager your validators

* reset validator management query, fix proposer formatting

* Hide thousan separators for validator indexes

---------

Co-authored-by: D13ce <[email protected]>
  • Loading branch information
MauserBitfly and D13ce authored Jun 6, 2024
1 parent f5d6b9b commit a8d665d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion frontend/components/dashboard/ValidatorManagementModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ const selectedValidator = ref<string>('')
const { addEntities, removeEntities, dashboardKey, isPublic } = useDashboardKey()
const { isLoggedIn, user } = useUserStore()
const { value: query, temp: tempQuery, bounce: setQuery } = useDebounceValue<PathValues | undefined>({ limit: pageSize.value, sort: 'index:asc' }, 500)
const initialQuery = { limit: pageSize.value, sort: 'index:asc' }
const { value: query, temp: tempQuery, bounce: setQuery, instant: instantQuery } = useDebounceValue<PathValues | undefined>(initialQuery, 500)
const data = ref<InternalGetValidatorDashboardValidatorsResponse | undefined>()
const selected = ref<VDBManageValidatorsTableRow[]>()
Expand All @@ -56,6 +58,7 @@ const resetData = () => {
selected.value = []
selectedGroup.value = -1
cursor.value = undefined
instantQuery(initialQuery)
}
const onClose = () => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/components/dashboard/table/DashboardTableBlocks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { blocks, query: lastQuery, isLoading, getBlocks } = useValidatorDashboard
const { value: query, temp: tempQuery, bounce: setQuery } = useDebounceValue<TableQueryParams | undefined>(undefined, 500)
const { groups } = useValidatorDashboardGroups()
const { hasValidators } = useValidatorDashboardOverviewStore()
const { hasValidators, overview } = useValidatorDashboardOverviewStore()
const { width } = useWindowSize()
const colsVisible = computed(() => {
Expand All @@ -38,7 +38,7 @@ const loadData = (query?: TableQueryParams) => {
setQuery(query, true, true)
}
watch(dashboardKey, () => {
watch([dashboardKey, overview], () => {
loadData()
}, { immediate: true })
Expand Down Expand Up @@ -119,7 +119,7 @@ const isRowExpandable = (row: VDBBlocksTableRow) => {
target="_blank"
class="link"
>
<BcFormatNumber :value="slotProps.data.proposer" default="-" />
{{ slotProps.data.proposer || '-' }}
</BcLink>
</template>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const loadData = (query?: TableQueryParams) => {
setQuery(query, true, true)
}
watch(() => [dashboardKey.value, overview.value], () => {
watch([dashboardKey, overview], () => {
loadData()
}, { immediate: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const loadData = (q?: TableQueryParams) => {
setQuery(q, true, true)
}
watch(() => [dashboardKey.value, overview.value], () => {
watch([dashboardKey, overview], () => {
loadData()
}, { immediate: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { withdrawals, query: lastQuery, getWithdrawals, totalAmount, getTotalAmou
const { value: query, temp: tempQuery, bounce: setQuery } = useDebounceValue<TableQueryParams | undefined>(undefined, 500)
const totalIdentifier = 'total'
const { hasValidators } = useValidatorDashboardOverviewStore()
const { hasValidators, overview } = useValidatorDashboardOverviewStore()
const { groups } = useValidatorDashboardGroups()
const { width } = useWindowSize()
Expand All @@ -43,7 +43,7 @@ const loadData = (query?: TableQueryParams) => {
setQuery(query, true, true)
}
watch(dashboardKey, () => {
watch([dashboardKey, overview], () => {
loadData()
getTotalAmount(dashboardKey.value)
}, { immediate: true })
Expand Down Expand Up @@ -173,7 +173,7 @@ const isRowInFuture = (row: ExtendedVDBWithdrawalsTableRow) => {
target="_blank"
class="link"
>
<BcFormatNumber :value="slotProps.data.index" default="-" />
{{ slotProps.data.index || "-" }}
</BcLink>
<div v-else class="all-time-total">
Σ
Expand Down

0 comments on commit a8d665d

Please sign in to comment.