@c8y/ng1-modules 1018.487.7 → 1018.497.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 (82) hide show
  1. package/NOTICES +1 -1
  2. package/administration-alarmMapping/views/index.html +2 -2
  3. package/administration-auditLogs/views/list.html +8 -7
  4. package/administration-deviceUsers/views/list.html +55 -18
  5. package/binaryArtefactsManagement/views/list.html +63 -23
  6. package/core/core/services/measurements.js +1 -1
  7. package/core/locales/de.po +3 -3
  8. package/core/locales/en.po +5 -5
  9. package/core/locales/es.po +21 -103
  10. package/core/locales/fr.po +20 -102
  11. package/core/locales/ja_JP.po +20 -102
  12. package/core/locales/ko.po +20 -102
  13. package/core/locales/nl.po +20 -102
  14. package/core/locales/pl.po +21 -103
  15. package/core/locales/pt_BR.po +38 -120
  16. package/core/locales/ru.po +21 -103
  17. package/core/locales/zh_CN.po +21 -103
  18. package/core/locales/zh_TW.po +21 -103
  19. package/core/ui/services/measurementsReport.js +1 -1
  20. package/core/ui/user/rolesUiStrings.constant.js +1 -1
  21. package/core/ui/views/modal.html +1 -1
  22. package/dataBroker/connectors/connectors.html +87 -32
  23. package/dataPointExplorer/index.js +1 -1
  24. package/dataPointExplorer/views/explorer.html +6 -2
  25. package/dataPointExplorer/views/widgetConfig.html +1 -0
  26. package/dataPointTable/index.js +1 -1
  27. package/dataPointTable/views/widgetConfig.html +1 -3
  28. package/device-protocols/deviceProtocolList.html +4 -4
  29. package/device-protocols/deviceProtocolView.html +34 -14
  30. package/deviceDatabase4/cumulocity.json +2 -2
  31. package/deviceDatabase4/detail/device-type-detail.component.js +1 -1
  32. package/deviceDatabase4/detail/device-type-detail.html +1 -0
  33. package/deviceDatabase4/modals/configure-register.component.js +1 -1
  34. package/deviceDatabase4/modals/configure-register.html +2 -2
  35. package/deviceDatabase4/validate-measurement-fragment.directive.js +1 -0
  36. package/deviceList/views/index.html +4 -1
  37. package/devicemanagement-alarmList/views/index.html +57 -19
  38. package/devicemanagement-availability/controllers/availability.js +1 -1
  39. package/devicemanagement-availability/views/detail.html +19 -8
  40. package/devicemanagement-eventList/views/index.html +6 -2
  41. package/enterpriseEdition/enterpriseEdition.module.js +1 -1
  42. package/eventList/index.js +1 -1
  43. package/export/directives/timespan.js +1 -1
  44. package/export/services/filters.js +1 -1
  45. package/export/views/detail.html +1 -1
  46. package/export/views/list.html +21 -0
  47. package/export/views/properties.html +3 -3
  48. package/export/views/timespan.html +38 -9
  49. package/measurements/fragmentChart/fragmentChart.component.js +1 -1
  50. package/measurements/measurements2/series.service.js +1 -1
  51. package/package.json +1 -1
  52. package/platformConfiguration/cumulocity.json +1 -1
  53. package/platformConfiguration/platformConfiguration.component.js +1 -0
  54. package/platformConfiguration/platformConfiguration.html +22 -0
  55. package/platformConfiguration/platformConfigurationUi.provider.js +1 -1
  56. package/scada/config.controller.js +1 -1
  57. package/scada/views/componentConfig.html +28 -14
  58. package/scada/widget.controller.js +1 -1
  59. package/tenantPolicies/tenantPolicyList/tenantPolicyList.html +90 -25
  60. package/tenantStatistics/tenant-statistics.html +23 -14
  61. package/tenants/views/detail.html +1 -1
  62. package/userRoles/inventoryRolesTab/inventoryRolesTab.component.js +1 -1
  63. package/userRoles/inventoryRolesTab/inventoryRolesTab.html +16 -10
  64. package/users/userListView/userListView.html +47 -17
  65. package/users/usersUi.provider.js +1 -1
  66. package/deviceControlMessage/controllers/deviceControlMessageWidget.js +0 -1
  67. package/deviceControlMessage/cumulocity.json +0 -15
  68. package/deviceControlMessage/img/message-widget-pr.png +0 -0
  69. package/deviceControlMessage/index.js +0 -1
  70. package/deviceControlMessage/views/deviceControlMessageWidget.html +0 -26
  71. package/deviceDatabase4/detail/device-type-detail.service.js +0 -1
  72. package/infoGauge/cumulocity.json +0 -20
  73. package/infoGauge/img/info-gauge-widget-pr.png +0 -0
  74. package/infoGauge/index.js +0 -1
  75. package/infoGauge/infoGauge.controller.js +0 -1
  76. package/infoGauge/infoGauge.service.js +0 -1
  77. package/infoGauge/infoGaugeConfig.controller.js +0 -1
  78. package/infoGauge/infoGaugeWidget.config.html +0 -58
  79. package/infoGauge/infoGaugeWidget.html +0 -32
  80. package/infoGauge/style.less +0 -0
  81. package/platformConfiguration/platformConfigurationForm.component.js +0 -1
  82. package/platformConfiguration/platformConfigurationForm.html +0 -50
@@ -5,20 +5,27 @@
5
5
 
6
6
  <c8y-breadcrumbs-set>
7
7
  <c8y-breadcrumbs-item
8
+ icon="cog"
8
9
  label="{{ 'Usage statistics' | translate }}"
10
+ ></c8y-breadcrumbs-item>
11
+ <c8y-breadcrumbs-item
9
12
  icon="cog"
13
+ label="{{ 'Tenants' | translate }}"
10
14
  ></c8y-breadcrumbs-item>
11
- <c8y-breadcrumbs-item label="{{ 'Tenants' | translate }}" icon="cog"></c8y-breadcrumbs-item>
12
15
  </c8y-breadcrumbs-set>
13
16
 
14
17
  <c8y-ui-action-bar-set>
15
- <li class="navbar-form" action-bar-position="left">
18
+ <li
19
+ class="navbar-form"
20
+ action-bar-position="left"
21
+ >
16
22
  <form class="d-flex-sm">
17
23
  <div class="form-group datepicker">
18
24
  <input
25
+ class="form-control text-center"
19
26
  title="{{ 'Date from' | translate }}"
27
+ placeholder="{{ 'Date from' | translate }}"
20
28
  type="date"
