mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-26 17:41:25 +01:00
fix: gc history update_time
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
This commit is contained in:
parent
6ca3665207
commit
d2c4c4f71b
@ -218,7 +218,7 @@ func convertExecution(exec *task.Execution) *Execution {
|
|||||||
Trigger: exec.Trigger,
|
Trigger: exec.Trigger,
|
||||||
ExtraAttrs: exec.ExtraAttrs,
|
ExtraAttrs: exec.ExtraAttrs,
|
||||||
StartTime: exec.StartTime,
|
StartTime: exec.StartTime,
|
||||||
EndTime: exec.EndTime,
|
UpdateTime: exec.UpdateTime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ type TriggerSettings struct {
|
|||||||
Cron string `json:"cron"`
|
Cron string `json:"cron"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execution model for replication
|
// Execution model for gc
|
||||||
type Execution struct {
|
type Execution struct {
|
||||||
ID int64
|
ID int64
|
||||||
Status string
|
Status string
|
||||||
@ -34,10 +34,10 @@ type Execution struct {
|
|||||||
Trigger string
|
Trigger string
|
||||||
ExtraAttrs map[string]interface{}
|
ExtraAttrs map[string]interface{}
|
||||||
StartTime time.Time
|
StartTime time.Time
|
||||||
EndTime time.Time
|
UpdateTime time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
// Task model for replication
|
// Task model for gc
|
||||||
type Task struct {
|
type Task struct {
|
||||||
ID int64
|
ID int64
|
||||||
ExecutionID int64
|
ExecutionID int64
|
||||||
|
@ -168,7 +168,7 @@ func (g *gcAPI) GetGCHistory(ctx context.Context, params operation.GetGCHistoryP
|
|||||||
},
|
},
|
||||||
Status: exec.Status,
|
Status: exec.Status,
|
||||||
CreationTime: exec.StartTime,
|
CreationTime: exec.StartTime,
|
||||||
UpdateTime: exec.EndTime,
|
UpdateTime: exec.UpdateTime,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ func (g *gcAPI) GetGC(ctx context.Context, params operation.GetGCParams) middlew
|
|||||||
Type: exec.Trigger,
|
Type: exec.Trigger,
|
||||||
},
|
},
|
||||||
CreationTime: exec.StartTime,
|
CreationTime: exec.StartTime,
|
||||||
UpdateTime: exec.EndTime,
|
UpdateTime: exec.UpdateTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
return operation.NewGetGCOK().WithPayload(res.ToSwagger())
|
return operation.NewGetGCOK().WithPayload(res.ToSwagger())
|
||||||
|
Loading…
Reference in New Issue
Block a user