Skip to content
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
4 changes: 2 additions & 2 deletions cmd/harbor/root/project/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func LogsProjectCommmand() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
log.Debug("Starting execution of 'logs' command")
var err error
var resp *proj.GetLogsOK
var resp *proj.GetLogExtsOK
var projectName string

if len(args) > 0 {
Expand Down Expand Up @@ -68,7 +68,7 @@ func LogsProjectCommmand() *cobra.Command {
formatFlag := viper.GetString("output-format")
if formatFlag != "" {
log.WithField("output_format", formatFlag).Debug("Output format selected")
err = utils.PrintFormat(resp, formatFlag)
err = utils.PrintFormat(resp.Payload, formatFlag)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/project_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ func SearchProject(query string) (search.SearchOK, error) {
return *response, nil
}

func LogsProject(projectName string) (*project.GetLogsOK, error) {
func LogsProject(projectName string) (*project.GetLogExtsOK, error) {
ctx, client, err := utils.ContextWithClient()
if err != nil {
return nil, err
}

response, err := client.Project.GetLogs(ctx, &project.GetLogsParams{
response, err := client.Project.GetLogExts(ctx, &project.GetLogExtsParams{
ProjectName: projectName,
Context: ctx,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/views/project/logs/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var columns = []table.Column{
{Title: "Timestamp", Width: tablelist.WidthL * 2},
}

func LogsProject(logs []*models.AuditLog) {
func LogsProject(logs []*models.AuditLogExt) {
var rows []table.Row
for _, log := range logs {
createTime, _ := utils.FormatCreatedTime(log.OpTime.String())
Expand Down