Versions Compared

Key

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

...

Configuration

Create a file in omk/conf/table_schemas/opEvents_action-buttons.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.

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


Add a policy in omk/conf/EventActions.json|.nmis that triggers show_button.tag()

Code Block
languagebash
titleEventAction.json
"policy": {
	"5": {
		"IF": "event.any",
		"THEN": "show_button.ping_node()",
		"BREAK: "true"
		},
	}


Code Block
languagebash
titleEventAction.nmis
%hash = (
		'policy' => {
				'5' => {
						IF => 'event.any',
						THEN => 'show_button.ping_node()',
						BREAK => 'true'
					},
				}
		);


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

...