Skip to content

Commit

Permalink
Merge pull request #131 from SaaShup/fix_image_registry_not_found
Browse files Browse the repository at this point in the history
Fix image registry not found
  • Loading branch information
lvenier authored Sep 26, 2024
2 parents 23277c8 + 36c9630 commit 33821c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flows.json
Original file line number Diff line number Diff line change
Expand Up @@ -4526,7 +4526,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$count(msg.payload) > 0 ? $map(msg.payload, function($item) {\t {\t \"host\": $globalContext(\"config\").id,\t \"name\": $match($item.RepoTags[0], /(.*):/).groups[0] ? $match($item.RepoTags[0], /(.*):/).groups[0] : $substring($item.Id, 7, 12),\t \"registry\": {\t \"id\": $lookup(\t msg.event.data.registries{name: id},\t $count($split($item.RepoTags[0], '/' )) > 1 ? $contains($split($item.RepoTags[0], '/')[0], /([.:]|localhost)/) ? $split($item.RepoTags[0], '/')[0] : \"dockerhub\" : \"dockerhub\"\t )\t },\t \"version\": $split($split($item.RepoTags[0], \"/\")[-1], ':')[1] ? $split($split($item.RepoTags[0], \"/\")[-1], ':')[1] : $item.Id,\t \"size\": $round($item.Size / 1024 / 1024),\t \"ImageID\": $item.Id,\t \"Digest\": $split($item.RepoDigests[0], \"@\")[-1]\t }\t}) : []",
"to": "$count(msg.payload) > 0 ? $map(msg.payload, function($item) {\t {\t \"host\": $globalContext(\"config\").id,\t \"name\": $match($item.RepoTags[0], /(.*):/).groups[0] ? $match($item.RepoTags[0], /(.*):/).groups[0] : $substring($item.Id, 7, 12),\t \"registry\": {\t \"id\": $lookup(\t msg.event.data.registries{name: id},\t $count($split($item.RepoTags[0], '/' )) > 1 ?\t (\t $contains($split($item.RepoTags[0], '/')[0], /([.:]|localhost)/) ?\t ( \t $match($item.RepoTags[0], /(.*):/).groups[0] in msg.event.data.registries.name ?\t $match($item.RepoTags[0], /(.*):/).groups[0] :\t $split($item.RepoTags[0], '/')[0]\t ) :\t \"dockerhub\"\t ) :\t \"dockerhub\"\t )\t },\t \"version\": $split($split($item.RepoTags[0], \"/\")[-1], ':')[1] ? $split($split($item.RepoTags[0], \"/\")[-1], ':')[1] : $item.Id,\t \"size\": $round($item.Size / 1024 / 1024),\t \"ImageID\": $item.Id,\t \"Digest\": $split($item.RepoDigests[0], \"@\")[-1]\t }\t}) : []",
"tot": "jsonata"
}
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "netbox-docker-agent",
"version": "0.34.0",
"version": "0.34.1",
"description": "Saashup agent for netbox manager",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 33821c5

Please sign in to comment.