org.visallo.dashboard.toolbar.item

Define toolbar items for dashboard cards

Allows custom buttons to be rendered next to the cards configuration button. These buttons (displayed as icons) can send an event on click, or specify content to be rendered in a popover.

Registration

registry.registerExtension("org.visallo.dashboard.toolbar.item", config)

Source:
Tutorials:
See:
Configuration Properties:
Name Type Attributes Description
identifier string

Unique identifier for this type of toolbar item. Only used internally, not exposed to user

icon string

Path to icon to render in button

action object

The type of action when clicked

Properties
Name Type Attributes Description
type string

Must be either popover, or event

type string

Must be either popover, or event

componentPath string <optional>

Required when type=popover. Path to Component to render in popover

name string <optional>

Required when type=event. Event to trigger

tooltip string <optional>

Help text to display when user hovers over button

canHandle canHandle <optional>

Function to decide if this item should be added to this card

Validation Function

Extensions registered must pass this validation check to be used.

function extensionValidator(e) {
    return e.identifier && e.icon && e.action && (e.action.type === 'popover' && e.action.componentPath || e.action.type === 'event');
}

Type Definitions

canHandle(options) → {boolean}

Source:
Parameters:
Name Type Description
options object
Properties
Name Type Description
item object

The dashboard item

extension object

The dashboard item extension

element Element

The grid-stack-item element

Returns:

true if extension should apply to this item

Type
boolean