@c8y/ngx-components 1023.5.3 → 1023.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/c8y-ngx-components-actility-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-actility-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-advanced-software-management.mjs +7 -7
- package/fesm2022/c8y-ngx-components-advanced-software-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs +9 -9
- package/fesm2022/c8y-ngx-components-ai-agent-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs +12 -12
- package/fesm2022/c8y-ngx-components-ai-ai-chat.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ai.mjs +3 -3
- package/fesm2022/c8y-ngx-components-ai.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +34 -34
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +4 -4
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +76 -76
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-api.mjs +7 -7
- package/fesm2022/c8y-ngx-components-api.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-app-logs.mjs +10 -10
- package/fesm2022/c8y-ngx-components-app-logs.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-asset-properties.mjs +39 -39
- package/fesm2022/c8y-ngx-components-asset-properties.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B0Yspstg.mjs → c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs} +13 -13
- package/fesm2022/{c8y-ngx-components-asset-property-grid.component-B0Yspstg.mjs.map → c8y-ngx-components-asset-property-grid.component-B1q7kXRu.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +32 -32
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs +114 -114
- package/fesm2022/c8y-ngx-components-auth-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs +7 -7
- package/fesm2022/c8y-ngx-components-binary-file-download.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-bookmarks.mjs +13 -13
- package/fesm2022/c8y-ngx-components-bookmarks.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs +4 -4
- package/fesm2022/c8y-ngx-components-branding-base-branding.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-dark-theme.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-extra-css-branding-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs +3 -3
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs +7 -7
- package/fesm2022/c8y-ngx-components-branding-plain-branding-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +15 -15
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-branding-shared-lazy-add-branding-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +36 -36
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +13 -13
- package/fesm2022/c8y-ngx-components-branding-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-child-devices.mjs +13 -13
- package/fesm2022/c8y-ngx-components-child-devices.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs +40 -40
- package/fesm2022/c8y-ngx-components-cockpit-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs +68 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-alarm-count-config.component-BeFT75x1.mjs.map → c8y-ngx-components-computed-asset-properties-alarm-count-config.component-Bl18pHcM.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B8_RmTvv.mjs → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-B8_RmTvv.mjs.map → c8y-ngx-components-computed-asset-properties-configuration-snapshot-config.component-C5QMFdX1.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs +44 -0
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-event-count-config.component-BUxC3Tmh.mjs.map → c8y-ngx-components-computed-asset-properties-event-count-config.component-C-Lc5Ble.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Dcmrw2Wg.mjs → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-computed-asset-properties-last-measurement-config.component-Dcmrw2Wg.mjs.map → c8y-ngx-components-computed-asset-properties-last-measurement-config.component-BXfM7hTQ.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties.mjs +6 -6
- package/fesm2022/c8y-ngx-components-connectivity.mjs +53 -53
- package/fesm2022/c8y-ngx-components-connectivity.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs +11 -11
- package/fesm2022/c8y-ngx-components-context-dashboard-cockpit-home-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C30if8-Q.mjs → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-C30if8-Q.mjs.map → c8y-ngx-components-context-dashboard-dashboard-appearance-settings.component-BuGMpNrA.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-FBfdlVT1.mjs → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs} +10 -10
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-general-settings.component-FBfdlVT1.mjs.map → c8y-ngx-components-context-dashboard-dashboard-general-settings.component-DN-f35bA.mjs.map} +1 -1
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DrVQS63v.mjs → c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs} +4 -4
- package/fesm2022/{c8y-ngx-components-context-dashboard-dashboard-version-history.component-DrVQS63v.mjs.map → c8y-ngx-components-context-dashboard-dashboard-version-history.component-BlIVEV__.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +10 -10
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +7 -7
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs +3 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-state.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +102 -102
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-BHmaZVgy.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs} +16 -16
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-BHmaZVgy.mjs.map → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-m7YeEj9R.mjs.map} +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +12 -12
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs +6 -6
- package/fesm2022/c8y-ngx-components-dashboard-manager-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs +22 -22
- package/fesm2022/c8y-ngx-components-dashboard-manager.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-broker.mjs +7 -7
- package/fesm2022/c8y-ngx-components-data-broker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns-asset-type.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs +3 -3
- package/fesm2022/c8y-ngx-components-data-grid-columns.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +24 -24
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +7 -7
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoint-library-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs +4 -4
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +40 -40
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +33 -33
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs +16 -16
- package/fesm2022/c8y-ngx-components-default-subscriptions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-grid.mjs +43 -43
- package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-list.mjs +22 -22
- package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs +12 -12
- package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-profile.mjs +34 -34
- package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs +3 -3
- package/fesm2022/c8y-ngx-components-device-protocol-object-mappings.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-protocols.mjs +16 -16
- package/fesm2022/c8y-ngx-components-device-protocols.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +13 -13
- package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-shell.mjs +31 -31
- package/fesm2022/c8y-ngx-components-device-shell.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-diagnostics.mjs +13 -13
- package/fesm2022/c8y-ngx-components-diagnostics.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +30 -30
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -43
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-archived-confirm.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs +10 -10
- package/fesm2022/c8y-ngx-components-ecosystem-license-confirm.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs +7 -7
- package/fesm2022/c8y-ngx-components-ecosystem-plugin-setup-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +46 -46
- package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +82 -82
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events-events-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-events.mjs +3 -3
- package/fesm2022/c8y-ngx-components-events.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-exports-list.mjs +6 -6
- package/fesm2022/c8y-ngx-components-exports-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-file-preview.mjs +7 -7
- package/fesm2022/c8y-ngx-components-file-preview.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-files-repository.mjs +19 -19
- package/fesm2022/c8y-ngx-components-files-repository.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-global-context.mjs +118 -118
- package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-icon-selector.mjs +19 -19
- package/fesm2022/c8y-ngx-components-icon-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-interval-picker.mjs +3 -3
- package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-location.mjs +28 -28
- package/fesm2022/c8y-ngx-components-location.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-loriot-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +19 -19
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-messaging-management.mjs +55 -55
- package/fesm2022/c8y-ngx-components-messaging-management.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-from-single.mjs +7 -7
- 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 +19 -19
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-list-item.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-scheduler.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operation-stepper.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-service.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-bulk-operations-stepper-container.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs +3 -3
- package/fesm2022/c8y-ngx-components-operations-bulk-single-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-create-bulk-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-grid-columns.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-operation-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operation-summary.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-operations-list-item-details.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs +12 -12
- package/fesm2022/c8y-ngx-components-operations-operations-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-operations-timeline.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-shared.mjs +10 -10
- package/fesm2022/c8y-ngx-components-operations-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations-status-filter.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +7 -7
- 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 +13 -13
- 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 +13 -13
- 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 +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs +13 -13
- package/fesm2022/c8y-ngx-components-operations-stepper-frames.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-operations.mjs +7 -7
- package/fesm2022/c8y-ngx-components-operations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs +7 -7
- package/fesm2022/c8y-ngx-components-pending-mo-request.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs +10 -10
- package/fesm2022/c8y-ngx-components-platform-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +38 -38
- package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs +58 -58
- package/fesm2022/c8y-ngx-components-protocol-opcua.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +58 -58
- package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs +9 -9
- package/fesm2022/c8y-ngx-components-remote-access-configurations.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-passthrough.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-terminal-viewer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs +6 -6
- package/fesm2022/c8y-ngx-components-remote-access-vnc-vnc-viewer.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +3 -3
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs +6 -6
- package/fesm2022/c8y-ngx-components-replace-device-replace-device-wizard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-replace-device.mjs +10 -10
- package/fesm2022/c8y-ngx-components-replace-device.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +16 -16
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-reports.mjs +19 -19
- package/fesm2022/c8y-ngx-components-reports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs +48 -48
- package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +33 -33
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-shared.mjs +34 -34
- package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +42 -42
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository.mjs +4 -4
- package/fesm2022/c8y-ngx-components-repository.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-search.mjs +19 -19
- package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +6 -6
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs +7 -7
- package/fesm2022/c8y-ngx-components-sensor-phone.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-service-command-tab.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services-shared.mjs +3 -3
- package/fesm2022/c8y-ngx-components-services-shared.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-services.mjs +29 -29
- package/fesm2022/c8y-ngx-components-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs +16 -16
- package/fesm2022/c8y-ngx-components-sigfox-device-registration.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs +7 -7
- package/fesm2022/c8y-ngx-components-sms-gateway.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-static-assets-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs +9 -9
- package/fesm2022/c8y-ngx-components-static-assets-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-static-assets.mjs +6 -6
- package/fesm2022/c8y-ngx-components-static-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +60 -60
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tenants.mjs +40 -40
- package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +6 -6
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +12 -12
- package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs +3 -3
- package/fesm2022/c8y-ngx-components-translation-editor-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +12 -12
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-translation-editor.mjs +6 -6
- package/fesm2022/c8y-ngx-components-translation-editor.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +33 -33
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs +4 -4
- package/fesm2022/c8y-ngx-components-upgrade-upgraded-services.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +62 -43
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-user-roles.mjs +10 -10
- package/fesm2022/c8y-ngx-components-user-roles.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget-ai-config.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-definitions-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs +8 -1
- package/fesm2022/c8y-ngx-components-widgets-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +19 -19
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-notes.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-legacy-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs +27 -27
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-control-message.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs +7 -7
- package/fesm2022/c8y-ngx-components-widgets-implementations-device-management-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs +3 -3
- package/fesm2022/c8y-ngx-components-widgets-implementations-help-and-service-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs +24 -24
- package/fesm2022/c8y-ngx-components-widgets-implementations-html-widget.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-image.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-info-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-kpi.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs +6 -6
- package/fesm2022/c8y-ngx-components-widgets-implementations-linear-gauge.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-markdown.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +18 -18
- package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs +9 -9
- package/fesm2022/c8y-ngx-components-widgets-implementations-three-d-rotation.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs +5 -2
- package/fesm2022/c8y-ngx-components-widgets-widget-providers.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1323 -1323
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/upgrade/index.d.ts +1 -0
- package/upgrade/index.d.ts.map +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/device-management-exports/index.d.ts +6 -0
- package/widgets/device-management-exports/index.d.ts.map +1 -1
- package/widgets/exports/index.d.ts +8 -1
- package/widgets/exports/index.d.ts.map +1 -1
- package/widgets/widget-providers/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-computed-asset-properties-alarm-count-config.component-BeFT75x1.mjs +0 -68
- package/fesm2022/c8y-ngx-components-computed-asset-properties-event-count-config.component-BUxC3Tmh.mjs +0 -44
|
@@ -95,10 +95,10 @@ class RemoteAccessSshEndpointModalComponent {
|
|
|
95
95
|
save() {
|
|
96
96
|
this._resolve(this.form.value);
|
|
97
97
|
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: RemoteAccessSshEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-ssh-endpoint-modal", ngImport: i0, template: "<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: SshKeyInputComponent, selector: "c8y-ssh-key-input", inputs: ["keyType"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i5.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RemoteAccessSshEndpointModalComponent, deps: [{ token: i1.FormBuilder }, { token: i2.RemoteAccessService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: RemoteAccessSshEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-ssh-endpoint-modal", ngImport: i0, template: "<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i3.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i3.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i3.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i3.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: SshKeyInputComponent, selector: "c8y-ssh-key-input", inputs: ["keyType"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i5.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] }); }
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RemoteAccessSshEndpointModalComponent, decorators: [{
|
|
102
102
|
type: Component,
|
|
103
103
|
args: [{ selector: 'c8y-remote-access-ssh-endpoint-modal', standalone: true, imports: [CoreModule, NgForOf, NgClass, SshKeyInputComponent, PopoverModule], template: "<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n" }]
|
|
104
104
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.RemoteAccessService }] });
|
package/fesm2022/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs","sources":["../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.ts","../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.html","../../remote-access/ssh/remote-access-ssh-endpoint-modal/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.ts"],"sourcesContent":["import { NgClass, NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { SshKeyInputComponent } from '@c8y/ngx-components/remote-access/shared';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { saveAs } from 'file-saver';\n\n@Component({\n selector: 'c8y-remote-access-ssh-endpoint-modal',\n templateUrl: './remote-access-ssh-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf, NgClass, SshKeyInputComponent, PopoverModule]\n})\nexport class RemoteAccessSshEndpointModalComponent implements OnInit {\n credentialTypes = [\n CREDENTIALS_TYPES.USER_PASS,\n CREDENTIALS_TYPES.CERTIFICATE,\n CREDENTIALS_TYPES.KEY_PAIR\n ];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n generating = false;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(\n private formBuilder: FormBuilder,\n private remoteAccess: RemoteAccessService\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || CREDENTIALS_TYPES.USER_PASS.value;\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password, publicKey, privateKey, certificate, hostKey } = credentials;\n Object.assign(attributesToAdd, {\n username,\n password,\n publicKey,\n privateKey,\n certificate,\n hostKey\n });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [22, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['SSH', [Validators.required, Validators.minLength(1)]],\n username: [undefined as string, [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: [\n CREDENTIALS_TYPES.USER_PASS.value as 'USER_PASS' | 'KEY_PAIR' | 'CERTIFICATE',\n [Validators.required]\n ],\n hostKey: [undefined as string, []],\n publicKey: [undefined as string, []],\n privateKey: [undefined as string, []],\n certificate: [undefined as string, []]\n });\n }\n\n downloadPublicKey() {\n const publicKey = this.form.value.publicKey;\n const blob = new Blob([publicKey], { type: 'text/plain' });\n saveAs(blob, `key.pub`);\n }\n\n async generateKeys() {\n this.generating = true;\n try {\n const pair = await this.remoteAccess.generateKeyPair(this.form.value.hostname || undefined);\n this.form.patchValue({\n publicKey: pair.publicKey,\n privateKey: pair.privateKey\n });\n } catch (e) {\n console.log(e);\n }\n this.generating = false;\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoBa,qCAAqC,CAAA;IAoBhD,WAAA,CACU,WAAwB,EACxB,YAAiC,EAAA;QADjC,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,YAAY,GAAZ,YAAY;AArBtB,QAAA,IAAA,CAAA,eAAe,GAAG;AAChB,YAAA,iBAAiB,CAAC,SAAS;AAC3B,YAAA,iBAAiB,CAAC,WAAW;AAC7B,YAAA,iBAAiB,CAAC;SACnB;AACD,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC;QAEzC,IAAA,CAAA,UAAU,GAAG,KAAK;QAIlB,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,CAA4C,CAAC,OAAO,EAAE,MAAM,KAAI;AAClF,YAAA,IAAI,CAAC,QAAQ,GAAG,OAAO;AACvB,YAAA,IAAI,CAAC,OAAO,GAAG,MAAM;AACvB,QAAA,CAAC,CAAC;AASA,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE;IAC7B;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY;YAClD,MAAM,eAAe,GAAG,WAAW,EAAE,IAAI,IAAI,iBAAiB,CAAC,SAAS,CAAC,KAAK;AAC9E,YAAA,MAAM,eAAe,GAAG,E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AA;kBANjD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,EAAA,UAAA,EAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,83SAAA,EAAA;;;AElB9E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.mjs","sources":["../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.ts","../../remote-access/ssh/remote-access-ssh-endpoint-modal/remote-access-ssh-endpoint-modal.component.html","../../remote-access/ssh/remote-access-ssh-endpoint-modal/c8y-ngx-components-remote-access-ssh-remote-access-ssh-endpoint-modal.ts"],"sourcesContent":["import { NgClass, NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { SshKeyInputComponent } from '@c8y/ngx-components/remote-access/shared';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { saveAs } from 'file-saver';\n\n@Component({\n selector: 'c8y-remote-access-ssh-endpoint-modal',\n templateUrl: './remote-access-ssh-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf, NgClass, SshKeyInputComponent, PopoverModule]\n})\nexport class RemoteAccessSshEndpointModalComponent implements OnInit {\n credentialTypes = [\n CREDENTIALS_TYPES.USER_PASS,\n CREDENTIALS_TYPES.CERTIFICATE,\n CREDENTIALS_TYPES.KEY_PAIR\n ];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n generating = false;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(\n private formBuilder: FormBuilder,\n private remoteAccess: RemoteAccessService\n ) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || CREDENTIALS_TYPES.USER_PASS.value;\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password, publicKey, privateKey, certificate, hostKey } = credentials;\n Object.assign(attributesToAdd, {\n username,\n password,\n publicKey,\n privateKey,\n certificate,\n hostKey\n });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [22, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['SSH', [Validators.required, Validators.minLength(1)]],\n username: [undefined as string, [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: [\n CREDENTIALS_TYPES.USER_PASS.value as 'USER_PASS' | 'KEY_PAIR' | 'CERTIFICATE',\n [Validators.required]\n ],\n hostKey: [undefined as string, []],\n publicKey: [undefined as string, []],\n privateKey: [undefined as string, []],\n certificate: [undefined as string, []]\n });\n }\n\n downloadPublicKey() {\n const publicKey = this.form.value.publicKey;\n const blob = new Blob([publicKey], { type: 'text/plain' });\n saveAs(blob, `key.pub`);\n }\n\n async generateKeys() {\n this.generating = true;\n try {\n const pair = await this.remoteAccess.generateKeyPair(this.form.value.hostname || undefined);\n this.form.patchValue({\n publicKey: pair.publicKey,\n privateKey: pair.privateKey\n });\n } catch (e) {\n console.log(e);\n }\n this.generating = false;\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<ng-template #keyPairPopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA, ECDSA, ED25519.</small>\n</ng-template>\n\n<ng-template #certificatePopoverContent>\n <small translate>Supported formats: OpenSSHv1, OpenSSHv2, PEM, SSH2.<br />Supported algorithms: RSA, DSA.</small>\n</ng-template>\n\n<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '22' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <div\n class=\"tight-grid\"\n >\n <div class=\"col-md-6\">\n <c8y-form-group>\n <label\n for=\"username\"\n translate\n >\n Username\n </label>\n <input\n class=\"form-control\"\n id=\"username\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_username' } }}\"\n name=\"username\"\n type=\"username\"\n autocomplete=\"off\"\n formControlName=\"username\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n <div class=\"col-md-6\" *ngIf=\"form.value.credentialsType === 'USER_PASS'\">\n <c8y-form-group>\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'KEY_PAIR'\">\n <div class=\"form-group\" ng-if=\"!vm.keyPairAvailable() || vm.changingKeyPair\">\n <button\n class=\"btn btn-default p-l-16\"\n type=\"button\"\n [title]=\"'Generate public and private keys' | translate\"\n [ngClass]=\"{ 'btn-pending': generating }\"\n ng-disabled=\"vm.generating\"\n (click)=\"generateKeys()\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--generate-keys'\"\n >\n <i [c8yIcon]=\"'key'\"></i>\n {{ 'Generate public and private keys' | translate }}\n </button>\n </div>\n\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"publicKey\">\n {{ 'Public key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n <button\n class=\"m-l-16 btn-link interact\"\n type=\"button\"\n [title]=\"'Download key' | translate\"\n (click)=\"downloadPublicKey()\"\n *ngIf=\"form.value.publicKey\"\n >\n <i [c8yIcon]=\"'download'\"></i>\n {{ 'Download key' | translate }}\n </button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"publicKey\"\n formControlName=\"publicKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div *ngIf=\"form.value.credentialsType === 'CERTIFICATE'\">\n <c8y-form-group>\n <label for=\"privateKey\">\n {{ 'Private key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"privateKey\"\n formControlName=\"privateKey\"\n [keyType]=\"'private'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n <c8y-form-group>\n <label for=\"certificate\">\n {{ 'Certificate' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"certificatePopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"certificate\"\n formControlName=\"certificate\"\n [keyType]=\"'certificate'\"\n ></c8y-ssh-key-input>\n </div>\n </c8y-form-group>\n\n </div>\n\n <div>\n <c8y-form-group>\n <label\n for=\"hostKey\"\n >\n {{ 'Host key' | translate }}\n <button\n class=\"btn-help btn-help--sm\"\n type=\"button\"\n [attr.aria-label]=\"'Help' | translate\"\n [popover]=\"keyPairPopoverContent\"\n [container]=\"'body'\"\n [placement]=\"'right'\"\n [triggers]=\"'focus'\"\n ></button>\n </label>\n <div>\n <c8y-ssh-key-input\n id=\"hostKey\"\n formControlName=\"hostKey\"\n [keyType]=\"'public'\"\n ></c8y-ssh-key-input>\n </div>\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoBa,qCAAqC,CAAA;IAoBhD,WAAA,CACU,WAAwB,EACxB,YAAiC,EAAA;QADjC,IAAA,CAAA,WAAW,GAAX,WAAW;QACX,IAAA,CAAA,YAAY,GAAZ,YAAY;AArBtB,QAAA,IAAA,CAAA,eAAe,GAAG;AAChB,YAAA,iBAAiB,CAAC,SAAS;AAC3B,YAAA,iBAAiB,CAAC,WAAW;AAC7B,YAAA,iBAAiB,CAAC;SACnB;AACD,QAAA,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,wBAAwB,CAAC;QAEzC,IAAA,CAAA,UAAU,GAAG,KAAK;QAIlB,IAAA,CA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A,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,kBAAA,EAAA,mBAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,cAAA,EAAA,UAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAEhE,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBANjD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,EAAA,UAAA,EAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,83SAAA,EAAA;;;AElB9E;;AAEG;;;;"}
|
|
@@ -54,10 +54,10 @@ class SSHRemoteAccessProtocolProviderService {
|
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
58
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SSHRemoteAccessProtocolProviderService, deps: [{ token: i1.RemoteAccessService }, { token: i2.BsModalService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
58
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SSHRemoteAccessProtocolProviderService, providedIn: 'root' }); }
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SSHRemoteAccessProtocolProviderService, decorators: [{
|
|
61
61
|
type: Injectable,
|
|
62
62
|
args: [{ providedIn: 'root' }]
|
|
63
63
|
}], ctorParameters: () => [{ type: i1.RemoteAccessService }, { type: i2.BsModalService }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-remote-access-ssh.mjs","sources":["../../remote-access/ssh/index.ts","../../remote-access/ssh/c8y-ngx-components-remote-access-ssh.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { hookRoute, hookService, ViewContext } from '@c8y/ngx-components';\nimport {\n canActivateRemoteAccess,\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\n@Injectable({ providedIn: 'root' })\nexport class SSHRemoteAccessProtocolProviderService implements RemoteAccessProtocolProvider {\n protocolName = 'SSH';\n protocolLabel = gettext('SSH');\n protocolDescription = gettext('Allows to connect to an SSH service.');\n protocolIcon = 'laptop' as const;\n\n constructor(\n protected remoteAccess: RemoteAccessService,\n protected bsModalService: BsModalService\n ) {}\n\n async addEndpoint(deviceId: string): Promise<RemoteAccessConfiguration> {\n const modalResult = await this.openSSHEndpointModal({});\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.addConfiguration(deviceId, modalResult);\n }\n\n removeEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<void> {\n return this.remoteAccess.deleteConfiguration(deviceId, currentEndpointConfig.id);\n }\n\n async editEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<RemoteAccessConfiguration> {\n const modalResult = await this.openSSHEndpointModal(currentEndpointConfig);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.updateConfiguration(deviceId, modalResult);\n }\n\n async connectEndpointHref(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<string> {\n return `/device/${deviceId}/ssh/${configuration.id}`;\n }\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 22\n };\n }\n\n protected async openSSHEndpointModal(\n currentConfiguration: Partial<RemoteAccessConfiguration>\n ): Promise<RemoteAccessConfiguration | null> {\n const { RemoteAccessSshEndpointModalComponent } = await import(\n '@c8y/ngx-components/remote-access/ssh/remote-access-ssh-endpoint-modal'\n );\n try {\n const modalRef = this.bsModalService.show(RemoteAccessSshEndpointModalComponent, {\n initialState: { currentValue: currentConfiguration }\n });\n return (await modalRef.content.result) as RemoteAccessConfiguration;\n } catch (e) {\n // modal closed\n return null;\n }\n }\n}\n\nexport const remoteAccessSSHProviders = [\n hookRoute({\n loadComponent: () =>\n import('@c8y/ngx-components/remote-access/terminal-viewer').then(\n m => m.TerminalViewerComponent\n ),\n path: 'ssh/:configurationId',\n context: ViewContext.Device,\n tabs: [],\n canActivate: [canActivateRemoteAccess]\n }),\n hookService('remoteAccessProtocolHook', SSHRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYa,sCAAsC,CAAA;IAMjD,WAAA,CACY,YAAiC,EACjC,cAA8B,EAAA;QAD9B,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,cAAc,GAAd,cAAc;QAP1B,IAAA,CAAA,YAAY,GAAG,KAAK;AACpB,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AAC9B,QAAA,IAAA,CAAA,mBAAmB,GAAG,OAAO,CAA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nD,aAAA,CAAC;YACF,QAAQ,MAAM,QAAQ,CAAC,OAAO,CAAC,MAAM;QACvC;QAAE,OAAO,CAAC,EAAE;;AAEV,YAAA,OAAO,IAAI;QACb;IACF
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-remote-access-ssh.mjs","sources":["../../remote-access/ssh/index.ts","../../remote-access/ssh/c8y-ngx-components-remote-access-ssh.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { hookRoute, hookService, ViewContext } from '@c8y/ngx-components';\nimport {\n canActivateRemoteAccess,\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\nimport { BsModalService } from 'ngx-bootstrap/modal';\n\n@Injectable({ providedIn: 'root' })\nexport class SSHRemoteAccessProtocolProviderService implements RemoteAccessProtocolProvider {\n protocolName = 'SSH';\n protocolLabel = gettext('SSH');\n protocolDescription = gettext('Allows to connect to an SSH service.');\n protocolIcon = 'laptop' as const;\n\n constructor(\n protected remoteAccess: RemoteAccessService,\n protected bsModalService: BsModalService\n ) {}\n\n async addEndpoint(deviceId: string): Promise<RemoteAccessConfiguration> {\n const modalResult = await this.openSSHEndpointModal({});\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.addConfiguration(deviceId, modalResult);\n }\n\n removeEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<void> {\n return this.remoteAccess.deleteConfiguration(deviceId, currentEndpointConfig.id);\n }\n\n async editEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<RemoteAccessConfiguration> {\n const modalResult = await this.openSSHEndpointModal(currentEndpointConfig);\n if (!modalResult) {\n return modalResult;\n }\n\n return this.remoteAccess.updateConfiguration(deviceId, modalResult);\n }\n\n async connectEndpointHref(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<string> {\n return `/device/${deviceId}/ssh/${configuration.id}`;\n }\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 22\n };\n }\n\n protected async openSSHEndpointModal(\n currentConfiguration: Partial<RemoteAccessConfiguration>\n ): Promise<RemoteAccessConfiguration | null> {\n const { RemoteAccessSshEndpointModalComponent } = await import(\n '@c8y/ngx-components/remote-access/ssh/remote-access-ssh-endpoint-modal'\n );\n try {\n const modalRef = this.bsModalService.show(RemoteAccessSshEndpointModalComponent, {\n initialState: { currentValue: currentConfiguration }\n });\n return (await modalRef.content.result) as RemoteAccessConfiguration;\n } catch (e) {\n // modal closed\n return null;\n }\n }\n}\n\nexport const remoteAccessSSHProviders = [\n hookRoute({\n loadComponent: () =>\n import('@c8y/ngx-components/remote-access/terminal-viewer').then(\n m => m.TerminalViewerComponent\n ),\n path: 'ssh/:configurationId',\n context: ViewContext.Device,\n tabs: [],\n canActivate: [canActivateRemoteAccess]\n }),\n hookService('remoteAccessProtocolHook', SSHRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAYa,sCAAsC,CAAA;IAMjD,WAAA,CACY,YAAiC,EACjC,cAA8B,EAAA;QAD9B,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,cAAc,GAAd,cAAc;QAP1B,IAAA,CAAA,YAAY,GAAG,KAAK;AACpB,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AAC9B,QAAA,IAAA,CAAA,mBAAmB,GAAG,OAAO,CAAC,sCAAsC,CAAC;QACrE,IAAA,CAAA,YAAY,GAAG,QAAiB;IAK7B;IAEH,MAAM,WAAW,CAAC,QAAgB,EAAA;QAChC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,OAAO,WAAW;QACp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KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtC,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,sCAAsC,cADzB,MAAM,EAAA,CAAA,CAAA;;4FACnB,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBADlD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;AAwE3B,MAAM,wBAAwB,GAAG;AACtC,IAAA,SAAS,CAAC;AACR,QAAA,aAAa,EAAE,MACb,OAAO,mDAAmD,CAAC,CAAC,IAAI,CAC9D,CAAC,IAAI,CAAC,CAAC,uBAAuB,CAC/B;AACH,QAAA,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,QAAA,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,CAAC,uBAAuB;KACtC,CAAC;AACF,IAAA,WAAW,CAAC,0BAA0B,EAAE,sCAAsC;;;AC9FhF;;AAEG;;;;"}
|
|
@@ -25,10 +25,10 @@ class TelnetRemoteAccessProtocolProviderService {
|
|
|
25
25
|
async connectEndpointHref(deviceId, configuration) {
|
|
26
26
|
return `/device/${deviceId}/telnet/${configuration.id}`;
|
|
27
27
|
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
29
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TelnetRemoteAccessProtocolProviderService, deps: [{ token: i1.RemoteAccessService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TelnetRemoteAccessProtocolProviderService, providedIn: 'root' }); }
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TelnetRemoteAccessProtocolProviderService, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{ providedIn: 'root' }]
|
|
34
34
|
}], ctorParameters: () => [{ type: i1.RemoteAccessService }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-remote-access-telnet.mjs","sources":["../../remote-access/telnet/index.ts","../../remote-access/telnet/c8y-ngx-components-remote-access-telnet.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { hookRoute, hookService, ViewContext } from '@c8y/ngx-components';\nimport {\n canActivateRemoteAccess,\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\n\n@Injectable({ providedIn: 'root' })\nexport class TelnetRemoteAccessProtocolProviderService implements RemoteAccessProtocolProvider {\n protocolName = 'TELNET';\n protocolLabel = gettext('Telnet');\n protocolDescription = gettext('Allows to connect to a Telnet service.');\n protocolIcon = 'laptop' as const;\n\n constructor(private remoteAccess: RemoteAccessService) {}\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 23\n };\n }\n\n removeEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<void> {\n return this.remoteAccess.deleteConfiguration(deviceId, currentEndpointConfig.id);\n }\n\n async connectEndpointHref(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<string> {\n return `/device/${deviceId}/telnet/${configuration.id}`;\n }\n}\n\nexport const remoteAccessTelnetProviders = [\n hookRoute({\n loadComponent: () =>\n import('@c8y/ngx-components/remote-access/terminal-viewer').then(\n m => m.TerminalViewerComponent\n ),\n path: 'telnet/:configurationId',\n context: ViewContext.Device,\n tabs: [],\n canActivate: [canActivateRemoteAccess]\n }),\n hookService('remoteAccessProtocolHook', TelnetRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAWa,yCAAyC,CAAA;AAMpD,IAAA,WAAA,CAAoB,YAAiC,EAAA;QAAjC,IAAA,CAAA,YAAY,GAAZ,YAAY;QALhC,IAAA,CAAA,YAAY,GAAG,QAAQ;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;AACjC,QAAA,IAAA,CAAA,mBAAmB,GAAG,OAAO,CAAC,wCAAwC,CAAC;QACvE,IAAA,CAAA,YAAY,GAAG,QAAiB;IAEwB;AAExD,IAAA,MAAM,+BAA+B,GAAA;QACnC,OAAO;AACL,YAAA,QAAQ,EAAE,WAAW;AACrB,YAAA,IAAI,EAAE;SACP;IACH;IAEA,cAAc,CACZ,QAAgB,EAChB,qBAAgD,EAAA;AAEhD,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,EAAE,CAAC;IAClF;AAEA,IAAA,MAAM,mBAAmB,CACvB,QAAgB,EAChB,aAAwC,EAAA;AAExC,QAAA,OAAO,WAAW,QAAQ,CAAA,QAAA,EAAW,aAAa,CAAC,EAAE,EAAE;IACzD
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-remote-access-telnet.mjs","sources":["../../remote-access/telnet/index.ts","../../remote-access/telnet/c8y-ngx-components-remote-access-telnet.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport { hookRoute, hookService, ViewContext } from '@c8y/ngx-components';\nimport {\n canActivateRemoteAccess,\n RemoteAccessConfiguration,\n RemoteAccessProtocolProvider,\n RemoteAccessService\n} from '@c8y/ngx-components/remote-access/data';\n\n@Injectable({ providedIn: 'root' })\nexport class TelnetRemoteAccessProtocolProviderService implements RemoteAccessProtocolProvider {\n protocolName = 'TELNET';\n protocolLabel = gettext('Telnet');\n protocolDescription = gettext('Allows to connect to a Telnet service.');\n protocolIcon = 'laptop' as const;\n\n constructor(private remoteAccess: RemoteAccessService) {}\n\n async getDefaultEndpointConfiguration(): Promise<Partial<RemoteAccessConfiguration>> {\n return {\n hostname: '127.0.0.1',\n port: 23\n };\n }\n\n removeEndpoint(\n deviceId: string,\n currentEndpointConfig: RemoteAccessConfiguration\n ): Promise<void> {\n return this.remoteAccess.deleteConfiguration(deviceId, currentEndpointConfig.id);\n }\n\n async connectEndpointHref(\n deviceId: string,\n configuration: RemoteAccessConfiguration\n ): Promise<string> {\n return `/device/${deviceId}/telnet/${configuration.id}`;\n }\n}\n\nexport const remoteAccessTelnetProviders = [\n hookRoute({\n loadComponent: () =>\n import('@c8y/ngx-components/remote-access/terminal-viewer').then(\n m => m.TerminalViewerComponent\n ),\n path: 'telnet/:configurationId',\n context: ViewContext.Device,\n tabs: [],\n canActivate: [canActivateRemoteAccess]\n }),\n hookService('remoteAccessProtocolHook', TelnetRemoteAccessProtocolProviderService)\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAWa,yCAAyC,CAAA;AAMpD,IAAA,WAAA,CAAoB,YAAiC,EAAA;QAAjC,IAAA,CAAA,YAAY,GAAZ,YAAY;QALhC,IAAA,CAAA,YAAY,GAAG,QAAQ;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;AACjC,QAAA,IAAA,CAAA,mBAAmB,GAAG,OAAO,CAAC,wCAAwC,CAAC;QACvE,IAAA,CAAA,YAAY,GAAG,QAAiB;IAEwB;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+219,10 @@ class TerminalViewerComponent {
|
|
|
219
219
|
this.container.requestFullscreen();
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
223
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TerminalViewerComponent, deps: [{ token: i1.RemoteAccessService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TerminalViewerComponent, isStandalone: true, selector: "c8y-terminal-viewer", ngImport: i0, template: "<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>", dependencies: [{ kind: "component", type: TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
224
224
|
}
|
|
225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TerminalViewerComponent, decorators: [{
|
|
226
226
|
type: Component,
|
|
227
227
|
args: [{ selector: 'c8y-terminal-viewer', encapsulation: ViewEncapsulation.None, standalone: true, imports: [TitleComponent, C8yTranslatePipe, ActionBarItemComponent, IconDirective, NgIf], template: "<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>" }]
|
|
228
228
|
}], ctorParameters: () => [{ type: i1.RemoteAccessService }, { type: i2.ActivatedRoute }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-remote-access-terminal-viewer.mjs","sources":["../../remote-access/terminal-viewer/telnet-negotiator.ts","../../remote-access/terminal-viewer/shell-adapter.ts","../../remote-access/terminal-viewer/terminal-viewer.component.ts","../../remote-access/terminal-viewer/terminal-viewer.component.html","../../remote-access/terminal-viewer/c8y-ngx-components-remote-access-terminal-viewer.ts"],"sourcesContent":["import type { Terminal } from '@xterm/xterm';\n\nexport class TelnetNegotiator {\n constructor(\n private terminal: Terminal,\n private termType: string\n ) {}\n\n setTermType(type) {\n this.termType = type;\n }\n\n pushStr(str, arr) {\n for (let i = 0; i < str.length; i++) {\n arr.push(str.charCodeAt(i));\n }\n }\n\n negotiate(data) {\n const arrUint8 = new Uint8Array(data);\n const arr = [...arrUint8.values()];\n\n const sendQueue = [];\n let stringToDisplay = '';\n let chr: number;\n let code: number;\n let value: number;\n\n while (arr.length > 0) {\n chr = arr.shift();\n switch (chr) {\n case 255: // IAC\n code = arr.shift();\n value = arr.shift();\n switch (code) {\n case 253: // DO\n if (value === 24) {\n // Terminal type\n sendQueue.push(255, 251, value);\n } else if (value === 31) {\n // NAWS (Negotiate About Window Size)\n // client answers WILL NAWS\n sendQueue.push(255, 251, 31);\n // client sends IAC SB NAWS 0 terminalSize.cols 0 terminalSize.rows IAC SE\n sendQueue.push(\n 255,\n 250,\n 31,\n 0,\n this.terminal.cols,\n 0,\n this.terminal.rows,\n 255,\n 240\n );\n } else {\n // Refuse other DO requests with a WONT\n sendQueue.push(255, 252, value);\n }\n break;\n case 251: // WILL\n if (value === 1) {\n // Affirm echo with DO\n sendQueue.push(255, 253, value);\n } else {\n // Reject other WILL offers with a DONT\n sendQueue.push(255, 254, value);\n }\n break;\n case 250: // SB (subnegotiation)\n if (value === 24) {\n // TERM-TYPE subnegotiation\n if (arr[0] === 1 && arr[1] === 255 && arr[2] === 240) {\n arr.shift();\n arr.shift();\n arr.shift();\n sendQueue.push(255, 250, 24, 0);\n this.pushStr(this.termType, sendQueue);\n sendQueue.push(255, 240);\n } else {\n console.warn('Invalid subnegotiation received' + arr);\n }\n } else {\n console.warn('Ignoring SB ' + value);\n }\n break;\n case 254: // DONT\n case 252: // WONT\n default:\n break;\n }\n break;\n case 242: // Data Mark (Synch)\n code = arr.shift();\n value = arr.shift();\n break;\n default: // everything else\n stringToDisplay += String.fromCharCode(chr);\n break;\n }\n }\n\n return {\n dataToSend: sendQueue.length ? new Uint8Array(sendQueue) : '',\n isOutput: !!stringToDisplay.length\n };\n }\n}\n","import { TelnetNegotiator } from './telnet-negotiator';\nimport type { Terminal } from '@xterm/xterm';\n\nexport class ShellAdapter {\n constructor(\n private terminal: Terminal,\n private termType = 'xterm-256color'\n ) {}\n\n filterNonPrintable(str: string) {\n // get rid of �\n const helpArr = str.split('�');\n str = helpArr.join('');\n\n return str;\n }\n\n setTermType(type) {\n this.termType = type;\n }\n\n filterReceiveData(data) {\n // negotiate telnet signals, if any\n const telnet = new TelnetNegotiator(this.terminal, this.termType);\n const telnetData = telnet.negotiate(data);\n\n // decode text for display\n const textDecoder = new TextDecoder();\n const decodedToDisplay = textDecoder.decode(data);\n\n return {\n dataToSend: telnetData.dataToSend,\n dataToDisplay: telnetData.isOutput ? this.filterNonPrintable(decodedToDisplay) : ''\n };\n }\n\n filterSendData(data) {\n const sendQueue = [];\n for (let i = 0; i < data.length; i++) {\n sendQueue.push(data.charCodeAt(i));\n }\n\n return sendQueue.length ? new Uint8Array(sendQueue) : '';\n }\n}\n","import { AfterViewInit, Component, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport {\n ActionBarItemComponent,\n C8yTranslatePipe,\n IconDirective,\n TitleComponent\n} from '@c8y/ngx-components';\nimport { Terminal } from '@xterm/xterm';\nimport { FitAddon } from '@xterm/addon-fit';\nimport { ShellAdapter } from './shell-adapter';\nimport { RemoteAccessService } from '@c8y/ngx-components/remote-access/data';\nimport { ActivatedRoute } from '@angular/router';\n// workaround as we were unable to import this in component styles\nimport '@xterm/xterm/css/xterm.css';\nimport { NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-terminal-viewer',\n templateUrl: './terminal-viewer.component.html',\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [TitleComponent, C8yTranslatePipe, ActionBarItemComponent, IconDirective, NgIf]\n})\nexport class TerminalViewerComponent implements AfterViewInit, OnDestroy {\n title = '';\n container: HTMLElement | null = null;\n terminal: Terminal | null = null;\n socket: WebSocket | null = null;\n firstDeviceMessageReceived = false;\n readonly configurationId: string;\n readonly deviceId: string;\n protected observer: ResizeObserver;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute\n ) {\n this.configurationId = this.activatedRoute.snapshot.params.configurationId;\n this.deviceId = this.activatedRoute.parent.snapshot.params.id;\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n const stringToSend = 'exit\\n';\n const sendQueue = [];\n for (let i = 0; i < stringToSend.length; i++) {\n sendQueue.push(stringToSend.charCodeAt(i));\n }\n this.socket?.send(new Uint8Array(sendQueue));\n this.socket?.close();\n }\n\n ngAfterViewInit(): void {\n this.container = document.getElementById('terminal-screen');\n this.terminal = new Terminal({\n fontSize: 18,\n fontFamily: 'consolas, monospace',\n cursorBlink: true\n });\n const fitAddon = new FitAddon();\n this.socket = new WebSocket(\n this.remoteAccess.getWebSocketUri(this.deviceId, this.configurationId),\n 'binary'\n );\n this.socket.binaryType = 'arraybuffer';\n this.terminal.loadAddon(fitAddon);\n this.terminal.open(this.container);\n fitAddon.fit();\n const shellAdapter = new ShellAdapter(this.terminal);\n this.observer = new ResizeObserver(() => {\n fitAddon.fit();\n });\n this.observer.observe(this.container);\n\n this.terminal.writeln('\\u001b[92mEstablishing Websocket connection... \\u001b[39m \\r\\n');\n this.terminal.focus();\n this.socket.onopen = () => {\n this.terminal.writeln(\n '\\u001b[92mWebsocket connection was established successfully, waiting for device... \\u001b[39m \\r\\n'\n );\n };\n\n this.socket.onclose = () => {\n this.terminal.writeln('');\n this.terminal.writeln('\\r\\n\\u001b[91mDevice disconnected. \\u001b[39m \\r\\n');\n this.terminal.writeln('\\r\\n\\u001b[91mWebsocket connection was closed. \\u001b[39m \\r\\n');\n };\n\n this.socket.onmessage = message => {\n if (!this.firstDeviceMessageReceived) {\n this.firstDeviceMessageReceived = true;\n this.terminal.writeln(\n '\\u001b[92mDevice connection was established successfully. \\u001b[39m \\r\\n'\n );\n }\n const filteredData = shellAdapter.filterReceiveData(message.data);\n if (filteredData.dataToSend.length) {\n this.socket.send(filteredData.dataToSend);\n }\n if (filteredData.dataToDisplay.length) {\n this.terminal.write(filteredData.dataToDisplay);\n }\n };\n\n this.terminal.onData(data => {\n if (this.firstDeviceMessageReceived) {\n const encodedToSend = shellAdapter.filterSendData(data);\n\n if (encodedToSend.length) {\n this.socket.send(encodedToSend);\n }\n }\n });\n }\n\n toggleFullscreen() {\n if (document.fullscreenElement) {\n document.exitFullscreen();\n } else {\n this.container.requestFullscreen();\n }\n }\n}\n","<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAEa,gBAAgB,CAAA;IAC3B,WAAA,CACU,QAAkB,EAClB,QAAgB,EAAA;QADhB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,QAAQ,GAAR,QAAQ;IACf;AAEH,IAAA,WAAW,CAAC,IAAI,EAAA;AACd,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;IACtB;IAEA,OAAO,CAAC,GAAG,EAAE,GAAG,EAAA;AACd,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC7B;IACF;AAEA,IAAA,SAAS,CAAC,IAAI,EAAA;AACZ,QAAA,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC;QACrC,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QAElC,MAAM,SAAS,GAAG,EAAE;QACpB,IAAI,eAAe,GAAG,EAAE;AACxB,QAAA,IAAI,GAAW;AACf,QAAA,IAAI,IAAY;AAChB,QAAA,IAAI,KAAa;AAEjB,QAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;AACrB,YAAA,GAAG,GAAG,GAAG,CAAC,KAAK,EAAE;YACjB,QAAQ,GAAG;gBACT,KAAK,GAAG;AACN,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AAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAA7D,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAE/B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,iBAEhB,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,IAAI,CAAC,EAAA,QAAA,EAAA,mdAAA,EAAA;;;AErB1F;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-remote-access-terminal-viewer.mjs","sources":["../../remote-access/terminal-viewer/telnet-negotiator.ts","../../remote-access/terminal-viewer/shell-adapter.ts","../../remote-access/terminal-viewer/terminal-viewer.component.ts","../../remote-access/terminal-viewer/terminal-viewer.component.html","../../remote-access/terminal-viewer/c8y-ngx-components-remote-access-terminal-viewer.ts"],"sourcesContent":["import type { Terminal } from '@xterm/xterm';\n\nexport class TelnetNegotiator {\n constructor(\n private terminal: Terminal,\n private termType: string\n ) {}\n\n setTermType(type) {\n this.termType = type;\n }\n\n pushStr(str, arr) {\n for (let i = 0; i < str.length; i++) {\n arr.push(str.charCodeAt(i));\n }\n }\n\n negotiate(data) {\n const arrUint8 = new Uint8Array(data);\n const arr = [...arrUint8.values()];\n\n const sendQueue = [];\n let stringToDisplay = '';\n let chr: number;\n let code: number;\n let value: number;\n\n while (arr.length > 0) {\n chr = arr.shift();\n switch (chr) {\n case 255: // IAC\n code = arr.shift();\n value = arr.shift();\n switch (code) {\n case 253: // DO\n if (value === 24) {\n // Terminal type\n sendQueue.push(255, 251, value);\n } else if (value === 31) {\n // NAWS (Negotiate About Window Size)\n // client answers WILL NAWS\n sendQueue.push(255, 251, 31);\n // client sends IAC SB NAWS 0 terminalSize.cols 0 terminalSize.rows IAC SE\n sendQueue.push(\n 255,\n 250,\n 31,\n 0,\n this.terminal.cols,\n 0,\n this.terminal.rows,\n 255,\n 240\n );\n } else {\n // Refuse other DO requests with a WONT\n sendQueue.push(255, 252, value);\n }\n break;\n case 251: // WILL\n if (value === 1) {\n // Affirm echo with DO\n sendQueue.push(255, 253, value);\n } else {\n // Reject other WILL offers with a DONT\n sendQueue.push(255, 254, value);\n }\n break;\n case 250: // SB (subnegotiation)\n if (value === 24) {\n // TERM-TYPE subnegotiation\n if (arr[0] === 1 && arr[1] === 255 && arr[2] === 240) {\n arr.shift();\n arr.shift();\n arr.shift();\n sendQueue.push(255, 250, 24, 0);\n this.pushStr(this.termType, sendQueue);\n sendQueue.push(255, 240);\n } else {\n console.warn('Invalid subnegotiation received' + arr);\n }\n } else {\n console.warn('Ignoring SB ' + value);\n }\n break;\n case 254: // DONT\n case 252: // WONT\n default:\n break;\n }\n break;\n case 242: // Data Mark (Synch)\n code = arr.shift();\n value = arr.shift();\n break;\n default: // everything else\n stringToDisplay += String.fromCharCode(chr);\n break;\n }\n }\n\n return {\n dataToSend: sendQueue.length ? new Uint8Array(sendQueue) : '',\n isOutput: !!stringToDisplay.length\n };\n }\n}\n","import { TelnetNegotiator } from './telnet-negotiator';\nimport type { Terminal } from '@xterm/xterm';\n\nexport class ShellAdapter {\n constructor(\n private terminal: Terminal,\n private termType = 'xterm-256color'\n ) {}\n\n filterNonPrintable(str: string) {\n // get rid of �\n const helpArr = str.split('�');\n str = helpArr.join('');\n\n return str;\n }\n\n setTermType(type) {\n this.termType = type;\n }\n\n filterReceiveData(data) {\n // negotiate telnet signals, if any\n const telnet = new TelnetNegotiator(this.terminal, this.termType);\n const telnetData = telnet.negotiate(data);\n\n // decode text for display\n const textDecoder = new TextDecoder();\n const decodedToDisplay = textDecoder.decode(data);\n\n return {\n dataToSend: telnetData.dataToSend,\n dataToDisplay: telnetData.isOutput ? this.filterNonPrintable(decodedToDisplay) : ''\n };\n }\n\n filterSendData(data) {\n const sendQueue = [];\n for (let i = 0; i < data.length; i++) {\n sendQueue.push(data.charCodeAt(i));\n }\n\n return sendQueue.length ? new Uint8Array(sendQueue) : '';\n }\n}\n","import { AfterViewInit, Component, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport {\n ActionBarItemComponent,\n C8yTranslatePipe,\n IconDirective,\n TitleComponent\n} from '@c8y/ngx-components';\nimport { Terminal } from '@xterm/xterm';\nimport { FitAddon } from '@xterm/addon-fit';\nimport { ShellAdapter } from './shell-adapter';\nimport { RemoteAccessService } from '@c8y/ngx-components/remote-access/data';\nimport { ActivatedRoute } from '@angular/router';\n// workaround as we were unable to import this in component styles\nimport '@xterm/xterm/css/xterm.css';\nimport { NgIf } from '@angular/common';\n\n@Component({\n selector: 'c8y-terminal-viewer',\n templateUrl: './terminal-viewer.component.html',\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [TitleComponent, C8yTranslatePipe, ActionBarItemComponent, IconDirective, NgIf]\n})\nexport class TerminalViewerComponent implements AfterViewInit, OnDestroy {\n title = '';\n container: HTMLElement | null = null;\n terminal: Terminal | null = null;\n socket: WebSocket | null = null;\n firstDeviceMessageReceived = false;\n readonly configurationId: string;\n readonly deviceId: string;\n protected observer: ResizeObserver;\n\n constructor(\n private remoteAccess: RemoteAccessService,\n private activatedRoute: ActivatedRoute\n ) {\n this.configurationId = this.activatedRoute.snapshot.params.configurationId;\n this.deviceId = this.activatedRoute.parent.snapshot.params.id;\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n const stringToSend = 'exit\\n';\n const sendQueue = [];\n for (let i = 0; i < stringToSend.length; i++) {\n sendQueue.push(stringToSend.charCodeAt(i));\n }\n this.socket?.send(new Uint8Array(sendQueue));\n this.socket?.close();\n }\n\n ngAfterViewInit(): void {\n this.container = document.getElementById('terminal-screen');\n this.terminal = new Terminal({\n fontSize: 18,\n fontFamily: 'consolas, monospace',\n cursorBlink: true\n });\n const fitAddon = new FitAddon();\n this.socket = new WebSocket(\n this.remoteAccess.getWebSocketUri(this.deviceId, this.configurationId),\n 'binary'\n );\n this.socket.binaryType = 'arraybuffer';\n this.terminal.loadAddon(fitAddon);\n this.terminal.open(this.container);\n fitAddon.fit();\n const shellAdapter = new ShellAdapter(this.terminal);\n this.observer = new ResizeObserver(() => {\n fitAddon.fit();\n });\n this.observer.observe(this.container);\n\n this.terminal.writeln('\\u001b[92mEstablishing Websocket connection... \\u001b[39m \\r\\n');\n this.terminal.focus();\n this.socket.onopen = () => {\n this.terminal.writeln(\n '\\u001b[92mWebsocket connection was established successfully, waiting for device... \\u001b[39m \\r\\n'\n );\n };\n\n this.socket.onclose = () => {\n this.terminal.writeln('');\n this.terminal.writeln('\\r\\n\\u001b[91mDevice disconnected. \\u001b[39m \\r\\n');\n this.terminal.writeln('\\r\\n\\u001b[91mWebsocket connection was closed. \\u001b[39m \\r\\n');\n };\n\n this.socket.onmessage = message => {\n if (!this.firstDeviceMessageReceived) {\n this.firstDeviceMessageReceived = true;\n this.terminal.writeln(\n '\\u001b[92mDevice connection was established successfully. \\u001b[39m \\r\\n'\n );\n }\n const filteredData = shellAdapter.filterReceiveData(message.data);\n if (filteredData.dataToSend.length) {\n this.socket.send(filteredData.dataToSend);\n }\n if (filteredData.dataToDisplay.length) {\n this.terminal.write(filteredData.dataToDisplay);\n }\n };\n\n this.terminal.onData(data => {\n if (this.firstDeviceMessageReceived) {\n const encodedToSend = shellAdapter.filterSendData(data);\n\n if (encodedToSend.length) {\n this.socket.send(encodedToSend);\n }\n }\n });\n }\n\n toggleFullscreen() {\n if (document.fullscreenElement) {\n document.exitFullscreen();\n } else {\n this.container.requestFullscreen();\n }\n }\n}\n","<c8y-title>Terminal Viewer: {{ title | translate }}</c8y-title>\n\n<c8y-action-bar-item [placement]=\"'right'\" *ngIf=\"firstDeviceMessageReceived\">\n <button\n class=\"btn btn-link\"\n (click)=\"toggleFullscreen()\"\n >\n <i [c8yIcon]=\"'expand'\"></i>\n <span translate>Fullscreen</span>\n </button>\n </c8y-action-bar-item>\n\n<div class=\"content-fullpage\" >\n <div id=\"terminal-screen\" class=\"inner-scroll\"></div>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAEa,gBAAgB,CAAA;IAC3B,WAAA,CACU,QAAkB,EAClB,QAAgB,EAAA;QADhB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,QAAQ,GAAR,QAAQ;IACf;AAEH,IAAA,WAAW,CAAC,IAAI,EAAA;AACd,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;IACtB;IAEA,OAAO,CAAC,GAAG,EAAE,GAAG,EAAA;AACd,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC7B;IACF;AAEA,IAAA,SAAS,CAAC,IAAI,EAAA;AACZ,QAAA,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC;QACrC,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QAElC,MAAM,SAAS,GAAG,EAAE;QACpB,IAAI,eAAe,GAAG,EAAE;AACxB,QAAA,IAAI,GAAW;AACf,QAAA,IAAI,IAAY;AAChB,QAAA,IAAI,KAAa;AAEjB,QAAA,OAAO,GAAG,CAAC,MAAM,GAAG,CA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,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAA7D,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAE/B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,iBAEhB,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,IAAI,CAAC,EAAA,QAAA,EAAA,mdAAA,EAAA;;;AErB1F;;AAEG;;;;"}
|
|
@@ -50,10 +50,10 @@ class RemoteAccessVncEndpointModalComponent {
|
|
|
50
50
|
save() {
|
|
51
51
|
this._resolve(this.form.value);
|
|
52
52
|
}
|
|
53
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
54
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RemoteAccessVncEndpointModalComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: RemoteAccessVncEndpointModalComponent, isStandalone: true, selector: "c8y-remote-access-vnc-endpoint-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
55
55
|
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RemoteAccessVncEndpointModalComponent, decorators: [{
|
|
57
57
|
type: Component,
|
|
58
58
|
args: [{ selector: 'c8y-remote-access-vnc-endpoint-modal', standalone: true, imports: [CoreModule, NgForOf], template: "<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n" }]
|
|
59
59
|
}], ctorParameters: () => [{ type: i1.FormBuilder }] });
|
package/fesm2022/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs","sources":["../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.ts","../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.html","../../remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.ts"],"sourcesContent":["import { NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-vnc-endpoint-modal',\n templateUrl: './remote-access-vnc-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf]\n})\nexport class RemoteAccessVncEndpointModalComponent implements OnInit {\n credentialTypes = [CREDENTIALS_TYPES.NONE, CREDENTIALS_TYPES.PASS_ONLY];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private formBuilder: FormBuilder) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || 'NONE';\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password } = credentials;\n Object.assign(attributesToAdd, { username, password });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [5900, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['VNC', [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</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A,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAET,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBANjD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,cAEpC,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,s8GAAA,EAAA;;;AEdhC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.mjs","sources":["../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.ts","../../remote-access/vnc/remote-access-vnc-endpoint-modal/remote-access-vnc-endpoint-modal.component.html","../../remote-access/vnc/remote-access-vnc-endpoint-modal/c8y-ngx-components-remote-access-vnc-remote-access-vnc-endpoint-modal.ts"],"sourcesContent":["import { NgForOf } from '@angular/common';\nimport { Component, OnInit } from '@angular/core';\nimport { FormBuilder, Validators } from '@angular/forms';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { gettext } from '@c8y/ngx-components/gettext';\nimport {\n CREDENTIALS_TYPES,\n RemoteAccessConfiguration\n} from '@c8y/ngx-components/remote-access/data';\n\n@Component({\n selector: 'c8y-remote-access-vnc-endpoint-modal',\n templateUrl: './remote-access-vnc-endpoint-modal.component.html',\n standalone: true,\n imports: [CoreModule, NgForOf]\n})\nexport class RemoteAccessVncEndpointModalComponent implements OnInit {\n credentialTypes = [CREDENTIALS_TYPES.NONE, CREDENTIALS_TYPES.PASS_ONLY];\n title = gettext('Remote access endpoint');\n form: ReturnType<typeof this.initForm>;\n\n currentValue: Partial<RemoteAccessConfiguration>;\n\n result = new Promise<ReturnType<typeof this.initForm>['value']>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n\n private _resolve: (value: ReturnType<typeof this.initForm>['value']) => void;\n private _reject: (reason?: any) => void;\n\n constructor(private formBuilder: FormBuilder) {\n this.form = this.initForm();\n }\n\n ngOnInit() {\n if (this.currentValue) {\n const { credentials, ...rest } = this.currentValue;\n const credentialsType = credentials?.type || 'NONE';\n const attributesToAdd = { credentialsType };\n if (credentials) {\n const { username, password } = credentials;\n Object.assign(attributesToAdd, { username, password });\n }\n const patchedValue = { ...rest, ...attributesToAdd };\n this.form.patchValue(patchedValue);\n }\n }\n\n initForm() {\n return this.formBuilder.group({\n id: ['', []],\n name: ['', [Validators.required, Validators.minLength(1)]],\n hostname: ['127.0.0.1', [Validators.required, Validators.minLength(1)]],\n port: [5900, [Validators.required, Validators.min(1), Validators.max(65535)]],\n protocol: ['VNC', [Validators.required, Validators.minLength(1)]],\n password: [undefined as string, []],\n credentialsType: ['NONE' as 'NONE' | 'PASS_ONLY', [Validators.required]]\n });\n }\n\n cancel() {\n this._reject();\n }\n\n save() {\n this._resolve(this.form.value);\n }\n}\n","<c8y-modal\n [title]=\"title\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [disabled]=\"form.invalid\"\n [labels]=\"{ cancel: 'Cancel', ok: 'Save' }\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'laptop'\"></span>\n </ng-container>\n <div\n class=\"p-24\"\n [formGroup]=\"form\"\n >\n <c8y-form-group>\n <label\n for=\"name\"\n translate\n >\n Name\n </label>\n <input\n class=\"form-control\"\n id=\"name\"\n name=\"name\"\n type=\"text\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 'My remote access endpoint' }\"\n formControlName=\"name\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--name'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"protocol\"\n translate\n >\n Protocol\n </label>\n <input\n class=\"form-control\"\n id=\"protocol\"\n name=\"protocol\"\n type=\"text\"\n readonly\n formControlName=\"protocol\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"hostname\"\n translate\n >\n Host\n </label>\n <input\n class=\"form-control\"\n id=\"hostname\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '127.0.0.1' } }}\"\n name=\"hostname\"\n type=\"text\"\n formControlName=\"hostname\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--hostname'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <c8y-form-group>\n <label\n for=\"port\"\n translate\n >\n Port\n </label>\n <input\n class=\"form-control\"\n id=\"port\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: '5900' } }}\"\n name=\"port\"\n type=\"number\"\n formControlName=\"port\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--port'\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n\n <div>\n <c8y-form-group>\n <label\n for=\"credentialsType\"\n translate\n >\n Sign-in method\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"credentialsType\"\n formControlName=\"credentialsType\"\n [attr.data-cy]=\"'remoteAccessEndpointModal--credentials-type'\"\n >\n <option\n *ngFor=\"let type of credentialTypes\"\n [value]=\"type.value\"\n >\n {{ type.label | translate }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n\n <c8y-form-group *ngIf=\"form.value.credentialsType === 'PASS_ONLY'\">\n <label\n for=\"password\"\n translate\n >\n Password\n </label>\n <input\n class=\"form-control\"\n id=\"password\"\n placeholder=\"{{'e.g. {{ example }}' | translate : { example: 'my_password' } }}\"\n name=\"password\"\n type=\"password\"\n autocomplete=\"off\"\n formControlName=\"password\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n </div>\n</c8y-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAgBa,qCAAqC,CAAA;AAehD,IAAA,WAAA,CAAoB,WAAwB,EAAA;QAAxB,IA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