@c8y/ng1-modules 1021.81.0 → 1022.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/alarmsEventsExplorer/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfig.html +1 -1
  2. package/assetPropertyWidget/img/asset-properties-widget-pr.png +0 -0
  3. package/assetPropertyWidget/views/config.html +1 -1
  4. package/assetTable/assetTable2/img/asset-table-widget-pr.png +0 -0
  5. package/assetTable/img/asset-table-widget-pr.png +0 -0
  6. package/core/core/services/audits.js +1 -1
  7. package/core/core/services/deviceShell.js +1 -1
  8. package/core/core/services/retentions.js +1 -1
  9. package/core/core/services/tenant.js +1 -1
  10. package/core/core/services/user.js +1 -1
  11. package/core/cumulocity.json +0 -1
  12. package/core/locales/de.po +481 -720
  13. package/core/locales/es.po +431 -671
  14. package/core/locales/fr.po +510 -751
  15. package/core/locales/ja_JP.po +503 -740
  16. package/core/locales/ko.po +431 -671
  17. package/core/locales/nl.po +433 -672
  18. package/core/locales/pl.po +431 -672
  19. package/core/locales/pt_BR.po +528 -768
  20. package/core/locales/zh_CN.po +431 -671
  21. package/core/locales/zh_TW.po +431 -671
  22. package/core/ui/properties/propertySelector.html +156 -109
  23. package/core/ui/services/measurementsReport.js +1 -1
  24. package/core/ui/views/auditList.html +2 -2
  25. package/core/ui/views/eventList.html +2 -2
  26. package/core/ui/views/filePicker.html +1 -1
  27. package/dataBroker/connectors/connectors.service.js +1 -1
  28. package/dataPointExplorer/img/data-points-graph-widget-pr.png +0 -0
  29. package/dataPointExplorer/views/widgetConfig.html +92 -94
  30. package/device-protocol-canbus/canbus-device.provider.js +1 -1
  31. package/device-protocol-canopen/canopen-device.provider.js +1 -1
  32. package/device-protocol-modbus/modbus-device.provider.js +1 -1
  33. package/device-protocol-opcua/opcua-device.provider.js +1 -1
  34. package/device-protocol-profibus/profibus-device.provider.js +1 -1
  35. package/device-protocols/device-protocol-import-button.component.js +1 -1
  36. package/device-protocols/object-mapping.component.js +1 -1
  37. package/device-protocols/object-mapping.html +1 -1
  38. package/deviceDatabase4/detail/device-type-detail.component.js +1 -1
  39. package/deviceDatabase4/device-database.service.js +1 -1
  40. package/deviceDatabase4/device-type-list.component.js +1 -1
  41. package/deviceDatabase4/modals/configure-discrete-io.html +1 -1
  42. package/deviceDatabase4/modals/configure-register.html +1 -1
  43. package/deviceDatabase4/modals/import-device-type.component.js +1 -1
  44. package/deviceDetail/cumulocity.json +1 -2
  45. package/deviceStatusWidget/deviceStatus.component.js +1 -1
  46. package/deviceStatusWidget/ownerStatus.html +2 -2
  47. package/deviceStatusWidget/requiredAvailabilityIntervalSetting.html +4 -4
  48. package/devicemanagement-eventList/index.js +1 -1
  49. package/enterpriseEdition/cumulocity.json +0 -13
  50. package/enterpriseEdition/enterpriseEdition.module.js +1 -1
  51. package/eventList/img/events-list-widget-pr.png +0 -0
  52. package/eventList/views/eventListConfig.html +39 -32
  53. package/export/cumulocity.json +0 -1
  54. package/export/index.js +1 -1
  55. package/export/services/config.js +1 -1
  56. package/htmlWidget/index.js +1 -1
  57. package/kpi/img/data-points-list-widget-pr.png +0 -0
  58. package/kpi/views/gaugeConfig.html +28 -34
  59. package/kpi/views/listConfig.html +14 -18
  60. package/kpi/views/pieChartConfig.html +30 -36
  61. package/modbusConfiguration4/fieldbus-device-list.component.js +1 -1
  62. package/modbusWidget4/modbus-widget.service.js +1 -1
  63. package/modbusWidget4/widget-config.component.js +1 -1
  64. package/modbusWidget4/widget-config.html +74 -84
  65. package/package.json +11 -13
  66. package/propertiesLibrary/index.js +1 -1
  67. package/roles/list/rolesList.html +0 -2
  68. package/scada/views/componentConfig.html +23 -23
  69. package/scada/views/mapping.html +41 -39
  70. package/smartRules/controllers/add.js +1 -1
  71. package/smartRules/controllers/list.js +1 -1
  72. package/smartRules/list/smartRulesList.component.js +1 -1
  73. package/smartRules/list/smartRulesList.html +2 -2
  74. package/smartRules/services/smartRules.js +1 -1
  75. package/smartRules/views/add.html +32 -10
  76. package/smartRules/views/list.html +4 -3
  77. package/trafficLightWidget/states-mapping.html +82 -69
  78. package/administration-config/administration-config.module.js +0 -1
  79. package/administration-config/cumulocity.json +0 -13
  80. package/asset-notes/assetNotes.component.js +0 -1
  81. package/asset-notes/assetNotes.html +0 -93
  82. package/asset-notes/assetNotes.module.js +0 -1
  83. package/asset-notes/assetNotes.service.js +0 -1
  84. package/asset-notes/cumulocity.json +0 -13
  85. package/core/ui/forms/ssh-key-input.html +0 -33
  86. package/core/ui/forms/ssh-key-input.js +0 -1
  87. package/devicemanagement-deviceListMap/controllers/deviceListMap.js +0 -1
  88. package/devicemanagement-deviceListMap/cumulocity.json +0 -19
  89. package/devicemanagement-deviceListMap/index.js +0 -1
  90. package/devicemanagement-deviceListMap/views/index.html +0 -21
  91. package/enterpriseEdition/customBranding/brandingConfiguration.constants.js +0 -1
  92. package/enterpriseEdition/customBranding/brandingConfiguration.service.js +0 -1
  93. package/enterpriseEdition/customBranding/brandingConfigurationForm.component.js +0 -1
  94. package/enterpriseEdition/customBranding/brandingConfigurationForm.html +0 -141
  95. package/enterpriseEdition/customBranding/brandingConfigurationUi.provider.js +0 -1
  96. package/enterpriseEdition/customBranding/brandingDeploy.service.js +0 -1
  97. package/enterpriseEdition/customBranding/brandingProcessExecution.component.js +0 -1
  98. package/enterpriseEdition/customBranding/brandingProcessExecution.html +0 -120
  99. package/enterpriseEdition/customBranding/custom-branding.module.js +0 -1
  100. package/enterpriseEdition/customBranding/microservice.value.js +0 -1
  101. package/enterpriseEdition/ui-assets/index.js +0 -1
  102. package/enterpriseEdition/ui-assets/public-options.service.js +0 -1
  103. package/enterpriseEdition/ui-assets/static-assets.service.js +0 -1
  104. package/enterpriseEdition/ui-assets/ui-assets.service.js +0 -1
  105. package/export/controllers/list.js +0 -1
  106. package/export/views/list.html +0 -298
  107. package/remoteAccess/clients/remoteAccessClients.service.js +0 -1
  108. package/remoteAccess/clients/terminal/index.html +0 -30
  109. package/remoteAccess/clients/terminal/index.js +0 -1
  110. package/remoteAccess/clients/terminal/shell-adapter.js +0 -1
  111. package/remoteAccess/clients/terminal/style.css +0 -25
  112. package/remoteAccess/clients/terminal/telnet-negotiator.js +0 -1
  113. package/remoteAccess/clients/vnc/vncClient.html +0 -60
  114. package/remoteAccess/clients/vnc/vncClient.js +0 -1
  115. package/remoteAccess/cumulocity.json +0 -69
  116. package/remoteAccess/remoteAccess.module.js +0 -1
  117. package/remoteAccess/remoteAccess.service.js +0 -1
  118. package/remoteAccess/remoteAccessEndpointCard/remoteAccessEndpointCard.component.js +0 -1
  119. package/remoteAccess/remoteAccessEndpointCard/remoteAccessEndpointCard.html +0 -89
  120. package/remoteAccess/remoteAccessEndpointModal/remoteAccessEndpointModal.component.js +0 -1
  121. package/remoteAccess/remoteAccessEndpointModal/remoteAccessEndpointModal.html +0 -484
  122. package/remoteAccess/remoteAccessEndpointModal/suggestedIPAddressTemplate.html +0 -8
  123. package/remoteAccess/remoteAccessEndpointsList/remoteAccessEndpointsList.component.js +0 -1
  124. package/remoteAccess/remoteAccessEndpointsList/remoteAccessEndpointsList.html +0 -75
  125. package/remoteAccess/remoteAccessSettings/remoteAccessSettings.component.js +0 -1
  126. package/remoteAccess/remoteAccessSettings/remoteAccessSettings.html +0 -37
  127. package/remoteAccess/remoteAccessUI.provider.js +0 -1
@@ -1,9 +1,8 @@
1
1
  <div
2
- class="p-t-8"
3
2
  ng-controller="ScadaWidgetConfigCtrl as ctrl"
4
3
  >
5
- <div>
6
- <label>
4
+ <fieldset class="c8y-fieldset">
5
+ <legend class="d-flex a-i-center">
7
6
  <span translate>SVG</span>
8
7
  <button
9
8
  class="btn-help btn-help--sm"
@@ -15,7 +14,7 @@
15
14
  popover-append-to-body="true"