21
- class="form-control text-center"
22
29
  ng-model="vm.dateFrom"
23
30
  uib-datepicker-popup
24
31
  datepicker-options="{ maxDate: vm.dateTo, showWeeks: true }"
@@ -26,14 +33,14 @@
26
33
  show-button-bar="false"
27
34
  is-open="openFrom"
28
35
  ng-click="openFrom=true"
29
- placeholder="{{ 'Date from' | translate }}"
30
36
  />
31
37
  </div>
32
38
  <div class="form-group datepicker m-r-md-8">
33
39
  <input
40
+ class="form-control text-center"
34
41
  title="{{ 'Date to' | translate }}"
42
+ placeholder="{{ 'Date to' | translate }}"
35
43
  type="date"
36
- class="form-control text-center"
37
44
  ng-model="vm.dateTo"
38
45
  uib-datepicker-popup
39
46
  datepicker-options="{ minDate: vm.dateFrom, showWeeks: true }"
@@ -41,27 +48,26 @@
41
48
  show-button-bar="false"
42
49
  is-open="openTo"
43
50
  ng-click="openTo=true"
44
- placeholder="{{ 'Date to' | translate }}"
45
51
  />
46
52
  </div>
47
53
  <button
54
+ class="btn btn-default"
48
55
  title="{{ 'Apply filters' | translate }}"
49
- type="button"
50
56
  name="apply"
57
+ type="button"
51
58
  type="submit"
52
- class="btn btn-default"
53
59
  ng-click="vm.filter()"
54
60
  >
55
61
  <i c8y-icon="filter"></i>
56
62
  {{ 'Apply`filters`' | translate }}
57
63
  </button>
58
64
  <button
65
+ class="btn btn-default"
59
66
  title="{{ 'Clear filters' | translate }}"
60
- type="button"
61
- ng-if="vm.dateFrom || vm.dateTo"
62
67
  name="clear"
63
68
  type="button"
64
- class="btn btn-default"
69
+ type="button"
70
+ ng-if="vm.dateFrom || vm.dateTo"
65
71
  ng-click="vm.clearFilter()"
66
72
  >
67
73
  <i c8y-icon="clear-filters"></i>
@@ -71,9 +77,9 @@
71
77
  </li>
72
78
 
73
79
  <button
80
+ class="btn btn-link"
74
81
  title="{{ 'Export CSV' | translate }}"
75
82
  type="button"
76
- class="btn btn-link"
77
83
  c8y-csv-exporter
78
84
  c8y-headers="vm.getCsvHeaders()"
79
85
  c8y-data="vm.getCsvData()"
@@ -84,12 +90,15 @@
84
90
  </button>
85
91
 
86
92
  <button
93
+ class="btn btn-link"
87
94
  title="{{ 'Reload' | translate }}"
88
95
  type="button"
89
- class="btn btn-link"
90
96
  ng-click="vm.refresh()"
91
97
  >
92
- <i c8y-icon="refresh" ng-class="{ 'icon-spin': vm.refreshLoading }"></i>
98
+ <i
99
+ ng-class="{ 'icon-spin': vm.refreshLoading }"
100
+ c8y-icon="refresh"
101
+ ></i>
93
102
  {{ 'Reload' | translate }}
94
103
  </button>
95
104
  </c8y-ui-action-bar-set>
@@ -306,7 +306,7 @@
306
306
  <div
307
307
  c8y-password-strength
308
308
  user="passwordStrengthUser"
309
- password="tenant.adminPass"
309
+ password="tenantForm.adminPass.$viewValue"
310
310
  ></div>
311
311
  <div
312
312
  class="m-t-32"
