Add "Share image with URL" action to dashboard panels

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

In order to deliver Allow users to download/share/embed a chart pan... (&8940) we need a way for users to take a snapshot of their analytics dashboard panel and share the resulting image using a GitLab URL.

Proposed solution

  • Add a Share image with URL item to the panel actions.

Design

image

Implementation plan

Weight 2️⃣

  1. Add a Share image with URL action to panels_base.vue.
    • When clicked, generate an image of the panel and POST the image to /uploads.
      • This may need to be a new entry in api.js.
    • Copy the resulting attachment URL to the users clipboard.
    • Show a toast with the text: Image URL copied to clipboard.
  2. If Create audit event when a visualisation is shared (#460475) is complete, ensure this creates an audit event.
  3. Update the relevant specs.
  4. Update the documentation with how-to delete & manage uploads.

Note: See this spike for a rough example Draft: Spike share visualizations using screens... (!151366 - closed).

Edited by 🤖 GitLab Bot 🤖