Versions Compared

Key

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

...

  • opCharts version >= 4.0.9
  • You will need system administration privileges so you can create the required files in the /usr/local/omk directory.


Image RemovedImage Added

How to

  1. Create a new template file and have its prefix .html.ep in <omk_dir>/templates/public/
  2. Define any arbitrary HTML inside the template as you see fit, mojolicious templates are also supported, see more on rendering mojolicious templates at https://mojolicious.org/perldoc/Mojo/Template
  3. Create an opCharts component to tell the dashboard it can render this new file. For this, create a new json file in /usr/local/omk/lib/json/opCharts/components.d/: Example: acme_component.json 

    Code Block
    {
      "name": "What the component is called in the dashboards dropdown list",
      "ep_template_file": "The loccation of the template file",
      "options": {
        "titleText": "the component display name"
      },
      "type": "ep_template"
    }


  4. Restart the omkd daemon. Please note that omkd daemon should be restarted after any change. 

...