Skip to content

Commit

Permalink
Docker image name is incorrect in search images api #1501 (#1564)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramanan-ravi authored Sep 13, 2023
1 parent 948db68 commit 43e6272
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deepfence_server/model/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ func (IngestedContainerImage) GetJsonCategory() string {

type ContainerImage struct {
ID string `json:"node_id" required:"true"`
ImageNodeID string `json:"image_node_id" required:"true"`
NodeName string `json:"node_name" required:"true"`
Name string `json:"docker_image_name" required:"true"`
Tag string `json:"docker_image_tag" required:"true"`
Expand All @@ -340,7 +341,7 @@ func (ContainerImage) NodeType() string {
}

func (ContainerImage) ExtendedField() string {
return "docker_image_name"
return "image_node_id"
}

func (ContainerImage) GetCategory() string {
Expand Down
2 changes: 1 addition & 1 deletion deepfence_server/reporters/search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func searchGenericDirectNodeReport[T reporters.Cypherable](ctx context.Context,
defer tx.Close()

query := constructIndirectMatchInit[T](filter, extended_filter, indriect_filters, fw)
log.Debug().Msgf("search query: %v", query)
log.Debug().Msgf("search query: \n%v", query)
r, err := tx.Run(query,
map[string]interface{}{})

Expand Down

0 comments on commit 43e6272

Please sign in to comment.