VolkovLabs / business-media

The Business Media panel is a Grafana plugin that renders PNG, JPG, GIF, MP4, WEBM, MP3, OGG, and PDF files encoded in the base64 format and URL.
https://docs.volkovlabs.io
Apache License 2.0
24 stars 3 forks source link

Add display multiple images as slideshow #68

Closed mikhail-vl closed 1 year ago

mikhail-vl commented 1 year ago

If multiple media files are returned from Data Source, we always use the last one.

  /**
   * Name field (string)
   */
  let img = data.series
    .map((series) =>
      series.fields.find((field) => field.type === FieldType.string && (!options.name || field.name === options.name))
    )
    .map((field) => field?.values.get(field.values.length - 1))
    .toString();

There were multiple requests for the left and right buttons on the toolbar to move between images.