Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.
Johan Sundén edited this page Nov 11, 2016 · 12 revisions

Dashboard.Widget

Widgets is often used in conjunction with agents or applications in plugin. A widget is a component that is only rendered once in the Dashboard header upper right, even if you have multiple instances of the same application.

Screenshot of an example widget

Screenshot of a example widget

Simple Widget

js
class MyWidget extends Dashboard.Widget {
    render() {
        return <Dashboard.GUI.WidgetButton text="My widget" onClick={() => console.log("Clicked on My widget")} />
    }
}

In this example we create a simple widget that renders a WidgetButton. A WidgetButton returns a button that will fit nicely in the header of the Dashboard.

Clone this wiki locally