synthetic-monitoring-app icon indicating copy to clipboard operation
synthetic-monitoring-app copied to clipboard

Pre-fill script input via linking and/or other transfer methods

Open ckbedwell opened this issue 6 months ago • 1 comments

Problem

It would be useful if we were able to pre-fill a script with something other than the default when navigating from another area of the application or somewhere else in Grafana especially (such as the k6 plugin).

One example where this would currently be useful is supporting the check group selection page. We support users clicking the labels for the protocols on the API endpoint card but not on the Scripted or Browser cards

Choose a check type page. It shows the 4 check groups with their supported protocols.

One consideration related to this which should be investigated:

  1. Pre-filling the script via the URL. This could be problematic if the script was very long. It is worth investigating what happens when users have scripts that are somewhere in the region of 8mb even though we don't currently support a script that big (the limit is 128kb right now) and if there are alternative ways we can transfer the script to be pre-filled from another part of Grafana.

Completion criteria

  • [ ] The choose-type check cards for Scripted and Browser pre-fill the form correctly.
  • [ ] Ideally a URL can be provided or some other demonstration can be provided of where the script has been populated from somewhere outside of the check creation page.
  • [ ] Please ensure the appropriate integration tests have been added when submitting the PR.

ckbedwell avatar Aug 01 '24 10:08 ckbedwell