16
15
  ng-click="svgTooltipVisible = !svgTooltipVisible"
17
16
  ></button>
18
- </label>
17
+ </legend>
19
18
 
20
19
  <div
21
20
  class="alert alert-info text-left"
@@ -24,33 +23,33 @@
24
23
  <p translate>
25
24
  For placeholder to be recognized it needs to be used at least once in curly braces with no
26
25
  other expression, for example,
27
- <var ng-bind-html="'\{\{&nbsp;placeholderName`KEEP_ORIGINAL`&nbsp;\}\}'"></var>
26
+ <code ng-bind-html="'\{\{&nbsp;placeholderName`KEEP_ORIGINAL`&nbsp;\}\}'"></code>
28
27
  . Then you can use this placeholderName`KEEP_ORIGINAL` in bindings handled by Angular. There
29
28
  are also predefined functions available:
30
29
  </p>
31
- <ul>
30
+ <ul class="p-l-16">
32
31
  <li>
33
- <var ng-non-bindable>goToGroupDetails(groupId)</var>
32
+ <code ng-non-bindable>goToGroupDetails(groupId)</code>
34
33
  &ndash;
35
34
  <translate>
36
35
  takes the group ID and redirects the user to the group details view, for example:
37
36
  </translate>
38
37
  <br />
39
- <var ng-non-bindable>&lt;… ng-click="goToGroupDetails(groupId)"&gt;</var>
38
+ <code ng-non-bindable>&lt;… ng-click="goToGroupDetails(groupId)"&gt;</code>
40
39
  ,
41
40
  </li>
42
41
  <li>
43
- <var ng-non-bindable>goToDeviceDetails(deviceId)</var>
42
+ <code ng-non-bindable>goToDeviceDetails(deviceId)</code>
44
43
  &ndash;
45
44
  <translate>
46
45
  takes the device ID and redirects the user to the device details view, for example:
47
46
  </translate>
48
47
  <br />
49
- <var ng-non-bindable>&lt;… ng-click="goToDeviceDetails(deviceId)"&gt;</var>
48
+ <code ng-non-bindable>&lt;… ng-click="goToDeviceDetails(deviceId)"&gt;</code>
50
49
  ,
51
50
  </li>
52
51
  <li>
53
- <var ng-non-bindable>getActiveAlarmsStatusClass(alarmsStatus)</var>
52
+ <code ng-non-bindable>getActiveAlarmsStatusClass(alarmsStatus)</code>
54
53
  &ndash;
55
54
  <translate>
56
55
  takes the alarm status object and returns a CSS class that can be used for styling:
@@ -58,13 +57,21 @@
58
57
  critical`KEEP_ORIGINAL`, for example:
59
58
  </translate>
60
59
  <br />
61
- <var ng-non-bindable>&lt;… ng-class="getActiveAlarmsStatusClass(alarmsStatus)"&gt;</var>
60
+ <code ng-non-bindable>&lt;… ng-class="getActiveAlarmsStatusClass(alarmsStatus)"&gt;</code>
62
61
  .
63
62
  </li>
64
63
  </ul>
65
64
  </div>
66
-
67
65
  <div class="form-group">
66
+ <file-picker
67
+ files="ctrl.files"
68
+ multiple="false"
69
+ display-drop-zone="false"
70
+ on-file-selected="ctrl.onSelectFile(ctrl.files[0].file)"
71
+ ></file-picker>
72
+ <input type="hidden" />
73
+ </div>
74
+ <div class="form-group form-group-sm">
68
75
  <label
69
76
  for="sanitization"
70
77
  translate
@@ -100,16 +107,8 @@
100
107
  </select>
101
108
  </div>
102
109
  </div>
103
- <div class="form-group">
104
- <file-picker
105
- files="ctrl.files"
106
- multiple="false"
107
- display-drop-zone="false"
108
- on-file-selected="ctrl.onSelectFile(ctrl.files[0].file)"
109
- ></file-picker>
110
- <input type="hidden" />
111
- </div>
112
- </div>
110
+ </fieldset>
111
+
113
112
  <div class="form-group p-t-16">
114
113
  <label class="input-group">{{ 'Preview' | translate }}</label>
115
114
  <span
@@ -149,6 +148,7 @@
149
148
  </div>
150
149
  </div>
151
150
  </div>
151
+
152
152
  <div
153
153
  name="mapping"
154
154
  c8y-scada-mapping
@@ -1,5 +1,5 @@
1
- <div class="svg-mappings">
2
- <label>{{ 'Mappings' | translate }}</label>
1
+ <fieldset class="c8y-fieldset svg-mappings">
2
+ <legend>{{ 'Mappings' | translate }}</legend>
3
3
  <ul class="c8y-list__group c8y-list__group--strip">
4
4
  <li class="c8y-list__item" ng-repeat="mapping in mappings | orderBy:'placeholder'">
5
5
  <div class="c8y-list__item__block d-block">
@@ -60,7 +60,7 @@
60
60
  </span>
61
61
  </div>
62
62
  </div>
63
- <div class="col-md-4">
63
+ <div class="col-md-8">
64
64
  <label class="text-label-small d-block" translate>Current value</label>
65
65
  <div class="form-control-static" title="{{ propertyValueFor(mapping) }}">
66
66
  <span class="text-truncate text-monospace">
@@ -68,46 +68,48 @@
68
68
  </span>
69
69
  </div>
70
70
  </div>
71
- <div class="col-md-4">
71
+ <div class="col-xs-12">
72
72
  <label class="text-label-small d-block" translate>Actions</label>
73
- <button
74
- class="btn btn-default btn-sm"
75
- type="button"
76
- uib-tooltip="{{ 'Clear mapping' | translate }}"
77
- tooltip-append-to-body="true"
78
- tooltip-popup-delay="500"
79
- aria-label="{{ 'Clear mapping' | translate }}"
80
- ng-click="clearMapping(mapping)"
81
- ng-disabled="!mapping.config"
82
- >
83
- <i c8y-icon="delete-document"></i>
84
- </button>
85
- <button
86
- class="btn btn-default btn-sm"
87
- type="button"
88
- uib-tooltip="{{ 'Assign fieldbus property' | translate }}"
89
- tooltip-append-to-body="true"
90
- tooltip-popup-delay="500"
91
- aria-label="{{ 'Assign fieldbus property' | translate }}"
92
- ng-click="setFieldbusMapping(mapping)"
93
- >
94
- <i c8y-icon="tasks"></i>
95
- </button>
96
- <button
97
- class="btn btn-default btn-sm"
98
- type="button"
99
- uib-tooltip="{{ 'Assign device property' | translate }}"
100
- tooltip-append-to-body="true"
101
- tooltip-popup-delay="500"
102
- aria-label="{{ 'Assign device property' | translate }}"
103
- ng-click="setMapping(mapping)"
104
- >
105
- <i c8y-icon="edit"></i>
106
- </button>
73
+ <div class="btn-group">
74
+ <button
75
+ class="btn btn-default btn-sm"
76
+ type="button"
77
+ uib-tooltip="{{ 'Clear mapping' | translate }}"
78
+ tooltip-append-to-body="true"
79
+ tooltip-popup-delay="500"
80
+ aria-label="{{ 'Clear mapping' | translate }}"
81
+ ng-click="clearMapping(mapping)"
82
+ ng-disabled="!mapping.config"
83
+ >
84
+ <i c8y-icon="delete-document"></i>
85
+ </button>
86
+ <button
87
+ class="btn btn-default btn-sm"
88
+ type="button"
89
+ uib-tooltip="{{ 'Assign fieldbus property' | translate }}"
90
+ tooltip-append-to-body="true"
91
+ tooltip-popup-delay="500"
92
+ aria-label="{{ 'Assign fieldbus property' | translate }}"
93
+ ng-click="setFieldbusMapping(mapping)"
94
+ >
95
+ <i c8y-icon="tasks"></i>
96
+ </button>
97
+ <button
98
+ class="btn btn-default btn-sm"
99
+ type="button"
100
+ uib-tooltip="{{ 'Assign device property' | translate }}"
101
+ tooltip-append-to-body="true"
102
+ tooltip-popup-delay="500"
103
+ aria-label="{{ 'Assign device property' | translate }}"
104
+ ng-click="setMapping(mapping)"
105
+ >
106
+ <i c8y-icon="edit"></i>
107
+ </button>
108
+ </div>
107
109
  </div>
108
110
  </div>
109
111
  </div>
110
112
  </div>
111
113
  </li>
112
114
  </ul>
