Skip to content

Commit 78abb5f

Browse files
enzo-bitflymarcel-bitfly
authored andcommitted
fix: displaying and editing dashboard groups list
- add doptimistic response for adding, editing and deleting - remove client pagination
1 parent db7576b commit 78abb5f

File tree

14 files changed

+338
-161
lines changed

14 files changed

+338
-161
lines changed

frontend/components/DashboardIndex.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import type { HashTab } from '~/components/bc/tab/BcTabList.vue'
77
import type { ValidatorDashboard } from '~/types/api/dashboard'
88
import type { SlotVizEpoch } from '~/types/api/slot_viz'
9-
import type { VDBOverviewData } from '~/types/api/validator_dashboard'
9+
import type {
10+
VDBOverviewData,
11+
VDBOverviewGroup,
12+
} from '~/types/api/validator_dashboard'
13+
1014
// import type { TableQueryParams } from '~/types/datatable'
1115
1216
// const route = useRoute()
@@ -222,6 +226,7 @@ const onAddValidator = () => {
222226
223227
const emit = defineEmits<{
224228
(e: 'change-validators', validators: string[]): void,
229+
(e: 'change-groups', value: VDBOverviewGroup[]): void,
225230
}>()
226231
227232
// const tab = ref('summary')
@@ -265,7 +270,9 @@ const { key } = useDashboard()
265270
<DashboardControls
266271
v-model:is-visible-management-modal="isVisibleManagementModal"
267272
:validator-dashboards
268-
@change-validators=" emit('change-validators', $event)"
273+
:dashboard-title="overview?.name ?? ''"
274+
@change-validators="emit('change-validators', $event)"
275+
@change-groups="emit('change-groups', $event)"
269276
/>
270277
<DashboardValidatorOverview
271278
:overview

frontend/components/bc/table/BcTable.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ const sortOrder = computed(() => query.value.sort?.split(':')[1] === 'desc' ? 1
223223
<slot name="bc-table-footer-right" />
224224
</template>
225225
</BcTablePager>
226+
<slot name="bc-table-footer-bottom" />
226227
</template>
227228
</DataTable>
228229
</template>

frontend/components/dashboard/DashboardControls.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import type {
1010
MenuBarButton, MenuBarEntry,
1111
} from '~/types/menuBar'
1212
import type { Icon } from '~/components/bc/icon/BcIcon.vue'
13+
import type { VDBOverviewGroup } from '~/types/api/validator_dashboard'
1314
import type { ValidatorDashboard } from '~/types/api/dashboard'
1415
1516
const props = defineProps<{
17+
dashboardTitle: string,
1618
validatorDashboards: null | ValidatorDashboard[],
1719
}>()
1820
@@ -314,12 +316,14 @@ const editDashboard = () => {
314316
}
315317
const emit = defineEmits<{
316318
(e: 'change-validators', value: string[]): void,
319+
(e: 'change-groups', value: VDBOverviewGroup[]): void,
317320
}>()
318321
</script>
319322

320323
<template>
321324
<DashboardGroupManagementModal
322325
v-model="manageGroupsModalVisisble"
326+
@change-groups="emit('change-groups', $event)"
323327
/>
324328
<LazyDashboardValidatorManagementModal
325329
v-if="isVisibleManagementModal"

0 commit comments

Comments
 (0)