{backup,snapshot}: Rename common code to export
This commit is contained in:
parent
b3a827e042
commit
bf57c0d5a6
14 changed files with 145 additions and 133 deletions
|
|
@ -28,7 +28,7 @@ type indexPageContext struct {
|
|||
RunningCount int
|
||||
StoppedCount int
|
||||
|
||||
Backups []models.Snapshot
|
||||
Backups []models.Export
|
||||
}
|
||||
|
||||
func (info *Info) indexPageAPI(r *http.Request) (idx indexPageContext, err error) {
|
||||
|
|
@ -61,7 +61,7 @@ func (info *Info) indexPageAPI(r *http.Request) (idx indexPageContext, err error
|
|||
|
||||
// get the log entries
|
||||
group.Go(func() (err error) {
|
||||
idx.Backups, err = info.Instances.SnapshotLogFor("")
|
||||
idx.Backups, err = info.Instances.ExportLogFor("")
|
||||
return
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -44,23 +44,13 @@ func (info *Info) serverSocketSnapshot(slug string, writer *status.LineBuffer) {
|
|||
}
|
||||
|
||||
{
|
||||
err := info.SnapshotManager.HandleSnapshotLike(
|
||||
err := info.SnapshotManager.MakeExport(
|
||||
stream,
|
||||
snapshots.SnapshotFlags{
|
||||
Dest: "",
|
||||
Slug: slug,
|
||||
Title: "Snapshot",
|
||||
snapshots.ExportTask{
|
||||
Dest: "",
|
||||
Instance: &wissKI,
|
||||
|
||||
StagingOnly: false,
|
||||
Do: func(dest string) snapshots.SnapshotLike {
|
||||
snapshot := info.SnapshotManager.NewSnapshot(
|
||||
wissKI,
|
||||
stream,
|
||||
snapshots.SnapshotDescription{
|
||||
Dest: dest,
|
||||
},
|
||||
)
|
||||
return &snapshot
|
||||
},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue