@c8y/ng1-modules 1018.347.0 → 1018.348.0

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 (558) hide show
  1. package/NOTICES +0 -34
  2. package/aclManagement/controllers/permissionEditorCtrl.js +1 -1
  3. package/actilityProviderSettings/actilityProviderSettings.module.js +1 -1
  4. package/administration-alarmMapping/controllers/alarmMapping.js +1 -1
  5. package/administration-applicationSettings/controllers/applicationSettings.js +1 -1
  6. package/administration-applications/appWizard/appWizardExternalStep.component.js +1 -1
  7. package/administration-applications/appWizard/appWizardSmartAppStep.component.js +1 -1
  8. package/administration-applications/appWizard/appWizardUploadStep.component.js +1 -1
  9. package/administration-applications/appWizard/context-path.directive.js +1 -1
  10. package/administration-applications/application-detail/application-detail.component.js +1 -1
  11. package/administration-applications/application-list-view/application-list-view.component.js +1 -1
  12. package/administration-applications/controllers/applicationAccessEditor.js +1 -1
  13. package/administration-archivesEditor/list.controller.js +1 -1
  14. package/administration-auditLogs/filter.directive.js +1 -1
  15. package/administration-deviceUsers/controllers/deviceUserDetail.js +1 -1
  16. package/administration-homeAdministration/home-administration.component.js +1 -1
  17. package/administration-statistics/controllers/statistics.js +1 -1
  18. package/administration-storageLimitEmail/controllers/storageLimitCtrl.js +1 -1
  19. package/alarms/widget-config.controller.js +1 -1
  20. package/alarms/widget.controller.js +1 -1
  21. package/alarmsEventsExplorer/alarmsEventsTimelinesChart/alarmsEventsTimelinesChart.component.js +1 -1
  22. package/alarmsEventsExplorer/alarmsEventsTimelinesChart/alarmsEventsTimelinesChart.service.js +1 -1
  23. package/alarmsEventsExplorer/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfigModal.controller.js +1 -1
  24. package/app-logs/app-instance-logs/app-instance-logs.component.js +1 -1
  25. package/app-logs/app-logs/app-logs.component.js +1 -1
  26. package/app-logs/app-logs.service.js +1 -1
  27. package/app-status/app-status/app-status.component.js +1 -1
  28. package/app-status/app-tenant-subscriptions-list/app-tenant-subscriptions-list.component.js +1 -1
  29. package/app-status/index.js +1 -1
  30. package/app-status-ui/index.js +1 -1
  31. package/applicationLinks/applications.controller.js +1 -1
  32. package/asset-notes/assetNotes.service.js +1 -1
  33. package/assetPropertyWidget/main.controller.js +1 -1
  34. package/assetTable/assetTable2/assets.controller.js +1 -1
  35. package/assetTable/assetTable2/assets.service.js +1 -1
  36. package/assetTable/assetTable2/index.js +1 -1
  37. package/assetTable/assetTable2/rendererButton.controller.js +1 -1
  38. package/assetTable/assetTable2/rendererButtonConfig.controller.js +1 -1
  39. package/assetTable/assetTable2/rendererIcon.controller.js +1 -1
  40. package/assetTable/assetTable2/sort.directive.js +1 -1
  41. package/assetTable/assets.controller.js +1 -1
  42. package/assetTable/assetsConfig.controller.js +1 -1
  43. package/assetTable/comparisons.service.js +1 -1
  44. package/assetTable/counterColumns.service.js +1 -1
  45. package/binary-file-download/binary-file-download.component.js +1 -1
  46. package/binary-file-download/binary-file-download.config.js +1 -1
  47. package/binaryArtefactsManagement/controllers/list.js +1 -1
  48. package/binaryArtefactsManagement/index.js +1 -1
  49. package/cell-id-information-activator/cell-id-information-activator.config.js +1 -1
  50. package/cell-id-information-activator/cell-id-information-activator.service.js +1 -1
  51. package/cell-id-usage-statistics/cell-id-usage-statistics.component.js +1 -1
  52. package/cell-id-usage-statistics/cell-id-usage-statistics.service.js +1 -1
  53. package/cockpit-assetCount/services/assetCount.js +1 -1
  54. package/cockpit-cockpitConfig/services/navigator.js +1 -1
  55. package/cockpit-reports/reports.service.js +1 -1
  56. package/cockpit-smartRulesUI/index.js +1 -1
  57. package/commandTemplates/controllers/commandTemplates.js +1 -1
  58. package/configurationRepository/configurationRepository.service.js +1 -1
  59. package/configurationRepository/list.controller.js +1 -1
  60. package/connectivityV2/connectivityV2.component.js +1 -1
  61. package/connectivityV2/connectivityV2.module.js +1 -1
  62. package/connectivityV2/connectivityV2.service.js +1 -1
  63. package/connectivityV2/sms.component.js +1 -1
  64. package/connectivityV2/status.component.js +1 -1
  65. package/core/angularStart.js +1 -1
  66. package/core/bootstrap.js +1 -1
  67. package/core/core/index.js +1 -1
  68. package/core/core/locales.js +1 -1
  69. package/core/core/services/actility.js +1 -1
  70. package/core/core/services/alarms.js +1 -1
  71. package/core/core/services/application.js +1 -1
  72. package/core/core/services/audits.js +1 -1
  73. package/core/core/services/auth.js +1 -1
  74. package/core/core/services/base.js +1 -1
  75. package/core/core/services/binary.js +1 -1
  76. package/core/core/services/binaryCommon.js +1 -1
  77. package/core/core/services/combain.js +1 -1
  78. package/core/core/services/connectivity.js +1 -1
  79. package/core/core/services/counter.js +1 -1
  80. package/core/core/services/deviceBulkControl.js +1 -1
  81. package/core/core/services/deviceControl.js +1 -1
  82. package/core/core/services/deviceGroup.js +1 -1
  83. package/core/core/services/deviceShell.js +1 -1
  84. package/core/core/services/deviceStatus.js +1 -1
  85. package/core/core/services/devices.js +1 -1
  86. package/core/core/services/dynamicGroups.js +1 -1
  87. package/core/core/services/events.js +1 -1
  88. package/core/core/services/geo.js +1 -1
  89. package/core/core/services/groupTypesConfig.js +1 -1
  90. package/core/core/services/groups.js +1 -1
  91. package/core/core/services/identity.js +1 -1
  92. package/core/core/services/inventory.js +1 -1
  93. package/core/core/services/jsonSchemas.js +1 -1
  94. package/core/core/services/kpi.js +1 -1
  95. package/core/core/services/license.js +1 -1
  96. package/core/core/services/loginOptions.js +1 -1
  97. package/core/core/services/measurements.js +1 -1
  98. package/core/core/services/messaging.js +1 -1
  99. package/core/core/services/notifications.js +1 -1
  100. package/core/core/services/permissions.js +1 -1
  101. package/core/core/services/promise.js +1 -1
  102. package/core/core/services/queriesUtil.js +1 -1
  103. package/core/core/services/realtime.js +1 -1
  104. package/core/core/services/realtimeLongPollingTransport.js +1 -1
  105. package/core/core/services/retentions.js +1 -1
  106. package/core/core/services/roles.js +1 -1
  107. package/core/core/services/settings.js +1 -1
  108. package/core/core/services/simulator.js +1 -1
  109. package/core/core/services/smartRestTemplates.js +1 -1
  110. package/core/core/services/statement.js +1 -1
  111. package/core/core/services/statistics.js +1 -1
  112. package/core/core/services/tenant.js +1 -1
  113. package/core/core/services/tfaSettings.js +1 -1
  114. package/core/core/services/tracker.js +1 -1
  115. package/core/core/services/user.js +1 -1
  116. package/core/core/services/userGroup.js +1 -1
  117. package/core/core/services/userPreferences.js +1 -1
  118. package/core/core/services/util.js +1 -1
  119. package/core/index.js +1 -1
  120. package/core/sdk/directives/repeat.js +1 -1
  121. package/core/sdk/providers/cumulocity.js +1 -1
  122. package/core/ui/components/battery/battery.js +1 -1
  123. package/core/ui/components/errorFeedback.js +1 -1
  124. package/core/ui/components/passwordStrengthChecklist.js +1 -1
  125. package/core/ui/components/signalStrength/signal.js +1 -1
  126. package/core/ui/components/timelinesChart.js +1 -1
  127. package/core/ui/configurable-device-list-columns/configurable-columns.service.js +1 -1
  128. package/core/ui/configurable-device-list-columns/modal-columns-configure.component.js +1 -1
  129. package/core/ui/configurable-device-list-columns/unique-by.directive.js +1 -1
  130. package/core/ui/containers/header.component.js +1 -1
  131. package/core/ui/containers/wizard.component.js +1 -1
  132. package/core/ui/containers/wizardSlide.jquery.js +1 -1
  133. package/core/ui/controllers/deviceList.js +1 -1
  134. package/core/ui/controllers/editRetentionRule.js +1 -1
  135. package/core/ui/controllers/eventList.js +1 -1
  136. package/core/ui/controllers/listPagination/listPagination.controller.js +1 -1
  137. package/core/ui/controllers/loginCtrl.js +1 -1
  138. package/core/ui/controllers/radialGauge.js +1 -1
  139. package/core/ui/csvExporter/csv-escape-formulas-option.decorator.js +1 -1
  140. package/core/ui/csvExporter/csvExporter.controller.js +1 -1
  141. package/core/ui/csvExporter/csvExporter.directive.js +1 -1
  142. package/core/ui/csvExporter/csvExporter.service.js +1 -1
  143. package/core/ui/directives/aggregation.js +1 -1
  144. package/core/ui/directives/alarmList.js +1 -1
  145. package/core/ui/directives/appIcon.js +1 -1
  146. package/core/ui/directives/auditList.js +1 -1
  147. package/core/ui/directives/autocomplete.js +1 -1
  148. package/core/ui/directives/binaryInput.js +1 -1
  149. package/core/ui/directives/binaryOut.js +1 -1
  150. package/core/ui/directives/codeEditor.js +1 -1
  151. package/core/ui/directives/dateTimePicker.js +1 -1
  152. package/core/ui/directives/deviceGroupSelector.js +1 -1
  153. package/core/ui/directives/downloadButton.js +1 -1
  154. package/core/ui/directives/editRetentionRule.js +1 -1
  155. package/core/ui/directives/filePicker.js +1 -1
  156. package/core/ui/directives/icon.js +1 -1
  157. package/core/ui/directives/ifAllowed.js +1 -1
  158. package/core/ui/directives/interval.js +1 -1
  159. package/core/ui/directives/linearGauge.js +1 -1
  160. package/core/ui/directives/loadMore.js +1 -1
  161. package/core/ui/directives/map-plugins/geofence-layer.js +1 -1
  162. package/core/ui/directives/map.js +1 -1
  163. package/core/ui/directives/map2.js +1 -1
  164. package/core/ui/directives/max.js +1 -1
  165. package/core/ui/directives/min.js +1 -1
  166. package/core/ui/directives/number.js +1 -1
  167. package/core/ui/directives/phoneNumber.js +1 -1
  168. package/core/ui/directives/pieChart.js +1 -1
  169. package/core/ui/directives/rdbDump.js +1 -1
  170. package/core/ui/directives/realtimeButton.js +1 -1
  171. package/core/ui/directives/renderer.js +1 -1
  172. package/core/ui/directives/scrollLoad.js +1 -1
  173. package/core/ui/directives/silo.js +1 -1
  174. package/core/ui/directives/sunburstChart.js +1 -1
  175. package/core/ui/directives/textOut.js +1 -1
  176. package/core/ui/directives/validateUniqueExternalId.js +1 -1
  177. package/core/ui/fieldbus/fieldbus.service.js +1 -1
  178. package/core/ui/filteringSorting/filteredSortedList.controller.js +1 -1
  179. package/core/ui/filteringSorting/filteringSortingCollections.service.js +1 -1
  180. package/core/ui/filteringSorting/filteringSortingColumns.service.js +1 -1
  181. package/core/ui/filteringSorting/filteringSortingInventoryQueries.service.js +1 -1
  182. package/core/ui/filters/absoluteDate.js +1 -1
  183. package/core/ui/filters/bytes.js +1 -1
  184. package/core/ui/filters/capitalizestring.js +1 -1
  185. package/core/ui/filters/checkForDate.js +1 -1
  186. package/core/ui/filters/dateParts.js +1 -1
  187. package/core/ui/filters/distance.js +1 -1
  188. package/core/ui/filters/duration.js +1 -1
  189. package/core/ui/filters/filter-translate.decorator.js +1 -1
  190. package/core/ui/filters/filterByFields.js +1 -1
  191. package/core/ui/filters/hex.filter.js +1 -1
  192. package/core/ui/filters/humanize2.js +1 -1
  193. package/core/ui/filters/humanizeAppName.js +1 -1
  194. package/core/ui/filters/orderBy-translate.decorator.js +1 -1
  195. package/core/ui/filters/relativedate.js +1 -1
  196. package/core/ui/filters/safeLinks.js +1 -1
  197. package/core/ui/forms/checkDirty.directive.js +1 -1
  198. package/core/ui/forms/hex-input.directive.js +1 -1
  199. package/core/ui/forms/host-address.validator.js +1 -1
  200. package/core/ui/forms/http-protocol.validator.js +1 -1
  201. package/core/ui/forms/model-options.directive.js +1 -1
  202. package/core/ui/forms/regular-expression.validator.js +1 -1
  203. package/core/ui/forms/required-input-placeholder.directive.js +1 -1
  204. package/core/ui/forms/saveButtonFooter.component.js +1 -1
  205. package/core/ui/forms/search.component.js +1 -1
  206. package/core/ui/forms/ssh-key-input.js +1 -1
  207. package/core/ui/forms/uib-dropdown-dropup.directive.js +1 -1
  208. package/core/ui/forms/uib-dropdown.decorator.js +1 -1
  209. package/core/ui/forms/validate-url-segment.validator.js +1 -1
  210. package/core/ui/groups/group-create-and-assign.component.js +1 -1
  211. package/core/ui/header/action-bar.service.js +1 -1
  212. package/core/ui/header/actions.provider.js +1 -1
  213. package/core/ui/index.js +1 -1
  214. package/core/ui/inputDirectives/colorpicker.js +1 -1
  215. package/core/ui/itemSelector/itemSelector.component.js +1 -1
  216. package/core/ui/leaflet/leaflet-directive.decorator.js +1 -1
  217. package/core/ui/lists/list-display-control.component.js +1 -1
  218. package/core/ui/lists/quickLinksList.service.js +1 -1
  219. package/core/ui/locales/locales.provider.js +1 -1
  220. package/core/ui/navigation/breadcrumbs.component.js +1 -1
  221. package/core/ui/navigation/breadcrumbs.provider.js +1 -1
  222. package/core/ui/navigation/tabs.component.js +1 -1
  223. package/core/ui/navigation/tabs.provider.js +1 -1
  224. package/core/ui/notifications/accessDenied.service.js +1 -1
  225. package/core/ui/notifications/alert.controller.js +1 -1
  226. package/core/ui/notifications/alert.service.js +1 -1
  227. package/core/ui/operations/operations-timeline.component.js +1 -1
  228. package/core/ui/properties/children.computedProperty.js +1 -1
  229. package/core/ui/properties/computedProperties.provider.js +1 -1
  230. package/core/ui/properties/configurationSnapshot.computedProperty.js +1 -1
  231. package/core/ui/properties/counters.computedProperty.js +1 -1
  232. package/core/ui/properties/lastDeviceMessage.computedProperty.js +1 -1
  233. package/core/ui/properties/lastMeasurement.computedProperty.js +1 -1
  234. package/core/ui/properties/propertiesLibrary.service.js +1 -1
  235. package/core/ui/properties/propertySelector.controller.js +1 -1
  236. package/core/ui/properties/schemaProperties.service.js +1 -1
  237. package/core/ui/properties/schemaPropertySelector.controller.js +1 -1
  238. package/core/ui/providers/beta.js +1 -1
  239. package/core/ui/providers/httpCache.js +1 -1
  240. package/core/ui/providers/navigator.js +1 -1
  241. package/core/ui/providers/objectActions.js +1 -1
  242. package/core/ui/providers/renderers.js +1 -1
  243. package/core/ui/providers/search.js +1 -1
  244. package/core/ui/providers/views.js +1 -1
  245. package/core/ui/providers/zip.js +1 -1
  246. package/core/ui/roles/roles-matrix.component.js +1 -1
  247. package/core/ui/sanitize-html/sanitize-html.js +1 -1
  248. package/core/ui/sanitize-html/sanitize-html.service.js +1 -1
  249. package/core/ui/schemaForm/deviceGroupIdPicker.config.js +1 -1
  250. package/core/ui/schemaForm/fileUpload.config.js +1 -1
  251. package/core/ui/schemaForm/fileUpload.directive.js +1 -1
  252. package/core/ui/schemaForm/overrides/decorators/decorators.decorator.js +1 -1
  253. package/core/ui/schemaForm/schemaEditor.component.js +1 -1
  254. package/core/ui/schemaForm/schemaForm.component.js +1 -1
  255. package/core/ui/schemaForm/schemaForm.run.js +1 -1
  256. package/core/ui/schemaForm/schemaFormHelper.service.js +1 -1
  257. package/core/ui/schemaForm/schemaPropertyEditor.component.js +1 -1
  258. package/core/ui/services/contextDetailsShared.service.js +1 -1
  259. package/core/ui/services/deviceListColumns.js +1 -1
  260. package/core/ui/services/docs.js +1 -1
  261. package/core/ui/services/groupsHierarchyNavigator.js +1 -1
  262. package/core/ui/services/groupsHierarchySvc.js +1 -1
  263. package/core/ui/services/loginService.js +1 -1
  264. package/core/ui/services/measurementsReport.js +1 -1
  265. package/core/ui/services/modal.js +1 -1
  266. package/core/ui/services/passwordStrengthCheckerFactory.js +1 -1
  267. package/core/ui/services/support.js +1 -1
  268. package/core/ui/services/uiconfig.js +1 -1
  269. package/core/ui/services/util.js +1 -1
  270. package/core/ui/smartrules/smartRulesAvailability.service.js +1 -1
  271. package/core/ui/title/title.controller.js +1 -1
  272. package/core/ui/title/title.provider.js +1 -1
  273. package/core/ui/user/editUser.controller.js +1 -1
  274. package/core/ui/user/editUser.directive.js +1 -1
  275. package/core/ui/user/measurementUnitPreference.component.js +1 -1
  276. package/core/ui/user/rolesUiStrings.constant.js +1 -1
  277. package/core/ui/user/userPicker.component.js +1 -1
  278. package/core/ui/user/userSettingsBlocks.provider.js +1 -1
  279. package/core/ui/user/userUtil.service.js +1 -1
  280. package/core/ui/utils/copyToClipboard.directive.js +1 -1
  281. package/core/ui/utils/guide-docs.directive.js +1 -1
  282. package/core/ui/utils/uiComponent.directive.js +1 -1
  283. package/core/update-query-params.js +1 -1
  284. package/dashboard2/dashboard/dashboardSelect.controller.js +1 -1
  285. package/dashboard2/dashboard.service.js +1 -1
  286. package/dashboard2/dashboardInventory.service.js +1 -1
  287. package/dataBroker/connectors/connectorEditor.component.js +1 -1
  288. package/dataBroker/connectors/connectors.service.js +1 -1
  289. package/dataBroker/connectorsAlarms/connectorAlarms.component.js +1 -1
  290. package/dataBroker/dataBroker.config.js +1 -1
  291. package/dataBroker/subscriptions/subscriptions.component.js +1 -1
  292. package/dataPointExplorer/controllers/dataPointAdd.js +1 -1
  293. package/dataPointExplorer/controllers/dataPointExplorer.js +1 -1
  294. package/dataPointExplorer/controllers/dataPointItem.js +1 -1
  295. package/dataPointExplorer/controllers/dataPointList.js +1 -1
  296. package/dataPointExplorer/controllers/dataPointWidget.js +1 -1
  297. package/dataPointExplorer/controllers/dataPointWidgetConfig.js +1 -1
  298. package/dataPointExplorer/directives/dataPointValidator.js +1 -1
  299. package/dataPointExplorer/services/dataPoints.js +1 -1
  300. package/dataPointTable/dataPointTable.controller.js +1 -1
  301. package/dataPointTable/dataPointTable.directive.js +1 -1
  302. package/dataPointTable/dataPointTable.service.js +1 -1
  303. package/dataPointTable/realtimeRadioButton.directive.js +1 -1
  304. package/dataPointTable/widget.controller.js +1 -1
  305. package/device-protocol-actility/actility-device.provider.js +1 -1
  306. package/device-protocol-canbus/canbus-device.provider.js +1 -1
  307. package/device-protocol-canopen/canopen-device.provider.js +1 -1
  308. package/device-protocol-deviceDatabase4/device-type-create-step.component.js +1 -1
  309. package/device-protocol-deviceDatabase4/device-type-protocol-base.provider.js +1 -1
  310. package/device-protocol-deviceDatabase4/device-type-row-info.component.js +1 -1
  311. package/device-protocol-impact/impact-detail.component.js +1 -1
  312. package/device-protocol-impact/impact.provider.js +1 -1
  313. package/device-protocol-lora/lora-device.provider.js +1 -1
  314. package/device-protocol-lpwan/lpwan-device.provider.js +1 -1
  315. package/device-protocol-lwm2m/lwm2m.provider.js +1 -1
  316. package/device-protocol-lwm2m/lwm2mFinalStep.component.js +1 -1
  317. package/device-protocol-lwm2m/lwm2mUploadStep.component.js +1 -1
  318. package/device-protocol-lwm2m/lwm2mValidationRules/lwm2mValidationRule.component.js +1 -1
  319. package/device-protocol-lwm2m/lwm2mValidationRules/lwm2mValidationRules.component.js +1 -1
  320. package/device-protocol-modbus/modbus-device.provider.js +1 -1
  321. package/device-protocol-opcua/opcua-device.provider.js +1 -1
  322. package/device-protocol-opcua-v2/opcua-device-v2.provider.js +1 -1
  323. package/device-protocol-opcua-v2/opcua-v2-row-info.component.js +1 -1
  324. package/device-protocol-profibus/profibus-device.provider.js +1 -1
  325. package/device-protocol-sigfox/sigfox-device.provider.js +1 -1
  326. package/device-protocol-snmp/snmp-device.provider.js +1 -1
  327. package/device-protocols/device-protocol-import-button.component.js +1 -1
  328. package/device-protocols/deviceProtocolList.component.js +1 -1
  329. package/device-protocols/deviceProtocolSelect.component.js +1 -1
  330. package/device-protocols/deviceProtocolUi.provider.js +1 -1
  331. package/device-protocols/object-mapping.component.js +1 -1
  332. package/device-protocols/object-mappings.service.js +1 -1
  333. package/deviceActility/actilityUI.provider.js +1 -1
  334. package/deviceActility/deviceActility.module.js +1 -1
  335. package/deviceConfiguration/index.js +1 -1
  336. package/deviceControlMessage/controllers/deviceControlMessageWidget.js +1 -1
  337. package/deviceControlRelay/relayControl/relayControl.controller.js +1 -1
  338. package/deviceControlRelay/relayControl/relayControl.directive.js +1 -1
  339. package/deviceControlRelay/widget.controller.js +1 -1
  340. package/deviceControlRelayArray/relayArrayControl/relayArrayControl.controller.js +1 -1
  341. package/deviceControlRelayArray/widget.controller.js +1 -1
  342. package/deviceDatabase4/detail/device-type-detail.component.js +1 -1
  343. package/deviceDatabase4/detail/holding-registers.component.js +1 -1
  344. package/deviceDatabase4/detail/message-id-configuration-description.component.js +1 -1
  345. package/deviceDatabase4/device-database.service.js +1 -1
  346. package/deviceDatabase4/device-type-list.component.js +1 -1
  347. package/deviceDatabase4/modals/configure-discrete-io.component.js +1 -1
  348. package/deviceDatabase4/modals/configure-register.component.js +1 -1
  349. package/deviceDatabase4/modals/import-device-type.component.js +1 -1
  350. package/deviceDatabase4/modals/select-fieldbus-property.component.js +1 -1
  351. package/deviceDatabase4/parsers/device-type-parser-eds.service.js +1 -1
  352. package/deviceDatabase4/parsers/device-type-parser-json.service.js +1 -1
  353. package/deviceDatabase4/parsers/device-type-parser-mib.service.js +1 -1
  354. package/deviceDatabase4/property-generator.service.js +1 -1
  355. package/deviceDatabase4/unique.directive.js +1 -1
  356. package/deviceDatabase4/validate-value-in-register-range.directive.js +1 -1
  357. package/deviceDatabase4/vendor/ini-legacy.js +1 -1
  358. package/deviceDetail/index.js +1 -1
  359. package/deviceDetailIdentity/controllers/identity.js +1 -1
  360. package/deviceDetailIdentity/index.js +1 -1
  361. package/deviceGroupAssignment/groupAssignment.component.js +1 -1
  362. package/devicePropertyWidget/controllers/config.js +1 -1
  363. package/devicePropertyWidget/controllers/widget.js +1 -1
  364. package/devicePropertyWidget/directives/fragmentCheckboxList.js +1 -1
  365. package/devicePropertyWidget/services/moRealTimeDetails.js +1 -1
  366. package/deviceSelector/controllers/deviceSelectorComboCtrl.js +1 -1
  367. package/deviceSelector/controllers/deviceSelectorCtrl.js +1 -1
  368. package/deviceSelector/controllers/deviceSelectorListCtrl.js +1 -1
  369. package/deviceSelector/directives/deviceSelectorCombo.js +1 -1
  370. package/deviceSelector/directives/deviceSelectorList.js +1 -1
  371. package/deviceStatusWidget/ownerStatus.component.js +1 -1
  372. package/deviceStatusWidget/requiredAvailabilityIntervalSetting.component.js +1 -1
  373. package/devicemanagement-aclManagement/controllers/aclManagementCtrl.js +1 -1
  374. package/devicemanagement-aclManagement/index.js +1 -1
  375. package/devicemanagement-alarmList/controllers/alarmList.js +1 -1
  376. package/devicemanagement-availability/controllers/availability.js +1 -1
  377. package/devicemanagement-deviceNetwork/controllers/network.js +1 -1
  378. package/devicemanagement-deviceNetwork/index.js +1 -1
  379. package/devicemanagement-eventList/controllers/eventList.js +1 -1
  380. package/devicemanagement-location/controllers/location.js +1 -1
  381. package/devicemanagement-location/index.js +1 -1
  382. package/devicemanagement-logViewer/controllers/logViewer.js +1 -1
  383. package/devicemanagement-logViewer/directives/logViewer.js +1 -1
  384. package/devicemanagement-logViewer/providers/logViewer.js +1 -1
  385. package/devicemanagement-measurements/index.js +1 -1
  386. package/devicemanagement-restartDevice/index.js +1 -1
  387. package/devicemanagement-tixiDeviceControl/index.js +1 -1
  388. package/devicemanagement-tracking/controllers/config.js +1 -1
  389. package/devicemanagement-tracking/controllers/tracking.js +1 -1
  390. package/devicemanagement-tracking/index.js +1 -1
  391. package/devicemanagement-vendMeDeviceControl/controllers/vendMeDeviceControl.js +1 -1
  392. package/devicemanagement-vendMeDeviceControl/index.js +1 -1
  393. package/enterpriseEdition/createFile.js +1 -1
  394. package/enterpriseEdition/customBranding/brandingConfigurationForm.component.js +1 -1
  395. package/enterpriseEdition/customBranding/brandingConfigurationUi.provider.js +1 -1
  396. package/enterpriseEdition/customBranding/brandingDeploy.service.js +1 -1
  397. package/enterpriseEdition/customBranding/brandingProcessExecution.component.js +1 -1
  398. package/enterpriseEdition/enterpriseEdition.module.js +1 -1
  399. package/enterpriseEdition/sslCertificate/certificateActivation.component.js +1 -1
  400. package/enterpriseEdition/sslCertificate/manageCertificate.component.js +1 -1
  401. package/enterpriseEdition/sslCertificate/manageCertificate.service.js +1 -1
  402. package/enterpriseEdition/ui-assets/public-options.service.js +1 -1
  403. package/enterpriseEdition/ui-assets/static-assets.service.js +1 -1
  404. package/eventList/eventList.controller.js +1 -1
  405. package/eventsBinary/components/eventBinaryActions/eventBinaryActions.js +1 -1
  406. package/eventsBinary/services/eventsBinary.service.js +1 -1
  407. package/export/controllers/detail.js +1 -1
  408. package/export/services/api.js +1 -1
  409. package/export/services/config.js +1 -1
  410. package/export/services/export.js +1 -1
  411. package/export/services/filters.js +1 -1
  412. package/generic-ui/config-audit/config-audit-diff.component.js +1 -1
  413. package/generic-ui/config-audit/config-audit-modal.component.js +1 -1
  414. package/generic-ui/config-audit/config-audit.component.js +1 -1
  415. package/generic-ui/generic-ui-config.provider.js +1 -1
  416. package/generic-ui/generic-ui-inventory-property.component.js +1 -1
  417. package/generic-ui/generic-ui-inventory.component.js +1 -1
  418. package/generic-ui/generic-ui-operation-list-button.component.js +1 -1
  419. package/generic-ui/generic-ui.component.js +1 -1
  420. package/generic-ui/generic-ui.service.js +1 -1
  421. package/groupsHierarchy/controllers/assetSearchCtrl.js +1 -1
  422. package/groupsHierarchy/controllers/groupDevicesCtrl.js +1 -1
  423. package/groupsHierarchy/controllers/groupsListCtrl.js +1 -1
  424. package/groupsHierarchy/groupsHierarchyUi.provider.js +1 -1
  425. package/htmlWidget/htmlWidget.controller.js +1 -1
  426. package/htmlWidget/htmlWidget.directive.js +1 -1
  427. package/infoGauge/infoGauge.controller.js +1 -1
  428. package/infoGauge/infoGaugeConfig.controller.js +1 -1
  429. package/kpi/controllers/deprecated/edit.js +1 -1
  430. package/kpi/controllers/deprecated/graph.js +1 -1
  431. package/kpi/controllers/deprecated/multipleKpiConfig.js +1 -1
  432. package/kpi/controllers/deprecated/setup.js +1 -1
  433. package/kpi/controllers/gauge.js +1 -1
  434. package/kpi/controllers/kpiConfig.js +1 -1
  435. package/kpi/controllers/list.js +1 -1
  436. package/kpi/controllers/pieChart.js +1 -1
  437. package/kpi/controllers/pieChartConfig.js +1 -1
  438. package/kpi/services/baseWidget.js +1 -1
  439. package/kpi/services/kpi.js +1 -1
  440. package/kpi/services/mostRecentKpi.js +1 -1
  441. package/map/controllers/geofenceEdit.js +1 -1
  442. package/measurements/controllers/lineChart.js +1 -1
  443. package/measurements/controllers/measurements.js +1 -1
  444. package/measurements/directives/lineChart.js +1 -1
  445. package/measurements/directives/timeIntervalChoice.js +1 -1
  446. package/measurements/fragmentChart/fragmentChart.component.js +1 -1
  447. package/measurements/measurements2/axisX.service.js +1 -1
  448. package/measurements/measurements2/axisY.service.js +1 -1
  449. package/measurements/measurements2/chart.controller.js +1 -1
  450. package/measurements/measurements2/chart.service.js +1 -1
  451. package/measurements/measurements2/hoverInfo.service.js +1 -1
  452. package/measurements/measurements2/rtAutoMove.service.js +1 -1
  453. package/measurements/measurements2/series.service.js +1 -1
  454. package/measurements/services/lineChartService.js +1 -1
  455. package/modbusConfiguration4/fieldbus-config.component.js +1 -1
  456. package/modbusConfiguration4/fieldbus-device-list.component.js +1 -1
  457. package/modbusConfiguration4/modbus-configuration-4.config.js +1 -1
  458. package/modbusWidget4/modbus-widget.service.js +1 -1
  459. package/modbusWidget4/widget-config.component.js +1 -1
  460. package/modbusWidget4/widget.component.js +1 -1
  461. package/modbusWidgets/controllers/widget.js +1 -1
  462. package/modbusWidgets/controllers/widgetConfig.js +1 -1
  463. package/modbusWidgets/services/modbusWidget.js +1 -1
  464. package/newsletter/downloadEmailsList.component.js +1 -1
  465. package/oauth/controllers/oauth.js +1 -1
  466. package/package.json +2 -2
  467. package/platformConfiguration/platformConfigurationForm.component.js +1 -1
  468. package/platformConfiguration/platformConfigurationUi.provider.js +1 -1
  469. package/propertiesLibrary/index.js +1 -1
  470. package/propertiesLibrary/jsonSchemaObjectEditor.component.js +1 -1
  471. package/propertiesLibrary/jsonSchemaObjectsList.component.js +1 -1
  472. package/qrCode/controllers/qrCode.js +1 -1
  473. package/qrCode/services/qrCodePrinter.js +1 -1
  474. package/qrCode/services/qrCodeTemplate.js +1 -1
  475. package/relayWidget/relay.service.js +1 -1
  476. package/remoteAccess/clients/remoteAccessClients.service.js +1 -1
  477. package/remoteAccess/clients/terminal/index.js +1 -1
  478. package/remoteAccess/clients/terminal/shell-adapter.js +1 -1
  479. package/remoteAccess/clients/terminal/telnet-negotiator.js +1 -1
  480. package/remoteAccess/clients/vnc/vncClient.js +1 -1
  481. package/remoteAccess/remoteAccess.service.js +1 -1
  482. package/remoteAccess/remoteAccessEndpointCard/remoteAccessEndpointCard.component.js +1 -1
  483. package/remoteAccess/remoteAccessEndpointModal/remoteAccessEndpointModal.component.js +1 -1
  484. package/remoteAccess/remoteAccessEndpointsList/remoteAccessEndpointsList.component.js +1 -1
  485. package/remoteAccess/remoteAccessSettings/remoteAccessSettings.component.js +1 -1
  486. package/remoteAccess/remoteAccessUI.provider.js +1 -1
  487. package/roles/detail/roleDetailGlobal.component.js +1 -1
  488. package/roles/detail/roleInventoryPermissionList.component.js +1 -1
  489. package/roles/list/rolesOverview.controller.js +1 -1
  490. package/roles/rolesUi.provider.js +1 -1
  491. package/scada/config.controller.js +1 -1
  492. package/scada/mapping.directive.js +1 -1
  493. package/scada/svg.directive.js +1 -1
  494. package/scada/util.service.js +1 -1
  495. package/scada/widget.controller.js +1 -1
  496. package/sigfox-provider-settings/sigfox-settings.service.js +1 -1
  497. package/simulators/add/simulatorAdd.component.js +1 -1
  498. package/simulators/detail/detail.controller.js +1 -1
  499. package/simulators/detail/instructionDetail.component.js +1 -1
  500. package/simulators/detail/instructionList.component.js +1 -1
  501. package/simulators/list/list.component.js +1 -1
  502. package/simulators/simulators.service.js +1 -1
  503. package/smartRestEditor/details.controller.js +1 -1
  504. package/smartRestEditor/importTemplate/importTemplate.component.js +1 -1
  505. package/smartRestEditor/requestEditor/requestEditor.component.js +1 -1
  506. package/smartRestEditor/responseEditor/responseEditor.component.js +1 -1
  507. package/smartRestEditor/validators/validateCustomFieldKeyInRequestTemplate.directive.js +1 -1
  508. package/smartRestEditor/validators/validateUniqueMsgIdInTemplate.directive.js +1 -1
  509. package/smartRestEditorUI/index.js +1 -1
  510. package/smartRules/controllers/add.js +1 -1
  511. package/smartRules/controllers/edit.js +1 -1
  512. package/smartRules/controllers/list.js +1 -1
  513. package/smartRules/controllers/smartRuleParamInput.js +1 -1
  514. package/smartRules/directives/smartRuleParamInput.js +1 -1
  515. package/smartRules/directives/smartRuleParamInputAlarmType.js +1 -1
  516. package/smartRules/directives/smartRuleParamInputEscalationSteps.js +1 -1
  517. package/smartRules/directives/smartRuleParamInputFrequency.js +1 -1
  518. package/smartRules/directives/smartRuleParamInputGeofence.js +1 -1
  519. package/smartRules/directives/smartRuleParamInputKpi.js +1 -1
  520. package/smartRules/directives/smartRuleParamInputTimeInterval.js +1 -1
  521. package/smartRules/list/smartRulesList.component.js +1 -1
  522. package/smartRules/services/smartRuleTemplates.js +1 -1
  523. package/smartRules/services/smartRules.js +1 -1
  524. package/switchDisplay/controller/switchDisplayCtrl.js +1 -1
  525. package/tenantApplications/controllers/main.js +1 -1
  526. package/tenantApplications/subscribed-applications/subscribed-applications.component.js +1 -1
  527. package/tenantLicenses/licenseManagement.component.js +1 -1
  528. package/tenantPolicies/retentionRule/retentionRuleRow.component.js +1 -1
  529. package/tenantPolicies/tenantPolicies.service.js +1 -1
  530. package/tenantPolicies/tenantPoliciesConfig.provider.js +1 -1
  531. package/tenantPolicies/tenantPolicyDetail/tenantPolicyDetail.component.js +1 -1
  532. package/tenantStatistics/tenant-statistics-columns.service.js +1 -1
  533. package/tenantStatistics/tenant-statistics.component.js +1 -1
  534. package/tenants/controllers/customProperties.js +1 -1
  535. package/tenants/controllers/detail.js +1 -1
  536. package/tenants/index.js +1 -1
  537. package/trackerConfiguration/controllers/trackerConfiguration.controller.js +1 -1
  538. package/trackerConfiguration/index.js +1 -1
  539. package/trackerConfiguration/services/realtimeLockup.service.js +1 -1
  540. package/trackerConfiguration/services/trackerLocation.service.js +1 -1
  541. package/trackerModels/trackerModels.service.js +1 -1
  542. package/trackerRegistration/index.js +1 -1
  543. package/trackerRegistration/trackerRegistration.controller.js +1 -1
  544. package/trackerRegistration/trackerRegistrationHistory.service.js +1 -1
  545. package/trackingAppConfig/index.js +1 -1
  546. package/trafficLightWidget/states-mapping.component.js +1 -1
  547. package/trafficLightWidget/traffic-light.component.js +1 -1
  548. package/userRoles/inventoryRoleSelector/inventoryRoleSelector.component.js +1 -1
  549. package/userRoles/inventoryRolesTab/inventoryRolesTab.component.js +1 -1
  550. package/userRoles/rolesAssetTree/rolesAssetTree.component.js +1 -1
  551. package/userRoles/userRoles.service.js +1 -1
  552. package/userRoles/userRolesUi.service.js +1 -1
  553. package/users/aclEditor/aclEditor.directive.js +1 -1
  554. package/users/applicationAccess/applicationAccess.directive.js +1 -1
  555. package/users/userDetailView/userApplicationAccess.component.js +1 -1
  556. package/users/userDetailView/userDetailView.component.js +1 -1
  557. package/users/userListView/userListView.component.js +1 -1
  558. package/users/usersUi.provider.js +1 -1
