You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Available in opEvents-3.2.1 and opEvents-2.6.1

Configuration

Create a file in conf/table_schemas/opEvents_action-button.json

This must be valid JSON schema or the buttons will fail to render. You should see an error in opEvents.log if this is the case.

[
  {
    "description": "Example Events Button Action",
    "label": "Ping Node",
    "fa_icon": "fas fa-table-tennis",
    "script": "ping_node",
    "tags": ["ping"]
  }
]

These are the supported keys and how the change operation and look of the button.

KeyTypeRequiredDescription
scriptstringYesName of the script defined in EventActions.json
labelstringYesLabel which the button will display to the user
descriptionstringoptionalTool-tip help text to be displayed when you mouse over the button
tagsarray[string]optionalIf no tags are defined the button will show on all events, if tags are defined the button will only show on events which have been tagged with show_button.tag_name()
run_oncebooleanoptionalIf set to true the button will look for script.script_name key on the event, if found the button will disable itself. This allows manual actions to only be triggered once. Will not influence any defined EventActions.json operations.
fa_iconstringoptionalIcon to be displayed from the Font Awesome library shipped with opEvents example: "fas fa-table-tennis" Icons here https://fontawesome.com/icons?d=gallery
classstringoptionalDefine a css class to colour the button, see Notes on Button Classes below to see a list of supported types

Note on Button Classes

Class
btn-default
btn-primary
btn-success
btn-info
btn-warning
btn-danger
btn-link

Note on Font Awesome

In opEvents-3.2.1 we are shipping the library 5.12.1

In opEvents-2.2.1 we are sipping the library 5.8.2


  • No labels