rajmohan
rajmohan

Reputation: 1618

Cumulocity - Custom widget configuration - multi device config

can we configure widget with c8y-property-selector properties for each device, not just for one device? I want to configure for multiple devices. Is it possible?

c8yComponentsProvider.add({ // adds a menu item to the widget menu list with ...
   name: 'iconmap', // ... the identifier *"iconmap"* which has to be unique among the widgets in the application
   nameDisplay: gettext('Icon Map'), // ... the displayed name *"Icon Map"* 
   description: gettext('Displays a map with icons for devices instead of markers'), // ... a description
   templateUrl: ':::PLUGIN_PATH:::/views/iconmap.main.html', // ... displaying *"iconmap.main.html"* when added to the dashboard
   options: { 
      noDeviceTarget: false, 
      groupsSelectable: true 
   },
   configTemplateUrl: ':::PLUGIN_PATH:::/views/config.html'
});

enter image description here

Upvotes: 2

Views: 403

Answers (1)

Jan Hommes
Jan Hommes

Reputation: 5152

With groupsSelectable: true you are able to select a group of devices which is displayed as a folder in the in the target asset device selector. So the widget will be applied to all devices in this group. At the moment it is not possible to select multiple individual devices that are across multiple groups.

For example, the Alarm list widget uses this options to show alarms from a group of devices. It looks the following if you select a group in this widget: enter image description here

Upvotes: 0

Related Questions