@@ -1 +1 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(r,e){var t,n=Object.keys(r);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(r),e&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),n.push.apply(n,t)),n}function _objectSpread(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach(function(e){_defineProperty(r,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})}return r}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(e,r){if("object"!==_typeof(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(e);t=t.call(e,r||"default");if("object"!==_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,s,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(l.push(n.value),l.length!==r);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,r,t,n,o,i,s,l){var a=this;function c(){r.listInventoryRoles(a.userId).then(t.getResData).then(function(e){a.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),r.detail(a.userId).then(t.getResData).then(function(e){a.user=e,a.user.owner?r.listInventoryRoles(a.user.owner).then(t.getResData).then(function(e){a.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(a.ownerAssignedRoles)&&(a.displayNoOwnerRolesAlert=!0),a.failedToFetchOwnerInventoryRoles=!1}).catch(function(){a.failedToFetchOwnerInventoryRoles=!0}):a.failedToFetchOwnerInventoryRoles=!1})}function u(){c(),s.success(l.getPlural(y(),"Inventory role updated","Inventory roles updated",{}))}function y(){return _.filter(a.assignedRoles,"isModified").length}function f(e){var r="replace"===e.process,e=e.roles,t=_.map(a.assignedRoles);return n.copyUserRoles(e,t,a.userId,r).then(c).then(o.successUserRolesCopy)}_.assign(a,{$onChange:function(e){e.user&&c()},onChangeRoles:function(e){var r=e.roles,e=e.managedObjectId;a.assignedRoles[e]=a.assignedRoles[e]||{},_.assign(a.assignedRoles[e],{managedObject:e,roles:r,isModified:!0}),a.assignedRoles=_objectSpread({},a.assignedRoles)},onSaveInventoryRoles:function(){n.onSaveInventoryRoles(a.userId,a.assignedRoles).then(u)},copyRoles:function(){o.copyFromUserDialog(a.userId).then(f)},loadAssignedRoles:c,isUnchanged:function(){return 0===y()},pageSize:20,scrollToTop:function(){var e=_slicedToArray(angular.element(document.querySelector("#inventory-roles-container")),1)[0];e&&e.scrollTo(0,0)},helpLink:i.getUserGuideLink(_.get(o.STRINGS,"LINKS.ROLES_INVENTORY")),displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null}),c()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yAlert","gettextCatalog"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
1
+ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,s,l=[],a=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{if(!a&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,t,r,n,o,i,s,l){var a=this;function c(){t.listInventoryRoles(a.userId).then(r.getResData).then(function(e){a.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),t.detail(a.userId).then(r.getResData).then(function(e){a.user=e,a.user.owner?t.listInventoryRoles(a.user.owner).then(r.getResData).then(function(e){a.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(a.ownerAssignedRoles)&&(a.displayNoOwnerRolesAlert=!0),a.failedToFetchOwnerInventoryRoles=!1}).catch(function(){a.failedToFetchOwnerInventoryRoles=!0}):a.failedToFetchOwnerInventoryRoles=!1})}function u(){c(),s.success(l.getPlural(y(),"Inventory role updated","Inventory roles updated",{}))}function y(){return _.filter(a.assignedRoles,"isModified").length}function f(e){var t="replace"===e.process,e=e.roles,r=_.map(a.assignedRoles);return n.copyUserRoles(e,r,a.userId,t).then(c).then(o.successUserRolesCopy)}_.assign(a,{$onChange:function(e){e.user&&c()},onChangeRoles:function(e){var t=e.roles,e=e.managedObjectId;a.assignedRoles[e]=a.assignedRoles[e]||{},_.assign(a.assignedRoles[e],{managedObject:e,roles:t,isModified:!0}),a.assignedRoles=_objectSpread({},a.assignedRoles)},onSaveInventoryRoles:function(){n.onSaveInventoryRoles(a.userId,a.assignedRoles).then(u)},copyRoles:function(){o.copyFromUserDialog(a.userId).then(f)},loadAssignedRoles:c,isUnchanged:function(){return 0===y()},pageSize:20,scrollToTop:function(){var e=_slicedToArray(angular.element(document.querySelector("#inventory-roles-container")),1)[0];e&&e.scrollTo(0,0)},helpLink:i.getUserGuideLink(_.get(o.STRINGS,"LINKS.ROLES_INVENTORY")),stopEventPropagation:function(e){e.stopPropagation()},displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null}),c()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yAlert","gettextCatalog"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
@@ -201,16 +201,22 @@
201
201
  You can also copy inventory roles from another user or replace this user's roles with the
202
202
  roles of another user.
203
203
  </p>
204
- <small ng-show="::vm.helpLink">
205
- <a
206
- title="{{ 'Help &amp; documentation' | translate }}"
207
- ng-href="{{::vm.helpLink}}"
208
- target="_blank"
209
- rel="noopener noreferrer"
204
+ <span
205
+ ng-click="vm.stopEventPropagation($event)"
206
+ >
207
+ <small
208
+ ng-show="::vm.helpLink"
210
209
  >
211
- <i c8y-icon="question-circle-o" class="text-info"></i>
212
- <span translate>Help &amp; documentation</span>
213
- </a>
214
- </small>
210
+ <a
211
+ title="{{ 'Help &amp; documentation' | translate }}"
212
+ ng-href="{{::vm.helpLink}}"
213
+ target="_blank"
214
+ rel="noopener noreferrer"
215
+ >
216
+ <i c8y-icon="question-circle-o" class="text-info"></i>
217
+ <span translate>Help &amp; documentation</span>
218
+ </a>
219
+ </small>
220
+ </span>
215
221
  </div>
216
222
  </script>
@@ -2,32 +2,41 @@
2
2
 
3
3
  <c8y-breadcrumbs-set>
4
4
  <c8y-breadcrumbs-item
5
- label="{{ 'Users' | translate }}"
6
5
  icon="c8y-accounts"
6
+ label="{{ 'Users' | translate }}"
7
7
  ></c8y-breadcrumbs-item>
8
8
  <c8y-breadcrumbs-item
9
- label="{{ 'Accounts' | translate }}"
10
9
  icon="c8y-accounts"
10
+ label="{{ 'Accounts' | translate }}"
11
11
  ></c8y-breadcrumbs-item>
12
12
  </c8y-breadcrumbs-set>
13
13
 
14
14
  <c8y-ui-action-bar-set>
15
- <li class="navbar-form" action-bar-position="left">
15
+ <li
16
+ class="navbar-form"
17
+ action-bar-position="left"
18
+ >
16
19
  <form class="form-inline m-b-0">
17
20
  <div class="form-group">
18
21
  <div class="input-group input-group-search">
19
22
  <input
20
- title="{{ 'Filter users' | translate }}"
21
23
  class="form-control"
24
+ title="{{ 'Filter users' | translate }}"
22
25
  id="Filter"
26
+ placeholder="{{ 'Filter users' | translate }}"
23
27
  type="search"
24
28
  ng-model="vm.filters.text"
25
- placeholder="{{ 'Filter users' | translate }}"
26
29
  />
27
30
  <span class="input-group-addon">
28
31
  <i c8y-icon="search"></i>
29
32
  </span>
30
- <span for="Filter" class="sr-only" translate>Filter users</span>
33
+ <span
34
+ class="sr-only"
35
+ for="Filter"
36
+ translate
37
+ >
38
+ Filter users
39
+ </span>
31
40
  </div>
32
41
  </div>
33
42
 
@@ -43,34 +52,44 @@
43
52
  </div>
44
53
 
45
54
  <button
55
+ class="btn btn-default"
46
56
  title="{{ 'Apply filters' | translate }}"
47
57
  type="button"
48
- class="btn btn-default"
49
58
  ng-click="vm.applyFilters()"
50
59
  c8y-key-shortcut="Enter"
51
60
  >
52
61
  <i c8y-icon="filter"></i>
53
- <span class="hidden-sm" translate>Apply`filters`</span>
62
+ <span
63
+ class="hidden-sm"
64
+ translate
65
+ >
66
+ Apply`filters`
67
+ </span>
54
68
  </button>
55
69
  <button
70
+ class="m-l-0 btn btn-default"
56
71
  title="{{ 'Clear filters' | translate }}"
57
72
  type="button"
58
- class="m-l-0 btn btn-default"
59
73
  ng-click="vm.clearFilters()"
60
74
  ng-show="vm.isAnyFilterSelected()"
61
75
  c8y-key-shortcut="Escape"
62
76
  >
63
77
  <i c8y-icon="times"></i>
64
- <span class="hidden-sm" translate>Clear`filters`</span>
78
+ <span
79
+ class="hidden-sm"
80
+ translate
81
+ >
82
+ Clear`filters`
83
+ </span>
65
84
  </button>
66
85
  </form>
67
86
  </li>
68
87
 
69
88
  <li>
70
89
  <button
90
+ class="btn btn-link hidden-sm"
71
91
  title="{{ 'Expand all' | translate }}"
72
92
  type="button"
73
- class="btn btn-link hidden-sm"
74
93
  ng-click="vm.expandAll()"
75
94
  ng-show="vm.showExpandCollapse()"
76
95
  >
@@ -81,9 +100,9 @@
81
100
 
82
101
  <li>
83
102
  <button
103
+ class="btn btn-link hidden-sm"
84
104
  title="{{ 'Collapse all' | translate }}"
85
105
  type="button"
86
- class="btn btn-link hidden-sm"
87
106
  ng-click="vm.collapseAll()"
88
107
  ng-show="vm.showExpandCollapse()"
89
108
  >
@@ -92,18 +111,29 @@
92
111
  </button>
93
112
  </li>
94
113
 
95
- <li title="{{ 'Add user' | translate }}" ng-show="vm.canAddUser">
96
- <a href="#{{ vm.ROUTE_NEW_USER }}" class="btn btn-link" data-cy="addUser">
97
- <i c8y-icon="user-plus" class="m-r-4"></i>
114
+ <li
115
+ title="{{ 'Add user' | translate }}"
116
+ ng-show="vm.canAddUser"
117
+ >
118
+ <a
119
+ class="btn btn-link"
120
+ href="#{{ vm.ROUTE_NEW_USER }}"
121
+ data-cy="addUser"
122
+ >
123
+ <i
124
+ class="m-r-4"
125
+ c8y-icon="user-plus"
126
+ ></i>
98
127
  {{ 'Add user' | translate }}
99
128
  </a>
100
129
  </li>
101
130
 
102
131
  <li ng-show="vm.canRevokeTokens">
103
132
  <button
133
+ class="btn btn-link"
104
134
  title="{{ 'Log out all users' | translate }}"
105
135
  type="button"
106
- class="btn btn-link"
136
+ data-cy="c8y-users--log-out-all-users"
107
137
  ng-click="vm.revokeTokens()"
108
138
  >
109
139
  <i c8y-icon="account-disable"></i>
@@ -113,9 +143,9 @@
113
143
 
114
144
  <li>
115
145
  <button
146
+ class="btn btn-link"
116
147
  title="{{ 'Reload' | translate }}"
117
148
  type="button"
118
- class="btn btn-link"
119
149
  ng-click="vm.refresh()"
120
150
  >
121
151
  <i c8y-icon="refresh"></i>
@@ -1 +1 @@
1
- "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}!function(){function e(e,r,t,S){l.$inject=["$q","$routeParams"],d.$inject=["$q","$location","$uibModal","c8yBase","c8yUser","c8yRoles","c8yUserRolesUi","c8yUserInventoryRoles","c8yUserUtil","c8yPermissions","c8yAlert","$injector","passwordStrengthCheckerFactory","gettextCatalog","c8yModal"];var n="c8y-user",o=["ROLE_USER_MANAGEMENT_READ","ROLE_USER_MANAGEMENT_ADMIN","ROLE_USER_MANAGEMENT_CREATE"],C=c(),L=c("/new"),O=c("/:userId"),a={template:"<c8y-user-list-view></c8y-user-list-view>"},i={priority:1e3,icon:n,name:S("Profile / Global roles"),template:'<c8y-user-detail-view user-id="$resolve.userId"></c8y-user-detail-view>',resolve:{userId:["$route",function(e){return e.current.params.userId}]}},u={priority:-1e3,icon:"c8y-atom",name:S("Application access"),template:'<c8y-user-application-access user="$resolve.user"></c8y-user-application-access>',resolve:{user:["$route","c8yUser","c8yBase",function(e,t,n){return t.detail(e.current.params.userId).then(n.getResData).then(function(r){return r.owner?t.detail(r.owner).then(n.getResData).then(function(e){return r._owner=e,r}).catch(function(){return r}):r})}]}},s={data:l};return{initUi:function(){e.addNavigation({parent:{name:S("Accounts"),icon:"c8y-accounts"},name:S("Users"),path:c().replace(/^\//,""),icon:n,priority:5e3,routerLinkExact:!1,showIfPermissions:{anyRole:o}}),r.when(C,a),r.when(L,i),r.when(O,i),r.when(O,u),t.addTitle(O,s)},$get:d};function c(e){return"/users".concat(e||"")}function l(e,r){return e.when({title:r.userId})}function d(a,r,t,n,i,o,e,u,s,c,l,d,f,g,y){var p,f=f();return i.current().then(function(e){p=e.id}),{ROUTE_NEW_USER:L,fullName:function(e){return"".concat(e.firstName||""," ").concat(e.lastName||"")},toggleExpanded:function(e){var t=!e._expanded;(e._expanded=t)||!function r(e){_.forEach(e,function(e){e._expanded=t,r(e._owns)})}(e._owns);return e},createUserFlatTree:s.createUserFlatTree,visibleInList:function(e){return!_.get(e,"owner")||_.get(e,"_owner._expanded")},expandAll:function(e){_.forEach(e,function(e){e._expanded=!0})},collapseAll:function(e){_.forEach(e,function(e){delete e._expanded})},detailLink:h,editUser:function(e){r.path(h(e))},search:s.search,changeUser:function(e,r){var t={changeGlobalRoles:v,copyInventoryRoles:A,enable:E,disable:m,remove:b,delegate:I,removeDelegate:N},n="string"==typeof r?r:_.get(r,"name");return _.get(t,n,a.reject)(e,_.get(r,"data"))},getPasswordStrength:f.getStrengthForColor,getPasswordColor:f.getHexColorForColor,getPasswordIcon:f.getIconForColor,isTfaAvailable:i.isTfaAvailable,gotoList:function(){r.path(C)},userHierarchyActive:s.userHierarchyActive,hasAppManagement:function(e){return c.hasAnyRole(["ROLE_APPLICATION_MANAGEMENT_READ","ROLE_APPLICATION_MANAGEMENT_ADMIN"],e)},isUndeletable:function(e){return p?U(e)||c.hasRole(e,"ROLE_TENANT_ADMIN"):void 0},isCurrent:U,warnAboutUserLogOutIfNeeded:function(e,r){var t=r.rolesChanged,r=r.passwordChanged||t,n=d.get("c8yAuthBridgeService").getPreferredLoginOption(),o="OAUTH2_INTERNAL"===n.type,n=!_.isUndefined(n.sessionConfiguration);return e.id&&(!U(e)||t)&&o&&n&&r?(t=U(e)?S("Updating global roles will force you to log out. Do you want to proceed?"):g.getString('Updating password or global roles will force user "{{userName}}" to log out. Do you want to proceed?',e),y({title:S("Force user to log out"),body:t,status:"warning",size:"sm",labels:{ok:S("Update and log out user")}})):a.resolve()},EXTERNAL_ORIGIN_TEXT:S("You cannot edit the user since it is managed via your authorization server."),EXTERNAL_ORIGIN_TEXT_FOR_USERS_LIST_VIEW:S("You cannot edit global roles for user with external origin, since it is managed via your authorization server."),EXTERNAL_ORIGIN_DYNAMIC_ACCESS_MAPPING_EXCEPTION_TEXT:S("You cannot edit the user since it is managed via your authorization server, but the configuration allows for changing global roles."),LOCAL_USER_TEXT:S("You are about to create a local user which will not be able to log in via single sign-on.")};function h(e){return O.replace(/:userId/,e.id)}function v(e,r){r=_.map(r.roles,"id");return o.global.updateGroups(e,r)}function A(n){return a.all({copy:e.copyFromUserDialog(n),assignedRoles:i.listInventoryRoles(n)}).then(function(e){var r="replace"===e.copy.process,t=e.copy.roles,e=_.keyBy(e.assignedRoles.data.inventoryAssignments,"managedObject");return u.copyUserRoles(t,e,n,r)})}function m(e){return i.disable(e)}function E(e){return i.enable(e)}function b(r){var e=0<r.subusersCount;return t.open({component:"c8yUserRemovalModal",resolve:{user:function(){return r}}}).result.then(function(e){var t;return e.deleteAll?w(r,{deep:!0}).then(function(e){return e.reduce(function(e,r){return e.then(function(){return i.remove(r)})},a.resolve())}):_.isUndefined(e.newOwner)?a.resolve():(t=e.newOwner,w(r,{deep:!1}).then(function(e){return e.reduce(function(e,r){return e.then(function(){return i.save({id:r.id,owner:t})})},a.resolve())}))}).then(function(){return i.remove(r)}).then(function(){return l.success(g.getString('User "{{userName}}" deleted.',r))}).then(function(){return{removeUser:!e,refresh:e}})}function w(e,r){var o,t=1<arguments.length&&void 0!==r?r:{};return 0===e.subusersCount?a.resolve([]):(o=[],r=function e(r){o.push.apply(o,_toConsumableArray(r));var t=r.statistics.pageSize,n=r.paging.next,t=r.length>=t,n=n&&t?r.paging.next().then(e):a.resolve(o);return n},i.list({owner:e.id,withSubusersCount:!0,pageSize:n.MAX_PAGESIZE}).then(r).then(function(e){var r;return t.deep?(r=e.map(function(e){return w(e,t)}),a.all([].concat(_toConsumableArray(e),_toConsumableArray(r))).then(_.flattenDeep)):e}))}function I(e){return i.delegateTo(e).then(_.partial(T,e))}function T(e){return l.success(g.getString('You delegated to user "{{userName}}".',e))}function N(e){var r={id:e.id,delegatedBy:null};return i.save(r).then(_.partial(R,e))}function R(e){return l.success(g.getString('You removed delegation from user "{{userName}}".',e))}function U(e){return p&&p===e.id}}}e.$inject=["c8yNavigatorProvider","c8yViewsProvider","c8yTitleProvider","gettext"],angular.module("c8y.users").provider("c8yUsersUi",e)}();
1
+ "use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}!function(){function e(e,r,t,S){l.$inject=["$q","$routeParams"],d.$inject=["$q","$location","$uibModal","c8yBase","c8yUser","c8yRoles","c8yUserRolesUi","c8yUserInventoryRoles","c8yUserUtil","c8yPermissions","c8yAlert","$injector","passwordStrengthCheckerFactory","gettextCatalog","c8yModal"];var n="c8y-user",o=["ROLE_USER_MANAGEMENT_READ","ROLE_USER_MANAGEMENT_ADMIN","ROLE_USER_MANAGEMENT_CREATE"],C=c(),L=c("/new"),O=c("/:userId"),a={template:"<c8y-user-list-view></c8y-user-list-view>"},i={priority:1e3,icon:n,name:S("Profile / Global roles"),template:'<c8y-user-detail-view user-id="$resolve.userId"></c8y-user-detail-view>',resolve:{userId:["$route",function(e){return e.current.params.userId}]}},u={priority:-1e3,icon:"c8y-atom",name:S("Application access"),template:'<c8y-user-application-access user="$resolve.user"></c8y-user-application-access>',resolve:{user:["$route","c8yUser","c8yBase",function(e,t,n){return t.detail(e.current.params.userId).then(n.getResData).then(function(r){return r.owner?t.detail(r.owner).then(n.getResData).then(function(e){return r._owner=e,r}).catch(function(){return r}):r})}]}},s={data:l};return{initUi:function(){e.addNavigation({parent:{name:S("Accounts"),icon:"c8y-accounts"},name:S("Users"),path:c().replace(/^\//,""),icon:n,priority:5e3,routerLinkExact:!1,showIfPermissions:{anyRole:o}}),r.when(C,a),r.when(L,i),r.when(O,i),r.when(O,u),t.addTitle(O,s)},$get:d};function c(e){return"/users".concat(e||"")}function l(e,r){return e.when({title:r.userId})}function d(a,r,t,n,i,o,e,u,s,c,l,d,g,f,y){var p,g=g();return i.current().then(function(e){p=e.id}),{ROUTE_NEW_USER:L,fullName:function(e){return"".concat(e.firstName||""," ").concat(e.lastName||"")},toggleExpanded:function(e){var t=!e._expanded;(e._expanded=t)||!function r(e){_.forEach(e,function(e){e._expanded=t,r(e._owns)})}(e._owns);return e},createUserFlatTree:s.createUserFlatTree,visibleInList:function(e){return!_.get(e,"owner")||_.get(e,"_owner._expanded")},expandAll:function(e){_.forEach(e,function(e){e._expanded=!0})},collapseAll:function(e){_.forEach(e,function(e){delete e._expanded})},detailLink:h,editUser:function(e){r.path(h(e))},search:s.search,changeUser:function(e,r){var t={changeGlobalRoles:v,copyInventoryRoles:A,enable:E,disable:m,remove:b,delegate:I,removeDelegate:N},n="string"==typeof r?r:_.get(r,"name");return _.get(t,n,a.reject)(e,_.get(r,"data"))},getPasswordStrength:g.getStrengthForColor,getPasswordColor:g.getHexColorForColor,getPasswordIcon:g.getIconForColor,isTfaAvailable:i.isTfaAvailable,gotoList:function(){r.path(C)},userHierarchyActive:s.userHierarchyActive,hasAppManagement:function(e){return c.hasAnyRole(["ROLE_APPLICATION_MANAGEMENT_READ","ROLE_APPLICATION_MANAGEMENT_ADMIN"],e)},isUndeletable:function(e){return p?U(e)||c.hasRole(e,"ROLE_TENANT_ADMIN"):void 0},isCurrent:U,warnAboutUserLogOutIfNeeded:function(e,r){var t=r.rolesChanged,r=r.passwordChanged||t,n="OAUTH2_INTERNAL"===d.get("c8yAuthBridgeService").getPreferredLoginOption().type;return e.id&&(!U(e)||t)&&n&&r?(t=U(e)?S("Updating global roles will force you to log out. Do you want to proceed?"):f.getString('Updating password or global roles will force user "{{userName}}" to log out. Do you want to proceed?',e),y({title:S("Force user to log out"),body:t,status:"warning",size:"sm",labels:{ok:S("Update and log out user")}})):a.resolve()},EXTERNAL_ORIGIN_TEXT:S("You cannot edit the user since it is managed via your authorization server."),EXTERNAL_ORIGIN_TEXT_FOR_USERS_LIST_VIEW:S("You cannot edit global roles for user with external origin, since it is managed via your authorization server."),EXTERNAL_ORIGIN_DYNAMIC_ACCESS_MAPPING_EXCEPTION_TEXT:S("You cannot edit the user since it is managed via your authorization server, but the configuration allows for changing global roles."),LOCAL_USER_TEXT:S("You are about to create a local user which will not be able to log in via single sign-on.")};function h(e){return O.replace(/:userId/,e.id)}function v(e,r){r=_.map(r.roles,"id");return o.global.updateGroups(e,r)}function A(n){return a.all({copy:e.copyFromUserDialog(n),assignedRoles:i.listInventoryRoles(n)}).then(function(e){var r="replace"===e.copy.process,t=e.copy.roles,e=_.keyBy(e.assignedRoles.data.inventoryAssignments,"managedObject");return u.copyUserRoles(t,e,n,r)})}function m(e){return i.disable(e)}function E(e){return i.enable(e)}function b(r){var e=0<r.subusersCount;return t.open({component:"c8yUserRemovalModal",resolve:{user:function(){return r}}}).result.then(function(e){var t;return e.deleteAll?w(r,{deep:!0}).then(function(e){return e.reduce(function(e,r){return e.then(function(){return i.remove(r)})},a.resolve())}):_.isUndefined(e.newOwner)?a.resolve():(t=e.newOwner,w(r,{deep:!1}).then(function(e){return e.reduce(function(e,r){return e.then(function(){return i.save({id:r.id,owner:t})})},a.resolve())}))}).then(function(){return i.remove(r)}).then(function(){return l.success(f.getString('User "{{userName}}" deleted.',r))}).then(function(){return{removeUser:!e,refresh:e}})}function w(e,r){var o,t=1<arguments.length&&void 0!==r?r:{};return 0===e.subusersCount?a.resolve([]):(o=[],r=function e(r){o.push.apply(o,_toConsumableArray(r));var t=r.statistics.pageSize,n=r.paging.next,t=r.length>=t,n=n&&t?r.paging.next().then(e):a.resolve(o);return n},i.list({owner:e.id,withSubusersCount:!0,pageSize:n.MAX_PAGESIZE}).then(r).then(function(e){var r;return t.deep?(r=e.map(function(e){return w(e,t)}),a.all([].concat(_toConsumableArray(e),_toConsumableArray(r))).then(_.flattenDeep)):e}))}function I(e){return i.delegateTo(e).then(_.partial(T,e))}function T(e){return l.success(f.getString('You delegated to user "{{userName}}".',e))}function N(e){var r={id:e.id,delegatedBy:null};return i.save(r).then(_.partial(R,e))}function R(e){return l.success(f.getString('You removed delegation from user "{{userName}}".',e))}function U(e){return p&&p===e.id}}}e.$inject=["c8yNavigatorProvider","c8yViewsProvider","c8yTitleProvider","gettext"],angular.module("c8y.users").provider("c8yUsersUi",e)}();
@@ -1 +0,0 @@
1
- "use strict";angular.module("c8y.deviceControl.message").controller("deviceControlMessageWidget",["$scope","$routeParams","c8yBase","c8yInventory","c8yDevices","c8yDeviceControl","c8yAlert","gettext","gettextCatalog",function(c,i,t,e,n,s,o,d,a){function g(){var e=i.deviceId;return e=c.child.config&&c.child.config.device&&c.child.config.device.id?c.child.config.device.id:e}c.message=function(e){var c=a.getString('Send message "{{msg}}"',{msg:e});s.create({deviceId:g(),description:c,c8y_Message:{text:e}}).then(function(){o.success(d("Message will be sent."))})},c.device=void 0,c.$watch("device",function(){c.visible=c.device&&n.supportsOperation(c.device,"c8y_Message")}),e.detail(g()).then(function(e){c.device=t.getResData(e)})}]);
@@ -1,15 +0,0 @@
1
- {
2
- "name": "Device message sending control",
3
- "ngModules": [
4
- "c8y.deviceControl.message"
5
- ],
6
- "category": "Device",
7
- "description": "Device message sending control",
8
- "imports": [
9
- ],
10
- "js": [
11
- "index.js",
12
- "controllers/deviceControlMessageWidget.js"
13
- ],
14
- "copy": ["img/*"]
15
- }
@@ -1 +0,0 @@
1
- "use strict";angular.module("c8y.deviceControl.message",[]).config(["c8yComponentsProvider","gettext",function(e,s){e.add({name:"deviceControlMessageWidget",nameDisplay:s("Message sending"),description:s("Remotely send a message to a device"),templateUrl:":::PLUGIN_PATH:::/views/deviceControlMessageWidget.html",previewImage:":::PLUGIN_PATH:::/img/message-widget-pr.png",options:{groupsSelectable:!1}})}]);
@@ -1,26 +0,0 @@
1
- <div ng-controller="deviceControlMessageWidget">
2
- <div ng-show="!visible" class="alert alert-warning" translate>
3
- Operation not supported by this device
4
- </div>
5
- <div ng-show="visible">
6
- <div class="input-group p-16">
7
- <input
8
- type="text"
9
- class="form-control"
10
- ng-model="str"
11
- placeholder="{{ 'Message' | translate }}"
12
- />
13
- <span class="input-group-btn">
14
- <button
15
- title="{{ 'Send' | translate }}"
16
- class="btn btn-primary"
17
- ng-click="message(str)"
18
- ng-disabled="!str"
19
- translate
20
- >
21
- Send
22
- </button>
23
- </span>
24
- </div>
25
- </div>
26
- </div>
@@ -1 +0,0 @@
1
- "use strict";angular.module("c8y.deviceDatabase4").factory("c8yDeviceTypeDetail",function(){var t=!1;return{getIsDetailEdited:function(){return t},setIsDetailEdited:function(e){t=e}}});
@@ -1,20 +0,0 @@
1
- {
2
- "name": "Info Gauge",
3
- "ngModules":[
4
- "c8y.infoGauge"
5
- ],
6
- "category": "widgets",
7
- "description": "Radial gauge and multiple label and value pairs for data points",
8
- "less": [
9
- "style.less"
10
- ],
11
- "js": [
12
- "index.js",
13
- "infoGauge.service.js",
14
- "infoGauge.controller.js",
15
- "infoGaugeConfig.controller.js"
16
- ],
17
- "copy": [
18
- "img/*"
19
- ]
20
- }
@@ -1 +0,0 @@
1
- "use strict";!function(){function n(n){n.init()}n.$inject=["infoGaugeService"],angular.module("c8y.infoGauge",[]).run(n)}();
@@ -1 +0,0 @@
1
- "use strict";!function(){function e(t,u,a,e){var r,s=this,i=u.find(".gauge-svg"),o=u.find(".gauge-legend"),g=u.parents(".card-inner-scroll"),c=[],f=[],l=e.COLORS,n=_.debounce(d,100);function d(){var e=i.position().left===o.position().left,n=g.innerHeight(),t=n;e&&(t=n-o.height()),i.height(t)}function p(e){r=e,v()}function m(e){return{series:e.series,fragment:e.fragment,device:e.__target.id}}function h(){_.invoke(c,"stop"),c=[]}function v(){var e,n,t,a,i,o,g=s.gaugeDatapoint;r&&(i=(i=r[g.fragment])&&i[g.series],s.gaugeValue=i&&i.value,s.gaugeDateTime=r.time,g=s.gaugeValue,i=Number(s.gaugeDatapoint.min||0),o=Number(s.gaugeDatapoint.max||0),e=Number(s.gaugeDatapoint.yellowRangeMin),n=Number(s.gaugeDatapoint.yellowRangeMax),t=Number(s.gaugeDatapoint.redRangeMin),a=Number(s.gaugeDatapoint.redRangeMax),i=377.25-d3.scale.linear().domain([i,o]).range([0,100])(g)/100*377.25+125.75,o=l.GREEN,_.isFinite(e)&&_.isFinite(n)&&e<=g&&g<=n&&(o=l.YELLOW),_.isFinite(t)&&_.isFinite(a)&&t<=g&&g<=a&&(o=l.RED),u.find(".gauge-svg svg path.track-value").css({"stroke-dashoffset":-i,stroke:o}))}_.assign(s,{getLabelValue:function(e,n){n=f[n];{var t;if(n)return t=n[e.fragment],(t=t&&t[e.series])&&t.value}return n},getLabelDateTime:function(e,n){n=f[n];return _.get(n,"time",n)}}),t.$watch("child.config",function(){var e=t.child.config,n="__active";s.gaugeDatapoint=_.find(e.datapointsGauge,n),s.labelDatapoints=_.filter(e.datapointsLabels,n),function(){h();var e=s.gaugeDatapoint,n=s.labelDatapoints;e&&((e=a.latest(m(e),!0)).then(p),c.push(e));f=[],_.forEach(n,function(e,n){e=a.latest(m(e),!0);e.then(function(e){f[n]=e}),c.push(e)})}()},!0),t.$watch(function(){return r},v,!0),t.$on("$destroy",function(){h(),$(window).off("resize",n)}),t.$on("dashboardResize",n),d(),g.length&&$(window).on("resize",n)}e.$inject=["$scope","$element","c8yMeasurements","infoGaugeService"],angular.module("c8y.infoGauge").controller("infoGaugeWidgetController",e)}();
@@ -1 +0,0 @@
1
- "use strict";!function(){function a(a,e){var t=":::PLUGIN_PATH:::/",n="".concat(t,"infoGaugeWidget.html"),i="".concat(t,"infoGaugeWidget.config.html");return{init:function(){e.add({name:"infoGauge",nameDisplay:a("Info gauge"),description:a("Radial gauge and multiple label and value pairs for data points"),templateUrl:n,configTemplateUrl:i,previewImage:":::PLUGIN_PATH:::/img/info-gauge-widget-pr.png",options:{noDeviceTarget:!0,datapointAttributes:["datapointsLabels","datapointsGauge"]}})},COLORS:{RED:"#D90000",GREEN:"#50E3C2",YELLOW:"#FDC000"}}}a.$inject=["gettext","c8yComponents"],angular.module("c8y.infoGauge").factory("infoGaugeService",a)}();
@@ -1 +0,0 @@
1
- "use strict";function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,t){var r;if(a)return"string"==typeof a?_arrayLikeToArray(a,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(a).slice(8,-1))&&a.constructor?a.constructor.name:r)||"Set"===r?Array.from(a):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(a,t):void 0}function _iterableToArray(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,t){(null==t||t>a.length)&&(t=a.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=a[r];return e}!function(){function a(r){var e=this;function a(){var a;r.config&&((a=r.config).datapointsLabels||(a.datapointsLabels=[]),a.datapointsGauge||(a.datapointsGauge=[]),t())}function t(){var a=r.config,t=a.datapointsGauge||[],a=a.datapointsLabels||[],t=[].concat(_toConsumableArray(t),_toConsumableArray(a));e.atLeastOneActiveDatapoint=!!_.find(t,"__active"),r.infoGaugeForm.$setValidity("dpSelected",e.atLeastOneActiveDatapoint)}e.atLeastOneActiveDatapoint=!1,r.$watch("config.datapointsLabels",a,!0),r.$watch("config.datapointsGauge",a,!0),_.assign(e,{labelChange:function(a){r.config.datapointsLabels=a,t()},gaugeChange:function(a){r.config.datapointsGauge=a,t()}})}a.$inject=["$scope"],angular.module("c8y.infoGauge").controller("infoGaugeWidgetConfigController",a)}();
@@ -1,58 +0,0 @@
1
- <div
2
- ng-form="infoGaugeForm"
3
- ng-controller="infoGaugeWidgetConfigController as vm"
4
- class="no-card-context p-t-8"
5
- >
6
- <div class="p-l-24 p-r-24 separator-bottom">
7
- <div class="row">
8
- <div class="col-md-6">
9
- <div class="form-group">
10
- <label translate>Decimal places</label>
11
- <input
12
- name="decimalPlaces"
13
- ng-model="config.fractionSize"
14
- type="number"
15
- ng-min="0"
16
- ng-max="10"
17
- step="1"
18
- c8y-model-options="{unsetWhenNull: true}"
19
- class="form-control"
20
- />
21
- <c8y-error-feedback field="infoGaugeForm.decimalPlaces"></c8y-error-feedback>
22
- </div>
23
- </div>
24
- <div class="col-md-6">
25
- <div class="alert alert-info" role="alert" ng-hide="vm.atLeastOneActiveDatapoint" translate>
26
- At least one data point for the labels or the gauge needs to be selected.
27
- </div>
28
- </div>
29
- </div>
30
- </div>
31
- <div class="p-l-24 p-r-24">
32
- <div class="row">
33
- <div class="col-md-6">
34
- <c8y-data-point-list
35
- min-select-count="0"
36
- datapoints="config.datapointsLabels"
37
- dont-save="true"
38
- no-chart
39
- list-title="'Data point for labels' | translate"
40
- class="bg-level-0"
41
- allow-adding-data-points-from-context-mo-only="dashboard.deviceType && dashboard.deviceTypeValue"
42
- ></c8y-data-point-list>
43
- </div>
44
- <div class="col-md-6">
45
- <c8y-data-point-list
46
- max-select-count="1"
47
- min-select-count="0"
48
- datapoints="config.datapointsGauge"
49
- dont-save="true"
50
- no-chart
51
- class="bg-level-0"
52
- list-title="'Data point for gauge' | translate"
53
- allow-adding-data-points-from-context-mo-only="dashboard.deviceType && dashboard.deviceTypeValue"
54
- ></c8y-data-point-list>
55
- </div>
56
- </div>
57
- </div>
58
- </div>
@@ -1,32 +0,0 @@
1
- <!-- widget start -->
2
- <div class="label-value-unit-gauge" ng-controller="infoGaugeWidgetController as vm">
3
-
4
- <div class="gauge-legend" ng-hide="!vm.labelDatapoints || !vm.labelDatapoints.length">
5
- <label ng-repeat-start="dp in vm.labelDatapoints" class="text-truncate">{{dp.label}}</label>
6
- <h3>{{vm.getLabelValue(dp, $index) | number:child.config.fractionSize}} {{dp.unit}}</h3>
7
- <p class="text-muted m-b-8" ng-repeat-end>
8
- <small><em>{{vm.getLabelDateTime(dp, $index) | absoluteDateTimeShort}}</em></small>
9
- </p>
10
- </div>
11
-
12
- <div class="gauge-svg" ng-hide="!vm.gaugeDatapoint">
13
-
14
- <svg width="214px" height="214px" viewBox="0 0 214 214" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
15
- <title>Oval</title>
16
- <desc>radial for GD</desc>
17
- <defs></defs>
18
-
19
- <g id="scale" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-dasharray="1,5">
20
- <circle id="Oval" stroke="#CACECE" stroke-width="7" cx="107" cy="107" r="103"></circle>
21
- <rect id="mask" stroke="none" fill-rule="evenodd" x="0" y="0" width="214" height="214" transform="rotate(-45 290 182)"></rect>
22
- </g>
23
- <path class="track" d="M 107 27 a 80 80 0 1 0.1 0 Z" transform="rotate(-135 107 107)"></path>
24
- <path class="track-value" d="M 107 27 a 80 80 0 1 0.1 0 Z" transform="rotate(-135 107 107)"></path>
25
- <text class="center-label" x="107" y="91">{{vm.gaugeDatapoint.label}}</text>
26
- <text class="center-value" x="107" y="115">{{vm.gaugeValue | number:child.config.fractionSize}}</text>
27
- <text class="center-unit" x="107" y="129">{{vm.gaugeDatapoint.unit}}</text>
28
- <text class="center-date-time" x="107" y="142">{{vm.gaugeDateTime | absoluteDateTimeShort}}</text>
29
- </svg>
30
- </div>
31
- <div class="clearfix"></div>
32
- </div>
File without changes
@@ -1 +0,0 @@
1
- "use strict";!function(){function n(t,n,o,i,r){var e,a=this;function c(){return n.all({schema:o.getSchema(),form:o.getForm(a.optionsGroups),options:o.getSchemaFormOptions(),configuration:o.getConfiguration()}).then(function(n){e=_.cloneDeep(n.configuration),_.assign(a,n)})}_.assign(a,{$onInit:c,canSave:function(){var n=_.get(a,"options.formDefaults.readonly"),o=_.get(t,"platformConfigurationForm.$invalid");return!n&&!o},save:function(){return o.saveConfiguration(a.configuration,e).then(c).then(_.partial(i.success,r("Configuration saved.")))},cancel:function(){return c().then(_.partial(i.success,r("Configuration reloaded.")))}})}n.$inject=["$scope","$q","c8yPlatformConfigurationUi","c8yAlert","gettext"],angular.module("c8y.platformConfiguration").component("c8yPlatformConfigurationForm",{templateUrl:":::PLUGIN_PATH:::/platformConfigurationForm.html",bindings:{optionsGroups:"<"},controller:n,controllerAs:"vm"})}();
@@ -1,50 +0,0 @@
1
- <c8y-ui-title-set title="'Enterprise tenant' | translate"></c8y-ui-title-set>
2
- <c8y-breadcrumbs-set>
3
- <c8y-breadcrumbs-item
4
- label="{{ 'Configuration' | translate }}"
5
- icon="cog"
6
- ></c8y-breadcrumbs-item>
7
- <c8y-breadcrumbs-item
8
- label="{{ 'Enterprise tenant' | translate }}"
9
- icon="cog"
10
- ></c8y-breadcrumbs-item>
11
- <c8y-breadcrumbs-item
12
- label="{{ 'Settings' | translate }}"
13
- icon="cog"
14
- ></c8y-breadcrumbs-item>
15
- </c8y-breadcrumbs-set>
16
- <div class="row">
17
- <div class="col-lg-12 col-lg-max">
18
- <form name="platformConfigurationForm" novalidate>
19
- <div class="card card--fullpage">
20
- <div class="card-header separator">
21
- <div class="card-title">
22
- {{ 'Configuration ' | translate }}
23
- </div>
24
- </div>
25
- <div class="inner-scroll">
26
- <div class="card-block">
27
- <c8y-schema-form
28
- schema="vm.schema"
29
- form="vm.form"
30
- model="vm.configuration"
31
- options="vm.options"
32
- ></c8y-schema-form>
33
- </div>
34
- </div>
35
-
36
- <div class="card-footer separator">
37
- <button
38
- title="{{ 'Save configuration' | translate }}"
39
- type="submit"
40
- class="btn btn-primary"
41
- ng-click="vm.save()"
42
- ng-disabled="!vm.canSave() || !platformConfigurationForm.$dirty"
43
- >
44
- <span>{{ 'Save' | translate }}</span>
45
- </button>
46
- </div>
47
- </div>
48
- </form>
49
- </div>
50
- </div>