@c8y/ng1-modules 1019.24.6 → 1020.0.8

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 (150) hide show
  1. package/NOTICES +8357 -6666
  2. package/app-logs/app-logs.service.js +1 -1
  3. package/asset-notes/assetNotes.component.js +1 -1
  4. package/assetPropertyWidget/main.controller.js +1 -1
  5. package/cell-id-information-activator/cell-id-information-activator.config.js +1 -1
  6. package/cell-id-information-activator/cell-id-information-activator.service.js +1 -1
  7. package/cell-id-usage-statistics/cell-id-usage-statistics.component.js +1 -1
  8. package/cell-id-usage-statistics/cell-id-usage-statistics.service.js +1 -1
  9. package/commandTemplates/controllers/commandTemplates.js +1 -1
  10. package/commandTemplates/views/commandTemplates.html +83 -41
  11. package/core/core/services/alarms.js +1 -1
  12. package/core/core/services/application.js +1 -1
  13. package/core/core/services/auth.js +1 -1
  14. package/core/core/services/base.js +1 -1
  15. package/core/core/services/deviceShell.js +1 -1
  16. package/core/core/services/devices.js +1 -1
  17. package/core/core/services/dynamicGroups.js +1 -1
  18. package/core/core/services/geo.js +1 -1
  19. package/core/core/services/groups.js +1 -1
  20. package/core/core/services/inventory.js +1 -1
  21. package/core/core/services/kpi.js +1 -1
  22. package/core/core/services/measurements.js +1 -1
  23. package/core/core/services/settings.js +1 -1
  24. package/core/core/services/tenant.js +1 -1
  25. package/core/core/services/user.js +1 -1
  26. package/core/core/services/util.js +1 -1
  27. package/core/locales/de.po +553 -306
  28. package/core/locales/en.po +69 -0
  29. package/core/locales/es.po +562 -314
  30. package/core/locales/fr.po +560 -313
  31. package/core/locales/ja_JP.po +587 -299
  32. package/core/locales/ko.po +334 -327
  33. package/core/locales/nl.po +636 -389
  34. package/core/locales/pl.po +558 -310
  35. package/core/locales/pt_BR.po +575 -328
  36. package/core/locales/ru.po +21 -320
  37. package/core/locales/zh_CN.po +330 -323
  38. package/core/locales/zh_TW.po +330 -323
  39. package/core/ui/components/passwordStrengthChecklist.html +1 -1
  40. package/core/ui/configurable-device-list-columns/configurable-columns.service.js +1 -1
  41. package/core/ui/configurable-device-list-columns/modal-columns-configure.component.js +1 -1
  42. package/core/ui/controllers/deviceList.js +1 -1
  43. package/core/ui/controllers/eventList.js +1 -1
  44. package/core/ui/csvExporter/csvExporter.controller.js +1 -1
  45. package/core/ui/directives/alarmList.js +1 -1
  46. package/core/ui/directives/map.js +1 -1
  47. package/core/ui/directives/map2.js +1 -1
  48. package/core/ui/operations/operations-timeline.html +24 -10
  49. package/core/ui/properties/lastDeviceMessage.computedProperty.js +1 -1
  50. package/core/ui/schemaForm/schemaForm.component.js +1 -1
  51. package/core/ui/services/deviceListColumns.js +1 -1
  52. package/core/ui/services/measurementsReport.js +1 -1
  53. package/core/ui/user/editUser.directive.html +2 -0
  54. package/core/ui/views/eventList.html +3 -1
  55. package/dataBroker/connectors/connectors.html +1 -0
  56. package/dataBroker/connectorsAlarms/connectorAlarms.component.js +1 -1
  57. package/device-protocol-actility/actility-device.provider.js +1 -1
  58. package/device-protocol-canbus/canbus-device.provider.js +1 -1
  59. package/device-protocol-canopen/canopen-device.provider.js +1 -1
  60. package/device-protocol-deviceDatabase4/device-type-protocol-base.provider.js +1 -1
  61. package/device-protocol-lora/lora-device.provider.js +1 -1
  62. package/device-protocol-lpwan/lpwan-device.provider.js +1 -1
  63. package/device-protocol-modbus/modbus-device.provider.js +1 -1
  64. package/device-protocol-opcua/opcua-device.provider.js +1 -1
  65. package/device-protocol-profibus/profibus-device.provider.js +1 -1
  66. package/device-protocol-sigfox/sigfox-device.provider.js +1 -1
  67. package/device-protocol-snmp/snmp-device.provider.js +1 -1
  68. package/device-protocols/device-protocol-import-button.component.js +1 -1
  69. package/deviceDatabase4/detail/device-type-detail.component.js +1 -1
  70. package/deviceDatabase4/device-database.service.js +1 -1
  71. package/deviceDatabase4/device-type-list.component.js +1 -1
  72. package/deviceDatabase4/modals/configure-discrete-io.component.js +1 -1
  73. package/deviceDatabase4/modals/configure-register.component.js +1 -1
  74. package/deviceDatabase4/modals/import-device-type.component.js +1 -1
  75. package/deviceDatabase4/unique.directive.js +1 -1
  76. package/deviceDetail/cumulocity.json +0 -1
  77. package/deviceSelector/controllers/deviceSelectorComboCtrl.js +1 -1
  78. package/deviceStatusWidget/deviceStatus.component.js +1 -1
  79. package/deviceStatusWidget/ownerStatus.component.js +1 -1
  80. package/devicemanagement-availability/controllers/availability.js +1 -1
  81. package/devicemanagement-availability/views/detail.html +2 -2
  82. package/devicemanagement-eventList/controllers/eventList.js +1 -1
  83. package/enterpriseEdition/customBranding/brandingConfigurationUi.provider.js +1 -1
  84. package/enterpriseEdition/sslCertificate/manageCertificateForm.html +1 -1
  85. package/eventList/eventList.controller.js +1 -1
  86. package/generic-ui/generic-ui-inventory-property.component.js +1 -1
  87. package/groupsHierarchy/controllers/groupsListCtrl.js +1 -1
  88. package/kpi/controllers/pieChart.js +1 -1
  89. package/measurements/fragmentChart/fragmentChart.component.js +1 -1
  90. package/modbusConfiguration4/fieldbus-config.component.js +1 -1
  91. package/modbusConfiguration4/fieldbus-device-list.component.js +1 -1
  92. package/modbusWidget4/modbus-widget.service.js +1 -1
  93. package/modbusWidget4/widget-config.component.js +1 -1
  94. package/modbusWidget4/widget.component.js +1 -1
  95. package/package.json +5 -5
  96. package/remoteAccess/remoteAccess.service.js +1 -1
  97. package/remoteAccess/remoteAccessSettings/remoteAccessSettings.component.js +1 -1
  98. package/roles/detail/roleDetailInventory.html +33 -14
  99. package/scada/mapping.directive.js +1 -1
  100. package/simulators/simulatorsUi.provider.js +1 -1
  101. package/smartRestEditor/views/list.html +1 -0
  102. package/smartRules/directives/smartRuleParamInputKpi.js +1 -1
  103. package/smartRules/list/smartRulesList.html +25 -0
  104. package/smartRules/views/edit.html +95 -27
  105. package/smartRules/views/list.html +39 -5
  106. package/tenantStatistics/tenant-statistics.component.js +1 -1
  107. package/userRoles/inventoryRolesTab/inventoryRolesTab.component.js +1 -1
  108. package/users/userListView/userListView.component.js +1 -1
  109. package/users/userListView/userListView.html +1 -0
  110. package/users/userRemovalModal/userRemovalModal.component.html +1 -0
  111. package/alarmAssets/cumulocity.json +0 -14
  112. package/alarmAssets/img/all-critical-alarms-widget-pr.png +0 -0
  113. package/alarmAssets/index.js +0 -1
  114. package/alarmAssets/views/component.html +0 -8
  115. package/alarms/cumulocity.json +0 -21
  116. package/alarms/img/alarm-list-widget-pr.png +0 -0
  117. package/alarms/index.js +0 -1
  118. package/alarms/index.mock.js +0 -1
  119. package/alarms/severity.directive.js +0 -1
  120. package/alarms/severity.html +0 -13
  121. package/alarms/styles.css +0 -3
  122. package/alarms/widget-config.controller.js +0 -1
  123. package/alarms/widget-config.html +0 -116
  124. package/alarms/widget.config.js +0 -1
  125. package/alarms/widget.controller.js +0 -1
  126. package/alarms/widget.html +0 -15
  127. package/alarms/widget.module.js +0 -1
  128. package/alarms/widget.module.mock.js +0 -1
  129. package/cockpit-alarmRecent/cumulocity.json +0 -18
  130. package/cockpit-alarmRecent/img/recent-alarms-widget-pr.png +0 -0
  131. package/cockpit-alarmRecent/index.js +0 -1
  132. package/cockpit-alarmRecent/views/component.html +0 -7
  133. package/devicemanagement-aclManagement/controllers/aclManagementCtrl.js +0 -1
  134. package/devicemanagement-aclManagement/cumulocity.json +0 -21
  135. package/devicemanagement-aclManagement/index.js +0 -1
  136. package/devicemanagement-aclManagement/views/index.html +0 -207
  137. package/devicemanagement-alarmList/controllers/alarmList.js +0 -1
  138. package/devicemanagement-alarmList/cumulocity.json +0 -24
  139. package/devicemanagement-alarmList/gallery/alarms.png +0 -0
  140. package/devicemanagement-alarmList/index.js +0 -1
  141. package/devicemanagement-alarmList/views/index.html +0 -155
  142. package/devicemanagement-tracking/controllers/config.js +0 -1
  143. package/devicemanagement-tracking/controllers/tracking.js +0 -1
  144. package/devicemanagement-tracking/cumulocity.json +0 -19
  145. package/devicemanagement-tracking/index.js +0 -1
  146. package/devicemanagement-tracking/views/index.html +0 -103
  147. package/devicemanagement-vendMeDeviceControl/controllers/vendMeDeviceControl.js +0 -1
  148. package/devicemanagement-vendMeDeviceControl/cumulocity.json +0 -18
  149. package/devicemanagement-vendMeDeviceControl/index.js +0 -1
  150. package/devicemanagement-vendMeDeviceControl/views/index.html +0 -229
