QuarkIoE - 自定义小部件配置 - 多设备配置

时间:2018-05-17 09:42:25

标签: cumulocity

我们可以为每个设备配置具有c8y-property-selector属性的小部件,而不仅仅是一个设备吗?我想配置多个设备。有可能吗?

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

1 个答案:

答案 0 :(得分:0)

使用groupsSelectable: true,您可以选择一组设备,这些设备在目标资产设备选择器中显示为文件夹。因此,窗口小部件将应用于该组中的所有设备。目前,无法选择跨多个组的多个单独设备。

例如,警报列表小部件使用此选项显示来自一组设备的警报。如果您在此窗口小部件中选择一个组,它将显示以下内容: enter image description here

相关问题