When sharing a dashboard via rendered image, the PMM tour gets in the way. Also, theres an error notification on top (HTTP 404).
- Go to a dashboard like postgresql-instance-summary;
- Click on the dashboard's dropdown, then "Share";
- Please install the correct plugin for rendering, if not installed already;
- Click "Direct link rendered image";
- When the image shows up in the new tab, you'll see:
- PMM tour in front of the dashboard;
- An error notification on the top right corner (HTTP 404).
This happens due to the fact that Grafana renders images on the backend using a headless Chromium (Puppeteer). Because it's a new instance on each render, the flag on local storage won't be set, which by default will trigger the tour.
As for the HTTP 404, it happens to every request being made to PMM's APIs. This happens because Chromium is trying to make a request to the same domain (:3000), but our APIs are actually not in that port (we use NGINX to redirect requests).
By checking `navigator.webdriver` [here|https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver,] we can, in an automated env (e.g. Chromium):
- Skip the tour;
- Disable API error notifications.