diff options
Diffstat (limited to 'app/assets/javascripts/registry/explorer/utils.js')
-rw-r--r-- | app/assets/javascripts/registry/explorer/utils.js | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/app/assets/javascripts/registry/explorer/utils.js b/app/assets/javascripts/registry/explorer/utils.js deleted file mode 100644 index a48da51caae..00000000000 --- a/app/assets/javascripts/registry/explorer/utils.js +++ /dev/null @@ -1,25 +0,0 @@ -import { joinPaths } from '~/lib/utils/url_utility'; - -export const pathGenerator = (imageDetails, ending = '?format=json') => { - // this method is a temporary workaround, to be removed with graphql implementation - // https://gitlab.com/gitlab-org/gitlab/-/issues/276432 - - const splitPath = imageDetails.path.split('/').reverse(); - const splitName = imageDetails.name ? imageDetails.name.split('/').reverse() : []; - const basePath = splitPath - .reduce((acc, curr, index) => { - if (splitPath[index] !== splitName[index]) { - acc.unshift(curr); - } - return acc; - }, []) - .join('/'); - - return joinPaths( - window.gon.relative_url_root, - `/${basePath}`, - '/registry/repository/', - `${imageDetails.id}`, - `tags${ending}`, - ); -}; |