@c8y/ngx-components 1022.13.0 → 1022.21.3
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/alarms/alarms.helper.d.ts.map +1 -1
- package/auth-configuration/sso-configuration/templates/template.component.d.ts +1 -1
- package/core/asset-property/asset-property.model.d.ts +0 -6
- package/core/asset-property/asset-property.model.d.ts.map +1 -1
- package/core/authentication/authentication.module.d.ts.map +1 -1
- package/core/authentication/new-password.component.d.ts +3 -2
- package/core/authentication/new-password.component.d.ts.map +1 -1
- package/core/dashboard/widget-auto-refresh-context/auto-refresh-control.component.d.ts.map +1 -1
- package/core/drop-area/drop-area.component.d.ts +2 -0
- package/core/drop-area/drop-area.component.d.ts.map +1 -1
- package/core/dynamic-forms/file/file.type.component.d.ts.map +1 -1
- package/core/modal/modal.module.d.ts.map +1 -1
- package/core/modal/modal.service.d.ts +1 -0
- package/core/modal/modal.service.d.ts.map +1 -1
- package/core/plugins/plugins.module.d.ts.map +1 -1
- package/core/plugins/plugins.service.d.ts +1 -2
- package/core/plugins/plugins.service.d.ts.map +1 -1
- package/core/select/select.component.d.ts.map +1 -1
- package/core/user/user-edit-modal.component.d.ts +1 -0
- package/core/user/user-edit-modal.component.d.ts.map +1 -1
- package/core/user/user-edit.component.d.ts +4 -1
- package/core/user/user-edit.component.d.ts.map +1 -1
- package/datapoint-explorer/datapoint-explorer.module.d.ts +2 -0
- package/datapoint-explorer/datapoint-explorer.module.d.ts.map +1 -1
- package/datapoint-explorer/devicemanagement/c8y-ngx-components-datapoint-explorer-devicemanagement.d.ts.map +1 -0
- package/datapoint-explorer/devicemanagement/index.d.ts +2 -0
- package/datapoint-explorer/devicemanagement/index.d.ts.map +1 -0
- package/datapoint-explorer/view/datapoint-explorer.component.d.ts +6 -3
- package/datapoint-explorer/view/datapoint-explorer.component.d.ts.map +1 -1
- package/datapoint-explorer/view/datapoint-explorer.model.d.ts +8 -0
- package/datapoint-explorer/view/datapoint-explorer.model.d.ts.map +1 -0
- package/datapoint-explorer/view/index.d.ts +1 -0
- package/datapoint-explorer/view/index.d.ts.map +1 -1
- package/device-list/devices.breadcrumb-factory.d.ts +1 -0
- package/device-list/devices.breadcrumb-factory.d.ts.map +1 -1
- package/device-profile/add-device-profile.component.d.ts +1 -1
- package/device-profile/add-device-profile.component.d.ts.map +1 -1
- package/device-profile/device-profile-list.component.d.ts +1 -1
- package/device-profile/device-profile-list.component.d.ts.map +1 -1
- package/device-profile/device-profile.component.d.ts +1 -1
- package/device-profile/device-profile.component.d.ts.map +1 -1
- package/device-profile/device-profile.module.d.ts +17 -17
- package/device-profile/device-profile.module.d.ts.map +1 -1
- package/device-profile/device-tab-profile/device-profile-item-list.component.d.ts +1 -1
- package/device-profile/device-tab-profile/device-profile-item-list.component.d.ts.map +1 -1
- package/device-profile/device-tab-profile/device-tab-profile-detail.component.d.ts +1 -1
- package/device-profile/device-tab-profile/device-tab-profile-detail.component.d.ts.map +1 -1
- package/device-profile/device-tab-profile/device-tab-profile.component.d.ts +1 -1
- package/device-profile/device-tab-profile/device-tab-profile.component.d.ts.map +1 -1
- package/device-profile/select-configuration-modal.component.d.ts +1 -1
- package/device-profile/select-configuration-modal.component.d.ts.map +1 -1
- package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts +4 -2
- package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts.map +1 -1
- package/device-shell/command-templates/command-templates.component.d.ts +1 -1
- package/device-shell/command-templates/command-templates.component.d.ts.map +1 -1
- package/device-shell/command-templates/command-templates.directive.d.ts +1 -1
- package/device-shell/command-templates/command-templates.directive.d.ts.map +1 -1
- package/device-shell/command-templates/command-templates.module.d.ts +1 -1
- package/device-shell/shell/shell.component.d.ts +1 -1
- package/device-shell/shell/shell.component.d.ts.map +1 -1
- package/device-shell/shell/shell.module.d.ts +7 -7
- package/diagnostics/diagnostics.component.d.ts +1 -1
- package/diagnostics/diagnostics.component.d.ts.map +1 -1
- package/diagnostics/diagnostics.module.d.ts +8 -8
- package/diagnostics/diagnostics.module.d.ts.map +1 -1
- package/echart/services/chart-realtime.service.d.ts +2 -0
- package/echart/services/chart-realtime.service.d.ts.map +1 -1
- package/echart/services/echarts-options.service.d.ts +4 -4
- package/echart/services/echarts-options.service.d.ts.map +1 -1
- package/events/c8y-ngx-components-events.d.ts.map +1 -0
- package/events/events-timeline/c8y-ngx-components-events-events-timeline.d.ts.map +1 -0
- package/events/events-timeline/events-timeline.component.d.ts +19 -0
- package/events/events-timeline/events-timeline.component.d.ts.map +1 -0
- package/events/events-timeline/index.d.ts +2 -0
- package/events/events-timeline/index.d.ts.map +1 -0
- package/events/events.model.d.ts +6 -0
- package/events/events.model.d.ts.map +1 -0
- package/events/events.service.d.ts +10 -0
- package/events/events.service.d.ts.map +1 -0
- package/events/index.d.ts +3 -0
- package/events/index.d.ts.map +1 -0
- package/fesm2022/c8y-ngx-components-alarms.mjs +2 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +2 -2
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-devicemanagement.mjs +38 -0
- package/fesm2022/c8y-ngx-components-datapoint-explorer-devicemanagement.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +143 -142
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-list.mjs +10 -3
- package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +126 -49
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +44 -12
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -22
- package/fesm2022/c8y-ngx-components-device-shell.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +36 -19
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +53 -17
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +45 -0
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-events.mjs +44 -0
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +8 -14
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs +49 -49
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +27 -14
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +27 -33
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +51 -39
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +10 -8
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +16 -11
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +8 -11
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +25 -21
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -9
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +31 -31
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +33 -13
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +19 -13
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +40 -36
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +60 -41
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +122 -109
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +66 -41
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +11 -16
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +212 -83
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +113 -54
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +130 -62
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +37 -28
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +156 -83
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services.mjs +32 -19
- package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +12 -5
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +68 -31
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +16 -3
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +1 -14
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-user-roles.mjs +8 -3
- package/fesm2022/c8y-ngx-components-user-roles.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +4 -4
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1219 -1190
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +53 -35
- package/locales/es.po +26 -5
- package/locales/fr.po +51 -30
- package/locales/ja_JP.po +90 -67
- package/locales/ko.po +26 -5
- package/locales/locales.pot +22 -13
- package/locales/nl.po +26 -5
- package/locales/pl.po +26 -5
- package/locales/pt_BR.po +26 -5
- package/locales/zh_CN.po +27 -6
- package/locales/zh_TW.po +26 -5
- package/operations/bulk-operation-from-single/bulk-operation-from-single.component.d.ts +1 -1
- package/operations/bulk-operation-from-single/bulk-operation-from-single.component.d.ts.map +1 -1
- package/operations/bulk-operation-from-single/bulk-operation-from-single.module.d.ts +3 -5
- package/operations/bulk-operation-from-single/bulk-operation-from-single.module.d.ts.map +1 -1
- package/operations/bulk-operation-list-item/bulk-operation-list-item.component.d.ts +1 -1
- package/operations/bulk-operation-list-item/bulk-operation-list-item.component.d.ts.map +1 -1
- package/operations/bulk-operation-list-item/bulk-operation-list-item.module.d.ts +1 -7
- package/operations/bulk-operation-list-item/bulk-operation-list-item.module.d.ts.map +1 -1
- package/operations/bulk-operation-list-item/bulk-operation-wrapper.component.d.ts +1 -1
- package/operations/bulk-operation-list-item/bulk-operation-wrapper.component.d.ts.map +1 -1
- package/operations/bulk-operation-list-item/modal-body-host.directive.d.ts +1 -1
- package/operations/bulk-operation-list-item/modal-body-host.directive.d.ts.map +1 -1
- package/operations/bulk-operation-list-item/modals/bulk-operations-reschedule-modal.component.d.ts +1 -1
- package/operations/bulk-operation-list-item/modals/bulk-operations-reschedule-modal.component.d.ts.map +1 -1
- package/operations/bulk-operation-scheduler/bulk-operation-scheduler.module.d.ts +6 -6
- package/operations/bulk-operation-scheduler/operation-scheduler.component.d.ts +1 -1
- package/operations/bulk-operation-scheduler/operation-scheduler.component.d.ts.map +1 -1
- package/operations/bulk-operation-stepper/base-stepper.component.d.ts +1 -1
- package/operations/bulk-operation-stepper/bulk-operation-stepper.component.d.ts +1 -1
- package/operations/bulk-operation-stepper/bulk-operation-stepper.component.d.ts.map +1 -1
- package/operations/bulk-operation-stepper/bulk-operation-stepper.module.d.ts +1 -5
- package/operations/bulk-operation-stepper/bulk-operation-stepper.module.d.ts.map +1 -1
- package/operations/bulk-operation-stepper/custom-step.directive.d.ts +1 -1
- package/operations/bulk-operation-stepper/custom-step.directive.d.ts.map +1 -1
- package/operations/bulk-operations-list/bulk-operations-list.component.d.ts +1 -1
- package/operations/bulk-operations-list/bulk-operations-list.component.d.ts.map +1 -1
- package/operations/bulk-operations-list/bulk-operations-list.module.d.ts +4 -10
- package/operations/bulk-operations-list/bulk-operations-list.module.d.ts.map +1 -1
- package/operations/bulk-operations-list/modals/bulk-operations-modal.component.d.ts +1 -1
- package/operations/bulk-operations-list/modals/bulk-operations-modal.component.d.ts.map +1 -1
- package/operations/bulk-operations-stepper-container/bulk-operations-stepper-container.component.d.ts +1 -1
- package/operations/bulk-operations-stepper-container/bulk-operations-stepper-container.component.d.ts.map +1 -1
- package/operations/bulk-operations-stepper-container/bulk-operations-stepper-container.module.d.ts +3 -4
- package/operations/bulk-operations-stepper-container/bulk-operations-stepper-container.module.d.ts.map +1 -1
- package/operations/create-bulk-operation-details/create-bulk-operation-details.component.d.ts +1 -1
- package/operations/create-bulk-operation-details/create-bulk-operation-details.component.d.ts.map +1 -1
- package/operations/create-bulk-operation-details/create-bulk-operation-details.module.d.ts +1 -4
- package/operations/create-bulk-operation-details/create-bulk-operation-details.module.d.ts.map +1 -1
- package/operations/device-selector/device-selector.component.d.ts +1 -1
- package/operations/device-selector/device-selector.component.d.ts.map +1 -1
- package/operations/device-selector/device-selector.module.d.ts +1 -3
- package/operations/device-selector/device-selector.module.d.ts.map +1 -1
- package/operations/operation-details/operation-details-modal.component.d.ts +1 -1
- package/operations/operation-details/operation-details-modal.component.d.ts.map +1 -1
- package/operations/operation-details/operation-details.component.d.ts +1 -1
- package/operations/operation-details/operation-details.component.d.ts.map +1 -1
- package/operations/operation-details/operation-details.module.d.ts +1 -7
- package/operations/operation-details/operation-details.module.d.ts.map +1 -1
- package/operations/operation-details/operation-details.service.d.ts.map +1 -1
- package/operations/operation-summary/operation-summary.component.d.ts +1 -1
- package/operations/operation-summary/operation-summary.component.d.ts.map +1 -1
- package/operations/operation-summary/operation-summary.module.d.ts +1 -2
- package/operations/operation-summary/operation-summary.module.d.ts.map +1 -1
- package/operations/operations-list/operations-list-item.component.d.ts.map +1 -1
- package/operations/operations-list/operations-list.component.d.ts.map +1 -1
- package/operations/operations-list/operations-list.service.d.ts +1 -1
- package/operations/operations-list/operations-list.service.d.ts.map +1 -1
- package/operations/operations-list-item-details/operation-details-tabs.component.d.ts +1 -1
- package/operations/operations-list-item-details/operation-details-tabs.component.d.ts.map +1 -1
- package/operations/operations-list-item-details/operation-details.component.d.ts +1 -1
- package/operations/operations-list-item-details/operation-details.component.d.ts.map +1 -1
- package/operations/operations-list-item-details/operations-list-item-details.module.d.ts +1 -6
- package/operations/operations-list-item-details/operations-list-item-details.module.d.ts.map +1 -1
- package/operations/operations-timeline/operations-timeline.component.d.ts +5 -5
- package/operations/operations-timeline/operations-timeline.component.d.ts.map +1 -1
- package/operations/operations-timeline/operations-timeline.module.d.ts +4 -6
- package/operations/operations-timeline/operations-timeline.module.d.ts.map +1 -1
- package/operations/status-filter/status-filter.component.d.ts +1 -1
- package/operations/status-filter/status-filter.component.d.ts.map +1 -1
- package/operations/status-filter/status-filter.module.d.ts +1 -4
- package/operations/status-filter/status-filter.module.d.ts.map +1 -1
- package/operations/stepper-bulk-type-configuration/stepper-bulk-type-configuration.component.d.ts +1 -1
- package/operations/stepper-bulk-type-configuration/stepper-bulk-type-configuration.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-configuration/stepper-bulk-type-configuration.module.d.ts +1 -6
- package/operations/stepper-bulk-type-configuration/stepper-bulk-type-configuration.module.d.ts.map +1 -1
- package/operations/stepper-bulk-type-device-profile/confirm-device-profile-selection-step.component.d.ts +1 -1
- package/operations/stepper-bulk-type-device-profile/confirm-device-profile-selection-step.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-device-profile/select-device-profile-step.component.d.ts +1 -1
- package/operations/stepper-bulk-type-device-profile/select-device-profile-step.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-device-profile/stepper-bulk-type-device-profile.component.d.ts +1 -1
- package/operations/stepper-bulk-type-device-profile/stepper-bulk-type-device-profile.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-device-profile/stepper-bulk-type-device-profile.module.d.ts +1 -6
- package/operations/stepper-bulk-type-device-profile/stepper-bulk-type-device-profile.module.d.ts.map +1 -1
- package/operations/stepper-bulk-type-firmware/select-firmware.component.d.ts +1 -1
- package/operations/stepper-bulk-type-firmware/select-firmware.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-firmware/stepper-bulk-type-firmware.component.d.ts +1 -1
- package/operations/stepper-bulk-type-firmware/stepper-bulk-type-firmware.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-firmware/stepper-bulk-type-firmware.module.d.ts +1 -6
- package/operations/stepper-bulk-type-firmware/stepper-bulk-type-firmware.module.d.ts.map +1 -1
- package/operations/stepper-bulk-type-firmware/version-or-patch.component.d.ts +1 -1
- package/operations/stepper-bulk-type-firmware/version-or-patch.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-software/confirm-software-selection-step.component.d.ts +1 -1
- package/operations/stepper-bulk-type-software/confirm-software-selection-step.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-software/select-software-step.component.d.ts +1 -1
- package/operations/stepper-bulk-type-software/select-software-step.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-software/stepper-bulk-type-software.component.d.ts +1 -1
- package/operations/stepper-bulk-type-software/stepper-bulk-type-software.component.d.ts.map +1 -1
- package/operations/stepper-bulk-type-software/stepper-bulk-type-software.module.d.ts +1 -6
- package/operations/stepper-bulk-type-software/stepper-bulk-type-software.module.d.ts.map +1 -1
- package/operations/stepper-frames/preview-block.directive.d.ts +1 -1
- package/operations/stepper-frames/preview-block.directive.d.ts.map +1 -1
- package/operations/stepper-frames/preview-selection-frame.component.d.ts +1 -1
- package/operations/stepper-frames/preview-selection-frame.component.d.ts.map +1 -1
- package/operations/stepper-frames/select-step-frame.component.d.ts +1 -1
- package/operations/stepper-frames/select-step-frame.component.d.ts.map +1 -1
- package/operations/stepper-frames/stepper-frames.modules.d.ts +1 -2
- package/operations/stepper-frames/stepper-frames.modules.d.ts.map +1 -1
- package/package.json +1 -1
- package/protocol-opcua/opcua-address-space-detail.component.d.ts +1 -1
- package/protocol-opcua/opcua-address-space-detail.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-address-space-tree.component.d.ts +1 -1
- package/protocol-opcua/opcua-address-space-tree.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-address-space.component.d.ts +1 -1
- package/protocol-opcua/opcua-address-space.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-auto-apply-settings.component.d.ts +1 -1
- package/protocol-opcua/opcua-auto-apply-settings.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-device-protocol-browse-path-validation.directive.d.ts +1 -1
- package/protocol-opcua/opcua-device-protocol-browse-path-validation.directive.d.ts.map +1 -1
- package/protocol-opcua/opcua-device-protocol-data-reporting.component.d.ts +1 -1
- package/protocol-opcua/opcua-device-protocol-data-reporting.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-device-protocol-description.component.d.ts +1 -1
- package/protocol-opcua/opcua-device-protocol-description.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-device-protocol-detail.component.d.ts +1 -1
- package/protocol-opcua/opcua-device-protocol-detail.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-device-protocol-mapping.component.d.ts +1 -1
- package/protocol-opcua/opcua-device-protocol-mapping.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-device-protocol-object-mapping-status-icon.component.d.ts +1 -1
- package/protocol-opcua/opcua-device-protocol-object-mapping-status-icon.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-protocol.module.d.ts +26 -26
- package/protocol-opcua/opcua-protocol.module.d.ts.map +1 -1
- package/protocol-opcua/opcua-server-config.component.d.ts +1 -1
- package/protocol-opcua/opcua-server-config.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-server-list.component.d.ts +1 -1
- package/protocol-opcua/opcua-server-list.component.d.ts.map +1 -1
- package/protocol-opcua/opcua-servers.component.d.ts +1 -1
- package/protocol-opcua/opcua-servers.component.d.ts.map +1 -1
- package/repository/configuration/device-tab/configuration-filter.pipe.d.ts +1 -1
- package/repository/configuration/device-tab/configuration-filter.pipe.d.ts.map +1 -1
- package/repository/configuration/device-tab/configuration-preview.component.d.ts +1 -1
- package/repository/configuration/device-tab/configuration-preview.component.d.ts.map +1 -1
- package/repository/configuration/device-tab/configuration-repository-device-tab.module.d.ts +11 -13
- package/repository/configuration/device-tab/configuration-repository-device-tab.module.d.ts.map +1 -1
- package/repository/configuration/device-tab/device-configuration-list.component.d.ts +1 -1
- package/repository/configuration/device-tab/device-configuration-list.component.d.ts.map +1 -1
- package/repository/configuration/device-tab/device-configuration.component.d.ts +1 -1
- package/repository/configuration/device-tab/device-configuration.component.d.ts.map +1 -1
- package/repository/configuration/device-tab/save-to-repository.component.d.ts +1 -1
- package/repository/configuration/device-tab/save-to-repository.component.d.ts.map +1 -1
- package/repository/configuration/device-tab/source-code-preview.component.d.ts +1 -1
- package/repository/configuration/device-tab/source-code-preview.component.d.ts.map +1 -1
- package/repository/configuration/device-tab/text-based-configuration.component.d.ts +1 -1
- package/repository/configuration/device-tab/text-based-configuration.component.d.ts.map +1 -1
- package/repository/configuration/list/configuration-detail.component.d.ts +1 -1
- package/repository/configuration/list/configuration-detail.component.d.ts.map +1 -1
- package/repository/configuration/list/configuration-list.component.d.ts +1 -1
- package/repository/configuration/list/configuration-list.component.d.ts.map +1 -1
- package/repository/configuration/list/configuration-repository-list.module.d.ts +4 -7
- package/repository/configuration/list/configuration-repository-list.module.d.ts.map +1 -1
- package/repository/firmware/device-tab/firmware-device-tab.component.d.ts +1 -1
- package/repository/firmware/device-tab/firmware-device-tab.component.d.ts.map +1 -1
- package/repository/firmware/device-tab/firmware-repository-device-tab.module.d.ts +4 -6
- package/repository/firmware/device-tab/firmware-repository-device-tab.module.d.ts.map +1 -1
- package/repository/firmware/list/add-firmware-modal.component.d.ts +1 -1
- package/repository/firmware/list/add-firmware-modal.component.d.ts.map +1 -1
- package/repository/firmware/list/add-firmware-patch-modal.component.d.ts +1 -1
- package/repository/firmware/list/add-firmware-patch-modal.component.d.ts.map +1 -1
- package/repository/firmware/list/firmware-details.component.d.ts +1 -1
- package/repository/firmware/list/firmware-details.component.d.ts.map +1 -1
- package/repository/firmware/list/firmware-list.component.d.ts +1 -1
- package/repository/firmware/list/firmware-list.component.d.ts.map +1 -1
- package/repository/firmware/list/firmware-repository-list.module.d.ts +6 -11
- package/repository/firmware/list/firmware-repository-list.module.d.ts.map +1 -1
- package/repository/shared/file-download/file-download.component.d.ts +1 -1
- package/repository/shared/file-download/file-download.component.d.ts.map +1 -1
- package/repository/shared/select-modal/repository-select-modal.component.d.ts +1 -1
- package/repository/shared/select-modal/repository-select-modal.component.d.ts.map +1 -1
- package/repository/shared/shared-repository.module.d.ts +1 -4
- package/repository/shared/shared-repository.module.d.ts.map +1 -1
- package/repository/shared/software-type/software-type.component.d.ts +1 -1
- package/repository/shared/software-type/software-type.component.d.ts.map +1 -1
- package/repository/software/device-tab/device-software-changes.component.d.ts +1 -1
- package/repository/software/device-tab/device-software-changes.component.d.ts.map +1 -1
- package/repository/software/device-tab/device-software-list.component.d.ts +1 -1
- package/repository/software/device-tab/device-software-list.component.d.ts.map +1 -1
- package/repository/software/device-tab/installed-software.component.d.ts +1 -1
- package/repository/software/device-tab/installed-software.component.d.ts.map +1 -1
- package/repository/software/device-tab/software-device-tab.component.d.ts +1 -1
- package/repository/software/device-tab/software-device-tab.component.d.ts.map +1 -1
- package/repository/software/device-tab/software-repository-device-tab.module.d.ts +7 -11
- package/repository/software/device-tab/software-repository-device-tab.module.d.ts.map +1 -1
- package/repository/software/list/add-software-modal.component.d.ts +1 -1
- package/repository/software/list/add-software-modal.component.d.ts.map +1 -1
- package/repository/software/list/software-details.component.d.ts +1 -1
- package/repository/software/list/software-details.component.d.ts.map +1 -1
- package/repository/software/list/software-list.component.d.ts +1 -1
- package/repository/software/list/software-list.component.d.ts.map +1 -1
- package/repository/software/list/software-repository-list.module.d.ts +5 -11
- package/repository/software/list/software-repository-list.module.d.ts.map +1 -1
- package/services/services-device-tab/columns/last-updated-date.cell-renderer.component.d.ts +1 -1
- package/services/services-device-tab/columns/last-updated-date.cell-renderer.component.d.ts.map +1 -1
- package/services/services-device-tab/columns/name.cell-renderer.component.d.ts +1 -1
- package/services/services-device-tab/columns/name.cell-renderer.component.d.ts.map +1 -1
- package/services/services-device-tab/columns/status.cell-renderer.component.d.ts +1 -1
- package/services/services-device-tab/columns/status.cell-renderer.component.d.ts.map +1 -1
- package/services/services-device-tab/services-device-tab.component.d.ts +1 -1
- package/services/services-device-tab/services-device-tab.component.d.ts.map +1 -1
- package/services/services-device-tab/services-device-tab.module.d.ts +1 -4
- package/services/services-device-tab/services-device-tab.module.d.ts.map +1 -1
- package/time-context/index.d.ts +1 -0
- package/time-context/index.d.ts.map +1 -1
- package/time-context/time-context.component.d.ts +6 -3
- package/time-context/time-context.component.d.ts.map +1 -1
- package/time-context/time-context.model.d.ts +10 -0
- package/time-context/time-context.model.d.ts.map +1 -0
- package/time-context/time-context.service.d.ts +2 -6
- package/time-context/time-context.service.d.ts.map +1 -1
- package/trusted-certificates/crl/crl-settings.component.d.ts +5 -1
- package/trusted-certificates/crl/crl-settings.component.d.ts.map +1 -1
- package/trusted-certificates/factories/tabs.factory.d.ts +3 -2
- package/trusted-certificates/factories/tabs.factory.d.ts.map +1 -1
- package/trusted-certificates/factories/trusted-certificates-navigation.factory.d.ts +2 -0
- package/trusted-certificates/factories/trusted-certificates-navigation.factory.d.ts.map +1 -1
- package/trusted-certificates/list/trusted-certificate-list.component.d.ts +5 -1
- package/trusted-certificates/list/trusted-certificate-list.component.d.ts.map +1 -1
- package/trusted-certificates/trusted-certificates.guard.d.ts +11 -0
- package/trusted-certificates/trusted-certificates.guard.d.ts.map +1 -0
- package/upgrade/index.d.ts +0 -1
- package/upgrade/index.d.ts.map +1 -1
- package/upgrade/upgrade.module.d.ts.map +1 -1
- package/upgrade/upgraded-services/index.d.ts +1 -0
- package/upgrade/upgraded-services/index.d.ts.map +1 -1
- package/upgrade/upgraded-services/smart-rules.service.d.ts.map +1 -0
- package/upgrade/upgraded-services/upgraded-services.module.d.ts.map +1 -1
- package/user-roles/inventory-role-selector/inventory-role-selector.component.d.ts +2 -1
- package/user-roles/inventory-role-selector/inventory-role-selector.component.d.ts.map +1 -1
- package/user-roles/roles-asset-tree/roles-asset-tree.component.d.ts +2 -1
- package/user-roles/roles-asset-tree/roles-asset-tree.component.d.ts.map +1 -1
- package/device-parameters/c8y-ngx-components-device-parameters.d.ts.map +0 -1
- package/device-parameters/device-parameters-list.component.d.ts +0 -22
- package/device-parameters/device-parameters-list.component.d.ts.map +0 -1
- package/device-parameters/device-parameters-tab.guard.d.ts +0 -11
- package/device-parameters/device-parameters-tab.guard.d.ts.map +0 -1
- package/device-parameters/index.d.ts +0 -2
- package/device-parameters/index.d.ts.map +0 -1
- package/fesm2022/c8y-ngx-components-device-parameters.mjs +0 -118
- package/fesm2022/c8y-ngx-components-device-parameters.mjs.map +0 -1
- package/upgrade/smart-rules.service.d.ts.map +0 -1
- /package/upgrade/{smart-rules.service.d.ts → upgraded-services/smart-rules.service.d.ts} +0 -0
|
@@ -2,19 +2,16 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@c8y/client';
|
|
4
4
|
import { OperationStatus } from '@c8y/client';
|
|
5
|
-
import * as
|
|
6
|
-
import { gettext, operationStatusIcons, operationStatusClasses, CoreModule, ListGroupModule, hookRoute, ViewContext } from '@c8y/ngx-components';
|
|
5
|
+
import * as i2 from '@c8y/ngx-components';
|
|
6
|
+
import { gettext, operationStatusIcons, operationStatusClasses, ActionBarItemComponent, IconDirective, C8yTranslateDirective, ListGroupComponent, ForOfDirective, ListItemTimelineComponent, ListItemComponent, ListItemIconComponent, ListItemBodyComponent, ListItemActionComponent, EmptyStateComponent, C8yTranslatePipe, DatePipe, CoreModule, ListGroupModule, hookRoute, ViewContext } from '@c8y/ngx-components';
|
|
7
7
|
import { assign } from 'lodash-es';
|
|
8
8
|
import { switchMap, map } from 'rxjs/operators';
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { RouterModule } from '@angular/router';
|
|
11
11
|
import { BehaviorSubject, pipe } from 'rxjs';
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import { SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';
|
|
16
|
-
import * as i6 from 'ngx-bootstrap/tooltip';
|
|
17
|
-
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
12
|
+
import { NgIf, NgClass, CommonModule } from '@angular/common';
|
|
13
|
+
import { TooltipDirective, TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
14
|
+
import { FileDownloadComponent, SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';
|
|
18
15
|
import { BsDropdownModule, BsDropdownConfig } from 'ngx-bootstrap/dropdown';
|
|
19
16
|
|
|
20
17
|
class DiagnosticsService {
|
|
@@ -126,12 +123,12 @@ class DiagnosticsService {
|
|
|
126
123
|
this.alertService.addServerFailure(error);
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsService, deps: [{ token: i1.OperationService }, { token: i1.InventoryBinaryService }, { token:
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsService, deps: [{ token: i1.OperationService }, { token: i1.InventoryBinaryService }, { token: i2.ModalService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
130
127
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsService }); }
|
|
131
128
|
}
|
|
132
129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsService, decorators: [{
|
|
133
130
|
type: Injectable
|
|
134
|
-
}], ctorParameters: () => [{ type: i1.OperationService }, { type: i1.InventoryBinaryService }, { type:
|
|
131
|
+
}], ctorParameters: () => [{ type: i1.OperationService }, { type: i1.InventoryBinaryService }, { type: i2.ModalService }, { type: i2.AlertService }] });
|
|
135
132
|
|
|
136
133
|
class DiagnosticsTabGuard {
|
|
137
134
|
constructor(diagnosticsService) {
|
|
@@ -174,23 +171,42 @@ class DiagnosticsComponent {
|
|
|
174
171
|
onCancel(operation) {
|
|
175
172
|
this.diagnosticService.cancelOperation(operation);
|
|
176
173
|
}
|
|
177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: DiagnosticsService }, { token:
|
|
178
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DiagnosticsComponent, isStandalone:
|
|
174
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: DiagnosticsService }, { token: i2.OperationRealtimeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DiagnosticsComponent, isStandalone: true, selector: "c8y-diagnostics", ngImport: i0, template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n type=\"button\"\n title=\"{{ 'Request diagnostic file' | translate }}\"\n (click)=\"onDiagnosticRequest()\"\n >\n <i c8yIcon=\"stethoscope\"></i>\n <span translate>Request diagnostic file</span>\n </button>\n</c8y-action-bar-item>\n\n<div\n class=\"page-sticky-header hidden-xs c8y-list__item c8y-list--timeline\"\n *ngIf=\"operationCount > 0\"\n>\n <div class=\"d-flex\">\n <div class=\"c8y-list--timeline__item__date a-s-center\">\n <label>{{ 'Date' | translate }}</label>\n </div>\n <div class=\"c8y-list__item__block flex-grow\">\n <div class=\"c8y-list__item__icon\">\n <i class=\"p-l-24\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-40\">\n <div class=\"col-4\">{{ 'Event' | translate }}</div>\n <div class=\"col-5 m-l-8\">{{ 'File' | translate }}</div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<c8y-list-group>\n <ng-template\n c8yFor\n let-operation\n [c8yForOf]=\"operations$\"\n [c8yForPipe]=\"operationsPipe\"\n [c8yForRealtime]=\"operationRealtime\"\n [c8yForRealtimeOptions]=\"realtimeOptions\"\n (c8yForCount)=\"operationCount = $event\"\n >\n <c8y-li-timeline>\n {{ operation.creationTime | c8yDate }}\n <c8y-li>\n <c8y-li-icon>\n <i\n [c8yIcon]=\"statusIcons[operation.status]\"\n [ngClass]=\"statusClasses[operation.status]\"\n [tooltip]=\"operation.status?.toString() | translate\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-40\">\n <div class=\"col-4\">\n <p class=\"text-truncate-wrap\" title=\"{{ operation.description | translate }}\">\n {{ operation.description | translate }}\n </p>\n </div>\n <div class=\"col-5\" *ngIf=\"operation.c8y_DiagnosticReport?.file\">\n <div class=\"text-truncate-wrap m-t-xs-8\">\n <span class=\"text-label-small visible-xs\" translate>File</span>\n <span title=\"{{ operation.c8y_DiagnosticReport.file }}\">\n <c8y-file-download\n url=\"{{ operation.c8y_DiagnosticReport.file }}\"\n ></c8y-file-download>\n </span>\n </div>\n </div>\n </c8y-li-body>\n <c8y-li-action\n (click)=\"onCancel(operation)\"\n *ngIf=\"operation.status === 'PENDING'\"\n icon=\"times\"\n label=\"{{ 'Cancel' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n (click)=\"onDelete(operation)\"\n *ngIf=\"operation.status === 'SUCCESSFUL'\"\n icon=\"delete\"\n label=\"{{ 'Delete' | translate }}\"\n ></c8y-li-action>\n </c8y-li>\n </c8y-li-timeline>\n </ng-template>\n</c8y-list-group>\n\n<!-- EMPTY STATE -->\n\n<c8y-ui-empty-state\n *ngIf=\"operationCount === 0\"\n [icon]=\"'stethoscope'\"\n [title]=\"'No diagnostic files available.' | translate\"\n></c8y-ui-empty-state>\n", dependencies: [{ kind: "component", type: ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListGroupComponent, selector: "c8y-list-group" }, { kind: "directive", type: ForOfDirective, selector: "[c8yFor]", inputs: ["c8yForOf", "c8yForLoadMore", "c8yForPipe", "c8yForNotFound", "c8yForMaxIterations", "c8yForLoadingTemplate", "c8yForLoadNextLabel", "c8yForLoadingLabel", "c8yForRealtime", "c8yForRealtimeOptions", "c8yForComparator", "c8yForEnableVirtualScroll", "c8yForVirtualScrollElementSize", "c8yForVirtualScrollStrategy", "c8yForVirtualScrollContainerHeight"], outputs: ["c8yForCount", "c8yForChange", "c8yForLoadMoreComponent"] }, { kind: "component", type: ListItemTimelineComponent, selector: "c8y-list-item-timeline, c8y-li-timeline" }, { kind: "component", type: ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: FileDownloadComponent, selector: "c8y-file-download", inputs: ["url"] }, { kind: "component", type: ListItemActionComponent, selector: "c8y-list-item-action, c8y-li-action", inputs: ["label", "icon", "disabled"], outputs: ["click"] }, { kind: "component", type: EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: DatePipe, name: "c8yDate" }] }); }
|
|
179
176
|
}
|
|
180
177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsComponent, decorators: [{
|
|
181
178
|
type: Component,
|
|
182
|
-
args: [{ selector: 'c8y-diagnostics',
|
|
183
|
-
|
|
179
|
+
args: [{ selector: 'c8y-diagnostics', imports: [
|
|
180
|
+
ActionBarItemComponent,
|
|
181
|
+
IconDirective,
|
|
182
|
+
C8yTranslateDirective,
|
|
183
|
+
NgIf,
|
|
184
|
+
ListGroupComponent,
|
|
185
|
+
ForOfDirective,
|
|
186
|
+
ListItemTimelineComponent,
|
|
187
|
+
ListItemComponent,
|
|
188
|
+
ListItemIconComponent,
|
|
189
|
+
NgClass,
|
|
190
|
+
TooltipDirective,
|
|
191
|
+
ListItemBodyComponent,
|
|
192
|
+
FileDownloadComponent,
|
|
193
|
+
ListItemActionComponent,
|
|
194
|
+
EmptyStateComponent,
|
|
195
|
+
C8yTranslatePipe,
|
|
196
|
+
DatePipe
|
|
197
|
+
], template: "<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n type=\"button\"\n title=\"{{ 'Request diagnostic file' | translate }}\"\n (click)=\"onDiagnosticRequest()\"\n >\n <i c8yIcon=\"stethoscope\"></i>\n <span translate>Request diagnostic file</span>\n </button>\n</c8y-action-bar-item>\n\n<div\n class=\"page-sticky-header hidden-xs c8y-list__item c8y-list--timeline\"\n *ngIf=\"operationCount > 0\"\n>\n <div class=\"d-flex\">\n <div class=\"c8y-list--timeline__item__date a-s-center\">\n <label>{{ 'Date' | translate }}</label>\n </div>\n <div class=\"c8y-list__item__block flex-grow\">\n <div class=\"c8y-list__item__icon\">\n <i class=\"p-l-24\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-40\">\n <div class=\"col-4\">{{ 'Event' | translate }}</div>\n <div class=\"col-5 m-l-8\">{{ 'File' | translate }}</div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<c8y-list-group>\n <ng-template\n c8yFor\n let-operation\n [c8yForOf]=\"operations$\"\n [c8yForPipe]=\"operationsPipe\"\n [c8yForRealtime]=\"operationRealtime\"\n [c8yForRealtimeOptions]=\"realtimeOptions\"\n (c8yForCount)=\"operationCount = $event\"\n >\n <c8y-li-timeline>\n {{ operation.creationTime | c8yDate }}\n <c8y-li>\n <c8y-li-icon>\n <i\n [c8yIcon]=\"statusIcons[operation.status]\"\n [ngClass]=\"statusClasses[operation.status]\"\n [tooltip]=\"operation.status?.toString() | translate\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-40\">\n <div class=\"col-4\">\n <p class=\"text-truncate-wrap\" title=\"{{ operation.description | translate }}\">\n {{ operation.description | translate }}\n </p>\n </div>\n <div class=\"col-5\" *ngIf=\"operation.c8y_DiagnosticReport?.file\">\n <div class=\"text-truncate-wrap m-t-xs-8\">\n <span class=\"text-label-small visible-xs\" translate>File</span>\n <span title=\"{{ operation.c8y_DiagnosticReport.file }}\">\n <c8y-file-download\n url=\"{{ operation.c8y_DiagnosticReport.file }}\"\n ></c8y-file-download>\n </span>\n </div>\n </div>\n </c8y-li-body>\n <c8y-li-action\n (click)=\"onCancel(operation)\"\n *ngIf=\"operation.status === 'PENDING'\"\n icon=\"times\"\n label=\"{{ 'Cancel' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n (click)=\"onDelete(operation)\"\n *ngIf=\"operation.status === 'SUCCESSFUL'\"\n icon=\"delete\"\n label=\"{{ 'Delete' | translate }}\"\n ></c8y-li-action>\n </c8y-li>\n </c8y-li-timeline>\n </ng-template>\n</c8y-list-group>\n\n<!-- EMPTY STATE -->\n\n<c8y-ui-empty-state\n *ngIf=\"operationCount === 0\"\n [icon]=\"'stethoscope'\"\n [title]=\"'No diagnostic files available.' | translate\"\n></c8y-ui-empty-state>\n" }]
|
|
198
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: DiagnosticsService }, { type: i2.OperationRealtimeService }] });
|
|
184
199
|
|
|
185
200
|
class DiagnosticsModule {
|
|
186
201
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
187
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsModule,
|
|
202
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsModule, imports: [CoreModule,
|
|
188
203
|
RouterModule,
|
|
189
204
|
CommonModule,
|
|
190
205
|
ListGroupModule,
|
|
191
206
|
SharedRepositoryModule,
|
|
192
207
|
BsDropdownModule,
|
|
193
|
-
TooltipModule
|
|
208
|
+
TooltipModule,
|
|
209
|
+
DiagnosticsComponent], exports: [DiagnosticsComponent] }); }
|
|
194
210
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsModule, providers: [
|
|
195
211
|
DiagnosticsService,
|
|
196
212
|
BsDropdownConfig,
|
|
@@ -210,7 +226,8 @@ class DiagnosticsModule {
|
|
|
210
226
|
ListGroupModule,
|
|
211
227
|
SharedRepositoryModule,
|
|
212
228
|
BsDropdownModule,
|
|
213
|
-
TooltipModule
|
|
229
|
+
TooltipModule,
|
|
230
|
+
DiagnosticsComponent] }); }
|
|
214
231
|
}
|
|
215
232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DiagnosticsModule, decorators: [{
|
|
216
233
|
type: NgModule,
|
|
@@ -222,9 +239,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
222
239
|
ListGroupModule,
|
|
223
240
|
SharedRepositoryModule,
|
|
224
241
|
BsDropdownModule,
|
|
225
|
-
TooltipModule
|
|
242
|
+
TooltipModule,
|
|
243
|
+
DiagnosticsComponent
|
|
226
244
|
],
|
|
227
|
-
declarations: [DiagnosticsComponent],
|
|
228
245
|
exports: [DiagnosticsComponent],
|
|
229
246
|
providers: [
|
|
230
247
|
DiagnosticsService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-diagnostics.mjs","sources":["../../diagnostics/diagnostics.service.ts","../../diagnostics/diagnostics-tab.guard.ts","../../diagnostics/diagnostics.component.ts","../../diagnostics/diagnostics.component.html","../../diagnostics/diagnostics.module.ts","../../diagnostics/c8y-ngx-components-diagnostics.ts"],"sourcesContent":["import { Observable } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport {\n IManagedObject,\n IResultList,\n InventoryBinaryService,\n IOperation,\n OperationService,\n OperationStatus\n} from '@c8y/client';\nimport { AlertService, gettext, ModalService } from '@c8y/ngx-components';\nimport { assign } from 'lodash-es';\nimport { switchMap } from 'rxjs/operators';\n\n@Injectable()\nexport class DiagnosticsService {\n readonly fragment = 'c8y_DiagnosticReport';\n constructor(\n private operationService: OperationService,\n private inventoryBinary: InventoryBinaryService,\n private modalService: ModalService,\n private alertService: AlertService\n ) {}\n\n isSupportedDevice(device): boolean {\n const supportedOperations = (device && device.c8y_SupportedOperations) || [];\n return supportedOperations.includes(this.fragment);\n }\n\n getOperations$(device$: Observable<IManagedObject>): Observable<IResultList<IOperation>> {\n return device$.pipe(\n switchMap(device =>\n this.operationService.list({\n deviceId: device.id,\n fragmentType: this.fragment,\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date(Date.now()).toISOString(),\n revert: true,\n pageSize: 10,\n withTotalPages: true\n })\n )\n );\n }\n\n async createOperation(deviceId: string) {\n const operation = {\n deviceId,\n description: gettext('Diagnostic file request'),\n [this.fragment]: {}\n };\n try {\n await this.operationService.create(operation);\n this.alertService.success(gettext('Diagnostic file request sent.'));\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n async deleteOperation(operation: IOperation) {\n try {\n const result = await this.modalService.confirm(\n gettext('Delete diagnostic file'),\n gettext('You are about to delete this diagnostic file. Do you want to proceed?'),\n 'danger',\n {\n ok: gettext('Delete'),\n cancel: gettext('Cancel')\n }\n );\n\n if (result) {\n this.deleteDiagnosticsBinary(operation);\n }\n } catch (error) {\n // Do nothing\n }\n }\n\n async cancelOperation(operation: IOperation) {\n try {\n const operationAfterUpdate = (\n await this.operationService.update({\n id: operation.id,\n status: OperationStatus.FAILED,\n failureReason: gettext('Operation cancelled by user.')\n })\n ).data;\n assign(operation, operationAfterUpdate);\n this.alertService.success(gettext('Diagnostic file request cancelled.'));\n } catch (ex) {\n this.alertService.addServerFailure(ex);\n }\n }\n\n private getOperation(op: IOperation) {\n if (!op) {\n return null;\n }\n return op && op[this.fragment];\n }\n\n private async deleteDiagnosticsBinary(op: IOperation) {\n const operation = this.getOperation(op);\n if (operation && operation.file) {\n const { file } = operation;\n try {\n const binaryId = this.inventoryBinary.getIdFromUrl(file);\n const result = await this.inventoryBinary.delete(binaryId);\n if (result) {\n this.deleteDiagnosticsFragment(op);\n }\n } catch (err) {\n if (err.res.status === 404) {\n // In case the file is already deleted via other means we want to delete the fragment\n this.deleteDiagnosticsFragment(op);\n } else {\n const msg = gettext('Could not delete the diagnostic file.');\n this.alertService.danger(msg);\n }\n }\n }\n }\n\n private async deleteDiagnosticsFragment(op: IOperation) {\n const deleteOp = {\n id: op.id,\n status: op.status,\n [this.fragment]: null\n };\n try {\n const operationAfterUpdate = (await this.operationService.update(deleteOp)).data;\n assign(op, operationAfterUpdate);\n this.alertService.success(gettext('Diagnostic file deleted.'));\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n}\n","import { DiagnosticsService } from './diagnostics.service';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\n\n@Injectable()\nexport class DiagnosticsTabGuard {\n constructor(private diagnosticsService: DiagnosticsService) {}\n\n canActivate(route: ActivatedRouteSnapshot) {\n const device = route.data.contextData || route.parent.data.contextData;\n return this.diagnosticsService.isSupportedDevice(device);\n }\n}\n","import { DiagnosticsService } from './diagnostics.service';\nimport { ActivatedRoute } from '@angular/router';\nimport { Component } from '@angular/core';\nimport { BehaviorSubject, pipe } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport {\n ForOfRealtimeOptions,\n operationStatusClasses,\n operationStatusIcons,\n OperationRealtimeService,\n ForOfFilterPipe\n} from '@c8y/ngx-components';\nimport { IManagedObject, IOperation } from '@c8y/client';\n@Component({\n templateUrl: './diagnostics.component.html',\n selector: 'c8y-diagnostics',\n standalone: false\n})\nexport class DiagnosticsComponent {\n statusIcons = operationStatusIcons;\n statusClasses = operationStatusClasses;\n deviceId: string = this.route.snapshot.parent.data.contextData.id;\n device$ = new BehaviorSubject<IManagedObject>(this.route.snapshot.parent.data.contextData);\n operations$ = this.diagnosticService.getOperations$(this.device$);\n operationsPipe: ForOfFilterPipe<IOperation> = pipe(\n map(ops => ops.filter(op => op[this.diagnosticService.fragment]))\n );\n realtimeOptions: ForOfRealtimeOptions = {\n entityOrId: this.deviceId,\n removeOnUpdate: true,\n insertOnUpdate: true\n } as ForOfRealtimeOptions;\n operationCount: number;\n\n constructor(\n private route: ActivatedRoute,\n private diagnosticService: DiagnosticsService,\n public operationRealtime: OperationRealtimeService\n ) {}\n\n onDiagnosticRequest() {\n this.diagnosticService.createOperation(this.deviceId);\n }\n\n onDelete(operation: IOperation) {\n this.diagnosticService.deleteOperation(operation);\n }\n\n onCancel(operation: IOperation) {\n this.diagnosticService.cancelOperation(operation);\n }\n}\n","<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n type=\"button\"\n title=\"{{ 'Request diagnostic file' | translate }}\"\n (click)=\"onDiagnosticRequest()\"\n >\n <i c8yIcon=\"stethoscope\"></i>\n <span translate>Request diagnostic file</span>\n </button>\n</c8y-action-bar-item>\n\n<div\n class=\"page-sticky-header hidden-xs c8y-list__item c8y-list--timeline\"\n *ngIf=\"operationCount > 0\"\n>\n <div class=\"d-flex\">\n <div class=\"c8y-list--timeline__item__date a-s-center\">\n <label>{{ 'Date' | translate }}</label>\n </div>\n <div class=\"c8y-list__item__block flex-grow\">\n <div class=\"c8y-list__item__icon\">\n <i class=\"p-l-24\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-40\">\n <div class=\"col-4\">{{ 'Event' | translate }}</div>\n <div class=\"col-5 m-l-8\">{{ 'File' | translate }}</div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<c8y-list-group>\n <ng-template\n c8yFor\n let-operation\n [c8yForOf]=\"operations$\"\n [c8yForPipe]=\"operationsPipe\"\n [c8yForRealtime]=\"operationRealtime\"\n [c8yForRealtimeOptions]=\"realtimeOptions\"\n (c8yForCount)=\"operationCount = $event\"\n >\n <c8y-li-timeline>\n {{ operation.creationTime | c8yDate }}\n <c8y-li>\n <c8y-li-icon>\n <i\n [c8yIcon]=\"statusIcons[operation.status]\"\n [ngClass]=\"statusClasses[operation.status]\"\n [tooltip]=\"operation.status?.toString() | translate\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-40\">\n <div class=\"col-4\">\n <p class=\"text-truncate-wrap\" title=\"{{ operation.description | translate }}\">\n {{ operation.description | translate }}\n </p>\n </div>\n <div class=\"col-5\" *ngIf=\"operation.c8y_DiagnosticReport?.file\">\n <div class=\"text-truncate-wrap m-t-xs-8\">\n <span class=\"text-label-small visible-xs\" translate>File</span>\n <span title=\"{{ operation.c8y_DiagnosticReport.file }}\">\n <c8y-file-download\n url=\"{{ operation.c8y_DiagnosticReport.file }}\"\n ></c8y-file-download>\n </span>\n </div>\n </div>\n </c8y-li-body>\n <c8y-li-action\n (click)=\"onCancel(operation)\"\n *ngIf=\"operation.status === 'PENDING'\"\n icon=\"times\"\n label=\"{{ 'Cancel' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n (click)=\"onDelete(operation)\"\n *ngIf=\"operation.status === 'SUCCESSFUL'\"\n icon=\"delete\"\n label=\"{{ 'Delete' | translate }}\"\n ></c8y-li-action>\n </c8y-li>\n </c8y-li-timeline>\n </ng-template>\n</c8y-list-group>\n\n<!-- EMPTY STATE -->\n\n<c8y-ui-empty-state\n *ngIf=\"operationCount === 0\"\n [icon]=\"'stethoscope'\"\n [title]=\"'No diagnostic files available.' | translate\"\n></c8y-ui-empty-state>\n","import { DiagnosticsTabGuard } from './diagnostics-tab.guard';\nimport { ListGroupModule } from '@c8y/ngx-components';\nimport { RouterModule } from '@angular/router';\nimport { DiagnosticsService } from './diagnostics.service';\nimport { CoreModule, gettext, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { DiagnosticsComponent } from './diagnostics.component';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { BsDropdownModule, BsDropdownConfig } from 'ngx-bootstrap/dropdown';\nimport { SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';\n\n@NgModule({\n imports: [\n CoreModule,\n RouterModule,\n CommonModule,\n ListGroupModule,\n SharedRepositoryModule,\n BsDropdownModule,\n TooltipModule\n ],\n declarations: [DiagnosticsComponent],\n exports: [DiagnosticsComponent],\n providers: [\n DiagnosticsService,\n BsDropdownConfig,\n DiagnosticsTabGuard,\n hookRoute({\n context: ViewContext.Device,\n path: 'diagnostics',\n component: DiagnosticsComponent,\n label: gettext('Diagnostics'),\n icon: 'stethoscope',\n canActivate: [DiagnosticsTabGuard],\n priority: 200\n })\n ]\n})\nexport class DiagnosticsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1.DiagnosticsService","i1","i2.DiagnosticsService"],"mappings":";;;;;;;;;;;;;;;;;;;MAea,kBAAkB,CAAA;AAE7B,IAAA,WAAA,CACU,gBAAkC,EAClC,eAAuC,EACvC,YAA0B,EAC1B,YAA0B,EAAA;QAH1B,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB;QAChB,IAAe,CAAA,eAAA,GAAf,eAAe;QACf,IAAY,CAAA,YAAA,GAAZ,YAAY;QACZ,IAAY,CAAA,YAAA,GAAZ,YAAY;QALb,IAAQ,CAAA,QAAA,GAAG,sBAAsB;;AAQ1C,IAAA,iBAAiB,CAAC,MAAM,EAAA;QACtB,MAAM,mBAAmB,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,uBAAuB,KAAK,EAAE;QAC5E,OAAO,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;AAGpD,IAAA,cAAc,CAAC,OAAmC,EAAA;AAChD,QAAA,OAAO,OAAO,CAAC,IAAI,CACjB,SAAS,CAAC,MAAM,IACd,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;YACzB,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,YAAY,EAAE,IAAI,CAAC,QAAQ;YAC3B,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;YACnC,MAAM,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,C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;AACD,qBAAA;oBACD,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAC/B,oBAAA,SAAS,EAAE;wBACT,kBAAkB;wBAClB,gBAAgB;wBAChB,mBAAmB;AACnB,wBAAA,SAAS,CAAC;4BACR,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,4BAAA,IAAI,EAAE,aAAa;AACnB,4BAAA,SAAS,EAAE,oBAAoB;AAC/B,4BAAA,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC;AAC7B,4BAAA,IAAI,EAAE,aAAa;4BACnB,WAAW,EAAE,CAAC,mBAAmB,CAAC;AAClC,4BAAA,QAAQ,EAAE;yBACX;AACF;AACF,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-diagnostics.mjs","sources":["../../diagnostics/diagnostics.service.ts","../../diagnostics/diagnostics-tab.guard.ts","../../diagnostics/diagnostics.component.ts","../../diagnostics/diagnostics.component.html","../../diagnostics/diagnostics.module.ts","../../diagnostics/c8y-ngx-components-diagnostics.ts"],"sourcesContent":["import { Observable } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport {\n IManagedObject,\n IResultList,\n InventoryBinaryService,\n IOperation,\n OperationService,\n OperationStatus\n} from '@c8y/client';\nimport { AlertService, gettext, ModalService } from '@c8y/ngx-components';\nimport { assign } from 'lodash-es';\nimport { switchMap } from 'rxjs/operators';\n\n@Injectable()\nexport class DiagnosticsService {\n readonly fragment = 'c8y_DiagnosticReport';\n constructor(\n private operationService: OperationService,\n private inventoryBinary: InventoryBinaryService,\n private modalService: ModalService,\n private alertService: AlertService\n ) {}\n\n isSupportedDevice(device): boolean {\n const supportedOperations = (device && device.c8y_SupportedOperations) || [];\n return supportedOperations.includes(this.fragment);\n }\n\n getOperations$(device$: Observable<IManagedObject>): Observable<IResultList<IOperation>> {\n return device$.pipe(\n switchMap(device =>\n this.operationService.list({\n deviceId: device.id,\n fragmentType: this.fragment,\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date(Date.now()).toISOString(),\n revert: true,\n pageSize: 10,\n withTotalPages: true\n })\n )\n );\n }\n\n async createOperation(deviceId: string) {\n const operation = {\n deviceId,\n description: gettext('Diagnostic file request'),\n [this.fragment]: {}\n };\n try {\n await this.operationService.create(operation);\n this.alertService.success(gettext('Diagnostic file request sent.'));\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n\n async deleteOperation(operation: IOperation) {\n try {\n const result = await this.modalService.confirm(\n gettext('Delete diagnostic file'),\n gettext('You are about to delete this diagnostic file. Do you want to proceed?'),\n 'danger',\n {\n ok: gettext('Delete'),\n cancel: gettext('Cancel')\n }\n );\n\n if (result) {\n this.deleteDiagnosticsBinary(operation);\n }\n } catch (error) {\n // Do nothing\n }\n }\n\n async cancelOperation(operation: IOperation) {\n try {\n const operationAfterUpdate = (\n await this.operationService.update({\n id: operation.id,\n status: OperationStatus.FAILED,\n failureReason: gettext('Operation cancelled by user.')\n })\n ).data;\n assign(operation, operationAfterUpdate);\n this.alertService.success(gettext('Diagnostic file request cancelled.'));\n } catch (ex) {\n this.alertService.addServerFailure(ex);\n }\n }\n\n private getOperation(op: IOperation) {\n if (!op) {\n return null;\n }\n return op && op[this.fragment];\n }\n\n private async deleteDiagnosticsBinary(op: IOperation) {\n const operation = this.getOperation(op);\n if (operation && operation.file) {\n const { file } = operation;\n try {\n const binaryId = this.inventoryBinary.getIdFromUrl(file);\n const result = await this.inventoryBinary.delete(binaryId);\n if (result) {\n this.deleteDiagnosticsFragment(op);\n }\n } catch (err) {\n if (err.res.status === 404) {\n // In case the file is already deleted via other means we want to delete the fragment\n this.deleteDiagnosticsFragment(op);\n } else {\n const msg = gettext('Could not delete the diagnostic file.');\n this.alertService.danger(msg);\n }\n }\n }\n }\n\n private async deleteDiagnosticsFragment(op: IOperation) {\n const deleteOp = {\n id: op.id,\n status: op.status,\n [this.fragment]: null\n };\n try {\n const operationAfterUpdate = (await this.operationService.update(deleteOp)).data;\n assign(op, operationAfterUpdate);\n this.alertService.success(gettext('Diagnostic file deleted.'));\n } catch (error) {\n this.alertService.addServerFailure(error);\n }\n }\n}\n","import { DiagnosticsService } from './diagnostics.service';\nimport { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\n\n@Injectable()\nexport class DiagnosticsTabGuard {\n constructor(private diagnosticsService: DiagnosticsService) {}\n\n canActivate(route: ActivatedRouteSnapshot) {\n const device = route.data.contextData || route.parent.data.contextData;\n return this.diagnosticsService.isSupportedDevice(device);\n }\n}\n","import { DiagnosticsService } from './diagnostics.service';\nimport { ActivatedRoute } from '@angular/router';\nimport { Component } from '@angular/core';\nimport { BehaviorSubject, pipe } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport {\n ForOfRealtimeOptions,\n operationStatusClasses,\n operationStatusIcons,\n OperationRealtimeService,\n ForOfFilterPipe,\n ActionBarItemComponent,\n IconDirective,\n C8yTranslateDirective,\n ListGroupComponent,\n ForOfDirective,\n ListItemTimelineComponent,\n ListItemComponent,\n ListItemIconComponent,\n ListItemBodyComponent,\n ListItemActionComponent,\n EmptyStateComponent,\n C8yTranslatePipe,\n DatePipe\n} from '@c8y/ngx-components';\nimport { IManagedObject, IOperation } from '@c8y/client';\nimport { NgIf, NgClass } from '@angular/common';\nimport { TooltipDirective } from 'ngx-bootstrap/tooltip';\nimport { FileDownloadComponent } from '@c8y/ngx-components/repository/shared';\n@Component({\n templateUrl: './diagnostics.component.html',\n selector: 'c8y-diagnostics',\n imports: [\n ActionBarItemComponent,\n IconDirective,\n C8yTranslateDirective,\n NgIf,\n ListGroupComponent,\n ForOfDirective,\n ListItemTimelineComponent,\n ListItemComponent,\n ListItemIconComponent,\n NgClass,\n TooltipDirective,\n ListItemBodyComponent,\n FileDownloadComponent,\n ListItemActionComponent,\n EmptyStateComponent,\n C8yTranslatePipe,\n DatePipe\n ]\n})\nexport class DiagnosticsComponent {\n statusIcons = operationStatusIcons;\n statusClasses = operationStatusClasses;\n deviceId: string = this.route.snapshot.parent.data.contextData.id;\n device$ = new BehaviorSubject<IManagedObject>(this.route.snapshot.parent.data.contextData);\n operations$ = this.diagnosticService.getOperations$(this.device$);\n operationsPipe: ForOfFilterPipe<IOperation> = pipe(\n map(ops => ops.filter(op => op[this.diagnosticService.fragment]))\n );\n realtimeOptions: ForOfRealtimeOptions = {\n entityOrId: this.deviceId,\n removeOnUpdate: true,\n insertOnUpdate: true\n } as ForOfRealtimeOptions;\n operationCount: number;\n\n constructor(\n private route: ActivatedRoute,\n private diagnosticService: DiagnosticsService,\n public operationRealtime: OperationRealtimeService\n ) {}\n\n onDiagnosticRequest() {\n this.diagnosticService.createOperation(this.deviceId);\n }\n\n onDelete(operation: IOperation) {\n this.diagnosticService.deleteOperation(operation);\n }\n\n onCancel(operation: IOperation) {\n this.diagnosticService.cancelOperation(operation);\n }\n}\n","<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n type=\"button\"\n title=\"{{ 'Request diagnostic file' | translate }}\"\n (click)=\"onDiagnosticRequest()\"\n >\n <i c8yIcon=\"stethoscope\"></i>\n <span translate>Request diagnostic file</span>\n </button>\n</c8y-action-bar-item>\n\n<div\n class=\"page-sticky-header hidden-xs c8y-list__item c8y-list--timeline\"\n *ngIf=\"operationCount > 0\"\n>\n <div class=\"d-flex\">\n <div class=\"c8y-list--timeline__item__date a-s-center\">\n <label>{{ 'Date' | translate }}</label>\n </div>\n <div class=\"c8y-list__item__block flex-grow\">\n <div class=\"c8y-list__item__icon\">\n <i class=\"p-l-24\"></i>\n </div>\n <div class=\"c8y-list__item__body\">\n <div class=\"content-flex-40\">\n <div class=\"col-4\">{{ 'Event' | translate }}</div>\n <div class=\"col-5 m-l-8\">{{ 'File' | translate }}</div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<c8y-list-group>\n <ng-template\n c8yFor\n let-operation\n [c8yForOf]=\"operations$\"\n [c8yForPipe]=\"operationsPipe\"\n [c8yForRealtime]=\"operationRealtime\"\n [c8yForRealtimeOptions]=\"realtimeOptions\"\n (c8yForCount)=\"operationCount = $event\"\n >\n <c8y-li-timeline>\n {{ operation.creationTime | c8yDate }}\n <c8y-li>\n <c8y-li-icon>\n <i\n [c8yIcon]=\"statusIcons[operation.status]\"\n [ngClass]=\"statusClasses[operation.status]\"\n [tooltip]=\"operation.status?.toString() | translate\"\n ></i>\n </c8y-li-icon>\n <c8y-li-body class=\"content-flex-40\">\n <div class=\"col-4\">\n <p class=\"text-truncate-wrap\" title=\"{{ operation.description | translate }}\">\n {{ operation.description | translate }}\n </p>\n </div>\n <div class=\"col-5\" *ngIf=\"operation.c8y_DiagnosticReport?.file\">\n <div class=\"text-truncate-wrap m-t-xs-8\">\n <span class=\"text-label-small visible-xs\" translate>File</span>\n <span title=\"{{ operation.c8y_DiagnosticReport.file }}\">\n <c8y-file-download\n url=\"{{ operation.c8y_DiagnosticReport.file }}\"\n ></c8y-file-download>\n </span>\n </div>\n </div>\n </c8y-li-body>\n <c8y-li-action\n (click)=\"onCancel(operation)\"\n *ngIf=\"operation.status === 'PENDING'\"\n icon=\"times\"\n label=\"{{ 'Cancel' | translate }}\"\n ></c8y-li-action>\n <c8y-li-action\n (click)=\"onDelete(operation)\"\n *ngIf=\"operation.status === 'SUCCESSFUL'\"\n icon=\"delete\"\n label=\"{{ 'Delete' | translate }}\"\n ></c8y-li-action>\n </c8y-li>\n </c8y-li-timeline>\n </ng-template>\n</c8y-list-group>\n\n<!-- EMPTY STATE -->\n\n<c8y-ui-empty-state\n *ngIf=\"operationCount === 0\"\n [icon]=\"'stethoscope'\"\n [title]=\"'No diagnostic files available.' | translate\"\n></c8y-ui-empty-state>\n","import { DiagnosticsTabGuard } from './diagnostics-tab.guard';\nimport { ListGroupModule, CoreModule, gettext, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { RouterModule } from '@angular/router';\nimport { DiagnosticsService } from './diagnostics.service';\nimport { DiagnosticsComponent } from './diagnostics.component';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { BsDropdownModule, BsDropdownConfig } from 'ngx-bootstrap/dropdown';\nimport { SharedRepositoryModule } from '@c8y/ngx-components/repository/shared';\n\n@NgModule({\n imports: [\n CoreModule,\n RouterModule,\n CommonModule,\n ListGroupModule,\n SharedRepositoryModule,\n BsDropdownModule,\n TooltipModule,\n DiagnosticsComponent\n ],\n exports: [DiagnosticsComponent],\n providers: [\n DiagnosticsService,\n BsDropdownConfig,\n DiagnosticsTabGuard,\n hookRoute({\n context: ViewContext.Device,\n path: 'diagnostics',\n component: DiagnosticsComponent,\n label: gettext('Diagnostics'),\n icon: 'stethoscope',\n canActivate: [DiagnosticsTabGuard],\n priority: 200\n })\n ]\n})\nexport class DiagnosticsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DiagnosticsService","i1","i2.DiagnosticsService","i3"],"mappings":";;;;;;;;;;;;;;;;MAea,kBAAkB,CAAA;AAE7B,IAAA,WAAA,CACU,gBAAkC,EAClC,eAAuC,EACvC,YAA0B,EAC1B,YAA0B,EAAA;QAH1B,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB;QAChB,IAAe,CAAA,eAAA,GAAf,eAAe;QACf,IAAY,CAAA,YAAA,GAAZ,YAAY;QACZ,IAAY,CAAA,YAAA,GAAZ,YAAY;QALb,IAAQ,CAAA,QAAA,GAAG,sBAAsB;;AAQ1C,IAAA,iBAAiB,CAAC,MAAM,EAAA;QACtB,MAAM,mBAAmB,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,uBAAuB,KAAK,EAAE;QAC5E,OAAO,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;AAGpD,IAAA,cAAc,CAAC,OAAmC,EAAA;AAChD,QAAA,OAAO,OAAO,CAAC,IAAI,CACjB,SAAS,CAAC,MAAM,IACd,IAAI,CAAC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369
369
|
const INDEX_HTML = '/index.html';
|
|
370
370
|
class EchartsOptionsService {
|
|
371
|
-
constructor(datePipe, yAxisService, chartTypesService, severityIconPipe, severityLabelPipe, translate, router) {
|
|
371
|
+
constructor(datePipe, yAxisService, chartTypesService, severityIconPipe, severityLabelPipe, translate, router, appState) {
|
|
372
372
|
this.datePipe = datePipe;
|
|
373
373
|
this.yAxisService = yAxisService;
|
|
374
374
|
this.chartTypesService = chartTypesService;
|
|
@@ -376,6 +376,7 @@ class EchartsOptionsService {
|
|
|
376
376
|
this.severityLabelPipe = severityLabelPipe;
|
|
377
377
|
this.translate = translate;
|
|
378
378
|
this.router = router;
|
|
379
|
+
this.appState = appState;
|
|
379
380
|
this.TOOLTIP_WIDTH = 300;
|
|
380
381
|
}
|
|
381
382
|
getChartOptions(datapointsWithValues, timeRange, showSplitLines, events, alarms, displayOptions, selectedTimeRange, aggregatedDatapoints, sliderZoomUsed = false) {
|
|
@@ -389,6 +390,8 @@ class EchartsOptionsService {
|
|
|
389
390
|
const gridLeft = leftAxis.length ? leftAxis.length * this.yAxisService.Y_AXIS_OFFSET : 32;
|
|
390
391
|
const rightAxis = Array.isArray(yAxis) ? yAxis.filter(yx => yx.position === 'right') : [];
|
|
391
392
|
const gridRight = rightAxis.length ? rightAxis.length * this.yAxisService.Y_AXIS_OFFSET : 16;
|
|
393
|
+
const currentUser = this.appState.currentUser?.getValue();
|
|
394
|
+
const selectedLanguage = currentUser?.customProperties?.['c8y_UserPreference-language'] || 'en';
|
|
392
395
|
let intervalInMs = this.calculateExtendedIntervalInMs(selectedTimeRange?.interval || timeRange.interval || 'hours', selectedTimeRange || timeRange);
|
|
393
396
|
if (sliderZoomUsed) {
|
|
394
397
|
intervalInMs = this.calculateExtendedIntervalInMs(timeRange.interval || 'hours', timeRange);
|
|
@@ -482,7 +485,36 @@ class EchartsOptionsService {
|
|
|
482
485
|
axisLabel: {
|
|
483
486
|
hideOverlap: true,
|
|
484
487
|
borderWidth: 2, // as there is no margin for labels spacing, transparent border is a workaround
|
|
485
|
-
borderColor: 'transparent'
|
|
488
|
+
borderColor: 'transparent',
|
|
489
|
+
formatter: value => {
|
|
490
|
+
const date = new Date(value);
|
|
491
|
+
const locale = selectedLanguage.replace('_', '-');
|
|
492
|
+
const isStartOfMinute = date.getSeconds() === 0;
|
|
493
|
+
const isStartOfDay = date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0;
|
|
494
|
+
const isStartOfYear = date.getMonth() === 0 && date.getDate() === 1 && isStartOfDay;
|
|
495
|
+
let options;
|
|
496
|
+
// Case 1: Tick is start of year
|
|
497
|
+
// Shows only the year, e.g. "2025"
|
|
498
|
+
if (isStartOfYear) {
|
|
499
|
+
options = { year: 'numeric' };
|
|
500
|
+
}
|
|
501
|
+
// Case 2: Tick is start of day
|
|
502
|
+
// Shows abbreviated month and day, e.g. "Jan 13"
|
|
503
|
+
else if (isStartOfDay) {
|
|
504
|
+
options = { month: 'short', day: 'numeric' };
|
|
505
|
+
}
|
|
506
|
+
// Case 3: Tick is start of minute
|
|
507
|
+
// Shows hour and minute, e.g. "14:30" (format depends on locale)
|
|
508
|
+
else if (isStartOfMinute) {
|
|
509
|
+
options = { hour: 'numeric', minute: '2-digit' };
|
|
510
|
+
}
|
|
511
|
+
// Case 4: Interval is 1 minute or less
|
|
512
|
+
// Shows seconds, e.g. ":45"
|
|
513
|
+
else {
|
|
514
|
+
options = { second: '2-digit' };
|
|
515
|
+
}
|
|
516
|
+
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
517
|
+
}
|
|
486
518
|
},
|
|
487
519
|
splitLine: {
|
|
488
520
|
show: showSplitLines.XAxis,
|
|
@@ -1345,12 +1377,12 @@ class EchartsOptionsService {
|
|
|
1345
1377
|
return acc;
|
|
1346
1378
|
}, null);
|
|
1347
1379
|
}
|
|
1348
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1$1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token: i5.TranslateService }, { token: i6.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1380
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService, deps: [{ token: i1$1.DatePipe }, { token: YAxisService }, { token: ChartTypesService }, { token: i4.AlarmSeverityToIconPipe }, { token: i4.AlarmSeverityToLabelPipe }, { token: i5.TranslateService }, { token: i6.Router }, { token: i1$1.AppStateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1349
1381
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService }); }
|
|
1350
1382
|
}
|
|
1351
1383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EchartsOptionsService, decorators: [{
|
|
1352
1384
|
type: Injectable
|
|
1353
|
-
}], ctorParameters: () => [{ type: i1$1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type: i5.TranslateService }, { type: i6.Router }] });
|
|
1385
|
+
}], ctorParameters: () => [{ type: i1$1.DatePipe }, { type: YAxisService }, { type: ChartTypesService }, { type: i4.AlarmSeverityToIconPipe }, { type: i4.AlarmSeverityToLabelPipe }, { type: i5.TranslateService }, { type: i6.Router }, { type: i1$1.AppStateService }] });
|
|
1354
1386
|
|
|
1355
1387
|
class ChartRealtimeService {
|
|
1356
1388
|
constructor(measurementRealtime, alarmRealtimeService, eventRealtimeService, echartsOptionsService) {
|
|
@@ -1362,6 +1394,7 @@ class ChartRealtimeService {
|
|
|
1362
1394
|
this.MIN_REALTIME_TIMEOUT = 250;
|
|
1363
1395
|
this.MAX_REALTIME_TIMEOUT = 5_000;
|
|
1364
1396
|
this.lastMeasurements = new Map();
|
|
1397
|
+
this.pendingAlarmsOrEvents = new Map();
|
|
1365
1398
|
this.currentAlarms = [];
|
|
1366
1399
|
this.currentEvents = [];
|
|
1367
1400
|
}
|
|
@@ -1403,7 +1436,7 @@ class ChartRealtimeService {
|
|
|
1403
1436
|
dateFrom: this.currentTimeRange.dateFrom.toISOString(),
|
|
1404
1437
|
dateTo: this.currentTimeRange.dateTo.toISOString()
|
|
1405
1438
|
});
|
|
1406
|
-
interval(this.INTERVAL)
|
|
1439
|
+
this.realtimeIntervalSubscription = interval(this.INTERVAL)
|
|
1407
1440
|
.pipe(tap(() => {
|
|
1408
1441
|
const windowSize = this.currentTimeRange.dateTo.valueOf() - this.currentTimeRange.dateFrom.valueOf();
|
|
1409
1442
|
const now = Date.now();
|
|
@@ -1438,7 +1471,16 @@ class ChartRealtimeService {
|
|
|
1438
1471
|
this.realtimeSubscriptionMeasurements = measurement$
|
|
1439
1472
|
.pipe(buffer(bufferReset$))
|
|
1440
1473
|
.subscribe(measurements => {
|
|
1441
|
-
this.
|
|
1474
|
+
const alarmsOrEvents = Array.from(this.pendingAlarmsOrEvents.values());
|
|
1475
|
+
this.pendingAlarmsOrEvents.clear();
|
|
1476
|
+
if (alarmsOrEvents.length) {
|
|
1477
|
+
alarmsOrEvents.forEach(alarmOrEvent => {
|
|
1478
|
+
this.updateChartInstance(measurements, alarmOrEvent, displayOptions, datapointOutOfSyncCallback);
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
this.updateChartInstance(measurements, null, displayOptions, datapointOutOfSyncCallback);
|
|
1483
|
+
}
|
|
1442
1484
|
// Store the last measurements
|
|
1443
1485
|
measurements.forEach(measurement => {
|
|
1444
1486
|
this.lastMeasurements.set(measurement.datapoint.fragment, measurement);
|
|
@@ -1446,27 +1488,21 @@ class ChartRealtimeService {
|
|
|
1446
1488
|
});
|
|
1447
1489
|
this.realtimeSubscriptionAlarmsEvents = allAlarmsAndEvents$
|
|
1448
1490
|
.pipe(map(alarmOrEvent => {
|
|
1449
|
-
const foundAlarmOrEvent = activeAlarmsOrEvents.find(aOrE =>
|
|
1450
|
-
return aOrE.filters.type === alarmOrEvent.type;
|
|
1451
|
-
});
|
|
1491
|
+
const foundAlarmOrEvent = activeAlarmsOrEvents.find(aOrE => aOrE.filters.type === alarmOrEvent.type);
|
|
1452
1492
|
if (foundAlarmOrEvent) {
|
|
1453
1493
|
alarmOrEvent['color'] = foundAlarmOrEvent.color;
|
|
1454
1494
|
alarmOrEvent['selectedDatapoint'] = foundAlarmOrEvent.selectedDatapoint;
|
|
1495
|
+
const key = String(alarmOrEvent.id || alarmOrEvent.creationTime);
|
|
1496
|
+
this.pendingAlarmsOrEvents.set(key, alarmOrEvent);
|
|
1455
1497
|
}
|
|
1456
|
-
|
|
1457
|
-
const fragment = alarmOrEvent['selectedDatapoint']?.fragment;
|
|
1458
|
-
if (fragment && this.lastMeasurements.has(fragment)) {
|
|
1459
|
-
const lastMeasurement = this.lastMeasurements.get(fragment);
|
|
1460
|
-
this.updateChartInstance([lastMeasurement], alarmOrEvent, displayOptions, datapointOutOfSyncCallback);
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
return foundAlarmOrEvent ? alarmOrEvent : null;
|
|
1498
|
+
return null;
|
|
1464
1499
|
}))
|
|
1465
1500
|
.subscribe();
|
|
1466
1501
|
}
|
|
1467
1502
|
stopRealtime() {
|
|
1468
1503
|
this.realtimeSubscriptionMeasurements?.unsubscribe();
|
|
1469
1504
|
this.realtimeSubscriptionAlarmsEvents?.unsubscribe();
|
|
1505
|
+
this.realtimeIntervalSubscription?.unsubscribe();
|
|
1470
1506
|
}
|
|
1471
1507
|
/**
|
|
1472
1508
|
* Updates the chart with the current alarms and events data. Only used when no active datapoints are selected.
|