【问题标题】:Cumulocity - Custom widget configuration - multi device configCumulocity - 自定义小部件配置 - 多设备配置
【发布时间】:2018-10-27 12:48:08
【问题描述】:

我们可以为每个设备配置带有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'
});

【问题讨论】:

    标签: cumulocity


    【解决方案1】:

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

    例如,警报列表小部件 使用此选项来显示来自一组设备的警报。如果您在此小部件中选择一个组,它将如下所示:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-19
      • 1970-01-01
      • 1970-01-01
      • 2014-01-19
      • 1970-01-01
      • 1970-01-01
      • 2019-07-12
      • 2010-10-25
      相关资源
      最近更新 更多