Skip to content

Commit 12864ad

Browse files
committed
feat(api): indicate archival status in dashboard settings overview
1 parent aa67df1 commit 12864ad

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

backend/pkg/api/data_access/notifications.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,7 @@ func (d *DataAccessService) GetNotificationSettingsDashboards(ctx context.Contex
15641564
// Get the validator dashboards
15651565
valDashboards := []struct {
15661566
DashboardId uint64 `db:"dashboard_id"`
1567+
IsArchived bool `db:"is_archived"`
15671568
DashboardName string `db:"dashboard_name"`
15681569
GroupId uint64 `db:"group_id"`
15691570
GroupName string `db:"group_name"`
@@ -1575,6 +1576,7 @@ func (d *DataAccessService) GetNotificationSettingsDashboards(ctx context.Contex
15751576
err := d.alloyReader.SelectContext(ctx, &valDashboards, `
15761577
SELECT
15771578
d.id AS dashboard_id,
1579+
d.is_archived IS NOT NULL AS is_archived,
15781580
d.name AS dashboard_name,
15791581
g.id AS group_id,
15801582
g.name AS group_name,
@@ -1731,6 +1733,7 @@ func (d *DataAccessService) GetNotificationSettingsDashboards(ctx context.Contex
17311733

17321734
// Set general info
17331735
resultMap[key].IsAccountDashboard = false
1736+
resultMap[key].IsArchived = valDashboard.IsArchived
17341737
resultMap[key].DashboardId = valDashboard.DashboardId
17351738
resultMap[key].DashboardName = valDashboard.DashboardName
17361739
resultMap[key].GroupId = valDashboard.GroupId

backend/pkg/api/types/notifications.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ type PutUserNotificationSettingsAccountDashboardResponse ApiDataResponse[Notific
216216

217217
type NotificationSettingsDashboardsTableRow struct {
218218
IsAccountDashboard bool `json:"is_account_dashboard"` // if false it's a validator dashboard
219+
IsArchived bool `json:"is_archived"`
219220
DashboardId uint64 `json:"dashboard_id"`
220221
DashboardName string `json:"dashboard_name"`
221222
GroupId uint64 `json:"group_id"`

frontend/types/api/notifications.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ export interface NotificationSettingsAccountDashboard {
208208
export type PutUserNotificationSettingsAccountDashboardResponse = ApiDataResponse<NotificationSettingsAccountDashboard>;
209209
export interface NotificationSettingsDashboardsTableRow {
210210
is_account_dashboard: boolean; // if false it's a validator dashboard
211+
is_archived: boolean;
211212
dashboard_id: number /* uint64 */;
212213
dashboard_name: string;
213214
group_id: number /* uint64 */;

0 commit comments

Comments
 (0)