Adds digest label & copy button for dependency proxy UI

Problem

@jdrpereira found that

instead of displaying the digest for the cached images we're instead simply displaying sha256: Screenshot_2023-03-13_at_16.30.58

Reason

When we render the image version, we assume that the value of imageName is in the format <name>:<version>.

It looks like we missed the use-case where the imageName is in the format <name>:sha256:<digest>

Solution

  • Request the digest field in GraphQL
  • If the imageName contains sha256 digest, use the digest field to render sha256:<short-digest>.
  • Add copy button next to image name, contents should be:
    • for images with tags, example can be gitlab.com/gitlab-org/dependency_proxy/containers/ruby:3.1-slim
    • for images with digest, example can be gitlab.com/gitlab-org/dependency_proxy/containers/docker@sha256:<digest>

Design

🔻

Edited by Rahul Chanila