@@ -1 +1 @@
1
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var c,a={},t=Object.prototype,l=t.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o,i,a,u,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),r=new O(r||[]);return s(e,"_invoke",{value:(o=t,i=n,a=r,u=h,function(t,e){if(u===y)throw new Error("Generator is already running");if(u===m){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=n.method,o=e.iterator[r];if(o===c)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=c,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;r=f(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=c),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}(n,a);if(n){if(n===d)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===h)throw u=m,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=y;n=f(o,i,a);if("normal"===n.type){if(u=a.done?m:p,n.arg===d)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(u=m,a.method="throw",a.arg=n.arg)}})}),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var h="suspendedStart",p="suspendedYield",y="executing",m="completed",d={};function g(){}function v(){}function w(){}var e={},b=(i(e,r,function(){return this}),Object.getPrototypeOf),b=b&&b(b(T([]))),E=(b&&b!==t&&l.call(b,r)&&(e=b),w.prototype=g.prototype=Object.create(e));function _(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(a,u){var e;s(this,"_invoke",{value:function(n,r){function t(){return new u(function(t,e){!function e(t,n,r,o){var i,t=f(a[t],a,n);if("throw"!==t.type)return(n=(i=t.arg).value)&&"object"==_typeof(n)&&l.call(n,"__await")?u.resolve(n.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):u.resolve(n).then(function(t){i.value=t,r(i)},function(t){return e("throw",t,r,o)});o(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function T(e){if(e||""===e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t}).next=t}throw new TypeError(_typeof(e)+" is not iterable")}return s(E,"constructor",{value:v.prototype=w,configurable:!0}),s(w,"constructor",{value:v,configurable:!0}),v.displayName=i(w,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,i(t,o,"GeneratorFunction")),t.prototype=Object.create(E),t},a.awrap=function(t){return{__await:t}},_(x.prototype),i(x.prototype,n,function(){return this}),a.AsyncIterator=x,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new x(u(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},_(E),i(E,o,"Generator"),i(E,r,function(){return this}),i(E,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),u=l.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(n=o.completion).type&&(r=n.arg,S(o)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),d}},a}function asyncGeneratorStep(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function _asyncToGenerator(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function o(t){asyncGeneratorStep(r,e,n,o,i,"next",t)}function i(t){asyncGeneratorStep(r,e,n,o,i,"throw",t)}o(void 0)})}}!function(){function t(r,e,t,o,n,i,a,u,c,l,s){var f,h,p=this,y=t.PROFIBUS_DEVICE_FRAGMENT,m=t.CANOPEN_DEVICE_FRAGMENT,t=i.isElementChangePending,d=i.canUpdateElement,g=i.getCurrentElementValue,v=l("Value out of range. Allowed values from {{min | number}} to {{max | number}}."),w=[];function b(){return(b=_asyncToGenerator(_regeneratorRuntime().mark(function t(e){var n;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e)return t.next=3,c.getWidgetModel(e);t.next=6;break;case 3:n=t.sent,_.assign(p,n),r.$apply();case 6:case"end":return t.stop()}},t)}))).apply(this,arguments)}function E(t){e(x,t)}function x(){_.forEach(p.categories,function(t){_.forEach(t.elements,function(t){var e;e=t,p.isElementChangePending(e)||_.includes(w,e)||(t.meta.type===n.ElementType.DISCRETE_IO&&(t.valueObj=_.find(t.meta.enumValues,{value:g(p.device,t)})),t.meta.type===n.ElementType.REGISTER&&(t.meta.enumType?t.valueObj=_.find(t.meta.enumValues,{value:g(p.device,t)}):_.set(t,"valueObj.value",g(p.device,t))))})})}_.assign(p,{$onChanges:function(t){t.config&&!function(){b.apply(this,arguments)}(p.config)},$doCheck:function(){var t=!1;_.isEqual(f,p.categories)||(f=_.cloneDeep(p.categories),t=!0);_.isEqual(h,p.device)||(h=_.cloneDeep(p.device),t=!0);t&&E()},isElementChangePending:t,canUpdateElement:d,updateElement:function(t,e,n){var r=i.updateElement;_.has(t,y)?r=a.updateElement:_.has(t,m)&&(r=u.updateElement);return r(t,e,n).then(function(){w=_.without(w,e),E(500)})},shouldShowSwitch:function(t){return t.meta.enumType&&t.meta.enumValues&&2===t.meta.enumValues.length},shouldShowEnumSelect:function(t){return t.meta.enumType&&t.meta.enumValues&&(1===t.meta.enumValues.length||2<t.meta.enumValues.length)},shouldShowNumberInput:function(t){return!t.meta.enumType},validationHints:function(t,e){var n=[];e.meta.valuesRange.possiblePrecisionLoss&&n.push(s.getString("Precision loss may occur, check Cloud Fieldbus specification for details."));p.canUpdateElement(p.device,e)&&(e=_.get(e,"meta.valuesRange.custom"),n.push(o.validationHints(t,{required:l("This field is required."),"value-in-register-range":s.getString(v,e)})));return n.join(" ")},focus:function(t){w.push(t)},blur:_.debounce(function(t){w=_.without(w,t),E(500)},500)})}t.$inject=["$rootScope","$timeout","fieldbusConstants","c8yBase","c8yDeviceDatabase","c8yModbusDevice","c8yProfibusDevice","c8yCanopenDevice","modbusWidgetSvc","gettext","gettextCatalog"],angular.module("c8y.modbusWidget4").component("c8yModbusWidget",{templateUrl:":::PLUGIN_PATH:::/widget.html",bindings:{config:"<"},controllerAs:"vm",controller:t})}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var c,a={},t=Object.prototype,l=t.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o,i,a,u,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),r=new O(r||[]);return s(e,"_invoke",{value:(o=t,i=n,a=r,u=h,function(t,e){if(u===y)throw Error("Generator is already running");if(u===m){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){n=function t(e,n){var r=n.method,o=e.iterator[r];if(o===c)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=c,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;r=f(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=c),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}(n,a);if(n){if(n===d)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(u===h)throw u=m,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);u=y;n=f(o,i,a);if("normal"===n.type){if(u=a.done?m:p,n.arg===d)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(u=m,a.method="throw",a.arg=n.arg)}})}),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var h="suspendedStart",p="suspendedYield",y="executing",m="completed",d={};function g(){}function v(){}function w(){}var e={},b=(i(e,r,function(){return this}),Object.getPrototypeOf),b=b&&b(b(T([]))),E=(b&&b!==t&&l.call(b,r)&&(e=b),w.prototype=g.prototype=Object.create(e));function _(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(a,u){var e;s(this,"_invoke",{value:function(n,r){function t(){return new u(function(t,e){!function e(t,n,r,o){var i,t=f(a[t],a,n);if("throw"!==t.type)return(n=(i=t.arg).value)&&"object"==_typeof(n)&&l.call(n,"__await")?u.resolve(n.__await).then(function(t){e("next",t,r,o)},function(t){e("throw",t,r,o)}):u.resolve(n).then(function(t){i.value=t,r(i)},function(t){return e("throw",t,r,o)});o(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function T(e){if(e||""===e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=c,t.done=!0,t}).next=t}throw new TypeError(_typeof(e)+" is not iterable")}return s(E,"constructor",{value:v.prototype=w,configurable:!0}),s(w,"constructor",{value:v,configurable:!0}),v.displayName=i(w,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,i(t,o,"GeneratorFunction")),t.prototype=Object.create(E),t},a.awrap=function(t){return{__await:t}},_(x.prototype),i(x.prototype,n,function(){return this}),a.AsyncIterator=x,a.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var i=new x(u(t,e,n,r),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},_(E),i(E,o,"Generator"),i(E,r,function(){return this}),i(E,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=T,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=c)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return i.type="throw",i.arg=n,r.next=t,e&&(r.method="next",r.arg=c),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),u=l.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(n=o.completion).type&&(r=n.arg,S(o)),r}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=c),d}},a}function asyncGeneratorStep(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function _asyncToGenerator(u){return function(){var t=this,a=arguments;return new Promise(function(e,n){var r=u.apply(t,a);function o(t){asyncGeneratorStep(r,e,n,o,i,"next",t)}function i(t){asyncGeneratorStep(r,e,n,o,i,"throw",t)}o(void 0)})}}!function(){function t(r,e,t,o,n,i,a,u,c,l,s){var f,h,p=this,y=t.PROFIBUS_DEVICE_FRAGMENT,m=t.CANOPEN_DEVICE_FRAGMENT,t=i.isElementChangePending,d=i.canUpdateElement,g=i.getCurrentElementValue,v=l("Value out of range. Allowed values from {{min | number}} to {{max | number}}."),w=[];function b(){return(b=_asyncToGenerator(_regeneratorRuntime().mark(function t(e){var n;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e)return t.next=3,c.getWidgetModel(e);t.next=6;break;case 3:n=t.sent,_.assign(p,n),r.$apply();case 6:case"end":return t.stop()}},t)}))).apply(this,arguments)}function E(t){e(x,t)}function x(){_.forEach(p.categories,function(t){_.forEach(t.elements,function(t){var e;e=t,p.isElementChangePending(e)||_.includes(w,e)||(t.meta.type===n.ElementType.DISCRETE_IO&&(t.valueObj=_.find(t.meta.enumValues,{value:g(p.device,t)})),t.meta.type===n.ElementType.REGISTER&&(t.meta.enumType?t.valueObj=_.find(t.meta.enumValues,{value:g(p.device,t)}):_.set(t,"valueObj.value",g(p.device,t))))})})}_.assign(p,{$onChanges:function(t){t.config&&!function(){b.apply(this,arguments)}(p.config)},$doCheck:function(){var t=!1;_.isEqual(f,p.categories)||(f=_.cloneDeep(p.categories),t=!0);_.isEqual(h,p.device)||(h=_.cloneDeep(p.device),t=!0);t&&E()},isElementChangePending:t,canUpdateElement:d,updateElement:function(t,e,n){var r=i.updateElement;_.has(t,y)?r=a.updateElement:_.has(t,m)&&(r=u.updateElement);return r(t,e,n).then(function(){w=_.without(w,e),E(500)})},shouldShowSwitch:function(t){return t.meta.enumType&&t.meta.enumValues&&2===t.meta.enumValues.length},shouldShowEnumSelect:function(t){return t.meta.enumType&&t.meta.enumValues&&(1===t.meta.enumValues.length||2<t.meta.enumValues.length)},shouldShowNumberInput:function(t){return!t.meta.enumType},validationHints:function(t,e){var n=[];e.meta.valuesRange.possiblePrecisionLoss&&n.push(s.getString("Precision loss may occur, check Cloud Fieldbus specification for details."));p.canUpdateElement(p.device,e)&&(e=_.get(e,"meta.valuesRange.custom"),n.push(o.validationHints(t,{required:l("This field is required."),"value-in-register-range":s.getString(v,e)})));return n.join(" ")},focus:function(t){w.push(t)},blur:_.debounce(function(t){w=_.without(w,t),E(500)},500)})}t.$inject=["$rootScope","$timeout","fieldbusConstants","c8yBase","c8yDeviceDatabase","c8yModbusDevice","c8yProfibusDevice","c8yCanopenDevice","modbusWidgetSvc","gettext","gettextCatalog"],angular.module("c8y.modbusWidget4").component("c8yModbusWidget",{templateUrl:":::PLUGIN_PATH:::/widget.html",bindings:{config:"<"},controllerAs:"vm",controller:t})}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1019.24.6",
3
+ "version": "1020.0.8",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -34,10 +34,10 @@
34
34
  "ini": "4.1.1",
