Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* feat(managerclient): make Items field in BackupListItems public for improved usability (#4227) #4228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v3/pkg/managerclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ func (c *Client) ListBackups(ctx context.Context, clusterID string,
return BackupListItems{}, err
}

return BackupListItems{items: resp.Payload}, nil
return BackupListItems{Items: resp.Payload}, nil
}

// ListBackupFiles returns a listing of available backup files.
Expand Down
4 changes: 2 additions & 2 deletions v3/pkg/managerclient/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ func (p ValidateBackupProgress) addHostProgress(w io.Writer) error {

// BackupListItems is a []backup.ListItem representation.
type BackupListItems struct {
items []*models.BackupListItem
Items []*models.BackupListItem
AllClusters bool
ShowTables int
}
Expand All @@ -1460,7 +1460,7 @@ func (bl BackupListItems) Render(w io.Writer) error {
}).Parse(backupListItemTemplate))

prev := ""
for _, i := range bl.items {
for _, i := range bl.Items {
if bl.AllClusters {
if prev != i.ClusterID {
prev = i.ClusterID
Expand Down