In addition to creating a widget using widget generation wizard, you can implement your own custom widgets and use them within the Dashboard portal.
...
- Access the data provider configurations in
<SP_HOME>/deploment/web-ui-apps/portal/extensions/widgets/<WIDGET_NAME>/widgetConf.json
file as specified in Accessing Widget Configuration. - Use the base widget API to create the WebSocket connection. For this, you can use the following APIs:
Subscribe to the endpoint
API Syntax super.getWidgetChannelManager( ).subscribeWidget(<Widget id>, <Call back method to handle data>, <data provider configs>)
Example super.getWidgetChannelManager()
.subscribeWidget(this.props.id , this.handleDataReceived , dataProviderConfigs));
Unsubscribe from the endpoint
API Syntax super. getWidgetChannelManager(). unsubscribeWidget(<Widget ID>);
Example super.getWidgetChannelManager().unsubscribeWidget(this.props.id);