35
35
  "jquery": "3.6.3",
36
36
  "jquery-ui": "1.13.2",
37
- "leaflet": "1.7.1",
38
- "libphonenumber-js": "1.10.54",
37
+ "leaflet": "1.9.4",
38
+ "libphonenumber-js": "1.10.55",
39
39
  "lodash": "4.17.21",
40
- "moment": "2.29.4",
40
+ "moment": "2.30.1",
41
41
  "ng-csv": "0.3.6",
42
42
  "noVNC": "https://github.com/novnc/noVNC/archive/v0.6.2.tar.gz",
43
43
  "nvd3": "1.1.15",
@@ -48,7 +48,7 @@
48
48
  "xterm": "5.3.0",
49
49
  "xterm-addon-fit": "0.8.0",
50
50
  "zip-js": "0.0.3",
51
- "dompurify": "2.2.9"
51
+ "dompurify": "3.0.9"
52
52
  },
53
53
  "devDependencies": {
54
54
  "jest-junit": "16.0.0",
@@ -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(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(n,r,e,i,a,c,t,s,o,l,u,p){var d="service/remoteaccess",f="127.0.0.1",y=":::PLUGIN_PATH:::/clients/terminal/index.html",m="top=30,left=30,height=933,width=1350,location=no,menubar=no,toolbar=no,status=no,resizable=no",b=i.url("".concat(d,"/keypair/generate")),S={http:"ws:",https:"wss:"}[e.protocol()]||"ws:",e="wss:"===S,v="XSRF-TOKEN",P={category:"remoteaccess",key:"pass-through.enabled"},g=i.createEnum([{name:"NONE",value:"NONE",label:l("No password")},{name:"USER_PASS",value:"USER_PASS",label:l("Username and password")},{name:"PASS_ONLY",value:"PASS_ONLY",label:l("Password only")},{name:"KEY_PAIR",value:"KEY_PAIR",label:l("Public/private keys")},{name:"CERTIFICATE",value:"CERTIFICATE",label:l("Certificate")}]),h=[{name:"VNC",value:"VNC",label:l("VNC"),supportedCredentialsTypes:[g.NONE,g.PASS_ONLY],defaults:{host:f,port:5900},clientWindowPath:":::PLUGIN_PATH:::/clients/vnc/vncClient.html",clientWindowParams:"top=0,left=0,location=no,menubar=no,toolbar=no,status=no,resizable=yes",extraConnectionParams:{encrypt:e,true_color:!0,local_cursor:!1,viewport:!0,shared:!0,view_only:!1,disconnectTimeout:10,repeaterID:"",port:443,password:""}},{name:"TELNET",value:"TELNET",label:l("Telnet"),supportedCredentialsTypes:[g.NONE],defaults:{host:f,port:23},clientWindowPath:y,clientWindowParams:m},{name:"SSH",value:"SSH",label:l("SSH"),supportedCredentialsTypes:[g.USER_PASS,g.KEY_PAIR,g.CERTIFICATE],defaults:{host:f,port:22},clientWindowPath:y,clientWindowParams:m},{name:"PASSTHROUGH",value:"PASSTHROUGH",label:l("PASSTHROUGH"),supportedCredentialsTypes:[],defaults:{host:f,port:22},isConnectDissalowed:!0,tooltipConnectDissalowed:l("PASSTHROUGH protocol configuration should be used with native client only."),showIf:function(){return p.getSystemOptionValue(P)}}];return{DEFAULT_HOST:f,getProtocols:function(){return n.all(_.map(h,function(e){return s.configureVisibility(e,"visible")})).then(function(e){return _.filter(e,"visible")})},CREDENTIALS_TYPES:g,save:function(t,n){try{return function(e,t){var n=_.includes([g.USER_PASS.value,g.PASS_ONLY.value],t.credentialsType),o=_.includes([g.KEY_PAIR.value],t.credentialsType),n=(_.defaults(t,{password:n?_.get(t,"credentials.password"):void 0,privateKey:o?_.get(t,"credentials.privateKey"):void 0}),_.unset(t,"credentials"),_.unset(t,"attrs"),E(e,t));return r.put(n,t).then(i.getResData)}(t,n)}catch(e){return function(e,t){e=w(e);return r.post(e,t).then(i.getResData)}(t,n)}},list:function(e){e=w(e);return r.get(e).then(i.getResData)},detail:function(e,t){e=E(e,t);return r.get(e).then(i.getResData)},remove:function(e,t){e=E(e,t);return r.delete(e)},getConnectionParams:function(e,t){return n.all({title:u.getString("Connected to: {{name}}",t),protocol:_.find(h,{value:t.protocol}),host:n.resolve(window.location.host),path:function(n,o){return c.current().then(function(e){var e={deviceId:i.getId(n),configurationId:o.id,token:a.encodeToken(e.userName,a.getPassword(),e.tenant)},e="service/remoteaccess/client/".concat(e.deviceId,"/configurations/").concat(e.configurationId,"?token=").concat(e.token),t=s.getCookieValue(v);return t&&(t=encodeURIComponent(t),e="".concat(e,"&").concat(v,"=").concat(t)),e})}(e,t),wsProtocol:S}).then(function(e){return _objectSpread(_objectSpread({},e),e.protocol.extraConnectionParams)})},isMicroServiceAvailable:function(t){return o.isAvailable({name:"cloud-remote-access",type:"MICROSERVICE"}).then(function(e){e=e?r.head(w(t),{silentError:!0}).then(_.constant(!0),_.constant(!1)):n.resolve(e);return e})},parseSshKeyFile:function(o){return n(function(t,e){var n=new FileReader;n.onload=function(e){e=e.target;return t(e.result)},n.onerror=function(){return e({feedback:{type:"error",summary:l("Could not read file.")}})},n.readAsText(o)})},generateKeys:function(e){return r.post(b,{hostname:e}).then(i.getResData)},exportSshKey:function(e){e=new Blob([e],{type:"text/plain"});window.saveAs(e,"key.pub")}};function w(e){e=[d,"devices",i.getId(e),"configurations"].join("/");return i.url(e)}function E(e,t){return[w(e),i.getId(t)].join("/")}}e.$inject=["$q","$http","$location","c8yBase","c8yAuth","c8yUser","c8yTenant","c8yUiUtil","c8yApplication","gettext","gettextCatalog","c8ySettings"],angular.module("c8y.remoteAccess").factory("c8yRemoteAccess",e)}();
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 n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(n,r,e,a,i,c,t,s,o,l,u,p){var d="service/remoteaccess",f="127.0.0.1",y=":::PLUGIN_PATH:::/clients/terminal/index.html",m="top=30,left=30,height=933,width=1350,location=no,menubar=no,toolbar=no,status=no,resizable=no",b=a.url("".concat(d,"/keypair/generate")),S={http:"ws:",https:"wss:"}[e.protocol()]||"ws:",e="wss:"===S,v="XSRF-TOKEN",P={category:"remoteaccess",key:"pass-through.enabled"},g=a.createEnum([{name:"NONE",value:"NONE",label:l("No password")},{name:"USER_PASS",value:"USER_PASS",label:l("Username and password")},{name:"PASS_ONLY",value:"PASS_ONLY",label:l("Password only")},{name:"KEY_PAIR",value:"KEY_PAIR",label:l("Public/private keys")},{name:"CERTIFICATE",value:"CERTIFICATE",label:l("Certificate")}]),h=[{name:"VNC",value:"VNC",label:l("VNC"),supportedCredentialsTypes:[g.NONE,g.PASS_ONLY],defaults:{host:f,port:5900},clientWindowPath:":::PLUGIN_PATH:::/clients/vnc/vncClient.html",clientWindowParams:"top=0,left=0,location=no,menubar=no,toolbar=no,status=no,resizable=yes",extraConnectionParams:{encrypt:e,true_color:!0,local_cursor:!1,viewport:!0,shared:!0,view_only:!1,disconnectTimeout:10,repeaterID:"",port:443,password:""}},{name:"TELNET",value:"TELNET",label:l("Telnet"),supportedCredentialsTypes:[g.NONE],defaults:{host:f,port:23},clientWindowPath:y,clientWindowParams:m},{name:"SSH",value:"SSH",label:l("SSH"),supportedCredentialsTypes:[g.USER_PASS,g.KEY_PAIR,g.CERTIFICATE],defaults:{host:f,port:22},clientWindowPath:y,clientWindowParams:m},{name:"PASSTHROUGH",value:"PASSTHROUGH",label:l("PASSTHROUGH"),supportedCredentialsTypes:[],defaults:{host:f,port:22},isConnectDissalowed:!0,tooltipConnectDissalowed:l("PASSTHROUGH protocol configuration should be used with native client only."),showIf:function(){return p.getSystemOptionValue(P)}}];return{DEFAULT_HOST:f,getProtocols:function(){return n.all(_.map(h,function(e){return s.configureVisibility(e,"visible")})).then(function(e){return _.filter(e,"visible")})},CREDENTIALS_TYPES:g,save:function(t,n){try{return function(e,t){var n=_.includes([g.USER_PASS.value,g.PASS_ONLY.value],t.credentialsType),o=_.includes([g.KEY_PAIR.value],t.credentialsType),n=(_.defaults(t,{password:n?_.get(t,"credentials.password"):void 0,privateKey:o?_.get(t,"credentials.privateKey"):void 0}),_.unset(t,"credentials"),_.unset(t,"attrs"),E(e,t));return r.put(n,t).then(a.getResData)}(t,n)}catch(e){return function(e,t){e=w(e);return r.post(e,t).then(a.getResData)}(t,n)}},list:function(e){e=w(e);return r.get(e).then(a.getResData)},detail:function(e,t){e=E(e,t);return r.get(e).then(a.getResData)},remove:function(e,t){e=E(e,t);return r.delete(e)},getConnectionParams:function(e,t){return n.all({title:u.getString("Connected to: {{name}}",t),protocol:_.find(h,{value:t.protocol}),host:n.resolve(window.location.host),path:function(n,o){return c.current().then(function(e){var e={deviceId:a.getId(n),configurationId:o.id,token:i.encodeToken(e.userName,i.getPassword(),e.tenant)},e="service/remoteaccess/client/".concat(e.deviceId,"/configurations/").concat(e.configurationId,"?token=").concat(e.token),t=s.getCookieValue(v);return t&&(t=encodeURIComponent(t),e="".concat(e,"&").concat(v,"=").concat(t)),e})}(e,t),wsProtocol:S}).then(function(e){return _objectSpread(_objectSpread({},e),e.protocol.extraConnectionParams)})},isMicroServiceAvailable:function(t){return o.isAvailable({name:"cloud-remote-access",type:"MICROSERVICE"}).then(function(e){e=e?r.head(w(t),{silentError:!0}).then(_.constant(!0),_.constant(!1)):n.resolve(e);return e})},parseSshKeyFile:function(o){return n(function(t,e){var n=new FileReader;n.onload=function(e){e=e.target;return t(e.result)},n.onerror=function(){return e({feedback:{type:"error",summary:l("Could not read file.")}})},n.readAsText(o)})},generateKeys:function(e){return r.post(b,{hostname:e}).then(a.getResData)},exportSshKey:function(e){e=new Blob([e],{type:"text/plain"});window.saveAs(e,"key.pub")}};function w(e){e=[d,"devices",a.getId(e),"configurations"].join("/");return a.url(e)}function E(e,t){return[w(e),a.getId(t)].join("/")}}e.$inject=["$q","$http","$location","c8yBase","c8yAuth","c8yUser","c8yTenant","c8yUiUtil","c8yApplication","gettext","gettextCatalog","c8ySettings"],angular.module("c8y.remoteAccess").factory("c8yRemoteAccess",e)}();
@@ -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(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)||!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(){function e(e,r,t,n){var o=this,i=[{name:"hostkeyAutosave",option:{category:"remoteaccess",key:"hostkey-autosave"},defaultValue:!1}];function c(e){return r.updateOption(_objectSpread(_objectSpread({},e.option),{},{value:_.get(o,e.name,e.defaultValue)}))}_.assign(o,{$onInit:function(){e.all(_.map(i,function(e){return t=e,r.detailValue(t.option,t.defaultValue).then(function(e){return _.set(o,t.name,e)});var t}))},updateSetting:c,updateSettings:function(){return e.all(_.map(i,c)).then(function(){return t.success(n("Settings saved."))}).catch(function(){return t.danger(n("Settings could not be saved."))})}})}e.$inject=["$q","c8ySettings","c8yAlert","gettext"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessSettings",{templateUrl:":::PLUGIN_PATH:::/remoteAccessSettings/remoteAccessSettings.html",controller:e,controllerAs:"vm"})}();
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:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!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(){function e(e,r,t,n){var o=this,i=[{name:"hostkeyAutosave",option:{category:"remoteaccess",key:"hostkey-autosave"},defaultValue:!1}];function c(e){return r.updateOption(_objectSpread(_objectSpread({},e.option),{},{value:_.get(o,e.name,e.defaultValue)}))}_.assign(o,{$onInit:function(){e.all(_.map(i,function(e){return t=e,r.detailValue(t.option,t.defaultValue).then(function(e){return _.set(o,t.name,e)});var t}))},updateSetting:c,updateSettings:function(){return e.all(_.map(i,c)).then(function(){return t.success(n("Settings saved."))}).catch(function(){return t.danger(n("Settings could not be saved."))})}})}e.$inject=["$q","c8ySettings","c8yAlert","gettext"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessSettings",{templateUrl:":::PLUGIN_PATH:::/remoteAccessSettings/remoteAccessSettings.html",controller:e,controllerAs:"vm"})}();
@@ -14,33 +14,46 @@
14
14
  ></c8y-breadcrumbs-item>
15
15
  </c8y-breadcrumbs-set>
16
16
 
17
- <form name="vm.inventoryRoleDetailForm" class="card content-fullpage d-grid grid__col--4-8--md">
17
+ <form
18
+ class="card content-fullpage d-grid grid__col--4-8--md"
19
+ name="vm.inventoryRoleDetailForm"
20
+ >
18
21
  <div class="inner-scroll">
19
22
  <div class="card-header separator sticky-top">
20
23
  <div class="card-title">{{ 'Inventory role' | translate }}</div>
21
24
  </div>
22
25
  <div class="card-block flex-no-shrink">
23
26
  <div class="form-group">
24
- <label for="roleName" translate>Name</label>
27
+ <label
28
+ for="roleName"
29
+ translate
30
+ >
31
+ Name
32
+ </label>
25
33
  <input
26
- name="name"
34
+ class="form-control"
27
35
  id="roleName"
28
36
  placeholder="{{ 'e.g. My inventory role' | translate }}"
37
+ name="name"
29
38
  required
30
- class="form-control"
31
39
  ng-maxlength="50"
32
40
  ng-model="vm.role.name"
33
41
  />
34
42
  <c8y-error-feedback field="vm.inventoryRoleDetailForm.name"></c8y-error-feedback>
35
43
  </div>
36
44
  <div class="form-group">
37
- <label translate for="roleDescription">Description</label>
45
+ <label
46
+ for="roleDescription"
47
+ translate
48
+ >
49
+ Description
50
+ </label>
38
51
  <textarea
39
- aria-multiline="true"
40
- id="roleDescription"
52
+ class="form-control"
41
53
  title="{{ 'Description' | translate }}"
54
+ id="roleDescription"
55
+ aria-multiline="true"
42
56
  name="description"
43
- class="form-control"
44
57
  rows="12"
45
58
  ng-maxlength="1000"
46
59
  ng-model="vm.role.description"
@@ -56,14 +69,17 @@
56
69
  </div>
57
70
  <button
58
71
  class="btn-help"
59
- type="button"
60
72
  aria-label="{{ 'Help' | translate }}"
73
+ type="button"
61
74
  uib-popover-template="'helpContent.html'"
62
75
  popover-trigger="'focus'"
63
76
  popover-placement="right"
64
77
  popover-append-to-body="true"
65
78
  ></button>
66
- <script type="text/ng-template" id="helpContent.html">
79
+ <script
80
+ id="helpContent.html"
81
+ type="text/ng-template"
82
+ >
67
83
  <div>
68
84
  <p translate>
69
85
  An <strong>inventory role</strong> contains permissions that can be attached to groups of
@@ -82,13 +98,16 @@
82
98
  </script>
83
99
  </div>
84
100
  <div class="card-block">
85
- <fieldset class="c8y-fieldset m-b-32" ng-repeat="scope in vm.permissionScopes">
101
+ <fieldset
102
+ class="c8y-fieldset m-b-32"
103
+ ng-repeat="scope in vm.permissionScopes"
104
+ >
86
105
  <legend class="text-14">
87
106
  {{ scope.label | translate }}
88
107
  <button
89
108
  class="btn-help btn-help--sm"
90
- type="button"
91
109
  aria-label="{{ 'Help' | translate }}"
110
+ type="button"
92
111
  uib-popover="{{::vm.STRINGS.PERMISSIONS_SCOPES[scope.value] | translate}}"
93
112
  popover-placement="right"
94
113
  popover-trigger="'focus'"
@@ -106,8 +125,8 @@
106
125
  <div class="card-footer separator sticky-bottom grid__col--fullspan">
107
126
  <button
108
127
  class="btn btn-default"
109
- type="button"
110
128
  title="{{ 'Cancel' | translate }}"
129
+ type="button"
111
130
  ng-click="vm.cancel()"
112
131
  ng-disabled="vm.saving"
113
132
  >
@@ -115,8 +134,8 @@
115
134
  </button>
116
135
  <button
117
136
  class="btn btn-primary"
118
- type="button"
119
137
  title="{{ 'Save' | translate }}"
138
+ type="button"
120
139
  ng-click="vm.save()"
121
140
  ng-disabled="vm.saving || vm.inventoryRoleDetailForm.$invalid || (vm.role.id && vm.inventoryRoleDetailForm.$pristine)"
122
141
  >
@@ -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(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(l,p,f,d,s,y){return{require:"ngModel",restrict:"EA",link:function(i,e,t,n){var r={},o=s.SHARED_CONTEXTS.COMPUTED_PROPERTY_LAST_MEASUREMENT.value;function c(e){return _.find(i.devices,{id:e})}function a(){n.$setViewValue(_.cloneDeep(i.mappings))}function u(e){var t=i.deviceIds,n=i.devices,r=t[e.placeholder];r&&_.find(n,{id:r})||(t[e.placeholder]=(_.head(n)||{}).id)}n.$parsers.push(function(e){var t={};return _.each(e,function(e){t[e.placeholder]=e.config}),t}),n.$validators["c8y-scada-mapping"]=function(e){var n=!1;return _.forEach(e,function(e,t){e=!_.isNull(e);r[t]=!e,n=n||!e}),!n},n.$overrideModelOptions({allowInvalid:!0}),n.$formatters.push(function(e){return _.map(e,function(e,t){return{placeholder:t,config:e}})}),n.$render=function(){i.mappings=n.$viewValue},_.assign(i,{hasError:r,clearMapping:function(e){e.config=null,a()},setMapping:function(t){s.set(o,c(i.deviceIds[t.placeholder])),l.openSelector({selectSingle:!0,managedObject:c(i.deviceIds[t.placeholder])}).then(function(e){t.config=e}).then(a).finally(function(){s.clear(o)})},editComputedProperty:function(t){s.set(o,c(i.deviceIds[t.placeholder])),p.edit(t.config).then(function(e){t.config.config=e}).then(a).finally(function(){s.clear(o)})},setFieldbusMapping:function(t){d.openFieldbusSelector({device:c(i.deviceIds[t.placeholder])}).then(function(e){t.config=e}).then(a)},propertyValueFor:function(e){var t=c(i.deviceIds[e.placeholder]);return f.getValueForMapping(t,e.config)},humanizeValue:function(e){return e=e.config&&_objectSpread(_objectSpread({},e.config),{},{label:y.getString(e.config.label)}),f.humanizeMapping(e)}}),i.$watch("devices",function(e){e&&_.forEach(i.mappings,u)},!0)},templateUrl:":::PLUGIN_PATH:::/views/mapping.html",scope:{device:"=",devices:"=",deviceIds:"=",onDeviceIdsChange:"&"}}}e.$inject=["SchemaPropertiesSvc","c8yComputedProperties","ScadaWidgetUtilSvc","c8yDeviceDatabase","contextDetailsSharedService","gettextCatalog"],angular.module("c8y.parts.scadaWidget").directive("c8yScadaMapping",e)}();
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 n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(l,p,f,d,s,y){return{require:"ngModel",restrict:"EA",link:function(i,e,t,n){var r={},o=s.SHARED_CONTEXTS.COMPUTED_PROPERTY_LAST_MEASUREMENT.value;function c(e){return _.find(i.devices,{id:e})}function a(){n.$setViewValue(_.cloneDeep(i.mappings))}function u(e){var t=i.deviceIds,n=i.devices,r=t[e.placeholder];r&&_.find(n,{id:r})||(t[e.placeholder]=(_.head(n)||{}).id)}n.$parsers.push(function(e){var t={};return _.each(e,function(e){t[e.placeholder]=e.config}),t}),n.$validators["c8y-scada-mapping"]=function(e){var n=!1;return _.forEach(e,function(e,t){e=!_.isNull(e);r[t]=!e,n=n||!e}),!n},n.$overrideModelOptions({allowInvalid:!0}),n.$formatters.push(function(e){return _.map(e,function(e,t){return{placeholder:t,config:e}})}),n.$render=function(){i.mappings=n.$viewValue},_.assign(i,{hasError:r,clearMapping:function(e){e.config=null,a()},setMapping:function(t){s.set(o,c(i.deviceIds[t.placeholder])),l.openSelector({selectSingle:!0,managedObject:c(i.deviceIds[t.placeholder])}).then(function(e){t.config=e}).then(a).finally(function(){s.clear(o)})},editComputedProperty:function(t){s.set(o,c(i.deviceIds[t.placeholder])),p.edit(t.config).then(function(e){t.config.config=e}).then(a).finally(function(){s.clear(o)})},setFieldbusMapping:function(t){d.openFieldbusSelector({device:c(i.deviceIds[t.placeholder])}).then(function(e){t.config=e}).then(a)},propertyValueFor:function(e){var t=c(i.deviceIds[e.placeholder]);return f.getValueForMapping(t,e.config)},humanizeValue:function(e){return e=e.config&&_objectSpread(_objectSpread({},e.config),{},{label:y.getString(e.config.label)}),f.humanizeMapping(e)}}),i.$watch("devices",function(e){e&&_.forEach(i.mappings,u)},!0)},templateUrl:":::PLUGIN_PATH:::/views/mapping.html",scope:{device:"=",devices:"=",deviceIds:"=",onDeviceIdsChange:"&"}}}e.$inject=["SchemaPropertiesSvc","c8yComputedProperties","ScadaWidgetUtilSvc","c8yDeviceDatabase","contextDetailsSharedService","gettextCatalog"],angular.module("c8y.parts.scadaWidget").directive("c8yScadaMapping",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function t(a,t,e,i){I.$inject=["$q","$location","$uibModal","gettextCatalog","c8yTitle"],h.$inject=["$routeParams"];var l="c8y-simulator",r="installing-updates",c="installing-updates",s="clock-o",u="refresh",m="c8y-energy",d="simulators",o="".concat(d,"/:deviceId"),n={template:"<c8y-simulators-list></c8y-simulators-list>"},p={template:'<c8y-simulator-detail simulator-id="vm.id"></c8y-simulator-detail>',name:a("Instructions"),icon:r},y={template:'<c8y-simulator-operations simulator-id="vm.id"></c8y-simulator-operations>',name:a("Supported operations"),icon:m},f={name:a("Alarms"),priority:800,icon:"bell",templateUrl:"devicemanagement_alarmList/views/index.html"},g={controllerAs:"vm",controller:h},v={data:["$q",function(t){return t.when({templateUrl:":::PLUGIN_PATH:::/detail/title.html"})}]};function h(t){this.id=t.simulatorId}function S(){t.addNavigation({name:a("Simulators"),parent:a("Devices"),path:d,icon:l,priority:1e3,routerLinkExact:!1,showIf:["c8yApplication",function(t){return t.isAvailable({name:"device-simulator",type:"MICROSERVICE"})}]})}function b(){e.when("/".concat(d),n);var i=0;_.forEach([p,y,f],function(t){_.assign(t,g,{priority:i--}),e.when("/".concat(o),t)})}function w(){i.addTitle("/".concat(o),v)}function I(t,i,e,o,n){return{setListTitle:function(){n.changeTitle({title:a("Simulators")})},listing:function(){i.path("/".concat(d))},edit:function(t){i.path("/".concat(d,"/").concat(t.id))},cloneDialog:function(i){return e.open({size:"sm",component:"c8ySimulatorCloneDialog",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{simulator:function(){var t=_.cloneDeep(i);return t.name=o.getString("Duplicate of {{name}}",t),t}}}).result},addCustomOperationDialog:function(){return e.open({size:"sm",component:"c8yOperationAddDialog",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body"}).result},editSimulatorInstances:function(t){return e.open({templateUrl:":::PLUGIN_PATH:::/add/simulatorAddorEdit.modal.html",controller:["newSimulator","$uibModalInstance",function(t,i){var e=this;e.editInstances=!0,e.newSimulator=t,e.ok=function(){i.close(e.newSimulator.instances)},e.cancel=i.dismiss}],resolve:{newSimulator:_.constant(_.clone(t))},controllerAs:"vm"}).result},icons:{simulator:l,instruction:r,message:c,builtin:c,sleep:s,loop:u,operations:m}}}return{$get:I,configBlock:function(){b(),S(),w()},hookTitle:w,hookViews:b,hookNavigation:S}}t.$inject=["gettext","c8yNavigatorProvider","c8yViewsProvider","c8yTitleProvider"],angular.module("c8y.simulators").provider("c8ySimulatorsUi",t)}();
1
+ "use strict";!function(){function t(a,t,o,i){b.$inject=["$q","$location","$uibModal","gettextCatalog","c8yTitle"],v.$inject=["$routeParams"];var l="c8y-simulator",r="installing-updates",c="installing-updates",s="clock-o",u="refresh",m="c8y-energy",d="simulators",e="".concat(d,"/:deviceId"),n={template:"<c8y-simulators-list></c8y-simulators-list>"},p={template:'<c8y-simulator-detail simulator-id="vm.id"></c8y-simulator-detail>',name:a("Instructions"),icon:r},y={template:'<c8y-simulator-operations simulator-id="vm.id"></c8y-simulator-operations>',name:a("Supported operations"),icon:m},f={controllerAs:"vm",controller:v},g={data:["$q",function(t){return t.when({templateUrl:":::PLUGIN_PATH:::/detail/title.html"})}]};function v(t){this.id=t.simulatorId}function h(){t.addNavigation({name:a("Simulators"),parent:a("Devices"),path:d,icon:l,priority:1e3,routerLinkExact:!1,showIf:["c8yApplication",function(t){return t.isAvailable({name:"device-simulator",type:"MICROSERVICE"})}]})}function S(){o.when("/".concat(d),n);var i=0;_.forEach([p,y],function(t){_.assign(t,f,{priority:i--}),o.when("/".concat(e),t)})}function I(){i.addTitle("/".concat(e),g)}function b(t,i,o,e,n){return{setListTitle:function(){n.changeTitle({title:a("Simulators")})},listing:function(){i.path("/".concat(d))},edit:function(t){i.path("/".concat(d,"/").concat(t.id))},cloneDialog:function(i){return o.open({size:"sm",component:"c8ySimulatorCloneDialog",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{simulator:function(){var t=_.cloneDeep(i);return t.name=e.getString("Duplicate of {{name}}",t),t}}}).result},addCustomOperationDialog:function(){return o.open({size:"sm",component:"c8yOperationAddDialog",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body"}).result},editSimulatorInstances:function(t){return o.open({templateUrl:":::PLUGIN_PATH:::/add/simulatorAddorEdit.modal.html",controller:["newSimulator","$uibModalInstance",function(t,i){var o=this;o.editInstances=!0,o.newSimulator=t,o.ok=function(){i.close(o.newSimulator.instances)},o.cancel=i.dismiss}],resolve:{newSimulator:_.constant(_.clone(t))},controllerAs:"vm"}).result},icons:{simulator:l,instruction:r,message:c,builtin:c,sleep:s,loop:u,operations:m}}}return{$get:b,configBlock:function(){S(),h(),I()},hookTitle:I,hookViews:S,hookNavigation:h}}t.$inject=["gettext","c8yNavigatorProvider","c8yViewsProvider","c8yTitleProvider"],angular.module("c8y.simulators").provider("c8ySimulatorsUi",t)}();
@@ -28,6 +28,7 @@
28
28
  <label
29
29
  class="sr-only"
30
30
  for="tFilter"
31
+ translate
31
32
  >
32
33
  Filter templates
33
34
  </label>
@@ -1 +1 @@
1
- "use strict";function _typeof(r){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function _defineProperty(r,e,t){return(e=_toPropertyKey(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _toPropertyKey(r){r=_toPrimitive(r,"string");return"symbol"==_typeof(r)?r:String(r)}function _toPrimitive(r,e){if("object"!=_typeof(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0===t)return("string"===e?String:Number)(r);t=t.call(r,e||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_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(r,e){var t;if(r)return"string"==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t=Object.prototype.toString.call(r).slice(8,-1))&&r.constructor?r.constructor.name:t)||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,e):void 0}function _arrayLikeToArray(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function _iterableToArrayLimit(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(r){if(Array.isArray(r))return r}angular.module("c8y.smartRules").directive("smartRuleParamInputKpi",function(){return{require:"^smartRuleParamInput",scope:{rule:"=",param:"="},restrict:"E",templateUrl:":::PLUGIN_PATH:::/views/paramInputKpi.html",link:function(r,e,t,n){r.placeholder=n.placeholder},controller:["$scope","c8yKpi","c8yDataPointSvc",function(i,r,e){function t(){var r=i.param.property;r&&(i.kpiId=i.rule.config[r])}function n(r){var e=i.rule,t=i.param,e=e.config,n=_.find(i.kpis,{id:r}),o=t.mapSelectedKpiToProperties,o=(n&&o&&(n=n.c8y_Kpi,_.assign(e,_defineProperty(_defineProperty(_defineProperty(_defineProperty({},o.fragment,n.fragment),o.series,n.series),o.redRangeMin,_.get(n,"redRangeMin",90)),o.redRangeMax,_.get(n,"redRangeMax",100)))),t.property);o&&(e[o]=r)}_.assign(i,{getKpiLabel:function(r){r=r.c8y_Kpi;return"".concat(r.label," - ").concat(r.series)},openKpiSelector:function(){e.chooseKpiWithUI().then(function(r){r=_slicedToArray(r,1)[0];i.kpiId=r._kpiId,n(i.kpiId)})},onKpiSelectionChange:n}),r.list().then(function(r){i.kpis=r}).then(t)}]}});
1
+ "use strict";function _typeof(r){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function _defineProperty(r,e,t){return(e=_toPropertyKey(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _toPropertyKey(r){r=_toPrimitive(r,"string");return"symbol"==_typeof(r)?r:r+""}function _toPrimitive(r,e){if("object"!=_typeof(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0===t)return("string"===e?String:Number)(r);t=t.call(r,e||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_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(r,e){var t;if(r)return"string"==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t=Object.prototype.toString.call(r).slice(8,-1))&&r.constructor?r.constructor.name:t)||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,e):void 0}function _arrayLikeToArray(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function _iterableToArrayLimit(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,a,l=[],u=!0,c=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function _arrayWithHoles(r){if(Array.isArray(r))return r}angular.module("c8y.smartRules").directive("smartRuleParamInputKpi",function(){return{require:"^smartRuleParamInput",scope:{rule:"=",param:"="},restrict:"E",templateUrl:":::PLUGIN_PATH:::/views/paramInputKpi.html",link:function(r,e,t,n){r.placeholder=n.placeholder},controller:["$scope","c8yKpi","c8yDataPointSvc",function(i,r,e){function t(){var r=i.param.property;r&&(i.kpiId=i.rule.config[r])}function n(r){var e=i.rule,t=i.param,e=e.config,n=_.find(i.kpis,{id:r}),o=t.mapSelectedKpiToProperties,o=(n&&o&&(n=n.c8y_Kpi,_.assign(e,_defineProperty(_defineProperty(_defineProperty(_defineProperty({},o.fragment,n.fragment),o.series,n.series),o.redRangeMin,_.get(n,"redRangeMin",90)),o.redRangeMax,_.get(n,"redRangeMax",100)))),t.property);o&&(e[o]=r)}_.assign(i,{getKpiLabel:function(r){r=r.c8y_Kpi;return"".concat(r.label," - ").concat(r.series)},openKpiSelector:function(){e.chooseKpiWithUI().then(function(r){r=_slicedToArray(r,1)[0];i.kpiId=r._kpiId,n(i.kpiId)})},onKpiSelectionChange:n}),r.list().then(function(r){i.kpis=r}).then(t)}]}});
@@ -171,8 +171,10 @@
171
171
  uib-tooltip="{{ vm.tooltip(rule) | translate }}"
172
172
  tooltip-popup-delay="500"
173
173
  tooltip-append-to-body="true"
174
+ for="checkbox"
174
175
  >
175
176
  <input
177
+ id="checkbox"
176
178
  type="checkbox"
177
179
  ng-disabled="!vm.canModify(rule) || vm.ruleTemplates[rule.ruleTemplateName].noTarget"
178
180
  ng-checked="rule.enabled && vm.hasSource(rule)"
@@ -231,6 +233,29 @@
231
233
  </div>
232
234
  </div>
233
235
 
236
+ <div class="smart-rule-state">
237
+ <div
238
+ class="list-icon"
239
+ ng-if="rule.type !== 'c8y_SmartRule'"
240
+ >
241
+ <i
242
+ c8y-icon="user-account"
243
+ uib-tooltip="{{ 'Local smart rule' | translate }}"
244
+ tooltip-append-to-body="true"
245
+ ></i>
246
+ </div>
247
+ <div
248
+ class="list-icon"
249
+ ng-if="rule.type === 'c8y_SmartRule'"
250
+ >
251
+ <i
252
+ c8y-icon="people"
253
+ uib-tooltip="{{ 'Global smart rule' | translate }}"
254
+ tooltip-append-to-body="true"
255
+ ></i>
256
+ </div>
257
+ </div>
258
+
234
259
  <div
235
260
  class="smart-rule-children"
236
261
  ng-if="vm.children.length > 0"
@@ -1,26 +1,44 @@
1
1
  <div class="modal-header text-center separator">
2
- <p class="text-muted" data-cy="smartRuleEdit--card-header">{{ title | translate }}</p>
2
+ <p
3
+ class="text-muted"
4
+ data-cy="smartRuleEdit--card-header"
5
+ >
6
+ {{ title | translate }}
7
+ </p>
3
8
  <div class="smart-list-icon-label">
4
9
  <span class="dot"><i c8y-icon="{{ ruleTemplate.paramGroups.input.icon }}"></i></span>
5
10
  <i c8y-icon="arrow-right"></i>
6
11
  <span class="dot"><i c8y-icon="{{ ruleTemplate.paramGroups.output.icon }}"></i></span>
7
12
  </div>
8
- <h4 id="modal-title" ng-if="ruleTemplate.label.full">
13
+ <h4
14
+ id="modal-title"
15
+ ng-if="ruleTemplate.label.full"
16
+ >
9
17
  {{ ruleTemplate.label.full | translate }}
10
18
  </h4>
11
- <h4 id="modal-title" ng-if="!ruleTemplate.label.full">
19
+ <h4
20
+ id="modal-title"
21
+ ng-if="!ruleTemplate.label.full"
22
+ >
12
23
  {{ ruleTemplate.label.input | translate }} {{ ruleTemplate.label.output | translate }}
13
24
  </h4>
14
25
  <small translate>Fields marked * are required.</small>
15
26
  </div>
16
27
 
17
- <div class="modal-inner-scroll smart-rule-control" id="modal-body">
18
- <form name="smartRuleForm" class="edit-smart-rule-details" novalidate>
28
+ <div
29
+ class="modal-inner-scroll smart-rule-control"
30
+ id="modal-body"
31
+ >
32
+ <form
33
+ class="edit-smart-rule-details"
34
+ name="smartRuleForm"
35
+ novalidate
36
+ >
19
37
  <div class="list-group">
20
38
  <div
39
+ class="alert alert-info m-16 m-b-0"
21
40
  ng-if="ruleTemplate.info"
22
41
  ng-bind-html="ruleTemplate.info | translate"
23
- class="alert alert-info m-16 m-b-0"
24
42
  ></div>
25
43
 
26
44
  <div class="list-group-item">
@@ -31,12 +49,26 @@
31
49
  ng-model="rule.enabled"
32
50
  uib-btn-checkbox="rule.enabled"
33
51
  >
34
- <i c8y-icon="minus-circle" class="text-danger" ng-show="!rule.enabled"></i>
35
- <i c8y-icon="check-circle" class="text-success" ng-show="rule.enabled"></i>
36
- <span title="{{ 'Enabled' | translate }}" ng-show="rule.enabled">
52
+ <i
53
+ class="text-danger"
54
+ c8y-icon="minus-circle"
55
+ ng-show="!rule.enabled"
56
+ ></i>
57
+ <i
58
+ class="text-success"
59
+ c8y-icon="check-circle"
60
+ ng-show="rule.enabled"
61
+ ></i>
62
+ <span
63
+ title="{{ 'Enabled' | translate }}"
64
+ ng-show="rule.enabled"
65
+ >
37
66
  {{ 'Enabled' | translate }}
38
67
  </span>
39
- <span title="{{ 'Disabled' | translate }}" ng-show="!rule.enabled">
68
+ <span
69
+ title="{{ 'Disabled' | translate }}"
70
+ ng-show="!rule.enabled"
71
+ >
40
72
  {{ 'Disabled' | translate }}
41
73
  </span>
42
74
  </button>
@@ -54,13 +86,13 @@
54
86
  ng-class="{ 'has-error': nestedSmartRuleForm.$dirty && nestedSmartRuleForm.$invalid }"
55
87
  >
56
88
  <textarea
57
- id="rulename"
58
- rows="1"
59
89
  class="form-control input-name"
90
+ id="rulename"
60
91
  name="name"
92
+ rows="1"
93
+ required
61
94
  ng-model="rule.name"
62
95
  ng-attr-placeholder="{{ 'Rule name' | translate }} *"
63
- required
64
96
  ></textarea>
65
97
  </div>
66
98
  </ng-form>
@@ -72,8 +104,14 @@
72
104
  <strong>{{ ruleTemplate.paramGroups.input.label | translate }}</strong>
73
105
  </div>
74
106
  <div class="smart-rule-control">
75
- <div ng-if="ruleTemplate.paramGroups.input.info" class="text-muted">
76
- <i c8y-icon="info-circle" class="text-info pull-left"></i>
107
+ <div
108
+ class="text-muted"
109
+ ng-if="ruleTemplate.paramGroups.input.info"
110
+ >
111
+ <i
112
+ class="text-info pull-left"
113
+ c8y-icon="info-circle"
114
+ ></i>
77
115
  <p class="m-l-8">
78
116
  <em ng-bind-html="ruleTemplate.paramGroups.input.info | translate"></em>
79
117
  </p>
@@ -103,8 +141,14 @@
103
141
  rule-template="ruleTemplate"
104
142
  ></smart-rule-param-input>
105
143
  </div>
106
- <div ng-if="ruleTemplate.paramGroups.output.info" class="text-muted">
107
- <i c8y-icon="info-circle" class="text-info pull-left"></i>
144
+ <div
145
+ class="text-muted"
146
+ ng-if="ruleTemplate.paramGroups.output.info"
147
+ >
148
+ <i
149
+ class="text-info pull-left"
150
+ c8y-icon="info-circle"
151
+ ></i>
108
152
  <p class="m-l-8">
109
153
  <em ng-bind-html="ruleTemplate.paramGroups.output.info | translate"></em>
110
154
  </p>
@@ -117,11 +161,17 @@
117
161
  <span class="dot bg-primary-light">4</span>
118
162
  <strong translate>Target asset or devices</strong>
119
163
  </div>
120
- <div class="smart-rule-control" ng-if="rule.id && !ruleTemplate.noTarget">
164
+ <div
165
+ class="smart-rule-control"
166
+ ng-if="rule.id && !ruleTemplate.noTarget"
167
+ >
121
168
  <div ng-if="rule.enabledSources">
122
169
  <label translate>Active for target asset or devices</label>
123
170
  <div ng-repeat="source in enabledSources">
124
- <i c8y-icon="check" class="text-muted"></i>
171
+ <i
172
+ class="text-muted"
173
+ c8y-icon="check"
174
+ ></i>
125
175
  {{ source.name }}
126
176
  </div>
127
177
  </div>
@@ -129,17 +179,20 @@
129
179
  <label translate>Inactive for target asset or devices</label>
130
180
  <div ng-repeat="source in disabledSources">
131
181
  <i
182
+ class="text-warning"
132
183
  c8y-icon="minus-circle"
133
184
  uib-tooltip="{{ 'Disabled' | translate }}"
134
185
  tooltip-popup-delay="500"
135
186
  tooltip-append-to-body="true"
136
- class="text-warning"
137
187
  ></i>
138
188
  {{ source.name }}
139
189
  </div>
140
190
  </div>
141
191
  </div>
142
- <div class="smart-rule-control" ng-if="!rule.id && !ruleTemplate.noTarget">
192
+ <div
193
+ class="smart-rule-control"
194
+ ng-if="!rule.id && !ruleTemplate.noTarget"
195
+ >
143
196
  <div class="form-group">
144
197
  <c8y-device-selector-combo
145
198
  parent="initialActivationCfg.parent"
@@ -148,9 +201,18 @@
148
201
  search-only-child-assets-of="initialActivationCfg.searchOnlyChildAssetsOf"
149
202
  ></c8y-device-selector-combo>
150
203
  </div>
151
- <div class="checkbox" ng-show="hasChildAssets(initialActivationCfg.mo)">
152
- <label title="{{ 'Activate also for child assets' | translate }}" class="c8y-checkbox">
153
- <input type="checkbox" ng-model="initialActivationCfg.withChildren.assets" />
204
+ <div
205
+ class="checkbox"
206
+ ng-show="hasChildAssets(initialActivationCfg.mo)"
207
+ >
208
+ <label
209
+ class="c8y-checkbox"
210
+ title="{{ 'Activate also for child assets' | translate }}"
211
+ >
212
+ <input
213
+ type="checkbox"
214
+ ng-model="initialActivationCfg.withChildren.assets"
215
+ />
154
216
  <span></span>
155
217
  <span
156
218
  translate
@@ -170,8 +232,8 @@
170
232
  <div class="modal-footer">
171
233
  <button
172
234
  class="btn btn-default"
173
- type="button"
174
235
  title="{{ 'Cancel' | translate }}"
236
+ type="button"
175
237
  ng-click="cancel()"
176
238
  >
177
239
  {{ 'Cancel' | translate }}
@@ -183,10 +245,16 @@
183
245
  ng-disabled="smartRuleForm.$pristine || smartRuleForm.$invalid || savingStatus.inProgress"
184
246
  >
185
247
  <span ng-hide="savingStatus.inProgress">
186
- <span title="{{ 'Create' | translate }}" ng-hide="rule.id">
248
+ <span
249
+ title="{{ 'Create' | translate }}"
250
+ ng-hide="rule.id"
251
+ >
187
252
  {{ 'Create' | translate }}
188
253
  </span>
189
- <span title="{{ 'Save' | translate }}" ng-show="rule.id">
254
+ <span
255
+ title="{{ 'Save' | translate }}"
256
+ ng-show="rule.id"
257
+ >
190
258
  {{ 'Save' | translate }}
191
259
  </span>
192
260
  </span>