diff --git a/backend/pkg/api/data_access/notifications.go b/backend/pkg/api/data_access/notifications.go
index bdc13ca67..0a07f5b7c 100644
--- a/backend/pkg/api/data_access/notifications.go
+++ b/backend/pkg/api/data_access/notifications.go
@@ -405,16 +405,16 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
notificationDetails := t.NotificationValidatorDashboardDetail{
ValidatorOffline: []uint64{},
ProposalMissed: []t.IndexSlots{},
- ProposalDone: []t.IndexBlocks{},
- UpcomingProposals: []t.IndexSlots{},
+ ProposalSuccess: []t.IndexBlocks{},
+ ProposalUpcoming: []t.IndexSlots{},
Slashed: []uint64{},
- SyncCommittee: []uint64{},
+ Sync: []uint64{},
AttestationMissed: []t.IndexEpoch{},
Withdrawal: []t.NotificationEventWithdrawal{},
ValidatorOfflineReminder: []uint64{},
- ValidatorBackOnline: []t.NotificationEventValidatorBackOnline{},
- MinimumCollateralReached: []t.Address{},
- MaximumCollateralReached: []t.Address{},
+ ValidatorOnline: []t.NotificationEventValidatorBackOnline{},
+ MinCollateral: []t.Address{},
+ MaxCollateral: []t.Address{},
}
var searchIndices []uint64
@@ -554,7 +554,7 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
if searchEnabled && !searchIndexSet[curNotification.ValidatorIndex] {
continue
}
- notificationDetails.UpcomingProposals = append(notificationDetails.UpcomingProposals, t.IndexSlots{Index: curNotification.ValidatorIndex, Slots: []uint64{curNotification.Slot}})
+ notificationDetails.ProposalUpcoming = append(notificationDetails.ProposalUpcoming, t.IndexSlots{Index: curNotification.ValidatorIndex, Slots: []uint64{curNotification.Slot}})
case types.ValidatorGotSlashedEventName:
curNotification, ok := notification.(*n.ValidatorGotSlashedNotification)
if !ok {
@@ -583,7 +583,7 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
if searchEnabled && !searchIndexSet[curNotification.ValidatorIndex] {
continue
}
- notificationDetails.ValidatorBackOnline = append(notificationDetails.ValidatorBackOnline, t.NotificationEventValidatorBackOnline{Index: curNotification.ValidatorIndex, EpochCount: curNotification.Epoch})
+ notificationDetails.ValidatorOnline = append(notificationDetails.ValidatorOnline, t.NotificationEventValidatorBackOnline{Index: curNotification.ValidatorIndex, EpochCount: curNotification.Epoch})
case types.ValidatorReceivedWithdrawalEventName:
curNotification, ok := notification.(*n.ValidatorWithdrawalNotification)
if !ok {
@@ -630,9 +630,9 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
addr := t.Address{Hash: t.Hash(nodeAddress), IsContract: true}
addressMapping[nodeAddress] = &addr
if notification.GetEventName() == types.RocketpoolCollateralMinReachedEventName {
- notificationDetails.MinimumCollateralReached = append(notificationDetails.MinimumCollateralReached, addr)
+ notificationDetails.MinCollateral = append(notificationDetails.MinCollateral, addr)
} else {
- notificationDetails.MaximumCollateralReached = append(notificationDetails.MaximumCollateralReached, addr)
+ notificationDetails.MaxCollateral = append(notificationDetails.MaxCollateral, addr)
}
case types.SyncCommitteeSoonEventName:
curNotification, ok := notification.(*n.SyncCommitteeSoonNotification)
@@ -642,7 +642,7 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
if searchEnabled && !searchIndexSet[curNotification.ValidatorIndex] {
continue
}
- notificationDetails.SyncCommittee = append(notificationDetails.SyncCommittee, curNotification.ValidatorIndex)
+ notificationDetails.Sync = append(notificationDetails.Sync, curNotification.ValidatorIndex)
default:
log.Debugf("Unhandled notification type: %s", notification.GetEventName())
}
@@ -652,10 +652,10 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
// fill proposals
for validatorIndex, proposalInfo := range proposalsInfo {
if len(proposalInfo.Proposed) > 0 {
- notificationDetails.ProposalDone = append(notificationDetails.ProposalDone, t.IndexBlocks{Index: validatorIndex, Blocks: proposalInfo.Proposed})
+ notificationDetails.ProposalSuccess = append(notificationDetails.ProposalSuccess, t.IndexBlocks{Index: validatorIndex, Blocks: proposalInfo.Proposed})
}
if len(proposalInfo.Scheduled) > 0 {
- notificationDetails.UpcomingProposals = append(notificationDetails.UpcomingProposals, t.IndexSlots{Index: validatorIndex, Slots: proposalInfo.Scheduled})
+ notificationDetails.ProposalUpcoming = append(notificationDetails.ProposalUpcoming, t.IndexSlots{Index: validatorIndex, Slots: proposalInfo.Scheduled})
}
if len(proposalInfo.Missed) > 0 {
notificationDetails.ProposalMissed = append(notificationDetails.ProposalMissed, t.IndexSlots{Index: validatorIndex, Slots: proposalInfo.Missed})
@@ -674,14 +674,14 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
for i, contractStatus := range contractStatusRequests {
contractStatusPerAddress["0x"+contractStatus.Address] = i
}
- for i := range notificationDetails.MinimumCollateralReached {
- if address, ok := addressMapping[string(notificationDetails.MinimumCollateralReached[i].Hash)]; ok {
- notificationDetails.MinimumCollateralReached[i] = *address
+ for i := range notificationDetails.MinCollateral {
+ if address, ok := addressMapping[string(notificationDetails.MinCollateral[i].Hash)]; ok {
+ notificationDetails.MinCollateral[i] = *address
}
}
- for i := range notificationDetails.MaximumCollateralReached {
- if address, ok := addressMapping[string(notificationDetails.MaximumCollateralReached[i].Hash)]; ok {
- notificationDetails.MaximumCollateralReached[i] = *address
+ for i := range notificationDetails.MaxCollateral {
+ if address, ok := addressMapping[string(notificationDetails.MaxCollateral[i].Hash)]; ok {
+ notificationDetails.MaxCollateral[i] = *address
}
}
for i := range notificationDetails.Withdrawal {
diff --git a/backend/pkg/api/types/notifications.go b/backend/pkg/api/types/notifications.go
index 14ee217b0..d3616a7bc 100644
--- a/backend/pkg/api/types/notifications.go
+++ b/backend/pkg/api/types/notifications.go
@@ -63,19 +63,19 @@ type NotificationEventWithdrawal struct {
type NotificationValidatorDashboardDetail struct {
DashboardName string `db:"dashboard_name" json:"dashboard_name"`
GroupName string `db:"group_name" json:"group_name"`
- ValidatorOffline []uint64 `json:"validator_offline"` // validator indices
+ ValidatorOffline []uint64 `json:"validator_offline"` // validator indices
+ ValidatorOfflineReminder []uint64 `json:"validator_offline_reminder"` // validator indices; TODO not filled yet
+ ValidatorOnline []NotificationEventValidatorBackOnline `json:"validator_online"`
GroupEfficiencyBelow float64 `json:"group_efficiency_below,omitempty"` // fill with the `group_efficiency_below` threshold if event is present
ProposalMissed []IndexSlots `json:"proposal_missed"`
- ProposalDone []IndexBlocks `json:"proposal_done"`
- UpcomingProposals []IndexSlots `json:"upcoming_proposals"`
+ ProposalSuccess []IndexBlocks `json:"proposal_success"`
+ ProposalUpcoming []IndexSlots `json:"proposal_upcoming"`
Slashed []uint64 `json:"slashed"` // validator indices
- SyncCommittee []uint64 `json:"sync_committee"` // validator indices
+ Sync []uint64 `json:"sync"` // validator indices
AttestationMissed []IndexEpoch `json:"attestation_missed"` // index (epoch)
Withdrawal []NotificationEventWithdrawal `json:"withdrawal"`
- ValidatorOfflineReminder []uint64 `json:"validator_offline_reminder"` // validator indices; TODO not filled yet
- ValidatorBackOnline []NotificationEventValidatorBackOnline `json:"validator_back_online"`
- MinimumCollateralReached []Address `json:"min_collateral_reached"` // node addresses
- MaximumCollateralReached []Address `json:"max_collateral_reached"` // node addresses
+ MinCollateral []Address `json:"min_collateral"` // node addresses
+ MaxCollateral []Address `json:"max_collateral"` // node addresses
}
type InternalGetUserNotificationsValidatorDashboardResponse ApiDataResponse[NotificationValidatorDashboardDetail]
diff --git a/frontend/components/notifications/NotificationsDashboardDialogEntity.vue b/frontend/components/notifications/NotificationsDashboardDialogEntity.vue
index e000fb2f5..0d5c77c58 100644
--- a/frontend/components/notifications/NotificationsDashboardDialogEntity.vue
+++ b/frontend/components/notifications/NotificationsDashboardDialogEntity.vue
@@ -129,8 +129,8 @@ const formatValueWei = (value: string) => {
@@ -140,7 +140,7 @@ const formatValueWei = (value: string) => {
/>
- {{ $t('notifications.dashboards.dialog.entity.proposal_done') }} ({{ details?.proposal_done?.length ?? 0 }})
+ {{ $t('notifications.dashboards.dialog.entity.proposal_done') }} ({{ details?.proposal_success?.length ?? 0 }})
{
- {{ $t('notifications.dashboards.dialog.entity.sync_committee') }} ({{ details?.sync_committee?.length ?? 0 }})
+ {{ $t('notifications.dashboards.dialog.entity.sync_committee') }} ({{ details?.sync?.length ?? 0 }})
{
@@ -267,7 +267,7 @@ const formatValueWei = (value: string) => {
/>
- {{ $t('notifications.dashboards.dialog.entity.validator_back_online') }} ({{ details?.validator_back_online?.length ?? 0 }})
+ {{ $t('notifications.dashboards.dialog.entity.validator_back_online') }} ({{ details?.validator_online?.length ?? 0 }})
{
@@ -339,7 +339,7 @@ const formatValueWei = (value: string) => {
/>
- {{ $t('notifications.dashboards.dialog.entity.upcoming_proposal') }} ({{ details?.upcoming_proposals?.length ?? 0 }})
+ {{ $t('notifications.dashboards.dialog.entity.upcoming_proposal') }} ({{ details?.proposal_upcoming?.length ?? 0 }})
{
@@ -372,7 +372,7 @@ const formatValueWei = (value: string) => {
/>
- {{ $t('notifications.dashboards.dialog.entity.min_collateral') }} ({{ details?.min_collateral_reached?.length ?? 0 }})
+ {{ $t('notifications.dashboards.dialog.entity.min_collateral') }} ({{ details?.min_collateral?.length ?? 0 }})
{
@@ -398,7 +398,7 @@ const formatValueWei = (value: string) => {
/>
- {{ $t('notifications.dashboards.dialog.entity.max_collateral') }} ({{ details?.max_collateral_reached?.length ?? 0 }})
+ {{ $t('notifications.dashboards.dialog.entity.max_collateral') }} ({{ details?.max_collateral?.length ?? 0 }})
;
export interface NotificationEventExecution {