Custom Widgets

Graphlytic functionality can be extended by widgets. You can create and deploy your own widgets. A widget is a group of javascript, CSS, and HTML files (one from each and only the javascript file is mandatory).

Be careful with the content of these custom files because the deployment can cause security vulnerability of Graphlytic. Be sure to know what custom widget is being deployed and that you trust the source of the code.

Custom widget deployment

  1. Prepare your widget files. Supported file extensions are: CSS, HTML, JS

    1. Choose widget ID (e.g. myWidget). Do not use "_" as prefix.

    2. Name your files using your widget ID, e.g. "myWidget.css", "myWidget.html" and "myWidget.js". You can have only 1 file of each type (CSS, HTML, JS) but you don't need to have all types, so your widget can be only the JS file when you don't need custom HTML and CSS functionality.

  2. There is no need to stop Graphlytic.

  3. Upload the widget files to the "widgets" directory. Location of the directory is configurable in <GRAPHLYTIC_HOME>/conf/graphlytic.conf.

    1. Option A - manual upload

      1. Create a subdirectory in the "widgets" directory using your widget ID as the subdirectory name, e.g. "myWidget".

      2. Copy prepared files into the created subdirectory.

      3. Enable and configure the widget in Widgets settings.

    2. Option B - upload using the REST API

      1. Open the Swagger UI

      2. Locate the "Widgets" group and use the POST /widgets endpoint to upload a zip file with the widget's folder and files