@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.
- package/NOTICES +0 -34
- package/aclManagement/controllers/permissionEditorCtrl.js +1 -1
- package/actilityProviderSettings/actilityProviderSettings.module.js +1 -1
- package/administration-alarmMapping/controllers/alarmMapping.js +1 -1
- package/administration-applicationSettings/controllers/applicationSettings.js +1 -1
- package/administration-applications/appWizard/appWizardExternalStep.component.js +1 -1
- package/administration-applications/appWizard/appWizardSmartAppStep.component.js +1 -1
- package/administration-applications/appWizard/appWizardUploadStep.component.js +1 -1
- package/administration-applications/appWizard/context-path.directive.js +1 -1
- package/administration-applications/application-detail/application-detail.component.js +1 -1
- package/administration-applications/application-list-view/application-list-view.component.js +1 -1
- package/administration-applications/controllers/applicationAccessEditor.js +1 -1
- package/administration-archivesEditor/list.controller.js +1 -1
- package/administration-auditLogs/filter.directive.js +1 -1
- package/administration-deviceUsers/controllers/deviceUserDetail.js +1 -1
- package/administration-homeAdministration/home-administration.component.js +1 -1
- package/administration-statistics/controllers/statistics.js +1 -1
- package/administration-storageLimitEmail/controllers/storageLimitCtrl.js +1 -1
- package/alarms/widget-config.controller.js +1 -1
- package/alarms/widget.controller.js +1 -1
- package/alarmsEventsExplorer/alarmsEventsTimelinesChart/alarmsEventsTimelinesChart.component.js +1 -1
- package/alarmsEventsExplorer/alarmsEventsTimelinesChart/alarmsEventsTimelinesChart.service.js +1 -1
- package/alarmsEventsExplorer/alarmsEventsTimelinesConfig/alarmsEventsTimelinesConfigModal.controller.js +1 -1
- package/app-logs/app-instance-logs/app-instance-logs.component.js +1 -1
- package/app-logs/app-logs/app-logs.component.js +1 -1
- package/app-logs/app-logs.service.js +1 -1
- package/app-status/app-status/app-status.component.js +1 -1
- package/app-status/app-tenant-subscriptions-list/app-tenant-subscriptions-list.component.js +1 -1
- package/app-status/index.js +1 -1
- package/app-status-ui/index.js +1 -1
- package/applicationLinks/applications.controller.js +1 -1
- package/asset-notes/assetNotes.service.js +1 -1
- package/assetPropertyWidget/main.controller.js +1 -1
- package/assetTable/assetTable2/assets.controller.js +1 -1
- package/assetTable/assetTable2/assets.service.js +1 -1
- package/assetTable/assetTable2/index.js +1 -1
- package/assetTable/assetTable2/rendererButton.controller.js +1 -1
- package/assetTable/assetTable2/rendererButtonConfig.controller.js +1 -1
- package/assetTable/assetTable2/rendererIcon.controller.js +1 -1
- package/assetTable/assetTable2/sort.directive.js +1 -1
- package/assetTable/assets.controller.js +1 -1
- package/assetTable/assetsConfig.controller.js +1 -1
- package/assetTable/comparisons.service.js +1 -1
- package/assetTable/counterColumns.service.js +1 -1
- package/binary-file-download/binary-file-download.component.js +1 -1
- package/binary-file-download/binary-file-download.config.js +1 -1
- package/binaryArtefactsManagement/controllers/list.js +1 -1
- package/binaryArtefactsManagement/index.js +1 -1
- package/cell-id-information-activator/cell-id-information-activator.config.js +1 -1
- package/cell-id-information-activator/cell-id-information-activator.service.js +1 -1
- package/cell-id-usage-statistics/cell-id-usage-statistics.component.js +1 -1
- package/cell-id-usage-statistics/cell-id-usage-statistics.service.js +1 -1
- package/cockpit-assetCount/services/assetCount.js +1 -1
- package/cockpit-cockpitConfig/services/navigator.js +1 -1
- package/cockpit-reports/reports.service.js +1 -1
- package/cockpit-smartRulesUI/index.js +1 -1
- package/commandTemplates/controllers/commandTemplates.js +1 -1
- package/configurationRepository/configurationRepository.service.js +1 -1
- package/configurationRepository/list.controller.js +1 -1
- package/connectivityV2/connectivityV2.component.js +1 -1
- package/connectivityV2/connectivityV2.module.js +1 -1
- package/connectivityV2/connectivityV2.service.js +1 -1
- package/connectivityV2/sms.component.js +1 -1
- package/connectivityV2/status.component.js +1 -1
- package/core/angularStart.js +1 -1
- package/core/bootstrap.js +1 -1
- package/core/core/index.js +1 -1
- package/core/core/locales.js +1 -1
- package/core/core/services/actility.js +1 -1
- package/core/core/services/alarms.js +1 -1
- package/core/core/services/application.js +1 -1
- package/core/core/services/audits.js +1 -1
- package/core/core/services/auth.js +1 -1
- package/core/core/services/base.js +1 -1
- package/core/core/services/binary.js +1 -1
- package/core/core/services/binaryCommon.js +1 -1
- package/core/core/services/combain.js +1 -1
- package/core/core/services/connectivity.js +1 -1
- package/core/core/services/counter.js +1 -1
- package/core/core/services/deviceBulkControl.js +1 -1
- package/core/core/services/deviceControl.js +1 -1
- package/core/core/services/deviceGroup.js +1 -1
- package/core/core/services/deviceShell.js +1 -1
- package/core/core/services/deviceStatus.js +1 -1
- package/core/core/services/devices.js +1 -1
- package/core/core/services/dynamicGroups.js +1 -1
- package/core/core/services/events.js +1 -1
- package/core/core/services/geo.js +1 -1
- package/core/core/services/groupTypesConfig.js +1 -1
- package/core/core/services/groups.js +1 -1
- package/core/core/services/identity.js +1 -1
- package/core/core/services/inventory.js +1 -1
- package/core/core/services/jsonSchemas.js +1 -1
- package/core/core/services/kpi.js +1 -1
- package/core/core/services/license.js +1 -1
- package/core/core/services/loginOptions.js +1 -1
- package/core/core/services/measurements.js +1 -1
- package/core/core/services/messaging.js +1 -1
- package/core/core/services/notifications.js +1 -1
- package/core/core/services/permissions.js +1 -1
- package/core/core/services/promise.js +1 -1
- package/core/core/services/queriesUtil.js +1 -1
- package/core/core/services/realtime.js +1 -1
- package/core/core/services/realtimeLongPollingTransport.js +1 -1
- package/core/core/services/retentions.js +1 -1
- package/core/core/services/roles.js +1 -1
- package/core/core/services/settings.js +1 -1
- package/core/core/services/simulator.js +1 -1
- package/core/core/services/smartRestTemplates.js +1 -1
- package/core/core/services/statement.js +1 -1
- package/core/core/services/statistics.js +1 -1
- package/core/core/services/tenant.js +1 -1
- package/core/core/services/tfaSettings.js +1 -1
- package/core/core/services/tracker.js +1 -1
- package/core/core/services/user.js +1 -1
- package/core/core/services/userGroup.js +1 -1
- package/core/core/services/userPreferences.js +1 -1
- package/core/core/services/util.js +1 -1
- package/core/index.js +1 -1
- package/core/sdk/directives/repeat.js +1 -1
- package/core/sdk/providers/cumulocity.js +1 -1
- package/core/ui/components/battery/battery.js +1 -1
- package/core/ui/components/errorFeedback.js +1 -1
- package/core/ui/components/passwordStrengthChecklist.js +1 -1
- package/core/ui/components/signalStrength/signal.js +1 -1
- package/core/ui/components/timelinesChart.js +1 -1
- package/core/ui/configurable-device-list-columns/configurable-columns.service.js +1 -1
- package/core/ui/configurable-device-list-columns/modal-columns-configure.component.js +1 -1
- package/core/ui/configurable-device-list-columns/unique-by.directive.js +1 -1
- package/core/ui/containers/header.component.js +1 -1
- package/core/ui/containers/wizard.component.js +1 -1
- package/core/ui/containers/wizardSlide.jquery.js +1 -1
- package/core/ui/controllers/deviceList.js +1 -1
- package/core/ui/controllers/editRetentionRule.js +1 -1
- package/core/ui/controllers/eventList.js +1 -1
- package/core/ui/controllers/listPagination/listPagination.controller.js +1 -1
- package/core/ui/controllers/loginCtrl.js +1 -1
- package/core/ui/controllers/radialGauge.js +1 -1
- package/core/ui/csvExporter/csv-escape-formulas-option.decorator.js +1 -1
- package/core/ui/csvExporter/csvExporter.controller.js +1 -1
- package/core/ui/csvExporter/csvExporter.directive.js +1 -1
- package/core/ui/csvExporter/csvExporter.service.js +1 -1
- package/core/ui/directives/aggregation.js +1 -1
- package/core/ui/directives/alarmList.js +1 -1
- package/core/ui/directives/appIcon.js +1 -1
- package/core/ui/directives/auditList.js +1 -1
- package/core/ui/directives/autocomplete.js +1 -1
- package/core/ui/directives/binaryInput.js +1 -1
- package/core/ui/directives/binaryOut.js +1 -1
- package/core/ui/directives/codeEditor.js +1 -1
- package/core/ui/directives/dateTimePicker.js +1 -1
- package/core/ui/directives/deviceGroupSelector.js +1 -1
- package/core/ui/directives/downloadButton.js +1 -1
- package/core/ui/directives/editRetentionRule.js +1 -1
- package/core/ui/directives/filePicker.js +1 -1
- package/core/ui/directives/icon.js +1 -1
- package/core/ui/directives/ifAllowed.js +1 -1
- package/core/ui/directives/interval.js +1 -1
- package/core/ui/directives/linearGauge.js +1 -1
- package/core/ui/directives/loadMore.js +1 -1
- package/core/ui/directives/map-plugins/geofence-layer.js +1 -1
- package/core/ui/directives/map.js +1 -1
- package/core/ui/directives/map2.js +1 -1
- package/core/ui/directives/max.js +1 -1
- package/core/ui/directives/min.js +1 -1
- package/core/ui/directives/number.js +1 -1
- package/core/ui/directives/phoneNumber.js +1 -1
- package/core/ui/directives/pieChart.js +1 -1
- package/core/ui/directives/rdbDump.js +1 -1
- package/core/ui/directives/realtimeButton.js +1 -1
- package/core/ui/directives/renderer.js +1 -1
- package/core/ui/directives/scrollLoad.js +1 -1
- package/core/ui/directives/silo.js +1 -1
- package/core/ui/directives/sunburstChart.js +1 -1
- package/core/ui/directives/textOut.js +1 -1
- package/core/ui/directives/validateUniqueExternalId.js +1 -1
- package/core/ui/fieldbus/fieldbus.service.js +1 -1
- package/core/ui/filteringSorting/filteredSortedList.controller.js +1 -1
- package/core/ui/filteringSorting/filteringSortingCollections.service.js +1 -1
- package/core/ui/filteringSorting/filteringSortingColumns.service.js +1 -1
- package/core/ui/filteringSorting/filteringSortingInventoryQueries.service.js +1 -1
- package/core/ui/filters/absoluteDate.js +1 -1
- package/core/ui/filters/bytes.js +1 -1
- package/core/ui/filters/capitalizestring.js +1 -1
- package/core/ui/filters/checkForDate.js +1 -1
- package/core/ui/filters/dateParts.js +1 -1
- package/core/ui/filters/distance.js +1 -1
- package/core/ui/filters/duration.js +1 -1
- package/core/ui/filters/filter-translate.decorator.js +1 -1
- package/core/ui/filters/filterByFields.js +1 -1
- package/core/ui/filters/hex.filter.js +1 -1
- package/core/ui/filters/humanize2.js +1 -1
- package/core/ui/filters/humanizeAppName.js +1 -1
- package/core/ui/filters/orderBy-translate.decorator.js +1 -1
- package/core/ui/filters/relativedate.js +1 -1
- package/core/ui/filters/safeLinks.js +1 -1
- package/core/ui/forms/checkDirty.directive.js +1 -1
- package/core/ui/forms/hex-input.directive.js +1 -1
- package/core/ui/forms/host-address.validator.js +1 -1
- package/core/ui/forms/http-protocol.validator.js +1 -1
- package/core/ui/forms/model-options.directive.js +1 -1
- package/core/ui/forms/regular-expression.validator.js +1 -1
- package/core/ui/forms/required-input-placeholder.directive.js +1 -1
- package/core/ui/forms/saveButtonFooter.component.js +1 -1
- package/core/ui/forms/search.component.js +1 -1
- package/core/ui/forms/ssh-key-input.js +1 -1
- package/core/ui/forms/uib-dropdown-dropup.directive.js +1 -1
- package/core/ui/forms/uib-dropdown.decorator.js +1 -1
- package/core/ui/forms/validate-url-segment.validator.js +1 -1
- package/core/ui/groups/group-create-and-assign.component.js +1 -1
- package/core/ui/header/action-bar.service.js +1 -1
- package/core/ui/header/actions.provider.js +1 -1
- package/core/ui/index.js +1 -1
- package/core/ui/inputDirectives/colorpicker.js +1 -1
- package/core/ui/itemSelector/itemSelector.component.js +1 -1
- package/core/ui/leaflet/leaflet-directive.decorator.js +1 -1
- package/core/ui/lists/list-display-control.component.js +1 -1
- package/core/ui/lists/quickLinksList.service.js +1 -1
- package/core/ui/locales/locales.provider.js +1 -1
- package/core/ui/navigation/breadcrumbs.component.js +1 -1
- package/core/ui/navigation/breadcrumbs.provider.js +1 -1
- package/core/ui/navigation/tabs.component.js +1 -1
- package/core/ui/navigation/tabs.provider.js +1 -1
- package/core/ui/notifications/accessDenied.service.js +1 -1
- package/core/ui/notifications/alert.controller.js +1 -1
- package/core/ui/notifications/alert.service.js +1 -1
- package/core/ui/operations/operations-timeline.component.js +1 -1
- package/core/ui/properties/children.computedProperty.js +1 -1
- package/core/ui/properties/computedProperties.provider.js +1 -1
- package/core/ui/properties/configurationSnapshot.computedProperty.js +1 -1
- package/core/ui/properties/counters.computedProperty.js +1 -1
- package/core/ui/properties/lastDeviceMessage.computedProperty.js +1 -1
- package/core/ui/properties/lastMeasurement.computedProperty.js +1 -1
- package/core/ui/properties/propertiesLibrary.service.js +1 -1
- package/core/ui/properties/propertySelector.controller.js +1 -1
- package/core/ui/properties/schemaProperties.service.js +1 -1
- package/core/ui/properties/schemaPropertySelector.controller.js +1 -1
- package/core/ui/providers/beta.js +1 -1
- package/core/ui/providers/httpCache.js +1 -1
- package/core/ui/providers/navigator.js +1 -1
- package/core/ui/providers/objectActions.js +1 -1
- package/core/ui/providers/renderers.js +1 -1
- package/core/ui/providers/search.js +1 -1
- package/core/ui/providers/views.js +1 -1
- package/core/ui/providers/zip.js +1 -1
- package/core/ui/roles/roles-matrix.component.js +1 -1
- package/core/ui/sanitize-html/sanitize-html.js +1 -1
- package/core/ui/sanitize-html/sanitize-html.service.js +1 -1
- package/core/ui/schemaForm/deviceGroupIdPicker.config.js +1 -1
- package/core/ui/schemaForm/fileUpload.config.js +1 -1
- package/core/ui/schemaForm/fileUpload.directive.js +1 -1
- package/core/ui/schemaForm/overrides/decorators/decorators.decorator.js +1 -1
- package/core/ui/schemaForm/schemaEditor.component.js +1 -1
- package/core/ui/schemaForm/schemaForm.component.js +1 -1
- package/core/ui/schemaForm/schemaForm.run.js +1 -1
- package/core/ui/schemaForm/schemaFormHelper.service.js +1 -1
- package/core/ui/schemaForm/schemaPropertyEditor.component.js +1 -1
- package/core/ui/services/contextDetailsShared.service.js +1 -1
- package/core/ui/services/deviceListColumns.js +1 -1
- package/core/ui/services/docs.js +1 -1
- package/core/ui/services/groupsHierarchyNavigator.js +1 -1
- package/core/ui/services/groupsHierarchySvc.js +1 -1
- package/core/ui/services/loginService.js +1 -1
- package/core/ui/services/measurementsReport.js +1 -1
- package/core/ui/services/modal.js +1 -1
- package/core/ui/services/passwordStrengthCheckerFactory.js +1 -1
- package/core/ui/services/support.js +1 -1
- package/core/ui/services/uiconfig.js +1 -1
- package/core/ui/services/util.js +1 -1
- package/core/ui/smartrules/smartRulesAvailability.service.js +1 -1
- package/core/ui/title/title.controller.js +1 -1
- package/core/ui/title/title.provider.js +1 -1
- package/core/ui/user/editUser.controller.js +1 -1
- package/core/ui/user/editUser.directive.js +1 -1
- package/core/ui/user/measurementUnitPreference.component.js +1 -1
- package/core/ui/user/rolesUiStrings.constant.js +1 -1
- package/core/ui/user/userPicker.component.js +1 -1
- package/core/ui/user/userSettingsBlocks.provider.js +1 -1
- package/core/ui/user/userUtil.service.js +1 -1
- package/core/ui/utils/copyToClipboard.directive.js +1 -1
- package/core/ui/utils/guide-docs.directive.js +1 -1
- package/core/ui/utils/uiComponent.directive.js +1 -1
- package/core/update-query-params.js +1 -1
- package/dashboard2/dashboard/dashboardSelect.controller.js +1 -1
- package/dashboard2/dashboard.service.js +1 -1
- package/dashboard2/dashboardInventory.service.js +1 -1
- package/dataBroker/connectors/connectorEditor.component.js +1 -1
- package/dataBroker/connectors/connectors.service.js +1 -1
- package/dataBroker/connectorsAlarms/connectorAlarms.component.js +1 -1
- package/dataBroker/dataBroker.config.js +1 -1
- package/dataBroker/subscriptions/subscriptions.component.js +1 -1
- package/dataPointExplorer/controllers/dataPointAdd.js +1 -1
- package/dataPointExplorer/controllers/dataPointExplorer.js +1 -1
- package/dataPointExplorer/controllers/dataPointItem.js +1 -1
- package/dataPointExplorer/controllers/dataPointList.js +1 -1
- package/dataPointExplorer/controllers/dataPointWidget.js +1 -1
- package/dataPointExplorer/controllers/dataPointWidgetConfig.js +1 -1
- package/dataPointExplorer/directives/dataPointValidator.js +1 -1
- package/dataPointExplorer/services/dataPoints.js +1 -1
- package/dataPointTable/dataPointTable.controller.js +1 -1
- package/dataPointTable/dataPointTable.directive.js +1 -1
- package/dataPointTable/dataPointTable.service.js +1 -1
- package/dataPointTable/realtimeRadioButton.directive.js +1 -1
- package/dataPointTable/widget.controller.js +1 -1
- package/device-protocol-actility/actility-device.provider.js +1 -1
- package/device-protocol-canbus/canbus-device.provider.js +1 -1
- package/device-protocol-canopen/canopen-device.provider.js +1 -1
- package/device-protocol-deviceDatabase4/device-type-create-step.component.js +1 -1
- package/device-protocol-deviceDatabase4/device-type-protocol-base.provider.js +1 -1
- package/device-protocol-deviceDatabase4/device-type-row-info.component.js +1 -1
- package/device-protocol-impact/impact-detail.component.js +1 -1
- package/device-protocol-impact/impact.provider.js +1 -1
- package/device-protocol-lora/lora-device.provider.js +1 -1
- package/device-protocol-lpwan/lpwan-device.provider.js +1 -1
- package/device-protocol-lwm2m/lwm2m.provider.js +1 -1
- package/device-protocol-lwm2m/lwm2mFinalStep.component.js +1 -1
- package/device-protocol-lwm2m/lwm2mUploadStep.component.js +1 -1
- package/device-protocol-lwm2m/lwm2mValidationRules/lwm2mValidationRule.component.js +1 -1
- package/device-protocol-lwm2m/lwm2mValidationRules/lwm2mValidationRules.component.js +1 -1
- package/device-protocol-modbus/modbus-device.provider.js +1 -1
- package/device-protocol-opcua/opcua-device.provider.js +1 -1
- package/device-protocol-opcua-v2/opcua-device-v2.provider.js +1 -1
- package/device-protocol-opcua-v2/opcua-v2-row-info.component.js +1 -1
- package/device-protocol-profibus/profibus-device.provider.js +1 -1
- package/device-protocol-sigfox/sigfox-device.provider.js +1 -1
- package/device-protocol-snmp/snmp-device.provider.js +1 -1
- package/device-protocols/device-protocol-import-button.component.js +1 -1
- package/device-protocols/deviceProtocolList.component.js +1 -1
- package/device-protocols/deviceProtocolSelect.component.js +1 -1
- package/device-protocols/deviceProtocolUi.provider.js +1 -1
- package/device-protocols/object-mapping.component.js +1 -1
- package/device-protocols/object-mappings.service.js +1 -1
- package/deviceActility/actilityUI.provider.js +1 -1
- package/deviceActility/deviceActility.module.js +1 -1
- package/deviceConfiguration/index.js +1 -1
- package/deviceControlMessage/controllers/deviceControlMessageWidget.js +1 -1
- package/deviceControlRelay/relayControl/relayControl.controller.js +1 -1
- package/deviceControlRelay/relayControl/relayControl.directive.js +1 -1
- package/deviceControlRelay/widget.controller.js +1 -1
- package/deviceControlRelayArray/relayArrayControl/relayArrayControl.controller.js +1 -1
- package/deviceControlRelayArray/widget.controller.js +1 -1
- package/deviceDatabase4/detail/device-type-detail.component.js +1 -1
- package/deviceDatabase4/detail/holding-registers.component.js +1 -1
- package/deviceDatabase4/detail/message-id-configuration-description.component.js +1 -1
- package/deviceDatabase4/device-database.service.js +1 -1
- package/deviceDatabase4/device-type-list.component.js +1 -1
- package/deviceDatabase4/modals/configure-discrete-io.component.js +1 -1
- package/deviceDatabase4/modals/configure-register.component.js +1 -1
- package/deviceDatabase4/modals/import-device-type.component.js +1 -1
- package/deviceDatabase4/modals/select-fieldbus-property.component.js +1 -1
- package/deviceDatabase4/parsers/device-type-parser-eds.service.js +1 -1
- package/deviceDatabase4/parsers/device-type-parser-json.service.js +1 -1
- package/deviceDatabase4/parsers/device-type-parser-mib.service.js +1 -1
- package/deviceDatabase4/property-generator.service.js +1 -1
- package/deviceDatabase4/unique.directive.js +1 -1
- package/deviceDatabase4/validate-value-in-register-range.directive.js +1 -1
- package/deviceDatabase4/vendor/ini-legacy.js +1 -1
- package/deviceDetail/index.js +1 -1
- package/deviceDetailIdentity/controllers/identity.js +1 -1
- package/deviceDetailIdentity/index.js +1 -1
- package/deviceGroupAssignment/groupAssignment.component.js +1 -1
- package/devicePropertyWidget/controllers/config.js +1 -1
- package/devicePropertyWidget/controllers/widget.js +1 -1
- package/devicePropertyWidget/directives/fragmentCheckboxList.js +1 -1
- package/devicePropertyWidget/services/moRealTimeDetails.js +1 -1
- package/deviceSelector/controllers/deviceSelectorComboCtrl.js +1 -1
- package/deviceSelector/controllers/deviceSelectorCtrl.js +1 -1
- package/deviceSelector/controllers/deviceSelectorListCtrl.js +1 -1
- package/deviceSelector/directives/deviceSelectorCombo.js +1 -1
- package/deviceSelector/directives/deviceSelectorList.js +1 -1
- package/deviceStatusWidget/ownerStatus.component.js +1 -1
- package/deviceStatusWidget/requiredAvailabilityIntervalSetting.component.js +1 -1
- package/devicemanagement-aclManagement/controllers/aclManagementCtrl.js +1 -1
- package/devicemanagement-aclManagement/index.js +1 -1
- package/devicemanagement-alarmList/controllers/alarmList.js +1 -1
- package/devicemanagement-availability/controllers/availability.js +1 -1
- package/devicemanagement-deviceNetwork/controllers/network.js +1 -1
- package/devicemanagement-deviceNetwork/index.js +1 -1
- package/devicemanagement-eventList/controllers/eventList.js +1 -1
- package/devicemanagement-location/controllers/location.js +1 -1
- package/devicemanagement-location/index.js +1 -1
- package/devicemanagement-logViewer/controllers/logViewer.js +1 -1
- package/devicemanagement-logViewer/directives/logViewer.js +1 -1
- package/devicemanagement-logViewer/providers/logViewer.js +1 -1
- package/devicemanagement-measurements/index.js +1 -1
- package/devicemanagement-restartDevice/index.js +1 -1
- package/devicemanagement-tixiDeviceControl/index.js +1 -1
- package/devicemanagement-tracking/controllers/config.js +1 -1
- package/devicemanagement-tracking/controllers/tracking.js +1 -1
- package/devicemanagement-tracking/index.js +1 -1
- package/devicemanagement-vendMeDeviceControl/controllers/vendMeDeviceControl.js +1 -1
- package/devicemanagement-vendMeDeviceControl/index.js +1 -1
- package/enterpriseEdition/createFile.js +1 -1
- package/enterpriseEdition/customBranding/brandingConfigurationForm.component.js +1 -1
- package/enterpriseEdition/customBranding/brandingConfigurationUi.provider.js +1 -1
- package/enterpriseEdition/customBranding/brandingDeploy.service.js +1 -1
- package/enterpriseEdition/customBranding/brandingProcessExecution.component.js +1 -1
- package/enterpriseEdition/enterpriseEdition.module.js +1 -1
- package/enterpriseEdition/sslCertificate/certificateActivation.component.js +1 -1
- package/enterpriseEdition/sslCertificate/manageCertificate.component.js +1 -1
- package/enterpriseEdition/sslCertificate/manageCertificate.service.js +1 -1
- package/enterpriseEdition/ui-assets/public-options.service.js +1 -1
- package/enterpriseEdition/ui-assets/static-assets.service.js +1 -1
- package/eventList/eventList.controller.js +1 -1
- package/eventsBinary/components/eventBinaryActions/eventBinaryActions.js +1 -1
- package/eventsBinary/services/eventsBinary.service.js +1 -1
- package/export/controllers/detail.js +1 -1
- package/export/services/api.js +1 -1
- package/export/services/config.js +1 -1
- package/export/services/export.js +1 -1
- package/export/services/filters.js +1 -1
- package/generic-ui/config-audit/config-audit-diff.component.js +1 -1
- package/generic-ui/config-audit/config-audit-modal.component.js +1 -1
- package/generic-ui/config-audit/config-audit.component.js +1 -1
- package/generic-ui/generic-ui-config.provider.js +1 -1
- package/generic-ui/generic-ui-inventory-property.component.js +1 -1
- package/generic-ui/generic-ui-inventory.component.js +1 -1
- package/generic-ui/generic-ui-operation-list-button.component.js +1 -1
- package/generic-ui/generic-ui.component.js +1 -1
- package/generic-ui/generic-ui.service.js +1 -1
- package/groupsHierarchy/controllers/assetSearchCtrl.js +1 -1
- package/groupsHierarchy/controllers/groupDevicesCtrl.js +1 -1
- package/groupsHierarchy/controllers/groupsListCtrl.js +1 -1
- package/groupsHierarchy/groupsHierarchyUi.provider.js +1 -1
- package/htmlWidget/htmlWidget.controller.js +1 -1
- package/htmlWidget/htmlWidget.directive.js +1 -1
- package/infoGauge/infoGauge.controller.js +1 -1
- package/infoGauge/infoGaugeConfig.controller.js +1 -1
- package/kpi/controllers/deprecated/edit.js +1 -1
- package/kpi/controllers/deprecated/graph.js +1 -1
- package/kpi/controllers/deprecated/multipleKpiConfig.js +1 -1
- package/kpi/controllers/deprecated/setup.js +1 -1
- package/kpi/controllers/gauge.js +1 -1
- package/kpi/controllers/kpiConfig.js +1 -1
- package/kpi/controllers/list.js +1 -1
- package/kpi/controllers/pieChart.js +1 -1
- package/kpi/controllers/pieChartConfig.js +1 -1
- package/kpi/services/baseWidget.js +1 -1
- package/kpi/services/kpi.js +1 -1
- package/kpi/services/mostRecentKpi.js +1 -1
- package/map/controllers/geofenceEdit.js +1 -1
- package/measurements/controllers/lineChart.js +1 -1
- package/measurements/controllers/measurements.js +1 -1
- package/measurements/directives/lineChart.js +1 -1
- package/measurements/directives/timeIntervalChoice.js +1 -1
- package/measurements/fragmentChart/fragmentChart.component.js +1 -1
- package/measurements/measurements2/axisX.service.js +1 -1
- package/measurements/measurements2/axisY.service.js +1 -1
- package/measurements/measurements2/chart.controller.js +1 -1
- package/measurements/measurements2/chart.service.js +1 -1
- package/measurements/measurements2/hoverInfo.service.js +1 -1
- package/measurements/measurements2/rtAutoMove.service.js +1 -1
- package/measurements/measurements2/series.service.js +1 -1
- package/measurements/services/lineChartService.js +1 -1
- package/modbusConfiguration4/fieldbus-config.component.js +1 -1
- package/modbusConfiguration4/fieldbus-device-list.component.js +1 -1
- package/modbusConfiguration4/modbus-configuration-4.config.js +1 -1
- package/modbusWidget4/modbus-widget.service.js +1 -1
- package/modbusWidget4/widget-config.component.js +1 -1
- package/modbusWidget4/widget.component.js +1 -1
- package/modbusWidgets/controllers/widget.js +1 -1
- package/modbusWidgets/controllers/widgetConfig.js +1 -1
- package/modbusWidgets/services/modbusWidget.js +1 -1
- package/newsletter/downloadEmailsList.component.js +1 -1
- package/oauth/controllers/oauth.js +1 -1
- package/package.json +2 -2
- package/platformConfiguration/platformConfigurationForm.component.js +1 -1
- package/platformConfiguration/platformConfigurationUi.provider.js +1 -1
- package/propertiesLibrary/index.js +1 -1
- package/propertiesLibrary/jsonSchemaObjectEditor.component.js +1 -1
- package/propertiesLibrary/jsonSchemaObjectsList.component.js +1 -1
- package/qrCode/controllers/qrCode.js +1 -1
- package/qrCode/services/qrCodePrinter.js +1 -1
- package/qrCode/services/qrCodeTemplate.js +1 -1
- package/relayWidget/relay.service.js +1 -1
- package/remoteAccess/clients/remoteAccessClients.service.js +1 -1
- package/remoteAccess/clients/terminal/index.js +1 -1
- package/remoteAccess/clients/terminal/shell-adapter.js +1 -1
- package/remoteAccess/clients/terminal/telnet-negotiator.js +1 -1
- package/remoteAccess/clients/vnc/vncClient.js +1 -1
- package/remoteAccess/remoteAccess.service.js +1 -1
- package/remoteAccess/remoteAccessEndpointCard/remoteAccessEndpointCard.component.js +1 -1
- package/remoteAccess/remoteAccessEndpointModal/remoteAccessEndpointModal.component.js +1 -1
- package/remoteAccess/remoteAccessEndpointsList/remoteAccessEndpointsList.component.js +1 -1
- package/remoteAccess/remoteAccessSettings/remoteAccessSettings.component.js +1 -1
- package/remoteAccess/remoteAccessUI.provider.js +1 -1
- package/roles/detail/roleDetailGlobal.component.js +1 -1
- package/roles/detail/roleInventoryPermissionList.component.js +1 -1
- package/roles/list/rolesOverview.controller.js +1 -1
- package/roles/rolesUi.provider.js +1 -1
- package/scada/config.controller.js +1 -1
- package/scada/mapping.directive.js +1 -1
- package/scada/svg.directive.js +1 -1
- package/scada/util.service.js +1 -1
- package/scada/widget.controller.js +1 -1
- package/sigfox-provider-settings/sigfox-settings.service.js +1 -1
- package/simulators/add/simulatorAdd.component.js +1 -1
- package/simulators/detail/detail.controller.js +1 -1
- package/simulators/detail/instructionDetail.component.js +1 -1
- package/simulators/detail/instructionList.component.js +1 -1
- package/simulators/list/list.component.js +1 -1
- package/simulators/simulators.service.js +1 -1
- package/smartRestEditor/details.controller.js +1 -1
- package/smartRestEditor/importTemplate/importTemplate.component.js +1 -1
- package/smartRestEditor/requestEditor/requestEditor.component.js +1 -1
- package/smartRestEditor/responseEditor/responseEditor.component.js +1 -1
- package/smartRestEditor/validators/validateCustomFieldKeyInRequestTemplate.directive.js +1 -1
- package/smartRestEditor/validators/validateUniqueMsgIdInTemplate.directive.js +1 -1
- package/smartRestEditorUI/index.js +1 -1
- package/smartRules/controllers/add.js +1 -1
- package/smartRules/controllers/edit.js +1 -1
- package/smartRules/controllers/list.js +1 -1
- package/smartRules/controllers/smartRuleParamInput.js +1 -1
- package/smartRules/directives/smartRuleParamInput.js +1 -1
- package/smartRules/directives/smartRuleParamInputAlarmType.js +1 -1
- package/smartRules/directives/smartRuleParamInputEscalationSteps.js +1 -1
- package/smartRules/directives/smartRuleParamInputFrequency.js +1 -1
- package/smartRules/directives/smartRuleParamInputGeofence.js +1 -1
- package/smartRules/directives/smartRuleParamInputKpi.js +1 -1
- package/smartRules/directives/smartRuleParamInputTimeInterval.js +1 -1
- package/smartRules/list/smartRulesList.component.js +1 -1
- package/smartRules/services/smartRuleTemplates.js +1 -1
- package/smartRules/services/smartRules.js +1 -1
- package/switchDisplay/controller/switchDisplayCtrl.js +1 -1
- package/tenantApplications/controllers/main.js +1 -1
- package/tenantApplications/subscribed-applications/subscribed-applications.component.js +1 -1
- package/tenantLicenses/licenseManagement.component.js +1 -1
- package/tenantPolicies/retentionRule/retentionRuleRow.component.js +1 -1
- package/tenantPolicies/tenantPolicies.service.js +1 -1
- package/tenantPolicies/tenantPoliciesConfig.provider.js +1 -1
- package/tenantPolicies/tenantPolicyDetail/tenantPolicyDetail.component.js +1 -1
- package/tenantStatistics/tenant-statistics-columns.service.js +1 -1
- package/tenantStatistics/tenant-statistics.component.js +1 -1
- package/tenants/controllers/customProperties.js +1 -1
- package/tenants/controllers/detail.js +1 -1
- package/tenants/index.js +1 -1
- package/trackerConfiguration/controllers/trackerConfiguration.controller.js +1 -1
- package/trackerConfiguration/index.js +1 -1
- package/trackerConfiguration/services/realtimeLockup.service.js +1 -1
- package/trackerConfiguration/services/trackerLocation.service.js +1 -1
- package/trackerModels/trackerModels.service.js +1 -1
- package/trackerRegistration/index.js +1 -1
- package/trackerRegistration/trackerRegistration.controller.js +1 -1
- package/trackerRegistration/trackerRegistrationHistory.service.js +1 -1
- package/trackingAppConfig/index.js +1 -1
- package/trafficLightWidget/states-mapping.component.js +1 -1
- package/trafficLightWidget/traffic-light.component.js +1 -1
- package/userRoles/inventoryRoleSelector/inventoryRoleSelector.component.js +1 -1
- package/userRoles/inventoryRolesTab/inventoryRolesTab.component.js +1 -1
- package/userRoles/rolesAssetTree/rolesAssetTree.component.js +1 -1
- package/userRoles/userRoles.service.js +1 -1
- package/userRoles/userRolesUi.service.js +1 -1
- package/users/aclEditor/aclEditor.directive.js +1 -1
- package/users/applicationAccess/applicationAccess.directive.js +1 -1
- package/users/userDetailView/userApplicationAccess.component.js +1 -1
- package/users/userDetailView/userDetailView.component.js +1 -1
- package/users/userListView/userListView.component.js +1 -1
- package/users/usersUi.provider.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function t(o,u){return{require:"form",restrict:"A",transclude:!1,link:function(t,i,a
|
|
1
|
+
"use strict";!function(){function t(o,u){return{require:"form",restrict:"A",transclude:!1,link:function(t,i,n,a){var e=["active","color","label","unit","min","max","target","yellowRangeMin","yellowRangeMax","redRangeMin","redRangeMax"],r=_.partial(u(n.c8yDataPointValidator),t);function c(){(r()||{}).__active?_(e).filter(function(t){return a[t]}).forEach(function(t){t=a[t];_.reduce(t.$parsers,function(t,i){return i(t)},t.$viewValue)}):_.forEach(e,function(t){t=a[t];t&&t.$invalid&&(t.$setValidity("c8yMin",!0),t.$setValidity("c8yMax",!0),t.$setValidity("required",!0))})}o(function(){t.$watch(r,c,!0),t.$watch(function(){return a.$valid},c)},500)}}}t.$inject=["$timeout","$parse"],angular.module("c8y.cockpit.dataPointExplorer").directive("c8yDataPointValidator",t)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t)
|
|
1
|
+
"use strict";function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var n;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i,o,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,a=t}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw a}}return u}}function _arrayWithHoles(t){if(Array.isArray(t))return t}!function(){function t(r,a,s,i,f,t,n,o,u,c,l){var d="c8y_DataPoint",h="_id",p=["target","color","min","max","fragment","series","yellowRangeMin","yellowRangeMax","redRangeMin","redRangeMax","unit","label"],m=_.transform(p,function(t,e){t[e]=void 0},{});return{listForObject:g,listPossible:D,listPossibleFast:function(t){return r.all({deviceDataPoints:g(t,null,{silentError:!0}),kpiData:r.resolve([]),device:t.name?r.resolve(t):s.detail(t,null,{silentError:!0}).then(f.getResData)}).then(b)},listLocalWithDefaults:function(t,e){function u(){return k(n).then((e=c,function(t){return _.take(t,e)})).then(P);var e}var c=5,n=2,l=(e||{}).id;return w(t).then(function(t){return t.length?t:l?(r=c,i=[],o=function(t){return _.forEach(t,function(t){return i.push(t),!(i.length>=r)}),i.length>=r?i:a?n():s.detail(e).then(f.getResData).then(function(e){return a=[],_.forEach(["childAssets","childDevices"],function(t){_.forEach(e[t].references,function(t){a.push(t.managedObject.id)})}),n()})},D(e=l).then(o).then(P)):u();function n(){return a.length?D(a.shift()).then(o):i}var e,r,a,i,o})},listLocal:w,listForFirstDevices:k,saveLocal:function(t,e){var n=_.map(t,function(t){return _.cloneDeep(t)});return window.localStorage.setItem(S(e),JSON.stringify(n)),r.when(t)},save:e,remove:_.partialRight(e,!0),getSavedFilters:function(t){t=window.localStorage.getItem(S("_savedfilter_".concat(t||"")));t=t?JSON.parse(t):T(),_.keys(t).length||(t=T());t.dateFrom&&(t.dateFrom=moment(t.dateFrom).toDate());t.dateTo&&(t.dateTo=moment(t.dateTo).toDate());return r.when(t)},getDefaultFilters:T,setSavedFilters:function(t,e){return window.localStorage.setItem(S("_savedfilter_".concat(e||"")),JSON.stringify(t)),r.when(t)},equals:function(t,e){return angular.equals(y(t),y(e))},addUI:function(t,e){var n=_.cloneDeep(t),t={templateUrl:":::PLUGIN_PATH:::/views/dataPointAdd.html",controller:"c8yDataPointAddCtrl",size:"sm",resolve:{config:function(){return e||{}},addedDataPoints:function(){return n}}};return a.open(t).result},chooseKpiWithUI:function(t){t=_.cloneDeep(t),t={templateUrl:":::PLUGIN_PATH:::/views/dataPointAdd.html",controller:"c8yDataPointAddCtrl",size:"sm",resolve:{config:function(){return{kpisOnly:!0,maxSelectCount:1}},addedDataPoints:_.constant(t)}};return a.open(t).result},listAllKpi:i.list,getCompatibleKpi:function(t,e){return _.filter(t,function(t){t=t.c8y_Kpi;return t.fragment===e.fragment&&t.series===e.series})},updateDataPointWithKpi:function(t,e){var n=_.defaults(e.c8y_Kpi,m);return t._kpiId=e.id,_.assign(t,n),t},saveDataPointToLibrary:function(t,e){var n={},r={};t._kpiId&&e&&(n.id=t._kpiId);return _.assign(r,_.defaults(_.pick(t,p),m)),n.c8y_Kpi=r,i.save(n)},setUnitFromLastMeasurement:function(t){return r.all(_.map(t,L))}};function g(t,e,n){return s.detail(t,e,n).then(f.getResData).then(v)}function v(t){return t[d]||{}}function y(t){var n=/^__/;return _.omitBy(t,function(t,e){return n.test(e)})}function e(t,e,n){var r,a,i={id:f.getId(t)};return f.createLocalId(e,h),r=e,a=n,g(t).then(function(t){return a?delete t[r[h]]:t[r[h]]=y(r),t}).then(function(t){return i[d]=t,i}).then(function(t){return u.mustHaveAdminMOs([t]).then(_.constant(t))}).then(s.save,_.constant(t)).then(f.getResData).then(v)}function D(t){return r.all({deviceDataPoints:g(t),kpiData:i.listKpiForDevice(t),device:t.name?r.resolve(t):s.detail(t).then(f.getResData)}).then(b)}function b(t){var e=t.deviceDataPoints,n=t.kpiData,t=t.device,r=n.matchKpi,a=n.nonKpiSeries,i=[];return _.forEach(e,function(t){A(i,t)||i.push(function(t,e){var t=t.matchKpi,n=e._kpiId,t=n?_.find(t,{id:n}):null;t&&(e=_.assign(_.cloneDeep(t.c8y_Kpi),e));return e}(n,t))}),_.forEach(r,function(t){t=t,(e=_.cloneDeep(t.c8y_Kpi))._kpiId=t.id;var e,t=e;A(i,t)||i.push(t)}),_.forEach(a,function(t){var e;A(i,t)||i.push((t=t,(e=_.cloneDeep(t)).label="".concat(t.fragment," => ").concat(t.series),e.color=l.generateColor(),e))}),_.forEach(i,_.partial(I,t)),i}function A(t,e){var n=e.fragment,r=e.series;return _.some(t,function(t){return t.fragment===n&&t.series===r})}function I(t,e){return e.__target={id:t.id,name:t.name},e}function S(t){return"datapoints".concat(t||"")}function w(t){t=window.localStorage.getItem(S(t)),t=t?JSON.parse(t):[];return r.when(t)}function P(t){var e=_slicedToArray(t,1)[0];return e&&(e.__active=!0),t}function T(){var t=n.durations,e=n._defaultDuration,t=t[e];return{interval:e,dateTo:new Date,dateFrom:moment().subtract(t).toDate(),realtime:!0,aggregation:o.calculate(t)}}function k(n){return t.list({pageSize:10*n}).then(K).then(function(t){var e=[];return _.forEach(t,function(t){return 0<t.length&&e.push(t),!(n<=e.length)}),_.flattenDeep(e)})}function K(t){t=_.map(t,D);return r.all(t)}function L(e){var n=e.fragment,r=e.series,t=_.get(e,"__target.id");return c.latest({fragment:n,series:r,device:t}).then(function(t){return e.unit=_.get(t,[n,r,"unit"],e.unit),e})}}t.$inject=["$q","$uibModal","c8yInventory","c8yKpi","c8yBase","c8yDevices","INTERVAL_CONSTANTS","c8yAggregationSvc","c8yPermissions","c8yMeasurements","c8yUiUtil"],angular.module("c8y.cockpit.dataPointExplorer").factory("c8yDataPointSvc",t)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function t(t,o,r,i,e,c,
|
|
1
|
+
"use strict";!function(){function t(t,o,r,i,e,c,a){var n,l=[{val:"min",text:e("Minimum")},{val:"max",text:e("Maximum")},{val:"area",text:e("Area")}],d={BLOCK_DISPLAY:"d-block",DANGER_FIELD_CSS_CLASS:"danger",DANGER_TEXT_CSS_CLASS:"text-danger",DATE_LEGEND_CSS_CLASS_TEXT_LEFT:"text-left",DATE_LEGEND_CSS_CLASS_TEXT_NOWRAP:"text-nowrap",DATE_LEGEND_LAST_CSS_CLASS:"text-left",DATE_LEGEND_REST_CSS_CLASS:"text-muted text-left",SELECTED_CSS_CLASS:"active",TIME_LEGEND_FIRST_CSS_CLASS:"text-muted text-right",TIME_LEGEND_REST_CSS_CLASS_TEXT_RIGHT:"text-right",TIME_LEGEND_REST_CSS_CLASS_TEXT_NOWRAP:"text-nowrap",VALUE_CSS_CLASS:"text-right",VALUE_SEPARATOR_CSS_CLASS:"text-muted",WARNING_FIELD_CSS_CLASS:"warning",WARNING_TEXT_CSS_CLASS:"text-warning"},s=!1,u=[],S=500,g=_.throttle(function(){var i=o.activePoints;return D().then(function(t){_.forEach(t,function(t,e){var a,n=i[e],r=(n.data=_.cloneDeep(t),a=n,_.findIndex(a.data.series,function(t){return t.type===a.fragment&&t.name===a.series})),e=_.cloneDeep(n.data.series);delete n.data.series,-1<r?(n.data.series=e[r],_.forOwn(n.data.values,function(t,e){_.isObjectLike(n.data.values[e][r])&&(o.legend.push({date:e,momentDate:moment(e),targetId:n.__target.id,targetName:n.__target.name}),I(n,e,r))})):_.forOwn(n.data.values,function(t,e){I(n,e)})})}).then(L).then(R).then(T).then(function(){s=!(n=!0)}).then(h)},100,{leading:!1,trailing:!0}),m=function(){s=!(n=!1),g()},f=_.memoize(function(t){return moment(t).format("ll")},function(t){return"".concat(t,"_").concat(o.aggregation)}),E=_.memoize(function(t){var t=moment(t),e="";"HOURLY"===o.aggregation?e="".concat(t.format("HH[:00]"),"-").concat(t.add(1,"hour").format("HH[:00]")):"MINUTELY"===o.aggregation?e="".concat(t.format("HH:mm"),"-").concat(t.add(1,"minute").format("HH:mm")):o.aggregation||(e=t.format("HH:mm:ss"));return e},function(t){return"".concat(t,"_").concat(o.aggregation)});function T(){var t,e,a=o.tbody.selectAll("tr").data(o.legend,function(t){return[t.date,t.targetId].join(";")}),n=((n=(t=a).enter().append("tr").on("click",function(t){var e;e=t.date,t=t.targetId,o.rowsSelectable&&(o.selected&&o.selected.target===t&&moment(o.selected.date).isSame(e)?o.selected={}:(o.selected={date:e,target:t},o.skipScroll=!0))})).append("td").classed("datetime",!0).call(function(t){t.append("strong").attr("class",[d.DATE_LEGEND_CSS_CLASS_TEXT_LEFT,d.DATE_LEGEND_CSS_CLASS_TEXT_NOWRAP].join(" ")).style("margin-right","2px"),t.append("span")}),n.append("td").classed("target",!0).style("display",o.displayTarget?"table-cell":"none").text(function(t){return t.targetName}),(e=n.selectAll("td.datapoint").data(o.activePoints,function(t){return t._id||t._kpiId||t.$$hashKey})).enter().append("td").call(function(a){function r(t){var e=a.data()||[];return _.filter(e,_.identity)[t]}return function(t){t.attr("class",function(t,e,a){return _(A(r(a),t,"FIELD")).pickBy(_.identity).keys().value().join(" ")}).attr("stw-datatable-tooltip",function(t,e,a){var a=r(a),a=p(a,t),n=null;return v(a,t)?n=c.getString("Red range: {{min}} … {{max}}",{min:t.redRangeMin,max:t.redRangeMax}):x(a,t)&&(n=c.getString("Yellow range: {{min}} … {{max}}",{min:t.yellowRangeMin,max:t.yellowRangeMax})),n}),t.append("strong").text(function(t,e,a){a=r(a);return y(a,t,"min")?p(a,t).min:""}).attr("class",function(t,e,a){return _(A(r(a),t,"TEXT","min")).pickBy(_.identity).keys().value().join(" ")}),t.append("strong").text(function(t,e,a){a=r(a);return y(a,t,"min")&&y(a,t,"max")?" ... ":""}).classed(d.VALUE_SEPARATOR_CSS_CLASS,!0),t.append("strong").text(function(t,e,a){a=r(a);return y(a,t,"max")?p(a,t).max:""}).attr("class",function(t,e,a){return _(A(r(a),t,"TEXT","max")).pickBy(_.identity).keys().value().join(" ")})}}(n)).classed("datapoint",!0).classed(d.VALUE_CSS_CLASS,!0),e.exit().remove(),e.order(),t.sort(function(t,e){return moment(e.date).isAfter(moment(t.date))?1:-1}),a);return n.classed(d.SELECTED_CSS_CLASS,function(t){return!!o.selected&&moment(o.selected.date).valueOf()===t.momentDate.valueOf()&&o.selected.target===t.targetId}),(n=n.select("td.datetime")).attr("stw-datatable-tooltip",function(t){return t.isFirstNewDate?void 0:f(t.date)}),n.select("strong").attr("class",function(t){return t.isLastForDate?d.DATE_LEGEND_LAST_CSS_CLASS:d.DATE_LEGEND_REST_CSS_CLASS}).text(function(t){t=t.date;return f(t)}),n.select("span").attr("class",[d.TIME_LEGEND_REST_CSS_CLASS_TEXT_RIGHT,d.TIME_LEGEND_REST_CSS_CLASS_TEXT_NOWRAP].join(" ")).text(function(t){return E(t.date)}),a.exit().remove(),a}function L(){o.legend=_.sortBy(_.uniqBy(o.legend,function(t){return"".concat(t.date).concat(t.targetId)}),["momentDate","targetName"])}function A(t,e,a,n){var n=n?p(t,e)[n]:p(t,e),t={},r=d["DANGER_".concat(a,"_CSS_CLASS")],a=d["WARNING_".concat(a,"_CSS_CLASS")];return t[r]=!1,t[a]=!1,v(n,e)?t[r]=!0:x(n,e)&&(t[a]=!0),t}function p(t,e){if(n=e,r=(a=t).date,!(n.data&&n.data.values&&n.__target.id===a.targetId&&_.isObjectLike(n.data.values[r])&&_.isNumber(n.data.values[r].min)&&_.isNumber(n.data.values[r].max)))return{};var a,n,r,i={},o=e.data.values,c=t.date;switch(e.renderType){case"area":i.min=o[c].min,i.max=o[c].max;break;case"min":i.min=o[c].min;break;case"max":i.max=o[c].max;break;default:i.min=o[c].min}return i}function C(t,e,a){return _.isObjectLike(t)?t.min>=e&&t.min<=a||t.max>=e&&t.max<=a:e<=t&&t<=a}function v(t,e){return C(t,e.redRangeMin,e.redRangeMax)}function x(t,e){return C(t,e.yellowRangeMin,e.yellowRangeMax)}o.legend=[],o.firstNewDates=[],o.$watch("datapoints",function(t){o.legend=[],o.firstNewDates=[],o.activePoints=[],T();t=_.cloneDeep(t);o.activePoints=_.filter(t,function(t){return t.__active}),o.displayTarget=1<_.uniqBy(o.activePoints,function(t){return t.__target.id}).length,m()}),o.$watch("dateFrom",w),o.$watch("dateTo",w),o.$watch("aggregation",m),o.$watch("selected",function(){var t;n&&(T(),o.skipScroll?o.skipScroll=!1:(t=o.table.find(".".concat(d.SELECTED_CSS_CLASS)).get(0))&&o.panel.animate({scrollTop:(t.offsetTop-o.panel.height())/2},500))}),_.assign(o,{getChartTypeTooltip:function(e){var t=e.label,a=e.unit||e.data&&e.data.series&&e.data.series.unit,n=e.renderType&&l[_.findIndex(l,function(t){return t.val===e.renderType})].text;return[t,a?[" [",a,"]"].join(""):"",n?[" (",c.getString(n),")"].join(""):""].join("")},getFieldStyling:A,getFieldValue:p,onData:function(t){u.push(t),h()},data:{},selected:o.selected||{},isDataLoading:function(){return s}});var D=a.latest(function(){var t=o.activePoints,e=o.dateFrom,a=o.dateTo,n=o.aggregation;return o.legend=[],o.firstNewDates=[],r.all(_.map(t,function(t){return i.loadSeriesData(t,e,a,n)}))});var N=_.throttle(function(){o.panel.scrollTop(0)},500);function h(){if(!s){for(var t=u.shift();t;)!function(n){_.forEach(o.activePoints,function(t){var e,a;a=n[(e=t).fragment],e.__target.id===n.source.id&&a&&a[e.series]&&(t.data=t.data||{values:{}},t.data.values[n.time]={min:n[t.fragment][t.series].value,max:n[t.fragment][t.series].value},_.last(o.legend)&&n.time===_.last(o.legend).date&&t.__target.id===_.last(o.legend).targetId||(o.legend.push({date:n.time,momentDate:moment(n.time),targetId:t.__target.id,targetName:t.__target.name}),o.legend.length>S&&o.legend.shift()))})}(t),t=u.shift();R(),T(),b()}}function y(t,e,a){return _.isNumber(p(t,e)[a])}function R(){for(var t=o.legend.length,e=0;e<t;e++){var a=0===e,n=e===t-1,r=(o.legend[e-1]?o.legend[e-1].date.substr(0,10):"")!==o.legend[e].date.substr(0,10);o.legend[e].isFirstNewDate=a||r,o.legend[e].isLastForDate=n||r}}function I(t,e,a){t.data.values[e]=_.isUndefined(a)?{}:t.data.values[e][a]}function w(){o.tbody.selectAll("tr").remove(),m()}function b(){o.scrollLocked&&N()}o.$watch("scrollLocked",b)}t.$inject=["$filter","$scope","$q","c8yDataPoint","gettext","gettextCatalog","c8yBase"],angular.module("c8y.cockpit.dataPointTable").controller("c8yDataPointTableController",t)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";angular.module("c8y.cockpit.dataPointTable").directive("c8yDataPointTable",function(){return{restrict:"E",scope:{datapoints:"=?",dateFrom:"=?",dateTo:"=?",aggregation:"=?",selected:"=?",rowsSelectable:"=?",onData:"=?",scrollLocked:"=?"},controller:"c8yDataPointTableController",templateUrl:":::PLUGIN_PATH:::/views/dataPointTable.html",compile:function(e){
|
|
1
|
+
"use strict";angular.module("c8y.cockpit.dataPointTable").directive("c8yDataPointTable",function(){return{restrict:"E",scope:{datapoints:"=?",dateFrom:"=?",dateTo:"=?",aggregation:"=?",selected:"=?",rowsSelectable:"=?",onData:"=?",scrollLocked:"=?"},controller:"c8yDataPointTableController",templateUrl:":::PLUGIN_PATH:::/views/dataPointTable.html",compile:function(e){if(0!==e.parents(".card.card-dashboard").children(".card-header-actions").length)return function(e,t){e.element=t,e.panel=t.parents("div.card-inner-scroll"),e.table=t.find("table"),e.tbody=d3.select(t.find("tbody").get(0))}}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function t(
|
|
1
|
+
"use strict";!function(){function t(n,o){return{loadSeriesData:function(t,a,e,r){a=a&&moment(a).subtract(1,"minute").startOf("minute"),e=e&&moment(e).add(1,"minute").startOf("minute");return o.listSeries({dateFrom:a&&a.format(n.dateFullFormat),dateTo:e&&e.format(n.dateFullFormat),source:t.__target.id,aggregationType:r||void 0})}}}t.$inject=["c8yBase","c8yMeasurements"],angular.module("c8y.cockpit.dataPointTable").factory("c8yDataPoint",t)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";angular.module("c8y.cockpit.dataPointTable").directive("c8yRealtimeRadioButton",["c8yRealtime",function(
|
|
1
|
+
"use strict";angular.module("c8y.cockpit.dataPointTable").directive("c8yRealtimeRadioButton",["c8yRealtime",function(r){function l(t,n){r.start(t,n)}function u(t,n){r.stop(t,n)}function s(t,n){return r.getStatus(t,n)}return{scope:{start:"=",channel:"@",data:"&onData",subscribed:"&onSubscribed",state:"="},replace:!0,restrict:"EA",templateUrl:":::PLUGIN_PATH:::/views/realtimeRadioButton.html",controller:["$scope",function(c){var o=c.$id;function i(t,n){c.data({data:n})}c.$watch("channel",function(t,n){var a,e;t&&(a=o,e=t,r.addListener(a,e,"CREATE",i),!c.state&&!c.start||s(a,e)||l(a,e)),n&&n!==t&&u(o,n)}),c.$on("$destroy",function(){u(o,c.channel)}),c.icon=function(){var t=r.getStatus(o,c.channel);return c.channel&&(c.state=t),void 0!==t?r.icon(t):r.icon(!1)},c.on=function(){(s(o,c.channel)?u:l)(o,c.channel)},c.$watch("start",function(t){c.channel&&t&&l(o,c.channel),!1===t&&s(o,c.channel)&&u(o,c.channel)})}]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function t(
|
|
1
|
+
"use strict";!function(){function t(i,t){var n=this,c=(i.$watch("child.config.datapoints",function(t){t=_(t).map("__target.id").compact().uniq().value();t.length?n.channel="/measurements/".concat(t.join(",")):n.channel=""}),i.$watch("child.config.realtime",function(t){n.realtime=!!t}),i.$watch("child.config.date",function(){i.child.config.widgetInstanceGlobalTimeContext&&(i.child.config.dateFrom=new Date(i.child.config.date[0]),i.child.config.dateTo=new Date(i.child.config.date[1]))}),i.child.config.interval);c&&c!==t.custom.id&&(c=_.find(t.intervals,function(t){return t.id===i.child.config.interval})||{}).qty&&(i.child.config.dateFrom=moment().subtract(c.qty,c.unit).toDate(),i.child.config.dateTo=moment().toDate())}t.$inject=["$scope","INTERVAL_CONSTANTS"],angular.module("c8y.cockpit.dataPointTable").controller("c8yDataPointTableWidgetCtrl",t)}();
|
|
@@ -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 _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(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 _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,u=[],s=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}function _arrayWithHoles(e){if(Array.isArray(e))return 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(){e.$inject=["c8yDeviceTypeProtocolBaseProvider","gettext"];var r="c8yActilityDevice";function e(e,s){t.$inject=["$q","c8yDeviceDatabase","c8yTenant"];var l={label:s("LoRa"),fieldbusType:"actility",serviceName:r};return e.getDeviceTypeProtocolProvider(l,t);function t(e,t,r){var n={name:"actility"},i={name:"loriot-agent"},o=[t.MessageIdSources.FPORT,t.MessageIdSources.PAYLOAD],a=_objectSpread(_objectSpread({},l),{},{type:"c8y_ActilityDeviceType",noNewProtocolInstances:!0,configuration:{messageIdConfiguration:o},discreteOutputs:!1,discreteInputs:!1,holdingRegisters:{sectionTitle:s("Values"),noRegistersDefinedMessage:s("No values defined."),newRegisterModalTitle:s("New value"),editRegisterModalTitle:s('Edit value: "{{name}}"'),addRegisterButtonLabel:s("Add value"),validation:{invalidName:s("Name must be unique among values."),invalidMeasurement:s("Selected measurement type and series are already used by another value in the same message type.")},messageTypeId:{label:s("Message type ID")},startBit:!0,noBits:!0,multiplier:!0,offset:!0,decimalPlaces:!1,options:{signed:!0,bcd:!0,littleEndian:!0},functionalities:{showStatus:!1,updateStatus:!1,sendMeasurement:!0,raiseAlarm:{alarmStatus:!0},sendEvent:{fragmentType:!0,innerType:!0},sendManagedObjectUpdate:!0},unit:{requiredForSendMeasurement:!0}},inputRegisters:!1,options:!1});return{registerFeaturesManifest:function(){t.registerFeaturesManifest(u().then(function(e){return e&&a}))},isSubscribed:u};function u(){return e.all([r.isSubscribed(n),r.isSubscribed(i)]).then(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];return t||e})}}}angular.module("c8y.actility").provider(r,e)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},t=Object.prototype,f=t.hasOwnProperty,c=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new j(n||[]);return c(i,"_invoke",{value:function(i,a,c){var u="suspendedStart";return function(t,e){if("executing"===u)throw new Error("Generator is already running");if("completed"===u){if("throw"===t)throw e;return P()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=_(r,c);if(n){if(n===s)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===u)throw u="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u="executing";var o=l(i,a,c);if("normal"===o.type){if(u=c.done?"completed":"suspendedYield",o.arg===s)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u="completed",c.method="throw",c.arg=o.arg)}}}(t,r,a)}),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var s={};function p(){}function y(){}function h(){}var v={};i(v,o,function(){return this});var d=Object.getPrototypeOf,m=d&&d(d(E([])));m&&m!==t&&f.call(m,o)&&(v=m);var g=h.prototype=p.prototype=Object.create(v);function b(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function w(u,s){var e;c(this,"_invoke",{value:function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i=l(u[t],u,r);if("throw"!==i.type){var a=i.arg,c=a.value;return c&&"object"==_typeof(c)&&f.call(c,"__await")?s.resolve(c.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(c).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),s;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,s;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(f.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return c(g,"constructor",{value:y.prototype=h,configurable:!0}),c(h,"constructor",{value:y,configurable:!0}),y.displayName=i(h,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},b(w.prototype),i(w.prototype,r,function(){return this}),a.AsyncIterator=w,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new w(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},b(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var r=Object(t),n=[];for(var e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=E,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&f.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=f.call(o,"catchLoc"),c=f.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&f.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,s):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},a}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(c){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=c.apply(t,a);function o(t){asyncGeneratorStep(n,e,r,o,i,"next",t)}function i(t){asyncGeneratorStep(n,e,r,o,i,"throw",t)}o(void 0)})}}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(){t.$inject=["c8yDeviceTypeProtocolBaseProvider","gettext"];var r="c8yCanbusDevice";function t(t,c){e.$inject=["c8yDeviceDatabase","c8yDeviceControl","gettextCatalog","c8yDevices","c8yBase","c8yUser"];var p={label:c("CAN Bus"),fieldbusType:"canbus",serviceName:r};return t.getDeviceTypeProtocolProvider(p,e);function e(t,u,e,s,f,o){var r=_objectSpread(_objectSpread({},p),{},{discreteOutputs:!1,discreteInputs:!1,holdingRegisters:{number:{label:c("Message ID"),useHex:!0,min:0,max:536870911},startBit:{max:63},noBits:{max:64},multiplier:{min:1,step:1},divisor:!0,decimalPlaces:!0,unit:!0,offset:{min:Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),max:Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1},options:{signed:!0,enumType:!0},functionalities:{showStatus:!0,updateStatus:!0,sendMeasurement:!0,raiseAlarm:!0,sendEvent:!0}},inputRegisters:!1,options:{serverTime:!0},deviceFragments:["c8y_CanDevice"],deviceConfiguration:{fragment:"c8y_CanConfiguration",icon:"share-alt"}});return{registerFeaturesManifest:function(){t.registerFeaturesManifest(n().then(function(t){return t&&r}))},isAvailable:n,create:function(t,e){return i.apply(this,arguments)}};function n(){return t.isFeatureFieldbus4Available()}function i(){return(i=_asyncToGenerator(_regeneratorRuntime().mark(function t(o,i){var a,c;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l(o,i);case 2:return a=t.sent,t.t0=f,t.next=6,s.createConfirm(a);case 6:return t.t1=t.sent,c=t.t0.getResData.call(t.t0,t.t1),t.next=10,s.addChildDevice(o,c);case 10:return c.owner=o.owner,t.next=13,s.save(c);case 13:return t.abrupt("return",u.create((e=o,r=i.deviceType,n=c,{deviceId:e.id,description:'Added new child device to "'.concat(e.name,'" (ID: ').concat(e.id,")."),c8y_CanDevice:{id:n.id,name:n.name,type:"/inventory/managedObjects/".concat(r.id)}})));case 14:case"end":return t.stop()}var e,r,n},t)}))).apply(this,arguments)}function l(t,e){return a.apply(this,arguments)}function a(){return(a=_asyncToGenerator(_regeneratorRuntime().mark(function t(e,r){var n;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.current();case 2:return n=t.sent,t.abrupt("return",{name:"".concat(e.name," - ").concat(r.deviceType.name),type:r.deviceType.name,c8y_CanDevice:{type:"/inventory/managedObjects/".concat(r.deviceType.id)},owner:n.id});case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}}}angular.module("c8y.canbus").provider(r,t)}();
|
|
1
|
+
"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},t=Object.prototype,u=t.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o,i,a,c,e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new _(n||[]);return s(e,"_invoke",{value:(o=t,i=r,a=n,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return O()}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(void 0===o)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),l;n=f(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,l;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,l)}(r,a);if(r){if(r===l)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===c)throw c="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c="executing";r=f(o,i,a);if("normal"===r.type){if(c=a.done?"completed":"suspendedYield",r.arg===l)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(c="completed",a.method="throw",a.arg=r.arg)}})}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=c;var l={};function p(){}function y(){}function h(){}var e={},d=(i(e,n,function(){return this}),Object.getPrototypeOf),d=d&&d(d(x([]))),v=(d&&d!==t&&u.call(d,n)&&(e=d),h.prototype=p.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function g(a,c){var e;s(this,"_invoke",{value:function(r,n){function t(){return new c(function(t,e){!function e(t,r,n,o){var i,t=f(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==_typeof(r)&&u.call(r,"__await")?c.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):c.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(e){if(e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r<e.length;)if(u.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:O}}function O(){return{value:void 0,done:!0}}return s(v,"constructor",{value:y.prototype=h,configurable:!0}),s(h,"constructor",{value:y,configurable:!0}),y.displayName=i(h,o,"GeneratorFunction"),a.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,i(t,o,"GeneratorFunction")),t.prototype=Object.create(v),t},a.awrap=function(t){return{__await:t}},m(g.prototype),i(g.prototype,r,function(){return this}),a.AsyncIterator=g,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new g(c(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},m(v),i(v,o,"Generator"),i(v,n,function(){return this}),i(v,"toString",function(){return"[object Generator]"}),a.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=x,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=u.call(o,"catchLoc"),c=u.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc?null:o)?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),w(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,w(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},a}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(c){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=c.apply(t,a);function o(t){asyncGeneratorStep(n,e,r,o,i,"next",t)}function i(t){asyncGeneratorStep(n,e,r,o,i,"throw",t)}o(void 0)})}}function ownKeys(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}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){t=_toPrimitive(t,"string");return"symbol"===_typeof(t)?t:String(t)}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);r=r.call(t,e||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){t.$inject=["c8yDeviceTypeProtocolBaseProvider","gettext"];var r="c8yCanbusDevice";function t(t,a){e.$inject=["c8yDeviceDatabase","c8yDeviceControl","gettextCatalog","c8yDevices","c8yBase","c8yUser"];var c={label:a("CAN Bus"),fieldbusType:"canbus",serviceName:r};return t.getDeviceTypeProtocolProvider(c,e);function e(t,u,e,s,f,o){var r=_objectSpread(_objectSpread({},c),{},{discreteOutputs:!1,discreteInputs:!1,holdingRegisters:{number:{label:a("Message ID"),useHex:!0,min:0,max:536870911},startBit:{max:63},noBits:{max:64},multiplier:{min:1,step:1},divisor:!0,decimalPlaces:!0,unit:!0,offset:{min:Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),max:Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1},options:{signed:!0,enumType:!0},functionalities:{showStatus:!0,updateStatus:!0,sendMeasurement:!0,raiseAlarm:!0,sendEvent:!0}},inputRegisters:!1,options:{serverTime:!0},deviceFragments:["c8y_CanDevice"],deviceConfiguration:{fragment:"c8y_CanConfiguration",icon:"share-alt"}});return{registerFeaturesManifest:function(){t.registerFeaturesManifest(n().then(function(t){return t&&r}))},isAvailable:n,create:function(t,e){return i.apply(this,arguments)}};function n(){return t.isFeatureFieldbus4Available()}function i(){return(i=_asyncToGenerator(_regeneratorRuntime().mark(function t(o,i){var a,c;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,function(){return l.apply(this,arguments)}(o,i);case 2:return a=t.sent,t.t0=f,t.next=6,s.createConfirm(a);case 6:return t.t1=t.sent,c=t.t0.getResData.call(t.t0,t.t1),t.next=10,s.addChildDevice(o,c);case 10:return c.owner=o.owner,t.next=13,s.save(c);case 13:return t.abrupt("return",u.create((e=o,r=i.deviceType,n=c,{deviceId:e.id,description:'Added new child device to "'.concat(e.name,'" (ID: ').concat(e.id,")."),c8y_CanDevice:{id:n.id,name:n.name,type:"/inventory/managedObjects/".concat(r.id)}})));case 14:case"end":return t.stop()}var e,r,n},t)}))).apply(this,arguments)}function l(){return(l=_asyncToGenerator(_regeneratorRuntime().mark(function t(e,r){var n;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.current();case 2:return n=t.sent,t.abrupt("return",{name:"".concat(e.name," - ").concat(r.deviceType.name),type:r.deviceType.name,c8y_CanDevice:{type:"/inventory/managedObjects/".concat(r.deviceType.id)},owner:n.id});case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}}}angular.module("c8y.canbus").provider(r,t)}();
|
|
@@ -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 _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},e=Object.prototype,l=e.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},i=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(e){o=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),a=new N(r||[]);return c(o,"_invoke",{value:function(o,a,c){var s="suspendedStart";return function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return I()}for(c.method=e,c.arg=t;;){var n=c.delegate;if(n){var r=E(n,c);if(r){if(r===u)continue;return r}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";var i=d(o,a,c);if("normal"===i.type){if(s=c.done?"completed":"suspendedYield",i.arg===u)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(s="completed",c.method="throw",c.arg=i.arg)}}}(e,n,a)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var u={};function p(){}function f(){}function v(){}var y={};o(y,i,function(){return this});var g=Object.getPrototypeOf,h=g&&g(g(R([])));h&&h!==e&&l.call(h,i)&&(y=h);var m=v.prototype=p.prototype=Object.create(y);function b(e){["next","throw","return"].forEach(function(t){o(e,t,function(e){return this._invoke(t,e)})})}function _(s,u){var t;c(this,"_invoke",{value:function(n,r){function e(){return new u(function(e,t){!function t(e,n,r,i){var o=d(s[e],s,n);if("throw"!==o.type){var a=o.arg,c=a.value;return c&&"object"==_typeof(c)&&l.call(c,"__await")?u.resolve(c.__await).then(function(e){t("next",e,r,i)},function(e){t("throw",e,r,i)}):u.resolve(c).then(function(e){a.value=e,r(a)},function(e){return t("throw",e,r,i)})}i(o.arg)}(n,r,e,t)})}return t=t?t.then(e,e):e()}})}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var i=d(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function R(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(l.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return c(m,"constructor",{value:f.prototype=v,configurable:!0}),c(v,"constructor",{value:f,configurable:!0}),f.displayName=o(v,r,"GeneratorFunction"),a.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,o(e,r,"GeneratorFunction")),e.prototype=Object.create(m),e},a.awrap=function(e){return{__await:e}},b(_.prototype),o(_.prototype,n,function(){return this}),a.AsyncIterator=_,a.async=function(e,t,n,r,i){void 0===i&&(i=Promise);var o=new _(s(e,t,n,r),i);return a.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},b(m),o(m,r,"Generator"),o(m,i,function(){return this}),o(m,"toString",function(){return"[object Generator]"}),a.keys=function(e){var n=Object(e),r=[];for(var t in n)r.push(t);return r.reverse(),function e(){for(;r.length;){var t=r.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=R,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function e(e,t){return o.type="throw",o.arg=n,r.next=e,t&&(r.method="next",r.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var i=this.tryEntries[t],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=l.call(i,"catchLoc"),c=l.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},a}function asyncGeneratorStep(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function _asyncToGenerator(c){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=c.apply(e,a);function i(e){asyncGeneratorStep(r,t,n,i,o,"next",e)}function o(e){asyncGeneratorStep(r,t,n,i,o,"throw",e)}i(void 0)})}}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(){e.$inject=["c8yDeviceTypeProtocolBaseProvider","c8yDeviceProtocolUiProvider","c8yViewsProvider","gettext"];var i="c8yCanopenDevice";function e(e,t,n,b){r.$inject=["c8yDeviceDatabase","c8yDeviceControl","c8yModbusDevice","gettextCatalog","c8yInventory","c8yDevices","c8yBase","c8yUser","$q"];var E={label:b("CANopen"),fieldbusType:"canopen",serviceName:i};return e.getDeviceTypeProtocolProvider(E,r);function r(e,f,v,t,n,s,u,i,y){var r=u.createEnum(_.flatten([{name:"BOOLEAN",label:b("Boolean"),value:"boolean",edsValue:1,noBits:1},{name:"SIGNED_8",label:b("Signed (8-bits)"),value:"signed8",edsValue:2,noBits:8,signed:!0},{name:"SIGNED_16",label:b("Signed (16-bits)"),value:"signed16",edsValue:3,noBits:16,signed:!0},{name:"SIGNED_24",label:b("Signed (24-bits)"),value:"signed24",edsValue:16,noBits:24,signed:!0},{name:"SIGNED_32",label:b("Signed (32-bits)"),value:"signed32",edsValue:4,noBits:32,signed:!0},{name:"SIGNED_40",label:b("Signed (40-bits)"),value:"signed40",edsValue:18,noBits:40,signed:!0},{name:"SIGNED_48",label:b("Signed (48-bits)"),value:"signed48",edsValue:19,noBits:48,signed:!0},{name:"SIGNED_56",label:b("Signed (56-bits)"),value:"signed56",edsValue:20,noBits:56,signed:!0},{name:"SIGNED_64",label:b("Signed (64-bits)"),value:"signed64",edsValue:21,noBits:64,signed:!0},{name:"UNSIGNED_8",label:b("Unsigned (8-bits)"),value:"unsigned8",edsValue:5,noBits:8,signed:!1},{name:"UNSIGNED_16",label:b("Unsigned (16-bits)"),value:"unsigned16",edsValue:6,noBits:16,signed:!1},{name:"UNSIGNED_24",label:b("Unsigned (24-bits)"),value:"unsigned24",edsValue:22,noBits:24,signed:!1},{name:"UNSIGNED_32",label:b("Unsigned (32-bits)"),value:"unsigned32",edsValue:7,noBits:32,signed:!1},{name:"UNSIGNED_40",label:b("Unsigned (40-bits)"),value:"unsigned40",edsValue:24,noBits:40,signed:!1},{name:"UNSIGNED_48",label:b("Unsigned (48-bits)"),value:"unsigned48",edsValue:25,noBits:48,signed:!1},{name:"UNSIGNED_56",label:b("Unsigned (56-bits)"),value:"unsigned56",edsValue:26,noBits:56,signed:!1},{name:"UNSIGNED_64",label:b("Unsigned (64-bits)"),value:"unsigned64",edsValue:27,noBits:64,signed:!1},{name:"REAL_32",label:b("Real (32-bits)"),value:"real32",edsValue:8,noBits:32,decimalPlaces:null,baseValuesRange:{min:-3.4*Math.pow(10,38),max:3.4*Math.pow(10,38)}},{name:"REAL_64",label:b("Real (64-bits)"),value:"real64",edsValue:17,noBits:64,decimalPlaces:null,baseValuesRange:{min:-Number.MAX_VALUE,max:Number.MAX_VALUE}}])),o=u.createEnum([{name:"READ_ONLY",label:b("Read-only"),value:"ro"},{name:"WRITE_ONLY",label:b("Write-only"),value:"wo"},{name:"READ_WRITE",label:b("Read-write"),value:"rw"},{name:"READ_WRITE_ON_PROCESS_INPUT",label:b("Read-write on process input"),value:"rwr"},{name:"READ_WRITE_ON_PROCESS_OUTPUT",label:b("Read-write on process output"),value:"rww"},{name:"CONSTANT",label:b("Constant"),value:"const"}]),a=_objectSpread(_objectSpread({},E),{},{type:"c8y_CANopenDeviceType",deviceType:!0,discreteOutputs:!1,discreteInputs:!1,holdingRegisters:{sectionTitle:b("Variables"),noRegistersDefinedMessage:b("No variables defined."),elementTypeLabel:b("Variable"),newRegisterModalTitle:b("New variable"),editRegisterModalTitle:b('Edit variable: "{{name}}"'),addRegisterButtonLabel:b("Add variable"),unit:!0,validation:{invalidName:b("Name must be unique among variables."),invalidMeasurement:b("Selected measurement type and series are already used by another variable.")},index:{min:0,max:Math.pow(2,16)-1},subIndex:{min:0,max:Math.pow(2,8)-1},dataType:{choices:r},accessType:{choices:o},functionalities:{showStatus:{showIf:function(e){return _.includes([o.READ_ONLY,o.READ_WRITE,o.READ_WRITE_ON_PROCESS_INPUT,o.READ_WRITE_ON_PROCESS_OUTPUT,o.CONSTANT],_.get(e.meta,"accessType"))}},updateStatus:{showIf:function(e){return _.includes([o.READ_WRITE,o.READ_WRITE_ON_PROCESS_INPUT,o.READ_WRITE_ON_PROCESS_OUTPUT,o.WRITE_ONLY],_.get(e.meta,"accessType"))}},sendMeasurement:{showIf:c},raiseAlarm:{showIf:c,mask:!0},sendEvent:{showIf:c}}},inputRegisters:!1,options:{serverTime:!0},deviceFragments:["c8y_CANopenDevice"],deviceConfiguration:{fragment:"c8y_CANopenConfiguration",icon:"cloud-network"},getRegisterSource:function(e){return{key:"c8y_CANopenSource",value:{index:e.index,subIndex:e.subIndex}}},customizeSmartRestTemplates:function(e){return m(e.responseTemplates,{msgId:201,condition:"$.c8y_SetRegister",pattern:["$.id","$.c8y_SetRegister.nodeId","$.c8y_SetRegister.index","$.c8y_SetRegister.subIndex","$.c8y_SetRegister.dataType","$.c8y_SetRegister.value"]}),m(e.responseTemplates,{msgId:202,condition:"$.c8y_CANopenAddDevice",pattern:["$.id","$.deviceId","$.c8y_CANopenAddDevice.id","$.c8y_CANopenAddDevice.nodeId","$.c8y_CANopenAddDevice.type"]}),m(e.responseTemplates,{msgId:204,condition:"$.c8y_CANopenRemoveDevice",pattern:["$.id","$.deviceId","$.c8y_CANopenDevice.nodeId"]}),e}});function c(e){return _.includes([o.READ_ONLY,o.READ_WRITE,o.READ_WRITE_ON_PROCESS_INPUT,o.READ_WRITE_ON_PROCESS_OUTPUT],_.get(e.meta,"accessType"))}return{registerFeaturesManifest:function(){e.registerFeaturesManifest(l().then(function(e){return e&&a}))},isAvailable:l,create:function(e,t){return d.apply(this,arguments)},updateElement:function(e,t,n){return h.apply(this,arguments)},onRemove:function(e,t){var n=t.id,r=t.name,i=t.nodeId;return f.create({deviceId:e.id,description:'Removed child device "'.concat(r,'" (ID: ').concat(n,")."),c8y_CANopenRemoveDevice:{id:n,name:r,nodeId:i}})}};function l(){return e.isFeatureFieldbus4Available()}function d(){return(d=_asyncToGenerator(_regeneratorRuntime().mark(function e(i,o){var a,c;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p(i,o);case 2:return a=e.sent,e.t0=u,e.next=6,s.createConfirm(a);case 6:return e.t1=e.sent,c=e.t0.getResData.call(e.t0,e.t1),e.next=10,s.addChildDevice(i,c);case 10:return c.owner=i.owner,e.next=13,s.save(c);case 13:return e.abrupt("return",f.create((t=i,n=o.deviceType,r=c,{deviceId:t.id,description:'Added child device "'.concat(r.name,'" (ID: ').concat(r.id,")."),c8y_CANopenAddDevice:{id:r.id,name:r.name,type:"/inventory/managedObjects/".concat(n.id),nodeId:r.c8y_CANopenDevice.nodeId}})));case 14:case"end":return e.stop()}var t,n,r},e)}))).apply(this,arguments)}function p(e,t){return g.apply(this,arguments)}function g(){return(g=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n){var r;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.current();case 2:return r=e.sent,e.abrupt("return",{name:n.name,type:n.deviceType.name,c8y_CANopenDevice:{type:"/inventory/managedObjects/".concat(n.deviceType.id),nodeId:n.nodeId},c8y_SupportedOperations:["c8y_Command"],owner:r.id});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(_regeneratorRuntime().mark(function e(c,s,u){var l,d,p;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(v.canUpdateElement(c,s)){e.next=2;break}return e.abrupt("return",y.reject());case 2:return void 0,n=(t={device:c,register:s,valueMap:u}).device,r=t.register,i=t.valueMap,o=i.label||i.value,a=!i.label&&r.unit?" ".concat(r.unit):"",l={deviceId:n.id,description:'Change value of "'.concat(r.name,'" to ').concat(o).concat(a,"."),c8y_SetRegister:{nodeId:n.c8y_CANopenDevice.nodeId,index:r.index,subIndex:r.subIndex,dataType:r.dataType,value:i.value}},s.changePending=!0,d=v.getAlertMessagesFns(s,u),e.next=7,v.sendOperationAndGetResult(l,d);case 7:return(p=e.sent).status===f.status.SUCCESSFUL?(_.set(c,["c8y_RegisterStatus",s.name],u.value),s.changePending=!1):p.status===f.status.FAILED&&(s.changePending=!1),e.abrupt("return",p);case 10:case"end":return e.stop()}var t,n,r,i,o,a},e)}))).apply(this,arguments)}function m(e,t){var n=_.findIndex(e,{msgId:t.msgId});-1<n?e[n]=t:e.push(t)}}}angular.module("c8y.canopen").provider(i,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 _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},e=Object.prototype,s=e.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",i=t.toStringTag||"@@toStringTag";function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(e){o=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i,o,a,c,t=t&&t.prototype instanceof p?t:p,t=Object.create(t.prototype),r=new E(r||[]);return u(t,"_invoke",{value:(i=e,o=n,a=r,c="suspendedStart",function(e,t){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===e)throw t;return S()}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n){n=function e(t,n){var r=n.method,i=t.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;r=l(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;i=r.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}(n,a);if(n){if(n===d)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===c)throw c="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c="executing";n=l(i,o,a);if("normal"===n.type){if(c=a.done?"completed":"suspendedYield",n.arg===d)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(c="completed",a.method="throw",a.arg=n.arg)}})}),t}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}a.wrap=c;var d={};function p(){}function f(){}function y(){}var t={},v=(o(t,r,function(){return this}),Object.getPrototypeOf),v=v&&v(v(w([]))),g=(v&&v!==e&&s.call(v,r)&&(t=v),y.prototype=p.prototype=Object.create(t));function h(e){["next","throw","return"].forEach(function(t){o(e,t,function(e){return this._invoke(t,e)})})}function m(a,c){var t;u(this,"_invoke",{value:function(n,r){function e(){return new c(function(e,t){!function t(e,n,r,i){var o,e=l(a[e],a,n);if("throw"!==e.type)return(n=(o=e.arg).value)&&"object"==_typeof(n)&&s.call(n,"__await")?c.resolve(n.__await).then(function(e){t("next",e,r,i)},function(e){t("throw",e,r,i)}):c.resolve(n).then(function(e){o.value=e,r(o)},function(e){return t("throw",e,r,i)});i(e.arg)}(n,r,e,t)})}return t=t?t.then(e,e):e()}})}function b(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,this),this.reset(!0)}function w(t){if(t){var n,e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(s.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e}).next=e}return{next:S}}function S(){return{value:void 0,done:!0}}return u(g,"constructor",{value:f.prototype=y,configurable:!0}),u(y,"constructor",{value:f,configurable:!0}),f.displayName=o(y,i,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,o(e,i,"GeneratorFunction")),e.prototype=Object.create(g),e},a.awrap=function(e){return{__await:e}},h(m.prototype),o(m.prototype,n,function(){return this}),a.AsyncIterator=m,a.async=function(e,t,n,r,i){void 0===i&&(i=Promise);var o=new m(c(e,t,n,r),i);return a.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},h(g),o(g,i,"Generator"),o(g,r,function(){return this}),o(g,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t,n=Object(e),r=[];for(t in n)r.push(t);return r.reverse(),function e(){for(;r.length;){var t=r.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=w,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function e(e,t){return o.type="throw",o.arg=n,r.next=e,t&&(r.method="next",r.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var i=this.tryEntries[t],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),c=s.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var o=(i=i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc?null:i)?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(n=i.completion).type&&(r=n.arg,_(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},a}function asyncGeneratorStep(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function _asyncToGenerator(c){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=c.apply(e,a);function i(e){asyncGeneratorStep(r,t,n,i,o,"next",e)}function o(e){asyncGeneratorStep(r,t,n,i,o,"throw",e)}i(void 0)})}}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(){e.$inject=["c8yDeviceTypeProtocolBaseProvider","c8yDeviceProtocolUiProvider","c8yViewsProvider","gettext"];var i="c8yCanopenDevice";function e(e,t,n,m){r.$inject=["c8yDeviceDatabase","c8yDeviceControl","c8yModbusDevice","gettextCatalog","c8yInventory","c8yDevices","c8yBase","c8yUser","$q"];var b={label:m("CANopen"),fieldbusType:"canopen",serviceName:i};return e.getDeviceTypeProtocolProvider(b,r);function r(e,d,p,t,n,c,s,i,f){var r=s.createEnum(_.flatten([{name:"BOOLEAN",label:m("Boolean"),value:"boolean",edsValue:1,noBits:1},{name:"SIGNED_8",label:m("Signed (8-bits)"),value:"signed8",edsValue:2,noBits:8,signed:!0},{name:"SIGNED_16",label:m("Signed (16-bits)"),value:"signed16",edsValue:3,noBits:16,signed:!0},{name:"SIGNED_24",label:m("Signed (24-bits)"),value:"signed24",edsValue:16,noBits:24,signed:!0},{name:"SIGNED_32",label:m("Signed (32-bits)"),value:"signed32",edsValue:4,noBits:32,signed:!0},{name:"SIGNED_40",label:m("Signed (40-bits)"),value:"signed40",edsValue:18,noBits:40,signed:!0},{name:"SIGNED_48",label:m("Signed (48-bits)"),value:"signed48",edsValue:19,noBits:48,signed:!0},{name:"SIGNED_56",label:m("Signed (56-bits)"),value:"signed56",edsValue:20,noBits:56,signed:!0},{name:"SIGNED_64",label:m("Signed (64-bits)"),value:"signed64",edsValue:21,noBits:64,signed:!0},{name:"UNSIGNED_8",label:m("Unsigned (8-bits)"),value:"unsigned8",edsValue:5,noBits:8,signed:!1},{name:"UNSIGNED_16",label:m("Unsigned (16-bits)"),value:"unsigned16",edsValue:6,noBits:16,signed:!1},{name:"UNSIGNED_24",label:m("Unsigned (24-bits)"),value:"unsigned24",edsValue:22,noBits:24,signed:!1},{name:"UNSIGNED_32",label:m("Unsigned (32-bits)"),value:"unsigned32",edsValue:7,noBits:32,signed:!1},{name:"UNSIGNED_40",label:m("Unsigned (40-bits)"),value:"unsigned40",edsValue:24,noBits:40,signed:!1},{name:"UNSIGNED_48",label:m("Unsigned (48-bits)"),value:"unsigned48",edsValue:25,noBits:48,signed:!1},{name:"UNSIGNED_56",label:m("Unsigned (56-bits)"),value:"unsigned56",edsValue:26,noBits:56,signed:!1},{name:"UNSIGNED_64",label:m("Unsigned (64-bits)"),value:"unsigned64",edsValue:27,noBits:64,signed:!1},{name:"REAL_32",label:m("Real (32-bits)"),value:"real32",edsValue:8,noBits:32,decimalPlaces:null,baseValuesRange:{min:-3.4*Math.pow(10,38),max:3.4*Math.pow(10,38)}},{name:"REAL_64",label:m("Real (64-bits)"),value:"real64",edsValue:17,noBits:64,decimalPlaces:null,baseValuesRange:{min:-Number.MAX_VALUE,max:Number.MAX_VALUE}}])),o=s.createEnum([{name:"READ_ONLY",label:m("Read-only"),value:"ro"},{name:"WRITE_ONLY",label:m("Write-only"),value:"wo"},{name:"READ_WRITE",label:m("Read-write"),value:"rw"},{name:"READ_WRITE_ON_PROCESS_INPUT",label:m("Read-write on process input"),value:"rwr"},{name:"READ_WRITE_ON_PROCESS_OUTPUT",label:m("Read-write on process output"),value:"rww"},{name:"CONSTANT",label:m("Constant"),value:"const"}]),a=_objectSpread(_objectSpread({},b),{},{type:"c8y_CANopenDeviceType",deviceType:!0,discreteOutputs:!1,discreteInputs:!1,holdingRegisters:{sectionTitle:m("Variables"),noRegistersDefinedMessage:m("No variables defined."),elementTypeLabel:m("Variable"),newRegisterModalTitle:m("New variable"),editRegisterModalTitle:m('Edit variable: "{{name}}"'),addRegisterButtonLabel:m("Add variable"),unit:!0,validation:{invalidName:m("Name must be unique among variables."),invalidMeasurement:m("Selected measurement type and series are already used by another variable.")},index:{min:0,max:Math.pow(2,16)-1},subIndex:{min:0,max:Math.pow(2,8)-1},dataType:{choices:r},accessType:{choices:o},functionalities:{showStatus:{showIf:function(e){return _.includes([o.READ_ONLY,o.READ_WRITE,o.READ_WRITE_ON_PROCESS_INPUT,o.READ_WRITE_ON_PROCESS_OUTPUT,o.CONSTANT],_.get(e.meta,"accessType"))}},updateStatus:{showIf:function(e){return _.includes([o.READ_WRITE,o.READ_WRITE_ON_PROCESS_INPUT,o.READ_WRITE_ON_PROCESS_OUTPUT,o.WRITE_ONLY],_.get(e.meta,"accessType"))}},sendMeasurement:{showIf:u},raiseAlarm:{showIf:u,mask:!0},sendEvent:{showIf:u}}},inputRegisters:!1,options:{serverTime:!0},deviceFragments:["c8y_CANopenDevice"],deviceConfiguration:{fragment:"c8y_CANopenConfiguration",icon:"cloud-network"},getRegisterSource:function(e){return{key:"c8y_CANopenSource",value:{index:e.index,subIndex:e.subIndex}}},customizeSmartRestTemplates:function(e){return h(e.responseTemplates,{msgId:201,condition:"$.c8y_SetRegister",pattern:["$.id","$.c8y_SetRegister.nodeId","$.c8y_SetRegister.index","$.c8y_SetRegister.subIndex","$.c8y_SetRegister.dataType","$.c8y_SetRegister.value"]}),h(e.responseTemplates,{msgId:202,condition:"$.c8y_CANopenAddDevice",pattern:["$.id","$.deviceId","$.c8y_CANopenAddDevice.id","$.c8y_CANopenAddDevice.nodeId","$.c8y_CANopenAddDevice.type"]}),h(e.responseTemplates,{msgId:204,condition:"$.c8y_CANopenRemoveDevice",pattern:["$.id","$.deviceId","$.c8y_CANopenDevice.nodeId"]}),e}});function u(e){return _.includes([o.READ_ONLY,o.READ_WRITE,o.READ_WRITE_ON_PROCESS_INPUT,o.READ_WRITE_ON_PROCESS_OUTPUT],_.get(e.meta,"accessType"))}return{registerFeaturesManifest:function(){e.registerFeaturesManifest(l().then(function(e){return e&&a}))},isAvailable:l,create:function(e,t){return y.apply(this,arguments)},updateElement:function(e,t,n){return g.apply(this,arguments)},onRemove:function(e,t){var n=t.id,r=t.name,t=t.nodeId;return d.create({deviceId:e.id,description:'Removed child device "'.concat(r,'" (ID: ').concat(n,")."),c8y_CANopenRemoveDevice:{id:n,name:r,nodeId:t}})}};function l(){return e.isFeatureFieldbus4Available()}function y(){return(y=_asyncToGenerator(_regeneratorRuntime().mark(function e(r,i){var o,a;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,function(){return v.apply(this,arguments)}(r,i);case 2:return o=e.sent,e.t0=s,e.next=6,c.createConfirm(o);case 6:return e.t1=e.sent,a=e.t0.getResData.call(e.t0,e.t1),e.next=10,c.addChildDevice(r,a);case 10:return a.owner=r.owner,e.next=13,c.save(a);case 13:return e.abrupt("return",d.create((t=i.deviceType,n=a,{deviceId:r.id,description:'Added child device "'.concat(n.name,'" (ID: ').concat(n.id,")."),c8y_CANopenAddDevice:{id:n.id,name:n.name,type:"/inventory/managedObjects/".concat(t.id),nodeId:n.c8y_CANopenDevice.nodeId}})));case 14:case"end":return e.stop()}var t,n},e)}))).apply(this,arguments)}function v(){return(v=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n){var r;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.current();case 2:return r=e.sent,e.abrupt("return",{name:n.name,type:n.deviceType.name,c8y_CANopenDevice:{type:"/inventory/managedObjects/".concat(n.deviceType.id),nodeId:n.nodeId},c8y_SupportedOperations:["c8y_Command"],owner:r.id});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function g(){return(g=_asyncToGenerator(_regeneratorRuntime().mark(function e(a,c,s){var u,l;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(p.canUpdateElement(a,c)){e.next=2;break}return e.abrupt("return",f.reject());case 2:return o=i=r=n=void 0,n=(t={device:a,register:c,valueMap:s}).device,r=t.register,t=t.valueMap,i=t.label||t.value,o=!t.label&&r.unit?" ".concat(r.unit):"",l={deviceId:n.id,description:'Change value of "'.concat(r.name,'" to ').concat(i).concat(o,"."),c8y_SetRegister:{nodeId:n.c8y_CANopenDevice.nodeId,index:r.index,subIndex:r.subIndex,dataType:r.dataType,value:t.value}},c.changePending=!0,u=p.getAlertMessagesFns(c,s),e.next=7,p.sendOperationAndGetResult(l,u);case 7:return(l=e.sent).status===d.status.SUCCESSFUL?(_.set(a,["c8y_RegisterStatus",c.name],s.value),c.changePending=!1):l.status===d.status.FAILED&&(c.changePending=!1),e.abrupt("return",l);case 10:case"end":return e.stop()}var t,n,r,i,o},e)}))).apply(this,arguments)}function h(e,t){var n=_.findIndex(e,{msgId:t.msgId});-1<n?e[n]=t:e.push(t)}}}angular.module("c8y.canopen").provider(i,e)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(a,c
|
|
1
|
+
"use strict";!function(){function e(r,a,c){var o=this;function i(e){o.wizardCtrl.close({path:e})}function n(e){var t=o.wizardCtrl,r=t.data;r.errorMsg=e.errorMessage,r.backStep=t.getCurrentStep().stepId,t.goTo("error")}_.assign(o,{model:{},create:function(e){var t=o.wizardCtrl.data.selectedProtocol,t=(_.assign(e,{fieldbusType:t.id}),r.getService(t));return o.pending=!0,c.when(a.save(e)).then(t.detailPath).then(i,n)}})}e.$inject=["c8yDeviceProtocolUi","c8yDeviceDatabase","$q"],angular.module("c8y.deviceProtocolForDeviceDatabase4").component("c8yDeviceTypeCreateStep",{require:{wizardCtrl:"^c8yWizardStep"},templateUrl:":::PLUGIN_PATH:::/device-type-create-step.html",controller:e,controllerAs:"vm"})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r=Object.keys(t);
|
|
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,o=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)),o}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(t,o,c){return{getDeviceTypeProtocolProvider:function(r,e){return{initUi:function(){(function(){var e={id:r.fieldbusType,name:r.label,service:r.serviceName};t.register(e)})(),function(){t.$inject=["$routeParams"];var e={path:u(r),template:'<c8y-device-type-detail id="vm.id"></c8y-device-type-detail>',controller:t,controllerAs:"vm"};function t(e){_.assign(this,e)}o.when(e.path,e)}()},$get:function(n,i){return["$injector","c8yBase","c8yInventory","c8yDeviceDatabase",function(e,t,r,o){return _objectSpread({flow:_.constant(["c8yDeviceTypeCreateStep"]),list:function(){return o.getAvailableDeviceTypes({fieldbusType:n.fieldbusType})},showIf:function(){return o.isDeviceTypeSupportedAsync({fieldbusType:n.fieldbusType})},detailPath:function(e){e=t.getId(e);return u(n).replace(/:id$/,e)},getName:function(e){return e.name},listRowInfoComponent:"c8yDeviceTypeRowInfo",getListActions:function(){return[{label:c("Export"),icon:"download",execute:function(e){return o.exportDeviceTypeAndSaveAs(e.data)}}]},remove:r.remove},e.invoke(i))}]}(r,e)}},$get:function(){}};function u(e){return"/deviceprotocols/".concat(e.fieldbusType,"/:id")}}e.$inject=["c8yDeviceProtocolUiProvider","c8yViewsProvider","gettext"],angular.module("c8y.deviceProtocolForDeviceDatabase4").provider("c8yDeviceTypeProtocolBase",e)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(
|
|
1
|
+
"use strict";!function(){function e(n){_.assign(this,{count:function(e){e=n.getElementsWithMeta(e);return _.size(e)}})}e.$inject=["c8yDeviceDatabase"],angular.module("c8y.deviceProtocolForDeviceDatabase4").component("c8yDeviceTypeRowInfo",{bindings:{data:"<"},template:'\n <span class="text-label-small visible-xs-inline m-r-4">{{\'Resources\' | translate}}</span>\n <div class="c8y-icon-badge" title="{{::vm.count(vm.data)}} {{\'Resources\' | translate}}">\n <i c8y-icon="tasks"></i>\n <span class="badge badge-info">{{::vm.count(vm.data)}}</span></div>',controllerAs:"vm",controller:e})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(c,i){var r=this;function u(e){r.object=e,r.title=c.getName(e),o(),t()}function n(e){r.customActions=e}function t(){delete r.newResource}function e(){r.editingMain=!r.editingMain}function o(){r.objectMain=_.pick(_.clone(i.getMainProperties(r.object)),["id","name","description"]),r.mainPropertiesForm.$setPristine(),r.editingMain=!1}function s(){return i.getResources(r.object)}_.assign(r,{$onChanges:function(e){e.id&&(c.detail(r.id).then(u),c.getCustomActions().then(n))},addResource:function(){r.newResource={multiple:!1}},noResources:function(){return!r.newResource&&0===i.countResources(r.object)},cancelNewResourceMapping:t,saveResourceAndMapping:function(e,n,t){var o=_.cloneDeep(r.object);if(o=i.updateResource(e,t,o),o=i.updateMappingToResource(n,e,o),function(n,e){var t=s(r.object);
|
|
1
|
+
"use strict";!function(){function e(c,i){var r=this;function u(e){r.object=e,r.title=c.getName(e),o(),t()}function n(e){r.customActions=e}function t(){delete r.newResource}function e(){r.editingMain=!r.editingMain}function o(){r.objectMain=_.pick(_.clone(i.getMainProperties(r.object)),["id","name","description"]),r.mainPropertiesForm.$setPristine(),r.editingMain=!1}function s(){return i.getResources(r.object)}_.assign(r,{$onChanges:function(e){e.id&&(c.detail(r.id).then(u),c.getCustomActions().then(n))},addResource:function(){r.newResource={multiple:!1}},noResources:function(){return!r.newResource&&0===i.countResources(r.object)},cancelNewResourceMapping:t,saveResourceAndMapping:function(e,n,t){var o=_.cloneDeep(r.object);if(o=i.updateResource(e,t,o),o=i.updateMappingToResource(n,e,o),function(n,e){var t=s(r.object);if(i.isSameResource(n,e))return;return _.find(t,function(e){return e.id===n.id})}(e,t))return c.overwriteResourceConfirm(e).then(function(){return c.save(o)}).then(u);return c.save(o).then(u)},removeResource:function(e){var n=_.cloneDeep(r.object);return c.removeResourceConfirm(e).then(function(e){return i.removeResource(e,n)}).then(i.saveToInventory).then(u).then(c.alertRemoveResourceSuccess)},toggleMainEdit:e,saveMainProperties:function(){var e=_.cloneDeep(r.object);return e=i.updateMainProperties(r.objectMain,e),i.saveToInventory(e).then(u).then(c.alertUpdateProtocolSuccess)},cancelMainProperties:function(){e(),o()},getResources:s,getMappingForResource:function(e){return _.get(i.getMappings(r.object),e)},getMainObject:function(){return i.getMainObject(r.object)}})}e.$inject=["c8yImpact","c8yObjectMappings"],angular.module("c8y.impact").component("c8yImpactDetail",{bindings:{id:"<"},templateUrl:":::PLUGIN_PATH:::/impact-detail.html",controller:e,controllerAs:"vm"})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){e.$inject=["c8yDeviceProtocolUiProvider","c8yViewsProvider","gettext"];var o="c8yImpact";function e(e,t,
|
|
1
|
+
"use strict";!function(){e.$inject=["c8yDeviceProtocolUiProvider","c8yViewsProvider","gettext"];var o="c8yImpact";function e(e,t,h){n.$inject=["c8yTenant","c8yBase","c8yInventory","c8yObjectMappings","c8yModal","c8yAlert","gettextCatalog","$q","$http"],r.$inject=["$routeParams"];var c={service:o,id:"impact",name:h("IMPACT")},y={path:"/deviceprotocols/".concat(c.id,"/:id"),template:'<c8y-impact-detail id="vm.id"></c8y-impact-detail>',controllerAs:"vm",controller:r};return{initUi:function(){e.register(c),t.when(y.path,y)},$get:n};function r(e){_.assign(this,e)}function n(e,c,t,r,n,o,a,i,u){var s,d=c.url("service/impact/"),l="".concat(d,"objectResourceMappings"),p="".concat(l,"/json"),g=[h("BOOLEAN"),h("STRING"),h("INTEGER"),h("FLOAT")];return{showIf:m,isServiceSubscribed:v,flow:_.constant(["c8yImpactCreateStep"]),detail:function(e){e=c.getId(e);return t.detail(e).then(c.getResData)},detailPath:function(e){e=c.getId(e);return y.path.replace(/:id$/,e)},create:function(e){e=r.createManagedObject(e);return e.type="impact_object_mapping",u.post(p,e).then(c.getResData)},save:function(e){var t=r.fragments.BASE_FRAGMENT,e=_.pick(e,["id",t]);if(!_.get(e,t))throw new Error("c8yImpact.save: ".concat(t," is not defined"));if(_.get(e,"id"))return u.post(p,e).then(c.getResData);throw new Error("c8yImpact.save: Id is not defined")},remove:t.remove,removeResourceConfirm:function(t){var e={title:h("Delete resource"),body:a.getString('You are about to delete the resource with the ID "{{id}}". Do you want to proceed?',t),status:"danger",labels:{ok:h("Delete"),cancel:h("Cancel")}};return n(e).then(function(e){return e?t:i.reject()})},overwriteResourceConfirm:function(t){var e={title:h("Overwrite resource"),body:a.getString('You are about to overwrite the resource with the ID "{{id}}". Do you want to proceed?',t),status:"warning",labels:{ok:h("Overwrite"),cancel:h("Cancel")}};return n(e).then(function(e){return e?t:i.reject()})},list:function(){return u.get(l,{silentError:!0}).then(c.getResData)},getName:r.getName,DATA_TYPES:g,alertRemoveResourceSuccess:function(){var e=h("Resource deleted.");o.success(e)},alertUpdateProtocolSuccess:function(){var e=h("Device protocol updated");o.success(e)},listRowInfoComponent:"c8yDeviceProtocolRowCountResources",getCustomActions:function(){s=s||u.get("".concat(d,"mappingActions/resourceactions")).then(c.getResData).then(f);return s}};function m(){return m.cached=m.cached?m.cached:v()}function v(){return e.isSubscribed({name:"impact",type:"MICROSERVICE"})}function f(e){return _.reduce(e,function(e,t){var c=t.name,t=t.args,t=_.get(t,"length")?t.map(function(e){return"".concat(c,":").concat(e)}):[c];return e.concat(t)},[])}}}angular.module("c8y.impact").provider(o,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 _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(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 _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}function _arrayWithHoles(e){if(Array.isArray(e))return 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(){e.$inject=["c8yDeviceTypeProtocolBaseProvider","gettext"];var r="c8yLoraDevice";function e(e,u){t.$inject=["$q","c8yDeviceDatabase","c8yTenant"];var s={label:u("LoRa"),fieldbusType:"lora",serviceName:r};return e.getDeviceTypeProtocolProvider(s,t);function t(e,t,r){var n={name:"loriot-agent"},o=[t.MessageIdSources.FPORT,t.MessageIdSources.PAYLOAD],i=_objectSpread(_objectSpread({},s),{},{type:"c8y_LoraDeviceType",configuration:{messageIdConfiguration:o},discreteOutputs:!1,discreteInputs:!1,holdingRegisters:{sectionTitle:u("Values"),noRegistersDefinedMessage:u("No values defined."),newRegisterModalTitle:u("New value"),editRegisterModalTitle:u('Edit value: "{{name}}"'),addRegisterButtonLabel:u("Add value"),validation:{invalidName:u("Name must be unique among values."),invalidMeasurement:u("Selected measurement type and series are already used by another value in the same message type.")},messageTypeId:{label:u("Message type ID")},startBit:!0,noBits:!0,multiplier:!0,offset:!0,decimalPlaces:!1,options:{signed:!0,bcd:!0,littleEndian:!0},functionalities:{showStatus:!1,updateStatus:!1,sendMeasurement:!0,raiseAlarm:{alarmStatus:!0},sendEvent:{fragmentType:!0,innerType:!0},sendManagedObjectUpdate:!0},unit:{requiredForSendMeasurement:!0}},inputRegisters:!1,options:!1});return{registerFeaturesManifest:function(){t.registerFeaturesManifest(a().then(function(e){return e&&i}))},isSubscribed:a};function a(){return e.all([r.isSubscribed({name:"actility"}),r.isSubscribed(n)]).then(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];return t||e})}}}angular.module("c8y.lora").provider(r,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 _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){if(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 _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,a,c=[],u=!0,y=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(c.push(n.value),c.length!==r);u=!0);}catch(e){y=!0,o=e}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(y)throw o}}return c}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(r,e){var t,n=Object.keys(r);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(r),e&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),n.push.apply(n,t)),n}function _objectSpread(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach(function(e){_defineProperty(r,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})}return r}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(e,r){if("object"!==_typeof(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(e);t=t.call(e,r||"default");if("object"!==_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}!function(){e.$inject=["c8yDeviceTypeProtocolBaseProvider","gettext"];var n="c8yLpwanDevice";function e(e,r){t.$inject=["$q","c8yDeviceDatabase","c8yTenant"];var u={label:r("LPWAN"),fieldbusType:"lpwan",serviceName:n};return e.getDeviceTypeProtocolProvider(u,t);function t(e,r,t){var n={name:"loriot-agent"},o={name:"sigfox-agent"},i={name:"actility"},a=_objectSpread(_objectSpread({},u),{},{type:"c8y_LpwanDeviceType",noNewProtocolInstances:!0});return{registerFeaturesManifest:function(){r.registerFeaturesManifest(c().then(function(e){return e&&a}))},isSubscribed:c};function c(){return e.all([t.isSubscribed(i),t.isSubscribed(n),t.isSubscribed(o)]).then(function(e){var e=_slicedToArray(e,3),r=e[0],t=e[1],e=e[2];return r||t||e})}}}angular.module("c8y.lpwan").provider(n,e)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){t.$inject=["gettext","c8yDeviceProtocolUiProvider","c8yViewsProvider"];var
|
|
1
|
+
"use strict";!function(){t.$inject=["gettext","c8yDeviceProtocolUiProvider","c8yViewsProvider"];var o="c8yLwm2m";function t(h,t,e){a.$inject=["c8yBase","c8yInventory","c8yTenant","c8yObjectMappings","$http","$upload"],i.$inject=["$routeParams"];var n={service:o,id:"lwm2m",name:h("LWM2M")},p={path:"/deviceprotocols/".concat(n.id,"/:id"),template:'<c8y-lwm2m-detail id="vm.id"></c8y-lwm2m-detail>',controllerAs:"vm",controller:i};return{initUi:function(){t.register(n),e.when(p.path,p)},$get:a};function i(t){_.assign(this,t)}function a(e,n,t,i,a,o){var r,c=e.url("service/lwm2m-agent/"),s="".concat(c,"objectResourceMappings");return{flow:function(){return["c8yLwm2mUploadStep","c8yLwm2mFinalStep"]},list:function(){return a.get(s,{silentError:!0}).then(e.getResData)},detail:function(t){t=e.getId(t);return n.detail(t).then(e.getResData)},detailPath:function(t){t=m(t);return p.path.replace(/:id$/,t)},upload:function(t){return o.upload({url:"".concat(s,"/ddf"),method:"POST",headers:{Accept:"application/json"},file:t,fileName:t.name.replace(/\s+/g,"_")})},remove:function(t){t=m(t);return n.remove(t)},getName:function(t){var e=i.getName(t),t=i.getObjectId(t);return"".concat(t," ").concat(e)},updateMapping:function(t,e){t="".concat(s,"/").concat(t,"/add");return a.put(t,e)},getPostRegistrationOptions:function(){var t={url:"".concat(c,"postRegistrationOptions"),method:"GET",silentError:!0};return a(t).then(e.getResData)},setPostRegistrationOptions:function(t){t={url:"".concat(c,"postRegistrationOptions"),method:"PUT",data:{commands:t}};return a(t)},helpTexts:{minPeriod:h("The minimum period attribute indicates the minimum time in seconds the LWM2M client MUST wait between two notifications."),maxPeriod:h("The maximum period attribute indicates the maximum time in seconds the LWM2M client MAY wait between two notifications."),greaterThan:h("This greater than attribute defines a threshold high value."),lessThan:h("This less than attribute defines a threshold low value."),step:h("This step attribute defines a minimum change value between two notifications.")},isServiceSubscribed:u,showIf:l,listRowInfoComponent:"c8yDeviceProtocolRowCountResources",getCustomActions:function(){r=r||a.get("".concat(c,"mappingActions/resourceactions")).then(e.getResData).then(d);return r},Validation:{RuleType:{LT:"lt",GT:"gt",EQ:"eq",NEQ:"neq",GTE:"gte",LTE:"lte",AND:"and",OR:"or"},ValueType:{NUMBER:"number",DATE:"date",STRING:"string",REGEX:"regex",OBJECTLINK:"objectLink"},ResourceDataType:{INTEGER:"INTEGER",FLOAT:"FLOAT",STRING:"STRING",BOOLEAN:"BOOLEAN",TIME:"TIME",OBJECTLINK:"OBJECTLINK"},RuleName:{GT:"Greater than",LT:"Lower than",GTE:"Greater or equals than",LTE:"Lower or equals than",EQ:"Equals",NEQ:"Equals not"}}};function u(){return t.isSubscribed({name:"lwm2m-agent",type:"MICROSERVICE"})}function l(){return l._cached=l._cached?l._cached:u()}function m(t){return _.get(t,"id")}function d(t){return _.reduce(t,function(t,e){var n=e.name,e=e.args,e=_.get(e,"length")?e.map(function(t){return"".concat(n,":").concat(t)}):[n];return t.concat(e)},[])}}}angular.module("c8y.lwm2m").provider(o,t)}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function t(t,n){var r=this,e="wizardCtrl.data.updloadResult";function a(){return _.get(r,e)}function i(){return _.get(a(),"new")}function l(){return _.get(a(),"error")}function o(){return _.get(a(),"updated")}_.assign(r,{created:i,errors:l,finish:function(){var t,e=_.union(i(),o());l()&&l().length||1!==e.length||(t=n.detailPath(e[0]));r.wizardCtrl.close({path:t})},gotoDetail:function(t){
|
|
1
|
+
"use strict";!function(){function t(t,n){var r=this,e="wizardCtrl.data.updloadResult";function a(){return _.get(r,e)}function i(){return _.get(a(),"new")}function l(){return _.get(a(),"error")}function o(){return _.get(a(),"updated")}_.assign(r,{created:i,errors:l,finish:function(){var t,e=_.union(i(),o());l()&&l().length||1!==e.length||(t=n.detailPath(e[0]));r.wizardCtrl.close({path:t})},gotoDetail:function(t){t=n.detailPath(t);r.wizardCtrl.close({path:t})},name:function(t){return n.getName(t)},updated:o})}t.$inject=["$q","c8yLwm2m"],angular.module("c8y.lwm2m").component("c8yLwm2mFinalStep",{templateUrl:":::PLUGIN_PATH:::/lwm2mFinalStep.html",controllerAs:"vm",controller:t,require:{wizardCtrl:"^c8yWizardStep"}})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function t(e,
|
|
1
|
+
"use strict";!function(){function t(r,e,n,o,l){var a=this,s={inProgress:!1,progress:0,label:null};function i(t){s.inProgress=t,a.wizardCtrl.setAllowUserInteraction(!t)}function u(t,e){return o.upload(t.file).progress(function(t){var r;(r=s.multipleProgress)[e]=10+t.loaded/t.total*90,s.progress=_.sum(r)/r.length}).then(n.getResData)}function c(t){s.progress=100,a.wizardCtrl.data.updloadResult=t.reduce(function(e,t){return _.forEach(t,function(t,r){e[r]=_.get(e,r,[]).concat(t)}),e},{}),e(_.partial(a.wizardCtrl.goTo,"c8yLwm2mFinalStep"),200)}function g(t){var t=t.data,r=a.wizardCtrl,e=r.data;e.errorMsg=_.get(t,"message")||l("Parsing the DDF file resulted in an internal error"),e.backStep=r.getCurrentStep().stepId,r.goTo("error")}function p(){i(!1)}_.assign(a,{upload:function(t){i(!0),s.progress=0,s.multipleProgress=_.fill(Array(t.length),0);t=_.map(t,u);return r.all(t).then(c,g).then(p,p)},processingStatus:s})}t.$inject=["$q","$timeout","c8yBase","c8yLwm2m","gettext"],angular.module("c8y.lwm2m").component("c8yLwm2mUploadStep",{templateUrl:":::PLUGIN_PATH:::/lwm2mUploadStep.html",require:{wizardCtrl:"^c8yWizardStep"},controllerAs:"vm",controller:t})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(e,n,
|
|
1
|
+
"use strict";!function(){function e(e,n,l){var a=e.Validation.RuleType,r=e.Validation.ResourceDataType,o=e.Validation.ValueType,e=e.Validation.RuleName,t=[{type:a.GT,name:e.GT},{type:a.LT,name:e.LT},{type:a.GTE,name:e.GTE},{type:a.LTE,name:e.LTE},{type:a.EQ,name:e.EQ},{type:a.NEQ,name:e.NEQ}],u=this;function i(){var e;u.showDateTime=m()&&s(),u.showDateTime&&(e=function(e){var a;{var t;_.isString(e)?(a=moment(e)).isValid()||(t=_.toNumber(e),_.isNumber(t)&&(a=moment(new Date(t)))):_.isNumber(e)&&(a=moment(new Date(e)))}return{asString:_.get(a,"_d"),asMs:a?a.valueOf():void 0}}(u.dateTimeValue||_.get(u.rule,"arg.value")),u.value=e.asMs,u.dateTimeValue=e.asString,u.rule.arg.value=e.asMs)}function s(){return!(!_.isUndefined(u.selectedType)||u.resourceDataType!==r.TIME)||u.selectedType===o.DATE}function m(){return u.resourceDataType===r.TIME}function T(){var e=_.get(u.rule,"arg.valueType"),a="",t="";return e===o.STRING&&u.resourceDataType===r.BOOLEAN&&(t='"true"'.concat(" ",l.getString("or"),' "false"'),a="(true|false)"),e===o.OBJECTLINK&&(t=n("Refer to a resource using the following format: /Object/Instance/Resource, for example, /3303/0/5700."),a="/[\\d*/]*\\d+"),e===o.NUMBER&&u.resourceDataType===r.INTEGER&&(t=n("Only values of type Integer allowed."),a="-?\\d+"),e===o.NUMBER&&u.resourceDataType===r.FLOAT&&(t=n("Only values of type Float allowed."),a="-?\\d*[.]\\d+"),e===o.DATE&&u.resourceDataType===r.TIME&&(t=n("Only numbers allowed, for example, 1528197925677."),a="\\d+"),{pattern:a,tooltip:t}}function c(e){e=_.find(t,{type:e});return e?e.name:void 0}_.assign(u,{change:function(){u.rule.type=function(e){e=_.find(t,{name:e});return e?e.type:void 0}(u.selectedRule),u.rule.arg.valueType=u.selectedType,u.rule.arg.value=u.value,u.showDateTime=s()&&m(),u.formValidation=T(),u.onChange({rule:u.rule})},dateTimeChange:i,reflectInDateTimePicker:function(){u.dateTimeValue=moment(new Date(_.toNumber(u.value)))},selectedRule:c(_.get(u.rule,"type",_.first(u.options))),selectedType:_.get(u.rule,"arg.valueType"),ruleOptions:(a=u.options,_.map(a,c)),formValidation:T(),value:_.get(u.rule,"arg.value"),dateTimeValue:i(),$onChange:u.onChange({rule:u.rule})})}e.$inject=["c8yLwm2m","gettext","gettextCatalog"],angular.module("c8y.lwm2m").component("c8yLwm2mValidationRule",{templateUrl:":::PLUGIN_PATH:::/lwm2mValidationRules/lwm2mValidationRule.html",controller:e,controllerAs:"vm",bindings:{rule:"<",options:"<",isLast:"<",valueTypes:"<",onAdd:"&",onRemove:"&",onChange:"&",resourceDataType:"@"}})}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";!function(){function e(e,a){var u=this
|
|
1
|
+
"use strict";!function(){function e(e,a){var u=this,r=(_.assign(u,{changes:function(){o()},addOrGroup:T,addAndRule:function(e){if(_.isEmpty(e)&&0===u.rules.length)T();else{for(var a=-1,r=0;r<u.rules.length;r++){var t=u.rules[r];if(_.find(t,e)){a=r;break}}-1<a&&u.rules[a].push(y())}o()},remove:function(a){_.forEach(u.rules,function(e){_.remove(e,a)}),_.remove(u.rules,function(e){return 0===e.length}),u.mappingForm.$setDirty(),o()},rules:[],valueTypes:[],isLast:function(e){return _.last(u.rules)===e},resourceDataType:u.resource.dataType}),a.Validation.RuleType),t=a.Validation.ValueType,a=a.Validation.ResourceDataType,n=[a.INTEGER,a.FLOAT,a.TIME],s=[a.INTEGER,a.FLOAT,a.TIME,a.STRING,a.BOOLEAN,a.OBJECTLINK],l=[{type:r.GT,valueTypes:n},{type:r.LT,valueTypes:n},{type:r.EQ,valueTypes:s},{type:r.NEQ,valueTypes:s},{type:r.GTE,valueTypes:n},{type:r.LTE,valueTypes:n}],p=[{resourceTypes:[a.INTEGER,a.FLOAT],valueTypes:[t.NUMBER,t.OBJECTLINK]},{resourceTypes:[a.TIME],valueTypes:[t.DATE,t.OBJECTLINK]},{resourceTypes:[a.STRING,a.OBJECTLINK],valueTypes:[t.STRING,t.REGEX,t.OBJECTLINK]},{resourceTypes:[a.BOOLEAN],valueTypes:[t.STRING,t.OBJECTLINK]}];function i(){var e;u.options=_.filter(l,{valueTypes:[u.resource.dataType]}).map(function(e){return e.type}),u.valueTypes=_.flatten(_.filter(p,{resourceTypes:[u.resource.dataType]}).map(function(e){return e.valueTypes})),(e=_.get(u.mapping,"validation"))&&e.type&&e.arg&&e.type===r.OR&&_.forEach(e.arg,function(e){u.rules.push(e.arg)})}function o(){var a={type:r.OR,arg:[]};_.map(u.rules,function(e){a.arg.push({type:r.AND,arg:e})}),_.assign(u.mapping,{validation:0<a.arg.length?a:null})}function T(){u.rules.push([y()])}function y(){return{type:_.first(u.options),arg:{valueType:_.first(u.valueTypes),value:void 0}}}e.$watch("vm.mapping.validation",function(){u.rules=[],i()})}e.$inject=["$scope","c8yLwm2m"],angular.module("c8y.lwm2m").component("c8yLwm2mValidationRules",{templateUrl:":::PLUGIN_PATH:::/lwm2mValidationRules/lwm2mValidationRules.html",controller:e,controllerAs:"vm",bindings:{mapping:"=",resource:"<"}})}();
|