From eca62511b904e592caeed5f411e083df8248671b Mon Sep 17 00:00:00 2001 From: Amelia-Maria Breda Date: Fri, 14 Oct 2022 09:54:37 +0100 Subject: [PATCH] Added download count for cards in depenedencies tasbs Signed-off-by: Amelia-Maria Breda --- src/api.js | 4 ++-- src/components/DependsOn.jsx | 1 + src/components/IsDependentOn.jsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api.js b/src/api.js index 1355d983..3cd497e7 100644 --- a/src/api.js +++ b/src/api.js @@ -75,9 +75,9 @@ const endpoints = { imageListWithCVEFixed: (cveId, repoName) => `/v2/_zot/ext/search?query={ImageListWithCVEFixed(id:"${cveId}", image:"${repoName}") {Tag}}`, dependsOnForImage: (name) => - `/v2/_zot/ext/search?query={BaseImageList(image: "${name}"){RepoName Tag Description Vendor LastUpdated Platform {Os Arch} IsSigned}}`, + `/v2/_zot/ext/search?query={BaseImageList(image: "${name}"){RepoName Tag Description Vendor DownloadCount LastUpdated Platform {Os Arch} IsSigned}}`, isDependentOnForImage: (name) => - `/v2/_zot/ext/search?query={DerivedImageList(image: "${name}"){RepoName Tag Description Vendor LastUpdated Platform {Os Arch} IsSigned}}`, + `/v2/_zot/ext/search?query={DerivedImageList(image: "${name}"){RepoName Tag Description Vendor DownloadCount LastUpdated Platform {Os Arch} IsSigned}}`, globalSearch: ({ searchQuery = '""', pageNumber = 1, pageSize = 15, filter = {} }) => { const searchParam = searchQuery !== '' ? `query:"${searchQuery}"` : `query:""`; const paginationParam = `requestedPage: {limit:${pageSize} offset:${(pageNumber - 1) * pageSize}}`; diff --git a/src/components/DependsOn.jsx b/src/components/DependsOn.jsx index 59a6dee2..d0d5b692 100644 --- a/src/components/DependsOn.jsx +++ b/src/components/DependsOn.jsx @@ -101,6 +101,7 @@ function DependsOn(props) { version={dependence.Tag} description={dependence.Description} vendor={dependence.Vendor} + downloads={dependence.DownloadCount} platforms={[dependence.Platform]} isSigned={dependence.IsSigned} key={index} diff --git a/src/components/IsDependentOn.jsx b/src/components/IsDependentOn.jsx index 182f6e42..eb3f9566 100644 --- a/src/components/IsDependentOn.jsx +++ b/src/components/IsDependentOn.jsx @@ -101,6 +101,7 @@ function IsDependentOn(props) { version={dependence.Tag} description={dependence.Description} vendor={dependence.Vendor} + downloads={dependence.DownloadCount} isSigned={dependence.IsSigned} platforms={[dependence.Platform]} key={index}