113
- </div>
115
+ </fieldset>
@@ -1 +1 @@
1
- (()=>{function n(n,e,o,c,t,l,r,u){var i=[],a={loading:!0};function s(){a.loading=!1}function f(n){return _.filter(n,function(n){return!n.hideFromList})}function h(n){var t,e=_.keys(l);return 0===e.length?n:_.filter(n,function(n){return!!(n.contexts&&(t=_.keys(n.contexts),0<_.intersection(e,t).length))})}function m(n){return _.filter(n,function(n){return!r||r(n)})}function d(n){n.forEach(function(n){i.push(n)})}function g(){1===i.length&&i[0]._active&&v(i[0])}function v(n){var t,r,i;return t=n._active?c.createInstanceWithUI(n,(i={},n=(r=n).contexts&&_.intersection(_.keys(l),_.keys(r.contexts))||[],_.forEach(n,function(n){var e={obj:l[n]},c={rule:i};_.forEach(r.contexts[n],function(n,t){t=o("obj.".concat(t)),n=o("rule.".concat(n)),t=t(e);null!=t&&n.assign(c,t)})}),_.assign(i,u))).then(e.close):t}n.ruleTemplates=i,n.cancel=function(){e.dismiss()},n.createInstance=v,n.loading=a,t.list().then(f).then(h).then(m).then(d).then(g).finally(s)}n.$inject=["$scope","$uibModalInstance","$parse","smartRulesSvc","smartRuleTemplatesSvc","context","ruleTemplatesFilterFn","ruleInitialObj"],angular.module("c8y.smartRules").controller("SmartRuleAddCtrl",n)})();
1
+ (()=>{function n(n,e,o,c,t,l,r,u){var i=[],a={loading:!0};function s(){a.loading=!1}function f(n){return _.filter(n,function(n){return!n.hideFromList})}function h(n){var t,e=_.keys(l);return 0===e.length?n:_.filter(n,function(n){return!!(n.contexts&&(t=_.keys(n.contexts),0<_.intersection(e,t).length))})}function g(n){return _.filter(n,function(n){return!r||r(n)})}function m(n){n.forEach(function(n){i.push(n)})}function d(){1===i.length&&i[0]._active&&v(i[0])}function v(n){var t,r,i;return t=n._active?c.createInstanceWithUI(n,(i={},n=(r=n).contexts&&_.intersection(_.keys(l),_.keys(r.contexts))||[],_.forEach(n,function(n){var e={obj:l[n]},c={rule:i};_.forEach(r.contexts[n],function(n,t){t=o("obj.".concat(t)),n=o("rule.".concat(n)),t=t(e);null!=t&&n.assign(c,t)})}),_.assign(i,u))).then(e.close):t}n.ruleTemplates=i,n.cancel=function(){e.dismiss()},n.createInstance=v,n.loading=a,n.icon=c.getRuleIcon(),t.list().then(f).then(h).then(g).then(m).then(d).finally(s)}n.$inject=["$scope","$uibModalInstance","$parse","smartRulesSvc","smartRuleTemplatesSvc","context","ruleTemplatesFilterFn","ruleInitialObj"],angular.module("c8y.smartRules").controller("SmartRuleAddCtrl",n)})();
@@ -1 +1 @@
1
- (()=>{function e(i,r,e,o,t,n,a,P,c,u,l,s,d,f,h,g,m,v){var p,S=r.deviceId||r.groupId,C={},A={},R={done:!1,inProgress:!1},y={true:{text:m("Enabled`rule`"),icon:"check-circle",cls:"text-success"},false:{text:m("Disabled`rule`"),icon:"ban",cls:"text-danger"}},x=s.getContext(),E=m("Global smart rules");function b(){return o.when().then(T).then(k).then(D).then(w).then(I).catch(j)}function T(){R.inProgress=!0}function I(){R.inProgress=!1,R.done=!0,R.error=!1}function j(e){e.data&&e.data.message&&l.danger(e.data.message),R.inProgress=!1,R.done=!0,R.error=!0}function k(){return h.list().then($)}function $(e){_.forEach(e||[],function(e){C[e.name]=e})}function D(){var e=S?g.listByContext(S):o.resolve([]),t=f.hasPermissions().then(function(e){return e?g.list():o.when([])});return o.all({listByContext:e,list:t}).then(function(e){i.rules=(e=>{var t=e;return t=S?_.reject(e,(e=>{var n=new RegExp("".concat(e,"/dashboard"));return function(e){var t=_.get(e,"config.url","");return N(e)&&!n.test(t)}})(S)):t})(_.concat(e.listByContext,e.list))})}function N(e){return"sendDashboardsViaEmail"===e.ruleTemplateName}function O(e){return g.hasSource(e,S)}function w(){var e,t;return!(Array.isArray(i.rules)&&0<i.rules.length)||null===(t=s.getContext()).context?o.resolve():(e=a.childAssets(t.id,{skipDetail:!0,params:{pageSize:2e3,withChildren:!1}}),t=a.childDevices(t.id,{params:{pageSize:2e3,withChildren:!1}}),o.all([e,t]).then(_.flatten).then(function(e){i.children=e}).then(function(){i.ruleChildren={},_.forEach(i.rules,function(e){i.ruleChildren[e.id]=M(e)})}))}function M(t){return _.filter(i.children,function(e){return g.hasSource(t,e)})}function U(e){var t=_.get(C,"".concat(_.get(e,"ruleTemplateName"),"._active")),n=A.canAddRules;return e&&!t&&(n=!1),_.isUndefined(n)&&(e=i.context?c.isAllowed({adminMOs:[i.context.id]}):o.all({isAllowedInventory:c.isAllowed({anyRole:["ROLE_INVENTORY_ADMIN","ROLE_MANAGED_OBJECT_ADMIN"]}),isAllowedSmartRules:c.isAllowed({anyRole:["ROLE_SMARTRULE_ADMIN","ROLE_CEP_MANAGEMENT_ADMIN"]})}).then(function(e){return e.isAllowedInventory&&e.isAllowedSmartRules}),A.canAddRules=e.then(function(e){return A.canAddRules=e,A.canAddRules}),n=!1),n}function G(t){A.rules=A.rules||{};var n=A.rules,e=n[t.id];return _.isUndefined(e)&&(n[t.id]=c.isAllowed({adminMOs:[t.id]}).then(function(e){return n[t.id]=e,n[t.id]}),e=!1),e}function L(e){var t=!0;return t=x.context!==s.CONTEXT.DEVICE&&x.context!==s.CONTEXT.GROUP?t:t&&e&&"c8y_SmartRule"!==e.type}_.assign(i,{isOpen:{},moId:S,loadingStatus:R,refresh:b,paging:{refresh:b},ruleTemplates:C,getLinkToDM:function(){var e={deviceId:S};return t(p||"")(e)},add:function(){g.addNewWithUI().then(b)},edit:function(e){g.editWithUI(e).then(b)},clone:function(e){var t=e&&e.c8y_Context&&e.c8y_Context.id;(t?g.cloneWithUI(e,t,!0):g.cloneWithUI(e)).then(b)},remove:function(e){u({title:m("Delete smart rule"),body:v.getString('You are about to delete smart rule "{{name}}". Do you want to proceed?',e),labels:{ok:m("Delete")},status:"danger"}).then(angular.bind(g,g.remove,e)).then(function(){return _.pull(i.rules,e)}).then(function(){return l.success(m("Smart rule deleted."))})},hasSource:O,getChildrenEnabledForSmartRule:M,toggleRuleActivationForContextMO:function(e){if(O(e))return g.deactivate(e,S,!1).then(function(){l.success(v.getString('Smart rule "{{name}}" deactivated.',e))});return g.activate(e,S,!1).then(function(){l.success(v.getString('Smart rule "{{name}}" activated.',e))})},toggleRuleActivationForChildrenMOs:function(e,n){var t=_.filter(n,function(t){return!_.find(i.ruleChildren[e.id],function(e){return e.id===t.id})}),r=_.filter(i.ruleChildren[e.id],function(t){return!_.find(n,function(e){return t.id===e.id})});return g.updateSources(e,t,r,!1).then(D).then(w).then(function(){l.success(v.getString('Smart rule "{{name}}" activated/deactivated for children.',e))})},tooltip:function(e){var t={activate:{"for group":m("Activate for this group"),"for device":m("Activate for this device"),"for object":m("Activate for this object")},deactivate:{"for group":m("Deactivate for this group"),"for device":m("Deactivate for this device"),"for object":m("Deactivate for this object")}},e=e.enabled&&O(e)?"deactivate":"activate",n=r.groupId?s.CONTEXT.GROUP:"object";return n=r.deviceId?s.CONTEXT.DEVICE:n,t[e]["for ".concat(n)]},type:function(e){var t,e=C[e.ruleTemplateName];e&&(t=e.label.full?v.getString(e.label.full):"".concat(v.getString(e.label.input)," ").concat(v.getString(e.label.output)));return t},status:function(e){return y[e.enabled].text},statusIcon:function(e){return y[e.enabled].icon},statusClass:function(e){return y[e.enabled].cls},showTitle:function(){return null!==s.getContext().context},title:E,context:x,inputIcon:function(e){var t,e=C[e.ruleTemplateName];e&&(t=e.paramGroups.input.icon);return t},outputIcon:function(e){var t,e=C[e.ruleTemplateName];e&&(t=e.paramGroups.output.icon);return t},canAddRules:U,canDuplicate:function(e){return U(e)&&L(e)},canEdit:function(e){return G(e)&&L(e)},canRemove:G,canModify:G,canApplyOnChildren:function(e){return!N(e)},canSeeSection:function(){var e=A.canSeeSection;_.isUndefined(e)&&(A.canSeeSection=(n.checkIfModulesExist(["c8y.cockpit.config"])?f.shouldShowLocalSmartRules():o.when(!1)).then(function(e){return A.canSeeSection=e,A.canSeeSection}),e=!1);return e},isConfigurationGlobalSmartRulesContext:void 0,getRuleCardTitle:function(e){return"c8y_SmartRule"===e.type?m("Global smart rule"):m("Local smart rule")}}),i.isConfigurationGlobalSmartRulesContext=e.path().includes("/rules"),b(),null===s.getContext().context&&d.changeTitle({title:E}),x.context===s.CONTEXT.DEVICE&&n.getStaticLinkTemplate("devicemanagementDeviceDetails").then(function(e){p=e})}e.$inject=["$scope","$routeParams","$location","$q","$interpolate","c8yBase","c8yInventory","c8yApplication","c8yPermissions","c8yModal","c8yAlert","c8yUiUtil","c8yTitle","c8ySmartRulesAvailability","smartRuleTemplatesSvc","smartRulesSvc","gettext","gettextCatalog"],angular.module("c8y.smartRules").controller("SmartRulesListCtrl",e)})();
1
+ (()=>{function e(i,r,e,o,t,n,a,P,c,u,l,s,d,f,h,g,m,v){var p,S=r.deviceId||r.groupId,C={},R={},A={done:!1,inProgress:!1},y={true:{text:m("Enabled`rule`"),icon:"check-circle",cls:"text-success"},false:{text:m("Disabled`rule`"),icon:"ban",cls:"text-danger"}},x=s.getContext(),E=m("Global smart rules");function b(){return o.when().then(I).then(k).then(D).then(w).then(T).catch(j)}function I(){A.inProgress=!0}function T(){A.inProgress=!1,A.done=!0,A.error=!1}function j(e){e.data&&e.data.message&&l.danger(e.data.message),A.inProgress=!1,A.done=!0,A.error=!0}function k(){return h.list().then($)}function $(e){_.forEach(e||[],function(e){C[e.name]=e})}function D(){var e=S?g.listByContext(S):o.resolve([]),t=f.hasPermissions().then(function(e){return e?g.list():o.when([])});return o.all({listByContext:e,list:t}).then(function(e){i.rules=(e=>{var t=e;return t=S?_.reject(e,(e=>{var n=new RegExp("".concat(e,"/dashboard"));return function(e){var t=_.get(e,"config.url","");return N(e)&&!n.test(t)}})(S)):t})(_.concat(e.listByContext,e.list))})}function N(e){return"sendDashboardsViaEmail"===e.ruleTemplateName}function O(e){return g.hasSource(e,S)}function w(){var e,t;return!(Array.isArray(i.rules)&&0<i.rules.length)||null===(t=s.getContext()).context?o.resolve():(e=a.childAssets(t.id,{skipDetail:!0,params:{pageSize:2e3,withChildren:!1}}),t=a.childDevices(t.id,{params:{pageSize:2e3,withChildren:!1}}),o.all([e,t]).then(_.flatten).then(function(e){i.children=e}).then(function(){i.ruleChildren={},_.forEach(i.rules,function(e){i.ruleChildren[e.id]=M(e)})}))}function M(t){return _.filter(i.children,function(e){return g.hasSource(t,e)})}function U(e){var t=_.get(C,"".concat(_.get(e,"ruleTemplateName"),"._active")),n=R.canAddRules;return e&&!t&&(n=!1),_.isUndefined(n)&&(e=i.context?c.isAllowed({adminMOs:[i.context.id]}):o.all({isAllowedInventory:c.isAllowed({anyRole:["ROLE_INVENTORY_ADMIN","ROLE_MANAGED_OBJECT_ADMIN"]}),isAllowedSmartRules:c.isAllowed({anyRole:["ROLE_SMARTRULE_ADMIN","ROLE_CEP_MANAGEMENT_ADMIN"]})}).then(function(e){return e.isAllowedInventory&&e.isAllowedSmartRules}),R.canAddRules=e.then(function(e){return R.canAddRules=e,R.canAddRules}),n=!1),n}function G(t){R.rules=R.rules||{};var n=R.rules,e=n[t.id];return _.isUndefined(e)&&(n[t.id]=c.isAllowed({adminMOs:[t.id]}).then(function(e){return n[t.id]=e,n[t.id]}),e=!1),e}function L(e){var t=!0;return t=x.context!==s.CONTEXT.DEVICE&&x.context!==s.CONTEXT.GROUP?t:t&&e&&"c8y_SmartRule"!==e.type}_.assign(i,{isOpen:{},moId:S,loadingStatus:A,refresh:b,paging:{refresh:b},ruleTemplates:C,getLinkToDM:function(){var e={deviceId:S};return t(p||"")(e)},add:function(){g.addNewWithUI().then(b)},edit:function(e){g.editWithUI(e).then(b)},clone:function(e){var t=e&&e.c8y_Context&&e.c8y_Context.id;(t?g.cloneWithUI(e,t,!0):g.cloneWithUI(e)).then(b)},remove:function(e){u({title:m("Delete smart rule"),body:v.getString('You are about to delete smart rule "{{name}}". Do you want to proceed?',e),labels:{ok:m("Delete")},status:"danger"}).then(angular.bind(g,g.remove,e)).then(function(){return _.pull(i.rules,e)}).then(function(){return l.success(m("Smart rule deleted."))})},hasSource:O,getChildrenEnabledForSmartRule:M,toggleRuleActivationForContextMO:function(e){if(O(e))return g.deactivate(e,S,!1).then(function(){l.success(v.getString('Smart rule "{{name}}" deactivated.',e))});return g.activate(e,S,!1).then(function(){l.success(v.getString('Smart rule "{{name}}" activated.',e))})},toggleRuleActivationForChildrenMOs:function(e,n){var t=_.filter(n,function(t){return!_.find(i.ruleChildren[e.id],function(e){return e.id===t.id})}),r=_.filter(i.ruleChildren[e.id],function(t){return!_.find(n,function(e){return t.id===e.id})});return g.updateSources(e,t,r,!1).then(D).then(w).then(function(){l.success(v.getString('Smart rule "{{name}}" activated/deactivated for children.',e))})},tooltip:function(e){var t={activate:{"for group":m("Activate for this group"),"for device":m("Activate for this device"),"for object":m("Activate for this object")},deactivate:{"for group":m("Deactivate for this group"),"for device":m("Deactivate for this device"),"for object":m("Deactivate for this object")}},e=e.enabled&&O(e)?"deactivate":"activate",n=r.groupId?s.CONTEXT.GROUP:"object";return n=r.deviceId?s.CONTEXT.DEVICE:n,t[e]["for ".concat(n)]},type:function(e){var t,e=C[e.ruleTemplateName];e&&(t=e.label.full?v.getString(e.label.full):"".concat(v.getString(e.label.input)," ").concat(v.getString(e.label.output)));return t},status:function(e){return y[e.enabled].text},statusIcon:function(e){return y[e.enabled].icon},statusClass:function(e){return y[e.enabled].cls},showTitle:function(){return null!==s.getContext().context},title:E,context:x,inputIcon:function(e){var t,e=C[e.ruleTemplateName];e&&(t=e.paramGroups.input.icon);return t},outputIcon:function(e){var t,e=C[e.ruleTemplateName];e&&(t=e.paramGroups.output.icon);return t},canAddRules:U,canDuplicate:function(e){return U(e)&&L(e)},canEdit:function(e){return G(e)&&L(e)},canRemove:G,canModify:G,canApplyOnChildren:function(e){return!N(e)},canSeeSection:function(){var e=R.canSeeSection;_.isUndefined(e)&&(R.canSeeSection=(n.checkIfModulesExist(["c8y.cockpit.config"])?f.shouldShowLocalSmartRules():o.when(!1)).then(function(e){return R.canSeeSection=e,R.canSeeSection}),e=!1);return e},isConfigurationGlobalSmartRulesContext:void 0,getRuleCardTitle:function(e){return"c8y_SmartRule"===e.type?m("Global smart rule"):m("Local smart rule")},getRuleIcon:function(e){return g.getRuleIcon(e)}}),i.isConfigurationGlobalSmartRulesContext=e.path().includes("/rules"),b(),null===s.getContext().context&&d.changeTitle({title:E}),x.context===s.CONTEXT.DEVICE&&n.getStaticLinkTemplate("devicemanagementDeviceDetails").then(function(e){p=e})}e.$inject=["$scope","$routeParams","$location","$q","$interpolate","c8yBase","c8yInventory","c8yApplication","c8yPermissions","c8yModal","c8yAlert","c8yUiUtil","c8yTitle","c8ySmartRulesAvailability","smartRuleTemplatesSvc","smartRulesSvc","gettext","gettextCatalog"],angular.module("c8y.smartRules").controller("SmartRulesListCtrl",e)})();
@@ -1 +1 @@
1
- (()=>{function e(e,r,i,t,n,o,c,a,u,l,s,d,f,h){var m=this,v={},g={},p={done:!1,inProgress:!1},A={true:{text:f("Active`rule`"),icon:"check-circle",cls:"text-success"},false:{text:f("Inactive`rule`"),icon:"ban",cls:"text-warning"}};function R(){return i.when().then(S).then(x).then(b).then(N).then(C).catch(E)}function S(){p.inProgress=!0}function C(){p.inProgress=!1,p.done=!0,p.error=!1}function E(e){e.data&&e.data.message&&a.danger(e.data.message),p.inProgress=!1,p.done=!0,p.error=!0}function x(){return s.list().then(y)}function y(e){_.forEach(e,function(e){v[e.name]=e})}function b(){var e=m.mo?d.listByContext(m.mo):i.resolve([]),t=l.hasPermissions().then(function(e){return e?d.list():i.when([])});return i.all({listByContext:e,list:t}).then(function(e){m.rules=(e=>(m.mo&&(e=_.reject(e,(e=>{var n=new RegExp("".concat(e,"/dashboard"));return function(e){var t=_.get(e,"config.url","");return I(e)&&!n.test(t)}})(m.mo))),e=m.filter?_.filter(e,m.filter):e))(_.concat(e.listByContext,e.list)),"function"==typeof m.onRules&&m.onRules()(m.rules)})}function I(e){return"sendDashboardsViaEmail"===e.ruleTemplateName}function T(e){return d.hasSource(e,m.mo)}function N(){var e,t;return Array.isArray(m.rules)&&0<m.rules.length&&(e=u.getContext(),t=(e=>(e=e.id,m.mo?_.get(m,"mo.id")||m.mo:e))(e),null!==e.context)?n.childAssets(t,{skipDetail:!0,params:{pageSize:2e3,withChildren:!1}}).then(function(e){m.children=e}).then(function(){m.ruleChildren={},_.forEach(m.rules,function(e){m.ruleChildren[e.id]=O(e)})}):i.resolve()}function O(t){return _.filter(m.children,function(e){return t.enabled&&d.hasSource(t,e)})}function w(){var e,t=g.canAddRules;return _.isUndefined(t)&&(e=m.context?c.isAllowed({adminMOs:[m.context.id]}):i.all({isAllowedInventory:c.isAllowed({anyRole:["ROLE_INVENTORY_ADMIN","ROLE_MANAGED_OBJECT_ADMIN"]}),isAllowedSmartRules:c.isAllowed({anyRole:["ROLE_SMARTRULE_ADMIN","ROLE_CEP_MANAGEMENT_ADMIN"]})}).then(function(e){return e.isAllowedInventory&&e.isAllowedSmartRules}),g.canAddRules=e.then(function(e){return g.canAddRules=e,g.canAddRules}),t=!1),t}function D(t){g.rules=g.rules||{};var n=g.rules,e=n[t.id];return _.isUndefined(e)&&(n[t.id]=c.isAllowed({adminMOs:[t.id]}).then(function(e){return n[t.id]=e,n[t.id]}),e=!1),e}function M(e){var t=!0;return t=m.context.context!==u.CONTEXT.DEVICE&&m.context.context!==u.CONTEXT.GROUP&&m.context.context!==u.CONTEXT.APPLICATION&&"ecosystem/microservice/microservices"!==m.context.context?t:t&&e&&"c8y_SmartRule"!==e.type}_.assign(m,{ruleTemplates:v,loadingStatus:p,isOpen:{},listClass:"interact-list",$onInit:function(){m.context=u.getContext(),e.$on("smartRulesListReload",R),R()},add:function(){d.addNewWithUI().then(R)},edit:function(e){d.editWithUI(e,m.mo).then(R)},clone:function(e){d.cloneWithUI(e,m.mo).then(R)},remove:function(e){t({title:f("Delete smart rule"),body:h.getString('You are about to delete smart rule "{{name}}". Do you want to proceed?',e),status:"danger",labels:{ok:f("Delete")}}).then(d.remove.bind(d,e)).then(function(){return _.pull(m.rules,e)}).then(function(){return a.success(f("Smart rule deleted."))})},hasSource:T,getChildrenEnabledForSmartRule:O,toggleRuleActivationForContextMO:function(e){if(e.enabled&&T(e))return d.deactivate(e,m.mo,!1).then(function(){a.success(h.getString('Smart rule "{{name}}" deactivated.',e))});return d.activate(e,m.mo,!1).then(function(){a.success(h.getString('Smart rule "{{name}}" activated.',e))})},toggleRuleActivationForChildrenMOs:function(t,n){var r=[];return _.forEach(n,function(e){_.find(m.ruleChildren[t.id],{id:e.id})||r.push(d.activate(t,e,!1))}),_.forEach(m.ruleChildren[t.id],function(e){_.find(n,{id:e.id})||r.push(d.deactivate(t,e,!1))}),i.all(r).then(b).then(N).then(function(){a.success(h.getString('Smart rule "{{name}}" activated/deactivated for children.',t))})},tooltip:function(e){var t,n={activate:{"for group":f("Activate for this group."),"for device":f("Activate for this device."),"for object":f("Activate for this object.")},deactivate:{"for group":f("Deactivate for this group."),"for device":f("Deactivate for this device."),"for object":f("Deactivate for this object.")}},e=e.enabled&&T(e)?"deactivate":"activate";t=r.deviceId?u.CONTEXT.DEVICE:r.groupId?u.CONTEXT.GROUP:"object";return n[e]["for ".concat(t)]},type:function(e){var t,e=v[e.ruleTemplateName];e&&(t=e.label.full?h.getString(e.label.full):"".concat(h.getString(e.label.input)," ").concat(h.getString(e.label.output)));return t},status:function(e){e=e.enabled&&T(e);return A[e].text},statusIcon:function(e){e=e.enabled&&T(e);return A[e].icon},statusClass:function(e){e=e.enabled&&T(e);return A[e].cls},context:u.getContext(),inputIcon:function(e){var t,e=v[e.ruleTemplateName];e&&(t=e.paramGroups.input.icon);return t},outputIcon:function(e){var t,e=v[e.ruleTemplateName];e&&(t=e.paramGroups.output.icon);return t},canDuplicate:function(e){return w()&&M(e)},canEdit:function(e){return D(e)&&M(e)},canRemove:D,canAddRules:w,canModify:D,canApplyOnChildren:function(e){return!I(e)},canSeeSection:function(){var e=g.canSeeSection;_.isUndefined(e)&&(g.canSeeSection=l.shouldShowLocalSmartRules().then(function(e){return g.canSeeSection=e,g.canSeeSection}),e=!1);return e}}),_.assign(e,{refresh:R,paging:{refresh:R}})}e.$inject=["$scope","$routeParams","$q","c8yModal","c8yInventory","c8yApplication","c8yPermissions","c8yAlert","c8yUiUtil","c8ySmartRulesAvailability","smartRuleTemplatesSvc","smartRulesSvc","gettext","gettextCatalog"],angular.module("c8y.smartRules").component("smartRulesList",{bindings:{mo:"<?",filter:"<?",disableEditAndCreate:"<?",onRules:"&?"},templateUrl:":::PLUGIN_PATH:::/list/smartRulesList.html",controller:e,controllerAs:"vm"})})();
1
+ (()=>{function e(e,r,i,t,n,o,c,a,u,l,s,d,f,h){var m=this,v={},g={},p={done:!1,inProgress:!1},A={true:{text:f("Active`rule`"),icon:"check-circle",cls:"text-success"},false:{text:f("Inactive`rule`"),icon:"ban",cls:"text-warning"}};function R(){return i.when().then(S).then(x).then(b).then(N).then(C).catch(E)}function S(){p.inProgress=!0}function C(){p.inProgress=!1,p.done=!0,p.error=!1}function E(e){e.data&&e.data.message&&a.danger(e.data.message),p.inProgress=!1,p.done=!0,p.error=!0}function x(){return s.list().then(y)}function y(e){_.forEach(e,function(e){v[e.name]=e})}function b(){var e=m.mo?d.listByContext(m.mo):i.resolve([]),t=l.hasPermissions().then(function(e){return e?d.list():i.when([])});return i.all({listByContext:e,list:t}).then(function(e){m.rules=(e=>(m.mo&&(e=_.reject(e,(e=>{var n=new RegExp("".concat(e,"/dashboard"));return function(e){var t=_.get(e,"config.url","");return I(e)&&!n.test(t)}})(m.mo))),e=m.filter?_.filter(e,m.filter):e))(_.concat(e.listByContext,e.list)),"function"==typeof m.onRules&&m.onRules()(m.rules)})}function I(e){return"sendDashboardsViaEmail"===e.ruleTemplateName}function T(e){return d.hasSource(e,m.mo)}function N(){var e,t;return Array.isArray(m.rules)&&0<m.rules.length&&(e=u.getContext(),t=(e=>(e=e.id,m.mo?_.get(m,"mo.id")||m.mo:e))(e),null!==e.context)?n.childAssets(t,{skipDetail:!0,params:{pageSize:2e3,withChildren:!1}}).then(function(e){m.children=e}).then(function(){m.ruleChildren={},_.forEach(m.rules,function(e){m.ruleChildren[e.id]=O(e)})}):i.resolve()}function O(t){return _.filter(m.children,function(e){return t.enabled&&d.hasSource(t,e)})}function w(){var e,t=g.canAddRules;return _.isUndefined(t)&&(e=m.context?c.isAllowed({adminMOs:[m.context.id]}):i.all({isAllowedInventory:c.isAllowed({anyRole:["ROLE_INVENTORY_ADMIN","ROLE_MANAGED_OBJECT_ADMIN"]}),isAllowedSmartRules:c.isAllowed({anyRole:["ROLE_SMARTRULE_ADMIN","ROLE_CEP_MANAGEMENT_ADMIN"]})}).then(function(e){return e.isAllowedInventory&&e.isAllowedSmartRules}),g.canAddRules=e.then(function(e){return g.canAddRules=e,g.canAddRules}),t=!1),t}function D(t){g.rules=g.rules||{};var n=g.rules,e=n[t.id];return _.isUndefined(e)&&(n[t.id]=c.isAllowed({adminMOs:[t.id]}).then(function(e){return n[t.id]=e,n[t.id]}),e=!1),e}function M(e){var t=!0;return t=m.context.context!==u.CONTEXT.DEVICE&&m.context.context!==u.CONTEXT.GROUP&&m.context.context!==u.CONTEXT.APPLICATION&&"ecosystem/microservice/microservices"!==m.context.context?t:t&&e&&"c8y_SmartRule"!==e.type}_.assign(m,{ruleTemplates:v,loadingStatus:p,isOpen:{},listClass:"interact-list",$onInit:function(){m.context=u.getContext(),e.$on("smartRulesListReload",R),R()},add:function(){d.addNewWithUI().then(R)},edit:function(e){d.editWithUI(e,m.mo).then(R)},clone:function(e){d.cloneWithUI(e,m.mo).then(R)},remove:function(e){t({title:f("Delete smart rule"),body:h.getString('You are about to delete smart rule "{{name}}". Do you want to proceed?',e),status:"danger",labels:{ok:f("Delete")}}).then(d.remove.bind(d,e)).then(function(){return _.pull(m.rules,e)}).then(function(){return a.success(f("Smart rule deleted."))})},hasSource:T,getChildrenEnabledForSmartRule:O,toggleRuleActivationForContextMO:function(e){if(e.enabled&&T(e))return d.deactivate(e,m.mo,!1).then(function(){a.success(h.getString('Smart rule "{{name}}" deactivated.',e))});return d.activate(e,m.mo,!1).then(function(){a.success(h.getString('Smart rule "{{name}}" activated.',e))})},toggleRuleActivationForChildrenMOs:function(t,n){var r=[];return _.forEach(n,function(e){_.find(m.ruleChildren[t.id],{id:e.id})||r.push(d.activate(t,e,!1))}),_.forEach(m.ruleChildren[t.id],function(e){_.find(n,{id:e.id})||r.push(d.deactivate(t,e,!1))}),i.all(r).then(b).then(N).then(function(){a.success(h.getString('Smart rule "{{name}}" activated/deactivated for children.',t))})},tooltip:function(e){var t,n={activate:{"for group":f("Activate for this group."),"for device":f("Activate for this device."),"for object":f("Activate for this object.")},deactivate:{"for group":f("Deactivate for this group."),"for device":f("Deactivate for this device."),"for object":f("Deactivate for this object.")}},e=e.enabled&&T(e)?"deactivate":"activate";t=r.deviceId?u.CONTEXT.DEVICE:r.groupId?u.CONTEXT.GROUP:"object";return n[e]["for ".concat(t)]},type:function(e){var t,e=v[e.ruleTemplateName];e&&(t=e.label.full?h.getString(e.label.full):"".concat(h.getString(e.label.input)," ").concat(h.getString(e.label.output)));return t},status:function(e){e=e.enabled&&T(e);return A[e].text},statusIcon:function(e){e=e.enabled&&T(e);return A[e].icon},statusClass:function(e){e=e.enabled&&T(e);return A[e].cls},context:u.getContext(),inputIcon:function(e){var t,e=v[e.ruleTemplateName];e&&(t=e.paramGroups.input.icon);return t},outputIcon:function(e){var t,e=v[e.ruleTemplateName];e&&(t=e.paramGroups.output.icon);return t},canDuplicate:function(e){return w()&&M(e)},canEdit:function(e){return D(e)&&M(e)},canRemove:D,canAddRules:w,canModify:D,canApplyOnChildren:function(e){return!I(e)},canSeeSection:function(){var e=g.canSeeSection;_.isUndefined(e)&&(g.canSeeSection=l.shouldShowLocalSmartRules().then(function(e){return g.canSeeSection=e,g.canSeeSection}),e=!1);return e},getRuleIcon:function(e){return d.getRuleIcon(e)}}),_.assign(e,{refresh:R,paging:{refresh:R}})}e.$inject=["$scope","$routeParams","$q","c8yModal","c8yInventory","c8yApplication","c8yPermissions","c8yAlert","c8yUiUtil","c8ySmartRulesAvailability","smartRuleTemplatesSvc","smartRulesSvc","gettext","gettextCatalog"],angular.module("c8y.smartRules").component("smartRulesList",{bindings:{mo:"<?",filter:"<?",disableEditAndCreate:"<?",onRules:"&?"},templateUrl:":::PLUGIN_PATH:::/list/smartRulesList.html",controller:e,controllerAs:"vm"})})();
@@ -239,7 +239,7 @@
239
239
  ng-if="rule.type !== 'c8y_SmartRule'"
