Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

EN | ES

From the From 1.4.0-commando version of the onesaitplatform, you can generate a dashboard screenshot, in png image format and in pdf document format, using a REST API enabled for that purpose.

...

  • generateDashboardImage --> Allows for the REST generation of the dashboard as a png image. The parameters are as follows:
    • Dashboard ID -->   dashboard's id, can be obtained from the dashboard's own urlURL itself:

Image Modified 

    • waittime → time given for the rendering of the dashboard in backend. Certain queries or elements may take time to finish, so this parameter will have to be increased.
    • height/width/fullpage → height and width in pixels, and flag to prioritize the fullscreen rendering of the resulting image. These parameters must be configured to obtain a correct screenshot of each dashboard.
    • Params → When a dashboard has custom parameters, it can be included here in url format (param1 = value1 & param2 = value2):

Image Modified 

    • Authorization → Token OAuth of a user with at least read permissions on it.
  • generatePDFImage → Allows the generation of a Vector PDF document on the dashboard. The vector support of it, will depend on the libraries used in the dashboard: For example, a canvas library (chartjs, echarts with render canvas, ...) will never be vector; however an SVG library will be (echarts with render svg, D3, ...). The parameters are analogous to the image, except for the fullscreen, that does not apply in this case.

Finally, by invoking from swagger Swagger or from a REST client, we can get the rendered image:

...