@c8y/ngx-components 1022.13.0 → 1022.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2 -0
- package/core/asset-property/asset-property.model.d.ts.map +1 -1
- package/core/authentication/authentication.module.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/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/device-list/devices.breadcrumb-factory.d.ts +1 -0
- package/device-list/devices.breadcrumb-factory.d.ts.map +1 -1
- package/device-parameters/device-parameter-details.component.d.ts +22 -0
- package/device-parameters/device-parameter-details.component.d.ts.map +1 -0
- package/device-parameters/device-parameter-value.component.d.ts +12 -0
- package/device-parameters/device-parameter-value.component.d.ts.map +1 -0
- package/device-parameters/device-parameters-list.component.d.ts +2 -1
- package/device-parameters/device-parameters-list.component.d.ts.map +1 -1
- package/device-parameters/index.d.ts +5 -0
- package/device-parameters/index.d.ts.map +1 -1
- package/device-parameters/parameter-type-cell-renderer.components.d.ts +8 -0
- package/device-parameters/parameter-type-cell-renderer.components.d.ts.map +1 -0
- 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/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-device-list.mjs +10 -3
- package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-parameters.mjs +110 -13
- package/fesm2022/c8y-ngx-components-device-parameters.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-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-trusted-certificates.mjs +66 -29
- 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.mjs +864 -859
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +34 -17
- package/locales/es.po +20 -2
- package/locales/fr.po +20 -2
- package/locales/ja_JP.po +22 -4
- package/locales/ko.po +20 -2
- package/locales/locales.pot +19 -1
- package/locales/nl.po +20 -2
- package/locales/pl.po +20 -2
- package/locales/pt_BR.po +20 -2
- package/locales/zh_CN.po +21 -3
- package/locales/zh_TW.po +20 -2
- 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/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/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","/**\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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,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,CAAC,WAAW,EAAE;AAC1C,YAAA,MAAM,EAAE,IAAI;AACZ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,CAAC;AAClC,gBAAA,QAAQ,EAAE;aACX;AACF,SAAA,EAAA,OAAA,EAAA,CAvBC,UAAU;YACV,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,sBAAsB;YACtB,gBAAgB;YAChB,aAAa;YACb,oBAAoB,CAAA,EAAA,CAAA,CAAA;;4FAkBX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBA3B7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,UAAU;wBACV,YAAY;wBACZ,YAAY;wBACZ,eAAe;wBACf,sBAAsB;wBACtB,gBAAgB;wBAChB,aAAa;wBACb;AACD,qBAAA;oBACD,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;;;ACrCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as i3 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { input, Input, Component } from '@angular/core';
|
|
5
|
+
import * as i1 from '@c8y/ngx-components';
|
|
6
|
+
import { CoreModule, EventRealtimeService } from '@c8y/ngx-components';
|
|
7
|
+
import * as i2 from '@c8y/ngx-components/events';
|
|
8
|
+
import { CollapseModule } from 'ngx-bootstrap/collapse';
|
|
9
|
+
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
10
|
+
import { pipe } from 'rxjs';
|
|
11
|
+
import { tap } from 'rxjs/operators';
|
|
12
|
+
|
|
13
|
+
class EventsTimelineComponent {
|
|
14
|
+
constructor(realtime, eventsService) {
|
|
15
|
+
this.realtime = realtime;
|
|
16
|
+
this.eventsService = eventsService;
|
|
17
|
+
this.sourceId = input.required();
|
|
18
|
+
this.filterPipe = pipe(tap());
|
|
19
|
+
this.footerTemplates = [];
|
|
20
|
+
this.propertiesToHide = [];
|
|
21
|
+
}
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EventsTimelineComponent, deps: [{ token: i1.EventRealtimeService }, { token: i2.EventsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: EventsTimelineComponent, isStandalone: true, selector: "c8y-events-timeline", inputs: { events: { classPropertyName: "events", publicName: "events", isSignal: false, isRequired: false, transformFunction: null }, sourceId: { classPropertyName: "sourceId", publicName: "sourceId", isSignal: true, isRequired: true, transformFunction: null }, filterPipe: { classPropertyName: "filterPipe", publicName: "filterPipe", isSignal: false, isRequired: false, transformFunction: null }, bodyTemplate: { classPropertyName: "bodyTemplate", publicName: "bodyTemplate", isSignal: false, isRequired: false, transformFunction: null }, footerTemplates: { classPropertyName: "footerTemplates", publicName: "footerTemplates", isSignal: false, isRequired: false, transformFunction: null }, propertiesToHide: { classPropertyName: "propertiesToHide", publicName: "propertiesToHide", isSignal: false, isRequired: false, transformFunction: null } }, providers: [EventRealtimeService], ngImport: i0, template: "<c8y-ui-empty-state\n [icon]=\"'online'\"\n [title]=\"'No recent events found.' | translate\"\n *ngIf=\"!events?.data || !events?.data?.length\"\n [horizontal]=\"true\"\n></c8y-ui-empty-state>\n<c8y-list-group>\n <c8y-li-timeline\n *c8yFor=\"\n let event of events;\n pipe: filterPipe;\n realtime: realtime;\n realtimeOptions: { entityOrId: sourceId() }\n \"\n >\n {{ event.creationTime | date: 'medium' }}\n <c8y-li\n #li\n (click)=\"li.toggleCollapsed()\"\n >\n <c8y-li-icon>\n <i [c8yIcon]=\"'online'\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex text-break-word\">\n <div data-cy=\"c8y-events-timeline--body-template\">\n <ng-container\n *ngIf=\"bodyTemplate; else defaultBody\"\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: event }\"\n ></ng-container>\n <ng-template #defaultBody>\n <small>{{ event.text }}</small>\n </ng-template>\n </div>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div\n class=\"legend form-block\"\n translate\n >\n Details\n </div>\n <ul class=\"list-unstyled small\">\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom\"\n *ngFor=\"let prop of eventsService.getStandardKeys(event) | keyvalue\"\n >\n <label class=\"small m-b-0 m-r-8 a-s-start\">\n {{ prop.value | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ event[prop.key] | translate }}\n </span>\n </li>\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom\"\n *ngFor=\"let key of eventsService.getNonStandardKeys(event, propertiesToHide)\"\n >\n <label class=\"small m-b-0 m-r-8 a-s-start\">\n {{ key | humanize | translate }}\n </label>\n <span class=\"m-l-auto text-code\">\n {{ event[key] | json }}\n </span>\n </li>\n </ul>\n <ng-container\n *ngFor=\"let footer of footerTemplates\"\n [ngTemplateOutlet]=\"footer\"\n [ngTemplateOutletContext]=\"{ $implicit: event }\"\n ></ng-container>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-li-timeline>\n</c8y-list-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i3.JsonPipe, name: "json" }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "pipe", type: i1.HumanizePipe, name: "humanize" }, { kind: "directive", type: i1.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: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i1.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i1.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: i1.ListItemTimelineComponent, selector: "c8y-list-item-timeline, c8y-li-timeline" }, { kind: "ngmodule", type: CollapseModule }, { kind: "ngmodule", type: TooltipModule }] }); }
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EventsTimelineComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{ selector: 'c8y-events-timeline', imports: [CommonModule, CoreModule, CollapseModule, TooltipModule], providers: [EventRealtimeService], template: "<c8y-ui-empty-state\n [icon]=\"'online'\"\n [title]=\"'No recent events found.' | translate\"\n *ngIf=\"!events?.data || !events?.data?.length\"\n [horizontal]=\"true\"\n></c8y-ui-empty-state>\n<c8y-list-group>\n <c8y-li-timeline\n *c8yFor=\"\n let event of events;\n pipe: filterPipe;\n realtime: realtime;\n realtimeOptions: { entityOrId: sourceId() }\n \"\n >\n {{ event.creationTime | date: 'medium' }}\n <c8y-li\n #li\n (click)=\"li.toggleCollapsed()\"\n >\n <c8y-li-icon>\n <i [c8yIcon]=\"'online'\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex text-break-word\">\n <div data-cy=\"c8y-events-timeline--body-template\">\n <ng-container\n *ngIf=\"bodyTemplate; else defaultBody\"\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: event }\"\n ></ng-container>\n <ng-template #defaultBody>\n <small>{{ event.text }}</small>\n </ng-template>\n </div>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div\n class=\"legend form-block\"\n translate\n >\n Details\n </div>\n <ul class=\"list-unstyled small\">\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom\"\n *ngFor=\"let prop of eventsService.getStandardKeys(event) | keyvalue\"\n >\n <label class=\"small m-b-0 m-r-8 a-s-start\">\n {{ prop.value | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ event[prop.key] | translate }}\n </span>\n </li>\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom\"\n *ngFor=\"let key of eventsService.getNonStandardKeys(event, propertiesToHide)\"\n >\n <label class=\"small m-b-0 m-r-8 a-s-start\">\n {{ key | humanize | translate }}\n </label>\n <span class=\"m-l-auto text-code\">\n {{ event[key] | json }}\n </span>\n </li>\n </ul>\n <ng-container\n *ngFor=\"let footer of footerTemplates\"\n [ngTemplateOutlet]=\"footer\"\n [ngTemplateOutletContext]=\"{ $implicit: event }\"\n ></ng-container>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-li-timeline>\n</c8y-list-group>\n" }]
|
|
28
|
+
}], ctorParameters: () => [{ type: i1.EventRealtimeService }, { type: i2.EventsService }], propDecorators: { events: [{
|
|
29
|
+
type: Input
|
|
30
|
+
}], filterPipe: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}], bodyTemplate: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}], footerTemplates: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}], propertiesToHide: [{
|
|
37
|
+
type: Input
|
|
38
|
+
}] } });
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Generated bundle index. Do not edit.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
export { EventsTimelineComponent };
|
|
45
|
+
//# sourceMappingURL=c8y-ngx-components-events-events-timeline.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-events-events-timeline.mjs","sources":["../../events/events-timeline/events-timeline.component.ts","../../events/events-timeline/events-timeline.component.html","../../events/events-timeline/c8y-ngx-components-events-events-timeline.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, Input, TemplateRef } from '@angular/core';\nimport { IEvent, IResultList } from '@c8y/client';\nimport { CoreModule, EventRealtimeService, ForOfFilterPipe } from '@c8y/ngx-components';\nimport { EventsService } from '@c8y/ngx-components/events';\nimport { CollapseModule } from 'ngx-bootstrap/collapse';\nimport { TooltipModule } from 'ngx-bootstrap/tooltip';\nimport { pipe } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Component({\n selector: 'c8y-events-timeline',\n templateUrl: 'events-timeline.component.html',\n imports: [CommonModule, CoreModule, CollapseModule, TooltipModule],\n providers: [EventRealtimeService]\n})\nexport class EventsTimelineComponent<B, F> {\n @Input()\n events: IResultList<IEvent>;\n\n sourceId = input.required<string | number>();\n\n @Input()\n filterPipe: ForOfFilterPipe<IEvent> = pipe(tap());\n\n @Input()\n bodyTemplate: TemplateRef<B>;\n\n @Input()\n footerTemplates: Array<TemplateRef<F>> = [];\n\n @Input()\n propertiesToHide: string[] = [];\n\n constructor(\n public realtime: EventRealtimeService,\n public eventsService: EventsService\n ) {}\n}\n","<c8y-ui-empty-state\n [icon]=\"'online'\"\n [title]=\"'No recent events found.' | translate\"\n *ngIf=\"!events?.data || !events?.data?.length\"\n [horizontal]=\"true\"\n></c8y-ui-empty-state>\n<c8y-list-group>\n <c8y-li-timeline\n *c8yFor=\"\n let event of events;\n pipe: filterPipe;\n realtime: realtime;\n realtimeOptions: { entityOrId: sourceId() }\n \"\n >\n {{ event.creationTime | date: 'medium' }}\n <c8y-li\n #li\n (click)=\"li.toggleCollapsed()\"\n >\n <c8y-li-icon>\n <i [c8yIcon]=\"'online'\"></i>\n </c8y-li-icon>\n <c8y-li-body>\n <div class=\"d-flex text-break-word\">\n <div data-cy=\"c8y-events-timeline--body-template\">\n <ng-container\n *ngIf=\"bodyTemplate; else defaultBody\"\n [ngTemplateOutlet]=\"bodyTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: event }\"\n ></ng-container>\n <ng-template #defaultBody>\n <small>{{ event.text }}</small>\n </ng-template>\n </div>\n </div>\n </c8y-li-body>\n\n <c8y-li-collapse>\n <div\n class=\"legend form-block\"\n translate\n >\n Details\n </div>\n <ul class=\"list-unstyled small\">\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom\"\n *ngFor=\"let prop of eventsService.getStandardKeys(event) | keyvalue\"\n >\n <label class=\"small m-b-0 m-r-8 a-s-start\">\n {{ prop.value | translate }}\n </label>\n <span class=\"m-l-auto text-break-word\">\n {{ event[prop.key] | translate }}\n </span>\n </li>\n <li\n class=\"p-t-4 p-b-4 d-flex separator-bottom\"\n *ngFor=\"let key of eventsService.getNonStandardKeys(event, propertiesToHide)\"\n >\n <label class=\"small m-b-0 m-r-8 a-s-start\">\n {{ key | humanize | translate }}\n </label>\n <span class=\"m-l-auto text-code\">\n {{ event[key] | json }}\n </span>\n </li>\n </ul>\n <ng-container\n *ngFor=\"let footer of footerTemplates\"\n [ngTemplateOutlet]=\"footer\"\n [ngTemplateOutletContext]=\"{ $implicit: event }\"\n ></ng-container>\n </c8y-li-collapse>\n </c8y-li>\n </c8y-li-timeline>\n</c8y-list-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAgBa,uBAAuB,CAAA;IAkBlC,WACS,CAAA,QAA8B,EAC9B,aAA4B,EAAA;QAD5B,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAa,CAAA,aAAA,GAAb,aAAa;AAhBtB,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAmB;AAG5C,QAAA,IAAA,CAAA,UAAU,GAA4B,IAAI,CAAC,GAAG,EAAE,CAAC;QAMjD,IAAe,CAAA,eAAA,GAA0B,EAAE;QAG3C,IAAgB,CAAA,gBAAA,GAAa,EAAE;;+GAhBpB,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IA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EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,yBAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,cAAc,8BAAE,aAAa,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAGtD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBANnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAEtB,OAAA,EAAA,CAAC,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,CAAC,EACvD,SAAA,EAAA,CAAC,oBAAoB,CAAC,EAAA,QAAA,EAAA,k8EAAA,EAAA;qHAIjC,MAAM,EAAA,CAAA;sBADL;gBAMD,UAAU,EAAA,CAAA;sBADT;gBAID,YAAY,EAAA,CAAA;sBADX;gBAID,eAAe,EAAA,CAAA;sBADd;gBAID,gBAAgB,EAAA,CAAA;sBADf;;;AE/BH;;AAEG;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { gettext } from '@c8y/ngx-components';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Injectable } from '@angular/core';
|
|
4
|
+
import { pickBy, has, without, difference, keys, includes } from 'lodash-es';
|
|
5
|
+
|
|
6
|
+
const EVENT_RESERVED_KEYS = [
|
|
7
|
+
'creationTime',
|
|
8
|
+
'id',
|
|
9
|
+
'self',
|
|
10
|
+
'source',
|
|
11
|
+
'text',
|
|
12
|
+
'time',
|
|
13
|
+
'type',
|
|
14
|
+
'c8y_IsBinary'
|
|
15
|
+
];
|
|
16
|
+
const EVENT_STANDARD_KEYS = {
|
|
17
|
+
type: gettext('Type'),
|
|
18
|
+
text: gettext('Text')
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
class EventsService {
|
|
22
|
+
getStandardKeys(event) {
|
|
23
|
+
return pickBy(EVENT_STANDARD_KEYS, (_, key) => has(event, key));
|
|
24
|
+
}
|
|
25
|
+
getNonStandardKeys(event, excluding = []) {
|
|
26
|
+
return without(difference(this.getKeys(event), keys(this.getStandardKeys(event))), ...excluding);
|
|
27
|
+
}
|
|
28
|
+
getKeys(managedObject) {
|
|
29
|
+
return Object.keys({ ...managedObject }).filter(key => !includes(EVENT_RESERVED_KEYS, key));
|
|
30
|
+
}
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
32
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EventsService, providedIn: 'root' }); }
|
|
33
|
+
}
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EventsService, decorators: [{
|
|
35
|
+
type: Injectable,
|
|
36
|
+
args: [{ providedIn: 'root' }]
|
|
37
|
+
}] });
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generated bundle index. Do not edit.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
export { EVENT_RESERVED_KEYS, EVENT_STANDARD_KEYS, EventsService };
|
|
44
|
+
//# sourceMappingURL=c8y-ngx-components-events.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-events.mjs","sources":["../../events/events.model.ts","../../events/events.service.ts","../../events/c8y-ngx-components-events.ts"],"sourcesContent":["import { gettext } from '@c8y/ngx-components';\n\nexport const EVENT_RESERVED_KEYS = [\n 'creationTime',\n 'id',\n 'self',\n 'source',\n 'text',\n 'time',\n 'type',\n 'c8y_IsBinary'\n];\n\nexport const EVENT_STANDARD_KEYS = {\n type: gettext('Type'),\n text: gettext('Text')\n};\n","import { Injectable } from '@angular/core';\nimport { IEvent } from '@c8y/client';\nimport { difference, has, includes, keys, pickBy, without } from 'lodash-es';\nimport {\n EVENT_RESERVED_KEYS as RESERVED_KEYS,\n EVENT_STANDARD_KEYS as STANDARD_KEYS\n} from './events.model';\n\n@Injectable({ providedIn: 'root' })\nexport class EventsService {\n getStandardKeys(event: IEvent) {\n return pickBy(STANDARD_KEYS, (_, key) => has(event, key));\n }\n\n getNonStandardKeys(event: IEvent, excluding: string[] = []) {\n return without(\n difference(this.getKeys(event), keys(this.getStandardKeys(event))),\n ...excluding\n );\n }\n\n private getKeys(managedObject) {\n return Object.keys({ ...managedObject }).filter(key => !includes(RESERVED_KEYS, key));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["STANDARD_KEYS","RESERVED_KEYS"],"mappings":";;;;;AAEa,MAAA,mBAAmB,GAAG;IACjC,cAAc;IACd,IAAI;IACJ,MAAM;IACN,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN;;AAGW,MAAA,mBAAmB,GAAG;AACjC,IAAA,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC;AACrB,IAAA,IAAI,EAAE,OAAO,CAAC,MAAM;;;MCNT,aAAa,CAAA;AACxB,IAAA,eAAe,CAAC,KAAa,EAAA;AAC3B,QAAA,OAAO,MAAM,CAACA,mBAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;;AAG3D,IAAA,kBAAkB,CAAC,KAAa,EAAE,SAAA,GAAsB,EAAE,EAAA;QACxD,OAAO,OAAO,CACZ,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAClE,GAAG,SAAS,CACb;;AAGK,IAAA,OAAO,CAAC,aAAa,EAAA;QAC3B,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAACC,mBAAa,EAAE,GAAG,CAAC,CAAC;;+GAb5E,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA,CAAA;;4FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACRlC;;AAEG;;;;"}
|
|
@@ -3,10 +3,8 @@ import { Component, NgModule } from '@angular/core';
|
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
4
|
import { RouterModule } from '@angular/router';
|
|
5
5
|
import { get } from 'lodash-es';
|
|
6
|
-
import
|
|
7
|
-
import { BaseStepperComponent, BulkOperationStepperModule } from '@c8y/ngx-components/operations/bulk-operation-stepper';
|
|
6
|
+
import { BaseStepperComponent, BulkOperationStepper } from '@c8y/ngx-components/operations/bulk-operation-stepper';
|
|
8
7
|
import * as i2 from '@c8y/ngx-components/operations/bulk-operations-service';
|
|
9
|
-
import { CoreModule } from '@c8y/ngx-components';
|
|
10
8
|
|
|
11
9
|
class BulkOperationFromSingleComponent extends BaseStepperComponent {
|
|
12
10
|
constructor(activatedRoute, bulkOperationService) {
|
|
@@ -22,11 +20,11 @@ class BulkOperationFromSingleComponent extends BaseStepperComponent {
|
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
22
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.BulkOperationsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: BulkOperationFromSingleComponent, isStandalone:
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: BulkOperationFromSingleComponent, isStandalone: true, selector: "bulk-operation-from-single", usesInheritance: true, ngImport: i0, template: "<c8y-bulk-operation-stepper type=\"from-single\"> </c8y-bulk-operation-stepper>\n", dependencies: [{ kind: "component", type: BulkOperationStepper, selector: "c8y-bulk-operation-stepper", inputs: ["type"], outputs: ["selectionChange"] }] }); }
|
|
26
24
|
}
|
|
27
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleComponent, decorators: [{
|
|
28
26
|
type: Component,
|
|
29
|
-
args: [{ selector: 'bulk-operation-from-single',
|
|
27
|
+
args: [{ selector: 'bulk-operation-from-single', imports: [BulkOperationStepper], template: "<c8y-bulk-operation-stepper type=\"from-single\"> </c8y-bulk-operation-stepper>\n" }]
|
|
30
28
|
}], ctorParameters: () => [{ type: i1.ActivatedRoute }, { type: i2.BulkOperationsService }] });
|
|
31
29
|
|
|
32
30
|
const bulkOperationCreateSingleRoutes = [
|
|
@@ -37,20 +35,16 @@ const bulkOperationCreateSingleRoutes = [
|
|
|
37
35
|
];
|
|
38
36
|
class BulkOperationFromSingleModule {
|
|
39
37
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
40
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleModule,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
BulkOperationStepperModule,
|
|
44
|
-
RouterModule.forChild(bulkOperationCreateSingleRoutes)] }); }
|
|
38
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleModule, imports: [i1.RouterModule, BulkOperationFromSingleComponent] }); }
|
|
39
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleModule, imports: [RouterModule.forChild(bulkOperationCreateSingleRoutes),
|
|
40
|
+
BulkOperationFromSingleComponent] }); }
|
|
45
41
|
}
|
|
46
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BulkOperationFromSingleModule, decorators: [{
|
|
47
43
|
type: NgModule,
|
|
48
44
|
args: [{
|
|
49
|
-
declarations: [BulkOperationFromSingleComponent],
|
|
50
45
|
imports: [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
RouterModule.forChild(bulkOperationCreateSingleRoutes)
|
|
46
|
+
RouterModule.forChild(bulkOperationCreateSingleRoutes),
|
|
47
|
+
BulkOperationFromSingleComponent
|
|
54
48
|
]
|
|
55
49
|
}]
|
|
56
50
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-operations-bulk-operation-from-single.mjs","sources":["../../operations/bulk-operation-from-single/bulk-operation-from-single.component.ts","../../operations/bulk-operation-from-single/bulk-operation-from-single.component.html","../../operations/bulk-operation-from-single/bulk-operation-from-single.module.ts","../../operations/bulk-operation-from-single/c8y-ngx-components-operations-bulk-operation-from-single.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IOperation } from '@c8y/client';\nimport { get } from 'lodash-es';\nimport {
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-operations-bulk-operation-from-single.mjs","sources":["../../operations/bulk-operation-from-single/bulk-operation-from-single.component.ts","../../operations/bulk-operation-from-single/bulk-operation-from-single.component.html","../../operations/bulk-operation-from-single/bulk-operation-from-single.module.ts","../../operations/bulk-operation-from-single/c8y-ngx-components-operations-bulk-operation-from-single.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IOperation } from '@c8y/client';\nimport { get } from 'lodash-es';\nimport {\n BaseStepperComponent,\n BulkOperationStepper\n} from '@c8y/ngx-components/operations/bulk-operation-stepper';\nimport {\n BulkOperationsService,\n OperationDetails\n} from '@c8y/ngx-components/operations/bulk-operations-service';\n\n@Component({\n selector: 'bulk-operation-from-single',\n templateUrl: 'bulk-operation-from-single.component.html',\n imports: [BulkOperationStepper]\n})\nexport class BulkOperationFromSingleComponent extends BaseStepperComponent implements OnInit {\n constructor(\n private activatedRoute: ActivatedRoute,\n private bulkOperationService: BulkOperationsService\n ) {\n super();\n }\n\n protected async retrieveOperationPrototype(): Promise<OperationDetails> {\n const prototype: IOperation = (\n await this.bulkOperationService.getOperation(this.activatedRoute.snapshot.params.operationId)\n ).data;\n\n return {\n description: get(prototype, 'description'),\n prototype\n };\n }\n}\n","<c8y-bulk-operation-stepper type=\"from-single\"> </c8y-bulk-operation-stepper>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { Route } from '@c8y/ngx-components';\n\nimport { BulkOperationFromSingleComponent } from './bulk-operation-from-single.component';\n\nexport const bulkOperationCreateSingleRoutes: Route[] = [\n {\n path: 'devicecontrol/single/create-bulk/:operationId',\n component: BulkOperationFromSingleComponent\n }\n];\n\n@NgModule({\n imports: [\n RouterModule.forChild(bulkOperationCreateSingleRoutes),\n BulkOperationFromSingleComponent\n ]\n})\nexport class BulkOperationFromSingleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAkBM,MAAO,gCAAiC,SAAQ,oBAAoB,CAAA;IACxE,WACU,CAAA,cAA8B,EAC9B,oBAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE;QAHC,IAAc,CAAA,cAAA,GAAd,cAAc;QACd,IAAoB,CAAA,oBAAA,GAApB,oBAA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