@@ -1 +1 @@
1
- "use strict";angular.module("c8y.modbusWidgets").controller("modbusWidgetCtrl",["$scope","$q","$timeout","c8yBase","c8yDevices","c8yDeviceDatabase","c8yModbusDevice","c8yDeviceControl","c8yAlert","c8yRealtime","modbusWidgetSvc","gettext","gettextCatalog",function(t,n,i,u,a,c,o,e,r,l,s,d,m){var g,f,h,v,y="/managedobjects",p=d("Value out of range. Allowed values from {{min | number}} to {{max | number}} with step {{step | number}}. Use up/down arrows to find nearest possible value."),b=[];function C(e){return"".concat(y,"/").concat(e.id)}function E(e){g=e,(t.device=g)&&g.id&&(l.addListener(t.$id,C(g),l.realtimeActions().UPDATE,S),l.getStatus(t.$id,C(g))||l.switchRealtime(t.$id,C(g)))}function S(e,t){g.id===t.id&&(g.c8y_CoilStatus=_.assign(g.c8y_CoilStatus||{},t.c8y_CoilStatus),g.c8y_RegisterStatus=_.assign(g.c8y_RegisterStatus||{},t.c8y_RegisterStatus),O(),I())}function V(e){return e?(f=e,t.deviceType=f,e):n.reject()}function w(){h=_(f.c8y_Coils).filter(D).map(c.addDiscreteIOMeta||c.addCoilMeta).value(),t.coils=h}function D(e){return s.isDiscreteIOSelectedInConfig(e,t.child.config)}function R(){v=_(f.c8y_Registers).filter($).map(c.addRegisterMeta).value(),t.registers=v}function $(e){return s.isRegisterSelectedInConfig(e,t.child.config)}function T(){var e=[].concat(h).concat(v);t.categories=_.groupBy(e,j)}function j(e){return e.category||""}function O(){_.forEach(h,function(e){U(e)||(e.valueObj=_.find(e.meta.enumValues,{value:o.getCurrentElementValue(g,e)}))})}function I(){_.forEach(v,function(e){U(e)||(e.meta.enumType?e.valueObj=_.find(e.meta.enumValues,{value:o.getCurrentElementValue(g,e)}):(e.valueObj=e.valueObj||{},e.valueObj.value=o.getCurrentElementValue(g,e)))})}function U(e){return o.isElementChangePending(e)||_.includes(b,e)}t.canUpdateElement=o.canUpdateElement,t.isElementChangePending=o.isElementChangePending,t.getCurrentElementValue=o.getCurrentElementValue,t.updateElement=function(e,t,n){o.updateElement(e,t,n)},t.shouldShowSwitch=function(e){return e.meta.enumType&&e.meta.enumValues&&2===e.meta.enumValues.length},t.shouldShowEnumSelect=function(e){return e.meta.enumType&&e.meta.enumValues&&(1===e.meta.enumValues.length||2<e.meta.enumValues.length)},t.shouldShowNumberInput=function(e){return!e.meta.enumType},t.validationHints=function(e,t){return o.canUpdateElement(g,t)?u.validationHints(e,{required:d("This field is required."),"value-in-register-range":m.getString(p,t&&t.meta&&t.meta.valuesRange.custom)}):""},t.focus=function(e){b.push(e)},t.blur=function(e){var t;b=_.without(b,e),i(O,t=500),i(I,t)},t.$watch("child.config",function(){var e=a.detail(t.child.config.device.id).then(u.getResData);e.then(E),e.then(c.getDeviceTypeFromDevice).then(V).then(w).then(O).then(R).then(I).then(T)}),t.$on("$destroy",function(){g&&g.id&&l.destroySubscription(t.$id,C(g))})}]);
1
+ "use strict";angular.module("c8y.modbusWidgets").controller("modbusWidgetCtrl",["$scope","$q","$timeout","c8yBase","c8yDevices","c8yDeviceDatabase","c8yModbusDevice","c8yDeviceControl","c8yAlert","c8yRealtime","modbusWidgetSvc","gettext","gettextCatalog",function(t,n,i,u,a,c,o,e,r,l,s,d,m){var g,f,h,v,y="/managedobjects",p=d("Value out of range. Allowed values from {{min | number}} to {{max | number}} with step {{step | number}}. Use up/down arrows to find nearest possible value."),b=[];function C(e){return"".concat(y,"/").concat(e.id)}function E(e){g=e,(t.device=g)&&g.id&&(l.addListener(t.$id,C(g),l.realtimeActions().UPDATE,S),l.getStatus(t.$id,C(g))||l.switchRealtime(t.$id,C(g)))}function S(e,t){g.id===t.id&&(g.c8y_CoilStatus=_.assign(g.c8y_CoilStatus||{},t.c8y_CoilStatus),g.c8y_RegisterStatus=_.assign(g.c8y_RegisterStatus||{},t.c8y_RegisterStatus),O(),I())}function V(e){return e?(f=e,t.deviceType=f,e):n.reject()}function w(){h=_(f.c8y_Coils).filter(D).map(c.addDiscreteIOMeta||c.addCoilMeta).value(),t.coils=h}function D(e){return s.isDiscreteIOSelectedInConfig(e,t.child.config)}function R(){v=_(f.c8y_Registers).filter($).map(c.addRegisterMeta).value(),t.registers=v}function $(e){return s.isRegisterSelectedInConfig(e,t.child.config)}function T(){var e=[].concat(h).concat(v);t.categories=_.groupBy(e,j)}function j(e){return e.category||""}function O(){_.forEach(h,function(e){U(e)||(e.valueObj=_.find(e.meta.enumValues,{value:o.getCurrentElementValue(g,e)}))})}function I(){_.forEach(v,function(e){U(e)||(e.meta.enumType?e.valueObj=_.find(e.meta.enumValues,{value:o.getCurrentElementValue(g,e)}):(e.valueObj=e.valueObj||{},e.valueObj.value=o.getCurrentElementValue(g,e)))})}function U(e){return o.isElementChangePending(e)||_.includes(b,e)}t.canUpdateElement=o.canUpdateElement,t.isElementChangePending=o.isElementChangePending,t.getCurrentElementValue=o.getCurrentElementValue,t.updateElement=function(e,t,n){o.updateElement(e,t,n)},t.shouldShowSwitch=function(e){return e.meta.enumType&&e.meta.enumValues&&2===e.meta.enumValues.length},t.shouldShowEnumSelect=function(e){return e.meta.enumType&&e.meta.enumValues&&(1===e.meta.enumValues.length||2<e.meta.enumValues.length)},t.shouldShowNumberInput=function(e){return!e.meta.enumType},t.validationHints=function(e,t){return o.canUpdateElement(g,t)?u.validationHints(e,{required:d("This field is required."),"value-in-register-range":m.getString(p,t&&t.meta&&t.meta.valuesRange.custom)}):""},t.focus=function(e){b.push(e)},t.blur=function(e){b=_.without(b,e),i(O,e=500),i(I,e)},t.$watch("child.config",function(){var e=a.detail(t.child.config.device.id).then(u.getResData);e.then(E),e.then(c.getDeviceTypeFromDevice).then(V).then(w).then(O).then(R).then(I).then(T)}),t.$on("$destroy",function(){g&&g.id&&l.destroySubscription(t.$id,C(g))})}]);
@@ -1 +1 @@
1
- "use strict";!function(){function e(t,e,s,n,c,u,r){var i=e.deviceId;function o(i){u.getDeviceTypeFromDevice(i).then(function(e){i.c8y_ModbusDevice&&function(e){t.discreteIOs=[],t.discreteInputs=[],t.discreteOutputs=[],e&&e.c8y_Coils&&_.forEach(e.c8y_Coils,function(e){e.statusMapping&&e.statusMapping.status&&(_.assign(e,{selected:function(e){return r.isDiscreteIOSelectedInConfig(e,t.config)}(e)}),t.discreteIOs.push(e),e.input?t.discreteInputs.push(e):t.discreteOutputs.push(e))})}(e),function(e){t.registers=[],t.inputRegisters=[],t.holdingRegisters=[],e&&e.c8y_Registers&&_.forEach(e.c8y_Registers,function(e){e.statusMapping&&e.statusMapping.status&&(_.assign(e,{selected:function(e){return r.isRegisterSelectedInConfig(e,t.config)}(e)}),t.registers.push(e),e.input?t.inputRegisters.push(e):t.holdingRegisters.push(e))})}(e),t.showOnlyHoldingRegisters=!i.c8y_ModbusDevice,t.isOPCUADevice=i.c8y_OPCUADevice||i.c8y_OPCUAGateway,g()})}function g(){var e=t.config.coils&&t.config.registers&&0<t.config.coils.length+t.config.registers.length;t.forms.componentForm.fieldsControl.$setValidity("fields_selected",e)}t.deviceId=i,t.updateFields=function(){t.config.coils=_(t.discreteIOs).filter({selected:!0}).map(function(e){return e.id||[e.input,e.number].join(",")}).value(),t.config.registers=_(t.registers).filter({selected:!0}).map(function(e){return e.id||[e.input,e.number,e.startBit].join(",")}).value(),g()},t.$watch("config.device",function(e){e&&function(e){var i=e.id||e;return u.isFieldbusDevice(e)?s.when(e):c.detail(i).then(n.getResData)}(e).then(o)})}e.$inject=["$scope","$routeParams","$q","c8yBase","c8yDevices","c8yDeviceDatabase","modbusWidgetSvc"],angular.module("c8y.modbusWidgets").controller("modbusWidgetConfigCtrl",e)}();
1
+ "use strict";!function(){function e(t,e,s,n,c,o,r){e=e.deviceId;function u(s){o.getDeviceTypeFromDevice(s).then(function(e){var i;s.c8y_ModbusDevice&&(i=e,t.discreteIOs=[],t.discreteInputs=[],t.discreteOutputs=[],i)&&i.c8y_Coils&&_.forEach(i.c8y_Coils,function(e){e.statusMapping&&e.statusMapping.status&&(_.assign(e,{selected:r.isDiscreteIOSelectedInConfig(e,t.config)}),t.discreteIOs.push(e),(e.input?t.discreteInputs:t.discreteOutputs).push(e))}),i=e,t.registers=[],t.inputRegisters=[],t.holdingRegisters=[],i&&i.c8y_Registers&&_.forEach(i.c8y_Registers,function(e){e.statusMapping&&e.statusMapping.status&&(_.assign(e,{selected:r.isRegisterSelectedInConfig(e,t.config)}),t.registers.push(e),(e.input?t.inputRegisters:t.holdingRegisters).push(e))}),t.showOnlyHoldingRegisters=!s.c8y_ModbusDevice,t.isOPCUADevice=s.c8y_OPCUADevice||s.c8y_OPCUAGateway,g()})}function g(){var e=t.config.coils&&t.config.registers&&0<t.config.coils.length+t.config.registers.length;t.forms.componentForm.fieldsControl.$setValidity("fields_selected",e)}t.deviceId=e,t.updateFields=function(){t.config.coils=_(t.discreteIOs).filter({selected:!0}).map(function(e){return e.id||[e.input,e.number].join(",")}).value(),t.config.registers=_(t.registers).filter({selected:!0}).map(function(e){return e.id||[e.input,e.number,e.startBit].join(",")}).value(),g()},t.$watch("config.device",function(e){var i;e&&(i=(e=e).id||e,(o.isFieldbusDevice(e)?s.when(e):c.detail(i).then(n.getResData)).then(u))})}e.$inject=["$scope","$routeParams","$q","c8yBase","c8yDevices","c8yDeviceDatabase","modbusWidgetSvc"],angular.module("c8y.modbusWidgets").controller("modbusWidgetConfigCtrl",e)}();
@@ -1 +1 @@
1
- "use strict";angular.module("c8y.modbusWidgets").factory("modbusWidgetSvc",function(){return{isDiscreteIOSelectedInConfig:function(e,i){var n=_.includes(i.coils,e.id);return n||(n=_.includes(i.coils,[e.input,e.number].join(","))),n||(n=_.includes(i.coils,e.number)),n},isRegisterSelectedInConfig:function(i,e){var n=_.includes(e.registers,i.id);return n||(n=_.includes(e.registers,[i.input,i.number,i.startBit].join(","))),n||(n=_.includes(e.registers,i.number)),n||(n=!!_.find(e.registers,function(e){return e.number===i.number&&e.startBit===i.startBit})),n}}});
1
+ "use strict";angular.module("c8y.modbusWidgets").factory("modbusWidgetSvc",function(){return{isDiscreteIOSelectedInConfig:function(e,i){var n=_.includes(i.coils,e.id);return n=(n=n||_.includes(i.coils,[e.input,e.number].join(",")))||_.includes(i.coils,e.number)},isRegisterSelectedInConfig:function(i,e){var n=_.includes(e.registers,i.id);return n=(n=(n=n||_.includes(e.registers,[i.input,i.number,i.startBit].join(",")))||_.includes(e.registers,i.number))||!!_.find(e.registers,function(e){return e.number===i.number&&e.startBit===i.startBit})}}});
@@ -1 +1 @@
1
- "use strict";!function(){function n(n,t){var e=this;_.assign(e,{emailAddresses:t("Email addresses"),tooltip:t("Download list of emails for users subscribed for newsletter on current tenant and its subtenants."),loading:!1,download:function(){if(e.loading)return;e.loading=!0,n.download().finally(function(){e.loading=!1})},getIcon:function(){return e.loading?"spinner":"download"}})}n.$inject=["NewsletterService","gettext"],angular.module("c8y.newsletter").component("c8yDownloadEmailsList",{controller:n,controllerAs:"vm",template:'<a href="" class="btn btn-link pull-right" ng-click="vm.download()" uib-tooltip="{{vm.tooltip | translate}}"><i c8y-icon="{{vm.getIcon()}}"></i> {{vm.emailAddresses | translate}}</a>'})}();
1
+ "use strict";!function(){function n(n,t){var e=this;_.assign(e,{emailAddresses:t("Email addresses"),tooltip:t("Download list of emails for users subscribed for newsletter on current tenant and its subtenants."),loading:!1,download:function(){e.loading||(e.loading=!0,n.download().finally(function(){e.loading=!1}))},getIcon:function(){return e.loading?"spinner":"download"}})}n.$inject=["NewsletterService","gettext"],angular.module("c8y.newsletter").component("c8yDownloadEmailsList",{controller:n,controllerAs:"vm",template:'<a href="" class="btn btn-link pull-right" ng-click="vm.download()" uib-tooltip="{{vm.tooltip | translate}}"><i c8y-icon="{{vm.getIcon()}}"></i> {{vm.emailAddresses | translate}}</a>'})}();
@@ -1 +1 @@
1
- "use strict";angular.module("c8y.parts.oauth").controller("OAuthCtrl",["$scope","$location","$window","$http","c8ySettings","c8yAuth","c8yUser","c8yTitle","c8yAlert","gettext",function(r,t,e,o,c,n,a,i,u,d){var l=t.search(),s=t.host(),h="developer.cumulocity.com",p=t.protocol(),f=t.port(),y=a.current(),g=e.location.pathname,k=null;function v(t){var e=t.data;r.token=e.value}function m(t){var e=t.data;u.danger("".concat(e.error,": ").concat(e.error_description))}function T(e){return _.keys(e).map(function(t){return"".concat(t,"=").concat(e[t])}).join("&")}function w(t){var e={},n=[],o="redirect"===t?h:s,r=80!==parseInt(f,10)&&443!==parseInt(f,10)?":".concat(f):"",c="".concat(p,"://").concat(o).concat(r);return e.tenant_id=k,"login"===t&&(_.assign(e,{redirect_uri:w("redirect"),response_type:"code"}),n=[c,"/tenant/oauth?",T(e)]),"token"===t&&(n=[c,"/tenant/oauth?"]),"redirect"===t&&(n=[c,g,"%23/oauth"]),n.join("")}function O(){return w("login")}y.then(function(t){k=t.tenant,l.code?function(t){var e=w("token"),n={redirect_uri:w("redirect"),grant_type:"authorization_code",code:t};n.tenant_id=k,o({method:"POST",url:e,data:T(n),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){var e=t.data;e.refresh_token&&function(n){var o="paypal";c.list().then(function(t){var e="createOption";(t||[]).forEach(function(t){return t.category!==o||!(e="updateOption")}),c[e]({category:o,key:"refreshToken",value:n}).then(function(){r.token=n,r.$emit("message",{type:"success",text:d("Token saved.")})})})}(e.refresh_token)},m)}(l.code):c.detail({category:"paypal",key:"refreshToken"}).then(v),r.getLoginUrl=O}),i.changeTitle({title:d("OAuth")})}]);
1
+ "use strict";angular.module("c8y.parts.oauth").controller("OAuthCtrl",["$scope","$location","$window","$http","c8ySettings","c8yAuth","c8yUser","c8yTitle","c8yAlert","gettext",function(r,t,e,n,c,o,a,i,u,d){var l=t.search(),s=t.host(),h=t.protocol(),p=t.port(),t=a.current(),y=e.location.pathname,f=null;function g(t){t=t.data;r.token=t.value}function k(t){t=t.data;u.danger("".concat(t.error,": ").concat(t.error_description))}function m(e){return _.keys(e).map(function(t){return"".concat(t,"=").concat(e[t])}).join("&")}function v(t){var e={},n=[],o="redirect"===t?"developer.cumulocity.com":s,r=80!==parseInt(p,10)&&443!==parseInt(p,10)?":".concat(p):"",o="".concat(h,"://").concat(o).concat(r);return e.tenant_id=f,"login"===t&&(_.assign(e,{redirect_uri:v("redirect"),response_type:"code"}),n=[o,"/tenant/oauth?",m(e)]),"token"===t&&(n=[o,"/tenant/oauth?"]),(n="redirect"===t?[o,y,"%23/oauth"]:n).join("")}function T(){return v("login")}t.then(function(t){var e;f=t.tenant,l.code?(t=l.code,e=v("token"),(t={redirect_uri:v("redirect"),grant_type:"authorization_code",code:t}).tenant_id=f,n({method:"POST",url:e,data:m(t),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){var n,o,t=t.data;t.refresh_token&&(n=t.refresh_token,o="paypal",c.list().then(function(t){var e="createOption";(t||[]).forEach(function(t){return t.category!==o||!(e="updateOption")}),c[e]({category:o,key:"refreshToken",value:n}).then(function(){r.token=n,r.$emit("message",{type:"success",text:d("Token saved.")})})}))},k)):c.detail({category:"paypal",key:"refreshToken"}).then(g),r.getLoginUrl=T}),i.changeTitle({title:d("OAuth")})}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1018.347.0",
3
+ "version": "1018.348.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -55,7 +55,7 @@
55
55
  "fs-extra": "^11.1.0",
56
56
  "npm-packlist": "1.1.11",
57
57
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
58
- "uglify-js": "3.5.3"
58
+ "uglify-js": "3.17.4"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "rimraf dist && node build.js"
@@ -1 +1 @@
1
- "use strict";!function(){function n(t,n,o,i,r){var e,a=this;function u(){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:function(){return u()},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(u).then(_.partial(i.success,r("Configuration saved.")))},cancel:function(){return u().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
+ "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 +1 @@
1
- "use strict";!function(){function e(e,t,n){y.$inject=["$q","c8yBase","c8ySettings","c8yPermissions","c8yTenant","gettextCatalog"];var i={path:"configuration",icon:"sliders",view:{template:"<c8y-platform-configuration-form></c8y-platform-configuration-form>"},requiresAnyRole:["ROLE_OPTION_MANAGEMENT_READ"],showIf:["c8yTenant",function(e){return e.isCurrentUserTopTenant()}]},p="configuration",a={title:n("Passwords"),id:"passwordsOptions",items:["system.password.enforce.strength","system.password.limit.validity","system.password.history.size","system.password.green.min-length"]},r={title:n("Two-factor authentication"),id:"twoFactorAuthenticationOptions",items:["two-factor-authentication.token.sms.template"]},s={title:n("Support link"),id:"supportLinkOptions",items:["system.support.url"]},o={title:n("Password reset"),id:"passwordResetOptions",items:["passwordReset.sendNotificationToUnknownEmails","passwordReset.token.email.template","passwordReset.user.not.found.email.template","passwordReset.email.subject","passwordReset.success.email.template","passwordReset.invite.template"]},l={title:n("Support user"),id:"supportUserOptions",items:["system.support-user.enabled","system.support-user.validity-limit"]},m={title:n("Email server"),id:"emailServerOptions",items:["ui.email.protocolAndEncryption","email.host","email.port","email.username","credentials.email.password","email.from"]},c={title:n("Data export"),id:"dataExportOptions",items:["export.data.mail.subject","export.data.mail.text","export.data.mail.text.userunauthorized"]},d={title:n("Storage limit"),id:"storageLimitOptions",items:["storageLimit.warning.email.subject","storageLimit.warning.email.template","storageLimit.process.email.subject","storageLimit.process.email.template"]},u={title:n("Suspending tenants"),id:"suspendingTenantsOptions",items:["tenantSuspend.mail.sendtosuspended","tenantSuspend.mail.additional.address","tenantSuspend.mail.subject","tenantSuspend.mail.text"]},g=["credentials.email.password"],h=[a,r,s,o,l,m,c,d,u];return{$get:y,init:function(){f(),t.addNavigation({name:n("Configuration"),parent:n("Settings"),path:i.path,icon:i.icon,showIfPermissions:{anyRole:i.requiresAnyRole},showIf:i.showIf})},hookViews:f};function f(){e.when("/".concat(i.path),i.view)}function y(r,n,s,e,t,i){var o;return r.all({eeTenant:t.isEnterpriseEditionTenant(),managementTenant:t.isCurrentUserTopTenant()}).then(function(e){var t=e.eeTenant,n=e.managementTenant;o=t&&!n}),{getSchema:a,getForm:function(t){var n=t?[]:h;return _.forEach(h,function(e){_.includes(t,e.id)&&n.push(e)}),r.when(_.map(n,l))},getSchemaFormOptions:function(){return e.hasAnyRole(["ROLE_OPTION_MANAGEMENT_ADMIN"]).then(function(e){return{formDefaults:{readonly:!e}}})},getConfiguration:function(){return r.all({options:s.listAllBy(p),schema:a()}).then(function(e){var t=e.options,r=e.schema,i=_.transform(t,function(e,t){var n=t.key;e[n]=s.parseOptionRawValue(t.value);var i=e[n],a=_.get(r,["properties",n,"type"]);"string"===a&&_.isFunction(_.get(i,"toString"))&&(e[n]=i.toString())},{});return _.forEach(r.properties,function(e,t){var n=e.convertValueOnLoad;n&&(i[t]=n(i[t],i))}),i})},saveConfiguration:function(t,n){return a().then(function(e){return function(e,r,t){var i=_.cloneDeep(e);return _.forEach(t.properties,function(e,t){var n=e.convertValueOnSave;n&&(i[t]=n(i[t],i))}),_.forEach(t.properties,function(e,t){e.skipOnSave&&_.unset(i,t)}),_(i).map(function(e,t){var n,i=_.get(r,[t]),a=e;return _.isEqual(i,a)||(n={key:t,oldValue:i,newValue:a}),n}).filter().value()}(t,n,e)}).then(m)}};function a(){var e=i.getString("Use [Enter] or &lt;br&gt; tag to add a new line"),t="<br>".concat(e);return r.when({type:"object",properties:{"system.password.enforce.strength":{title:i.getString('Enforce "green" passwords for all users'),type:"boolean"},"system.password.limit.validity":{title:i.getString("Password validity limit (days)"),description:i.getString("The number of days a password may be valid before it must be reset; minimum value is 0, maximum value is 999999. Leave empty to use the value from the tenant options."),type:"number",minimum:0,maximum:999999},"system.password.history.size":{title:i.getString("Password history size"),description:i.getString("The number of times before the current password can be reused. Minimum value is 0, preset value is 10."),type:"number",minimum:0,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 10")}},"system.password.green.min-length":{title:i.getString('Minimal length of "green" password'),description:i.getString("The minimum number of characters which are required for a safe password. Minimum (and preset) value is 8, maximum value is 32. Leave empty to skip this constraint."),type:"number",minimum:8,maximum:32},"ui.email.protocolAndEncryption":{title:i.getString("Protocol and encryption"),type:"string",enum:["SMTP_PLAIN","SMTP_ENCRYPTED","SMTPS_ENCRYPTED"],"x-schema-form":{titleMap:[{value:"SMTP_PLAIN",name:i.getString("SMTP (no encryption)")},{value:"SMTP_ENCRYPTED",name:i.getString("SMTP (STARTTLS)")},{value:"SMTPS_ENCRYPTED",name:i.getString("SMTPS (SSL/TLS)")}]},convertValueOnLoad:function(e,t){var n=t["email.protocol"],i=t["email.connection.encrypted"]||!1;return"smtp"===n?i?"SMTP_ENCRYPTED":"SMTP_PLAIN":"smtps"===n?"SMTPS_ENCRYPTED":void 0},skipOnSave:!0},"email.protocol":{title:i.getString("Protocol"),type:"string",enum:["smtp","smtps"],"x-schema-form":{titleMap:[{value:"smtp",name:"SMTP"},{value:"smtps",name:"SMTPS"}]},convertValueOnSave:function(e,t){var n=t["ui.email.protocolAndEncryption"]||"",i=_.get(n.match(/^(.+?)_(.+?)$/),1);return i?_.toLower(i):i}},"email.connection.encrypted":{title:i.getString("Connection encrypted"),type:"boolean",convertValueOnSave:function(e,t){var n=t["ui.email.protocolAndEncryption"]||"";return"ENCRYPTED"===_.get(n.match(/^(.+?)_(.+?)$/),2)}},"email.host":{title:i.getString("Host"),type:"string","x-schema-form":{placeholder:"".concat(i.getString("e.g.")," localhost")}},"email.port":{title:i.getString("Port"),type:"number",minimum:1,maximum:65535,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 25")}},"email.username":{title:i.getString("Username"),type:"string"},"credentials.email.password":{title:i.getString("Password"),type:"string","x-schema-form":{type:"password"}},"email.from":{title:i.getString("Sender address"),type:"string","x-schema-form":{type:"email"}},"passwordReset.sendNotificationToUnknownEmails":{title:i.getString("Send notifications to unknown email addresses"),type:"boolean"},"passwordReset.email.subject":{title:i.getString("Email subject"),description:i.getString("Subject used for all password reset related emails"),type:"string"},"passwordReset.token.email.template":{title:i.getString("Password reset email template (when address is known)"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {token}, {username}, {email}. Whole link to reset password can be, for example: {tenant-domain}/apps/devicemanagement/index.html?token={token}&email={email}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.user.not.found.email.template":{title:i.getString("Password reset email template (when address is not known)"),description:"".concat(e),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.success.email.template":{title:i.getString("Password change confirmation email template"),description:"".concat(i.getString("Placeholders: {host}, {tenant-domain}, {username}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.invite.template":{title:i.getString("Invitation email template"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {token}, {username}, {email}. Whole link to setup password can be, for example: {tenant-domain}/apps/devicemanagement/index.html?token={token}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"export.data.mail.subject":{title:i.getString("Email subject"),description:i.getString("Placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to result file is: {tenant-domain}/inventory/binaries/{binaryId}"),type:"string"},"export.data.mail.text":{title:i.getString("Email template"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to result file is: {tenant-domain}/inventory/binaries/{binaryId}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"export.data.mail.text.userunauthorized":{title:i.getString("User unauthorized error message"),description:i.getString("Placeholders: {user}, {exportApi}"),type:"string"},"two-factor-authentication.token.sms.template":{title:i.getString("Verification token SMS template"),description:i.getString("Placeholder: {token} - created token"),type:"string","x-schema-form":{placeholder:i.getString("e.g.: Verification code: {token}")}},"system.support.url":{title:i.getString("URL"),type:"string",description:i.getString('Possible values: URL string, "false`KEEP_ORIGINAL`" (hides the link), leave empty (uses the default)')},"storageLimit.warning.email.subject":{title:i.getString("Warning email subject"),description:i.getString("Email which will be sent one day before data is deleted"),type:"string"},"storageLimit.warning.email.template":{title:i.getString("Warning email template"),description:"".concat(i.getString("Email which will be sent one day before data is deleted. Placeholders: {tenant-domain}, {tenant}, {size} - storage usage in %")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"storageLimit.process.email.subject":{title:i.getString("Limit exceeded email subject"),description:i.getString("Email which will be sent after over-limit data has been deleted"),type:"string"},"storageLimit.process.email.template":{title:i.getString("Limit exceeded email template"),description:"".concat(i.getString("Email which will be sent after over-limit data has been deleted. Placeholders: {tenant-domain}, {tenant}, {size} - storage usage in %")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"tenantSuspend.mail.sendtosuspended":{title:i.getString("Send email to suspended tenant's administrator"),type:"boolean"},"tenantSuspend.mail.additional.address":{title:i.getString("Tenant suspended email additional receiver"),type:"string","x-schema-form":{type:"email"}},"tenantSuspend.mail.subject":{title:i.getString("Tenant suspended email subject"),description:i.getString("Placeholder: {tenant} - suspended tenant's ID; {tenant-domain} - tenant's domain"),type:"string"},"tenantSuspend.mail.text":{title:i.getString("Tenant suspended email template"),description:"".concat(i.getString("Placeholder: {tenant} - suspended tenant's ID; {tenant-domain} - tenant's domain")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"system.support-user.enabled":{title:i.getString("Activate support user"),description:i.getString('Possible values: "true`KEEP_ORIGINAL`", "false`KEEP_ORIGINAL`", or a specific date until the user should remain active, for example, "{{ exampleDate }}". Leaving it blank, will set the value to "true`KEEP_ORIGINAL`".',{exampleDate:moment().add(1,"day").format(n.dateFullFormat)}),type:"string","x-schema-form":{placeholder:"".concat(i.getString("e.g."),": ").concat(moment().add(1,"day").format(n.dateFullFormat))}},"system.support-user.validity-limit":{title:i.getString("Validity limit"),description:i.getString('Each support user request from subtenant user will prolong support user access by the given number of hours (default: 24 hours). Leaving it blank, will set the value to "24".'),type:"number",minimum:0,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 24")}}}})}function l(e){var t={type:"section"};return _.assign(t,e),t.items=_.map(t.items,function(e){return{key:[e]}}),t.title=i.getString(t.title),t}function m(e){return _.reduce(e,function(e,t){var n=_.constant(r.when()),i=_.isNull(t.newValue),a=""===t.newValue;return i||a&&!function(e){return o&&g.includes(e)}(t.key)?_.isUndefined(t.oldValue)||(n=s.deleteOption):n=s.updateOption,e.then(_.partial(n,{category:p,key:t.key,value:t.newValue}))},r.when())}}}e.$inject=["c8yViewsProvider","c8yNavigatorProvider","gettext"],angular.module("c8y.platformConfiguration").provider("c8yPlatformConfigurationUi",e)}();
1
+ "use strict";!function(){function e(e,t,n){y.$inject=["$q","c8yBase","c8ySettings","c8yPermissions","c8yTenant","gettextCatalog"];var i={path:"configuration",icon:"sliders",view:{template:"<c8y-platform-configuration-form></c8y-platform-configuration-form>"},requiresAnyRole:["ROLE_OPTION_MANAGEMENT_READ"],showIf:["c8yTenant",function(e){return e.isCurrentUserTopTenant()}]},p="configuration",a={title:n("Passwords"),id:"passwordsOptions",items:["system.password.enforce.strength","system.password.limit.validity","system.password.history.size","system.password.green.min-length"]},r={title:n("Two-factor authentication"),id:"twoFactorAuthenticationOptions",items:["two-factor-authentication.token.sms.template"]},s={title:n("Support link"),id:"supportLinkOptions",items:["system.support.url"]},o={title:n("Password reset"),id:"passwordResetOptions",items:["passwordReset.sendNotificationToUnknownEmails","passwordReset.token.email.template","passwordReset.user.not.found.email.template","passwordReset.email.subject","passwordReset.success.email.template","passwordReset.invite.template"]},l={title:n("Support user"),id:"supportUserOptions",items:["system.support-user.enabled","system.support-user.validity-limit"]},m={title:n("Email server"),id:"emailServerOptions",items:["ui.email.protocolAndEncryption","email.host","email.port","email.username","credentials.email.password","email.from"]},c={title:n("Data export"),id:"dataExportOptions",items:["export.data.mail.subject","export.data.mail.text","export.data.mail.text.userunauthorized"]},d={title:n("Storage limit"),id:"storageLimitOptions",items:["storageLimit.warning.email.subject","storageLimit.warning.email.template","storageLimit.process.email.subject","storageLimit.process.email.template"]},u={title:n("Suspending tenants"),id:"suspendingTenantsOptions",items:["tenantSuspend.mail.sendtosuspended","tenantSuspend.mail.additional.address","tenantSuspend.mail.subject","tenantSuspend.mail.text"]},g=["credentials.email.password"],h=[a,r,s,o,l,m,c,d,u];return{$get:y,init:function(){f(),t.addNavigation({name:n("Configuration"),parent:n("Settings"),path:i.path,icon:i.icon,showIfPermissions:{anyRole:i.requiresAnyRole},showIf:i.showIf})},hookViews:f};function f(){e.when("/".concat(i.path),i.view)}function y(r,n,s,e,t,i){var o;return r.all({eeTenant:t.isEnterpriseEditionTenant(),managementTenant:t.isCurrentUserTopTenant()}).then(function(e){var t=e.eeTenant,e=e.managementTenant;o=t&&!e}),{getSchema:a,getForm:function(t){var n=t?[]:h;return _.forEach(h,function(e){_.includes(t,e.id)&&n.push(e)}),r.when(_.map(n,l))},getSchemaFormOptions:function(){return e.hasAnyRole(["ROLE_OPTION_MANAGEMENT_ADMIN"]).then(function(e){return{formDefaults:{readonly:!e}}})},getConfiguration:function(){return r.all({options:s.listAllBy(p),schema:a()}).then(function(e){var t=e.options,i=e.schema,n=_.transform(t,function(e,t){var n=t.key,t=(e[n]=s.parseOptionRawValue(t.value),e[n]);"string"===_.get(i,["properties",n,"type"])&&_.isFunction(_.get(t,"toString"))&&(e[n]=t.toString())},{});return _.forEach(i.properties,function(e,t){e=e.convertValueOnLoad;e&&(n[t]=e(n[t],n))}),n})},saveConfiguration:function(t,i){return a().then(function(e){return a=i,e=e,n=_.cloneDeep(t),_.forEach(e.properties,function(e,t){e=e.convertValueOnSave;e&&(n[t]=e(n[t],n))}),_.forEach(e.properties,function(e,t){e.skipOnSave&&_.unset(n,t)}),_(n).map(function(e,t){var n,i=_.get(a,[t]);return n=_.isEqual(i,e)?n:{key:t,oldValue:i,newValue:e}}).filter().value();var a,n}).then(m)}};function a(){var e=i.getString("Use [Enter] or &lt;br&gt; tag to add a new line"),t="<br>".concat(e);return r.when({type:"object",properties:{"system.password.enforce.strength":{title:i.getString('Enforce "green" passwords for all users'),type:"boolean"},"system.password.limit.validity":{title:i.getString("Password validity limit (days)"),description:i.getString("The number of days a password may be valid before it must be reset; minimum value is 0, maximum value is 999999. Leave empty to use the value from the tenant options."),type:"number",minimum:0,maximum:999999},"system.password.history.size":{title:i.getString("Password history size"),description:i.getString("The number of times before the current password can be reused. Minimum value is 0, preset value is 10."),type:"number",minimum:0,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 10")}},"system.password.green.min-length":{title:i.getString('Minimal length of "green" password'),description:i.getString("The minimum number of characters which are required for a safe password. Minimum (and preset) value is 8, maximum value is 32. Leave empty to skip this constraint."),type:"number",minimum:8,maximum:32},"ui.email.protocolAndEncryption":{title:i.getString("Protocol and encryption"),type:"string",enum:["SMTP_PLAIN","SMTP_ENCRYPTED","SMTPS_ENCRYPTED"],"x-schema-form":{titleMap:[{value:"SMTP_PLAIN",name:i.getString("SMTP (no encryption)")},{value:"SMTP_ENCRYPTED",name:i.getString("SMTP (STARTTLS)")},{value:"SMTPS_ENCRYPTED",name:i.getString("SMTPS (SSL/TLS)")}]},convertValueOnLoad:function(e,t){var n=t["email.protocol"],t=t["email.connection.encrypted"]||!1;return"smtp"===n?t?"SMTP_ENCRYPTED":"SMTP_PLAIN":"smtps"===n?"SMTPS_ENCRYPTED":void 0},skipOnSave:!0},"email.protocol":{title:i.getString("Protocol"),type:"string",enum:["smtp","smtps"],"x-schema-form":{titleMap:[{value:"smtp",name:"SMTP"},{value:"smtps",name:"SMTPS"}]},convertValueOnSave:function(e,t){t=t["ui.email.protocolAndEncryption"]||"",t=_.get(t.match(/^(.+?)_(.+?)$/),1);return t&&_.toLower(t)}},"email.connection.encrypted":{title:i.getString("Connection encrypted"),type:"boolean",convertValueOnSave:function(e,t){t=t["ui.email.protocolAndEncryption"]||"";return"ENCRYPTED"===_.get(t.match(/^(.+?)_(.+?)$/),2)}},"email.host":{title:i.getString("Host"),type:"string","x-schema-form":{placeholder:"".concat(i.getString("e.g.")," localhost")}},"email.port":{title:i.getString("Port"),type:"number",minimum:1,maximum:65535,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 25")}},"email.username":{title:i.getString("Username"),type:"string"},"credentials.email.password":{title:i.getString("Password"),type:"string","x-schema-form":{type:"password"}},"email.from":{title:i.getString("Sender address"),type:"string","x-schema-form":{type:"email"}},"passwordReset.sendNotificationToUnknownEmails":{title:i.getString("Send notifications to unknown email addresses"),type:"boolean"},"passwordReset.email.subject":{title:i.getString("Email subject"),description:i.getString("Subject used for all password reset related emails"),type:"string"},"passwordReset.token.email.template":{title:i.getString("Password reset email template (when address is known)"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {token}, {username}, {email}. Whole link to reset password can be, for example: {tenant-domain}/apps/devicemanagement/index.html?token={token}&email={email}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.user.not.found.email.template":{title:i.getString("Password reset email template (when address is not known)"),description:"".concat(e),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.success.email.template":{title:i.getString("Password change confirmation email template"),description:"".concat(i.getString("Placeholders: {host}, {tenant-domain}, {username}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"passwordReset.invite.template":{title:i.getString("Invitation email template"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {token}, {username}, {email}. Whole link to setup password can be, for example: {tenant-domain}/apps/devicemanagement/index.html?token={token}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"export.data.mail.subject":{title:i.getString("Email subject"),description:i.getString("Placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to result file is: {tenant-domain}/inventory/binaries/{binaryId}"),type:"string"},"export.data.mail.text":{title:i.getString("Email template"),description:"".concat(i.getString("Placeholders: {tenant-domain}, {host}, {binaryId}. Whole link to result file is: {tenant-domain}/inventory/binaries/{binaryId}")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"export.data.mail.text.userunauthorized":{title:i.getString("User unauthorized error message"),description:i.getString("Placeholders: {user}, {exportApi}"),type:"string"},"two-factor-authentication.token.sms.template":{title:i.getString("Verification token SMS template"),description:i.getString("Placeholder: {token} - created token"),type:"string","x-schema-form":{placeholder:i.getString("e.g.: Verification code: {token}")}},"system.support.url":{title:i.getString("URL"),type:"string",description:i.getString('Possible values: URL string, "false`KEEP_ORIGINAL`" (hides the link), leave empty (uses the default)')},"storageLimit.warning.email.subject":{title:i.getString("Warning email subject"),description:i.getString("Email which will be sent one day before data is deleted"),type:"string"},"storageLimit.warning.email.template":{title:i.getString("Warning email template"),description:"".concat(i.getString("Email which will be sent one day before data is deleted. Placeholders: {tenant-domain}, {tenant}, {size} - storage usage in %")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"storageLimit.process.email.subject":{title:i.getString("Limit exceeded email subject"),description:i.getString("Email which will be sent after over-limit data has been deleted"),type:"string"},"storageLimit.process.email.template":{title:i.getString("Limit exceeded email template"),description:"".concat(i.getString("Email which will be sent after over-limit data has been deleted. Placeholders: {tenant-domain}, {tenant}, {size} - storage usage in %")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"tenantSuspend.mail.sendtosuspended":{title:i.getString("Send email to suspended tenant's administrator"),type:"boolean"},"tenantSuspend.mail.additional.address":{title:i.getString("Tenant suspended email additional receiver"),type:"string","x-schema-form":{type:"email"}},"tenantSuspend.mail.subject":{title:i.getString("Tenant suspended email subject"),description:i.getString("Placeholder: {tenant} - suspended tenant's ID; {tenant-domain} - tenant's domain"),type:"string"},"tenantSuspend.mail.text":{title:i.getString("Tenant suspended email template"),description:"".concat(i.getString("Placeholder: {tenant} - suspended tenant's ID; {tenant-domain} - tenant's domain")).concat(t),type:"string","x-schema-form":{type:"textarea"}},"system.support-user.enabled":{title:i.getString("Activate support user"),description:i.getString('Possible values: "true`KEEP_ORIGINAL`", "false`KEEP_ORIGINAL`", or a specific date until the user should remain active, for example, "{{ exampleDate }}". Leaving it blank, will set the value to "true`KEEP_ORIGINAL`".',{exampleDate:moment().add(1,"day").format(n.dateFullFormat)}),type:"string","x-schema-form":{placeholder:"".concat(i.getString("e.g."),": ").concat(moment().add(1,"day").format(n.dateFullFormat))}},"system.support-user.validity-limit":{title:i.getString("Validity limit"),description:i.getString('Each support user request from subtenant user will prolong support user access by the given number of hours (default: 24 hours). Leaving it blank, will set the value to "24".'),type:"number",minimum:0,"x-schema-form":{placeholder:"".concat(i.getString("e.g.")," 24")}}}})}function l(e){var t={type:"section"};return _.assign(t,e),t.items=_.map(t.items,function(e){return{key:[e]}}),t.title=i.getString(t.title),t}function m(e){return _.reduce(e,function(e,t){var n=_.constant(r.when()),i=_.isNull(t.newValue),a=""===t.newValue;return i||a&&(i=t.key,!o||!g.includes(i))?_.isUndefined(t.oldValue)||(n=s.deleteOption):n=s.updateOption,e.then(_.partial(n,{category:p,key:t.key,value:t.newValue}))},r.when())}}}e.$inject=["c8yViewsProvider","c8yNavigatorProvider","gettext"],angular.module("c8y.platformConfiguration").provider("c8yPlatformConfigurationUi",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(e,t,r,i){var n="properties-library",o=i("Properties library"),a={parent:i("Settings"),name:o,routerLinkExact:!1,path:n,icon:"book-shelf",priority:1100},c="/".concat(n),l='<c8y-json-schema-objects-list filters="filters"></c8y-json-schema-objects-list>',s=[{name:i("Inventory"),icon:"cubes",template:l,controller:p({MANAGED_OBJECTS:!0}),priority:4e3},{name:i("Alarm"),icon:"bell",template:l,controller:p({ALARMS:!0}),priority:3e3},{name:i("Event"),icon:"c8y-events",template:l,controller:p({EVENTS:!0}),priority:2e3},{name:i("Tenant"),icon:"c8y-sub-tenants",template:l,controller:p({TENANTS:!0}),priority:1e3,showIfPermissions:{anyRole:["ROLE_TENANT_MANAGEMENT_READ"]}}];function p(t){var e=function(e){e.filters={appliesTo:t}};return e.$inject=["$scope"],e}e.addNavigation(a),t.addTitle(c,{data:_.constant({title:o})}),_.forEach(s,function(e){r.when(c,e)})}e.$inject=["c8yNavigatorProvider","c8yTitleProvider","c8yViewsProvider","gettext"],angular.module("c8y.propertiesLibrary",[]).config(e)}();
1
+ "use strict";!function(){function e(e,t,r,i){var n="properties-library",o=i("Properties library"),c={parent:i("Settings"),name:o,routerLinkExact:!1,path:n,icon:"book-shelf",priority:1100},a="/".concat(n),n='<c8y-json-schema-objects-list filters="filters"></c8y-json-schema-objects-list>',i=[{name:i("Inventory"),icon:"cubes",template:n,controller:l({MANAGED_OBJECTS:!0}),priority:4e3},{name:i("Alarm"),icon:"bell",template:n,controller:l({ALARMS:!0}),priority:3e3},{name:i("Event"),icon:"c8y-events",template:n,controller:l({EVENTS:!0}),priority:2e3},{name:i("Tenant"),icon:"c8y-sub-tenants",template:n,controller:l({TENANTS:!0}),priority:1e3,showIfPermissions:{anyRole:["ROLE_TENANT_MANAGEMENT_READ"]}}];function l(t){function e(e){e.filters={appliesTo:t}}return e.$inject=["$scope"],e}e.addNavigation(c),t.addTitle(a,{data:_.constant({title:o})}),_.forEach(i,function(e){r.when(a,e)})}e.$inject=["c8yNavigatorProvider","c8yTitleProvider","c8yViewsProvider","gettext"],angular.module("c8y.propertiesLibrary",[]).config(e)}();
@@ -1 +1 @@
1
- "use strict";angular.module("c8y.propertiesLibrary").component("c8yJsonSchemaObjectEditor",{bindings:{_jsonSchemaObject:"<jsonSchemaObject",onSave:"&",onRemove:"&",onCancel:"&"},templateUrl:":::PLUGIN_PATH:::/jsonSchemaObjectEditor.html",controller:function(){var o=this;_.assign(o,{$onChanges:function(e){e._jsonSchemaObject&&(o.jsonSchemaObject=_.cloneDeep(o._jsonSchemaObject))},onSchemaChange:function(e){if(o.jsonSchemaObject){var n=_.first(_.keys(e.properties)),c=_.get(e,["properties",n,"title"],"");_.set(o.jsonSchemaObject,"name",c),_.assign(o.jsonSchemaObject.c8y_JsonSchema,e)}},save:function(){o.onSave({jsonSchemaObject:o.jsonSchemaObject,originalJsonSchemaObject:o._jsonSchemaObject})},remove:function(){o.onRemove({jsonSchemaObject:o.jsonSchemaObject})},cancel:function(){o.onCancel()}})},controllerAs:"vm"});
1
+ "use strict";angular.module("c8y.propertiesLibrary").component("c8yJsonSchemaObjectEditor",{bindings:{_jsonSchemaObject:"<jsonSchemaObject",onSave:"&",onRemove:"&",onCancel:"&"},templateUrl:":::PLUGIN_PATH:::/jsonSchemaObjectEditor.html",controller:function(){var c=this;_.assign(c,{$onChanges:function(e){e._jsonSchemaObject&&(c.jsonSchemaObject=_.cloneDeep(c._jsonSchemaObject))},onSchemaChange:function(e){var n;c.jsonSchemaObject&&(n=_.first(_.keys(e.properties)),n=_.get(e,["properties",n,"title"],""),_.set(c.jsonSchemaObject,"name",n),_.assign(c.jsonSchemaObject.c8y_JsonSchema,e))},save:function(){c.onSave({jsonSchemaObject:c.jsonSchemaObject,originalJsonSchemaObject:c._jsonSchemaObject})},remove:function(){c.onRemove({jsonSchemaObject:c.jsonSchemaObject})},cancel:function(){c.onCancel()}})},controllerAs:"vm"});
@@ -1 +1 @@
1
- "use strict";!function(){function e(n,t,c,s,r){var i=this;function o(){return t.list().then(e).then(function(e){i.jsonSchemaObjects=e})}function e(e){return _.filter(e,i.filters)}function a(e){i.selected=e}function u(){i.selected=void 0}_.assign(i,{$onInit:function(){o()},select:a,deselect:u,newJsonSchemaObject:function(){a(_.assign(t.getDefaults(),i.filters))},save:function(e){return t.save(e).then(u).then(o).then(_.partial(c.success,r("Property saved.")))},remove:function(e){return t.remove(e).then(u).then(o).then(_.partial(c.success,r("Property deleted.")))},getIcon:function(){var e=n.path(),t=_.find(s.getTabsByURL(e),{path:e});return _.get(t,"icon")},getName:function(){var e=n.path(),t=_.find(s.getTabsByURL(e),{path:e});return _.get(t,"name")}})}e.$inject=["$location","c8yJsonSchemas","c8yAlert","c8yTabs","gettext"],angular.module("c8y.propertiesLibrary").component("c8yJsonSchemaObjectsList",{bindings:{filters:"<"},templateUrl:":::PLUGIN_PATH:::/jsonSchemaObjectsList.html",controller:e,controllerAs:"vm"})}();
1
+ "use strict";!function(){function e(t,n,c,s,r){var i=this;function o(){return n.list().then(e).then(function(e){i.jsonSchemaObjects=e})}function e(e){return _.filter(e,i.filters)}function a(e){i.selected=e}function u(){i.selected=void 0}_.assign(i,{$onInit:function(){o()},select:a,deselect:u,newJsonSchemaObject:function(){a(_.assign(n.getDefaults(),i.filters))},save:function(e){return n.save(e).then(u).then(o).then(_.partial(c.success,r("Property saved.")))},remove:function(e){return n.remove(e).then(u).then(o).then(_.partial(c.success,r("Property deleted.")))},getIcon:function(){var e=t.path(),e=_.find(s.getTabsByURL(e),{path:e});return _.get(e,"icon")},getName:function(){var e=t.path(),e=_.find(s.getTabsByURL(e),{path:e});return _.get(e,"name")}})}e.$inject=["$location","c8yJsonSchemas","c8yAlert","c8yTabs","gettext"],angular.module("c8y.propertiesLibrary").component("c8yJsonSchemaObjectsList",{bindings:{filters:"<"},templateUrl:":::PLUGIN_PATH:::/jsonSchemaObjectsList.html",controller:e,controllerAs:"vm"})}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(t,e,n,r,o,c,a){var d,i,u=e.deviceId,l=e.routeId,C=u||l,p=null;function q(e){d=e,t.qrCodeTemplate=d}function s(){return o.detailCached(C).then(r.getResData)}function f(e){p=e,t.data=p}t.print=function(){a.print([p],d)},((i=l?c.qrCodeTypes.ROUTE:!!u&&c.qrCodeTypes.DEVICE)?c.getTemplate(i):n.reject()).then(q).then(s).then(f)}e.$inject=["$scope","$routeParams","$q","c8yBase","c8yInventory","qrCodeTemplate","qrCodePrinter"],angular.module("c8y.qrCode").controller("qrCodeCtrl",e)}();
1
+ "use strict";!function(){function e(t,e,n,r,o,u,c){var i,a=e.deviceId,d=e.routeId,f=a||d,l=null;function C(e){i=e,t.qrCodeTemplate=i}function p(){return o.detailCached(f).then(r.getResData)}function q(e){l=e,t.data=l}t.print=function(){c.print([l],i)},function(){var e=function(){if(d)return u.qrCodeTypes.ROUTE;if(a)return u.qrCodeTypes.DEVICE;return!1}();if(e)return u.getTemplate(e);return n.reject()}().then(C).then(p).then(q)}e.$inject=["$scope","$routeParams","$q","c8yBase","c8yInventory","qrCodeTemplate","qrCodePrinter"],angular.module("c8y.qrCode").controller("qrCodeCtrl",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(o,r,i,d,l,a){return{getQrCodeCompiledHtml:u,print:function(e,t){var n=u(e,t),o=i.open("","_blank","width=800,height=600"),r=o&&o.document;if(o.opener=null,!r)return void l.danger(a("Popup window failed to open. Please confirm your browser settings."));r.open(),r.write('<html><head></head><body id="body"></body></html>'),r.close(),angular.element(r.getElementById("body")).append(n),d(function(){o.print()})}};function u(e,t){var n=o.$new();return n.data=e,r(angular.element(t))(n)}}e.$inject=["$rootScope","$compile","$window","$timeout","c8yAlert","gettext"],angular.module("c8y.qrCode").factory("qrCodePrinter",e)}();
1
+ "use strict";!function(){function e(o,r,i,d,l,a){return{getQrCodeCompiledHtml:u,print:function(e,t){var e=u(e,t),n=i.open("","_blank","width=800,height=600"),t=n&&n.document;n.opener=null,t?(t.open(),t.write('<html><head></head><body id="body"></body></html>'),t.close(),angular.element(t.getElementById("body")).append(e),d(function(){n.print()})):l.danger(a("Popup window failed to open. Please confirm your browser settings."))}};function u(e,t){var n=o.$new();return n.data=e,r(angular.element(t))(n)}}e.$inject=["$rootScope","$compile","$window","$timeout","c8yAlert","gettext"],angular.module("c8y.qrCode").factory("qrCodePrinter",e)}();
@@ -1 +1 @@
1
- "use strict";angular.module("c8y.qrCode").factory("qrCodeTemplate",["$cacheFactory","$http","c8yBase","c8yInventory",function(e,t,r,a){var c=e("QrCodeTemplatesCache");return{qrCodeTypes:{ROUTE:"c8y_RouteQrCodeTemplate",DEVICE:"c8y_DeviceQrCodeTemplate"},getTemplate:function(e){if(!c.get(e)){var t=a.list({type:e,pageSize:1}).then(function(e){return 0<e.length?e[0].template:null});c.put(e,t)}return c.get(e)}}}]);
1
+ "use strict";angular.module("c8y.qrCode").factory("qrCodeTemplate",["$cacheFactory","$http","c8yBase","c8yInventory",function(e,t,r,a){var c=e("QrCodeTemplatesCache");return{qrCodeTypes:{ROUTE:"c8y_RouteQrCodeTemplate",DEVICE:"c8y_DeviceQrCodeTemplate"},getTemplate:function(e){var t;return c.get(e)||(t=a.list({type:e,pageSize:1}).then(function(e){return 0<e.length?e[0].template:null}),c.put(e,t)),c.get(e)}}}]);
@@ -1 +1 @@
1
- "use strict";!function(){function e(a,n){return{relay:function(e,t,r){var c={deviceId:e,c8y_Relay:{id:t,relayState:r?"CLOSED":"OPEN"},description:n(r?"Close relay.":"Open relay.")};return a.create(c)}}}e.$inject=["c8yDeviceControl","gettext"],angular.module("c8y.relayWidget").factory("relayWidgetSvc",e)}();
1
+ "use strict";!function(){function e(c,n){return{relay:function(e,t,r){return e={deviceId:e,c8y_Relay:{id:t,relayState:r?"CLOSED":"OPEN"},description:n(r?"Close relay.":"Open relay.")},c.create(e)}}}e.$inject=["c8yDeviceControl","gettext"],angular.module("c8y.relayWidget").factory("relayWidgetSvc",e)}();
@@ -1 +1 @@
1
- "use strict";function RemoteAccessClientsService(e,t){var n,s;this.STATUSES={CONNECTING:"CONNECTING",CONNECTED:"CONNECTED",DISCONNECTED:"DISCONNECTED",ERROR:"ERROR"},this.getConnectionStatus=function(){return s.status||this.STATUSES.DISCONNECTED},this.setConnectionStatus=function(e){s.status=e,t.setItem(n,JSON.stringify(s))},this.getParams=function(){return s},this.loadCss=function(e){var t=document.createElement("link");t.href=e,t.type="text/css",t.rel="stylesheet",t.media="screen,print",document.getElementsByTagName("head")[0].appendChild(t)},this.loadJs=function(e){var t=document.createElement("script");t.src=e,document.getElementsByTagName("head")[0].appendChild(t)},n=function(e){var t,n={},s=/[?&]?([^=]+)=([^&]*)/g;for(e=e.split("+").join(" ");t=s.exec(e);){var a=t[1],c=t[2];n[decodeURIComponent(a)]=decodeURIComponent(c)}return n}(e.search).paramsId;try{s=JSON.parse(t.getItem(n))}catch(e){console.err("Cannot load connection parameters!")}}
1
+ "use strict";function RemoteAccessClientsService(e,t){var n,s;this.STATUSES={CONNECTING:"CONNECTING",CONNECTED:"CONNECTED",DISCONNECTED:"DISCONNECTED",ERROR:"ERROR"},this.getConnectionStatus=function(){return s.status||this.STATUSES.DISCONNECTED},this.setConnectionStatus=function(e){s.status=e,t.setItem(n,JSON.stringify(s))},this.getParams=function(){return s},this.loadCss=function(e){var t=document.createElement("link");t.href=e,t.type="text/css",t.rel="stylesheet",t.media="screen,print",document.getElementsByTagName("head")[0].appendChild(t)},this.loadJs=function(e){var t=document.createElement("script");t.src=e,document.getElementsByTagName("head")[0].appendChild(t)},n=function(e){var t={},n=/[?&]?([^=]+)=([^&]*)/g;for(e=e.split("+").join(" ");a=n.exec(e);){var s=a[1],a=a[2];t[decodeURIComponent(s)]=decodeURIComponent(a)}return t}(e.search).paramsId;try{s=JSON.parse(t.getItem(n))}catch(e){console.err("Cannot load connection parameters!")}}
@@ -1 +1 @@
1
- "use strict";!function(){var c,r,a=!1;window.onload=function(){var e=document.getElementById("terminal"),t=new Terminal({fontSize:18,fontFamily:"consolas, monospace",cursorBlink:!0,cols:terminalSize.cols,rows:terminalSize.rows}),n=new FitAddon.FitAddon;t.loadAddon(n);var i=new ShellAdapter;i.setTermType("xterm-256color");var o=clientService.getParams();o?(clientService.setConnectionStatus(clientService.STATUSES.CONNECTING),document.title=unescape(o.title),c=o.wsProtocol+"//"+o.host+"/"+o.path,t.open(e),n.fit(),t.focus(),setTimeout(function(){(r=new WebSocket(c,"binary")).binaryType="arraybuffer",r.onopen=function(){t.writeln("Websocket connection was established successfully, waiting for device...  \r\n")},r.onclose=function(){t.writeln(""),t.writeln("\r\nDevice disconnected.  \r\n"),t.writeln("\r\nWebsocket connection was closed.  \r\n"),clientService.setConnectionStatus(clientService.STATUSES.ERROR)},r.onmessage=function(e){e.data&&clientService.getConnectionStatus()===clientService.STATUSES.CONNECTING&&clientService.setConnectionStatus(clientService.STATUSES.CONNECTED),a||(a=!0,t.writeln("Device connection was established successfully.  \r\n"));var n=i.filterReceiveData(e.data);n.dataToSend.length&&r.send(n.dataToSend),n.dataToDisplay.length&&t.write(n.dataToDisplay)},t.onData(function(e){if(a){var n=i.filterSendData(e);n.length&&r.send(n)}}),window.onbeforeunload=function(){for(var e="exit\n",n=[],t=0;t<e.length;t++)n.push(e.charCodeAt(t));r.send(new Uint8Array(n))}})):(t.writeln(""),t.writeln("\r\nConnection parameters could not be retrieved. Please close this window and try again  \r\n"),clientService.setConnectionStatus(clientService.STATUSES.ERROR))}}();
1
+ "use strict";!function(){var c,r,a=!1;window.onload=function(){var e=document.getElementById("terminal"),n=new Terminal({fontSize:18,fontFamily:"consolas, monospace",cursorBlink:!0,cols:terminalSize.cols,rows:terminalSize.rows}),t=new FitAddon.FitAddon,i=(n.loadAddon(t),new ShellAdapter),o=(i.setTermType("xterm-256color"),clientService.getParams());o?(clientService.setConnectionStatus(clientService.STATUSES.CONNECTING),document.title=unescape(o.title),c=o.wsProtocol+"//"+o.host+"/"+o.path,n.open(e),t.fit(),n.focus(),setTimeout(function(){(r=new WebSocket(c,"binary")).binaryType="arraybuffer",r.onopen=function(){n.writeln("Websocket connection was established successfully, waiting for device...  \r\n")},r.onclose=function(){n.writeln(""),n.writeln("\r\nDevice disconnected.  \r\n"),n.writeln("\r\nWebsocket connection was closed.  \r\n"),clientService.setConnectionStatus(clientService.STATUSES.ERROR)},r.onmessage=function(e){e.data&&clientService.getConnectionStatus()===clientService.STATUSES.CONNECTING&&clientService.setConnectionStatus(clientService.STATUSES.CONNECTED),a||(a=!0,n.writeln("Device connection was established successfully.  \r\n"));e=i.filterReceiveData(e.data);e.dataToSend.length&&r.send(e.dataToSend),e.dataToDisplay.length&&n.write(e.dataToDisplay)},n.onData(function(e){a&&(e=i.filterSendData(e)).length&&r.send(e)}),window.onbeforeunload=function(){for(var e="exit\n",n=[],t=0;t<e.length;t++)n.push(e.charCodeAt(t));r.send(new Uint8Array(n))}})):(n.writeln(""),n.writeln("\r\nConnection parameters could not be retrieved. Please close this window and try again  \r\n"),clientService.setConnectionStatus(clientService.STATUSES.ERROR))}}();
@@ -1 +1 @@
1
- "use strict";function ShellAdapter(){var a="";this.setTermType=function(e){a=e},this.filterReceiveData=function(e){var t=new TelnetNegotiator;t.setTermType(a);var n=t.negotiate(e),r=(new TextDecoder).decode(e);return{dataToSend:n.dataToSend,dataToDisplay:n.isOutput?function(e){return e=e.split("�").join("")}(r):""}},this.filterSendData=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t.length?new Uint8Array(t):""}}
1
+ "use strict";function ShellAdapter(){var n="";this.setTermType=function(e){n=e},this.filterReceiveData=function(e){var t=new TelnetNegotiator,t=(t.setTermType(n),t.negotiate(e)),e=(new TextDecoder).decode(e);return{dataToSend:t.dataToSend,dataToDisplay:t.isOutput?e.split("�").join(""):""}},this.filterSendData=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n));return t.length?new Uint8Array(t):""}}
@@ -1 +1 @@
1
- "use strict";function TelnetNegotiator(){var o="";function c(t,e){for(var s=0;s<t.length;s++)e.push(t.charCodeAt(s))}this.setTermType=function(t){o=t},this.negotiate=function(t){for(var e=new Uint8Array(t),s=Array.prototype.slice.call(e),i=[],n="",r="",a="",h="";0<s.length;)switch(r=s.shift()){case 255:switch(a=s.shift(),h=s.shift(),a){case 253:24===h?i.push(255,251,h):31===h?(i.push(255,251,31),i.push(255,250,31,0,terminalSize.cols,0,terminalSize.rows,255,240)):i.push(255,252,h);break;case 251:1===h?i.push(255,253,h):i.push(255,254,h);break;case 250:24===h?1===s[0]&&255===s[1]&&240===s[2]?(s.shift(),s.shift(),s.shift(),i.push(255,250,24,0),c(o,i),i.push(255,240)):console.warn("Invalid subnegotiation received"+s):console.warn("Ignoring SB "+h)}break;case 242:a=s.shift(),h=s.shift();break;default:n+=String.fromCharCode(r)}return{dataToSend:i.length?new Uint8Array(i):"",isOutput:!!n.length}}}
1
+ "use strict";function TelnetNegotiator(){var f="";this.setTermType=function(e){f=e},this.negotiate=function(e){for(var t,e=new Uint8Array(e),s=Array.prototype.slice.call(e),i=[],r="",n="",a="";0<s.length;)switch(t=s.shift()){case 255:switch(n=s.shift(),a=s.shift(),n){case 253:24===a?i.push(255,251,a):31===a?(i.push(255,251,31),i.push(255,250,31,0,terminalSize.cols,0,terminalSize.rows,255,240)):i.push(255,252,a);break;case 251:i.push(255,1===a?253:254,a);break;case 250:if(24===a)if(1===s[0]&&255===s[1]&&240===s[2]){s.shift(),s.shift(),s.shift(),i.push(255,250,24,0),c=o=h=void 0;for(var h=f,o=i,c=0;c<h.length;c++)o.push(h.charCodeAt(c));i.push(255,240)}else console.warn("Invalid subnegotiation received"+s);else console.warn("Ignoring SB "+a)}break;case 242:n=s.shift(),a=s.shift();break;default:r+=String.fromCharCode(t)}return{dataToSend:i.length?new Uint8Array(i):"",isOutput:!!r.length}}}
@@ -1 +1 @@
1
- "use strict";!function(){var i,t,e=clientService.getParams(),l={LOADED:"loaded",NORMAL:"normal",FAILED:"failed",FATAL:"fatal",DISCONNECTED:"disconnected"},S=clientService.STATUSES.DISCONNECTED;function n(){if(WebUtil.getConfigVar("resize",!1)){var t=window.innerWidth,e=window.innerHeight,n=$D("noVNC_status_bar").offsetHeight;void 0!==t&&void 0!==e&&i.requestDesktopSize(t,e-n-5)}}function o(t){n(),t.set_onFBUComplete(function(){})}function s(){return i.sendCtrlAltDel(),!1}function c(){return i.xvpShutdown(),!1}function a(){return i.xvpReboot(),!1}function r(){return i.xvpReset(),!1}function u(t,e,n,i){var o=function(t){var e;switch(t){case l.FAILED:case l.FATAL:e="error";break;case l.NORMAL:case l.DISCONNECTED:case l.LOADED:e="normal";break;default:e="warn"}return e}(e),s=function(t){switch(t){case l.FAILED:case l.FATAL:status=clientService.STATUSES.ERROR,S=clientService.STATUSES.ERROR;break;case l.NORMAL:status=clientService.STATUSES.CONNECTED;break;case l.DISCONNECTED:S!=clientService.STATUSES.ERROR&&(status=clientService.STATUSES.DISCONNECTED);break;case l.LOADED:status=clientService.STATUSES.DISCONNECTED,S=clientService.STATUSES.DISCONNECTED;break;case l.CONNECT:status=clientService.STATUSES.CONNECTING,S=clientService.STATUSES.CONNECTING;break;default:status=clientService.STATUSES.DISCONNECTED,S=clientService.STATUSES.DISCONNECTED}return status}(e),c=$D("noVNC_status"),a=$D("noVNC_status_bar"),r=$D("sendCtrlAltDelButton");e===l.NORMAL?r.disabled=!1:(r.disabled=!0,T(0)),void 0!==i&&(a.setAttribute("class","noVNC_status_".concat(o)),c.textContent=i),clientService.setConnectionStatus(s)}function T(t){var e=$D("noVNC_xvp_buttons");e.style.display=1<=t?"inline":"none"}Util.load_scripts(["webutil.js","base64.js","websock.js","des.js","keysymdef.js","keyboard.js","input.js","display.js","inflator.js","rfb.js","keysym.js"]),window.onresize=function(){clearTimeout(t),t=setTimeout(function(){n()},500)},window.onscriptsload=function(){var t=$D("sendCtrlAltDelButton");if(t.style.display="inline",t.onclick=s,$D("xvpShutdownButton").onclick=c,$D("xvpRebootButton").onclick=a,$D("xvpResetButton").onclick=r,e){if(WebUtil.init_logging(e.logging||"warn"),document.title=unescape(e.title||"noVNC"),!e.host||!e.port)return void u(0,l.FATAL,0,"Must specify host and port in URL");try{i=new RFB(_.defaults(_.omit(e,["path","host","viewport","port","password","status","title","protocol","wsProtocol"]),{target:$D("noVNC_canvas"),onUpdateState:u,onXvpInit:T,onFBUComplete:o}))}catch(t){return void u(0,l.FATAL,0,"Unable to create RFB client -- ".concat(t))}i.connect(e.host,e.port,e.password,e.path)}else{u(0,l.FATAL,0,"Connection parameters could not be retrieved. Please close this window and try again")}}}();
1
+ "use strict";!function(){var i,t,e=clientService.getParams(),l={LOADED:"loaded",NORMAL:"normal",FAILED:"failed",FATAL:"fatal",DISCONNECTED:"disconnected"},S=clientService.STATUSES.DISCONNECTED;function n(){var t,e,n;WebUtil.getConfigVar("resize",!1)&&(t=window.innerWidth,e=window.innerHeight,n=$D("noVNC_status_bar").offsetHeight,void 0!==t)&&void 0!==e&&i.requestDesktopSize(t,e-n-5)}function s(t){n(),t.set_onFBUComplete(function(){})}function o(){return i.sendCtrlAltDel(),!1}function c(){return i.xvpShutdown(),!1}function a(){return i.xvpReboot(),!1}function r(){return i.xvpReset(),!1}function u(t,e,n,i){var s=function(t){var e;switch(t){case l.FAILED:case l.FATAL:e="error";break;case l.NORMAL:case l.DISCONNECTED:case l.LOADED:e="normal";break;default:e="warn"}return e}(e),o=function(t){switch(t){case l.FAILED:case l.FATAL:status=clientService.STATUSES.ERROR,S=clientService.STATUSES.ERROR;break;case l.NORMAL:status=clientService.STATUSES.CONNECTED;break;case l.DISCONNECTED:S!=clientService.STATUSES.ERROR&&(status=clientService.STATUSES.DISCONNECTED);break;case l.LOADED:status=clientService.STATUSES.DISCONNECTED,S=clientService.STATUSES.DISCONNECTED;break;case l.CONNECT:status=clientService.STATUSES.CONNECTING,S=clientService.STATUSES.CONNECTING;break;default:status=clientService.STATUSES.DISCONNECTED,S=clientService.STATUSES.DISCONNECTED}return status}(e),c=$D("noVNC_status"),a=$D("noVNC_status_bar"),r=$D("sendCtrlAltDelButton");e===l.NORMAL?r.disabled=!1:(r.disabled=!0,T(0)),void 0!==i&&(a.setAttribute("class","noVNC_status_".concat(s)),c.textContent=i),clientService.setConnectionStatus(o)}function T(t){var e=$D("noVNC_xvp_buttons");e.style.display=1<=t?"inline":"none"}Util.load_scripts(["webutil.js","base64.js","websock.js","des.js","keysymdef.js","keyboard.js","input.js","display.js","inflator.js","rfb.js","keysym.js"]),window.onresize=function(){clearTimeout(t),t=setTimeout(function(){n()},500)},window.onscriptsload=function(){var t=$D("sendCtrlAltDelButton");if(t.style.display="inline",t.onclick=o,$D("xvpShutdownButton").onclick=c,$D("xvpRebootButton").onclick=a,$D("xvpResetButton").onclick=r,e)if(WebUtil.init_logging(e.logging||"warn"),document.title=unescape(e.title||"noVNC"),e.host&&e.port){try{i=new RFB(_.defaults(_.omit(e,["path","host","viewport","port","password","status","title","protocol","wsProtocol"]),{target:$D("noVNC_canvas"),onUpdateState:u,onXvpInit:T,onFBUComplete:s}))}catch(t){return void u(0,l.FATAL,0,"Unable to create RFB client -- ".concat(t))}i.connect(e.host,e.port,e.password,e.path)}else u(0,l.FATAL,0,"Must specify host and port in URL");else u(0,l.FATAL,0,"Connection parameters could not be retrieved. Please close this window and try again")}}();
@@ -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=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}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){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);var r=n.call(e,t||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function e(n,a,e,i,r,o,c,s,l,u,p,t){var f="service/remoteaccess",d="127.0.0.1",y=":::PLUGIN_PATH:::/clients/terminal/index.html",v="top=30,left=30,height=933,width=1350,location=no,menubar=no,toolbar=no,status=no,resizable=no",m=i.url("".concat(f,"/keypair/generate")),b={http:"ws:",https:"wss:"}[e.protocol()]||"ws:",S="wss:"===b,P="XSRF-TOKEN",g={category:"remoteaccess",key:"pass-through.enabled"},h=i.createEnum([{name:"NONE",value:"NONE",label:u("No password")},{name:"USER_PASS",value:"USER_PASS",label:u("Username and password")},{name:"PASS_ONLY",value:"PASS_ONLY",label:u("Password only")},{name:"KEY_PAIR",value:"KEY_PAIR",label:u("Public/private keys")},{name:"CERTIFICATE",value:"CERTIFICATE",label:u("Certificate")}]),w=[{name:"VNC",value:"VNC",label:u("VNC"),supportedCredentialsTypes:[h.NONE,h.PASS_ONLY],defaults:{host:d,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:S,true_color:!0,local_cursor:!1,viewport:!0,shared:!0,view_only:!1,disconnectTimeout:10,repeaterID:"",port:443,password:""}},{name:"TELNET",value:"TELNET",label:u("Telnet"),supportedCredentialsTypes:[h.NONE],defaults:{host:d,port:23},clientWindowPath:y,clientWindowParams:v},{name:"SSH",value:"SSH",label:u("SSH"),supportedCredentialsTypes:[h.USER_PASS,h.KEY_PAIR,h.CERTIFICATE],defaults:{host:d,port:22},clientWindowPath:y,clientWindowParams:v},{name:"PASSTHROUGH",value:"PASSTHROUGH",label:u("PASSTHROUGH"),supportedCredentialsTypes:[],defaults:{host:d,port:22},isConnectDissalowed:!0,tooltipConnectDissalowed:u("PASSTHROUGH protocol configuration should be used with native client only."),showIf:function(){return t.getSystemOptionValue(g)}}];return{DEFAULT_HOST:d,getProtocols:function(){return n.all(_.map(w,function(e){return s.configureVisibility(e,"visible")})).then(function(e){return _.filter(e,"visible")})},CREDENTIALS_TYPES:h,save:function(t,n){try{return function(e,t){var n=_.includes([h.USER_PASS.value,h.PASS_ONLY.value],t.credentialsType),r=_.includes([h.KEY_PAIR.value],t.credentialsType);_.defaults(t,{password:n?_.get(t,"credentials.password"):void 0,privateKey:r?_.get(t,"credentials.privateKey"):void 0}),_.unset(t,"credentials"),_.unset(t,"attrs");var o=O(e,t);return a.put(o,t).then(i.getResData)}(t,n)}catch(e){return function(e,t){var n=E(e);return a.post(n,t).then(i.getResData)}(t,n)}},list:function(e){var t=E(e);return a.get(t).then(i.getResData)},detail:function(e,t){var n=O(e,t);return a.get(n).then(i.getResData)},remove:function(e,t){var n=O(e,t);return a.delete(n)},getConnectionParams:function(e,t){return n.all({title:p.getString("Connected to: {{name}}",t),protocol:_.find(w,{value:t.protocol}),host:c.current().then(function(e){return e.domainName}),path:function(t,n){return o.current().then(function(e){return function(e){var t="service/remoteaccess/client/".concat(e.deviceId,"/configurations/").concat(e.configurationId,"?token=").concat(e.token),n=s.getCookieValue(P);if(n){var r=encodeURIComponent(n);t="".concat(t,"&").concat(P,"=").concat(r)}return t}({deviceId:i.getId(t),configurationId:n.id,token:r.encodeToken(e.userName,r.getPassword(),e.tenant)})})}(e,t),wsProtocol:b}).then(function(e){return _objectSpread(_objectSpread({},e),e.protocol.extraConnectionParams)})},isMicroServiceAvailable:function(t){return l.isAvailable({name:"cloud-remote-access",type:"MICROSERVICE"}).then(function(e){return e?a.head(E(t),{silentError:!0}).then(_.constant(!0),_.constant(!1)):n.resolve(e)})},parseSshKeyFile:function(r){return n(function(n,e){var t=new FileReader;t.onload=function(e){var t=e.target;return n(t.result)},t.onerror=function(){return e({feedback:{type:"error",summary:u("Could not read file.")}})},t.readAsText(r)})},generateKeys:function(e){return a.post(m,{hostname:e}).then(i.getResData)},exportSshKey:function(e){var t=new Blob([e],{type:"text/plain"});window.saveAs(t,"key.pub")}};function E(e){var t=[f,"devices",i.getId(e),"configurations"].join("/");return i.url(t)}function O(e,t){return[E(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:String(e)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===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,o,s,l,u,p,t){var f="service/remoteaccess",d="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(f,"/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:u("No password")},{name:"USER_PASS",value:"USER_PASS",label:u("Username and password")},{name:"PASS_ONLY",value:"PASS_ONLY",label:u("Password only")},{name:"KEY_PAIR",value:"KEY_PAIR",label:u("Public/private keys")},{name:"CERTIFICATE",value:"CERTIFICATE",label:u("Certificate")}]),h=[{name:"VNC",value:"VNC",label:u("VNC"),supportedCredentialsTypes:[g.NONE,g.PASS_ONLY],defaults:{host:d,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:u("Telnet"),supportedCredentialsTypes:[g.NONE],defaults:{host:d,port:23},clientWindowPath:y,clientWindowParams:m},{name:"SSH",value:"SSH",label:u("SSH"),supportedCredentialsTypes:[g.USER_PASS,g.KEY_PAIR,g.CERTIFICATE],defaults:{host:d,port:22},clientWindowPath:y,clientWindowParams:m},{name:"PASSTHROUGH",value:"PASSTHROUGH",label:u("PASSTHROUGH"),supportedCredentialsTypes:[],defaults:{host:d,port:22},isConnectDissalowed:!0,tooltipConnectDissalowed:u("PASSTHROUGH protocol configuration should be used with native client only."),showIf:function(){return t.getSystemOptionValue(P)}}];return{DEFAULT_HOST:d,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:p.getString("Connected to: {{name}}",t),protocol:_.find(h,{value:t.protocol}),host:o.current().then(function(e){return e.domainName}),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 l.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:u("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=[f,"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(){function n(n,o,t){var e=this,c=t("Local"),i=t("Connect"),s=t("Show connection");function r(n){var o=l(n);return o&&!!o.isConnectDissalowed}function l(o){return _.find(e.protocols,function(n){return n.value===o.config.protocol})}_.assign(e,{$onInit:function(){o.getProtocols().then(function(n){e.protocols=n})},isLocal:function(){return n.isLocalEndpoint(e.endpoint)},labelLocal:c,labelConnect:i,labelShowConnection:s,connectBtnCls:function(){var n=(e.endpoint.connection||{}).status;return{btn:!0,"btn-block":!0,"btn-default":!n,"btn-danger":"ERROR"===n,"btn-warning":"CONNECTING"===n,"btn-success":"CONNECTED"===n}},connect:function(){var n=(e.endpoint.connection||{}).clientWindow;n?n.focus():e.onConnect({endpoint:e.endpoint})},edit:function(){e.onEdit({endpoint:e.endpoint})},remove:function(){e.onRemove({endpoint:e.endpoint})},isDisabled:r,getDisabledTooltip:function(n){var o=l(n);return r(n)?_.get(o,"tooltipConnectDissalowed"):""}})}n.$inject=["c8yRemoteAccessUI","c8yRemoteAccess","gettext"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointCard",{bindings:{endpoint:"<",onConnect:"&",onEdit:"&",onRemove:"&"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointCard/remoteAccessEndpointCard.html",controller:n,controllerAs:"vm"})}();
1
+ "use strict";!function(){function n(n,o,t){var e=this,c=t("Local"),i=t("Connect"),t=t("Show connection");function s(n){n=r(n);return n&&!!n.isConnectDissalowed}function r(o){return _.find(e.protocols,function(n){return n.value===o.config.protocol})}_.assign(e,{$onInit:function(){o.getProtocols().then(function(n){e.protocols=n})},isLocal:function(){return n.isLocalEndpoint(e.endpoint)},labelLocal:c,labelConnect:i,labelShowConnection:t,connectBtnCls:function(){var n=(e.endpoint.connection||{}).status;return{btn:!0,"btn-block":!0,"btn-default":!n,"btn-danger":"ERROR"===n,"btn-warning":"CONNECTING"===n,"btn-success":"CONNECTED"===n}},connect:function(){var n=(e.endpoint.connection||{}).clientWindow;n?n.focus():e.onConnect({endpoint:e.endpoint})},edit:function(){e.onEdit({endpoint:e.endpoint})},remove:function(){e.onRemove({endpoint:e.endpoint})},isDisabled:s,getDisabledTooltip:function(n){var o=r(n);return s(n)?_.get(o,"tooltipConnectDissalowed"):""}})}n.$inject=["c8yRemoteAccessUI","c8yRemoteAccess","gettext"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointCard",{bindings:{endpoint:"<",onConnect:"&",onEdit:"&",onRemove:"&"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointCard/remoteAccessEndpointCard.html",controller:n,controllerAs:"vm"})}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(i,t){var n,o,c,s,r,a,l=this;function d(){if(l.endpoint.config.credentialsType=l.selectedCredentialsType.value,e(!1),p(!1),f(!1),u(!1),l.selectedCredentialsType.value!==l.initialCredentialType)switch(l.endpoint.config.credentialsType){case"KEY_PAIR":_.set(l.endpoint,"config.privateKey",""),_.set(l.endpoint,"config.publicKey","");break;case"CERTIFICATE":_.set(l.endpoint,"config.privateKey",""),_.set(l.endpoint,"config.certificate","")}}function e(e){g("config.password",l.changingPassword=e,n)}function p(e){g("config.username",l.changingCredentials=e,o),g("config.password",e,n)}function f(e){g("config.privateKey",l.changingKeyPair=e,s),g("config.publicKey",e,c)}function u(e){g("config.privateKey",l.changingCertificate=e,s),g("config.certificate",e,a)}function g(e,t,n){t?_.set(l.endpoint,e,""):n&&!t&&_.set(l.endpoint,e,n)}_.assign(l,{$onInit:function(){i.getProtocols().then(function(e){l.protocols=e}).then(function(){!function(t,e){n=_.get(t,"config.credentials.password"),o=_.get(t,"config.credentials.username"),c=_.get(t,"config.credentials.publicKey"),s=_.get(t,"config.credentials.privateKey"),r=_.get(t,"config.credentials.hostKey"),a=_.get(t,"config.credentials.certificate"),l.passwordAlreadyExists=!_.isEmpty(n),l.usernameAlreadyExists=!_.isEmpty(o),l.publicKeyAlreadyExists=!_.isEmpty(c),l.privateKeyAlreadyExists=!_.isEmpty(s),l.hostKeyAlreadyExists=!_.isEmpty(r),l.certificateAlreadyExists=!_.isEmpty(a),l.generating=!1,l.initialCredentialType=_.get(t,"config.credentials.type"),void 0===t?(l.selectedProtocol=_.find(l.protocols,function(e){return"VNC"===e.value}),l.selectedCredentialsType=l.selectedProtocol.supportedCredentialsTypes[0]):(l.selectedProtocol=_.find(l.protocols,function(e){return e.value===t.config.protocol}),l.selectedCredentialsType=t.config.credentials.type?_.find(l.credentialsTypes.values(),{value:t.config.credentials.type}):l.selectedProtocol.supportedCredentialsTypes[0]);l.endpoint=_.defaults(t,{device:e,config:{hostname:l.selectedProtocol.defaults.host,port:l.selectedProtocol.defaults.port,protocol:l.selectedProtocol.value,credentialsType:l.selectedCredentialsType.value}}),d()}(l.resolve.endpoint,l.resolve.rootDevice),function(e){t.getSuggestedIPAddresses(e).then(function(e){l.suggestedIPAddresses=e})}(l.resolve.rootDevice)})},save:function(){var e=l.endpoint,t=e.device,n=e.config;i.save(t,n).then(function(){return l.modalInstance.close(l.endpoint)})},cancel:function(){l.modalInstance.dismiss()},changePassword:function(){return e(!0)},cancelChangePassword:function(){return e(!1)},changeCredentials:function(){return p(!0)},cancelChangeCredentials:function(){return p(!1)},changeKeyPair:function(){return f(!0)},cancelChangeKeyPair:function(){return f(!1)},changeCertificate:function(){return u(!0)},cancelChangeCertificate:function(){return u(!1)},onProtocolChange:function(){l.selectedCredentialsType=l.selectedProtocol.supportedCredentialsTypes[0],_.assign(l.endpoint.config,{protocol:_.get(l,"selectedProtocol.value"),port:_.get(l,"selectedProtocol.defaults.port"),hostname:_.get(l,"selectedProtocol.defaults.host"),credentialsType:_.get(l,"selectedCredentialsType.value","NONE")})},onCredentialsTypeChange:d,credentialsTypes:i.CREDENTIALS_TYPES,credentialsAvailable:function(){return!!o&&!!n},keyPairAvailable:function(){return s&&c&&"KEY_PAIR"===l.initialCredentialType},certificateAvailable:function(){return a&&s&&"CERTIFICATE"===l.initialCredentialType},downloadPublicKey:function(){i.exportSshKey(_.get(l,"endpoint.config.publicKey"))},generateKeys:function(){var e=l.endpoint.config.hostname||l.selectedProtocol.defaults.host;l.generating=!0,i.generateKeys(e).then(function(e){var t=e.privateKey,n=e.publicKey;t&&n&&_.assign(l.endpoint.config,{privateKey:t,publicKey:n})}).finally(function(){l.generating=!1})},showIdentifiedType:function(e){l.identifiedType=e}})}e.$inject=["c8yRemoteAccess","c8yRemoteAccessUI"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointModal",{bindings:{resolve:"<",modalInstance:"<"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointModal/remoteAccessEndpointModal.html",controller:e,controllerAs:"vm"})}();
1
+ "use strict";!function(){function e(n,i){var o,c,s,r,a,l,d=this;function p(){if(d.endpoint.config.credentialsType=d.selectedCredentialsType.value,e(!1),t(!1),f(!1),u(!1),d.selectedCredentialsType.value!==d.initialCredentialType)switch(d.endpoint.config.credentialsType){case"KEY_PAIR":_.set(d.endpoint,"config.privateKey",""),_.set(d.endpoint,"config.publicKey","");break;case"CERTIFICATE":_.set(d.endpoint,"config.privateKey",""),_.set(d.endpoint,"config.certificate","")}}function e(e){g("config.password",d.changingPassword=e,o)}function t(e){g("config.username",d.changingCredentials=e,c),g("config.password",e,o)}function f(e){g("config.privateKey",d.changingKeyPair=e,r),g("config.publicKey",e,s)}function u(e){g("config.privateKey",d.changingCertificate=e,r),g("config.certificate",e,l)}function g(e,t,n){t?_.set(d.endpoint,e,""):n&&!t&&_.set(d.endpoint,e,n)}_.assign(d,{$onInit:function(){n.getProtocols().then(function(e){d.protocols=e}).then(function(){var t=d.resolve.endpoint,e=d.resolve.rootDevice;o=_.get(t,"config.credentials.password"),c=_.get(t,"config.credentials.username"),s=_.get(t,"config.credentials.publicKey"),r=_.get(t,"config.credentials.privateKey"),a=_.get(t,"config.credentials.hostKey"),l=_.get(t,"config.credentials.certificate"),d.passwordAlreadyExists=!_.isEmpty(o),d.usernameAlreadyExists=!_.isEmpty(c),d.publicKeyAlreadyExists=!_.isEmpty(s),d.privateKeyAlreadyExists=!_.isEmpty(r),d.hostKeyAlreadyExists=!_.isEmpty(a),d.certificateAlreadyExists=!_.isEmpty(l),d.generating=!1,d.initialCredentialType=_.get(t,"config.credentials.type"),void 0===t?(d.selectedProtocol=_.find(d.protocols,function(e){return"VNC"===e.value}),d.selectedCredentialsType=d.selectedProtocol.supportedCredentialsTypes[0]):(d.selectedProtocol=_.find(d.protocols,function(e){return e.value===t.config.protocol}),d.selectedCredentialsType=t.config.credentials.type?_.find(d.credentialsTypes.values(),{value:t.config.credentials.type}):d.selectedProtocol.supportedCredentialsTypes[0]),d.endpoint=_.defaults(t,{device:e,config:{hostname:d.selectedProtocol.defaults.host,port:d.selectedProtocol.defaults.port,protocol:d.selectedProtocol.value,credentialsType:d.selectedCredentialsType.value}}),p(),e=d.resolve.rootDevice,i.getSuggestedIPAddresses(e).then(function(e){d.suggestedIPAddresses=e})})},save:function(){var e=d.endpoint,t=e.device,e=e.config;n.save(t,e).then(function(){return d.modalInstance.close(d.endpoint)})},cancel:function(){d.modalInstance.dismiss()},changePassword:function(){return e(!0)},cancelChangePassword:function(){return e(!1)},changeCredentials:function(){return t(!0)},cancelChangeCredentials:function(){return t(!1)},changeKeyPair:function(){return f(!0)},cancelChangeKeyPair:function(){return f(!1)},changeCertificate:function(){return u(!0)},cancelChangeCertificate:function(){return u(!1)},onProtocolChange:function(){d.selectedCredentialsType=d.selectedProtocol.supportedCredentialsTypes[0],_.assign(d.endpoint.config,{protocol:_.get(d,"selectedProtocol.value"),port:_.get(d,"selectedProtocol.defaults.port"),hostname:_.get(d,"selectedProtocol.defaults.host"),credentialsType:_.get(d,"selectedCredentialsType.value","NONE")})},onCredentialsTypeChange:p,credentialsTypes:n.CREDENTIALS_TYPES,credentialsAvailable:function(){return!!c&&!!o},keyPairAvailable:function(){return r&&s&&"KEY_PAIR"===d.initialCredentialType},certificateAvailable:function(){return l&&r&&"CERTIFICATE"===d.initialCredentialType},downloadPublicKey:function(){n.exportSshKey(_.get(d,"endpoint.config.publicKey"))},generateKeys:function(){var e=d.endpoint.config.hostname||d.selectedProtocol.defaults.host;d.generating=!0,n.generateKeys(e).then(function(e){var t=e.privateKey,e=e.publicKey;t&&e&&_.assign(d.endpoint.config,{privateKey:t,publicKey:e})}).finally(function(){d.generating=!1})},showIdentifiedType:function(e){d.identifiedType=e}})}e.$inject=["c8yRemoteAccess","c8yRemoteAccessUI"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointModal",{bindings:{resolve:"<",modalInstance:"<"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointModal/remoteAccessEndpointModal.html",controller:e,controllerAs:"vm"})}();
@@ -1 +1 @@
1
- "use strict";!function(){function n(n,e,t,o){var c=this;function i(n){o.getEndpoints(n).then(s)}function s(n){c.endpoints=n,_.forEach(n,function(e){o.resumeMonitoring(e).then(function(n){n&&(e.connection=n)})})}function d(){i(c.device)}_.assign(c,{$onChanges:function(n){n.device&&n.device.currentValue&&i(n.device.currentValue)},endpointsOrderFn:function(n){var e=o.isLocalEndpoint(n)?"z":"a",t=n.config.name;return e+t},addEndpoint:function(){return o.addEndpoint(c.device).then(d)},onConnect:function(e){o.connectEndpoint(e).then(function(n){e.connection=n})},onEdit:function(n){o.editEndpoint(n).then(d)},onRemove:function(n){o.removeEndpoint(n).then(d)}})}n.$inject=["$q","c8yBase","c8yInventory","c8yRemoteAccessUI"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointsList",{bindings:{device:"<"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointsList/remoteAccessEndpointsList.html",controller:n,controllerAs:"vm"})}();
1
+ "use strict";!function(){function n(n,e,t,o){var c=this;function i(n){o.getEndpoints(n).then(s)}function s(n){c.endpoints=n,_.forEach(n,function(e){o.resumeMonitoring(e).then(function(n){n&&(e.connection=n)})})}function d(){i(c.device)}_.assign(c,{$onChanges:function(n){n.device&&n.device.currentValue&&i(n.device.currentValue)},endpointsOrderFn:function(n){var e=o.isLocalEndpoint(n)?"z":"a",n=n.config.name;return e+n},addEndpoint:function(){return o.addEndpoint(c.device).then(d)},onConnect:function(e){o.connectEndpoint(e).then(function(n){e.connection=n})},onEdit:function(n){o.editEndpoint(n).then(d)},onRemove:function(n){o.removeEndpoint(n).then(d)}})}n.$inject=["$q","c8yBase","c8yInventory","c8yRemoteAccessUI"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessEndpointsList",{bindings:{device:"<"},templateUrl:":::PLUGIN_PATH:::/remoteAccessEndpointsList/remoteAccessEndpointsList.html",controller:n,controllerAs:"vm"})}();
@@ -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 ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);var n=r.call(t,e||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){function t(t,r,e,n){var o=this,i=[{name:"hostkeyAutosave",option:{category:"remoteaccess",key:"hostkey-autosave"},defaultValue:!1}];function c(t){return r.updateOption(_objectSpread(_objectSpread({},t.option),{},{value:_.get(o,t.name,t.defaultValue)}))}_.assign(o,{$onInit:function(){t.all(_.map(i,function(t){return function(e){return r.detailValue(e.option,e.defaultValue).then(function(t){return _.set(o,e.name,t)})}(t)}))},updateSetting:c,updateSettings:function(){return t.all(_.map(i,function(t){return c(t)})).then(function(){return e.success(n("Settings saved."))}).catch(function(){return e.danger(n("Settings could not be saved."))})}})}t.$inject=["$q","c8ySettings","c8yAlert","gettext"],angular.module("c8y.remoteAccess").component("c8yRemoteAccessSettings",{templateUrl:":::PLUGIN_PATH:::/remoteAccessSettings/remoteAccessSettings.html",controller:t,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: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(){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 +1 @@
1
- "use strict";!function(){function e(n,t,y){r.$inject=["$q","$interval","$window","c8yRemoteAccess","$uibModal","c8yModal","c8yAlert","c8yBase","c8yInventory","c8yDevices","gettextCatalog"],i.$inject=["$routeParams","c8yBase","c8yDevices","c8yRemoteAccess"],c.$inject=["$routeParams"];var e="device/:deviceId",o={name:y("Remote access"),icon:"window-restore",template:'<c8y-remote-access-endpoints-list device="vm.id"></c8y-remote-access-endpoints-list>',controllerAs:"vm",controller:c,showIf:i};function c(e){this.id=e.deviceId}function i(e,n,t,o){var c=e.deviceId;return t.detail(c).then(n.getResData).then(function(e){return t.supportsOperation(e,"c8y_RemoteAccessConnect")}).then(function(e){return e&&o.isMicroServiceAvailable(c)})}function r(o,i,r,a,c,s,d,n,t,u,l){return{getSuggestedIPAddresses:function(e){var t=[{label:"localhost",ipAddress:a.DEFAULT_HOST}];return v(e).then(function(e){var n=_.map(e,function(e){return{label:u.properName(e),ipAddress:u.getIPAddress(e)}});return _.filter(t.concat(n),"ipAddress")})},getChildDevices:v,getEndpoints:p,addEndpoint:function(e){var n=g(e).then(function(e){return c.open({size:"sm",component:"c8yRemoteAccessEndpointModal",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{rootDevice:_.constant(_.cloneDeep(e))}}).result});return n.then(function(){return d.success(y("Endpoint saved."))})},editEndpoint:function(n){var e=o.all({deviceDetails:g(n.device),endpointDetails:p(n.device).then(function(e){return _.find(e,function(e){return e.config.id===n.config.id})})}).then(function(e){var n=e.deviceDetails,t=e.endpointDetails;return c.open({size:"sm",component:"c8yRemoteAccessEndpointModal",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{rootDevice:_.constant(_.cloneDeep(n)),endpoint:_.constant(_.cloneDeep(t))}}).result});return e.then(function(){return d.success(y("Endpoint saved."))})},removeEndpoint:function(e){var n={title:y("Delete endpoint"),body:l.getString('You are about to delete endpoint "{{config.name}}" from device "{{device.name}}". Do you want to proceed?',e),labels:{ok:y("Delete")},status:"danger"},t=s(n);return t.then(function(){return a.remove(e.device,e.config)}).then(function(){return d.success(y("Endpoint deleted."))})},connectEndpoint:function(c){return a.getConnectionParams(c.device,c.config).then(function(e){var n=m(c);r.localStorage.setItem(n,JSON.stringify(e));var t="".concat(e.protocol.clientWindowPath,"?paramsId=").concat(n),o=r.open(t,n,e.protocol.clientWindowParams);return o.opener=null,f(o,n,e),_.assign(e,{paramsId:n,clientWindow:o})})},isLocalEndpoint:function(e){return _.includes(["localhost",a.DEFAULT_HOST],e.config.hostname)},resumeMonitoring:function(e){var n=m(e);if(r.localStorage.getItem(n)){var t=r.open("",n);if(t.opener=null,t)return function(e,n,t){return a.getConnectionParams(e.device,e.config).then(function(e){return f(n,t,e),_.assign(e,{paramsId:t,clientWindow:n})})}(e,t,n)}return o.resolve()}};function v(e){return t.childDevices(e)}function p(e){return g(e).then(function(n){return a.list(n).then(function(e){return _.map(e,function(e){return{device:n,config:e}})})})}function f(e,t,o){var c=i(function(){var n;try{n=JSON.parse(r.localStorage.getItem(t))}catch(e){n={}}_.assign(o,n),e.closed&&(i.cancel(c),r.localStorage.removeItem(t),o.status=void 0,o.clientWindow=void 0)},1e3)}function m(e){return"remoteConnection_".concat(e.device.id,"_").concat(e.config.id)}function g(e){return _.isObjectLike(e)?o.when(e):t.detail(e).then(n.getResData)}}return{$get:r,provideSettingsPage:function(){function e(e){return e.isAvailable({name:"cloud-remote-access",type:"MICROSERVICE"})}e.$inject=["c8yApplication"],t.addNavigation({parent:y("Settings"),name:y("Remote access"),path:"remoteAccessSettings",icon:"key",priority:2e3,showIf:e}),n.when("/remoteAccessSettings",{template:"<c8y-remote-access-settings />"})},provideDeviceTab:function(){n.when("/".concat(e),o)}}}e.$inject=["c8yViewsProvider","c8yNavigatorProvider","gettext"],angular.module("c8y.remoteAccess").provider("c8yRemoteAccessUI",e)}();
1
+ "use strict";!function(){function e(n,t,y){r.$inject=["$q","$interval","$window","c8yRemoteAccess","$uibModal","c8yModal","c8yAlert","c8yBase","c8yInventory","c8yDevices","gettextCatalog"],i.$inject=["$routeParams","c8yBase","c8yDevices","c8yRemoteAccess"],c.$inject=["$routeParams"];var e="device/:deviceId",o={name:y("Remote access"),icon:"window-restore",template:'<c8y-remote-access-endpoints-list device="vm.id"></c8y-remote-access-endpoints-list>',controllerAs:"vm",controller:c,showIf:i};function c(e){this.id=e.deviceId}function i(e,n,t,o){var c=e.deviceId;return t.detail(c).then(n.getResData).then(function(e){return t.supportsOperation(e,"c8y_RemoteAccessConnect")}).then(function(e){return e&&o.isMicroServiceAvailable(c)})}function r(o,i,r,c,t,a,s,n,d,u,l){return{getSuggestedIPAddresses:function(e){var n=[{label:"localhost",ipAddress:c.DEFAULT_HOST}];return v(e).then(function(e){e=_.map(e,function(e){return{label:u.properName(e),ipAddress:u.getIPAddress(e)}});return _.filter(n.concat(e),"ipAddress")})},getChildDevices:v,getEndpoints:p,addEndpoint:function(e){e=g(e).then(function(e){return t.open({size:"sm",component:"c8yRemoteAccessEndpointModal",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{rootDevice:_.constant(_.cloneDeep(e))}}).result});return e.then(function(){return s.success(y("Endpoint saved."))})},editEndpoint:function(n){var e=o.all({deviceDetails:g(n.device),endpointDetails:p(n.device).then(function(e){return _.find(e,function(e){return e.config.id===n.config.id})})}).then(function(e){var n=e.deviceDetails,e=e.endpointDetails;return t.open({size:"sm",component:"c8yRemoteAccessEndpointModal",ariaLabelledBy:"modal-title",ariaDescribedBy:"modal-body",resolve:{rootDevice:_.constant(_.cloneDeep(n)),endpoint:_.constant(_.cloneDeep(e))}}).result});return e.then(function(){return s.success(y("Endpoint saved."))})},removeEndpoint:function(e){var n={title:y("Delete endpoint"),body:l.getString('You are about to delete endpoint "{{config.name}}" from device "{{device.name}}". Do you want to proceed?',e),labels:{ok:y("Delete")},status:"danger"},n=a(n);return n.then(function(){return c.remove(e.device,e.config)}).then(function(){return s.success(y("Endpoint deleted."))})},connectEndpoint:function(o){return c.getConnectionParams(o.device,o.config).then(function(e){var n=m(o),t=(r.localStorage.setItem(n,JSON.stringify(e)),"".concat(e.protocol.clientWindowPath,"?paramsId=").concat(n)),t=r.open(t,n,e.protocol.clientWindowParams);return t.opener=null,f(t,n,e),_.assign(e,{paramsId:n,clientWindow:t})})},isLocalEndpoint:function(e){return _.includes(["localhost",c.DEFAULT_HOST],e.config.hostname)},resumeMonitoring:function(e){var n=m(e);if(r.localStorage.getItem(n)){var t=r.open("",n);if(t.opener=null,t)return function(e,n,t){return c.getConnectionParams(e.device,e.config).then(function(e){return f(n,t,e),_.assign(e,{paramsId:t,clientWindow:n})})}(e,t,n)}return o.resolve()}};function v(e){return d.childDevices(e)}function p(e){return g(e).then(function(n){return c.list(n).then(function(e){return _.map(e,function(e){return{device:n,config:e}})})})}function f(e,t,o){var c=i(function(){var n;try{n=JSON.parse(r.localStorage.getItem(t))}catch(e){n={}}_.assign(o,n),e.closed&&(i.cancel(c),r.localStorage.removeItem(t),o.status=void 0,o.clientWindow=void 0)},1e3)}function m(e){return"remoteConnection_".concat(e.device.id,"_").concat(e.config.id)}function g(e){return _.isObjectLike(e)?o.when(e):d.detail(e).then(n.getResData)}}return{$get:r,provideSettingsPage:function(){function e(e){return e.isAvailable({name:"cloud-remote-access",type:"MICROSERVICE"})}e.$inject=["c8yApplication"],t.addNavigation({parent:y("Settings"),name:y("Remote access"),path:"remoteAccessSettings",icon:"key",priority:2e3,showIf:e}),n.when("/remoteAccessSettings",{template:"<c8y-remote-access-settings />"})},provideDeviceTab:function(){n.when("/".concat(e),o)}}}e.$inject=["c8yViewsProvider","c8yNavigatorProvider","gettext"],angular.module("c8y.remoteAccess").provider("c8yRemoteAccessUI",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(t,e,o,i,n,l){var s=this;function r(e){s.role=e,c(),function(e){var n=(e||{}).references||[];s.selectedPermissions=_.map(n,"role.id")}(e.roles)}function c(){return i.listGlobalPermissions().then(a)}function a(e){s.permissions=e}function u(){s.globalRoleDetailForm.$setDirty()}function f(e){return s.saving=!0,e.finally(function(){s.saving=!1}),e}_.assign(s,{$onInit:function(){(function(){var e=s.id,n=s.duplicateId;("new"===e?function(e){var n=i.newGlobalRole(e);return n.then(function(){e&&l(u)}),n}(n):function(e){return o.global.detail(e).then(t.getResData)}(e)).then(r)})(),c()},STRINGS:i.STRINGS,helpLink:n.getUserGuideLink(i.STRINGS.LINKS.ROLES_INVENTORY),onSaveName:function(e){return f(i.saveGlobalRoleName(s.role,e))},cancel:i.list,save:function(){return f(i.saveGlobalRole(s.role,s.selectedPermissions))},hasAppPermissions:function(){var t=/^ROLE_APPLICATION/;return _.some(s.selectedPermissions,function(e,n){return e&&t.test(n)})},onSelectedRolesChange:function(e){s.selectedPermissions=e,u()}})}e.$inject=["c8yBase","c8yPermissions","c8yRoles","c8yRolesUi","c8yDocs","$timeout"],angular.module("c8y.roles").component("c8yRoleDetailGlobal",{templateUrl:":::PLUGIN_PATH:::/detail/roleDetailGlobal.html",bindings:{id:"<",duplicateId:"<"},controllerAs:"vm",controller:e})}();
1
+ "use strict";!function(){function e(o,e,t,i,n,l){var s=this;function r(e){s.role=e,c();e=e.roles;e=(e||{}).references||[],s.selectedPermissions=_.map(e,"role.id")}function c(){i.listGlobalPermissions().then(a)}function a(e){s.permissions=e}function u(){s.globalRoleDetailForm.$setDirty()}function f(e){return s.saving=!0,e.finally(function(){s.saving=!1}),e}_.assign(s,{$onInit:function(){(function(){var e=s.id,n=s.duplicateId;("new"===e?function(e){var n=i.newGlobalRole(e);return n.then(function(){e&&l(u)}),n}(n):function(e){return t.global.detail(e).then(o.getResData)}(e)).then(r)})(),c()},STRINGS:i.STRINGS,helpLink:n.getUserGuideLink(i.STRINGS.LINKS.ROLES_INVENTORY),onSaveName:function(e){return f(i.saveGlobalRoleName(s.role,e))},cancel:i.list,save:function(){return f(i.saveGlobalRole(s.role,s.selectedPermissions))},hasAppPermissions:function(){var o=/^ROLE_APPLICATION/;return _.some(s.selectedPermissions,function(e,n){return e&&o.test(n)})},onSelectedRolesChange:function(e){s.selectedPermissions=e,u()}})}e.$inject=["c8yBase","c8yPermissions","c8yRoles","c8yRolesUi","c8yDocs","$timeout"],angular.module("c8y.roles").component("c8yRoleDetailGlobal",{templateUrl:":::PLUGIN_PATH:::/detail/roleDetailGlobal.html",bindings:{id:"<",duplicateId:"<"},controllerAs:"vm",controller:e})}();
@@ -1 +1 @@
1
- "use strict";!function(){function s(e,s){var i,r=this;function n(){r.scopedPermissions=_.filter(r.permissions,{scope:r.scope})}function o(){r.permissionsListForm.$setDirty()}_.assign(r,{$onChanges:function(s){s.permissions&&(i&&i(),i=e.$watchCollection(_.constant(r.permissions),n))},accessTypes:s.ACCESS_TYPES,add:function(){r.permissions.push({scope:r.scope,permission:r.accessTypes.READ.value,type:"*"}),o()},remove:function(s){_.remove(r.permissions,s),o()},removeId:function(s){delete s.id},isOverridden:function(o){var s=r.permissions,e=r.scopedPermissions,i=["type","permission","scope"],n=_.find(_.without(s,o),function(n){return _.every(i,function(s){var e=_.matchesProperty(s,_.get(o,s)),i=_.matchesProperty(s,"*");return e(n)||i(n)})});return n&&(!_.matches(_.pick(o,i))(n)||_.indexOf(e,o)>_.indexOf(e,n))}})}s.$inject=["$scope","c8yPermissions"],angular.module("c8y.roles").component("c8yRoleInventoryPermissionList",{templateUrl:":::PLUGIN_PATH:::/detail/roleInventoryPermissionList.html",bindings:{permissions:"<",scope:"<"},controllerAs:"vm",controller:s})}();
1
+ "use strict";!function(){function s(e,s){var i,r=this;function n(){r.scopedPermissions=_.filter(r.permissions,{scope:r.scope})}function o(){r.permissionsListForm.$setDirty()}_.assign(r,{$onChanges:function(s){s.permissions&&(i&&i(),i=e.$watchCollection(_.constant(r.permissions),n))},accessTypes:s.ACCESS_TYPES,add:function(){r.permissions.push({scope:r.scope,permission:r.accessTypes.READ.value,type:"*"}),o()},remove:function(s){_.remove(r.permissions,s),o()},removeId:function(s){delete s.id},isOverridden:function(n){var s=r.permissions,e=r.scopedPermissions,o=["type","permission","scope"],s=_.find(_.without(s,n),function(i){return _.every(o,function(s){var e=_.matchesProperty(s,_.get(n,s)),s=_.matchesProperty(s,"*");return e(i)||s(i)})});return s&&(!_.matches(_.pick(n,o))(s)||_.indexOf(e,n)>_.indexOf(e,s))}})}s.$inject=["$scope","c8yPermissions"],angular.module("c8y.roles").component("c8yRoleInventoryPermissionList",{templateUrl:":::PLUGIN_PATH:::/detail/roleInventoryPermissionList.html",bindings:{permissions:"<",scope:"<"},controllerAs:"vm",controller:s})}();
@@ -1 +1 @@
1
- "use strict";!function(){function n(n,e,t,o){var r=this,i={header:o("Grant permissions on a general level."),text:o("There are several default roles defined, but you can define your own according to your needs.")},l={header:o("Manage user permissions on a particular group and/or its children."),text:o("There are several default inventory roles defined, but you can define your own according to your needs.")};function a(){return n.all([u(),s()])}function u(){return e.global.list().then(function(n){return c("global",n)})}function c(n,e){var t=r["".concat(n,"Roles")];t||(t=[]),e.forEach(function(n){t.push(n)}),t.paging=e.paging,r["".concat(n,"Roles")]=t}function s(){return e.list().then(function(n){return c("inventory",n)})}_.assign(r,{onRemove:function(e,n){_.remove(n,function(n){return n.id===e.id})},listGlobal:u,listInventory:s,listAll:a,loadNext:function(e){var n=r["".concat(e,"Roles")];n.paging.loading=!0,n.paging.next().then(function(n){return c(e,n)}).finally(function(){n.paging.loading=!1})},add:t.add,globalHelpText:i,inventoryHelpText:l}),t.setListTitle(),a()}n.$inject=["$q","c8yRoles","c8yRolesUi","gettext"],angular.module("c8y.roles").controller("c8yRolesOverviewCtrl",n)}();
1
+ "use strict";!function(){function n(n,e,t,o){var r=this,i={header:o("Grant permissions on a general level."),text:o("There are several default roles defined, but you can define your own according to your needs.")},o={header:o("Manage user permissions on a particular group and/or its children."),text:o("There are several default inventory roles defined, but you can define your own according to your needs.")};function l(){return n.all([a(),c()])}function a(){return e.global.list().then(function(n){return u("global",n)})}function u(n,e){var t=(t=r["".concat(n,"Roles")])||[];e.forEach(function(n){t.push(n)}),t.paging=e.paging,r["".concat(n,"Roles")]=t}function c(){return e.list().then(function(n){return u("inventory",n)})}_.assign(r,{onRemove:function(e,n){_.remove(n,function(n){return n.id===e.id})},listGlobal:a,listInventory:c,listAll:l,loadNext:function(e){var n=r["".concat(e,"Roles")];n.paging.loading=!0,n.paging.next().then(function(n){return u(e,n)}).finally(function(){n.paging.loading=!1})},add:t.add,globalHelpText:i,inventoryHelpText:o}),t.setListTitle(),l()}n.$inject=["$q","c8yRoles","c8yRolesUi","gettext"],angular.module("c8y.roles").controller("c8yRolesOverviewCtrl",n)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(g,e,n){d.$inject=["$rootScope","$location","$q","gettextCatalog","c8yBase","c8yTitle","c8yModal","c8yAlert","c8yRoles","c8yPermissions","c8yRolesUiStrings"],c.$inject=["$routeParams","c8yTenant"];var y="roles",b="roles/inventory_roles",R="".concat(y,"/global/:roleId"),w="".concat(y,"/inventory/:roleId"),t="c8y-users",o={priority:1e3,icon:"connected-people",template:'<c8y-roles-list roles="vm.globalRoles" help-text="vm.globalHelpText" on-remove="vm.onRemove(role, vm.globalRoles)" add-role="vm.add(\'global\')" on-load-next="vm.loadNext(\'global\')"></c8y-roles-list>',name:g("Global roles"),controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},r={icon:"insurance-agent",template:'<c8y-roles-list roles="vm.inventoryRoles" help-text="vm.inventoryHelpText" on-remove="vm.onRemove(role, vm.inventoryRoles)" add-role="vm.add(\'inventory\')" on-load-next="vm.loadNext(\'inventory\')"></c8y-roles-list>',name:g("Inventory roles"),controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},a={template:'<c8y-role-detail-global id="vm.params.roleId" duplicate-id="vm.params.duplicate"></c8y-role-global-global>'},l={template:'<c8y-role-detail-inventory id="vm.params.roleId" duplicate-id="vm.params.duplicate" is-top-tenant="vm.isTopTenant"></c8y-role-detail-inventory>'},i={controllerAs:"vm",controller:c};function c(e,n){var t=this;_.assign(t,{isTopTenant:!1,params:e}),n.isCurrentUserTopTenant().then(function(e){t.isTopTenant=e})}var T=["READ","ADMIN","CREATE","UPDATE"],E="ROLE_USER_MANAGEMENT_ADMIN",s=["ROLE_USER_MANAGEMENT_READ",E];function u(){e.when("/".concat(y),o),e.when("/".concat(y),r),e.when("/".concat(R),_.assign(a,i)),e.when("/".concat(w),_.assign(l,i))}function d(l,r,i,c,a,e,s,u,d,n,t){return{ROUTE_LIST:y,STRINGS:t,listGlobalPermissions:function(){return n.listGlobal().then(function(e){return _.filter(e,function(e){return _.includes(T,e.access)})})},list:o,setListTitle:function(){e.changeTitle({title:g("Roles")})},add:m,edit:function(e){var n=d.isGlobal(e)?R:w;return function(e,n){var t=a.getId(e),o=n.replace(/:\w+/,t);return r.search("duplicate",null),r.path(o)}(e,n)},duplicate:function(e){m(d.isGlobal(e)?"global":"inventory",e.id)},removeAfterConfirmation:function(e){var n={title:g("Delete role"),body:c.getString('You are about to delete role "{{name}}". Do you want to proceed?',e),labels:{ok:g("Delete")},status:"danger"},t=s(n),o=_.partial(d.remove,e),r=_.partial(d.global.remove,e),a=d.isGlobal(e)?r:o;return t.then(a).then(function(){return u.success(g("Role deleted."))}).catch(function(e){var n=_.get(e,"status");n&&(422===n?u.warning(g("Role cannot be deleted because it is assigned to users.")):(t=e,o=_.get(t,"data",t),l.$emit("alert",{type:"danger",text:$("<div/>").text(c.getString(o.message)).html(),detailedData:o})));var t,o;return i.reject(e)})},canCreate:function(){return n.hasAnyRole([E])},newInventoryRole:function(e){var n=i.when({name:c.getString("New inventory role"),permissions:[]});e&&(n=d.detail(e).then(function(e){var n=e.data,t={};return t.name="".concat(n.name," 2"),t.permissions=_.map(n.permissions,function(e){return _.omit(e,["id"])}),t}));return n},saveInventoryRole:function(e){var n=i.when();e.id||(n=v(e,e.name).catch(h(e.name)));return n.then(_.partial(d.save,e)).then(function(){return u.success(g("Inventory role saved."))}).then(o)},saveInventoryRoleName:function(n,t){return v(n,t).then(function(){var e;return n.id?e=d.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},newGlobalRole:function(e){var n=i.when({name:c.getString("New global role")});e&&(n=d.global.detail(e).then(function(e){var n=_.pick(e.data,["name","roles","applications"]);return n.name+=" 2",n}));return n},saveGlobalRole:function(n,t){return(n.id?function(){var e=l.$new(!0);return e.role=n,s({templateUrl:":::PLUGIN_PATH:::/detail/roleGlobalSaveConfirm.html",title:g("Confirm saving changes?"),scope:e})}():i.when()).then(function(){var e=i.when();n.id||(e=f(n,n.name).catch(h(n.name)));return e.then(_.partial(d.global.save,n))}).then(function(e){return d.global.updateRoles(e,t)}).then(function(){return u.success(g("Global role saved."))}).then(o)},saveGlobalRoleName:function(n,t){return f(n,t).then(function(){var e=i.when();return n.id?e=d.global.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},isUndeletable:function(e){return d.isGlobal(e)&&("admins"===_.lowerCase(e.name)||"devices"===_.lowerCase(e.name)||n.hasRole(e,"ROLE_NO_DELETE"))}};function o(){var e=new RegExp("\\/roles\\/inventory\\/(\\w+)"),n=r.path().match(e),t="/".concat(n?b:y);r.path(t),r.search("duplicate",null)}function m(e,n){var t=("global"===e?R:w).replace(/:\w+/,"new");r.path(t),n&&r.search("duplicate",n)}function v(n,t){return d.list().then(function(e){return p(e,n,t)})}function p(e,n,t){var o=_.filter(e,function(e){return e.id!==n.id});return _.some(o,{name:t})&&i.reject({duplicate:!0})}function h(n){return function(e){return _.get(e,"duplicate")&&u.danger(c.getString('There is already a role with the name "{{name}}"',{name:n})),i.reject()}}function f(n,t){return d.global.list().then(function(e){return p(e,n,t)})}}return{$get:d,init:function(){u(),n.addNavigation({name:g("Roles"),parent:g("Accounts"),routerLinkExact:!1,priority:4900,path:y,icon:t,showIfPermissions:{anyRole:s}})},hookViews:u}}e.$inject=["gettext","c8yViewsProvider","c8yNavigatorProvider"],angular.module("c8y.roles").provider("c8yRolesUi",e)}();
1
+ "use strict";!function(){function e(g,e,n){d.$inject=["$rootScope","$location","$q","gettextCatalog","c8yBase","c8yTitle","c8yModal","c8yAlert","c8yRoles","c8yPermissions","c8yRolesUiStrings"],c.$inject=["$routeParams","c8yTenant"];var y="roles",b="roles/inventory_roles",R="".concat(y,"/global/:roleId"),w="".concat(y,"/inventory/:roleId"),t="c8y-users",o={priority:1e3,icon:"connected-people",template:'<c8y-roles-list roles="vm.globalRoles" help-text="vm.globalHelpText" on-remove="vm.onRemove(role, vm.globalRoles)" add-role="vm.add(\'global\')" on-load-next="vm.loadNext(\'global\')"></c8y-roles-list>',name:g("Global roles"),controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},r={icon:"insurance-agent",template:'<c8y-roles-list roles="vm.inventoryRoles" help-text="vm.inventoryHelpText" on-remove="vm.onRemove(role, vm.inventoryRoles)" add-role="vm.add(\'inventory\')" on-load-next="vm.loadNext(\'inventory\')"></c8y-roles-list>',name:g("Inventory roles"),controller:"c8yRolesOverviewCtrl",controllerAs:"vm"},a={template:'<c8y-role-detail-global id="vm.params.roleId" duplicate-id="vm.params.duplicate"></c8y-role-global-global>'},l={template:'<c8y-role-detail-inventory id="vm.params.roleId" duplicate-id="vm.params.duplicate" is-top-tenant="vm.isTopTenant"></c8y-role-detail-inventory>'},i={controllerAs:"vm",controller:c};function c(e,n){var t=this;_.assign(t,{isTopTenant:!1,params:e}),n.isCurrentUserTopTenant().then(function(e){t.isTopTenant=e})}var T=["READ","ADMIN","CREATE","UPDATE"],E="ROLE_USER_MANAGEMENT_ADMIN",s=["ROLE_USER_MANAGEMENT_READ",E];function u(){e.when("/".concat(y),o),e.when("/".concat(y),r),e.when("/".concat(R),_.assign(a,i)),e.when("/".concat(w),_.assign(l,i))}function d(r,t,a,l,o,e,i,c,s,n,u){return{ROUTE_LIST:y,STRINGS:u,listGlobalPermissions:function(){return n.listGlobal().then(function(e){return _.filter(e,function(e){return _.includes(T,e.access)})})},list:d,setListTitle:function(){e.changeTitle({title:g("Roles")})},add:m,edit:function(e){var n=s.isGlobal(e)?R:w;return function(e,n){e=o.getId(e),n=n.replace(/:\w+/,e);return t.search("duplicate",null),t.path(n)}(e,n)},duplicate:function(e){m(s.isGlobal(e)?"global":"inventory",e.id)},removeAfterConfirmation:function(e){var n={title:g("Delete role"),body:l.getString('You are about to delete role "{{name}}". Do you want to proceed?',e),labels:{ok:g("Delete")},status:"danger"},n=i(n),t=_.partial(s.remove,e),o=_.partial(s.global.remove,e),e=s.isGlobal(e)?o:t;return n.then(e).then(function(){return c.success(g("Role deleted."))}).catch(function(e){var n=_.get(e,"status");return n&&(422===n?c.warning(g("Role cannot be deleted because it is assigned to users.")):(n=e,n=_.get(n,"data",n),r.$emit("alert",{type:"danger",text:$("<div/>").text(l.getString(n.message)).html(),detailedData:n}))),a.reject(e)})},canCreate:function(){return n.hasAnyRole([E])},newInventoryRole:function(e){var n=a.when({name:l.getString("New inventory role"),permissions:[]});e&&(n=s.detail(e).then(function(e){var e=e.data,n={};return n.name="".concat(e.name," 2"),n.permissions=_.map(e.permissions,function(e){return _.omit(e,["id"])}),n}));return n},saveInventoryRole:function(e){var n=a.when();e.id||(n=v(e,e.name).catch(h(e.name)));return n.then(_.partial(s.save,e)).then(function(){return c.success(g("Inventory role saved."))}).then(d)},saveInventoryRoleName:function(n,t){return v(n,t).then(function(){var e;return n.id?e=s.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},newGlobalRole:function(e){var n=a.when({name:l.getString("New global role")});e&&(n=s.global.detail(e).then(function(e){e=_.pick(e.data,["name","roles","applications"]);return e.name+=" 2",e}));return n},saveGlobalRole:function(n,t){return(n.id?function(){var e=r.$new(!0);return e.role=n,i({templateUrl:":::PLUGIN_PATH:::/detail/roleGlobalSaveConfirm.html",title:g("Confirm saving changes?"),scope:e})}():a.when()).then(function(){var e=a.when();return(e=n.id?e:f(n,n.name).catch(h(n.name))).then(_.partial(s.global.save,n))}).then(function(e){return s.global.updateRoles(e,t)}).then(function(){return c.success(g("Global role saved."))}).then(d)},saveGlobalRoleName:function(n,t){return f(n,t).then(function(){var e=a.when();return n.id?e=s.global.update({id:n.id,name:t}).then(function(e){return n.name=t,e}):n.name=t,e},h(t))},isUndeletable:function(e){return s.isGlobal(e)&&("admins"===_.lowerCase(e.name)||"devices"===_.lowerCase(e.name)||n.hasRole(e,"ROLE_NO_DELETE"))}};function d(){var e=new RegExp("\\/roles\\/inventory\\/(\\w+)"),e=t.path().match(e),e="/".concat(e?b:y);t.path(e),t.search("duplicate",null)}function m(e,n){e=("global"===e?R:w).replace(/:\w+/,"new");t.path(e),n&&t.search("duplicate",n)}function v(n,t){return s.list().then(function(e){return p(e,n,t)})}function p(e,n,t){e=_.filter(e,function(e){return e.id!==n.id});return _.some(e,{name:t})&&a.reject({duplicate:!0})}function h(n){return function(e){return _.get(e,"duplicate")&&c.danger(l.getString('There is already a role with the name "{{name}}"',{name:n})),a.reject()}}function f(n,t){return s.global.list().then(function(e){return p(e,n,t)})}}return{$get:d,init:function(){u(),n.addNavigation({name:g("Roles"),parent:g("Accounts"),routerLinkExact:!1,priority:4900,path:y,icon:t,showIfPermissions:{anyRole:s}})},hookViews:u}}e.$inject=["gettext","c8yViewsProvider","c8yNavigatorProvider"],angular.module("c8y.roles").provider("c8yRolesUi",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function e(c,t,o,a,i,n,d,r,f,s){var u=this,g="",e={c8y_Global:{}};function p(n){return u.svgFile={name:n.name,size:n.length},n instanceof Blob?i.readDataUri(n).then(i.decodeDataUri).then(l):i.downloadAsDataUri(n).then(i.decodeDataUri).then(function(e){return new File([e],n.name,{type:n.type})}).then(function(e){return s.sanitizeFileByLevel(e,c.config.sanitization)}).then(function(e){return i.readDataUri(e)}).then(i.decodeDataUri).then(l)}function l(e){return u.svgFile.data=e,function(){if(!u.svgFile)return;var n=c.config.mapping||{},i=c.config.deviceIds||{},t=c.config.device&&c.config.device.id;c.config.mapping={},c.config.deviceIds={},_.forEach(function(e){var n=[],i=/{{\s*([$\w]+?)\s*}}/g,t=i.exec(e);for(;null!==t;)n.push(t[1]),t=i.exec(e);return n}(u.svgFile.data),function(e){c.config.mapping[e]=n[e]?n[e]:null,c.config.deviceIds[e]=i[e]?i[e]:t||null}),function(e,c){if(!e||!c)return;_.forOwn(e,function(e,i){var n=v(e),t=r.generatePaths(n);f.list().then(function(e){var n=_.sortBy(e,function(e){return e.keyPath.length}).reverse();null===c[i]&&(_.forEach(n,function(e){_.last(e.keyPath).toUpperCase()===i.toUpperCase()&&(c[i]=e)}),_.forEach(t,function(e){_.last(e).toUpperCase()===i.toUpperCase()&&(c[i]=r.createProperty(e))}))})})}(c.config.deviceIds,c.config.mapping)}(),e}function v(n){return _.find(u.devices,function(e){return n===e.id})}function h(e,n){u.device&&u.device.id!==n.id||_.assign(u.device,n)}function m(){var e=function(e){return _(e).values().uniq().value().sort(function(e,n){return e-n}).join(",")}(c.config.deviceIds);e!==g&&(g.length&&n.stop(c.$id,"/managedobjects/".concat(g)),e.length&&(n.addListener(c.$id,"/managedobjects/".concat(e),"UPDATE",h),n.start(c.$id,"/managedobjects/".concat(e)),c.$on("$destroy",_.partial(n.stop,c.$id,"/managedobjects/".concat(e)))),g=e)}this.deviceDetail=function(e,n){var i;e&&(i=!n||!(e.name===n.name&&e.id===n.id),a.detail(e.id).then(function(e){u.device=e.data;var n=_.union([u.device.id],_.map(_.union(u.device.childAssets.references,u.device.childDevices.references),function(e){return e.managedObject.id}));_.remove(n,_.isUndefined),t.all(_.map(n,function(e){return a.detail(e)})).then(function(e){u.devices=_.map(e,function(e){var n=e.data;return _.assign({},n,{name:o("truncate")(n.name)})}),function(i){_.forOwn(c.config.mapping,function(e,n){(1===u.devices.length||i)&&(c.config.deviceIds[n]=c.config.device.id),c.config.deviceIds[n]=c.config.deviceIds[n]||c.config.device.id})}(i),u.updateComputedProperties(c.config.deviceIds,c.config.mapping)})}))},this.onSelectFile=function(n){u.loading=!0,i.upload(n,e).then(function(e){u.binaryFile=e.data,c.config.binaryId=e.data.id,p(n),c.forms.componentForm.$setDirty()}).finally(function(){u.loading=!1})},this.updateComputedProperties=function(e,c){_.isEmpty(e)||_.isEmpty(c)||_.forOwn(e,function(e,n){var i=[c[n]];if(c[n]){var t=v(e);d.attach(t,_.filter(i,function(e){return _.isObjectLike(e)}))}})},this.onMappingChange=function(){u.updateComputedProperties(c.config.deviceIds,c.config.mapping)},this.onDeviceIdsChange=function(){u.updateComputedProperties(c.config.deviceIds,c.config.mapping),m()},u.binaryFile={},c.config.mapping=c.config.mapping||{},c.config.deviceIds=c.config.deviceIds||{},c.config.devices&&delete c.config.devices,c.config.binaryId?(u.loading=!0,c.config.sanitization||(c.config.sanitization="none"),i.detail(c.config.binaryId).then(function(e){u.binaryFile=e.data,p(u.binaryFile),u.loading=!1}).then(function(){var e=[];e.push({file:u.svgFile}),u.files=e})):t.when(),m(),c.$watch("config.device",this.deviceDetail,!0),c.$watch("config.mapping",this.onMappingChange,!0),c.$on("$destroy",function(){_.forEach(c.config.deviceIds,function(e){d.detach(v(e))})})}e.$inject=["$scope","$q","$filter","c8yDevices","c8yBinary","c8yRealtime","c8yComputedProperties","fieldbusPropertyGenerator","c8yPropertiesLibrary","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetConfigCtrl",e)}();
1
+ "use strict";!function(){function e(a,i,c,o,t,n,d,r,f,s){var g=this,u="",e={c8y_Global:{}};function p(n){if(g.svgFile={name:n.name,size:n.length},n instanceof Blob)return t.readDataUri(n).then(t.decodeDataUri).then(l);t.downloadAsDataUri(n).then(t.decodeDataUri).then(function(e){return new File([e],n.name,{type:n.type})}).then(function(e){return s.sanitizeFileByLevel(e,a.config.sanitization)}).then(function(e){return t.readDataUri(e)}).then(t.decodeDataUri).then(l)}function l(e){var n,i,t,c,o;return g.svgFile.data=e,g.svgFile&&(n=a.config.mapping||{},i=a.config.deviceIds||{},t=a.config.device&&a.config.device.id,a.config.mapping={},a.config.deviceIds={},_.forEach(function(e){var n=[],i=/{{\s*([$\w]+?)\s*}}/g,t=i.exec(e);for(;null!==t;)n.push(t[1]),t=i.exec(e);return n}(g.svgFile.data),function(e){a.config.mapping[e]=n[e]||null,a.config.deviceIds[e]=i[e]||t||null}),c=a.config.deviceIds,o=a.config.mapping,c)&&o&&_.forOwn(c,function(e,n){var e=v(e),i=r.generatePaths(e);f.list().then(function(e){e=_.sortBy(e,function(e){return e.keyPath.length}).reverse();null===o[n]&&(_.forEach(e,function(e){_.last(e.keyPath).toUpperCase()===n.toUpperCase()&&(o[n]=e)}),_.forEach(i,function(e){_.last(e).toUpperCase()===n.toUpperCase()&&(o[n]=r.createProperty(e))}))})}),e}function v(n){return _.find(g.devices,function(e){return n===e.id})}function h(e,n){g.device&&g.device.id!==n.id||_.assign(g.device,n)}function m(){e=a.config.deviceIds;var e=_(e).values().uniq().value().sort(function(e,n){return e-n}).join(",");e!==u&&(u.length&&n.stop(a.$id,"/managedobjects/".concat(u)),e.length&&(n.addListener(a.$id,"/managedobjects/".concat(e),"UPDATE",h),n.start(a.$id,"/managedobjects/".concat(e)),a.$on("$destroy",_.partial(n.stop,a.$id,"/managedobjects/".concat(e)))),u=e)}this.deviceDetail=function(e,n){var t;e&&(t=!n||!(e.name===n.name&&e.id===n.id),o.detail(e.id).then(function(e){g.device=e.data;e=_.union([g.device.id],_.map(_.union(g.device.childAssets.references,g.device.childDevices.references),function(e){return e.managedObject.id}));_.remove(e,_.isUndefined),i.all(_.map(e,function(e){return o.detail(e)})).then(function(e){var i;g.devices=_.map(e,function(e){e=e.data;return _.assign({},e,{name:c("truncate")(e.name)})}),i=t,_.forOwn(a.config.mapping,function(e,n){1!==g.devices.length&&!i||(a.config.deviceIds[n]=a.config.device.id),a.config.deviceIds[n]=a.config.deviceIds[n]||a.config.device.id}),g.updateComputedProperties(a.config.deviceIds,a.config.mapping)})}))},this.onSelectFile=function(n){g.loading=!0,t.upload(n,e).then(function(e){g.binaryFile=e.data,a.config.binaryId=e.data.id,p(n),a.forms.componentForm.$setDirty()}).finally(function(){g.loading=!1})},this.updateComputedProperties=function(e,t){_.isEmpty(e)||_.isEmpty(t)||_.forOwn(e,function(e,n){var i=[t[n]];t[n]&&(n=v(e),d.attach(n,_.filter(i,function(e){return _.isObjectLike(e)})))})},this.onMappingChange=function(){g.updateComputedProperties(a.config.deviceIds,a.config.mapping)},this.onDeviceIdsChange=function(){g.updateComputedProperties(a.config.deviceIds,a.config.mapping),m()},g.binaryFile={},a.config.mapping=a.config.mapping||{},a.config.deviceIds=a.config.deviceIds||{},a.config.devices&&delete a.config.devices,function(){if(!a.config.binaryId)return i.when();g.loading=!0,a.config.sanitization||(a.config.sanitization="none"),t.detail(a.config.binaryId).then(function(e){g.binaryFile=e.data,p(g.binaryFile),g.loading=!1}).then(function(){var e=[];e.push({file:g.svgFile}),g.files=e})}(),m(),a.$watch("config.device",this.deviceDetail,!0),a.$watch("config.mapping",this.onMappingChange,!0),a.$on("$destroy",function(){_.forEach(a.config.deviceIds,function(e){d.detach(v(e))})})}e.$inject=["$scope","$q","$filter","c8yDevices","c8yBinary","c8yRealtime","c8yComputedProperties","fieldbusPropertyGenerator","c8yPropertiesLibrary","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetConfigCtrl",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 n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}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){var t=_toPrimitive(e,"string");return"symbol"===_typeof(t)?t:String(t)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);var r=n.call(e,t||"default");if("object"!==_typeof(r))return r;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 o={},r=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 r=!1;return _.forEach(e,function(e,t){var n=!_.isNull(e);o[t]=!n,r=r||!n}),!r},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:o,clearMapping:function(e){e.config=null,a()},setMapping:function(t){s.set(r,c(i.deviceIds[t.placeholder])),(e=t,l.openSelector({selectSingle:!0,managedObject:c(i.deviceIds[e.placeholder])})).then(function(e){t.config=e}).then(a).finally(function(){s.clear(r)});var e},editComputedProperty:function(t){s.set(r,c(i.deviceIds[t.placeholder])),p.edit(t.config).then(function(e){t.config.config=e}).then(a).finally(function(){s.clear(r)})},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){var t=e.config?_objectSpread(_objectSpread({},e.config),{},{label:y.getString(e.config.label)}):e.config;return f.humanizeMapping(t)}}),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:String(e)}function _toPrimitive(e,t){if("object"!==_typeof(e)||null===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 e(g,p,u,v,f){return{require:"ngModel",restrict:"EA",link:function(i,a,e,n){var c,s;function t(){if(s=n.$viewValue){c=i.$new(!0),_.forEach(i.mapping,function(e,t){Object.defineProperty(c,t,{enumerable:!0,get:_.partial(r,t)})}),_.assign(c,{goToGroupDetails:d,goToDeviceDetails:l,getActiveAlarmsStatusClass:o,isReady:_.constant(!0)});var e=angular.element('<div ng-if="isReady()" style="width:100%;height:100%;transform: translateZ(0);"></div>'),t=$.parseHTML(s);$(t).is("svg")?(e.append($(t).filter("svg")),n.$setValidity("c8y-scada-svg",!0)):(e.html('<div class="alert-warning" translate style="padding: 20px;">'.concat(f("Invalid SVG"),"</div>")),n.$setValidity("c8y-scada-svg",!1)),g(e)(c),a.html(""),a.append(e)}else n.$setValidity("c8y-scada-svg",!1)}function r(t){var e=i.mapping[t],a=_.find(i.devices,function(e){return i.deviceIds[t]===e.id});return v.getValueForMapping(a,e)}function d(e){p.path("/group/".concat(e))}function l(e){p.path("/device/".concat(e))}function o(e){return _.toLower(u.getHighestSeverityFromAlarmsStatus(e))||"none"}n.$render=t,i.$watch("mapping",t),i.$watch("deviceIds",t,!0)},scope:{mapping:"=",devices:"=",deviceIds:"="},replace:!1}}e.$inject=["$compile","$location","c8yAlarms","ScadaWidgetUtilSvc","gettext"],angular.module("c8y.parts.scadaWidget").directive("c8yScadaSvg",e)}();
1
+ "use strict";!function(){function e(g,p,u,v,f){return{require:"ngModel",restrict:"EA",link:function(i,a,e,n){var c,s;function t(){var e,t;(s=n.$viewValue)?(c=i.$new(!0),_.forEach(i.mapping,function(e,t){Object.defineProperty(c,t,{enumerable:!0,get:_.partial(r,t)})}),_.assign(c,{goToGroupDetails:d,goToDeviceDetails:o,getActiveAlarmsStatusClass:l,isReady:_.constant(!0)}),e=angular.element('<div ng-if="isReady()" style="width:100%;height:100%;transform: translateZ(0);"></div>'),t=$.parseHTML(s),$(t).is("svg")?(e.append($(t).filter("svg")),n.$setValidity("c8y-scada-svg",!0)):(e.html('<div class="alert-warning" translate style="padding: 20px;">'.concat(f("Invalid SVG"),"</div>")),n.$setValidity("c8y-scada-svg",!1)),g(e)(c),a.html(""),a.append(e)):n.$setValidity("c8y-scada-svg",!1)}function r(t){var e=i.mapping[t],a=_.find(i.devices,function(e){return i.deviceIds[t]===e.id});return v.getValueForMapping(a,e)}function d(e){p.path("/group/".concat(e))}function o(e){p.path("/device/".concat(e))}function l(e){return _.toLower(u.getHighestSeverityFromAlarmsStatus(e))||"none"}n.$render=t,i.$watch("mapping",t),i.$watch("deviceIds",t,!0)},scope:{mapping:"=",devices:"=",deviceIds:"="},replace:!1}}e.$inject=["$compile","$location","c8yAlarms","ScadaWidgetUtilSvc","gettext"],angular.module("c8y.parts.scadaWidget").directive("c8yScadaSvg",e)}();
@@ -1 +1 @@
1
- "use strict";!function(){function i(){this.isGood=function(e){return _.isObjectLike(e)&&e.id&&e.keyPath&&_.isArray(e.keyPath)&&0!==e.keyPath.length},this.humanize=function(e){return e.label},this.getValue=function(e,t){return r(e,t.keyPath)},this.getRawValue=this.getValue}function u(){this.isGood=function(e){return _.isString(e)&&0!==e.length},this.humanize=function(e){return['"',e,'"'].join("")},this.getValue=function(e,t){return t},this.getRawValue=this.getValue}function a(e,a){function n(t){return t?(Object.prototype.hasOwnProperty.call(t,"__fieldbusDeviceType")||(Object.defineProperty(t,"__fieldbusDeviceType",{configurable:!0,writable:!0,value:!1}),e.getDeviceTypeFromDevice(t).then(e.addDiscreteIOsMeta).then(e.addRegistersMeta).then(function(e){t.__fieldbusDeviceType=e})),t):""}function i(e,t,n){if(!e.__fieldbusDeviceType)return r(e,t.keyPath);var i,u=_.head(t.keyPath);return"c8y_CoilStatus"===u?i=_.find(e.__fieldbusDeviceType.c8y_Coils,{name:_.last(t.keyPath)}):"c8y_RegisterStatus"===u&&(i=_.find(e.__fieldbusDeviceType.c8y_Registers,{name:_.last(t.keyPath)})),i?(n?a.getCurrentElementValueFormatted:a.getCurrentElementValue)(e,i):r(e,t.keyPath)}this.isGood=function(e){return _.isObjectLike(e)&&e.id&&e.keyPath&&_.isArray(e.keyPath)&&0!==e.keyPath.length&&!0===e.fieldbus},this.humanize=function(e){return e.label},this.getValue=function(e,t){return i(n(e),t,!0)},this.getRawValue=function(e,t){return i(n(e),t,!1)}}function r(e,t){for(var n=e,i=0;i<t.length&&null!=n;i++)n=n[t[i]];return n}angular.module("c8y.parts.scadaWidget").service("ScadaWidgetUtilSvc",["c8yDeviceDatabase","c8yModbusDevice",function(e,t){var n=[new a(e,t),new i,new u];this.humanizeMapping=function(e){return null==e?"":this.getHandler(e).humanize(e)},this.getValueForMapping=function(e,t){return null==t?"":this.getHandler(t).getValue(e,t)},this.getRawValueForMapping=function(e,t){return null==t?"":this.getHandler(t).getRawValue(e,t)},this.getHandler=function(t){var e=_.find(n,function(e){return e.isGood(t)});if(null==e)throw new Error("invalid mapping");return e}}])}();
1
+ "use strict";!function(){function i(){this.isGood=function(e){return _.isObjectLike(e)&&e.id&&e.keyPath&&_.isArray(e.keyPath)&&0!==e.keyPath.length},this.humanize=function(e){return e.label},this.getValue=function(e,t){return r(e,t.keyPath)},this.getRawValue=this.getValue}function u(){this.isGood=function(e){return _.isString(e)&&0!==e.length},this.humanize=function(e){return['"',e,'"'].join("")},this.getValue=function(e,t){return t},this.getRawValue=this.getValue}function a(e,a){function n(t){return t?(Object.prototype.hasOwnProperty.call(t,"__fieldbusDeviceType")||(Object.defineProperty(t,"__fieldbusDeviceType",{configurable:!0,writable:!0,value:!1}),e.getDeviceTypeFromDevice(t).then(e.addDiscreteIOsMeta).then(e.addRegistersMeta).then(function(e){t.__fieldbusDeviceType=e})),t):""}function i(e,t,n){var i,u;return e.__fieldbusDeviceType&&("c8y_CoilStatus"===(u=_.head(t.keyPath))?i=_.find(e.__fieldbusDeviceType.c8y_Coils,{name:_.last(t.keyPath)}):"c8y_RegisterStatus"===u&&(i=_.find(e.__fieldbusDeviceType.c8y_Registers,{name:_.last(t.keyPath)})),i)?(n?a.getCurrentElementValueFormatted:a.getCurrentElementValue)(e,i):r(e,t.keyPath)}this.isGood=function(e){return _.isObjectLike(e)&&e.id&&e.keyPath&&_.isArray(e.keyPath)&&0!==e.keyPath.length&&!0===e.fieldbus},this.humanize=function(e){return e.label},this.getValue=function(e,t){return i(n(e),t,!0)},this.getRawValue=function(e,t){return i(n(e),t,!1)}}function r(e,t){for(var n=e,i=0;i<t.length&&null!=n;i++)n=n[t[i]];return n}angular.module("c8y.parts.scadaWidget").service("ScadaWidgetUtilSvc",["c8yDeviceDatabase","c8yModbusDevice",function(e,t){var n=[new a(e,t),new i,new u];this.humanizeMapping=function(e){return null==e?"":this.getHandler(e).humanize(e)},this.getValueForMapping=function(e,t){return null==t?"":this.getHandler(t).getValue(e,t)},this.getRawValueForMapping=function(e,t){return null==t?"":this.getHandler(t).getRawValue(e,t)},this.getHandler=function(t){var e=_.find(n,function(e){return e.isGood(t)});if(null==e)throw new Error("invalid mapping");return e}}])}();