240
240
  >
241
241
  <i
242
- c8y-icon="user-account"
242
+ c8y-icon="{{::vm.getRuleIcon(rule)}}"
243
243
  uib-tooltip="{{ 'Local smart rule' | translate }}"
244
244
  tooltip-append-to-body="true"
245
245
  ></i>
@@ -249,7 +249,7 @@
249
249
  ng-if="rule.type === 'c8y_SmartRule'"
250
250
  >
251
251
  <i
252
- c8y-icon="people"
252
+ c8y-icon="{{::vm.getRuleIcon(rule)}}"
253
253
  uib-tooltip="{{ 'Global smart rule' | translate }}"
254
254
  tooltip-append-to-body="true"
255
255
  ></i>
@@ -1 +1 @@
1
- (()=>{function e(o,r,u,i,n,a,c,l,t,d,s){var f=u.url("service/smartrule"),h="".concat(f,"/smartrules"),m=["id","self","cepModuleId","lastUpdated","creationTime"],p=["type","cepModuleId","creationTime","lastUpdated"];return{permissionsCfgs:{create:[{anyRole:["ROLE_INVENTORY_ADMIN","ROLE_INVENTORY_CREATE","ROLE_MANAGED_OBJECT_ADMIN","ROLE_MANAGED_OBJECT_CREATE"]},{anyRole:["ROLE_CEP_MANAGEMENT_ADMIN","ROLE_SMARTRULE_ADMIN"]}]},getEmpty:function(e){var e=e||n.getContext(),t={type:"c8y_SmartRule",name:"",enabled:!0,config:{}};e.context&&e.id&&(t.c8y_Context=e,t.type="c8y_PrivateSmartRule");return t},list:function(){return r.get(h).then(u.getResData).then(_.property("rules")).then(v)},listByContext:function(e){return r.get(g({moId:e})).then(u.getResData).then(_.property("rules")).then(v)},detail:function(e){e=y({id:e});return r.get(e).then(u.getResData)},save:function(e,t,n){e=e.id?S(e):((e,t,n)=>((e,t,n)=>{n.useMoAsContext&&(e.c8y_Context={id:n.mo.id,context:n.mo.isDevice?"device":"group"}),e.ruleTemplateName=t.name,T(e);t=e,e=n,n=o.when(t);return t.c8y_Context||e.mo?(t.enabledSources=[],t.disabledSources=void 0,n=b(t,e.mo,e.withChildren)):(t.enabledSources=void 0,t.disabledSources=[]),n})(e,t,n).then(_.partial(r.post,y(e,!0))).then(u.getResData))(e,t,n);return e},remove:function(e){e=y(e,!0);return r.delete(e)},hasSource:function(e,t){t=t&&t.id||t;if(!t)return!1;if(e.disabledSources)return!A(e.disabledSources,t);if(e.enabledSources)return A(e.enabledSources,t);return!0},activate:function(e,t,n){return b(e,t,n).then(S)},deactivate:function(e,t,n){return R(e,t,n).then(S)},updateSources:function(e,t,r,u){return((e,t,n)=>t.reduce(function(e,t){return e.then(function(e){return b(e,t,n)})},o.resolve(e)))(e,t,u).then(function(e){return n=u,r.reduce(function(e,t){return e.then(function(e){return R(e,t,n)})},o.resolve(e));var n}).then(S)},addNewWithUI:D,addNewForInputAlarmAndOutputUserWithUI:function(e,t){return D({inputAlarm:e,outputUser:t})},addNewForInputDataPointWithUI:function(e){return D({inputDataPoint:e})},addNewForOutputOperationWithUI:function(e){return D({outputOperation:{template:(e=>u.cleanFields(e,["id","self","status","deviceId","creationTime","failureReason"]))(e)}})},createInstanceWithUI:C,createInstanceWithUIByName:function(e,t){return l.getTemplateByName(e).then(function(e){return C(e,t)})},editWithUI:function(e,t){return U(e,void 0,t)},cloneWithUI:function(e,t,n){return c.current().then(_.partial(N,e)).then(function(e){return U(e,void 0,t,n)})},getRuleModalTitle:E};function v(e){return o.all(_.map(e,function(t){return l.getTemplateForRule(t).then(function(e){return _.isUndefined(e)?null:t})})).then(_.flatten).then(_.filter)}function y(e,t){var n=_.get(e,"c8y_Context.id"),t=t&&n?g({moId:n}):h;return e.id&&(t+="/".concat(e.id)),t}function g(e){return"".concat(f,"/managedObjects/").concat(e.moId,"/smartrules")}function S(e){T(e);var t=y(e,!0),e=u.cleanFields(e,p);return r.put(t,e)}function b(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&!A(n.enabledSources,t)&&n.enabledSources.push(t),_.isArray(n.disabledSources)&&A(n.disabledSources,t)&&_.remove(n.disabledSources,function(e){return _.toString(e)===_.toString(t)})}),n})}function R(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&A(n.enabledSources,t)&&_.remove(n.enabledSources,function(e){return _.toString(e)===_.toString(t)}),_.isArray(n.disabledSources)&&!A(n.disabledSources,t)&&n.disabledSources.push(t)}),n})}function I(e,t){var e=e&&e.id||e,n=[];return e&&(n.push(o.when(e)),n.push(((e,t)=>{var n=[];return!0!==t&&!0!==t.assets||n.push(i.childAssets(e)),!0!==t&&!0!==t.devices||n.push(i.childDevices(e)),o.all(n).then(_.flattenDeep).then(_.partialRight(_.map,"id"))})(e,t))),o.all(n).then(_.flattenDeep)}function A(e,t){var n=t.id||t;return _.some(e,function(e){return _.toString(e)===_.toString(n)})}function E(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.id?"c8y_SmartRule"===e.type?t("Edit global smart rule"):t("Edit local smart rule"):"/rules"===s.path()?t("Add global smart rule"):t("Add local smart rule");return e}function D(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0;return a({title:E(),templateUrl:":::PLUGIN_PATH:::/views/add.html",controller:"SmartRuleAddCtrl",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",size:"lg",keyboard:!1,resolve:{context:function(){return _.cloneDeep(e)},ruleInitialObj:function(){return _.cloneDeep(n)},ruleTemplatesFilterFn:function(){return t}}})}function C(e,t){return U(t,e)}function N(e,t){e=_.cloneDeep(e);return(e=u.cleanFields(e,m)).name=d.getString("Duplicate of {{name}}",e),t&&(e.owner=t.id),e}function U(e,t,n,r){return a({templateUrl:":::PLUGIN_PATH:::/views/edit.html",controller:"SmartRuleEditCtrl",size:"sm",keyboard:!1,resolve:{ruleTemplate:function(){return _.cloneDeep(t)},rule:function(){return _.cloneDeep(e)},contextMoId:function(){return _.clone(n)},isCloned:function(){return _.clone(r)}}})}function T(e){e.c8y_Context&&e.c8y_Context.contextData&&delete e.c8y_Context.contextData}}e.$inject=["$q","$http","c8yBase","c8yInventory","c8yUiUtil","c8yModal","c8yUser","smartRuleTemplatesSvc","gettext","gettextCatalog","$location"],angular.module("c8y.smartRules").factory("smartRulesSvc",e)})();
1
+ (()=>{function e(o,r,u,i,n,a,c,l,t,d,s){var f=u.url("service/smartrule"),p="".concat(f,"/smartrules"),m=["id","self","cepModuleId","lastUpdated","creationTime"],h=["type","cepModuleId","creationTime","lastUpdated"];return{permissionsCfgs:{create:[{anyRole:["ROLE_INVENTORY_ADMIN","ROLE_INVENTORY_CREATE","ROLE_MANAGED_OBJECT_ADMIN","ROLE_MANAGED_OBJECT_CREATE"]},{anyRole:["ROLE_CEP_MANAGEMENT_ADMIN","ROLE_SMARTRULE_ADMIN"]}]},getEmpty:function(e){var e=e||n.getContext(),t={type:"c8y_SmartRule",name:"",enabled:!0,config:{}};e.context&&e.id&&(t.c8y_Context=e,t.type="c8y_PrivateSmartRule");return t},list:function(){return r.get(p).then(u.getResData).then(_.property("rules")).then(y)},listByContext:function(e){return r.get(g({moId:e})).then(u.getResData).then(_.property("rules")).then(y)},detail:function(e){e=v({id:e});return r.get(e).then(u.getResData)},save:function(e,t,n){e=e.id?S(e):((e,t,n)=>((e,t,n)=>{n.useMoAsContext&&(e.c8y_Context={id:n.mo.id,context:n.mo.isDevice?"device":"group"}),e.ruleTemplateName=t.name,T(e);t=e,e=n,n=o.when(t);return t.c8y_Context||e.mo?(t.enabledSources=[],t.disabledSources=void 0,n=R(t,e.mo,e.withChildren)):(t.enabledSources=void 0,t.disabledSources=[]),n})(e,t,n).then(_.partial(r.post,v(e,!0))).then(u.getResData))(e,t,n);return e},remove:function(e){e=v(e,!0);return r.delete(e)},hasSource:function(e,t){t=t&&t.id||t;if(!t)return!1;if(e.disabledSources)return!A(e.disabledSources,t);if(e.enabledSources)return A(e.enabledSources,t);return!0},activate:function(e,t,n){return R(e,t,n).then(S)},deactivate:function(e,t,n){return b(e,t,n).then(S)},updateSources:function(e,t,r,u){return((e,t,n)=>t.reduce(function(e,t){return e.then(function(e){return R(e,t,n)})},o.resolve(e)))(e,t,u).then(function(e){return n=u,r.reduce(function(e,t){return e.then(function(e){return b(e,t,n)})},o.resolve(e));var n}).then(S)},addNewWithUI:D,addNewForInputAlarmAndOutputUserWithUI:function(e,t){return D({inputAlarm:e,outputUser:t})},addNewForInputDataPointWithUI:function(e){return D({inputDataPoint:e})},addNewForOutputOperationWithUI:function(e){return D({outputOperation:{template:(e=>u.cleanFields(e,["id","self","status","deviceId","creationTime","failureReason"]))(e)}})},createInstanceWithUI:C,createInstanceWithUIByName:function(e,t){return l.getTemplateByName(e).then(function(e){return C(e,t)})},editWithUI:function(e,t){return U(e,void 0,t)},cloneWithUI:function(e,t,n){return c.current().then(_.partial(N,e)).then(function(e){return U(e,void 0,t,n)})},getRuleModalTitle:E,getRuleIcon:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};e=e.id?"c8y_SmartRule"===e.type?"c8y-smart-rules":"installing-updates":"/rules"===s.path()?"c8y-smart-rules":"installing-updates";return e}};function y(e){return o.all(_.map(e,function(t){return l.getTemplateForRule(t).then(function(e){return _.isUndefined(e)?null:t})})).then(_.flatten).then(_.filter)}function v(e,t){var n=_.get(e,"c8y_Context.id"),t=t&&n?g({moId:n}):p;return e.id&&(t+="/".concat(e.id)),t}function g(e){return"".concat(f,"/managedObjects/").concat(e.moId,"/smartrules")}function S(e){T(e);var t=v(e,!0),e=u.cleanFields(e,h);return r.put(t,e)}function R(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&!A(n.enabledSources,t)&&n.enabledSources.push(t),_.isArray(n.disabledSources)&&A(n.disabledSources,t)&&_.remove(n.disabledSources,function(e){return _.toString(e)===_.toString(t)})}),n})}function b(n,e,t){return I(e,t).then(function(e){return _.forEach(e,function(t){_.isArray(n.enabledSources)&&A(n.enabledSources,t)&&_.remove(n.enabledSources,function(e){return _.toString(e)===_.toString(t)}),_.isArray(n.disabledSources)&&!A(n.disabledSources,t)&&n.disabledSources.push(t)}),n})}function I(e,t){var e=e&&e.id||e,n=[];return e&&(n.push(o.when(e)),n.push(((e,t)=>{var n=[];return!0!==t&&!0!==t.assets||n.push(i.childAssets(e)),!0!==t&&!0!==t.devices||n.push(i.childDevices(e)),o.all(n).then(_.flattenDeep).then(_.partialRight(_.map,"id"))})(e,t))),o.all(n).then(_.flattenDeep)}function A(e,t){var n=t.id||t;return _.some(e,function(e){return _.toString(e)===_.toString(n)})}function E(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.id?"c8y_SmartRule"===e.type?t("Edit global smart rule"):t("Edit local smart rule"):"/rules"===s.path()?t("Add global smart rule"):t("Add local smart rule");return e}function D(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,n=2<arguments.length?arguments[2]:void 0;return a({title:E(),templateUrl:":::PLUGIN_PATH:::/views/add.html",controller:"SmartRuleAddCtrl",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",size:"lg",keyboard:!1,resolve:{context:function(){return _.cloneDeep(e)},ruleInitialObj:function(){return _.cloneDeep(n)},ruleTemplatesFilterFn:function(){return t}}})}function C(e,t){return U(t,e)}function N(e,t){e=_.cloneDeep(e);return(e=u.cleanFields(e,m)).name=d.getString("Duplicate of {{name}}",e),t&&(e.owner=t.id),e}function U(e,t,n,r){return a({templateUrl:":::PLUGIN_PATH:::/views/edit.html",controller:"SmartRuleEditCtrl",size:"sm",keyboard:!1,resolve:{ruleTemplate:function(){return _.cloneDeep(t)},rule:function(){return _.cloneDeep(e)},contextMoId:function(){return _.clone(n)},isCloned:function(){return _.clone(r)}}})}function T(e){e.c8y_Context&&e.c8y_Context.contextData&&delete e.c8y_Context.contextData}}e.$inject=["$q","$http","c8yBase","c8yInventory","c8yUiUtil","c8yModal","c8yUser","smartRuleTemplatesSvc","gettext","gettextCatalog","$location"],angular.module("c8y.smartRules").factory("smartRulesSvc",e)})();
@@ -1,12 +1,19 @@
1
1
  <div class="viewport-modal">
2
2
  <div class="modal-header text-center separator">
3
- <h1 id="modal-title" class="h3" data-cy="smartRuleAdd--card-header">
4
- <i class="c8y-icon c8y-icon-smart-rules c8y-icon-duocolor"></i>
3
+ <h1
4
+ class="h3"
5
+ id="modal-title"
6
+ data-cy="smartRuleAdd--card-header"
7
+ >
8
+ <i c8y-icon="{{ icon }}"></i>
5
9
  {{ title | translate }}
6
10
  </h1>
7
11
  </div>
8
12
 
9
- <div class="inner-scroll" id="modal-body">
13
+ <div
14
+ class="inner-scroll"
15
+ id="modal-body"
16
+ >
10
17
  <div
11
18
  class="alert alert-warning"
12
19
  ng-show="ruleTemplates.length == 0 && !loading.loading"
@@ -14,14 +21,17 @@
14
21
  >
15
22
  No matching smart rules available.
16
23
  </div>
17
- <div class="d-flex a-i-center j-c-center" ng-show="loading.loading">
24
+ <div
25
+ class="d-flex a-i-center j-c-center"
26
+ ng-show="loading.loading"
27
+ >
18
28
  <c8y-loading></c8y-loading>
19
29
  </div>
20
30
  <div class="card-group-block smart-rule-templates-list interact-grid">
21
31
  <button
22
- ng-repeat="ruleTemplate in ruleTemplates"
23
32
  class="col-md-4 col-sm-6 col-xs-12 card btn-clean"
24
33
  ng-class="{ 'not-active': !ruleTemplate._active, interact: ruleTemplate._active }"
34
+ ng-repeat="ruleTemplate in ruleTemplates"
25
35
  ng-click="createInstance(ruleTemplate)"
26
36
  >
27
37
  <div class="card-block text-center">
@@ -30,13 +40,25 @@
30
40
  <i c8y-icon="arrow-right"></i>
31
41
  <span class="dot"><i c8y-icon="{{ ruleTemplate.paramGroups.output.icon }}"></i></span>
32
42
  </div>
33
- <div ng-if="ruleTemplate.label.full" class="text-pre-normal">
34
- <span class="caption" title="{{ ruleTemplate.label.full | translate }}">
43
+ <div
44
+ class="text-pre-normal"
45
+ ng-if="ruleTemplate.label.full"
46
+ >
47
+ <span
48
+ class="caption"
49
+ title="{{ ruleTemplate.label.full | translate }}"
50
+ >
35
51
  {{ ruleTemplate.label.full | translate }}
36
52
  </span>
37
53
  </div>
38
- <div ng-if="!ruleTemplate.label.full" class="text-pre-normal">
39
- <span class="caption caption-input" title="{{ ruleTemplate.label.input | translate }}">
54
+ <div
55
+ class="text-pre-normal"
56
+ ng-if="!ruleTemplate.label.full"
57
+ >
58
+ <span
59
+ class="caption caption-input"
60
+ title="{{ ruleTemplate.label.input | translate }}"
61
+ >
40
62
  {{ ruleTemplate.label.input | translate }}
41
63
  </span>
42
64
  <span
@@ -56,9 +78,9 @@
56
78
 
57
79
  <div class="modal-footer">
58
80
  <button
81
+ class="btn btn-default"
59
82
  title="{{ 'Cancel' | translate }}"
60
83
  type="button"
61
- class="btn btn-default"
62
84
  ng-click="cancel()"
63
85
  >
64
86
  {{ 'Cancel' | translate }}
@@ -216,9 +216,10 @@
216
216
  class="text-center text-muted m-b-16"
217
217
  data-cy="smartRulesList--card-header"
218
218
  >
219
- <i c8y-icon="c8y-smart-rules"></i>
219
+ <i c8y-icon="{{::getRuleIcon(rule)}}"></i>
220
220
  {{ getRuleCardTitle(rule) | translate }}
221
221
  </label>
222
+
222
223
  <div class="smart-rule-name card-title">
223
224
  {{ rule.name }}
224
225
  </div>
@@ -301,7 +302,7 @@
301
302
  ng-if="rule.type !== 'c8y_SmartRule'"
302
303
  >
303
304
  <i
304
- c8y-icon="user-account"
305
+ c8y-icon="{{::getRuleIcon(rule)}}"
305
306
  uib-tooltip="{{ 'Local smart rule' | translate }}"
306
307
  tooltip-popup-delay="500"
307
308
  tooltip-append-to-body="true"
@@ -312,7 +313,7 @@
312
313
  ng-if="rule.type === 'c8y_SmartRule'"
313
314
  >
314
315
  <i
315
- c8y-icon="people"
316
+ c8y-icon="{{::getRuleIcon(rule)}}"
316
317
  uib-tooltip="{{ 'Global smart rule' | translate }}"
317
318
  tooltip-popup-delay="500"
318
319
  tooltip-append-to-body="true"
@@ -1,69 +1,82 @@
1
- <div class="card-header separator">
2
- <div class="card-title h4" translate>States mapping</div>
3
- </div>
4
- <div class="alert alert-warning" ng-show="!vm.deviceId || vm.hasInvalidMapping" translate>
5
- Select a device and complete the mapping for all light states.
6
- </div>
7
- <div class="table-responsive">
8
- <table class="table table-striped">
9
- <thead>
10
- <tr>
11
- <th translate>State</th>
12
- <th>
13
- <span translate>Property</span>
14
- <button
15
- class="btn-help btn-help--sm"
16
- type="button"
17
- aria-label="{{ 'Help' | translate }}"
18
- uib-popover="{{
19
- 'The value of the selected data point or property must be one of the following to have the respective light on: true, 1, any non-empty string or any non-null number.'
20
- | translate
21
- }}"
22
- popover-trigger="'focus'"
23
- popover-placement="right"
24
- popover-append-to-body="true"
25
- ></button>
26
- </th>
27
- <th></th>
28
- </tr>
29
- </thead>
30
- <tbody>
31
- <tr
32
- ng-repeat="(state, stateText) in vm.states"
33
- ng-class="{ danger: vm.isMappingInvalidForState(state) }"
34
- >
35
- <td>{{ stateText | translate }}</td>
36
- <td ng-switch="vm.mapping[state].computed">
37
- <button
38
- class="btn btn-xs btn-default"
39
- type="button"
40
- ng-switch-when="true"
41
- ng-click="vm.editComputedProperty(vm.mapping[state])"
42
- >
43
- <i c8y-icon="bolt"></i>
44
- {{ vm.humanizeProperty(vm.mapping[state]) }}
45
- </button>
46
- <span ng-switch-default>{{ vm.humanizeProperty(vm.mapping[state]) }}</span>
47
- </td>
48
- <td class="text-right">
49
- <button
50
- class="btn btn-primary btn-xs showOnHover"
51
- type="button"
52
- title="{{ 'Select device property' | translate }}"
53
- ng-click="vm.selectDevicePropertyForState(state)"
54
- >
55
- <i c8y-icon="pencil"></i>
56
- </button>
57
- <button
58
- class="btn btn-primary btn-xs showOnHover"
59
- type="button"
60
- title="{{ 'Select fieldbus property' | translate }}"
61
- ng-click="vm.selectFieldbusPropertyForState(state)"
62
- >
63
- <i c8y-icon="tasks"></i>
64
- </button>
65
- </td>
66
- </tr>
67
- </tbody>
68
- </table>
69
- </div>
1
+ <fieldset class="c8y-fieldset">
2
+ <legend translate>States mapping</legend>
3
+ <div class="alert alert-warning" ng-show="!vm.deviceId || vm.hasInvalidMapping" translate>
4
+ Select a device and complete the mapping for all light states.
5
+ </div>
6
+
7
+ <div class="table-responsive">
8
+ <table class="table table-condensed bg-inherit" style="table-layout: fixed">
9
+ <colgroup>
10
+ <col style="width: 25%" />
11
+ <col style="width: 50%" />
12
+ <col style="width: 25%" />
13
+ <thead>
14
+ <tr>
15
+ <th translate>State</th>
16
+ <th>
17
+ <span translate>Property</span>
18
+ <button
19
+ class="btn-help btn-help--sm"
20
+ type="button"
21
+ aria-label="{{ 'Help' | translate }}"
22
+ uib-popover="{{
23
+ 'The value of the selected data point or property must be one of the following to have the respective light on: true, 1, any non-empty string or any non-null number.'
24
+ | translate
25
+ }}"
26
+ popover-trigger="'focus'"
27
+ popover-placement="right"
28
+ popover-append-to-body="true"
29
+ ></button>
30
+ </th>
31
+ <th></th>
32
+ </tr>
33
+ </thead>
34
+ <tbody>
35
+ <tr
36
+ ng-repeat="(state, stateText) in vm.states"
37
+ ng-class="{ danger: vm.isMappingInvalidForState(state) }"
38
+ >
39
+ <td>{{ stateText | translate }}</td>
40
+ <td ng-switch="vm.mapping[state].computed">
41
+ <button
42
+ class="btn btn-xs btn-default"
43
+ type="button"
44
+ ng-switch-when="true"
45
+ ng-click="vm.editComputedProperty(vm.mapping[state])"
46
+ >
47
+ <i c8y-icon="bolt"></i>
48
+ {{ vm.humanizeProperty(vm.mapping[state]) }}
49
+ </button>
50
+ <span ng-switch-default>{{ vm.humanizeProperty(vm.mapping[state]) }}</span>
51
+ </td>
52
+ <td class="">
53
+ <div class="d-flex j-c-end">
54
+ <button
55
+ class="btn btn-dot"
56
+ type="button"
57
+ aria-label="{{ 'Select device property' | translate }}"
58
+ uib-tooltip="{{ 'Select device property' | translate }}"
59
+ tooltip-append-to-body="true"
60
+ tooltip-popup-delay="500"
61
+ ng-click="vm.selectDevicePropertyForState(state)"
62
+ >
63
+ <i c8y-icon="edit"></i>
64
+ </button>
65
+ <button
66
+ class="btn btn-dot"
67
+ type="button"
68
+ uib-tooltip="{{ 'Assign fieldbus property' | translate }}"
69
+ tooltip-append-to-body="true"
70
+ tooltip-popup-delay="500"
71
+ aria-label="{{ 'Select fieldbus property' | translate }}"
72
+ ng-click="vm.selectFieldbusPropertyForState(state)"
73
+ >
74
+ <i c8y-icon="tasks"></i>
75
+ </button>
76
+ </div>
77
+ </td>
78
+ </tr>
79
+ </tbody>
80
+ </table>
81
+ </div>
82
+ </fieldset>
@@ -1 +0,0 @@
1
- (()=>{function e(e){e.provideSettingsPage()}e.$inject=["c8yRemoteAccessUIProvider"],angular.module("c8y.administrationConfig",["c8y.remoteAccess"]).config(e)})();
@@ -1,13 +0,0 @@
1
- {
2
- "name": "Administration config",
3
- "ngModules": [
4
- "c8y.administrationConfig"
5
- ],
6
- "icon": "c8y-shield",
7
- "color": "#F2DF0F",
8
- "category": "Administration",
9
- "description": "Administration config",
10
- "js": [
11
- "administration-config.module.js"
12
- ]
13
- }