From e1e6dc7d05275e859b53d16052b12396db12eb24 Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Thu, 14 Nov 2024 03:38:59 +0500 Subject: [PATCH 01/10] NAS-131557: Replace old `api-service` with new `api-service` --- .../core/guards/translations-loaded.guard.ts | 6 +- .../core/guards/websocket-connection.guard.ts | 16 +- .../core/testing/classes/mock-api.service.ts | 10 +- .../mock-enclosure-api.service.ts | 10 +- .../core/testing/utils/empty-api.service.ts | 2 +- src/app/core/testing/utils/mock-api.utils.ts | 15 +- src/app/core/testing/utils/mock-auth.utils.ts | 6 +- .../components/alert/alert.component.spec.ts | 2 +- .../alerts-panel.component.spec.ts | 2 +- src/app/modules/alerts/store/alert.effects.ts | 2 +- .../export-button.component.spec.ts | 2 +- .../export-button/export-button.component.ts | 2 +- .../error-dialog/error-dialog.component.ts | 2 +- .../job-progress-dialog.component.spec.ts | 2 +- .../job-progress-dialog.component.ts | 2 +- .../error-template.component.ts | 2 +- .../show-logs-dialog.component.spec.ts | 2 +- .../show-logs-dialog.component.ts | 2 +- .../start-service-dialog.component.spec.ts | 2 +- .../start-service-dialog.component.ts | 2 +- .../file-ticket-licensed.component.ts | 2 +- .../file-ticket/file-ticket.component.ts | 2 +- .../services/feedback.service.spec.ts | 2 +- .../feedback/services/feedback.service.ts | 2 +- .../unused-disk-select.component.spec.ts | 2 +- .../unused-disk-select.component.ts | 2 +- .../create-dataset-dialog.component.spec.ts | 2 +- .../create-dataset-dialog.component.ts | 2 +- .../api-data-provider/api-data-provider.ts | 2 +- .../jobs-panel/jobs-panel.component.spec.ts | 2 +- src/app/modules/jobs/store/job.effects.ts | 2 +- .../console-messages.store.spec.ts | 2 +- .../console-footer/console-messages.store.ts | 2 +- .../about-dialog.component.spec.ts | 2 +- .../change-password-dialog.component.spec.ts | 2 +- .../change-password-dialog.component.ts | 2 +- ...ctory-services-indicator.component.spec.ts | 2 +- .../directory-services-indicator.component.ts | 2 +- ...rectory-services-monitor.component.spec.ts | 2 +- .../directory-services-monitor.component.ts | 2 +- .../resilver-progress.component.ts | 2 +- .../resilvering-indicator.component.spec.ts | 2 +- .../resilvering-indicator.component.ts | 2 +- .../user-menu/user-menu.component.spec.ts | 2 - .../components/terminal/terminal.component.ts | 2 +- ...ruecommand-connect-modal.component.spec.ts | 2 +- .../truecommand-connect-modal.component.ts | 2 +- .../truecommand-button.component.ts | 2 +- .../app-details-header.component.ts | 2 +- .../app-resources-card.component.spec.ts | 2 +- .../app-resources-card.component.ts | 2 +- .../app-wizard/app-wizard.component.spec.ts | 2 +- .../app-wizard/app-wizard.component.ts | 2 +- .../available-apps-header.component.spec.ts | 2 +- .../available-apps-header.component.ts | 2 +- .../apps-settings.component.spec.ts | 2 +- .../apps-settings.component.ts | 2 +- .../custom-app-form.component.spec.ts | 2 +- .../custom-app-form.component.ts | 2 +- ...cker-image-delete-dialog.component.spec.ts | 2 +- .../docker-image-delete-dialog.component.ts | 2 +- .../docker-images-list.component.spec.ts | 2 +- .../docker-images-list.component.ts | 2 +- .../pull-image-form.component.spec.ts | 2 +- .../pull-image-form.component.ts | 2 +- .../app-bulk-upgrade.component.spec.ts | 2 +- .../app-bulk-upgrade.component.ts | 2 +- .../app-info-card.component.spec.ts | 2 +- .../app-info-card/app-info-card.component.ts | 2 +- .../app-rollback-modal.component.spec.ts | 2 +- .../app-rollback-modal.component.ts | 2 +- .../container-logs.component.spec.ts | 2 +- .../container-logs.component.ts | 2 +- .../installed-apps.component.spec.ts | 2 +- .../installed-apps.component.ts | 2 +- .../services/applications.service.spec.ts | 2 +- .../apps/services/applications.service.ts | 2 +- .../apps/store/apps-stats.service.spec.ts | 2 +- .../pages/apps/store/apps-stats.service.ts | 2 +- src/app/pages/apps/store/docker.store.spec.ts | 2 +- src/app/pages/apps/store/docker.store.ts | 2 +- src/app/pages/audit/audit.component.spec.ts | 2 +- src/app/pages/audit/audit.component.ts | 2 +- .../audit/utils/audit-api-data-provider.ts | 2 +- .../cloud-credentials-card.component.spec.ts | 2 +- .../cloud-credentials-card.component.ts | 2 +- .../cloud-credentials-form.component.spec.ts | 2 +- .../cloud-credentials-form.component.ts | 2 +- .../sftp-provider-form.component.spec.ts | 2 +- .../sftp-provider-form.component.ts | 2 +- .../ssh-connection-card.component.spec.ts | 2 +- .../ssh-connection-card.component.ts | 2 +- .../ssh-connection-form.component.spec.ts | 2 +- .../ssh-connection-form.component.ts | 2 +- .../ssh-keypair-card.component.spec.ts | 2 +- .../ssh-keypair-card.component.ts | 2 +- .../ssh-keypair-form.component.spec.ts | 2 +- .../ssh-keypair-form.component.ts | 2 +- ...e-dns-authenticator-list.component.spec.ts | 2 +- .../acme-dns-authenticator-list.component.ts | 2 +- .../certificate-acme-add.component.spec.ts | 2 +- .../certificate-acme-add.component.ts | 2 +- ...ertificate-authority-add.component.spec.ts | 2 +- .../certificate-authority-add.component.ts | 2 +- .../ca-identifier-and-type.component.ts | 2 +- ...rtificate-authority-edit.component.spec.ts | 2 +- .../certificate-authority-edit.component.ts | 2 +- .../certificate-authority-list.component.ts | 2 +- .../certificate-edit.component.spec.ts | 2 +- .../certificate-edit.component.ts | 2 +- .../certificate-list.component.spec.ts | 2 +- .../certificate-list.component.ts | 2 +- .../csr-add/csr-add.component.spec.ts | 2 +- .../csr-add/csr-add.component.ts | 2 +- .../csr-identifier-and-type.component.ts | 2 +- .../csr-list/csr-list.component.spec.ts | 2 +- .../csr-list/csr-list.component.ts | 2 +- .../acmedns-form.component.spec.ts | 2 +- .../acmedns-form/acmedns-form.component.ts | 2 +- .../certificate-add.component.spec.ts | 2 +- .../certificate-add.component.ts | 2 +- ...rtificate-identifier-and-type.component.ts | 2 +- .../certificate-import.component.ts | 2 +- .../certificate-constraints.component.ts | 2 +- .../certificate-options.component.ts | 2 +- .../sign-csr-dialog.component.spec.ts | 2 +- .../sign-csr-dialog.component.ts | 2 +- .../delete-group-dialog.component.spec.ts | 2 +- .../delete-group-dialog.component.ts | 2 +- .../group-form/group-form.component.spec.ts | 2 +- .../groups/group-form/group-form.component.ts | 2 +- .../group-list/group-list.component.spec.ts | 2 +- .../group-members.component.spec.ts | 2 +- .../group-members/group-members.component.ts | 2 +- .../privilege-form.component.spec.ts | 2 +- .../privilege-form.component.ts | 2 +- .../privilege-list.component.spec.ts | 2 +- .../privilege-list.component.ts | 2 +- .../credentials/groups/store/group.effects.ts | 2 +- .../credentials/kmip/kmip.component.spec.ts | 2 +- .../pages/credentials/kmip/kmip.component.ts | 2 +- .../credentials/users/store/user.effects.ts | 2 +- .../api-key-form-dialog.component.spec.ts | 2 +- .../api-key-form-dialog.component.ts | 2 +- .../user-api-keys.component.spec.ts | 2 +- .../user-api-keys/user-api-keys.component.ts | 2 +- .../delete-user-dialog.component.spec.ts | 2 +- .../delete-user-dialog.component.ts | 2 +- .../user-form/user-form.component.spec.ts | 2 +- .../users/user-form/user-form.component.ts | 2 +- .../user-list/user-list.component.spec.ts | 2 +- .../services/dashboard.store.spec.ts | 2 +- .../dashboard/services/dashboard.store.ts | 2 +- .../services/widget-resources.service.ts | 2 +- .../cloud-backup-card.component.spec.ts | 2 +- .../cloud-backup-card.component.ts | 2 +- ...store-from-snapshot-form.component.spec.ts | 2 +- ...up-restore-from-snapshot-form.component.ts | 2 +- .../cloud-backup-snapshots.component.spec.ts | 2 +- .../cloud-backup-snapshots.component.ts | 2 +- .../cloud-backup-form.component.spec.ts | 2 +- .../cloud-backup-form.component.ts | 2 +- .../cloud-backup-list.component.spec.ts | 2 +- .../cloud-backup-list.component.ts | 2 +- .../cloudsync-form.component.spec.ts | 2 +- .../cloudsync-form.component.ts | 2 +- .../cloudsync-list.component.spec.ts | 2 +- .../cloudsync-list.component.ts | 2 +- ...cloudsync-restore-dialog.component.spec.ts | 2 +- .../cloudsync-restore-dialog.component.ts | 2 +- .../cloudsync-task-card.component.spec.ts | 2 +- .../cloudsync-task-card.component.ts | 2 +- .../cloudsync-wizard.component.spec.ts | 2 +- .../cloudsync-wizard.component.ts | 2 +- .../cloudsync-provider.component.spec.ts | 2 +- .../cloudsync-provider.component.ts | 2 +- .../cloudsync-what-and-when.component.ts | 2 +- ...eate-storj-bucket-dialog.component.spec.ts | 2 +- .../create-storj-bucket-dialog.component.ts | 2 +- .../replication-form.component.spec.ts | 2 +- .../replication-form.component.ts | 2 +- .../source-section.component.ts | 2 +- .../replication-list.component.spec.ts | 2 +- .../replication-list.component.ts | 2 +- ...plication-restore-dialog.component.spec.ts | 2 +- .../replication-restore-dialog.component.ts | 2 +- .../replication-task-card.component.spec.ts | 2 +- .../replication-task-card.component.ts | 2 +- .../replication-wizard.component.spec.ts | 2 +- .../replication-wizard.component.ts | 2 +- .../replication-what-and-where.component.ts | 2 +- .../rsync-task-card.component.spec.ts | 2 +- .../rsync-task-card.component.ts | 2 +- .../rsync-task-form.component.spec.ts | 2 +- .../rsync-task-form.component.ts | 2 +- .../rsync-task-list.component.spec.ts | 2 +- .../rsync-task-list.component.ts | 2 +- .../resilver-config.component.spec.ts | 2 +- .../resilver-config.component.ts | 2 +- .../scrub-list/scrub-list.component.spec.ts | 2 +- .../scrub-list/scrub-list.component.ts | 2 +- .../scrub-task-card.component.spec.ts | 2 +- .../scrub-task-card.component.ts | 2 +- .../scrub-task-form.component.spec.ts | 2 +- .../scrub-task-form.component.ts | 2 +- .../smart-task-card.component.spec.ts | 2 +- .../smart-task-card.component.ts | 2 +- .../smart-task-form.component.spec.ts | 2 +- .../smart-task-form.component.ts | 2 +- .../smart-task-list.component.spec.ts | 2 +- .../smart-task-list.component.ts | 2 +- .../snapshot-task-card.component.spec.ts | 2 +- .../snapshot-task-card.component.ts | 2 +- .../snapshot-task-form.component.spec.ts | 2 +- .../snapshot-task-form.component.ts | 2 +- .../snapshot-task-list.component.spec.ts | 2 +- .../snapshot-task-list.component.ts | 2 +- .../vmware-snapshot-form.component.spec.ts | 2 +- .../vmware-snapshot-form.component.ts | 2 +- .../vmware-snapshot-list.component.ts | 2 +- ...aset-capacity-management-card.component.ts | 2 +- ...ataset-capacity-settings.component.spec.ts | 2 +- .../dataset-capacity-settings.component.ts | 2 +- .../dataset-details-card.component.spec.ts | 2 +- .../dataset-details-card.component.ts | 2 +- .../dataset-form.component.spec.ts | 2 +- .../dataset-form/dataset-form.component.ts | 2 +- .../encryption-section.component.ts | 2 +- .../other-options-section.component.ts | 2 +- .../utils/dataset-form.service.spec.ts | 2 +- .../utils/dataset-form.service.ts | 2 +- .../dataset-management.component.ts | 2 +- .../dataset-quota-add-form.component.spec.ts | 2 +- .../dataset-quota-add-form.component.ts | 2 +- .../dataset-quota-edit-form.component.spec.ts | 2 +- .../dataset-quota-edit-form.component.ts | 2 +- .../dataset-quotas-list.component.spec.ts | 2 +- .../dataset-quotas-list.component.ts | 2 +- .../delete-dataset-dialog.component.spec.ts | 2 +- .../delete-dataset-dialog.component.ts | 2 +- .../zvol-form/zvol-form.component.spec.ts | 2 +- .../zvol-form/zvol-form.component.ts | 2 +- .../dataset-unlock.component.spec.ts | 2 +- .../dataset-unlock.component.ts | 2 +- ...ncryption-options-dialog.component.spec.ts | 2 +- .../encryption-options-dialog.component.ts | 2 +- .../export-all-keys-dialog.component.spec.ts | 2 +- .../export-all-keys-dialog.component.ts | 2 +- ...xport-dataset-key-dialog.component.spec.ts | 2 +- .../export-dataset-key-dialog.component.ts | 2 +- .../lock-dataset-dialog.component.spec.ts | 2 +- .../lock-dataset-dialog.component.ts | 2 +- .../save-as-preset-modal.component.spec.ts | 2 +- .../save-as-preset-modal.component.ts | 2 +- .../select-preset-modal.component.spec.ts | 2 +- .../select-preset-modal.component.ts | 2 +- .../strip-acl-modal.component.spec.ts | 2 +- .../strip-acl-modal.component.ts | 2 +- ...acl-editor-save-controls.component.spec.ts | 2 +- .../acl-editor-save-controls.component.ts | 2 +- ...aset-trivial-permissions.component.spec.ts | 2 +- .../dataset-trivial-permissions.component.ts | 2 +- .../permissions-card.component.spec.ts | 2 +- .../stores/dataset-acl-editor.store.ts | 2 +- .../stores/permissions-card.store.ts | 2 +- .../snapshot-add-form.component.ts | 2 +- ...shot-batch-delete-dialog.component.spec.ts | 2 +- .../snapshot-batch-delete-dialog.component.ts | 2 +- .../snapshot-clone-dialog.component.spec.ts | 2 +- .../snapshot-clone-dialog.component.ts | 2 +- .../snapshot-details-row.component.spec.ts | 2 +- .../snapshot-details-row.component.ts | 2 +- ...snapshot-rollback-dialog.component.spec.ts | 2 +- .../snapshot-rollback-dialog.component.ts | 2 +- .../snapshots/store/snapshot.effects.ts | 2 +- .../store/dataset-store.service.spec.ts | 2 +- .../datasets/store/dataset-store.service.ts | 2 +- .../active-directory.component.spec.ts | 2 +- .../active-directory.component.ts | 2 +- .../idmap-form/idmap-form.component.spec.ts | 2 +- .../idmap-form/idmap-form.component.ts | 2 +- .../idmap-list/idmap-list.component.spec.ts | 2 +- .../idmap-list/idmap-list.component.ts | 2 +- .../kerberos-keytabs-form.component.ts | 2 +- .../kerberos-keytabs-list.component.ts | 2 +- .../kerberos-realms-form.component.spec.ts | 2 +- .../kerberos-realms-form.component.ts | 2 +- .../kerberos-realms-list.component.ts | 2 +- .../kerberos-settings.component.spec.ts | 2 +- .../kerberos-settings.component.ts | 2 +- .../components/ldap/ldap.component.spec.ts | 2 +- .../components/ldap/ldap.component.ts | 2 +- .../leave-domain-dialog.component.spec.ts | 2 +- .../leave-domain-dialog.component.ts | 2 +- .../directory-services.component.ts | 2 +- .../configuration.component.spec.ts | 2 +- .../configuration/configuration.component.ts | 2 +- .../default-gateway-dialog.component.spec.ts | 2 +- .../default-gateway-dialog.component.ts | 2 +- .../interface-form.component.spec.ts | 2 +- .../interface-form.component.ts | 2 +- .../interfaces-card.component.spec.ts | 2 +- .../interfaces-card.component.ts | 2 +- .../ipmi-card/ipmi-card.component.ts | 2 +- .../ipmi-events-dialog.component.spec.ts | 2 +- .../ipmi-events-dialog.component.ts | 2 +- .../ipmi-form/ipmi-form.component.spec.ts | 2 +- .../ipmi-form/ipmi-form.component.ts | 2 +- ...twork-configuration-card.component.spec.ts | 2 +- .../network-configuration-card.component.ts | 2 +- .../static-route-delete-dialog.component.ts | 2 +- .../static-route-form.component.spec.ts | 2 +- .../static-route-form.component.ts | 2 +- .../static-routes-card.component.ts | 2 +- src/app/pages/network/network.component.ts | 2 +- .../pages/network/stores/interfaces.store.ts | 2 +- ...reporting-exporters-form.component.spec.ts | 2 +- .../reporting-exporters-form.component.ts | 2 +- ...reporting-exporters-list.component.spec.ts | 2 +- .../reporting-exporters-list.component.ts | 2 +- .../netdata-dialog.component.spec.ts | 2 +- .../netdata-dialog.component.ts | 2 +- .../reports-dashboard/reports.service.ts | 2 +- .../service-ftp/service-ftp.component.spec.ts | 2 +- .../service-ftp/service-ftp.component.ts | 2 +- .../add-spn-dialog.component.spec.ts | 2 +- .../add-spn-dialog.component.ts | 2 +- .../service-nfs/service-nfs.component.spec.ts | 2 +- .../service-nfs/service-nfs.component.ts | 2 +- .../service-smart.component.spec.ts | 2 +- .../service-smart/service-smart.component.ts | 2 +- .../service-smb/service-smb.component.spec.ts | 2 +- .../service-smb/service-smb.component.ts | 2 +- .../service-snmp.component.spec.ts | 2 +- .../service-snmp/service-snmp.component.ts | 2 +- .../service-ssh/service-ssh.component.spec.ts | 2 +- .../service-ssh/service-ssh.component.ts | 2 +- .../service-state-column.component.spec.ts | 2 +- .../service-state-column.component.ts | 2 +- .../service-ups/service-ups.component.spec.ts | 2 +- .../service-ups/service-ups.component.ts | 2 +- .../pages/services/services.component.spec.ts | 2 +- src/app/pages/services/services.component.ts | 2 +- .../iscsi-card/iscsi-card.component.ts | 2 +- .../nfs-card/nfs-card.component.spec.ts | 2 +- .../nfs-card/nfs-card.component.ts | 2 +- .../service-extra-actions.component.ts | 2 +- .../smb-card/smb-card.component.spec.ts | 2 +- .../smb-card/smb-card.component.ts | 2 +- .../associated-target-form.component.spec.ts | 2 +- .../associated-target-form.component.ts | 2 +- .../associated-target-list.component.spec.ts | 2 +- .../associated-target-list.component.ts | 2 +- .../authorized-access-form.component.spec.ts | 2 +- .../authorized-access-form.component.ts | 2 +- .../authorized-access-list.component.spec.ts | 2 +- .../authorized-access-list.component.ts | 2 +- .../extent-form/extent-form.component.spec.ts | 2 +- .../extent-form/extent-form.component.ts | 2 +- .../delete-extent-dialog.component.spec.ts | 2 +- .../delete-extent-dialog.component.ts | 2 +- .../initiator-form.component.spec.ts | 2 +- .../initiator-form.component.ts | 2 +- .../initiator-list.component.spec.ts | 2 +- .../initiator-list.component.ts | 2 +- .../iscsi-wizard.component.spec.ts | 2 +- .../iscsi-wizard/iscsi-wizard.component.ts | 2 +- .../portal-form/portal-form.component.spec.ts | 2 +- .../portal-form/portal-form.component.ts | 2 +- .../portal-list/portal-list.component.spec.ts | 2 +- .../portal-list/portal-list.component.ts | 2 +- ...get-global-configuration.component.spec.ts | 2 +- .../target-global-configuration.component.ts | 2 +- .../target-form/target-form.component.spec.ts | 2 +- .../target-form/target-form.component.ts | 2 +- .../target-list/target-list.component.spec.ts | 2 +- .../target-list/target-list.component.ts | 2 +- .../target/target-name-validation.service.ts | 2 +- .../nfs/nfs-form/nfs-form.component.spec.ts | 2 +- .../nfs/nfs-form/nfs-form.component.ts | 2 +- .../nfs/nfs-list/nfs-list.component.spec.ts | 2 +- .../nfs/nfs-list/nfs-list.component.ts | 2 +- .../nfs-session-list.component.ts | 2 +- .../smb/smb-acl/smb-acl.component.spec.ts | 2 +- .../sharing/smb/smb-acl/smb-acl.component.ts | 2 +- .../smb/smb-form/smb-form.component.spec.ts | 2 +- .../smb/smb-form/smb-form.component.ts | 2 +- .../smb/smb-form/smb-validator.service.ts | 2 +- .../smb/smb-list/smb-list.component.spec.ts | 2 +- .../smb/smb-list/smb-list.component.ts | 2 +- .../smb-lock-list/smb-lock-list.component.ts | 2 +- .../smb-notification-list.component.ts | 2 +- .../smb-session-list.component.ts | 2 +- .../smb-share-list.component.ts | 2 +- .../set-admin-password-form.component.spec.ts | 2 +- .../set-admin-password-form.component.ts | 2 +- .../signin-form/signin-form.component.ts | 2 +- src/app/pages/signin/signin.component.spec.ts | 4 +- src/app/pages/signin/signin.component.ts | 4 +- .../pages/signin/store/signin.store.spec.ts | 8 +- src/app/pages/signin/store/signin.store.ts | 6 +- .../true-command-status.component.spec.ts | 2 +- .../true-command-status.component.ts | 2 +- .../dashboard-pool.component.spec.ts | 2 +- .../dashboard-pool.component.ts | 2 +- .../export-disconnect-modal.component.spec.ts | 2 +- .../export-disconnect-modal.component.ts | 2 +- .../autotrim-dialog.component.spec.ts | 2 +- .../autotrim-dialog.component.ts | 2 +- .../zfs-health-card.component.spec.ts | 2 +- .../zfs-health-card.component.ts | 2 +- .../import-pool/import-pool.component.spec.ts | 2 +- .../import-pool/import-pool.component.ts | 2 +- .../unused-resources.component.ts | 2 +- .../replace-disk-dialog.component.spec.ts | 2 +- .../replace-disk-dialog.component.ts | 2 +- ...hardware-disk-encryption.component.spec.ts | 2 +- .../hardware-disk-encryption.component.ts | 2 +- .../manage-disk-sed-dialog.component.spec.ts | 2 +- .../manage-disk-sed-dialog.component.ts | 2 +- .../smart-info-card.component.spec.ts | 2 +- .../smart-info-card.component.ts | 2 +- .../extend-dialog.component.spec.ts | 2 +- .../extend-dialog/extend-dialog.component.ts | 2 +- .../raidz-extend-dialog.component.spec.ts | 2 +- .../raidz-extend-dialog.component.ts | 2 +- .../zfs-info-card.component.spec.ts | 2 +- .../zfs-info-card/zfs-info-card.component.ts | 2 +- .../modules/devices/devices.component.ts | 2 +- .../stores/devices-store.service.spec.ts | 2 +- .../devices/stores/devices-store.service.ts | 2 +- .../disk-bulk-edit.component.spec.ts | 2 +- .../disk-bulk-edit.component.ts | 2 +- .../disk-form/disk-form.component.spec.ts | 2 +- .../disk-form/disk-form.component.ts | 2 +- .../disk-list/disk-list.component.ts | 2 +- .../disk-wipe-dialog.component.spec.ts | 2 +- .../disk-wipe-dialog.component.ts | 2 +- .../manual-test-dialog.component.spec.ts | 2 +- .../manual-test-dialog.component.ts | 2 +- .../test-progress-row.component.ts | 2 +- .../smart-test-result-list.component.ts | 2 +- .../store/add-vdevs-store.service.ts | 2 +- .../download-key-dialog.component.spec.ts | 2 +- .../download-key-dialog.component.ts | 2 +- .../pool-manager-wizard.component.spec.ts | 2 +- .../pool-manager-wizard.component.ts | 2 +- .../general-wizard-step.component.ts | 2 +- .../pool-wizard-name-validation.service.ts | 2 +- .../tests/add-vdev-to-pool.spec.ts | 2 +- .../pool-manager/tests/create-pool.spec.ts | 2 +- .../tests/draid-pool-creation.spec.ts | 2 +- .../modules/pool-manager/store/disk.store.ts | 2 +- .../store/pool-manager.store.spec.ts | 2 +- .../pool-manager/store/pool-manager.store.ts | 2 +- .../pools-dashboard-store.service.spec.ts | 2 +- .../stores/pools-dashboard-store.service.ts | 2 +- .../config-reset.component.spec.ts | 8 +- .../config-reset/config-reset.component.ts | 6 +- .../failover/failover.component.ts | 6 +- .../system-tasks/restart/restart.component.ts | 8 +- .../shutdown/shutdown.component.ts | 6 +- .../access-card/access-card.component.spec.ts | 2 +- .../access-card/access-card.component.ts | 2 +- .../access-form/access-form.component.spec.ts | 2 +- .../access-form/access-form.component.ts | 2 +- .../advanced/advanced-settings.component.ts | 2 +- .../allowed-addresses-card.component.ts | 2 +- .../allowed-addresses-form.component.spec.ts | 2 +- .../allowed-addresses-form.component.ts | 2 +- .../audit/audit-card/audit-card.component.ts | 2 +- .../audit-form/audit-form.component.spec.ts | 2 +- .../audit/audit-form/audit-form.component.ts | 2 +- .../console-form.component.spec.ts | 2 +- .../console-form/console-form.component.ts | 2 +- .../cron-card/cron-card.component.spec.ts | 2 +- .../cron/cron-card/cron-card.component.ts | 2 +- .../cron-delete-dialog.component.ts | 2 +- .../cron-form/cron-form.component.spec.ts | 2 +- .../cron/cron-form/cron-form.component.ts | 2 +- .../cron-list/cron-list.component.spec.ts | 2 +- .../cron/cron-list/cron-list.component.ts | 2 +- .../global-two-factor-card.component.ts | 2 +- .../global-two-factor-form.component.ts | 2 +- .../init-shutdown-card.component.spec.ts | 2 +- .../init-shutdown-card.component.ts | 2 +- .../init-shutdown-form.component.ts | 2 +- .../init-shutdown-list.component.spec.ts | 2 +- .../init-shutdown-list.component.ts | 2 +- .../isolated-gpus-form.component.spec.ts | 2 +- .../isolated-gpus-form.component.ts | 2 +- .../kernel-form/kernel-form.component.spec.ts | 2 +- .../kernel-form/kernel-form.component.ts | 2 +- .../replication-settings-card.component.ts | 2 +- ...eplication-settings-form.component.spec.ts | 2 +- .../replication-settings-form.component.ts | 2 +- .../save-debug-button.component.spec.ts | 2 +- .../save-debug-button.component.ts | 2 +- .../self-encrypting-drive-card.component.ts | 2 +- ...lf-encrypting-drive-form.component.spec.ts | 2 +- .../self-encrypting-drive-form.component.ts | 2 +- .../storage-card/storage-card.component.ts | 2 +- .../storage-settings-form.component.ts | 2 +- .../sysctl-card/sysctl-card.component.spec.ts | 2 +- .../sysctl-card/sysctl-card.component.ts | 2 +- .../tunable-form.component.spec.ts | 2 +- .../tunable-form/tunable-form.component.ts | 2 +- .../tunable-list.component.spec.ts | 2 +- .../tunable-list/tunable-list.component.ts | 2 +- .../syslog-form/syslog-form.component.spec.ts | 2 +- .../syslog-form/syslog-form.component.ts | 2 +- .../system-security-card.component.ts | 2 +- .../system-security-form.component.spec.ts | 2 +- .../system-security-form.component.ts | 2 +- .../alert-config-form.component.spec.ts | 2 +- .../alert-config-form.component.ts | 2 +- .../alert-service-list.component.spec.ts | 2 +- .../alert-service-list.component.ts | 2 +- .../alert-service.component.spec.ts | 2 +- .../alert-service/alert-service.component.ts | 2 +- .../alert-settings2.component.ts | 2 +- .../boot-pool-attach-dialog.component.spec.ts | 2 +- .../boot-pool-attach-dialog.component.ts | 2 +- .../boot-pool-delete-dialog.component.spec.ts | 2 +- .../boot-pool-delete-dialog.component.ts | 2 +- ...boot-pool-replace-dialog.component.spec.ts | 2 +- .../boot-pool-replace-dialog.component.ts | 2 +- .../bootenv-form.component.spec.ts | 2 +- .../bootenv-form/bootenv-form.component.ts | 2 +- .../bootenv-list.component.spec.ts | 2 +- .../bootenv-list/bootenv-list.component.ts | 2 +- .../bootenv-stats-dialog.component.spec.ts | 2 +- .../bootenv-stats-dialog.component.ts | 2 +- .../bootenv-status.component.ts | 2 +- .../identify-light.component.spec.ts | 2 +- .../identify-light.component.ts | 2 +- .../jbof-form/jbof-form.component.spec.ts | 2 +- .../jbof-form/jbof-form.component.ts | 2 +- .../jbof-list/jbof-list.component.spec.ts | 2 +- .../jbof-list/jbof-list.component.ts | 2 +- ...t-enclosure-label-dialog.component.spec.ts | 2 +- .../set-enclosure-label-dialog.component.ts | 2 +- .../enclosure-dashboard.component.ts | 2 +- .../services/enclosure.store.spec.ts | 2 +- .../enclosure/services/enclosure.store.ts | 2 +- .../failover-settings.component.spec.ts | 6 +- .../failover-settings.component.ts | 8 +- .../email/email-card/email-card.component.ts | 2 +- .../email-form/email-form.component.spec.ts | 2 +- .../email/email-form/email-form.component.ts | 2 +- .../gui/gui-form/gui-form.component.spec.ts | 10 +- .../gui/gui-form/gui-form.component.ts | 8 +- .../localization-form.component.spec.ts | 2 +- .../localization-form.component.ts | 2 +- .../ntp-server-card.component.spec.ts | 2 +- .../ntp-server-card.component.ts | 2 +- .../ntp-server-form.component.spec.ts | 2 +- .../ntp-server-form.component.ts | 2 +- .../save-config-dialog.component.spec.ts | 2 +- .../save-config-dialog.component.ts | 2 +- .../support/eula/eula.component.ts | 2 +- .../support/license/license.component.spec.ts | 2 +- .../support/license/license.component.ts | 2 +- .../proactive/proactive.component.spec.ts | 2 +- .../support/proactive/proactive.component.ts | 2 +- .../support-card.component.spec.ts | 2 +- .../support-card/support-card.component.ts | 2 +- .../manual-update-form.component.spec.ts | 4 +- .../manual-update-form.component.ts | 2 +- .../update-actions-card.component.spec.ts | 2 +- .../update-actions-card.component.ts | 2 +- .../system/update/services/train.service.ts | 2 +- .../system/update/services/update.service.ts | 2 +- .../two-factor.component.spec.ts | 2 +- .../two-factor-auth/two-factor.component.ts | 2 +- .../global-config-form.component.spec.ts | 2 +- .../global-config-form.component.ts | 2 +- .../instance-devices.component.spec.ts | 2 +- .../instance-devices.component.ts | 2 +- .../instance-general-info.component.spec.ts | 2 +- .../instance-general-info.component.ts | 2 +- .../instance-proxies.component.spec.ts | 2 +- .../instance-proxies.component.ts | 2 +- .../instance-proxy-form.component.spec.ts | 2 +- .../instance-proxy-form.component.ts | 2 +- .../instance-list/instance-list.component.ts | 2 +- .../instance-edit-form.component.spec.ts | 2 +- .../instance-edit-form.component.ts | 2 +- .../instance-wizard.component.spec.ts | 2 +- .../instance-wizard.component.ts | 2 +- .../select-image-dialog.component.spec.ts | 2 +- .../select-image-dialog.component.ts | 2 +- .../virtualization-config.store.spec.ts | 2 +- .../stores/virtualization-config.store.ts | 2 +- .../virtualization-instances.store.spec.ts | 2 +- .../stores/virtualization-instances.store.ts | 2 +- .../device-form/device-form.component.spec.ts | 2 +- .../device-form/device-form.component.ts | 2 +- .../device-delete-modal.component.spec.ts | 2 +- .../device-delete-modal.component.ts | 2 +- .../device-list/device-list.component.spec.ts | 2 +- .../device-list/device-list.component.ts | 2 +- .../vm/utils/cpu-validator.service.spec.ts | 2 +- .../pages/vm/utils/cpu-validator.service.ts | 2 +- .../vm/utils/free-space-validator.service.ts | 2 +- src/app/pages/vm/utils/vm-gpu.service.spec.ts | 2 +- src/app/pages/vm/utils/vm-gpu.service.ts | 2 +- .../vm-edit-form.component.spec.ts | 2 +- .../vm/vm-edit-form/vm-edit-form.component.ts | 2 +- src/app/pages/vm/vm-list.component.ts | 2 +- .../clone-vm-dialog.component.spec.ts | 2 +- .../clone-vm-dialog.component.ts | 2 +- .../delete-vm-dialog.component.spec.ts | 2 +- .../delete-vm-dialog.component.ts | 2 +- .../steps/1-os-step/os-step.component.ts | 2 +- .../cpu-and-memory-step.component.ts | 2 +- .../steps/3-disk-step/disk-step.component.ts | 2 +- .../network-interface-step.component.spec.ts | 2 +- .../network-interface-step.component.ts | 2 +- .../vm/vm-wizard/vm-wizard.component.spec.ts | 2 +- .../pages/vm/vm-wizard/vm-wizard.component.ts | 2 +- src/app/services/api.service.spec.ts | 167 -------------- src/app/services/auth/auth.service.spec.ts | 62 +++--- src/app/services/auth/auth.service.ts | 71 +----- src/app/services/cloud-credential.service.ts | 2 +- .../dataset-service/dataset.service.ts | 2 +- src/app/services/disk-temperature.service.ts | 2 +- src/app/services/filesystem.service.spec.ts | 2 +- src/app/services/filesystem.service.ts | 2 +- src/app/services/fips.service.spec.ts | 2 +- src/app/services/fips.service.ts | 2 +- .../global-store/global-store.service.spec.ts | 2 +- .../global-store/global-store.service.ts | 2 +- src/app/services/gpu/gpu-service.spec.ts | 2 +- src/app/services/gpu/gpu.service.ts | 2 +- src/app/services/idmap.service.ts | 2 +- src/app/services/iscsi.service.ts | 2 +- .../services/keychain-credential.service.ts | 2 +- src/app/services/language.service.ts | 2 +- src/app/services/network.service.ts | 2 +- src/app/services/redirect.service.ts | 2 +- src/app/services/replication.service.spec.ts | 2 +- src/app/services/replication.service.ts | 2 +- src/app/services/storage.service.spec.ts | 2 +- src/app/services/storage.service.ts | 2 +- src/app/services/system-general.service.ts | 2 +- .../services/token-last-used.service.spec.ts | 2 +- src/app/services/token-last-used.service.ts | 7 +- src/app/services/update.service.ts | 2 +- src/app/services/user.service.ts | 2 +- src/app/services/vm.service.spec.ts | 2 +- src/app/services/vm.service.ts | 2 +- .../websocket-connection.service.spec.ts | 181 ---------------- .../services/websocket-connection.service.ts | 204 ------------------ .../services/{ => websocket}/api.service.ts | 45 ++-- src/app/services/websocket/api2.service.ts | 190 ---------------- .../websocket/websocket-connection.class.ts | 1 + .../websocket/websocket-handler.service.ts | 63 ++++-- src/app/store/eula/eula.effects.spec.ts | 2 +- src/app/store/eula/eula.effects.ts | 2 +- src/app/store/ha-info/ha-info.effects.ts | 2 +- .../ha-upgrade/ha-upgrade.effects.spec.ts | 2 +- .../store/ha-upgrade/ha-upgrade.effects.ts | 2 +- .../network-interfaces.effects.spec.ts | 2 +- .../network-interfaces.effects.ts | 2 +- .../store/preferences/preferences.effects.ts | 2 +- .../store/services/services.effects.spec.ts | 2 +- src/app/store/services/services.effects.ts | 2 +- .../system-config/system-config.effects.ts | 2 +- .../store/system-info/system-info.effects.ts | 2 +- src/main.ts | 13 +- src/setup-jest.ts | 2 +- 672 files changed, 829 insertions(+), 1612 deletions(-) delete mode 100644 src/app/services/api.service.spec.ts delete mode 100644 src/app/services/websocket-connection.service.spec.ts delete mode 100644 src/app/services/websocket-connection.service.ts rename src/app/services/{ => websocket}/api.service.ts (85%) delete mode 100644 src/app/services/websocket/api2.service.ts diff --git a/src/app/core/guards/translations-loaded.guard.ts b/src/app/core/guards/translations-loaded.guard.ts index 55a409ddbca..69eb3208b3a 100644 --- a/src/app/core/guards/translations-loaded.guard.ts +++ b/src/app/core/guards/translations-loaded.guard.ts @@ -5,7 +5,7 @@ import { catchError, map, timeout, } from 'rxjs/operators'; import { LanguageService } from 'app/services/language.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; /** * Ensures that translations have been loaded. @@ -18,9 +18,9 @@ export class TranslationsLoadedGuard { isConnected = false; constructor( private languageService: LanguageService, - private wsManager: WebSocketConnectionService, + private wsHandler: WebSocketHandlerService, ) { - this.wsManager.isConnected$.pipe(untilDestroyed(this)).subscribe((isConnected) => { + this.wsHandler.isConnected$.pipe(untilDestroyed(this)).subscribe((isConnected) => { this.isConnected = isConnected; }); } diff --git a/src/app/core/guards/websocket-connection.guard.ts b/src/app/core/guards/websocket-connection.guard.ts index f7cee543bc7..74ac29dac8f 100644 --- a/src/app/core/guards/websocket-connection.guard.ts +++ b/src/app/core/guards/websocket-connection.guard.ts @@ -4,14 +4,14 @@ import { Router } from '@angular/router'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { TranslateService } from '@ngx-translate/core'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @UntilDestroy() @Injectable({ providedIn: 'root' }) export class WebSocketConnectionGuard { isConnected = false; constructor( - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, protected router: Router, private matDialog: MatDialog, private dialogService: DialogService, @@ -20,7 +20,9 @@ export class WebSocketConnectionGuard { this.wsManager.isClosed$.pipe(untilDestroyed(this)).subscribe((isClosed) => { if (isClosed) { this.resetUi(); - this.wsManager.isClosed$ = false; + // TODO: Test why manually changing close status is needed + // Test a shutdown function to see how UI acts when this isn't done + // this.wsManager.isClosed$ = false; } }); @@ -34,7 +36,7 @@ export class WebSocketConnectionGuard { private resetUi(): void { this.closeAllDialogs(); - if (!this.wsManager.shutDownInProgress) { + if (!this.wsManager.isSystemShuttingDown) { this.router.navigate(['/signin']); } } @@ -49,8 +51,10 @@ export class WebSocketConnectionGuard { this.dialogService.fullScreenDialog({ title: this.translate.instant('Access restricted'), message: this.translate.instant('Access from your IP is restricted'), - }).pipe(untilDestroyed(this)).subscribe(() => { - this.wsManager.reconnect(); + }).pipe(untilDestroyed(this)).subscribe({ + next: () => { + this.wsManager.reconnect(); + }, }); } diff --git a/src/app/core/testing/classes/mock-api.service.ts b/src/app/core/testing/classes/mock-api.service.ts index 978761b5f60..8d56dcf9c4f 100644 --- a/src/app/core/testing/classes/mock-api.service.ts +++ b/src/app/core/testing/classes/mock-api.service.ts @@ -1,5 +1,4 @@ import { Injectable } from '@angular/core'; -import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { when } from 'jest-when'; import { Observable, Subject, of } from 'rxjs'; @@ -20,8 +19,8 @@ import { } from 'app/interfaces/api/api-job-directory.interface'; import { ApiEvent } from 'app/interfaces/api-message.interface'; import { Job } from 'app/interfaces/job.interface'; -import { ApiService } from 'app/services/api.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; /** * Better than just expect.anything() because it allows null and undefined. @@ -46,11 +45,10 @@ export class MockApiService extends ApiService { private jobIdCounter = 1; constructor( - protected override router: Router, - protected override wsManager: WebSocketConnectionService, + protected override wsHandler: WebSocketHandlerService, protected override translate: TranslateService, ) { - super(router, wsManager, translate); + super(wsHandler, translate); this.call = jest.fn(); this.job = jest.fn(); diff --git a/src/app/core/testing/mock-enclosure/mock-enclosure-api.service.ts b/src/app/core/testing/mock-enclosure/mock-enclosure-api.service.ts index 6e9051c8cad..d9d180ac117 100644 --- a/src/app/core/testing/mock-enclosure/mock-enclosure-api.service.ts +++ b/src/app/core/testing/mock-enclosure/mock-enclosure-api.service.ts @@ -1,5 +1,4 @@ import { Injectable } from '@angular/core'; -import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { environment } from 'environments/environment'; import { Observable, of } from 'rxjs'; @@ -8,8 +7,8 @@ import { MockEnclosureConfig } from 'app/core/testing/mock-enclosure/interfaces/ import { MockEnclosureGenerator } from 'app/core/testing/mock-enclosure/mock-enclosure-generator.utils'; import { ApiCallMethod, ApiCallParams, ApiCallResponse } from 'app/interfaces/api/api-call-directory.interface'; import { SystemInfo } from 'app/interfaces/system-info.interface'; -import { ApiService } from 'app/services/api.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @Injectable({ providedIn: 'root', @@ -19,11 +18,10 @@ export class MockEnclosureApiService extends ApiService { private mockStorage = new MockEnclosureGenerator(this.mockConfig); constructor( - router: Router, - wsManager: WebSocketConnectionService, + wsManager: WebSocketHandlerService, translate: TranslateService, ) { - super(router, wsManager, translate); + super(wsManager, translate); console.warn('MockEnclosureApiService is in effect. Some calls will be mocked'); } diff --git a/src/app/core/testing/utils/empty-api.service.ts b/src/app/core/testing/utils/empty-api.service.ts index 5a499ca21c8..46edf8fc48e 100644 --- a/src/app/core/testing/utils/empty-api.service.ts +++ b/src/app/core/testing/utils/empty-api.service.ts @@ -1,5 +1,5 @@ import { getMissingInjectionErrorFactory, getMissingInjectionErrorObservable } from 'app/core/testing/utils/missing-injection-factories'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export class EmptyApiService { readonly clearSubscriptions$ = getMissingInjectionErrorObservable(ApiService.name); diff --git a/src/app/core/testing/utils/mock-api.utils.ts b/src/app/core/testing/utils/mock-api.utils.ts index 97a5a45f01c..c366929102c 100644 --- a/src/app/core/testing/utils/mock-api.utils.ts +++ b/src/app/core/testing/utils/mock-api.utils.ts @@ -1,7 +1,6 @@ import { ExistingProvider, FactoryProvider, forwardRef, ValueProvider, } from '@angular/core'; -import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { MockApiService } from 'app/core/testing/classes/mock-api.service'; import { @@ -12,8 +11,8 @@ import { import { ApiCallMethod } from 'app/interfaces/api/api-call-directory.interface'; import { ApiJobDirectory, ApiJobMethod } from 'app/interfaces/api/api-job-directory.interface'; import { Job } from 'app/interfaces/job.interface'; -import { ApiService } from 'app/services/api.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; /** * This is a sugar syntax for creating simple api mocks. @@ -48,8 +47,8 @@ export function mockApi( return [ { provide: ApiService, - useFactory: (router: Router, wsManager: WebSocketConnectionService, translate: TranslateService) => { - const mockApiService = new MockApiService(router, wsManager, translate); + useFactory: (wsHandler: WebSocketHandlerService, translate: TranslateService) => { + const mockApiService = new MockApiService(wsHandler, translate); (mockResponses || []).forEach((mockResponse) => { if (mockResponse.type === MockApiResponseType.Call) { mockApiService.mockCall(mockResponse.method, mockResponse.response); @@ -62,15 +61,15 @@ export function mockApi( }); return mockApiService; }, - deps: [Router, WebSocketConnectionService, TranslateService], + deps: [WebSocketHandlerService, TranslateService], }, { provide: MockApiService, useExisting: forwardRef(() => ApiService), }, { - provide: WebSocketConnectionService, - useValue: ({ send: jest.fn() } as unknown as WebSocketConnectionService), + provide: WebSocketHandlerService, + useValue: ({ send: jest.fn() } as unknown as WebSocketHandlerService), }, ]; } diff --git a/src/app/core/testing/utils/mock-auth.utils.ts b/src/app/core/testing/utils/mock-auth.utils.ts index 4432a470821..a4228cd8894 100644 --- a/src/app/core/testing/utils/mock-auth.utils.ts +++ b/src/app/core/testing/utils/mock-auth.utils.ts @@ -9,10 +9,10 @@ import { MockAuthService } from 'app/core/testing/classes/mock-auth.service'; import { AccountAttribute } from 'app/enums/account-attribute.enum'; import { Role } from 'app/enums/role.enum'; import { LoggedInUser } from 'app/interfaces/ds-cache.interface'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; export const dummyUser = { privilege: { @@ -40,7 +40,7 @@ export function mockAuth( provide: AuthService, useFactory: () => { const mockService = new MockAuthService( - createSpyObject(WebSocketConnectionService, { + createSpyObject(WebSocketHandlerService, { isConnected$: of(true), }), createSpyObject(Store), diff --git a/src/app/modules/alerts/components/alert/alert.component.spec.ts b/src/app/modules/alerts/components/alert/alert.component.spec.ts index 3d6c8bba176..5c8ad2adf27 100644 --- a/src/app/modules/alerts/components/alert/alert.component.spec.ts +++ b/src/app/modules/alerts/components/alert/alert.component.spec.ts @@ -15,7 +15,7 @@ import { AlertEffects } from 'app/modules/alerts/store/alert.effects'; import { adapter, alertReducer, alertsInitialState } from 'app/modules/alerts/store/alert.reducer'; import { alertStateKey, selectAlerts } from 'app/modules/alerts/store/alert.selectors'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { systemConfigReducer, SystemConfigState } from 'app/store/system-config/system-config.reducer'; import { systemConfigStateKey } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/modules/alerts/components/alerts-panel/alerts-panel.component.spec.ts b/src/app/modules/alerts/components/alerts-panel/alerts-panel.component.spec.ts index 2c60cce9bda..2a038cae2f6 100644 --- a/src/app/modules/alerts/components/alerts-panel/alerts-panel.component.spec.ts +++ b/src/app/modules/alerts/components/alerts-panel/alerts-panel.component.spec.ts @@ -16,8 +16,8 @@ import { AlertsPanelPageObject } from 'app/modules/alerts/components/alerts-pane import { AlertEffects } from 'app/modules/alerts/store/alert.effects'; import { adapter, alertReducer, alertsInitialState } from 'app/modules/alerts/store/alert.reducer'; import { alertStateKey } from 'app/modules/alerts/store/alert.selectors'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { haInfoReducer } from 'app/store/ha-info/ha-info.reducer'; import { haInfoStateKey } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/modules/alerts/store/alert.effects.ts b/src/app/modules/alerts/store/alert.effects.ts index 8239d32d492..e82f3f60c98 100644 --- a/src/app/modules/alerts/store/alert.effects.ts +++ b/src/app/modules/alerts/store/alert.effects.ts @@ -25,8 +25,8 @@ import { import { AlertSlice, selectDismissedAlerts, selectIsAlertPanelOpen, selectUnreadAlerts, } from 'app/modules/alerts/store/alert.selectors'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { alertIndicatorPressed } from 'app/store/topbar/topbar.actions'; diff --git a/src/app/modules/buttons/export-button/export-button.component.spec.ts b/src/app/modules/buttons/export-button/export-button.component.spec.ts index aec2a2e99fc..6abe47be209 100644 --- a/src/app/modules/buttons/export-button/export-button.component.spec.ts +++ b/src/app/modules/buttons/export-button/export-button.component.spec.ts @@ -11,8 +11,8 @@ import { AuditEntry } from 'app/interfaces/audit/audit.interface'; import { Job } from 'app/interfaces/job.interface'; import { ExportButtonComponent } from 'app/modules/buttons/export-button/export-button.component'; import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; describe('ExportButtonComponent', () => { diff --git a/src/app/modules/buttons/export-button/export-button.component.ts b/src/app/modules/buttons/export-button/export-button.component.ts index 209e6e9f50a..e952503071a 100644 --- a/src/app/modules/buttons/export-button/export-button.component.ts +++ b/src/app/modules/buttons/export-button/export-button.component.ts @@ -20,9 +20,9 @@ import { AdvancedSearchQuery, SearchQuery } from 'app/modules/forms/search-input import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { TableSort } from 'app/modules/ix-table/interfaces/table-sort.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/modules/dialog/components/error-dialog/error-dialog.component.ts b/src/app/modules/dialog/components/error-dialog/error-dialog.component.ts index 45b3cab8113..4f31196a680 100644 --- a/src/app/modules/dialog/components/error-dialog/error-dialog.component.ts +++ b/src/app/modules/dialog/components/error-dialog/error-dialog.component.ts @@ -14,9 +14,9 @@ import { CopyButtonComponent } from 'app/modules/buttons/copy-button/copy-button import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.spec.ts b/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.spec.ts index b3502bbccad..88c3fa93526 100644 --- a/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.spec.ts +++ b/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.spec.ts @@ -14,7 +14,7 @@ import { JobProgressDialogConfig, } from 'app/modules/dialog/components/job-progress/job-progress-dialog.component'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('JobProgressDialogComponent', () => { let spectator: Spectator>; diff --git a/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.ts b/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.ts index 4c9151d88da..20168a61a03 100644 --- a/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.ts +++ b/src/app/modules/dialog/components/job-progress/job-progress-dialog.component.ts @@ -15,8 +15,8 @@ import { JobState } from 'app/enums/job-state.enum'; import { Job, JobProgress } from 'app/interfaces/job.interface'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface JobProgressDialogConfig { job$: Observable>; diff --git a/src/app/modules/dialog/components/multi-error-dialog/error-template/error-template.component.ts b/src/app/modules/dialog/components/multi-error-dialog/error-template/error-template.component.ts index 11cbf36fbe3..644540c76db 100644 --- a/src/app/modules/dialog/components/multi-error-dialog/error-template/error-template.component.ts +++ b/src/app/modules/dialog/components/multi-error-dialog/error-template/error-template.component.ts @@ -10,9 +10,9 @@ import { Job } from 'app/interfaces/job.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.spec.ts b/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.spec.ts index ab4116728c1..092159aba1e 100644 --- a/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.spec.ts +++ b/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.spec.ts @@ -7,8 +7,8 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { Job } from 'app/interfaces/job.interface'; import { CopyButtonComponent } from 'app/modules/buttons/copy-button/copy-button.component'; import { ShowLogsDialogComponent } from 'app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ShowLogsDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.ts b/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.ts index 1b33326eb95..28ad9afe992 100644 --- a/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.ts +++ b/src/app/modules/dialog/components/show-logs-dialog/show-logs-dialog.component.ts @@ -11,9 +11,9 @@ import { Job } from 'app/interfaces/job.interface'; import { CopyButtonComponent } from 'app/modules/buttons/copy-button/copy-button.component'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.spec.ts b/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.spec.ts index b9825515f2b..cb6f24aaee0 100644 --- a/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.spec.ts +++ b/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.spec.ts @@ -13,7 +13,7 @@ import { ServiceStatus } from 'app/enums/service-status.enum'; import { Service } from 'app/interfaces/service.interface'; import { StartServiceDialogComponent, StartServiceDialogResult } from 'app/modules/dialog/components/start-service-dialog/start-service-dialog.component'; import { IxSlideToggleHarness } from 'app/modules/forms/ix-forms/components/ix-slide-toggle/ix-slide-toggle.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectServices } from 'app/store/services/services.selectors'; diff --git a/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.ts b/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.ts index f3d5b6a228c..e364ea555ed 100644 --- a/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.ts +++ b/src/app/modules/dialog/components/start-service-dialog/start-service-dialog.component.ts @@ -19,8 +19,8 @@ import { IxSlideToggleComponent } from 'app/modules/forms/ix-forms/components/ix import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectService } from 'app/store/services/services.selectors'; diff --git a/src/app/modules/feedback/components/file-ticket-licensed/file-ticket-licensed.component.ts b/src/app/modules/feedback/components/file-ticket-licensed/file-ticket-licensed.component.ts index 5c4af0cc34f..063c70fc75f 100644 --- a/src/app/modules/feedback/components/file-ticket-licensed/file-ticket-licensed.component.ts +++ b/src/app/modules/feedback/components/file-ticket-licensed/file-ticket-licensed.component.ts @@ -37,7 +37,7 @@ import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-vali import { emailValidator } from 'app/modules/forms/ix-forms/validators/email-validation/email-validation'; import { ImageValidatorService } from 'app/modules/forms/ix-forms/validators/image-validator/image-validator.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/feedback/components/file-ticket/file-ticket.component.ts b/src/app/modules/feedback/components/file-ticket/file-ticket.component.ts index b7747b0c576..58ecd85ad17 100644 --- a/src/app/modules/feedback/components/file-ticket/file-ticket.component.ts +++ b/src/app/modules/feedback/components/file-ticket/file-ticket.component.ts @@ -24,7 +24,7 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { ImageValidatorService } from 'app/modules/forms/ix-forms/validators/image-validator/image-validator.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/feedback/services/feedback.service.spec.ts b/src/app/modules/feedback/services/feedback.service.spec.ts index 3c5b985b624..98656d3f108 100644 --- a/src/app/modules/feedback/services/feedback.service.spec.ts +++ b/src/app/modules/feedback/services/feedback.service.spec.ts @@ -17,10 +17,10 @@ import { import { ProductType } from 'app/enums/product-type.enum'; import { FeedbackService } from 'app/modules/feedback/services/feedback.service'; import { SnackbarComponent } from 'app/modules/snackbar/components/snackbar/snackbar.component'; -import { ApiService } from 'app/services/api.service'; import { SentryService } from 'app/services/sentry.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { UploadService } from 'app/services/upload.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SystemInfoState } from 'app/store/system-info/system-info.reducer'; import { selectProductType, selectSystemInfoState } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/modules/feedback/services/feedback.service.ts b/src/app/modules/feedback/services/feedback.service.ts index fcd4cec7f42..db23aa747c5 100644 --- a/src/app/modules/feedback/services/feedback.service.ts +++ b/src/app/modules/feedback/services/feedback.service.ts @@ -26,10 +26,10 @@ import { SimilarIssue, } from 'app/modules/feedback/interfaces/file-ticket.interface'; import { SnackbarComponent } from 'app/modules/snackbar/components/snackbar/snackbar.component'; -import { ApiService } from 'app/services/api.service'; import { SentryService } from 'app/services/sentry.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { UploadService } from 'app/services/upload.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { SystemInfoState } from 'app/store/system-info/system-info.reducer'; import { selectProductType, selectSystemInfoState, waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.spec.ts b/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.spec.ts index c31d25594e8..ff866b56602 100644 --- a/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.spec.ts +++ b/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.spec.ts @@ -13,7 +13,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { UnusedDiskSelectComponent } from 'app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component'; import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.harness'; import { IxComboboxHarness } from 'app/modules/forms/ix-forms/components/ix-combobox/ix-combobox.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('UnusedDiskSelectComponent', () => { let spectator: SpectatorHost; diff --git a/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.ts b/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.ts index 4fd955b7618..dd6ce01193e 100644 --- a/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.ts +++ b/src/app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component.ts @@ -28,7 +28,7 @@ import { getNonUniqueSerialDisksWarning, } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/components/pool-warnings/get-non-unique-serial-disks'; import { hasNonUniqueSerial } from 'app/pages/storage/modules/pool-manager/utils/disk.utils'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; /** * Presents unused disks, shows their size and if there is exported pool on them. diff --git a/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.spec.ts b/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.spec.ts index 4e5359cc103..c4845fa3522 100644 --- a/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.spec.ts +++ b/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.spec.ts @@ -11,7 +11,7 @@ import { Dataset, DatasetCreate } from 'app/interfaces/dataset.interface'; import { CreateDatasetDialogComponent } from 'app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CreateDatasetDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.ts b/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.ts index 1c0a2c76811..a44545de810 100644 --- a/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.ts +++ b/src/app/modules/forms/ix-forms/components/ix-explorer/create-dataset-dialog/create-dataset-dialog.component.ts @@ -24,8 +24,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { forbiddenValues } from 'app/modules/forms/ix-forms/validators/forbidden-values-validation/forbidden-values-validation'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { datasetNameTooLong } from 'app/pages/datasets/components/dataset-form/utils/name-length-validation'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/ix-table/classes/api-data-provider/api-data-provider.ts b/src/app/modules/ix-table/classes/api-data-provider/api-data-provider.ts index 8d8917ff98d..f232a22e003 100644 --- a/src/app/modules/ix-table/classes/api-data-provider/api-data-provider.ts +++ b/src/app/modules/ix-table/classes/api-data-provider/api-data-provider.ts @@ -10,7 +10,7 @@ import { SortingServerSide } from 'app/modules/ix-table/classes/api-data-provide import { BaseDataProvider } from 'app/modules/ix-table/classes/base-data-provider'; import { TablePagination } from 'app/modules/ix-table/interfaces/table-pagination.interface'; import { TableSort } from 'app/modules/ix-table/interfaces/table-sort.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export class ApiDataProvider extends BaseDataProvider> { paginationStrategy: PaginationServerSide; diff --git a/src/app/modules/jobs/components/jobs-panel/jobs-panel.component.spec.ts b/src/app/modules/jobs/components/jobs-panel/jobs-panel.component.spec.ts index 4060322f548..46efe9e969e 100644 --- a/src/app/modules/jobs/components/jobs-panel/jobs-panel.component.spec.ts +++ b/src/app/modules/jobs/components/jobs-panel/jobs-panel.component.spec.ts @@ -20,8 +20,8 @@ import { JobsPanelPageObject } from 'app/modules/jobs/components/jobs-panel/jobs import { JobEffects } from 'app/modules/jobs/store/job.effects'; import { jobReducer, adapter, jobsInitialState } from 'app/modules/jobs/store/job.reducer'; import { jobStateKey } from 'app/modules/jobs/store/job.selectors'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; const runningJob = { diff --git a/src/app/modules/jobs/store/job.effects.ts b/src/app/modules/jobs/store/job.effects.ts index 70adf95d33b..91abac58da0 100644 --- a/src/app/modules/jobs/store/job.effects.ts +++ b/src/app/modules/jobs/store/job.effects.ts @@ -10,7 +10,7 @@ import { JobState } from 'app/enums/job-state.enum'; import { abortJobPressed, jobAdded, jobChanged, jobRemoved, jobsLoaded, jobsNotLoaded, } from 'app/modules/jobs/store/job.actions'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { jobAborted } from './job.actions'; diff --git a/src/app/modules/layout/console-footer/console-messages.store.spec.ts b/src/app/modules/layout/console-footer/console-messages.store.spec.ts index 2daf6d9f8c1..33a7414d536 100644 --- a/src/app/modules/layout/console-footer/console-messages.store.spec.ts +++ b/src/app/modules/layout/console-footer/console-messages.store.spec.ts @@ -1,7 +1,7 @@ import { createServiceFactory, mockProvider, SpectatorService } from '@ngneat/spectator/jest'; import { firstValueFrom, of } from 'rxjs'; import { ConsoleMessagesStore } from 'app/modules/layout/console-footer/console-messages.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ConsoleMessagesStore', () => { let spectator: SpectatorService; diff --git a/src/app/modules/layout/console-footer/console-messages.store.ts b/src/app/modules/layout/console-footer/console-messages.store.ts index 73522607da3..45e05ffbe2a 100644 --- a/src/app/modules/layout/console-footer/console-messages.store.ts +++ b/src/app/modules/layout/console-footer/console-messages.store.ts @@ -2,7 +2,7 @@ import { Injectable, OnDestroy } from '@angular/core'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { ComponentStore } from '@ngrx/component-store'; import { filter, map } from 'rxjs'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface ConsoleMessagesState { lines: string[]; diff --git a/src/app/modules/layout/topbar/about-dialog/about-dialog.component.spec.ts b/src/app/modules/layout/topbar/about-dialog/about-dialog.component.spec.ts index 4e664cff768..33b8fa5f648 100644 --- a/src/app/modules/layout/topbar/about-dialog/about-dialog.component.spec.ts +++ b/src/app/modules/layout/topbar/about-dialog/about-dialog.component.spec.ts @@ -9,7 +9,7 @@ import { MockComponent } from 'ng-mocks'; import { helptextAbout } from 'app/helptext/about'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { AboutDialogComponent } from 'app/modules/layout/topbar/about-dialog/about-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SystemInfoState } from 'app/store/system-info/system-info.reducer'; import { selectSystemInfoState } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.spec.ts b/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.spec.ts index ee54600c816..ac527b56743 100644 --- a/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.spec.ts +++ b/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.spec.ts @@ -12,7 +12,7 @@ import { Role } from 'app/enums/role.enum'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChangePasswordDialogComponent } from 'app/modules/layout/topbar/change-password-dialog/change-password-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ChangePasswordDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.ts b/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.ts index cd7595750df..a1c70b77957 100644 --- a/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.ts +++ b/src/app/modules/layout/topbar/change-password-dialog/change-password-dialog.component.ts @@ -17,8 +17,8 @@ import { matchOthersFgValidator } from 'app/modules/forms/ix-forms/validators/pa import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.spec.ts b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.spec.ts index 3e25300d580..1648ef80e54 100644 --- a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.spec.ts +++ b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.spec.ts @@ -17,7 +17,7 @@ import { DirectoryServicesMonitorComponent, } from 'app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component'; import { topbarDialogPosition } from 'app/modules/layout/topbar/topbar-dialog-position.constant'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DirectoryServicesIndicatorComponent', () => { let spectator: Spectator; diff --git a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.ts b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.ts index 4b56d00d68f..bea3545f344 100644 --- a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.ts +++ b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-indicator.component.ts @@ -16,7 +16,7 @@ import { } from 'app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component'; import { topbarDialogPosition } from 'app/modules/layout/topbar/topbar-dialog-position.constant'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.spec.ts b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.spec.ts index 212ae433c2a..3bd481016bd 100644 --- a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.spec.ts +++ b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.spec.ts @@ -8,7 +8,7 @@ import { DirectoryServicesMonitorComponent, } from 'app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DirectoryServicesMonitorComponent', () => { let spectator: Spectator; diff --git a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.ts b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.ts index 2788e9605b4..53b33b46299 100644 --- a/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.ts +++ b/src/app/modules/layout/topbar/directory-services-indicator/directory-services-monitor/directory-services-monitor.component.ts @@ -14,8 +14,8 @@ import { DirectoryServiceState, directoryServiceStateLabels } from 'app/enums/di import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/layout/topbar/resilvering-indicator/resilver-progress/resilver-progress.component.ts b/src/app/modules/layout/topbar/resilvering-indicator/resilver-progress/resilver-progress.component.ts index e854ca35fc4..a66b93a48c9 100644 --- a/src/app/modules/layout/topbar/resilvering-indicator/resilver-progress/resilver-progress.component.ts +++ b/src/app/modules/layout/topbar/resilvering-indicator/resilver-progress/resilver-progress.component.ts @@ -14,7 +14,7 @@ import { PoolScanFunction } from 'app/enums/pool-scan-function.enum'; import { PoolScanState } from 'app/enums/pool-scan-state.enum'; import { PoolScan } from 'app/interfaces/resilver-job.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.spec.ts b/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.spec.ts index 8fe54359b5a..538e23014f5 100644 --- a/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.spec.ts +++ b/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.spec.ts @@ -10,7 +10,7 @@ import { import { ResilveringIndicatorComponent, } from 'app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ResilveringIndicatorComponent', () => { let spectator: Spectator; diff --git a/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.ts b/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.ts index 3b2c855d1e8..0d605d6921c 100644 --- a/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.ts +++ b/src/app/modules/layout/topbar/resilvering-indicator/resilvering-indicator.component.ts @@ -13,7 +13,7 @@ import { ResilverProgressDialogComponent, } from 'app/modules/layout/topbar/resilvering-indicator/resilver-progress/resilver-progress.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Component({ selector: 'ix-resilvering-indicator', diff --git a/src/app/modules/layout/topbar/user-menu/user-menu.component.spec.ts b/src/app/modules/layout/topbar/user-menu/user-menu.component.spec.ts index faadc0c6da7..78557dbaef3 100644 --- a/src/app/modules/layout/topbar/user-menu/user-menu.component.spec.ts +++ b/src/app/modules/layout/topbar/user-menu/user-menu.component.spec.ts @@ -17,7 +17,6 @@ import { } from 'app/modules/layout/topbar/change-password-dialog/change-password-dialog.component'; import { UserMenuComponent } from 'app/modules/layout/topbar/user-menu/user-menu.component'; import { AuthService } from 'app/services/auth/auth.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; describe('UserMenuComponent', () => { let spectator: Spectator; @@ -35,7 +34,6 @@ describe('UserMenuComponent', () => { logout: jest.fn(() => of()), user$: of(dummyUser), }), - mockProvider(WebSocketConnectionService), ], }); diff --git a/src/app/modules/terminal/components/terminal/terminal.component.ts b/src/app/modules/terminal/components/terminal/terminal.component.ts index 4d0ef946b00..19703618bfe 100644 --- a/src/app/modules/terminal/components/terminal/terminal.component.ts +++ b/src/app/modules/terminal/components/terminal/terminal.component.ts @@ -20,9 +20,9 @@ import { CopyPasteMessageComponent } from 'app/modules/terminal/components/copy- import { XtermAttachAddon } from 'app/modules/terminal/xterm-attach-addon'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { TooltipComponent } from 'app/modules/tooltip/tooltip.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ShellService } from 'app/services/shell.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForPreferences } from 'app/store/preferences/preferences.selectors'; diff --git a/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.spec.ts b/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.spec.ts index a9efb8e86cc..a0a24efe40e 100644 --- a/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.spec.ts +++ b/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.spec.ts @@ -15,7 +15,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TruecommandConnectModalComponent, TruecommandSignupModalState } from 'app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; function getFakeConfig(overrides: Partial): TrueCommandConfig { return { diff --git a/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts b/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts index 635910fc226..65b56968efc 100644 --- a/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts +++ b/src/app/modules/truecommand/components/truecommand-connect-modal/truecommand-connect-modal.component.ts @@ -18,8 +18,8 @@ import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-ch import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface TruecommandSignupModalState { isConnected: boolean; diff --git a/src/app/modules/truecommand/truecommand-button.component.ts b/src/app/modules/truecommand/truecommand-button.component.ts index 9e7cc4cd295..b54ce215f0d 100644 --- a/src/app/modules/truecommand/truecommand-button.component.ts +++ b/src/app/modules/truecommand/truecommand-button.component.ts @@ -29,8 +29,8 @@ import { } from 'app/modules/truecommand/components/truecommand-signup-modal/truecommand-signup-modal.component'; import { TruecommandStatusModalComponent } from 'app/modules/truecommand/components/truecommand-status-modal/truecommand-status-modal.component'; import { trueCommandElements } from 'app/modules/truecommand/truecommand-button.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.ts b/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.ts index 1de39be5cd4..e0f7028cabb 100644 --- a/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.ts +++ b/src/app/pages/apps/components/app-detail-view/app-details-header/app-details-header.component.ts @@ -23,8 +23,8 @@ import { AppCardLogoComponent } from 'app/pages/apps/components/app-card-logo/ap import { SelectPoolDialogComponent } from 'app/pages/apps/components/select-pool-dialog/select-pool-dialog.component'; import { DockerStore } from 'app/pages/apps/store/docker.store'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.spec.ts b/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.spec.ts index 1504d9fcbe6..a5bda3dca96 100644 --- a/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.spec.ts +++ b/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.spec.ts @@ -5,7 +5,7 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { AppResourcesCardComponent } from 'app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AppResourcesCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.ts b/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.ts index 5c89d59fed8..930f7368b47 100644 --- a/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.ts +++ b/src/app/pages/apps/components/app-detail-view/app-resources-card/app-resources-card.component.ts @@ -11,7 +11,7 @@ import { map, throttleTime } from 'rxjs'; import { MemoryStatsEventData } from 'app/interfaces/events/memory-stats-event.interface'; import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts b/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts index 0c690afa650..3f38c042b05 100644 --- a/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts +++ b/src/app/pages/apps/components/app-wizard/app-wizard.component.spec.ts @@ -22,8 +22,8 @@ import { AppWizardComponent } from 'app/pages/apps/components/app-wizard/app-wiz import { DockerHubRateInfoDialogComponent } from 'app/pages/apps/components/dockerhub-rate-limit-info-dialog/dockerhub-rate-limit-info-dialog.component'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const appVersion121 = { healthy: true, diff --git a/src/app/pages/apps/components/app-wizard/app-wizard.component.ts b/src/app/pages/apps/components/app-wizard/app-wizard.component.ts index 79064b8501c..15e87bb24cd 100644 --- a/src/app/pages/apps/components/app-wizard/app-wizard.component.ts +++ b/src/app/pages/apps/components/app-wizard/app-wizard.component.ts @@ -66,10 +66,10 @@ import { DockerHubRateInfoDialogComponent } from 'app/pages/apps/components/dock import { AppMetadataCardComponent } from 'app/pages/apps/components/installed-apps/app-metadata-card/app-metadata-card.component'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { AppSchemaService } from 'app/services/schema/app-schema.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.spec.ts b/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.spec.ts index 98694593ab3..fd1dcd73346 100644 --- a/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.spec.ts +++ b/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.spec.ts @@ -19,7 +19,7 @@ import { FilterSelectListHarness } from 'app/pages/apps/components/filter-select import { AppsFilterStore } from 'app/pages/apps/store/apps-filter-store.service'; import { AppsStore } from 'app/pages/apps/store/apps-store.service'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AvailableAppsHeaderComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.ts b/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.ts index 6263725c5f1..0b1b2e358f0 100644 --- a/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.ts +++ b/src/app/pages/apps/components/available-apps/available-apps-header/available-apps-header.component.ts @@ -30,8 +30,8 @@ import { FilterSelectListComponent } from 'app/pages/apps/components/filter-sele import { AppsFilterStore } from 'app/pages/apps/store/apps-filter-store.service'; import { AppsStore } from 'app/pages/apps/store/apps-store.service'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/catalog-settings/apps-settings.component.spec.ts b/src/app/pages/apps/components/catalog-settings/apps-settings.component.spec.ts index d621675fd43..6fa5428954b 100644 --- a/src/app/pages/apps/components/catalog-settings/apps-settings.component.spec.ts +++ b/src/app/pages/apps/components/catalog-settings/apps-settings.component.spec.ts @@ -22,7 +22,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { AppsSettingsComponent } from 'app/pages/apps/components/catalog-settings/apps-settings.component'; import { AppsStore } from 'app/pages/apps/store/apps-store.service'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AppsSettingsComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/catalog-settings/apps-settings.component.ts b/src/app/pages/apps/components/catalog-settings/apps-settings.component.ts index f4dd90f41cc..3aec265c170 100644 --- a/src/app/pages/apps/components/catalog-settings/apps-settings.component.ts +++ b/src/app/pages/apps/components/catalog-settings/apps-settings.component.ts @@ -35,7 +35,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { AppsStore } from 'app/pages/apps/store/apps-store.service'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts b/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts index 996a27cc25d..f60059b7e89 100644 --- a/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts +++ b/src/app/pages/apps/components/custom-app-form/custom-app-form.component.spec.ts @@ -21,8 +21,8 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { CustomAppFormComponent } from 'app/pages/apps/components/custom-app-form/custom-app-form.component'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeApp = { name: 'test-app-one', diff --git a/src/app/pages/apps/components/custom-app-form/custom-app-form.component.ts b/src/app/pages/apps/components/custom-app-form/custom-app-form.component.ts index 33625712fb8..b16cbb7de44 100644 --- a/src/app/pages/apps/components/custom-app-form/custom-app-form.component.ts +++ b/src/app/pages/apps/components/custom-app-form/custom-app-form.component.ts @@ -27,8 +27,8 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.spec.ts b/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.spec.ts index 37883479d35..d54052ff43b 100644 --- a/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.spec.ts +++ b/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.spec.ts @@ -17,7 +17,7 @@ import { BulkListItemComponent } from 'app/modules/lists/bulk-list-item/bulk-lis import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { DockerImageDeleteDialogComponent } from 'app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component'; import { fakeDockerImagesDataSource } from 'app/pages/apps/components/docker-images/test/fake-docker-images'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const mockSuccessBulkResponse = [{ result: null, diff --git a/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.ts b/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.ts index 3edef092327..c29f03c0296 100644 --- a/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.ts +++ b/src/app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component.ts @@ -19,7 +19,7 @@ import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-ch import { BulkListItemComponent } from 'app/modules/lists/bulk-list-item/bulk-list-item.component'; import { BulkListItem, BulkListItemState } from 'app/modules/lists/bulk-list-item/bulk-list-item.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts b/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts index 7887aee7eee..b7d08a42a93 100644 --- a/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts +++ b/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.spec.ts @@ -15,8 +15,8 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { DockerImageDeleteDialogComponent } from 'app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component'; import { PullImageFormComponent } from 'app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component'; import { fakeDockerImagesDataSource } from 'app/pages/apps/components/docker-images/test/fake-docker-images'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { DockerImagesListComponent } from './docker-images-list.component'; describe('DockerImagesListComponent', () => { diff --git a/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.ts b/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.ts index b5391a3fade..077d5eb4f01 100644 --- a/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.ts +++ b/src/app/pages/apps/components/docker-images/docker-images-list/docker-images-list.component.ts @@ -33,8 +33,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { DockerImageDeleteDialogComponent } from 'app/pages/apps/components/docker-images/docker-image-delete-dialog/docker-image-delete-dialog.component'; import { dockerImagesListElements } from 'app/pages/apps/components/docker-images/docker-images-list/docker-images-list.elements'; import { PullImageFormComponent } from 'app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; // TODO: Exclude AnythingUi when NAS-127632 is done export interface ContainerImageUi extends ContainerImage { diff --git a/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.spec.ts b/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.spec.ts index 89e05bf43bd..58c4d7eb1a2 100644 --- a/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.spec.ts +++ b/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.spec.ts @@ -12,8 +12,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { PullImageFormComponent } from 'app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('PullImageFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.ts b/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.ts index dfab91ad1a5..3725ebce2f5 100644 --- a/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.ts +++ b/src/app/pages/apps/components/docker-images/pull-image-form/pull-image-form.component.ts @@ -16,8 +16,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-header/modal-header.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.spec.ts b/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.spec.ts index 3d393d7d1a2..f363a12010d 100644 --- a/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.spec.ts @@ -19,7 +19,7 @@ import { BulkListItemComponent } from 'app/modules/lists/bulk-list-item/bulk-lis import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { AppBulkUpgradeComponent } from 'app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeAppOne = { name: 'test-app-one', diff --git a/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.ts b/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.ts index d928661dd65..0a7c7e07af0 100644 --- a/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.ts +++ b/src/app/pages/apps/components/installed-apps/app-bulk-upgrade/app-bulk-upgrade.component.ts @@ -36,7 +36,7 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.spec.ts b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.spec.ts index 5820b89f1fa..bd645027b5e 100644 --- a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.spec.ts @@ -25,9 +25,9 @@ import { AppUpgradeDialogComponent } from 'app/pages/apps/components/installed-a import { ApplicationsService } from 'app/pages/apps/services/applications.service'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; import { AppVersionPipe } from 'app/pages/dashboard/widgets/apps/common/utils/app-version.pipe'; -import { ApiService } from 'app/services/api.service'; import { RedirectService } from 'app/services/redirect.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AppInfoCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts index ff979566896..1ae02d86bd3 100644 --- a/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts +++ b/src/app/pages/apps/components/installed-apps/app-info-card/app-info-card.component.ts @@ -37,10 +37,10 @@ import { AppUpgradeDialogComponent } from 'app/pages/apps/components/installed-a import { ApplicationsService } from 'app/pages/apps/services/applications.service'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; import { AppVersionPipe } from 'app/pages/dashboard/widgets/apps/common/utils/app-version.pipe'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { RedirectService } from 'app/services/redirect.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.spec.ts b/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.spec.ts index 60fbe579073..d646c81dbff 100644 --- a/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.spec.ts @@ -12,7 +12,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxSelectHarness } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.harness'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { AppRollbackModalComponent } from 'app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AppRollbackModalComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.ts b/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.ts index 328d1ae7d93..df6e652acd7 100644 --- a/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.ts +++ b/src/app/pages/apps/components/installed-apps/app-rollback-modal/app-rollback-modal.component.ts @@ -19,8 +19,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts b/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts index 8ca740d2e3e..2e5e92be487 100644 --- a/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.spec.ts @@ -12,7 +12,7 @@ import { ToolbarSliderComponent } from 'app/modules/forms/toolbar-slider/toolbar import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ContainerLogsComponent } from 'app/pages/apps/components/installed-apps/container-logs/container-logs.component'; import { LogsDetailsDialogComponent } from 'app/pages/apps/components/logs-details-dialog/logs-details-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ContainerLogsComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.ts b/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.ts index c555294cd92..a2a16895659 100644 --- a/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.ts +++ b/src/app/pages/apps/components/installed-apps/container-logs/container-logs.component.ts @@ -18,10 +18,10 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { LogsDetailsDialogComponent } from 'app/pages/apps/components/logs-details-dialog/logs-details-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { ShellService } from 'app/services/shell.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface ContainerLogEvent { data: string; diff --git a/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts b/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts index 220d41bf158..f4e7b457249 100644 --- a/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts +++ b/src/app/pages/apps/components/installed-apps/installed-apps.component.spec.ts @@ -30,7 +30,7 @@ import { AppsStatsService } from 'app/pages/apps/store/apps-stats.service'; import { AppsStore } from 'app/pages/apps/store/apps-store.service'; import { DockerStore } from 'app/pages/apps/store/docker.store'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectAdvancedConfig, selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('InstalledAppsComponent', () => { diff --git a/src/app/pages/apps/components/installed-apps/installed-apps.component.ts b/src/app/pages/apps/components/installed-apps/installed-apps.component.ts index 2c753684f50..d87ea80821f 100644 --- a/src/app/pages/apps/components/installed-apps/installed-apps.component.ts +++ b/src/app/pages/apps/components/installed-apps/installed-apps.component.ts @@ -63,8 +63,8 @@ import { ApplicationsService } from 'app/pages/apps/services/applications.servic import { AppsStatsService } from 'app/pages/apps/store/apps-stats.service'; import { DockerStore } from 'app/pages/apps/store/docker.store'; import { InstalledAppsStore } from 'app/pages/apps/store/installed-apps-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState as WebuiAppState } from 'app/store'; enum SortableField { diff --git a/src/app/pages/apps/services/applications.service.spec.ts b/src/app/pages/apps/services/applications.service.spec.ts index a8e724ddc56..cdca0296de1 100644 --- a/src/app/pages/apps/services/applications.service.spec.ts +++ b/src/app/pages/apps/services/applications.service.spec.ts @@ -6,7 +6,7 @@ import { AppExtraCategory } from 'app/enums/app-extra-category.enum'; import { AppsFiltersSort, AppsFiltersValues } from 'app/interfaces/apps-filters-values.interface'; import { AvailableApp } from 'app/interfaces/available-app.interface'; import { ApplicationsService } from 'app/pages/apps/services/applications.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ApplicationsService', () => { let spectator: SpectatorService; diff --git a/src/app/pages/apps/services/applications.service.ts b/src/app/pages/apps/services/applications.service.ts index 7f3006ee5eb..274a42bdad1 100644 --- a/src/app/pages/apps/services/applications.service.ts +++ b/src/app/pages/apps/services/applications.service.ts @@ -16,7 +16,7 @@ import { CatalogApp } from 'app/interfaces/catalog.interface'; import { Job } from 'app/interfaces/job.interface'; import { Pool } from 'app/interfaces/pool.interface'; import { QueryFilters } from 'app/interfaces/query-api.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const ignoredAppsList = [customApp]; diff --git a/src/app/pages/apps/store/apps-stats.service.spec.ts b/src/app/pages/apps/store/apps-stats.service.spec.ts index e4980cede70..fca7924a868 100644 --- a/src/app/pages/apps/store/apps-stats.service.spec.ts +++ b/src/app/pages/apps/store/apps-stats.service.spec.ts @@ -7,7 +7,7 @@ import { of } from 'rxjs'; import { ApiEvent } from 'app/interfaces/api-message.interface'; import { AppStats } from 'app/interfaces/app.interface'; import { AppsStatsService } from 'app/pages/apps/store/apps-stats.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AppsStatsService', () => { const plexStats: AppStats = { diff --git a/src/app/pages/apps/store/apps-stats.service.ts b/src/app/pages/apps/store/apps-stats.service.ts index 0f0ea02eddd..0419593f3a4 100644 --- a/src/app/pages/apps/store/apps-stats.service.ts +++ b/src/app/pages/apps/store/apps-stats.service.ts @@ -4,7 +4,7 @@ import { ComponentStore } from '@ngrx/component-store'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { AppStats } from 'app/interfaces/app.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; type State = Record; diff --git a/src/app/pages/apps/store/docker.store.spec.ts b/src/app/pages/apps/store/docker.store.spec.ts index 88309d4ed8b..015515ceb87 100644 --- a/src/app/pages/apps/store/docker.store.spec.ts +++ b/src/app/pages/apps/store/docker.store.spec.ts @@ -5,7 +5,7 @@ import { DockerConfig } from 'app/enums/docker-config.interface'; import { DockerNvidiaStatus } from 'app/enums/docker-nvidia-status.enum'; import { DockerStatus } from 'app/enums/docker-status.enum'; import { DockerStore } from 'app/pages/apps/store/docker.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DockerStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/apps/store/docker.store.ts b/src/app/pages/apps/store/docker.store.ts index e5b71d6e6e1..fea4b0ebd66 100644 --- a/src/app/pages/apps/store/docker.store.ts +++ b/src/app/pages/apps/store/docker.store.ts @@ -11,8 +11,8 @@ import { DockerStatus } from 'app/enums/docker-status.enum'; import { JobState } from 'app/enums/job-state.enum'; import { Job } from 'app/interfaces/job.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface DockerConfigState { isLoading: boolean; diff --git a/src/app/pages/audit/audit.component.spec.ts b/src/app/pages/audit/audit.component.spec.ts index 49bc077123d..18c64eedd80 100644 --- a/src/app/pages/audit/audit.component.spec.ts +++ b/src/app/pages/audit/audit.component.spec.ts @@ -16,8 +16,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { AuditComponent } from 'app/pages/audit/audit.component'; import { LogDetailsPanelComponent } from 'app/pages/audit/components/log-details-panel/log-details-panel.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { selectAdvancedConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/audit/audit.component.ts b/src/app/pages/audit/audit.component.ts index 0de104c86c6..4e67df7cce0 100644 --- a/src/app/pages/audit/audit.component.ts +++ b/src/app/pages/audit/audit.component.ts @@ -66,8 +66,8 @@ import { auditElements } from 'app/pages/audit/audit.elements'; import { LogDetailsPanelComponent } from 'app/pages/audit/components/log-details-panel/log-details-panel.component'; import { AuditApiDataProvider } from 'app/pages/audit/utils/audit-api-data-provider'; import { getLogImportantData } from 'app/pages/audit/utils/get-log-important-data.utils'; -import { ApiService } from 'app/services/api.service'; import { UrlOptionsService } from 'app/services/url-options.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/audit/utils/audit-api-data-provider.ts b/src/app/pages/audit/utils/audit-api-data-provider.ts index b5a6b845f66..09737f7e2d0 100644 --- a/src/app/pages/audit/utils/audit-api-data-provider.ts +++ b/src/app/pages/audit/utils/audit-api-data-provider.ts @@ -5,7 +5,7 @@ import { ApiCallParams } from 'app/interfaces/api/api-call-directory.interface'; import { AuditEntry, AuditQueryParams } from 'app/interfaces/audit/audit.interface'; import { QueryFilters } from 'app/interfaces/query-api.interface'; import { ApiDataProvider } from 'app/modules/ix-table/classes/api-data-provider/api-data-provider'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export class AuditApiDataProvider extends ApiDataProvider<'audit.query'> { lastParams: AuditQueryParams; diff --git a/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.spec.ts b/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.spec.ts index c29f449f2b1..12495bbfd3b 100644 --- a/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.spec.ts @@ -17,9 +17,9 @@ import { import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { CloudCredentialsCardComponent } from 'app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component'; import { CloudCredentialsFormComponent } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloudCredentialsCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.ts b/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.ts index 9d02d14ddb8..4c53b7050fe 100644 --- a/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.ts +++ b/src/app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.component.ts @@ -28,9 +28,9 @@ import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { cloudCredentialsCardElements } from 'app/pages/credentials/backup-credentials/cloud-credentials-card/cloud-credentials-card.elements'; import { CloudCredentialFormInput, CloudCredentialsFormComponent } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.spec.ts b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.spec.ts index c3165c84a0b..bd137f34803 100644 --- a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.spec.ts @@ -31,7 +31,7 @@ import { } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/token-provider-form/token-provider-form.component'; import { CloudSyncProviderDescriptionComponent } from 'app/pages/data-protection/cloudsync/cloudsync-provider-description/cloudsync-provider-description.component'; import { storjProvider } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.testing.utils'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CloudCredentialsFormComponent } from './cloud-credentials-form.component'; jest.mock('./provider-forms/s3-provider-form/s3-provider-form.component', () => { diff --git a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.ts b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.ts index 80cb6c55bf3..53f11321c11 100644 --- a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.ts +++ b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/cloud-credentials-form.component.ts @@ -36,9 +36,9 @@ import { } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/base-provider-form'; import { CloudSyncProviderDescriptionComponent } from 'app/pages/data-protection/cloudsync/cloudsync-provider-description/cloudsync-provider-description.component'; import { getName, getProviderFormClass } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.common'; -import { ApiService } from 'app/services/api.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface CloudCredentialFormInput { providers: CloudSyncProviderName[]; diff --git a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.spec.ts b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.spec.ts index 55e38941730..0c9a55d9fe4 100644 --- a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.spec.ts @@ -10,7 +10,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SftpProviderFormComponent, } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SftpProviderFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.ts b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.ts index 203bf9c0cef..f378098fe91 100644 --- a/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.ts +++ b/src/app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/sftp-provider-form/sftp-provider-form.component.ts @@ -16,7 +16,7 @@ import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-sele import { BaseProviderFormComponent, } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/base-provider-form'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const newOption = 'NEW'; diff --git a/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.spec.ts b/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.spec.ts index 25b87ba1a14..a80aeb97e61 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.spec.ts @@ -16,8 +16,8 @@ import { import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SshConnectionCardComponent } from 'app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component'; import { SshConnectionFormComponent } from 'app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SshConnectionCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.ts b/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.ts index cf87bc26dba..3cdf5bf437c 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.component.ts @@ -28,9 +28,9 @@ import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { sshConnectionsCardElements } from 'app/pages/credentials/backup-credentials/ssh-connection-card/ssh-connection-card.elements'; import { SshConnectionFormComponent } from 'app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.spec.ts b/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.spec.ts index d0f0b475387..512fda0294c 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.spec.ts @@ -14,8 +14,8 @@ import { KeychainSshCredentials } from 'app/interfaces/keychain-credential.inter import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; -import { ApiService } from 'app/services/api.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SshConnectionFormComponent } from './ssh-connection-form.component'; describe('SshConnectionFormComponent', () => { diff --git a/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.ts b/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.ts index 0dca0346e4b..7d8b8897c74 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-connection-form/ssh-connection-form.component.ts @@ -42,9 +42,9 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; +import { ApiService } from 'app/services/websocket/api.service'; const generateNewKeyValue = 'GENERATE_NEW_KEY'; const sslCertificationError = 'ESSLCERTVERIFICATIONERROR'; diff --git a/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.spec.ts b/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.spec.ts index 5ca5e89526e..92db641293f 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.spec.ts @@ -16,10 +16,10 @@ import { import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SshKeypairCardComponent } from 'app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component'; import { SshKeypairFormComponent } from 'app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SshKeypairCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.ts b/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.ts index 2a0971322cb..2a1d159cdba 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-keypair-card/ssh-keypair-card.component.ts @@ -30,10 +30,10 @@ import { sshKeypairsCardElements } from 'app/pages/credentials/backup-credential import { SshKeypairFormComponent, } from 'app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.spec.ts b/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.spec.ts index bd65d6bae8a..e7f8fe3e197 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.spec.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.spec.ts @@ -18,8 +18,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SshKeypairFormComponent } from 'app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SshKeypairFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.ts b/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.ts index c1927e39880..a4317cd402b 100644 --- a/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.ts +++ b/src/app/pages/credentials/backup-credentials/ssh-keypair-form/ssh-keypair-form.component.ts @@ -29,9 +29,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.spec.ts b/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.spec.ts index 242798b8c33..949a79d0234 100644 --- a/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.spec.ts @@ -17,8 +17,8 @@ import { import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { AcmeDnsAuthenticatorListComponent } from 'app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component'; import { AcmednsFormComponent } from 'app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const authenticators = Array.from({ length: 10 }).map((_, index) => ({ id: index + 1, diff --git a/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.ts b/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.ts index 9365a3db4b0..38fb601c1a2 100644 --- a/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.ts +++ b/src/app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.component.ts @@ -28,8 +28,8 @@ import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { acmeDnsAuthenticatorListElements } from 'app/pages/credentials/certificates-dash/acme-dns-authenticator-list/acme-dns-authenticator-list.elements'; import { AcmednsFormComponent } from 'app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.spec.ts b/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.spec.ts index 3acf994b8f7..c3092546359 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.spec.ts @@ -18,7 +18,7 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { CertificateAcmeAddComponent, } from 'app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CertificateAcmeAddComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.ts b/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.ts index 03a80afaeff..84fd65ab1de 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-acme-add/certificate-acme-add.component.ts @@ -27,8 +27,8 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.spec.ts b/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.spec.ts index 537375d7474..d236ee2ae21 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.spec.ts @@ -36,8 +36,8 @@ import { import { CertificateSubjectComponent, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-subject/certificate-subject.component'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; // TODO: Consider building a harness for the wizard. describe('CertificateAuthorityAddComponent', () => { diff --git a/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.ts b/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.ts index 2663ef25b12..0c71a396845 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-authority-add/certificate-authority-add.component.ts @@ -47,8 +47,8 @@ import { import { CertificateSubjectComponent, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-subject/certificate-subject.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-authority-add/steps/ca-identifier-and-type/ca-identifier-and-type.component.ts b/src/app/pages/credentials/certificates-dash/certificate-authority-add/steps/ca-identifier-and-type/ca-identifier-and-type.component.ts index 961ccaf7546..2156b5c1a67 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-authority-add/steps/ca-identifier-and-type/ca-identifier-and-type.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-authority-add/steps/ca-identifier-and-type/ca-identifier-and-type.component.ts @@ -20,8 +20,8 @@ import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-sele import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.spec.ts b/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.spec.ts index 546c78ac4b4..df059c1a225 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.spec.ts @@ -22,7 +22,7 @@ import { import { ViewCertificateDialogComponent, } from 'app/pages/credentials/certificates-dash/view-certificate-dialog/view-certificate-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CertificateAuthorityEditComponent } from './certificate-authority-edit.component'; describe('CertificateAuthorityEditComponent', () => { diff --git a/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.ts b/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.ts index 07658cfb307..dcc26a8bb03 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-authority-edit/certificate-authority-edit.component.ts @@ -26,7 +26,7 @@ import { import { ViewCertificateDialogComponent, } from 'app/pages/credentials/certificates-dash/view-certificate-dialog/view-certificate-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-authority-list/certificate-authority-list.component.ts b/src/app/pages/credentials/certificates-dash/certificate-authority-list/certificate-authority-list.component.ts index bb5dc395dea..b1255f6dfc1 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-authority-list/certificate-authority-list.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-authority-list/certificate-authority-list.component.ts @@ -52,10 +52,10 @@ import { certificateAuthorityListElements } from 'app/pages/credentials/certific import { SignCsrDialogComponent, } from 'app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.spec.ts b/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.spec.ts index 48613c8102f..2674be47c3a 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.spec.ts @@ -28,8 +28,8 @@ import { import { ViewCertificateDialogComponent, } from 'app/pages/credentials/certificates-dash/view-certificate-dialog/view-certificate-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CertificateEditComponent } from './certificate-edit.component'; describe('CertificateEditComponent', () => { diff --git a/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.ts b/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.ts index a8229fb141b..dd07b0ff5b7 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component.ts @@ -33,8 +33,8 @@ import { import { ViewCertificateDialogComponent, } from 'app/pages/credentials/certificates-dash/view-certificate-dialog/view-certificate-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.spec.ts b/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.spec.ts index 5cc9aa562af..a9809e43d6a 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.spec.ts @@ -20,9 +20,9 @@ import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-da import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { CertificateEditComponent } from 'app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component'; import { CertificateAddComponent } from 'app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CertificateListComponent } from './certificate-list.component'; const certificates = Array.from({ length: 10 }).map((_, index) => ({ diff --git a/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.ts b/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.ts index 0429fc78b1f..7ac2ec1204c 100644 --- a/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.ts +++ b/src/app/pages/credentials/certificates-dash/certificate-list/certificate-list.component.ts @@ -46,10 +46,10 @@ import { certificateListElements } from 'app/pages/credentials/certificates-dash import { CertificateAddComponent, } from 'app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts b/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts index d78dee4f796..c77951fcc43 100644 --- a/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.spec.ts @@ -34,8 +34,8 @@ import { import { CertificateSubjectComponent, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-subject/certificate-subject.component'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CsrAddComponent } from './csr-add.component'; describe('CsrAddComponent', () => { diff --git a/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.ts b/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.ts index 74c61bc8f0b..fa2edc9cd91 100644 --- a/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.ts +++ b/src/app/pages/credentials/certificates-dash/csr-add/csr-add.component.ts @@ -39,8 +39,8 @@ import { import { CertificateSubjectComponent, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-subject/certificate-subject.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts b/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts index e22bc6437c7..6eb0715dd86 100644 --- a/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts +++ b/src/app/pages/credentials/certificates-dash/csr-add/steps/csr-identifier-and-type/csr-identifier-and-type.component.ts @@ -21,8 +21,8 @@ import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-sele import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.spec.ts b/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.spec.ts index 9b78dae9148..7862b04c121 100644 --- a/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.spec.ts @@ -20,9 +20,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { CertificateEditComponent } from 'app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component'; import { CsrAddComponent } from 'app/pages/credentials/certificates-dash/csr-add/csr-add.component'; import { CertificateSigningRequestsListComponent } from 'app/pages/credentials/certificates-dash/csr-list/csr-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; +import { ApiService } from 'app/services/websocket/api.service'; const certificates = Array.from({ length: 10 }).map((_, index) => ({ id: index + 1, diff --git a/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.ts b/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.ts index a823c4d269c..46990c71b23 100644 --- a/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.ts +++ b/src/app/pages/credentials/certificates-dash/csr-list/csr-list.component.ts @@ -45,10 +45,10 @@ import { } from 'app/pages/credentials/certificates-dash/certificate-edit/certificate-edit.component'; import { CsrAddComponent } from 'app/pages/credentials/certificates-dash/csr-add/csr-add.component'; import { csrListElements } from 'app/pages/credentials/certificates-dash/csr-list/csr-list.elements'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.spec.ts b/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.spec.ts index 36a6d8bab98..2e45d0f9931 100644 --- a/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.spec.ts @@ -16,7 +16,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { AcmednsFormComponent } from 'app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AcmednsFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.ts b/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.ts index 1cee5b74e21..5f3156070f0 100644 --- a/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.ts +++ b/src/app/pages/credentials/certificates-dash/forms/acmedns-form/acmedns-form.component.ts @@ -31,7 +31,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface DnsAuthenticatorList { key: DnsAuthenticatorType; diff --git a/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.spec.ts b/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.spec.ts index fe436d8804d..77ee3b2c18d 100644 --- a/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.spec.ts @@ -39,8 +39,8 @@ import { import { CertificateSubjectComponent, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-subject/certificate-subject.component'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CertificateAddComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.ts b/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.ts index 2917f22c9d8..fb4ebb120d7 100644 --- a/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.ts +++ b/src/app/pages/credentials/certificates-dash/forms/certificate-add/certificate-add.component.ts @@ -39,8 +39,8 @@ import { import { CertificateSubjectComponent, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-subject/certificate-subject.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-identifier-and-type/certificate-identifier-and-type.component.ts b/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-identifier-and-type/certificate-identifier-and-type.component.ts index 52f4768915e..e1b1e18b546 100644 --- a/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-identifier-and-type/certificate-identifier-and-type.component.ts +++ b/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-identifier-and-type/certificate-identifier-and-type.component.ts @@ -21,8 +21,8 @@ import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-sele import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-import/certificate-import.component.ts b/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-import/certificate-import.component.ts index bc22e2b470c..cd597d9a1b9 100644 --- a/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-import/certificate-import.component.ts +++ b/src/app/pages/credentials/certificates-dash/forms/certificate-add/steps/certificate-import/certificate-import.component.ts @@ -21,8 +21,8 @@ import { matchOthersFgValidator } from 'app/modules/forms/ix-forms/validators/pa import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { getCertificatePreview } from 'app/pages/credentials/certificates-dash/utils/get-certificate-preview.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-constraints/certificate-constraints.component.ts b/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-constraints/certificate-constraints.component.ts index f5843ce8245..38a18250352 100644 --- a/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-constraints/certificate-constraints.component.ts +++ b/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-constraints/certificate-constraints.component.ts @@ -35,7 +35,7 @@ import { basicConstraintOptions, keyUsageOptions, } from 'app/pages/credentials/certificates-dash/forms/common-steps/certificate-constraints/extensions.constants'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-options/certificate-options.component.ts b/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-options/certificate-options.component.ts index aca2e0fc115..6464726b51f 100644 --- a/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-options/certificate-options.component.ts +++ b/src/app/pages/credentials/certificates-dash/forms/common-steps/certificate-options/certificate-options.component.ts @@ -22,8 +22,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.spec.ts b/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.spec.ts index 025e12d06e7..9064935111c 100644 --- a/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.spec.ts +++ b/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.spec.ts @@ -10,8 +10,8 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxSelectHarness } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.harness'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SignCsrDialogComponent } from './sign-csr-dialog.component'; describe('SignCsrDialogComponent', () => { diff --git a/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.ts b/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.ts index 5eb97907343..6772ad06710 100644 --- a/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.ts +++ b/src/app/pages/credentials/certificates-dash/sign-csr-dialog/sign-csr-dialog.component.ts @@ -18,8 +18,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts index 9d32bb8664d..d1ce41615e9 100644 --- a/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts +++ b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.spec.ts @@ -13,7 +13,7 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { DeleteGroupDialogComponent, } from 'app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeleteGroupDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts index 70e4624c14d..72315e3d577 100644 --- a/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts +++ b/src/app/pages/credentials/groups/group-details-row/delete-group-dialog/delete-group-dialog.component.ts @@ -18,8 +18,8 @@ import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-ch import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/groups/group-form/group-form.component.spec.ts b/src/app/pages/credentials/groups/group-form/group-form.component.spec.ts index 5d8f82221b9..37a4edaf43a 100644 --- a/src/app/pages/credentials/groups/group-form/group-form.component.spec.ts +++ b/src/app/pages/credentials/groups/group-form/group-form.component.spec.ts @@ -18,7 +18,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { GroupFormComponent } from 'app/pages/credentials/groups/group-form/group-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('GroupFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/groups/group-form/group-form.component.ts b/src/app/pages/credentials/groups/group-form/group-form.component.ts index 903e19c49ea..64453be108c 100644 --- a/src/app/pages/credentials/groups/group-form/group-form.component.ts +++ b/src/app/pages/credentials/groups/group-form/group-form.component.ts @@ -32,8 +32,8 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { groupAdded, groupChanged } from 'app/pages/credentials/groups/store/group.actions'; import { GroupSlice } from 'app/pages/credentials/groups/store/group.selectors'; -import { ApiService } from 'app/services/api.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/groups/group-list/group-list.component.spec.ts b/src/app/pages/credentials/groups/group-list/group-list.component.spec.ts index 335f67b88bd..3da71217429 100644 --- a/src/app/pages/credentials/groups/group-list/group-list.component.spec.ts +++ b/src/app/pages/credentials/groups/group-list/group-list.component.spec.ts @@ -16,7 +16,7 @@ import { GroupDetailsRowComponent } from 'app/pages/credentials/groups/group-det import { GroupListComponent } from 'app/pages/credentials/groups/group-list/group-list.component'; import { groupsInitialState, GroupsState } from 'app/pages/credentials/groups/store/group.reducer'; import { selectGroups, selectGroupState, selectGroupsTotal } from 'app/pages/credentials/groups/store/group.selectors'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; const fakeGroupDataSource: Group[] = [{ diff --git a/src/app/pages/credentials/groups/group-members/group-members.component.spec.ts b/src/app/pages/credentials/groups/group-members/group-members.component.spec.ts index b7c1d912b7a..a8515bab171 100644 --- a/src/app/pages/credentials/groups/group-members/group-members.component.spec.ts +++ b/src/app/pages/credentials/groups/group-members/group-members.component.spec.ts @@ -13,7 +13,7 @@ import { User } from 'app/interfaces/user.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { DualListBoxComponent } from 'app/modules/lists/dual-listbox/dual-listbox.component'; import { GroupMembersComponent } from 'app/pages/credentials/groups/group-members/group-members.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeGroupDataSource = [{ id: 1, diff --git a/src/app/pages/credentials/groups/group-members/group-members.component.ts b/src/app/pages/credentials/groups/group-members/group-members.component.ts index 6135ab3db57..6eeed2eee1a 100644 --- a/src/app/pages/credentials/groups/group-members/group-members.component.ts +++ b/src/app/pages/credentials/groups/group-members/group-members.component.ts @@ -23,9 +23,9 @@ import { iconMarker } from 'app/modules/ix-icon/icon-marker.util'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { DualListBoxComponent } from 'app/modules/lists/dual-listbox/dual-listbox.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts index 8e318d97d22..24c4186ca35 100644 --- a/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.spec.ts @@ -13,7 +13,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { PrivilegeFormComponent } from 'app/pages/credentials/groups/privilege/privilege-form/privilege-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('PrivilegeFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts index 902a8e18e88..b78ccbcc1c8 100644 --- a/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-form/privilege-form.component.ts @@ -25,7 +25,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts index 1294926b2f5..9f6e1d319a3 100644 --- a/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.spec.ts @@ -12,8 +12,8 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { PrivilegeFormComponent } from 'app/pages/credentials/groups/privilege/privilege-form/privilege-form.component'; import { PrivilegeListComponent } from 'app/pages/credentials/groups/privilege/privilege-list/privilege-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakePrivilegeDataSource: Privilege[] = [ { diff --git a/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts index fbb943240eb..ff3e181af26 100644 --- a/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts +++ b/src/app/pages/credentials/groups/privilege/privilege-list/privilege-list.component.ts @@ -37,9 +37,9 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { TestDirective } from 'app/modules/test-id/test.directive'; import { PrivilegeFormComponent } from 'app/pages/credentials/groups/privilege/privilege-form/privilege-form.component'; import { privilegesListElements } from 'app/pages/credentials/groups/privilege/privilege-list/privilege-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/groups/store/group.effects.ts b/src/app/pages/credentials/groups/store/group.effects.ts index 12eb1386b99..41f9a0a5c8f 100644 --- a/src/app/pages/credentials/groups/store/group.effects.ts +++ b/src/app/pages/credentials/groups/store/group.effects.ts @@ -15,7 +15,7 @@ import { groupsLoaded, groupsNotLoaded, } from 'app/pages/credentials/groups/store/group.actions'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { builtinGroupsToggled } from 'app/store/preferences/preferences.actions'; import { waitForPreferences } from 'app/store/preferences/preferences.selectors'; diff --git a/src/app/pages/credentials/kmip/kmip.component.spec.ts b/src/app/pages/credentials/kmip/kmip.component.spec.ts index 4d4a81198ef..59006cc8134 100644 --- a/src/app/pages/credentials/kmip/kmip.component.spec.ts +++ b/src/app/pages/credentials/kmip/kmip.component.spec.ts @@ -16,8 +16,8 @@ import { } from 'app/modules/forms/ix-forms/components/with-manage-certificates-link/with-manage-certificates-link.component'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { KmipComponent } from './kmip.component'; describe('KmipComponent', () => { diff --git a/src/app/pages/credentials/kmip/kmip.component.ts b/src/app/pages/credentials/kmip/kmip.component.ts index 4371088ba33..70b7c6978e5 100644 --- a/src/app/pages/credentials/kmip/kmip.component.ts +++ b/src/app/pages/credentials/kmip/kmip.component.ts @@ -24,9 +24,9 @@ import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { kmipElements } from 'app/pages/credentials/kmip/kmip.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/users/store/user.effects.ts b/src/app/pages/credentials/users/store/user.effects.ts index 9aee297dff2..258bd88a23b 100644 --- a/src/app/pages/credentials/users/store/user.effects.ts +++ b/src/app/pages/credentials/users/store/user.effects.ts @@ -15,7 +15,7 @@ import { usersLoaded, usersNotLoaded, } from 'app/pages/credentials/users/store/user.actions'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { builtinUsersToggled } from 'app/store/preferences/preferences.actions'; import { waitForPreferences } from 'app/store/preferences/preferences.selectors'; diff --git a/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.spec.ts b/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.spec.ts index 7378c66f928..8809d9485fe 100644 --- a/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.spec.ts +++ b/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.spec.ts @@ -16,7 +16,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ApiKeyFormComponent } from 'app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component'; import { KeyCreatedDialogComponent } from 'app/pages/credentials/users/user-api-keys/components/key-created-dialog/key-created-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ApiKeyFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts b/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts index 80865bfbe21..22b44a4c50e 100644 --- a/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts +++ b/src/app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component.ts @@ -33,8 +33,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { KeyCreatedDialogComponent, } from 'app/pages/credentials/users/user-api-keys/components/key-created-dialog/key-created-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.spec.ts b/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.spec.ts index 681c07b212d..c6e1401fa3c 100644 --- a/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.spec.ts +++ b/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.spec.ts @@ -16,9 +16,9 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { ApiKeyFormComponent } from 'app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component'; import { UserApiKeysComponent } from 'app/pages/credentials/users/user-api-keys/user-api-keys.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('UserApiKeysComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.ts b/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.ts index 65c46d8d645..a1d26f23b4a 100644 --- a/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.ts +++ b/src/app/pages/credentials/users/user-api-keys/user-api-keys.component.ts @@ -42,10 +42,10 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { TestDirective } from 'app/modules/test-id/test.directive'; import { ApiKeyFormComponent } from 'app/pages/credentials/users/user-api-keys/components/api-key-form-dialog/api-key-form-dialog.component'; import { userApiKeysElements } from 'app/pages/credentials/users/user-api-keys/user-api-keys.elements'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts index 84fd78bdbc2..a1595995163 100644 --- a/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts +++ b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.spec.ts @@ -15,7 +15,7 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { DeleteUserDialogComponent, } from 'app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeleteUserDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts index 78bf588ae0e..9853c3e8fde 100644 --- a/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts +++ b/src/app/pages/credentials/users/user-details-row/delete-user-dialog/delete-user-dialog.component.ts @@ -19,8 +19,8 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestOverrideDirective } from 'app/modules/test-id/test-override/test-override.directive'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/credentials/users/user-form/user-form.component.spec.ts b/src/app/pages/credentials/users/user-form/user-form.component.spec.ts index c1f5706e7ac..ef4744705c0 100644 --- a/src/app/pages/credentials/users/user-form/user-form.component.spec.ts +++ b/src/app/pages/credentials/users/user-form/user-form.component.spec.ts @@ -22,11 +22,11 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { selectUsers } from 'app/pages/credentials/users/store/user.selectors'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { StorageService } from 'app/services/storage.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { UserFormComponent } from './user-form.component'; describe('UserFormComponent', () => { diff --git a/src/app/pages/credentials/users/user-form/user-form.component.ts b/src/app/pages/credentials/users/user-form/user-form.component.ts index 4a683155905..27039ded9a6 100644 --- a/src/app/pages/credentials/users/user-form/user-form.component.ts +++ b/src/app/pages/credentials/users/user-form/user-form.component.ts @@ -53,11 +53,11 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { userAdded, userChanged } from 'app/pages/credentials/users/store/user.actions'; import { selectUsers } from 'app/pages/credentials/users/store/user.selectors'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { StorageService } from 'app/services/storage.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; const defaultHomePath = '/var/empty'; diff --git a/src/app/pages/credentials/users/user-list/user-list.component.spec.ts b/src/app/pages/credentials/users/user-list/user-list.component.spec.ts index 2a6550114fb..060e76e9e81 100644 --- a/src/app/pages/credentials/users/user-list/user-list.component.spec.ts +++ b/src/app/pages/credentials/users/user-list/user-list.component.spec.ts @@ -15,7 +15,7 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { usersInitialState, UsersState } from 'app/pages/credentials/users/store/user.reducer'; import { selectUsers, selectUserState, selectUsersTotal } from 'app/pages/credentials/users/store/user.selectors'; import { UserDetailsRowComponent } from 'app/pages/credentials/users/user-details-row/user-details-row.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { UserListComponent } from './user-list.component'; diff --git a/src/app/pages/dashboard/services/dashboard.store.spec.ts b/src/app/pages/dashboard/services/dashboard.store.spec.ts index 7fc226f2008..4b3b240652d 100644 --- a/src/app/pages/dashboard/services/dashboard.store.spec.ts +++ b/src/app/pages/dashboard/services/dashboard.store.spec.ts @@ -5,8 +5,8 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { getDefaultWidgets } from 'app/pages/dashboard/services/get-default-widgets'; import { WidgetGroupLayout } from 'app/pages/dashboard/types/widget-group.interface'; import { WidgetType } from 'app/pages/dashboard/types/widget.interface'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { DashboardStore, initialState } from './dashboard.store'; diff --git a/src/app/pages/dashboard/services/dashboard.store.ts b/src/app/pages/dashboard/services/dashboard.store.ts index 1a6689dcede..3595163848c 100644 --- a/src/app/pages/dashboard/services/dashboard.store.ts +++ b/src/app/pages/dashboard/services/dashboard.store.ts @@ -10,9 +10,9 @@ import { WidgetName } from 'app/enums/widget-name.enum'; import { getDefaultWidgets } from 'app/pages/dashboard/services/get-default-widgets'; import { WidgetGroup, WidgetGroupLayout } from 'app/pages/dashboard/types/widget-group.interface'; import { SomeWidgetSettings, WidgetType } from 'app/pages/dashboard/types/widget.interface'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/dashboard/services/widget-resources.service.ts b/src/app/pages/dashboard/services/widget-resources.service.ts index 15db6d7c873..76171c45db7 100644 --- a/src/app/pages/dashboard/services/widget-resources.service.ts +++ b/src/app/pages/dashboard/services/widget-resources.service.ts @@ -17,8 +17,8 @@ import { Pool } from 'app/interfaces/pool.interface'; import { ReportingData } from 'app/interfaces/reporting.interface'; import { VolumesData, VolumeData } from 'app/interfaces/volume-data.interface'; import { processNetworkInterfaces } from 'app/pages/dashboard/widgets/network/widget-interface/widget-interface.utils'; -import { ApiService } from 'app/services/api.service'; import { poolStore } from 'app/services/global-store/stores.constant'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.spec.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.spec.ts index 2bf0b9eb266..51eec3fa720 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.spec.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.spec.ts @@ -21,8 +21,8 @@ import { import { CloudBackupFormComponent, } from 'app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.ts index 4b33ae7d97c..011b72ab06f 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-card/cloud-backup-card.component.ts @@ -42,9 +42,9 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudBackupFormComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component'; import { replicationListElements } from 'app/pages/data-protection/replication/replication-list/replication-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.spec.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.spec.ts index 64fdb2e8e99..f907d2fb5ab 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.spec.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.spec.ts @@ -11,9 +11,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { CloudBackupRestoreFromSnapshotFormComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloudBackupRestoreFromSnapshotFormComponent', () => { let loader: HarnessLoader; diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.ts index 55bb3ca230b..616f0f9e591 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component.ts @@ -40,8 +40,8 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.spec.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.spec.ts index d96b54d9305..ae82d603e84 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.spec.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.spec.ts @@ -13,9 +13,9 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { CloudBackupRestoreFromSnapshotFormComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component'; import { CloudBackupSnapshotsComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectGeneralConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.ts index 449d5cb5719..b77019e2a0c 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-snapshots/cloud-backup-snapshots.component.ts @@ -33,9 +33,9 @@ import { createTable } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { CloudBackupRestoreFromSnapshotFormComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-restore-form-snapshot-form/cloud-backup-restore-from-snapshot-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.spec.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.spec.ts index 791055d8087..fdb0b031e20 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.spec.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.spec.ts @@ -19,10 +19,10 @@ import { googlePhotosCreds, googlePhotosProvider, storjProvider } from 'app/page import { TransferModeExplanationComponent, } from 'app/pages/data-protection/cloudsync/transfer-mode-explanation/transfer-mode-explanation.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloudBackupFormComponent', () => { const storjCreds = { diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.ts index 7a8c032d126..aee4dda65a8 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component.ts @@ -39,9 +39,9 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; type FormValue = CloudBackupFormComponent['form']['value']; diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts index 5d8ca2821ba..1150d003966 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.spec.ts @@ -25,8 +25,8 @@ import { CloudBackupFormComponent, } from 'app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component'; import { CloudBackupListComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.ts b/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.ts index df473a156ea..41403a09da4 100644 --- a/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.ts +++ b/src/app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.component.ts @@ -46,9 +46,9 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudBackupDetailsComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-details/cloud-backup-details.component'; import { CloudBackupFormComponent } from 'app/pages/data-protection/cloud-backup/cloud-backup-form/cloud-backup-form.component'; import { cloudBackupListElements } from 'app/pages/data-protection/cloud-backup/cloud-backup-list/cloud-backup-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.spec.ts index fc5dac72edf..df7d7868bfd 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.spec.ts @@ -21,9 +21,9 @@ import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/clou import { TransferModeExplanationComponent, } from 'app/pages/data-protection/cloudsync/transfer-mode-explanation/transfer-mode-explanation.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloudSyncFormComponent', () => { const existingTask = { diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts index af1b206a79d..12cd46f01b5 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component.ts @@ -56,9 +56,9 @@ import { CloudSyncWizardComponent } from 'app/pages/data-protection/cloudsync/cl import { CreateStorjBucketDialogComponent } from 'app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component'; import { CustomTransfersDialogComponent } from 'app/pages/data-protection/cloudsync/custom-transfers-dialog/custom-transfers-dialog.component'; import { TransferModeExplanationComponent } from 'app/pages/data-protection/cloudsync/transfer-mode-explanation/transfer-mode-explanation.component'; -import { ApiService } from 'app/services/api.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; const customOptionValue = -1; diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts index 71c1851ff8a..5c52bd66b5a 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.spec.ts @@ -28,11 +28,11 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component'; import { CloudSyncListComponent } from 'app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component'; import { CloudSyncRestoreDialogComponent } from 'app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloudSyncListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.ts index 653a462af1e..763df22075b 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.component.ts @@ -46,10 +46,10 @@ import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/clou import { cloudSyncListElements } from 'app/pages/data-protection/cloudsync/cloudsync-list/cloudsync-list.elements'; import { CloudSyncRestoreDialogComponent } from 'app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component'; import { CloudSyncWizardComponent } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; @UntilDestroy() diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.spec.ts index 28fc43915cc..37fd5d257f9 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.spec.ts @@ -12,8 +12,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { TransferModeExplanationComponent, } from 'app/pages/data-protection/cloudsync/transfer-mode-explanation/transfer-mode-explanation.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CloudSyncRestoreDialogComponent } from './cloudsync-restore-dialog.component'; describe('CloudSyncRestoreDialogComponent', () => { diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.ts index ae9372502cf..688fb1f823d 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component.ts @@ -23,8 +23,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { TransferModeExplanationComponent } from 'app/pages/data-protection/cloudsync/transfer-mode-explanation/transfer-mode-explanation.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.spec.ts index 9fdce940797..63934aaa092 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.spec.ts @@ -29,11 +29,11 @@ import { CloudSyncTaskCardComponent, } from 'app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component'; import { CloudSyncWizardComponent } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('CloudSyncTaskCardComponent', () => { diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.ts index a5d283775d6..86b216ec38b 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-task-card/cloudsync-task-card.component.ts @@ -42,10 +42,10 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component'; import { CloudSyncRestoreDialogComponent } from 'app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component'; import { CloudSyncWizardComponent } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; @UntilDestroy() diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.spec.ts index b033276f7f8..ee6c7a6453d 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.spec.ts @@ -16,8 +16,8 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { StorjProviderFormComponent } from 'app/pages/credentials/backup-credentials/cloud-credentials-form/provider-forms/storj-provider-form/storj-provider-form.component'; import { googlePhotosCreds, googlePhotosProvider, storjProvider } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.testing.utils'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CloudSyncWizardComponent } from './cloudsync-wizard.component'; describe('CloudSyncWizardComponent', () => { diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.ts index 6dd0aa1e780..8b4fe5353b3 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.component.ts @@ -21,8 +21,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { CloudSyncWhatAndWhenComponent } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-what-and-when/cloudsync-what-and-when.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { CloudSyncProviderComponent } from './steps/cloudsync-provider/cloudsync-provider.component'; @UntilDestroy() diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.spec.ts b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.spec.ts index 8524a05da0c..d7a279e0b20 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.spec.ts @@ -19,10 +19,10 @@ import { StorjProviderFormComponent } from 'app/pages/credentials/backup-credent import { CloudSyncProviderDescriptionComponent } from 'app/pages/data-protection/cloudsync/cloudsync-provider-description/cloudsync-provider-description.component'; import { storjProvider, googlePhotosProvider, googlePhotosCreds } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/cloudsync-wizard.testing.utils'; import { CloudSyncProviderComponent } from 'app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloudSyncProviderComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.ts index e420b8d0fa7..4dc0f4ab7f9 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-provider/cloudsync-provider.component.ts @@ -23,8 +23,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component'; -import { ApiService } from 'app/services/api.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-what-and-when/cloudsync-what-and-when.component.ts b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-what-and-when/cloudsync-what-and-when.component.ts index 25a30871aa1..225aa410814 100644 --- a/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-what-and-when/cloudsync-what-and-when.component.ts +++ b/src/app/pages/data-protection/cloudsync/cloudsync-wizard/steps/cloudsync-what-and-when/cloudsync-what-and-when.component.ts @@ -46,9 +46,9 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudSyncFormComponent } from 'app/pages/data-protection/cloudsync/cloudsync-form/cloudsync-form.component'; import { CreateStorjBucketDialogComponent } from 'app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component'; import { TransferModeExplanationComponent } from 'app/pages/data-protection/cloudsync/transfer-mode-explanation/transfer-mode-explanation.component'; -import { ApiService } from 'app/services/api.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; type FormValue = CloudSyncWhatAndWhenComponent['form']['value']; diff --git a/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.spec.ts b/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.spec.ts index fbd8113a85a..250859fcf51 100644 --- a/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.spec.ts +++ b/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/i import { CreateStorjBucketDialogComponent, } from 'app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CreateStorjBucketDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.ts b/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.ts index 81b0abab829..25b3f1ac80a 100644 --- a/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.ts +++ b/src/app/pages/data-protection/cloudsync/create-storj-bucket-dialog/create-storj-bucket-dialog.component.ts @@ -17,7 +17,7 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/replication/replication-form/replication-form.component.spec.ts b/src/app/pages/data-protection/replication/replication-form/replication-form.component.spec.ts index 7d8a17ef245..c682f5c514d 100644 --- a/src/app/pages/data-protection/replication/replication-form/replication-form.component.spec.ts +++ b/src/app/pages/data-protection/replication/replication-form/replication-form.component.spec.ts @@ -43,10 +43,10 @@ import { import { ReplicationWizardComponent, } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; import { ReplicationService } from 'app/services/replication.service'; +import { ApiService } from 'app/services/websocket/api.service'; const existingTask: ReplicationTask = { name: 'dataset', diff --git a/src/app/pages/data-protection/replication/replication-form/replication-form.component.ts b/src/app/pages/data-protection/replication/replication-form/replication-form.component.ts index f5f8654125a..d72fd4e5e87 100644 --- a/src/app/pages/data-protection/replication/replication-form/replication-form.component.ts +++ b/src/app/pages/data-protection/replication/replication-form/replication-form.component.ts @@ -43,12 +43,12 @@ import { import { ReplicationWizardComponent, } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; import { ReplicationService } from 'app/services/replication.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/replication/replication-form/sections/source-section/source-section.component.ts b/src/app/pages/data-protection/replication/replication-form/sections/source-section/source-section.component.ts index 579bab97115..28ebaef1fd8 100644 --- a/src/app/pages/data-protection/replication/replication-form/sections/source-section/source-section.component.ts +++ b/src/app/pages/data-protection/replication/replication-form/sections/source-section/source-section.component.ts @@ -25,8 +25,8 @@ import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-cront import { PropertiesOverrideValidatorService, } from 'app/pages/data-protection/replication/replication-form/properties-override-validator/properties-override-validator.service'; -import { ApiService } from 'app/services/api.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Component({ selector: 'ix-replication-source-section', diff --git a/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts b/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts index ed7f00c3a1b..280fdb6924b 100644 --- a/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts +++ b/src/app/pages/data-protection/replication/replication-list/replication-list.component.spec.ts @@ -36,9 +36,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { ReplicationFormComponent } from 'app/pages/data-protection/replication/replication-form/replication-form.component'; import { ReplicationListComponent } from 'app/pages/data-protection/replication/replication-list/replication-list.component'; import { ReplicationRestoreDialogComponent } from 'app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/replication/replication-list/replication-list.component.ts b/src/app/pages/data-protection/replication/replication-list/replication-list.component.ts index 6d8bdb45bf2..47d52fa8cf0 100644 --- a/src/app/pages/data-protection/replication/replication-list/replication-list.component.ts +++ b/src/app/pages/data-protection/replication/replication-list/replication-list.component.ts @@ -53,10 +53,10 @@ import { import { ReplicationWizardComponent, } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.spec.ts b/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.spec.ts index e360fe7541e..ff566996aed 100644 --- a/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.spec.ts +++ b/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.spec.ts @@ -11,8 +11,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { ReplicationRestoreDialogComponent, } from 'app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ReplicationRestoreDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.ts b/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.ts index fd653df053b..d1fe4570c95 100644 --- a/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.ts +++ b/src/app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component.ts @@ -18,8 +18,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.spec.ts b/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.spec.ts index b85954e8866..09b57e4d290 100644 --- a/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.spec.ts +++ b/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.spec.ts @@ -18,9 +18,9 @@ import { ReplicationFormComponent } from 'app/pages/data-protection/replication/ import { ReplicationRestoreDialogComponent } from 'app/pages/data-protection/replication/replication-restore-dialog/replication-restore-dialog.component'; import { ReplicationTaskCardComponent } from 'app/pages/data-protection/replication/replication-task-card/replication-task-card.component'; import { ReplicationWizardComponent } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectGeneralConfig, selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.ts b/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.ts index 44a5cbc0541..87787f5b0f2 100644 --- a/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.ts +++ b/src/app/pages/data-protection/replication/replication-task-card/replication-task-card.component.ts @@ -50,10 +50,10 @@ import { import { ReplicationWizardComponent, } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.spec.ts b/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.spec.ts index 282fb616158..e1b09e53272 100644 --- a/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.spec.ts +++ b/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.spec.ts @@ -26,7 +26,7 @@ import { SummaryComponent } from 'app/modules/summary/summary.component'; import { ReplicationWizardComponent } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard.component'; import { ReplicationWhatAndWhereComponent } from 'app/pages/data-protection/replication/replication-wizard/steps/replication-what-and-where/replication-what-and-where.component'; import { ReplicationWhenComponent } from 'app/pages/data-protection/replication/replication-wizard/steps/replication-when/replication-when.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const existingTask: ReplicationTask = { name: 'dataset', diff --git a/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.ts b/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.ts index 997b36170ec..2711e1053e3 100644 --- a/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.ts +++ b/src/app/pages/data-protection/replication/replication-wizard/replication-wizard.component.ts @@ -43,10 +43,10 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { ReplicationWizardData } from 'app/pages/data-protection/replication/replication-wizard/replication-wizard-data.interface'; import { ReplicationWhatAndWhereComponent } from 'app/pages/data-protection/replication/replication-wizard/steps/replication-what-and-where/replication-what-and-where.component'; import { ReplicationWhenComponent } from 'app/pages/data-protection/replication/replication-wizard/steps/replication-when/replication-when.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { ReplicationService } from 'app/services/replication.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/replication/replication-wizard/steps/replication-what-and-where/replication-what-and-where.component.ts b/src/app/pages/data-protection/replication/replication-wizard/steps/replication-what-and-where/replication-what-and-where.component.ts index 20a779975b9..984c9a9ba8e 100644 --- a/src/app/pages/data-protection/replication/replication-wizard/steps/replication-what-and-where/replication-what-and-where.component.ts +++ b/src/app/pages/data-protection/replication/replication-wizard/steps/replication-what-and-where/replication-what-and-where.component.ts @@ -41,11 +41,11 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ReplicationFormComponent } from 'app/pages/data-protection/replication/replication-form/replication-form.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; import { KeychainCredentialService } from 'app/services/keychain-credential.service'; import { ReplicationService } from 'app/services/replication.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.spec.ts b/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.spec.ts index 42f32168b25..ea59b2bfec7 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.spec.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.spec.ts @@ -18,10 +18,10 @@ import { selectJobs } from 'app/modules/jobs/store/job.selectors'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { RsyncTaskCardComponent } from 'app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component'; import { RsyncTaskFormComponent } from 'app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('RsyncTaskCardComponent', () => { diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.ts b/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.ts index fb8f773e124..1b118ac54f3 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-card/rsync-task-card.component.ts @@ -38,10 +38,10 @@ import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-cront import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { RsyncTaskFormComponent } from 'app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; @UntilDestroy() diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.spec.ts b/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.spec.ts index ce60b70f537..466142ec5ab 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.spec.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.spec.ts @@ -18,11 +18,11 @@ import { } from 'app/modules/forms/custom-selects/ssh-credentials-select/ssh-credentials-select.component'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { LocaleService } from 'app/services/locale.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectTimezone } from 'app/store/system-config/system-config.selectors'; import { RsyncTaskFormComponent } from './rsync-task-form.component'; diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.ts b/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.ts index 66f93bffb0d..f7d80ddc0d8 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component.ts @@ -36,9 +36,9 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts b/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts index b99bc7e543f..2617fd5fe01 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.spec.ts @@ -22,9 +22,9 @@ import { selectJobs } from 'app/modules/jobs/store/job.selectors'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { RsyncTaskFormComponent } from 'app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component'; import { RsyncTaskListComponent } from 'app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectGeneralConfig, selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.ts b/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.ts index acb13b9208f..04377faf722 100644 --- a/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.ts +++ b/src/app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.component.ts @@ -48,10 +48,10 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { RsyncTaskFormComponent } from 'app/pages/data-protection/rsync-task/rsync-task-form/rsync-task-form.component'; import { rsyncTaskListElements } from 'app/pages/data-protection/rsync-task/rsync-task-list/rsync-task-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.spec.ts b/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.spec.ts index ff6e41c2efb..5ee5ff6ba7d 100644 --- a/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.spec.ts +++ b/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.spec.ts @@ -10,10 +10,10 @@ import { ResilverConfig } from 'app/interfaces/resilver-config.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { ApiService } from 'app/services/api.service'; import { LanguageService } from 'app/services/language.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ResilverConfigComponent } from './resilver-config.component'; describe('ResilverConfigComponent', () => { diff --git a/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.ts b/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.ts index 2f91dd42fe8..a0dbd1233dc 100644 --- a/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.ts +++ b/src/app/pages/data-protection/scrub-task/resilver-config/resilver-config.component.ts @@ -23,10 +23,10 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { resilverConfigElements } from 'app/pages/data-protection/scrub-task/resilver-config/resilver-config.elements'; -import { ApiService } from 'app/services/api.service'; import { CalendarService } from 'app/services/calendar.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts b/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts index 2286db7d435..32946e3a115 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.spec.ts @@ -16,9 +16,9 @@ import { import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { ScrubListComponent } from 'app/pages/data-protection/scrub-task/scrub-list/scrub-list.component'; import { ScrubTaskFormComponent } from 'app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectGeneralConfig, selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.ts b/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.ts index f7729516952..781be858b1b 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-list/scrub-list.component.ts @@ -39,10 +39,10 @@ import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-cront import { TestDirective } from 'app/modules/test-id/test.directive'; import { scrubListElements } from 'app/pages/data-protection/scrub-task/scrub-list/scrub-list.elements'; import { ScrubTaskFormComponent } from 'app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.spec.ts b/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.spec.ts index e0e59ab7057..b613140972b 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.spec.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.spec.ts @@ -16,10 +16,10 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { ScrubTaskCardComponent } from 'app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component'; import { ScrubTaskFormComponent } from 'app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('ScrubTaskCardComponent', () => { diff --git a/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.ts b/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.ts index 371e21caa36..5b5b156d281 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.component.ts @@ -29,10 +29,10 @@ import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-cront import { TestDirective } from 'app/modules/test-id/test.directive'; import { scrubTaskCardElements } from 'app/pages/data-protection/scrub-task/scrub-task-card/scrub-task-card.elements'; import { ScrubTaskFormComponent } from 'app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.spec.ts b/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.spec.ts index 1e0ac73ae54..26443ff2b07 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.spec.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.spec.ts @@ -13,9 +13,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ScrubTaskFormComponent } from 'app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectTimezone } from 'app/store/system-config/system-config.selectors'; describe('ScrubTaskFormComponent', () => { diff --git a/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.ts b/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.ts index 886cd526888..7c2abd9bc6e 100644 --- a/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.ts +++ b/src/app/pages/data-protection/scrub-task/scrub-task-form/scrub-task-form.component.ts @@ -28,7 +28,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.spec.ts b/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.spec.ts index 7573759bbe7..8fe47dc68b2 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.spec.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.spec.ts @@ -17,10 +17,10 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SmartTaskCardComponent } from 'app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component'; import { SmartTaskFormComponent } from 'app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('SmartTaskCardComponent', () => { diff --git a/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.ts b/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.ts index eb1cd57fbf3..a3e67b8f78c 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component.ts @@ -32,11 +32,11 @@ import { createTable } from 'app/modules/ix-table/utils'; import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-crontab.utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SmartTaskFormComponent } from 'app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.spec.ts b/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.spec.ts index b59b0fe2096..e2c195aa1da 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.spec.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.spec.ts @@ -13,9 +13,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SmartTaskFormComponent } from 'app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectTimezone } from 'app/store/system-config/system-config.selectors'; describe('SmartTaskFormComponent', () => { diff --git a/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.ts b/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.ts index 6ac03cb2a18..67f9cc13371 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component.ts @@ -32,7 +32,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts b/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts index 4ba71db72c3..0325f533f06 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.spec.ts @@ -19,10 +19,10 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SmartTaskCardComponent } from 'app/pages/data-protection/smart-task/smart-task-card/smart-task-card.component'; import { SmartTaskFormComponent } from 'app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('SmartTaskCardComponent', () => { diff --git a/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.ts b/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.ts index dbdb29dd863..85850466605 100644 --- a/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.ts +++ b/src/app/pages/data-protection/smart-task/smart-task-list/smart-task-list.component.ts @@ -34,11 +34,11 @@ import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-cront import { TestDirective } from 'app/modules/test-id/test.directive'; import { SmartTaskFormComponent } from 'app/pages/data-protection/smart-task/smart-task-form/smart-task-form.component'; import { smartTaskListElements } from 'app/pages/data-protection/smart-task/smart-task-list/smart-task-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.spec.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.spec.ts index 11be07fb4cf..ce6f9ed4917 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.spec.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.spec.ts @@ -16,10 +16,10 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnapshotTaskCardComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component'; import { SnapshotTaskFormComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('SnapshotTaskCardComponent', () => { diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.ts index 67a5b8c9143..1115e7db53e 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.component.ts @@ -32,10 +32,10 @@ import { scheduleToCrontab } from 'app/modules/scheduler/utils/schedule-to-cront import { TestDirective } from 'app/modules/test-id/test.directive'; import { snapshotTaskCardElements } from 'app/pages/data-protection/snapshot-task/snapshot-task-card/snapshot-task-card.elements'; import { SnapshotTaskFormComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.spec.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.spec.ts index 0a30a61ac41..d6d91710478 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.spec.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.spec.ts @@ -14,11 +14,11 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnapshotTaskFormComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectTimezone } from 'app/store/system-config/system-config.selectors'; describe('SnapshotTaskComponent', () => { diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.ts index bf0e0077c05..cfadacd5e7b 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component.ts @@ -31,9 +31,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { StorageService } from 'app/services/storage.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts index 09102c4a024..8a4b07320f1 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.spec.ts @@ -22,10 +22,10 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnapshotTaskFormComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component'; import { SnapshotTaskListComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SnapshotTaskListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.ts b/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.ts index e747c515af6..eecb0bb4701 100644 --- a/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.ts +++ b/src/app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.component.ts @@ -36,11 +36,11 @@ import { extractActiveHoursFromCron, scheduleToCrontab } from 'app/modules/sched import { TestDirective } from 'app/modules/test-id/test.directive'; import { SnapshotTaskFormComponent } from 'app/pages/data-protection/snapshot-task/snapshot-task-form/snapshot-task-form.component'; import { snapshotTaskListElements } from 'app/pages/data-protection/snapshot-task/snapshot-task-list/snapshot-task-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.spec.ts b/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.spec.ts index bdd8b3380dc..80f71026de3 100644 --- a/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.spec.ts +++ b/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.spec.ts @@ -13,8 +13,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { VmwareSnapshotFormComponent } from './vmware-snapshot-form.component'; describe('VmwareSnapshotFormComponent', () => { diff --git a/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.ts b/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.ts index 2cb487e6db6..1f26ef3b183 100644 --- a/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.ts +++ b/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component.ts @@ -24,8 +24,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-list/vmware-snapshot-list.component.ts b/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-list/vmware-snapshot-list.component.ts index 5816388c9d6..2dc20144aa9 100644 --- a/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-list/vmware-snapshot-list.component.ts +++ b/src/app/pages/data-protection/vmware-snapshot/vmware-snapshot-list/vmware-snapshot-list.component.ts @@ -27,9 +27,9 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { TestDirective } from 'app/modules/test-id/test.directive'; import { VmwareSnapshotFormComponent } from 'app/pages/data-protection/vmware-snapshot/vmware-snapshot-form/vmware-snapshot-form.component'; import { vmwareSnapshotListElements } from 'app/pages/data-protection/vmware-snapshot/vmware-snapshot-list/vmware-snapshot-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { VmwareStatusCellComponent } from './vmware-status-cell/vmware-status-cell.component'; @UntilDestroy() diff --git a/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-management-card.component.ts b/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-management-card.component.ts index 6a70cc9e3ba..d6d43a2762a 100644 --- a/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-management-card.component.ts +++ b/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-management-card.component.ts @@ -27,9 +27,9 @@ import { datasetCapacityManagementElements } from 'app/pages/datasets/components import { DatasetCapacitySettingsComponent } from 'app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component'; import { SpaceManagementChartComponent } from 'app/pages/datasets/components/dataset-capacity-management-card/space-management-chart/space-management-chart.component'; import { DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.spec.ts b/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.spec.ts index 3d8dc04365a..1499e540591 100644 --- a/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.spec.ts @@ -19,8 +19,8 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { DatasetCapacitySettingsComponent, } from 'app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DatasetCapacitySettingsComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.ts b/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.ts index eae83b8b36e..6f9b60ab037 100644 --- a/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.ts +++ b/src/app/pages/datasets/components/dataset-capacity-management-card/dataset-capacity-settings/dataset-capacity-settings.component.ts @@ -25,7 +25,7 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { isPropertyInherited, isRootDataset } from 'app/pages/datasets/utils/dataset.utils'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.spec.ts b/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.spec.ts index 030f9d4317f..aabf70bf28f 100644 --- a/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.spec.ts @@ -21,8 +21,8 @@ import { DatasetFormComponent } from 'app/pages/datasets/components/dataset-form import { DeleteDatasetDialogComponent } from 'app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component'; import { ZvolFormComponent } from 'app/pages/datasets/components/zvol-form/zvol-form.component'; import { DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const dataset = { id: 'pool/child', diff --git a/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.ts b/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.ts index 553d6437fc1..175003c50b1 100644 --- a/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.ts +++ b/src/app/pages/datasets/components/dataset-details-card/dataset-details-card.component.ts @@ -25,9 +25,9 @@ import { DatasetFormComponent } from 'app/pages/datasets/components/dataset-form import { DeleteDatasetDialogComponent } from 'app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component'; import { ZvolFormComponent } from 'app/pages/datasets/components/zvol-form/zvol-form.component'; import { DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-form/dataset-form.component.spec.ts b/src/app/pages/datasets/components/dataset-form/dataset-form.component.spec.ts index ff228a09719..823504b7f29 100644 --- a/src/app/pages/datasets/components/dataset-form/dataset-form.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-form/dataset-form.component.spec.ts @@ -34,8 +34,8 @@ import { QuotasSectionComponent, } from 'app/pages/datasets/components/dataset-form/sections/quotas-section/quotas-section.component'; import { DatasetFormService } from 'app/pages/datasets/components/dataset-form/utils/dataset-form.service'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; describe('DatasetFormComponent', () => { diff --git a/src/app/pages/datasets/components/dataset-form/dataset-form.component.ts b/src/app/pages/datasets/components/dataset-form/dataset-form.component.ts index 43929af649a..178883dee00 100644 --- a/src/app/pages/datasets/components/dataset-form/dataset-form.component.ts +++ b/src/app/pages/datasets/components/dataset-form/dataset-form.component.ts @@ -40,8 +40,8 @@ import { } from 'app/pages/datasets/components/dataset-form/sections/quotas-section/quotas-section.component'; import { DatasetFormService } from 'app/pages/datasets/components/dataset-form/utils/dataset-form.service'; import { getDatasetLabel } from 'app/pages/datasets/utils/dataset.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; diff --git a/src/app/pages/datasets/components/dataset-form/sections/encryption-section/encryption-section.component.ts b/src/app/pages/datasets/components/dataset-form/sections/encryption-section/encryption-section.component.ts index 8b2f42561ed..bcd0b098077 100644 --- a/src/app/pages/datasets/components/dataset-form/sections/encryption-section/encryption-section.component.ts +++ b/src/app/pages/datasets/components/dataset-form/sections/encryption-section/encryption-section.component.ts @@ -17,7 +17,7 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { matchOthersFgValidator } from 'app/modules/forms/ix-forms/validators/password-validation/password-validation'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-form/sections/other-options-section/other-options-section.component.ts b/src/app/pages/datasets/components/dataset-form/sections/other-options-section/other-options-section.component.ts index b75ac39afd9..7ac1a0055b0 100644 --- a/src/app/pages/datasets/components/dataset-form/sections/other-options-section/other-options-section.component.ts +++ b/src/app/pages/datasets/components/dataset-form/sections/other-options-section/other-options-section.component.ts @@ -54,8 +54,8 @@ import { specialSmallBlockSizeOptions, } from 'app/pages/datasets/components/dataset-form/utils/special-small-block-size-options.constant'; import { getFieldValue } from 'app/pages/datasets/components/dataset-form/utils/zfs-property.utils'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.spec.ts b/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.spec.ts index 7b4260e4093..ba1e8136a32 100644 --- a/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.spec.ts +++ b/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.spec.ts @@ -7,8 +7,8 @@ import { helptextDatasetForm } from 'app/helptext/storage/volumes/datasets/datas import { Dataset } from 'app/interfaces/dataset.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { DatasetFormService } from 'app/pages/datasets/components/dataset-form/utils/dataset-form.service'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DatasetFormService', () => { let spectator: SpectatorService; diff --git a/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.ts b/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.ts index 2c3156b6980..d0ba37455cd 100644 --- a/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.ts +++ b/src/app/pages/datasets/components/dataset-form/utils/dataset-form.service.ts @@ -10,8 +10,8 @@ import { helptextDatasetForm } from 'app/helptext/storage/volumes/datasets/datas import { Dataset } from 'app/interfaces/dataset.interface'; import { Option } from 'app/interfaces/option.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/pages/datasets/components/dataset-management/dataset-management.component.ts b/src/app/pages/datasets/components/dataset-management/dataset-management.component.ts index 4785ffd8c18..75a0494652c 100644 --- a/src/app/pages/datasets/components/dataset-management/dataset-management.component.ts +++ b/src/app/pages/datasets/components/dataset-management/dataset-management.component.ts @@ -66,8 +66,8 @@ import { datasetManagementElements } from 'app/pages/datasets/components/dataset import { DatasetNodeComponent } from 'app/pages/datasets/components/dataset-node/dataset-node.component'; import { DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; import { datasetNameSortComparer } from 'app/pages/datasets/utils/dataset.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.spec.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.spec.ts index 599e4ed854c..9a49c3ccfce 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.spec.ts @@ -13,9 +13,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { DatasetQuotaAddFormComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DatasetQuotaAddFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.ts index ef418262eaf..6d368cc674b 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component.ts @@ -26,9 +26,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.spec.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.spec.ts index abab4ff5488..7f182015f52 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.spec.ts @@ -13,8 +13,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { DatasetQuotaEditFormComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DatasetQuotaEditFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.ts index 603b9289141..c7087bfb137 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component.ts @@ -31,7 +31,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts index 885248f1da4..d6821f2c919 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.spec.ts @@ -22,8 +22,8 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { DatasetQuotaAddFormComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-add-form/dataset-quota-add-form.component'; import { DatasetQuotaEditFormComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component'; import { DatasetQuotasListComponent } from 'app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeQuotas = [{ id: 1, diff --git a/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.ts b/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.ts index cb140742539..16d65c96009 100644 --- a/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.ts +++ b/src/app/pages/datasets/components/dataset-quotas/dataset-quotas-list/dataset-quotas-list.component.ts @@ -48,9 +48,9 @@ import { import { DatasetQuotaEditFormComponent, } from 'app/pages/datasets/components/dataset-quotas/dataset-quota-edit-form/dataset-quota-edit-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface QuotaData { quotaType: DatasetQuotaType.User | DatasetQuotaType.Group; diff --git a/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.spec.ts b/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.spec.ts index 5f058847588..479a33c5cf3 100644 --- a/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.spec.ts +++ b/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.spec.ts @@ -14,7 +14,7 @@ import { VolumesListDataset } from 'app/interfaces/volumes-list-pool.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.harness'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { DeleteDatasetDialogComponent } from './delete-dataset-dialog.component'; describe('DeleteDatasetDialogComponent', () => { diff --git a/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.ts b/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.ts index f9e17eaf5fa..8edc591176f 100644 --- a/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.ts +++ b/src/app/pages/datasets/components/delete-dataset-dialog/delete-dataset-dialog.component.ts @@ -27,8 +27,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/components/zvol-form/zvol-form.component.spec.ts b/src/app/pages/datasets/components/zvol-form/zvol-form.component.spec.ts index 7f16452fedc..9959ece2db8 100644 --- a/src/app/pages/datasets/components/zvol-form/zvol-form.component.spec.ts +++ b/src/app/pages/datasets/components/zvol-form/zvol-form.component.spec.ts @@ -14,8 +14,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ZvolFormComponent } from 'app/pages/datasets/components/zvol-form/zvol-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ZvolFormComponent', () => { let loader: HarnessLoader; diff --git a/src/app/pages/datasets/components/zvol-form/zvol-form.component.ts b/src/app/pages/datasets/components/zvol-form/zvol-form.component.ts index 8e1e048b2af..18b00dc9ada 100644 --- a/src/app/pages/datasets/components/zvol-form/zvol-form.component.ts +++ b/src/app/pages/datasets/components/zvol-form/zvol-form.component.ts @@ -39,9 +39,9 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { getDatasetLabel } from 'app/pages/datasets/utils/dataset.utils'; -import { ApiService } from 'app/services/api.service'; import { CloudCredentialService } from 'app/services/cloud-credential.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface ZvolFormData { name?: string; diff --git a/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.spec.ts b/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.spec.ts index cedd237ce91..586e9ce6e9b 100644 --- a/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.spec.ts +++ b/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.spec.ts @@ -16,8 +16,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFileInputHarness } from 'app/modules/forms/ix-forms/components/ix-file-input/ix-file-input.harness'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { DatasetUnlockComponent } from 'app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component'; -import { ApiService } from 'app/services/api.service'; import { UploadService } from 'app/services/upload.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DatasetUnlockComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.ts b/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.ts index d77c9ec61f9..2c873d1c101 100644 --- a/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.ts +++ b/src/app/pages/datasets/modules/encryption/components/dataset-unlock/dataset-unlock.component.ts @@ -29,10 +29,10 @@ import { IxRadioGroupComponent } from 'app/modules/forms/ix-forms/components/ix- import { IxTextareaComponent } from 'app/modules/forms/ix-forms/components/ix-textarea/ix-textarea.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { UnlockSummaryDialogComponent } from 'app/pages/datasets/modules/encryption/components/unlock-summary-dialog/unlock-summary-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { UploadService } from 'app/services/upload.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface DatasetFormGroup { key?: FormControl; diff --git a/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.spec.ts b/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.spec.ts index 46d6b21b152..5e0cd47fbdd 100644 --- a/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.spec.ts @@ -13,7 +13,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxSelectHarness } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.harness'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { EncryptionOptionsDialogComponent } from 'app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { EncryptionOptionsDialogData } from './encryption-options-dialog-data.interface'; describe('EncryptionOptionsDialogComponent', () => { diff --git a/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.ts b/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.ts index 9193d633761..28e6cda7fac 100644 --- a/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.ts +++ b/src/app/pages/datasets/modules/encryption/components/encryption-options-dialog/encryption-options-dialog.component.ts @@ -33,8 +33,8 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { isPasswordEncrypted, isEncryptionRoot } from 'app/pages/datasets/utils/dataset.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { EncryptionOptionsDialogData } from './encryption-options-dialog-data.interface'; enum EncryptionType { diff --git a/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.spec.ts b/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.spec.ts index 4ddb41fbd9f..9795b8fb8dd 100644 --- a/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.spec.ts @@ -9,8 +9,8 @@ import { mockCall, mockJob, mockApi } from 'app/core/testing/utils/mock-api.util import { Dataset } from 'app/interfaces/dataset.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { ExportAllKeysDialogComponent } from 'app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ExportAllKeysDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.ts b/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.ts index 148af703185..2884a74ffbd 100644 --- a/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.ts +++ b/src/app/pages/datasets/modules/encryption/components/export-all-keys-dialog/export-all-keys-dialog.component.ts @@ -10,9 +10,9 @@ import { Dataset } from 'app/interfaces/dataset.interface'; import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.spec.ts b/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.spec.ts index f6d4fe78654..8a1d2f348ae 100644 --- a/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.spec.ts @@ -7,8 +7,8 @@ import { of } from 'rxjs'; import { fakeSuccessfulJob } from 'app/core/testing/utils/fake-job.utils'; import { mockCall, mockJob, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { Dataset } from 'app/interfaces/dataset.interface'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ExportDatasetKeyDialogComponent } from './export-dataset-key-dialog.component'; describe('ExportDatasetKeyDialogComponent', () => { diff --git a/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.ts b/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.ts index c657b7ce256..419ad4dda83 100644 --- a/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.ts +++ b/src/app/pages/datasets/modules/encryption/components/export-dataset-key-dialog/export-dataset-key-dialog.component.ts @@ -17,9 +17,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.spec.ts b/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.spec.ts index 6c90af435c6..d7e210b1eb6 100644 --- a/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.spec.ts @@ -11,7 +11,7 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { Dataset } from 'app/interfaces/dataset.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { LockDatasetDialogComponent } from './lock-dataset-dialog.component'; describe('LockDatasetDialogComponent', () => { diff --git a/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.ts b/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.ts index 91928ac8f00..7e881da5a7e 100644 --- a/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.ts +++ b/src/app/pages/datasets/modules/encryption/components/lock-dataset-dialog/lock-dataset-dialog.component.ts @@ -17,8 +17,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.spec.ts b/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.spec.ts index 1cc81b11345..659199e09ca 100644 --- a/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.spec.ts +++ b/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.spec.ts @@ -13,8 +13,8 @@ import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/i import { SaveAsPresetModalComponent } from 'app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component'; import { SaveAsPresetModalConfig } from 'app/pages/datasets/modules/permissions/interfaces/save-as-preset-modal-config.interface'; import { DatasetAclEditorStore } from 'app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store'; -import { ApiService } from 'app/services/api.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SaveAsPresetModalComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.ts b/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.ts index aaa8321d24d..899df2e4b2d 100644 --- a/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.ts +++ b/src/app/pages/datasets/modules/permissions/components/save-as-preset-modal/save-as-preset-modal.component.ts @@ -29,9 +29,9 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SaveAsPresetModalConfig } from 'app/pages/datasets/modules/permissions/interfaces/save-as-preset-modal-config.interface'; import { DatasetAclEditorStore } from 'app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.spec.ts b/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.spec.ts index ebceaaf4457..813638eb34c 100644 --- a/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.spec.ts +++ b/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.spec.ts @@ -15,7 +15,7 @@ import { SelectPresetModalConfig, } from 'app/pages/datasets/modules/permissions/interfaces/select-preset-modal-config.interface'; import { DatasetAclEditorStore } from 'app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SelectPresetModalComponent } from './select-preset-modal.component'; describe('SelectPresetModalComponent', () => { diff --git a/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.ts b/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.ts index 1b39d020902..c4adc3ff697 100644 --- a/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.ts +++ b/src/app/pages/datasets/modules/permissions/components/select-preset-modal/select-preset-modal.component.ts @@ -25,8 +25,8 @@ import { SelectPresetModalConfig, } from 'app/pages/datasets/modules/permissions/interfaces/select-preset-modal-config.interface'; import { DatasetAclEditorStore } from 'app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.spec.ts b/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.spec.ts index 6ce63e82a12..e93127fc292 100644 --- a/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.spec.ts +++ b/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.spec.ts @@ -13,7 +13,7 @@ import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-chec import { StripAclModalComponent, StripAclModalData, } from 'app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('StripAclModalComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.ts b/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.ts index 42071f39260..b6eefe52b9b 100644 --- a/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.ts +++ b/src/app/pages/datasets/modules/permissions/components/strip-acl-modal/strip-acl-modal.component.ts @@ -14,8 +14,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface StripAclModalData { path: string; diff --git a/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.spec.ts b/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.spec.ts index 656bfb8e774..16cd4f080af 100644 --- a/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.spec.ts +++ b/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.spec.ts @@ -13,7 +13,7 @@ import { AclEditorSaveControlsComponent, } from 'app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component'; import { DatasetAclEditorStore } from 'app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AclEditorSaveControlsComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.ts b/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.ts index 082736008bd..52194e1bdc9 100644 --- a/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.ts +++ b/src/app/pages/datasets/modules/permissions/containers/dataset-acl-editor/acl-editor-save-controls/acl-editor-save-controls.component.ts @@ -15,7 +15,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { DatasetAclEditorStore } from 'app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.spec.ts b/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.spec.ts index c9abcb814ee..04cae79ebda 100644 --- a/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.spec.ts +++ b/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.spec.ts @@ -14,9 +14,9 @@ import { Dataset } from 'app/interfaces/dataset.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxPermissionsComponent } from 'app/modules/forms/ix-forms/components/ix-permissions/ix-permissions.component'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { ApiService } from 'app/services/api.service'; import { StorageService } from 'app/services/storage.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { DatasetTrivialPermissionsComponent } from './dataset-trivial-permissions.component'; describe('DatasetTrivialPermissionsComponent', () => { diff --git a/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.ts b/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.ts index 3cbfa9ca483..92a9df19e28 100644 --- a/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.ts +++ b/src/app/pages/datasets/modules/permissions/containers/dataset-trivial-permissions/dataset-trivial-permissions.component.ts @@ -32,10 +32,10 @@ import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-vali import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { StorageService } from 'app/services/storage.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/permissions/containers/permissions-card/permissions-card.component.spec.ts b/src/app/pages/datasets/modules/permissions/containers/permissions-card/permissions-card.component.spec.ts index 7ccc70361fb..e49680c316c 100644 --- a/src/app/pages/datasets/modules/permissions/containers/permissions-card/permissions-card.component.spec.ts +++ b/src/app/pages/datasets/modules/permissions/containers/permissions-card/permissions-card.component.spec.ts @@ -27,7 +27,7 @@ import { PermissionsCardComponent, } from 'app/pages/datasets/modules/permissions/containers/permissions-card/permissions-card.component'; import { PermissionsCardStore } from 'app/pages/datasets/modules/permissions/stores/permissions-card.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('PermissionsCardComponent', () => { const stat = { diff --git a/src/app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store.ts b/src/app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store.ts index eb1bea8db62..1130647717b 100644 --- a/src/app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store.ts +++ b/src/app/pages/datasets/modules/permissions/stores/dataset-acl-editor.store.ts @@ -22,10 +22,10 @@ import { DatasetAclEditorState, } from 'app/pages/datasets/modules/permissions/interfaces/dataset-acl-editor-state.interface'; import { newNfsAce, newPosixAce } from 'app/pages/datasets/modules/permissions/utils/new-ace.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { StorageService } from 'app/services/storage.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; const initialState: DatasetAclEditorState = { isLoading: false, diff --git a/src/app/pages/datasets/modules/permissions/stores/permissions-card.store.ts b/src/app/pages/datasets/modules/permissions/stores/permissions-card.store.ts index 53ffa58d8b6..a3b930302b1 100644 --- a/src/app/pages/datasets/modules/permissions/stores/permissions-card.store.ts +++ b/src/app/pages/datasets/modules/permissions/stores/permissions-card.store.ts @@ -8,8 +8,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { PermissionsCardState, } from 'app/pages/datasets/modules/permissions/interfaces/permissions-sidebar-state.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; const initialState: PermissionsCardState = { isLoading: false, diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-add-form/snapshot-add-form.component.ts b/src/app/pages/datasets/modules/snapshots/snapshot-add-form/snapshot-add-form.component.ts index 4c6e6574451..07f2c4ef7fe 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-add-form/snapshot-add-form.component.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-add-form/snapshot-add-form.component.ts @@ -38,8 +38,8 @@ import { snapshotExcludeBootQueryFilter, } from 'app/pages/datasets/modules/snapshots/constants/snapshot-exclude-boot.constant'; import { DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.spec.ts b/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.spec.ts index 476fe9fa0a1..fc9c7a9cef9 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.spec.ts @@ -13,7 +13,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnapshotBatchDeleteDialogComponent } from 'app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component'; import { fakeZfsSnapshotDataSource } from 'app/pages/datasets/modules/snapshots/testing/snapshot-fake-datasource'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const mockJobSuccessResponse = [{ result: true, diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.ts b/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.ts index 1eeb3d794b3..4a673fe1a26 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-batch-delete-dialog/snapshot-batch-delete-dialog.component.ts @@ -24,8 +24,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SnapshotDialogData } from 'app/pages/datasets/modules/snapshots/interfaces/snapshot-dialog-data.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; @UntilDestroy() diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.spec.ts b/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.spec.ts index b84dfb284b4..cbccfe8b154 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.spec.ts @@ -8,7 +8,7 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SnapshotCloneDialogComponent } from './snapshot-clone-dialog.component'; describe('SnapshotCloneDialogComponent', () => { diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.ts b/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.ts index bd81dcf032a..240ba73902a 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component.ts @@ -15,7 +15,7 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.spec.ts b/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.spec.ts index ff93b9ac0b8..e5171361e01 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.spec.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.spec.ts @@ -17,7 +17,7 @@ import { SnapshotCloneDialogComponent } from 'app/pages/datasets/modules/snapsho import { SnapshotDetailsRowComponent } from 'app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component'; import { SnapshotRollbackDialogComponent } from 'app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component'; import { fakeZfsSnapshot } from 'app/pages/datasets/modules/snapshots/testing/snapshot-fake-datasource'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SnapshotDetailsRowComponent', () => { let spectator: SpectatorRouting; diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.ts b/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.ts index cacf9f1b26a..840d9815ee1 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-details-row/snapshot-details-row.component.ts @@ -26,8 +26,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { SnapshotCloneDialogComponent } from 'app/pages/datasets/modules/snapshots/snapshot-clone-dialog/snapshot-clone-dialog.component'; import { ZfsSnapshotUi } from 'app/pages/datasets/modules/snapshots/snapshot-list/snapshot-list.component'; import { SnapshotRollbackDialogComponent } from 'app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.spec.ts b/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.spec.ts index 89766a7274f..a9d9f2253c6 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.spec.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.spec.ts @@ -11,7 +11,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { fakeZfsSnapshot } from 'app/pages/datasets/modules/snapshots//testing/snapshot-fake-datasource'; import { SnapshotRollbackDialogComponent } from 'app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SnapshotRollbackDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.ts b/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.ts index eb7cfee01eb..02873f9a40a 100644 --- a/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.ts +++ b/src/app/pages/datasets/modules/snapshots/snapshot-rollback-dialog/snapshot-rollback-dialog.component.ts @@ -26,8 +26,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/datasets/modules/snapshots/store/snapshot.effects.ts b/src/app/pages/datasets/modules/snapshots/store/snapshot.effects.ts index 3774d0d41d5..6eb12331a33 100644 --- a/src/app/pages/datasets/modules/snapshots/store/snapshot.effects.ts +++ b/src/app/pages/datasets/modules/snapshots/store/snapshot.effects.ts @@ -15,7 +15,7 @@ import { snapshotPageEntered, snapshotRemoved, snapshotsLoaded, snapshotsNotLoaded, } from 'app/pages/datasets/modules/snapshots/store/snapshot.actions'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForPreferences } from 'app/store/preferences/preferences.selectors'; diff --git a/src/app/pages/datasets/store/dataset-store.service.spec.ts b/src/app/pages/datasets/store/dataset-store.service.spec.ts index f096e482888..53584158cfa 100644 --- a/src/app/pages/datasets/store/dataset-store.service.spec.ts +++ b/src/app/pages/datasets/store/dataset-store.service.spec.ts @@ -5,7 +5,7 @@ import { TestScheduler } from 'rxjs/testing'; import { getTestScheduler } from 'app/core/testing/utils/get-test-scheduler.utils'; import { Dataset, DatasetDetails } from 'app/interfaces/dataset.interface'; import { DatasetTreeState, DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DatasetTreeStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/datasets/store/dataset-store.service.ts b/src/app/pages/datasets/store/dataset-store.service.ts index 7149aa9d0bb..dce563e66c8 100644 --- a/src/app/pages/datasets/store/dataset-store.service.ts +++ b/src/app/pages/datasets/store/dataset-store.service.ts @@ -7,7 +7,7 @@ import { import { ApiError } from 'app/interfaces/api-error.interface'; import { DatasetDetails } from 'app/interfaces/dataset.interface'; import { getTreeBranchToNode } from 'app/pages/datasets/utils/get-tree-branch-to-node.utils'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface DatasetTreeState { isLoading: boolean; diff --git a/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts b/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts index 3ab59151900..a792ab61471 100644 --- a/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts +++ b/src/app/pages/directory-service/components/active-directory/active-directory.component.spec.ts @@ -25,9 +25,9 @@ import { import { LeaveDomainDialogComponent, } from 'app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ActiveDirectoryComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/directory-service/components/active-directory/active-directory.component.ts b/src/app/pages/directory-service/components/active-directory/active-directory.component.ts index b9641a982be..8cb40af6893 100644 --- a/src/app/pages/directory-service/components/active-directory/active-directory.component.ts +++ b/src/app/pages/directory-service/components/active-directory/active-directory.component.ts @@ -31,9 +31,9 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { LeaveDomainDialogComponent, } from 'app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/idmap-form/idmap-form.component.spec.ts b/src/app/pages/directory-service/components/idmap-form/idmap-form.component.spec.ts index ad9c6d2e9ef..c2a20ecdd8b 100644 --- a/src/app/pages/directory-service/components/idmap-form/idmap-form.component.spec.ts +++ b/src/app/pages/directory-service/components/idmap-form/idmap-form.component.spec.ts @@ -24,9 +24,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { IdmapFormComponent } from 'app/pages/directory-service/components/idmap-form/idmap-form.component'; -import { ApiService } from 'app/services/api.service'; import { IdmapService } from 'app/services/idmap.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('IdmapFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts b/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts index 363d02ec976..4b903a965bd 100644 --- a/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts +++ b/src/app/pages/directory-service/components/idmap-form/idmap-form.component.ts @@ -35,10 +35,10 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { requiredIdmapDomains } from 'app/pages/directory-service/utils/required-idmap-domains.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IdmapService } from 'app/services/idmap.service'; import { greaterThanFg, rangeValidator } from 'app/services/validators'; +import { ApiService } from 'app/services/websocket/api.service'; const minAllowedRange = 1000; const maxAllowedRange = 2147483647; diff --git a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts index 1ae5ae20216..610a13ee66c 100644 --- a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts +++ b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.spec.ts @@ -18,8 +18,8 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { IdmapFormComponent } from 'app/pages/directory-service/components/idmap-form/idmap-form.component'; import { IdmapListComponent } from 'app/pages/directory-service/components/idmap-list/idmap-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('IdmapListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts index 9d9aac35d48..991f30a65d2 100644 --- a/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts +++ b/src/app/pages/directory-service/components/idmap-list/idmap-list.component.ts @@ -38,10 +38,10 @@ import { IdmapFormComponent } from 'app/pages/directory-service/components/idmap import { idMapElements } from 'app/pages/directory-service/components/idmap-list/idmap-list.elements'; import { IdmapRow } from 'app/pages/directory-service/components/idmap-list/idmap-row.interface'; import { requiredIdmapDomains } from 'app/pages/directory-service/utils/required-idmap-domains.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IdmapService } from 'app/services/idmap.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts index 03ee000dd23..e59d2d5c87c 100644 --- a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts +++ b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component.ts @@ -20,7 +20,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts index 5a5d92453a2..5c24d97cf03 100644 --- a/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts +++ b/src/app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.component.ts @@ -31,9 +31,9 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { TestDirective } from 'app/modules/test-id/test.directive'; import { KerberosKeytabsFormComponent } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-form/kerberos-keytabs-form.component'; import { kerberosKeytabsListElements } from 'app/pages/directory-service/components/kerberos-keytabs/kerberos-keytabs-list/kerberos-keytabs-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.spec.ts b/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.spec.ts index bfae070f438..b0590e8a557 100644 --- a/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.spec.ts +++ b/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.spec.ts @@ -11,8 +11,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { KerberosRealmsFormComponent } from 'app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('KerberosRealmsFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts b/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts index beb7979f62d..cedaaef3b36 100644 --- a/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts +++ b/src/app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component.ts @@ -20,7 +20,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts b/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts index 4b96655bfcc..144d8b663a3 100644 --- a/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts +++ b/src/app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component.ts @@ -34,9 +34,9 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { KerberosRealmRow } from 'app/pages/directory-service/components/kerberos-realms/kerberos-realm-row.interface'; import { kerberosRealmsListElements } from 'app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.elements'; import { KerberosRealmsFormComponent } from 'app/pages/directory-service/components/kerberos-realms-form/kerberos-realms-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.spec.ts b/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.spec.ts index f05c2905d6d..e15fb2729bc 100644 --- a/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.spec.ts +++ b/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.spec.ts @@ -12,8 +12,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { KerberosSettingsComponent } from 'app/pages/directory-service/components/kerberos-settings/kerberos-settings.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('KerberosSettingsComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts b/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts index 595e3e10862..76599e3298b 100644 --- a/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts +++ b/src/app/pages/directory-service/components/kerberos-settings/kerberos-settings.component.ts @@ -18,8 +18,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-header/modal-header.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts b/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts index 851218709f7..d7e448940d4 100644 --- a/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts +++ b/src/app/pages/directory-service/components/ldap/ldap.component.spec.ts @@ -19,9 +19,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { LdapComponent } from 'app/pages/directory-service/components/ldap/ldap.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('LdapComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/directory-service/components/ldap/ldap.component.ts b/src/app/pages/directory-service/components/ldap/ldap.component.ts index 0c4c449ca1d..57a9e2b631d 100644 --- a/src/app/pages/directory-service/components/ldap/ldap.component.ts +++ b/src/app/pages/directory-service/components/ldap/ldap.component.ts @@ -27,9 +27,9 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.spec.ts b/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.spec.ts index 7a0d97d8f19..38a278d03b8 100644 --- a/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.spec.ts +++ b/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { LeaveDomainDialogComponent } from './leave-domain-dialog.component'; describe('LeaveDomainDialogComponent', () => { diff --git a/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts b/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts index 3e677f24b56..6fd437182ba 100644 --- a/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts +++ b/src/app/pages/directory-service/components/leave-domain-dialog/leave-domain-dialog.component.ts @@ -15,8 +15,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/directory-service/directory-services.component.ts b/src/app/pages/directory-service/directory-services.component.ts index 9aff8e0193a..8a72341d237 100644 --- a/src/app/pages/directory-service/directory-services.component.ts +++ b/src/app/pages/directory-service/directory-services.component.ts @@ -31,8 +31,8 @@ import { KerberosKeytabsListComponent } from 'app/pages/directory-service/compon import { KerberosRealmsListComponent } from 'app/pages/directory-service/components/kerberos-realms/kerberos-realms-list.component'; import { KerberosSettingsComponent } from 'app/pages/directory-service/components/kerberos-settings/kerberos-settings.component'; import { directoryServicesElements } from 'app/pages/directory-service/directory-services.elements'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { LdapComponent } from './components/ldap/ldap.component'; interface DataCard { diff --git a/src/app/pages/network/components/configuration/configuration.component.spec.ts b/src/app/pages/network/components/configuration/configuration.component.spec.ts index 138b6ec9276..b118ffa6e94 100644 --- a/src/app/pages/network/components/configuration/configuration.component.spec.ts +++ b/src/app/pages/network/components/configuration/configuration.component.spec.ts @@ -15,10 +15,10 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { NetworkConfigurationComponent } from 'app/pages/network/components/configuration/configuration.component'; -import { ApiService } from 'app/services/api.service'; import { LanguageService } from 'app/services/language.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('NetworkConfigurationComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/network/components/configuration/configuration.component.ts b/src/app/pages/network/components/configuration/configuration.component.ts index 7036de580bb..89c3b195d2a 100644 --- a/src/app/pages/network/components/configuration/configuration.component.ts +++ b/src/app/pages/network/components/configuration/configuration.component.ts @@ -29,9 +29,9 @@ import { ipv4Validator, ipv6Validator } from 'app/modules/forms/ix-forms/validat import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-header/modal-header.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.spec.ts b/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.spec.ts index 1accc152aef..64616e2c702 100644 --- a/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.spec.ts +++ b/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { NetworkSummary } from 'app/interfaces/network-summary.interface'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; import { DefaultGatewayDialogComponent } from 'app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DefaultGatewayDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts b/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts index 64cef800b0e..84637036fcd 100644 --- a/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts +++ b/src/app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component.ts @@ -22,8 +22,8 @@ import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-vali import { ipv4Validator } from 'app/modules/forms/ix-forms/validators/ip-validation'; import { WithLoadingStateDirective } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/network/components/interface-form/interface-form.component.spec.ts b/src/app/pages/network/components/interface-form/interface-form.component.spec.ts index a4a21d7acb6..84cf06f54df 100644 --- a/src/app/pages/network/components/interface-form/interface-form.component.spec.ts +++ b/src/app/pages/network/components/interface-form/interface-form.component.spec.ts @@ -32,10 +32,10 @@ import { DefaultGatewayDialogComponent, } from 'app/pages/network/components/default-gateway-dialog/default-gateway-dialog.component'; import { InterfaceFormComponent } from 'app/pages/network/components/interface-form/interface-form.component'; -import { ApiService } from 'app/services/api.service'; import { NetworkService } from 'app/services/network.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { haInfoReducer } from 'app/store/ha-info/ha-info.reducer'; import { haInfoStateKey } from 'app/store/ha-info/ha-info.selectors'; import { networkInterfacesChanged } from 'app/store/network-interfaces/network-interfaces.actions'; diff --git a/src/app/pages/network/components/interface-form/interface-form.component.ts b/src/app/pages/network/components/interface-form/interface-form.component.ts index 8529b5b7a69..d308caf9fcd 100644 --- a/src/app/pages/network/components/interface-form/interface-form.component.ts +++ b/src/app/pages/network/components/interface-form/interface-form.component.ts @@ -58,9 +58,9 @@ import { interfaceAliasesToFormAliases, NetworkInterfaceFormAlias, } from 'app/pages/network/components/interface-form/network-interface-alias-control.interface'; -import { ApiService } from 'app/services/api.service'; import { NetworkService } from 'app/services/network.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { networkInterfacesChanged } from 'app/store/network-interfaces/network-interfaces.actions'; diff --git a/src/app/pages/network/components/interfaces-card/interfaces-card.component.spec.ts b/src/app/pages/network/components/interfaces-card/interfaces-card.component.spec.ts index c695f448dab..bc32887b413 100644 --- a/src/app/pages/network/components/interfaces-card/interfaces-card.component.spec.ts +++ b/src/app/pages/network/components/interfaces-card/interfaces-card.component.spec.ts @@ -22,9 +22,9 @@ import { IpAddressesCellComponent, } from 'app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component'; import { InterfacesState, InterfacesStore } from 'app/pages/network/stores/interfaces.store'; -import { ApiService } from 'app/services/api.service'; import { NetworkService } from 'app/services/network.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InterfacesCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts b/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts index 2179315c1dc..2a8dc7ccb80 100644 --- a/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts +++ b/src/app/pages/network/components/interfaces-card/interfaces-card.component.ts @@ -42,10 +42,10 @@ import { ipAddressesColumn, } from 'app/pages/network/components/interfaces-card/ip-addresses-cell/ip-addresses-cell.component'; import { InterfacesStore } from 'app/pages/network/stores/interfaces.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { NetworkService } from 'app/services/network.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { networkInterfacesChanged } from 'app/store/network-interfaces/network-interfaces.actions'; diff --git a/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts b/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts index 49474ac7958..7f029494115 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-card.component.ts @@ -27,8 +27,8 @@ import { IpmiEventsDialogComponent, } from 'app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component'; import { IpmiFormComponent } from 'app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.spec.ts b/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.spec.ts index 024e6ea012d..c175f628eb7 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.spec.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.spec.ts @@ -12,7 +12,7 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { IpmiEventsDialogComponent, } from 'app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('IpmiEventsDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts b/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts index 30671901ea0..6e9ab17d544 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-events-dialog/ipmi-events-dialog.component.ts @@ -19,8 +19,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.spec.ts b/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.spec.ts index fdfe6189a83..62e597d7f59 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.spec.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.spec.ts @@ -19,10 +19,10 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { IpmiFormComponent } from 'app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component'; -import { ApiService } from 'app/services/api.service'; import { RedirectService } from 'app/services/redirect.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { haInfoReducer } from 'app/store/ha-info/ha-info.reducer'; import { haInfoStateKey } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts b/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts index 80cd4f632d2..6662efd02be 100644 --- a/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts +++ b/src/app/pages/network/components/ipmi-card/ipmi-form/ipmi-form.component.ts @@ -33,10 +33,10 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { RedirectService } from 'app/services/redirect.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.spec.ts b/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.spec.ts index 44c11dbc3cc..c8e716a659b 100644 --- a/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.spec.ts +++ b/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.spec.ts @@ -12,8 +12,8 @@ import { NetworkSummary } from 'app/interfaces/network-summary.interface'; import { CastPipe } from 'app/modules/pipes/cast/cast.pipe'; import { NetworkConfigurationComponent } from 'app/pages/network/components/configuration/configuration.component'; import { NetworkConfigurationCardComponent } from 'app/pages/network/components/network-configuration-card/network-configuration-card.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('NetworkConfigurationCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts b/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts index ca9e34701ea..584e63cee74 100644 --- a/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts +++ b/src/app/pages/network/components/network-configuration-card/network-configuration-card.component.ts @@ -24,8 +24,8 @@ import { NetworkConfigurationComponent } from 'app/pages/network/components/conf import { networkConfigurationCardElements, } from 'app/pages/network/components/network-configuration-card/network-configuration-card.elements'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { networkInterfacesChanged } from 'app/store/network-interfaces/network-interfaces.actions'; @UntilDestroy() diff --git a/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts b/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts index 7a11102df73..4ccaf6d3461 100644 --- a/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts +++ b/src/app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component.ts @@ -16,8 +16,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/network/components/static-route-form/static-route-form.component.spec.ts b/src/app/pages/network/components/static-route-form/static-route-form.component.spec.ts index 43332c761f8..15508cbe517 100644 --- a/src/app/pages/network/components/static-route-form/static-route-form.component.spec.ts +++ b/src/app/pages/network/components/static-route-form/static-route-form.component.spec.ts @@ -11,8 +11,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { StaticRouteFormComponent } from 'app/pages/network/components/static-route-form/static-route-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('StaticRouteFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/network/components/static-route-form/static-route-form.component.ts b/src/app/pages/network/components/static-route-form/static-route-form.component.ts index 49f289f4696..9c30151b7aa 100644 --- a/src/app/pages/network/components/static-route-form/static-route-form.component.ts +++ b/src/app/pages/network/components/static-route-form/static-route-form.component.ts @@ -22,7 +22,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts b/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts index dc8c1504d07..a6907fc11f3 100644 --- a/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts +++ b/src/app/pages/network/components/static-routes-card/static-routes-card.component.ts @@ -31,8 +31,8 @@ import { } from 'app/pages/network/components/static-route-delete-dialog/static-route-delete-dialog.component'; import { StaticRouteFormComponent } from 'app/pages/network/components/static-route-form/static-route-form.component'; import { staticRoutesCardElements } from 'app/pages/network/components/static-routes-card/static-routes-card.elements'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/network/network.component.ts b/src/app/pages/network/network.component.ts index d5d023ba3d6..3f32e296080 100644 --- a/src/app/pages/network/network.component.ts +++ b/src/app/pages/network/network.component.ts @@ -30,11 +30,11 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { InterfaceFormComponent } from 'app/pages/network/components/interface-form/interface-form.component'; import { networkElements } from 'app/pages/network/network.elements'; import { InterfacesStore } from 'app/pages/network/stores/interfaces.store'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectHaStatus, selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { networkInterfacesChanged } from 'app/store/network-interfaces/network-interfaces.actions'; diff --git a/src/app/pages/network/stores/interfaces.store.ts b/src/app/pages/network/stores/interfaces.store.ts index 732788134ea..0d4eea9ec30 100644 --- a/src/app/pages/network/stores/interfaces.store.ts +++ b/src/app/pages/network/stores/interfaces.store.ts @@ -3,8 +3,8 @@ import { ComponentStore } from '@ngrx/component-store'; import { switchMap, tap } from 'rxjs/operators'; import { NetworkInterface } from 'app/interfaces/network-interface.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface InterfacesState { interfaces: NetworkInterface[]; diff --git a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.spec.ts b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.spec.ts index 52d41724287..d136fc64121 100644 --- a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.spec.ts +++ b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.spec.ts @@ -14,7 +14,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ReportingExportersFormComponent } from 'app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ReportingExportersFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.ts b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.ts index 61bb69731aa..0841b89933d 100644 --- a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.ts +++ b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component.ts @@ -38,8 +38,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.spec.ts b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.spec.ts index a29afcd49ff..ba898d62f6d 100644 --- a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.spec.ts +++ b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.spec.ts @@ -14,8 +14,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { ReportingExportersFormComponent } from 'app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component'; import { ReportingExporterListComponent } from 'app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const exporters: ReportingExporter[] = [ { diff --git a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.ts b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.ts index adbc794a701..c2049529dcc 100644 --- a/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.ts +++ b/src/app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.component.ts @@ -35,9 +35,9 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { TestDirective } from 'app/modules/test-id/test.directive'; import { ReportingExportersFormComponent } from 'app/pages/reports-dashboard/components/exporters/reporting-exporters-form/reporting-exporters-form.component'; import { reportingExportersElements } from 'app/pages/reports-dashboard/components/exporters/reporting-exporters-list/reporting-exporters-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.spec.ts b/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.spec.ts index 5b3adbf7360..d0936f61fc8 100644 --- a/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.spec.ts +++ b/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { NetdataDialogComponent, } from 'app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component'; import { ReportsService } from 'app/pages/reports-dashboard/reports.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('NetdataDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.ts b/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.ts index e5f618950af..bb274b129db 100644 --- a/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.ts +++ b/src/app/pages/reports-dashboard/components/reports-global-controls/netdata-dialog/netdata-dialog.component.ts @@ -16,9 +16,9 @@ import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ReportsService } from 'app/pages/reports-dashboard/reports.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/reports-dashboard/reports.service.ts b/src/app/pages/reports-dashboard/reports.service.ts index 6b5bf115e75..c5536d96a81 100644 --- a/src/app/pages/reports-dashboard/reports.service.ts +++ b/src/app/pages/reports-dashboard/reports.service.ts @@ -12,9 +12,9 @@ import { ReportingData } from 'app/interfaces/reporting.interface'; import { ReportTab, reportTypeLabels, ReportType } from 'app/pages/reports-dashboard/interfaces/report-tab.interface'; import { LegendDataWithStackedTotalHtml, Report } from 'app/pages/reports-dashboard/interfaces/report.interface'; import { convertAggregations, optimizeLegend } from 'app/pages/reports-dashboard/utils/report.utils'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/pages/services/components/service-ftp/service-ftp.component.spec.ts b/src/app/pages/services/components/service-ftp/service-ftp.component.spec.ts index ecbd9fa09df..f14814370b0 100644 --- a/src/app/pages/services/components/service-ftp/service-ftp.component.spec.ts +++ b/src/app/pages/services/components/service-ftp/service-ftp.component.spec.ts @@ -16,9 +16,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ServiceFtpComponent } from 'app/pages/services/components/service-ftp/service-ftp.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ServiceFtpComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/services/components/service-ftp/service-ftp.component.ts b/src/app/pages/services/components/service-ftp/service-ftp.component.ts index a26e533163e..bcbd3f8b2eb 100644 --- a/src/app/pages/services/components/service-ftp/service-ftp.component.ts +++ b/src/app/pages/services/components/service-ftp/service-ftp.component.ts @@ -31,10 +31,10 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.spec.ts b/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.spec.ts index 1c0726fdd92..e1ea75208d7 100644 --- a/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.spec.ts +++ b/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.spec.ts @@ -9,7 +9,7 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { AddSpnDialogComponent } from 'app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AddSpnDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts b/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts index 18cc3a67554..ec0054e5828 100644 --- a/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts +++ b/src/app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component.ts @@ -13,8 +13,8 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { CloudSyncRestoreDialogComponent } from 'app/pages/data-protection/cloudsync/cloudsync-restore-dialog/cloudsync-restore-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/components/service-nfs/service-nfs.component.spec.ts b/src/app/pages/services/components/service-nfs/service-nfs.component.spec.ts index 451a7d85515..d8e0da48dd0 100644 --- a/src/app/pages/services/components/service-nfs/service-nfs.component.spec.ts +++ b/src/app/pages/services/components/service-nfs/service-nfs.component.spec.ts @@ -21,8 +21,8 @@ import { AddSpnDialogComponent, } from 'app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component'; import { ServiceNfsComponent } from 'app/pages/services/components/service-nfs/service-nfs.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectIsEnterprise } from 'app/store/system-info/system-info.selectors'; describe('ServiceNfsComponent', () => { diff --git a/src/app/pages/services/components/service-nfs/service-nfs.component.ts b/src/app/pages/services/components/service-nfs/service-nfs.component.ts index f101010a9e8..036518f1490 100644 --- a/src/app/pages/services/components/service-nfs/service-nfs.component.ts +++ b/src/app/pages/services/components/service-nfs/service-nfs.component.ts @@ -38,8 +38,8 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { TooltipComponent } from 'app/modules/tooltip/tooltip.component'; import { AddSpnDialogComponent } from 'app/pages/services/components/service-nfs/add-spn-dialog/add-spn-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsEnterprise } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/services/components/service-smart/service-smart.component.spec.ts b/src/app/pages/services/components/service-smart/service-smart.component.spec.ts index 6c47d99e5b0..b268f444c56 100644 --- a/src/app/pages/services/components/service-smart/service-smart.component.spec.ts +++ b/src/app/pages/services/components/service-smart/service-smart.component.spec.ts @@ -13,8 +13,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServiceSmartComponent } from './service-smart.component'; describe('ServiceSmartComponent', () => { diff --git a/src/app/pages/services/components/service-smart/service-smart.component.ts b/src/app/pages/services/components/service-smart/service-smart.component.ts index 11b6a5924d7..8f8ef656a5c 100644 --- a/src/app/pages/services/components/service-smart/service-smart.component.ts +++ b/src/app/pages/services/components/service-smart/service-smart.component.ts @@ -22,8 +22,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/components/service-smb/service-smb.component.spec.ts b/src/app/pages/services/components/service-smb/service-smb.component.spec.ts index 19537f2d4f3..9df842f0f85 100644 --- a/src/app/pages/services/components/service-smb/service-smb.component.spec.ts +++ b/src/app/pages/services/components/service-smb/service-smb.component.spec.ts @@ -16,10 +16,10 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ServiceSmbComponent } from 'app/pages/services/components/service-smb/service-smb.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ServiceSmbComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/services/components/service-smb/service-smb.component.ts b/src/app/pages/services/components/service-smb/service-smb.component.ts index 51074c074e8..c4c4daab499 100644 --- a/src/app/pages/services/components/service-smb/service-smb.component.ts +++ b/src/app/pages/services/components/service-smb/service-smb.component.ts @@ -32,9 +32,9 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy({ arrayName: 'subscriptions' }) @Component({ diff --git a/src/app/pages/services/components/service-snmp/service-snmp.component.spec.ts b/src/app/pages/services/components/service-snmp/service-snmp.component.spec.ts index c972edd100d..d12017d2ec6 100644 --- a/src/app/pages/services/components/service-snmp/service-snmp.component.spec.ts +++ b/src/app/pages/services/components/service-snmp/service-snmp.component.spec.ts @@ -10,7 +10,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServiceSnmpComponent } from './service-snmp.component'; describe('ServiceSnmpComponent', () => { diff --git a/src/app/pages/services/components/service-snmp/service-snmp.component.ts b/src/app/pages/services/components/service-snmp/service-snmp.component.ts index 8c025e9ae3f..93bda651441 100644 --- a/src/app/pages/services/components/service-snmp/service-snmp.component.ts +++ b/src/app/pages/services/components/service-snmp/service-snmp.component.ts @@ -25,8 +25,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/components/service-ssh/service-ssh.component.spec.ts b/src/app/pages/services/components/service-ssh/service-ssh.component.spec.ts index 8f7e1ddcff0..b8f8074ebd0 100644 --- a/src/app/pages/services/components/service-ssh/service-ssh.component.spec.ts +++ b/src/app/pages/services/components/service-ssh/service-ssh.component.spec.ts @@ -14,8 +14,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ServiceSshComponent } from 'app/pages/services/components/service-ssh/service-ssh.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeGroupDataSource = [{ id: 1, diff --git a/src/app/pages/services/components/service-ssh/service-ssh.component.ts b/src/app/pages/services/components/service-ssh/service-ssh.component.ts index aacf1a94a74..03e347525bb 100644 --- a/src/app/pages/services/components/service-ssh/service-ssh.component.ts +++ b/src/app/pages/services/components/service-ssh/service-ssh.component.ts @@ -27,9 +27,9 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/components/service-state-column/service-state-column.component.spec.ts b/src/app/pages/services/components/service-state-column/service-state-column.component.spec.ts index 165a9bd400f..6ec7825ceac 100644 --- a/src/app/pages/services/components/service-state-column/service-state-column.component.spec.ts +++ b/src/app/pages/services/components/service-state-column/service-state-column.component.spec.ts @@ -12,8 +12,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { ServiceStateColumnComponent, } from 'app/pages/services/components/service-state-column/service-state-column.component'; -import { ApiService } from 'app/services/api.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ServiceStateColumnComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/services/components/service-state-column/service-state-column.component.ts b/src/app/pages/services/components/service-state-column/service-state-column.component.ts index df8f1d7a353..39d0734f9b5 100644 --- a/src/app/pages/services/components/service-state-column/service-state-column.component.ts +++ b/src/app/pages/services/components/service-state-column/service-state-column.component.ts @@ -16,10 +16,10 @@ import { convertStringToId } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { ServicesService } from 'app/services/services.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/components/service-ups/service-ups.component.spec.ts b/src/app/pages/services/components/service-ups/service-ups.component.spec.ts index 6d34d6c8572..e2b92811597 100644 --- a/src/app/pages/services/components/service-ups/service-ups.component.spec.ts +++ b/src/app/pages/services/components/service-ups/service-ups.component.spec.ts @@ -13,7 +13,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ServiceUpsComponent } from 'app/pages/services/components/service-ups/service-ups.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ServiceUpsComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/services/components/service-ups/service-ups.component.ts b/src/app/pages/services/components/service-ups/service-ups.component.ts index 52f07e99a49..b7624f88109 100644 --- a/src/app/pages/services/components/service-ups/service-ups.component.ts +++ b/src/app/pages/services/components/service-ups/service-ups.component.ts @@ -28,8 +28,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/services/services.component.spec.ts b/src/app/pages/services/services.component.spec.ts index f24d7310d6e..8f266cbdb2b 100644 --- a/src/app/pages/services/services.component.spec.ts +++ b/src/app/pages/services/services.component.spec.ts @@ -29,9 +29,9 @@ import { } from 'app/pages/services/components/service-state-column/service-state-column.component'; import { ServiceUpsComponent } from 'app/pages/services/components/service-ups/service-ups.component'; import { ServicesComponent } from 'app/pages/services/services.component'; -import { ApiService } from 'app/services/api.service'; import { IscsiService } from 'app/services/iscsi.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { initialState } from 'app/store/services/services.reducer'; import { selectServices } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/services/services.component.ts b/src/app/pages/services/services.component.ts index 9a74c642cf3..dae5aa4313c 100644 --- a/src/app/pages/services/services.component.ts +++ b/src/app/pages/services/services.component.ts @@ -41,12 +41,12 @@ import { } from 'app/pages/services/components/service-state-column/service-state-column.component'; import { ServiceUpsComponent } from 'app/pages/services/components/service-ups/service-ups.component'; import { servicesElements } from 'app/pages/services/services.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { ServicesService } from 'app/services/services.service'; import { SlideInService } from 'app/services/slide-in.service'; import { UrlOptionsService } from 'app/services/url-options.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { serviceChanged } from 'app/store/services/services.actions'; import { ServicesState } from 'app/store/services/services.reducer'; import { waitForServices } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/components/shares-dashboard/iscsi-card/iscsi-card.component.ts b/src/app/pages/sharing/components/shares-dashboard/iscsi-card/iscsi-card.component.ts index e7f2dd6a312..846dbb8c2a7 100644 --- a/src/app/pages/sharing/components/shares-dashboard/iscsi-card/iscsi-card.component.ts +++ b/src/app/pages/sharing/components/shares-dashboard/iscsi-card/iscsi-card.component.ts @@ -35,9 +35,9 @@ import { ServiceExtraActionsComponent } from 'app/pages/sharing/components/share import { ServiceStateButtonComponent } from 'app/pages/sharing/components/shares-dashboard/service-state-button/service-state-button.component'; import { IscsiWizardComponent } from 'app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component'; import { TargetFormComponent } from 'app/pages/sharing/iscsi/target/target-form/target-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectService } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.spec.ts b/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.spec.ts index 00b799860c5..c135edbc5c2 100644 --- a/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.spec.ts +++ b/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.spec.ts @@ -24,8 +24,8 @@ import { NfsCardComponent } from 'app/pages/sharing/components/shares-dashboard/ import { ServiceExtraActionsComponent } from 'app/pages/sharing/components/shares-dashboard/service-extra-actions/service-extra-actions.component'; import { ServiceStateButtonComponent } from 'app/pages/sharing/components/shares-dashboard/service-state-button/service-state-button.component'; import { NfsFormComponent } from 'app/pages/sharing/nfs/nfs-form/nfs-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectServices } from 'app/store/services/services.selectors'; describe('NfsCardComponent', () => { diff --git a/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.ts b/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.ts index 638c6cabcd9..495f289a952 100644 --- a/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.ts +++ b/src/app/pages/sharing/components/shares-dashboard/nfs-card/nfs-card.component.ts @@ -32,9 +32,9 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { ServiceExtraActionsComponent } from 'app/pages/sharing/components/shares-dashboard/service-extra-actions/service-extra-actions.component'; import { ServiceStateButtonComponent } from 'app/pages/sharing/components/shares-dashboard/service-state-button/service-state-button.component'; import { NfsFormComponent } from 'app/pages/sharing/nfs/nfs-form/nfs-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectService } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/components/shares-dashboard/service-extra-actions/service-extra-actions.component.ts b/src/app/pages/sharing/components/shares-dashboard/service-extra-actions/service-extra-actions.component.ts index a6e231c8f46..948bcfcbf91 100644 --- a/src/app/pages/sharing/components/shares-dashboard/service-extra-actions/service-extra-actions.component.ts +++ b/src/app/pages/sharing/components/shares-dashboard/service-extra-actions/service-extra-actions.component.ts @@ -18,9 +18,9 @@ import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ServiceNfsComponent } from 'app/pages/services/components/service-nfs/service-nfs.component'; import { ServiceSmbComponent } from 'app/pages/services/components/service-smb/service-smb.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { UrlOptionsService } from 'app/services/url-options.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.spec.ts b/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.spec.ts index 783d96dd469..cc96c3c2432 100644 --- a/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.spec.ts +++ b/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.spec.ts @@ -26,8 +26,8 @@ import { ServiceStateButtonComponent } from 'app/pages/sharing/components/shares import { SmbCardComponent } from 'app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component'; import { SmbAclComponent } from 'app/pages/sharing/smb/smb-acl/smb-acl.component'; import { SmbFormComponent } from 'app/pages/sharing/smb/smb-form/smb-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectServices } from 'app/store/services/services.selectors'; describe('SmbCardComponent', () => { diff --git a/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.ts b/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.ts index 83c12a2a0bb..e56eb4f2eb2 100644 --- a/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.ts +++ b/src/app/pages/sharing/components/shares-dashboard/smb-card/smb-card.component.ts @@ -41,9 +41,9 @@ import { ServiceStateButtonComponent } from 'app/pages/sharing/components/shares import { SmbAclComponent } from 'app/pages/sharing/smb/smb-acl/smb-acl.component'; import { SmbFormComponent } from 'app/pages/sharing/smb/smb-form/smb-form.component'; import { isRootShare } from 'app/pages/sharing/utils/smb.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectService } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.spec.ts b/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.spec.ts index e3bfb1f9789..8af60862d39 100644 --- a/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.spec.ts +++ b/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.spec.ts @@ -11,9 +11,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { IscsiService } from 'app/services/iscsi.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AssociatedTargetFormComponent } from './associated-target-form.component'; describe('AssociatedTargetFormComponent', () => { diff --git a/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.ts b/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.ts index 66fa2b0a3fc..e191a5ebfa5 100644 --- a/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.ts +++ b/src/app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component.ts @@ -21,8 +21,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.spec.ts b/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.spec.ts index 8f052bed3ae..2aaa5c4624b 100644 --- a/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.spec.ts +++ b/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.spec.ts @@ -18,8 +18,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { AssociatedTargetFormComponent } from 'app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component'; import { AssociatedTargetListComponent } from 'app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const targetExtents: IscsiTargetExtent[] = [ { diff --git a/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.ts b/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.ts index d859dd0bb38..1c1607d5093 100644 --- a/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.ts +++ b/src/app/pages/sharing/iscsi/associated-target/associated-target-list/associated-target-list.component.ts @@ -31,10 +31,10 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { AssociatedTargetFormComponent } from 'app/pages/sharing/iscsi/associated-target/associated-target-form/associated-target-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.spec.ts b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.spec.ts index d950a2a3b28..c45a37d9855 100644 --- a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.spec.ts +++ b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.spec.ts @@ -13,8 +13,8 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { AuthorizedAccessFormComponent, } from 'app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AuthorizedAccessFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.ts b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.ts index e50f2e00ffb..81eba0d21ff 100644 --- a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.ts +++ b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component.ts @@ -24,7 +24,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.spec.ts b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.spec.ts index a3f19e70e50..196a4f1e537 100644 --- a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.spec.ts +++ b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.spec.ts @@ -19,8 +19,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { AuthorizedAccessFormComponent } from 'app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component'; import { AuthorizedAccessListComponent } from 'app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const authAccess: IscsiAuthAccess[] = [ { diff --git a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.ts b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.ts index a30d4334e9b..c2b3a49c0b9 100644 --- a/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.ts +++ b/src/app/pages/sharing/iscsi/authorized-access/authorized-access-list/authorized-access-list.component.ts @@ -29,10 +29,10 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { AuthorizedAccessFormComponent } from 'app/pages/sharing/iscsi/authorized-access/authorized-access-form/authorized-access-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.spec.ts b/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.spec.ts index 0f4170f6835..fbbbb2741e4 100644 --- a/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.spec.ts +++ b/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.spec.ts @@ -14,9 +14,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ExtentFormComponent } from 'app/pages/sharing/iscsi/extent/extent-form/extent-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { StorageService } from 'app/services/storage.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ExtentFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.ts b/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.ts index 40181090851..dc1f945415c 100644 --- a/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.ts +++ b/src/app/pages/sharing/iscsi/extent/extent-form/extent-form.component.ts @@ -32,9 +32,9 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.spec.ts b/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.spec.ts index f633e800778..23d88b82e5c 100644 --- a/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.spec.ts +++ b/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.spec.ts @@ -13,7 +13,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { DeleteExtentDialogComponent, } from 'app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeleteExtentDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.ts b/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.ts index 9df28205bf7..912d30509bb 100644 --- a/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.ts +++ b/src/app/pages/sharing/iscsi/extent/extent-list/delete-extent-dialog/delete-extent-dialog.component.ts @@ -17,8 +17,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.spec.ts b/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.spec.ts index 6926ab5c5f9..6dd431011aa 100644 --- a/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.spec.ts +++ b/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.spec.ts @@ -13,7 +13,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { DualListBoxComponent } from 'app/modules/lists/dual-listbox/dual-listbox.component'; import { InitiatorFormComponent } from 'app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InitiatorFormComponent', () => { let spectator: SpectatorRouting; diff --git a/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.ts b/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.ts index d31d10dcf4a..d83a24d5923 100644 --- a/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.ts +++ b/src/app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.component.ts @@ -24,8 +24,8 @@ import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { DualListBoxComponent } from 'app/modules/lists/dual-listbox/dual-listbox.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { initiatorFormElements } from 'app/pages/sharing/iscsi/initiator/initiator-form/initiator-form.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface InitiatorItem { id: string; diff --git a/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.spec.ts b/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.spec.ts index 08d68d737ae..d435b994dab 100644 --- a/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.spec.ts +++ b/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.spec.ts @@ -20,8 +20,8 @@ import { import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { InitiatorListComponent } from 'app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const initiators: IscsiInitiatorGroup[] = [ { diff --git a/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.ts b/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.ts index d0052b60e3e..804cc8f717b 100644 --- a/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.ts +++ b/src/app/pages/sharing/iscsi/initiator/initiator-list/initiator-list.component.ts @@ -29,9 +29,9 @@ import { createTable } from 'app/modules/ix-table/utils'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.spec.ts b/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.spec.ts index ec1ca48cfcc..8b961d8933c 100644 --- a/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.spec.ts +++ b/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.spec.ts @@ -27,8 +27,8 @@ import { IscsiWizardComponent } from 'app/pages/sharing/iscsi/iscsi-wizard/iscsi import { DeviceWizardStepComponent } from 'app/pages/sharing/iscsi/iscsi-wizard/steps/device-wizard-step/device-wizard-step.component'; import { InitiatorWizardStepComponent } from 'app/pages/sharing/iscsi/iscsi-wizard/steps/initiator-wizard-step/initiator-wizard-step.component'; import { PortalWizardStepComponent } from 'app/pages/sharing/iscsi/iscsi-wizard/steps/portal-wizard-step/portal-wizard-step.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; import { selectServices } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.ts b/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.ts index ba67423cb6e..7a28de42de7 100644 --- a/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.ts +++ b/src/app/pages/sharing/iscsi/iscsi-wizard/iscsi-wizard.component.ts @@ -53,9 +53,9 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-header/modal-header.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; import { ServicesState } from 'app/store/services/services.reducer'; import { DeviceWizardStepComponent } from './steps/device-wizard-step/device-wizard-step.component'; diff --git a/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.spec.ts b/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.spec.ts index a1831cd3014..b91e9a2aa0c 100644 --- a/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.spec.ts +++ b/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.spec.ts @@ -12,8 +12,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { PortalFormComponent } from './portal-form.component'; describe('PortalFormComponent', () => { diff --git a/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.ts b/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.ts index f89f34e6a53..ed9f494615f 100644 --- a/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.ts +++ b/src/app/pages/sharing/iscsi/portal/portal-form/portal-form.component.ts @@ -28,8 +28,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.spec.ts b/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.spec.ts index 31ffb17e7ee..2f18ef13126 100644 --- a/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.spec.ts +++ b/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.spec.ts @@ -21,8 +21,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { PortalFormComponent } from 'app/pages/sharing/iscsi/portal/portal-form/portal-form.component'; import { PortalListComponent } from 'app/pages/sharing/iscsi/portal/portal-list/portal-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const portals: IscsiPortal[] = [ { diff --git a/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.ts b/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.ts index 6cb03acad46..afc91d36b76 100644 --- a/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.ts +++ b/src/app/pages/sharing/iscsi/portal/portal-list/portal-list.component.ts @@ -29,10 +29,10 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { PortalFormComponent } from 'app/pages/sharing/iscsi/portal/portal-form/portal-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.spec.ts b/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.spec.ts index 5f13c482eaa..7eedbf9933d 100644 --- a/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.spec.ts +++ b/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.spec.ts @@ -15,7 +15,7 @@ import { Service } from 'app/interfaces/service.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; diff --git a/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.ts b/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.ts index 0103b6bbff6..fa32b5c882f 100644 --- a/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.ts +++ b/src/app/pages/sharing/iscsi/target-global-configuration/target-global-configuration.component.ts @@ -23,8 +23,8 @@ import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fi import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; diff --git a/src/app/pages/sharing/iscsi/target/target-form/target-form.component.spec.ts b/src/app/pages/sharing/iscsi/target/target-form/target-form.component.spec.ts index 0fc256a24fb..2d00080f697 100644 --- a/src/app/pages/sharing/iscsi/target/target-form/target-form.component.spec.ts +++ b/src/app/pages/sharing/iscsi/target/target-form/target-form.component.spec.ts @@ -20,8 +20,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TargetFormComponent } from 'app/pages/sharing/iscsi/target/target-form/target-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('TargetFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/sharing/iscsi/target/target-form/target-form.component.ts b/src/app/pages/sharing/iscsi/target/target-form/target-form.component.ts index acb7397af37..88244ebe344 100644 --- a/src/app/pages/sharing/iscsi/target/target-form/target-form.component.ts +++ b/src/app/pages/sharing/iscsi/target/target-form/target-form.component.ts @@ -29,8 +29,8 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { TargetNameValidationService } from 'app/pages/sharing/iscsi/target/target-name-validation.service'; -import { ApiService } from 'app/services/api.service'; import { IscsiService } from 'app/services/iscsi.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/target/target-list/target-list.component.spec.ts b/src/app/pages/sharing/iscsi/target/target-list/target-list.component.spec.ts index cf071f0b1d8..efe68df15eb 100644 --- a/src/app/pages/sharing/iscsi/target/target-list/target-list.component.spec.ts +++ b/src/app/pages/sharing/iscsi/target/target-list/target-list.component.spec.ts @@ -18,8 +18,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TargetFormComponent } from 'app/pages/sharing/iscsi/target/target-form/target-form.component'; import { TargetListComponent } from 'app/pages/sharing/iscsi/target/target-list/target-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const targets: IscsiTarget[] = [{ id: 1, diff --git a/src/app/pages/sharing/iscsi/target/target-list/target-list.component.ts b/src/app/pages/sharing/iscsi/target/target-list/target-list.component.ts index ad6c7507948..ec83187b16b 100644 --- a/src/app/pages/sharing/iscsi/target/target-list/target-list.component.ts +++ b/src/app/pages/sharing/iscsi/target/target-list/target-list.component.ts @@ -30,10 +30,10 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { TargetFormComponent } from 'app/pages/sharing/iscsi/target/target-form/target-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { IscsiService } from 'app/services/iscsi.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/iscsi/target/target-name-validation.service.ts b/src/app/pages/sharing/iscsi/target/target-name-validation.service.ts index dbac09c2cd1..20445e0b348 100644 --- a/src/app/pages/sharing/iscsi/target/target-name-validation.service.ts +++ b/src/app/pages/sharing/iscsi/target/target-name-validation.service.ts @@ -8,8 +8,8 @@ import { } from 'rxjs'; import { ApiError } from 'app/interfaces/api-error.interface'; import { ErrorReport } from 'app/interfaces/error-report.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.spec.ts b/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.spec.ts index 3fbc71c2787..48f3878200b 100644 --- a/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.spec.ts +++ b/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.spec.ts @@ -29,10 +29,10 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { NfsFormComponent } from 'app/pages/sharing/nfs/nfs-form/nfs-form.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SlideInService } from 'app/services/slide-in.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; import { selectServices } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.ts b/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.ts index eb8f8a0e61d..0ee3a98640b 100644 --- a/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.ts +++ b/src/app/pages/sharing/nfs/nfs-form/nfs-form.component.ts @@ -39,10 +39,10 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; import { ServicesState } from 'app/store/services/services.reducer'; diff --git a/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.spec.ts b/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.spec.ts index 519ee9fd0f8..e7ea321c8bb 100644 --- a/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.spec.ts +++ b/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.spec.ts @@ -18,8 +18,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { NfsFormComponent } from 'app/pages/sharing/nfs/nfs-form/nfs-form.component'; import { NfsListComponent } from 'app/pages/sharing/nfs/nfs-list/nfs-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const shares: Partial[] = [ { diff --git a/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.ts b/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.ts index 67961cfbc7e..43b9005de9a 100644 --- a/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.ts +++ b/src/app/pages/sharing/nfs/nfs-list/nfs-list.component.ts @@ -35,9 +35,9 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { TestDirective } from 'app/modules/test-id/test.directive'; import { NfsFormComponent } from 'app/pages/sharing/nfs/nfs-form/nfs-form.component'; import { nfsListElements } from 'app/pages/sharing/nfs/nfs-list/nfs-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.ts b/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.ts index be122d1da05..0b8e5e736e6 100644 --- a/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.ts +++ b/src/app/pages/sharing/nfs/nfs-session-list/nfs-session-list.component.ts @@ -26,7 +26,7 @@ import { createTable } from 'app/modules/ix-table/utils'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { nfsSessionListElements } from 'app/pages/sharing/nfs/nfs-session-list/nfs-session-list.elements'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/smb/smb-acl/smb-acl.component.spec.ts b/src/app/pages/sharing/smb/smb-acl/smb-acl.component.spec.ts index 6ea491a28f2..7731e64c213 100644 --- a/src/app/pages/sharing/smb/smb-acl/smb-acl.component.spec.ts +++ b/src/app/pages/sharing/smb/smb-acl/smb-acl.component.spec.ts @@ -17,9 +17,9 @@ import { IxComboboxHarness } from 'app/modules/forms/ix-forms/components/ix-comb import { IxListHarness } from 'app/modules/forms/ix-forms/components/ix-list/ix-list.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SmbAclComponent } from './smb-acl.component'; describe('SmbAclComponent', () => { diff --git a/src/app/pages/sharing/smb/smb-acl/smb-acl.component.ts b/src/app/pages/sharing/smb/smb-acl/smb-acl.component.ts index d5937ef9298..efdd7c315dd 100644 --- a/src/app/pages/sharing/smb/smb-acl/smb-acl.component.ts +++ b/src/app/pages/sharing/smb/smb-acl/smb-acl.component.ts @@ -37,8 +37,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; type NameOrId = string | number | null; diff --git a/src/app/pages/sharing/smb/smb-form/smb-form.component.spec.ts b/src/app/pages/sharing/smb/smb-form/smb-form.component.spec.ts index 3fbc9eb1d5c..616bb902182 100644 --- a/src/app/pages/sharing/smb/smb-form/smb-form.component.spec.ts +++ b/src/app/pages/sharing/smb/smb-form/smb-form.component.spec.ts @@ -29,9 +29,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { RestartSmbDialogComponent } from 'app/pages/sharing/smb/smb-form/restart-smb-dialog/restart-smb-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; import { selectServices } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/smb/smb-form/smb-form.component.ts b/src/app/pages/sharing/smb/smb-form/smb-form.component.ts index 2694cfbf215..016faf08017 100644 --- a/src/app/pages/sharing/smb/smb-form/smb-form.component.ts +++ b/src/app/pages/sharing/smb/smb-form/smb-form.component.ts @@ -57,10 +57,10 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { RestartSmbDialogComponent } from 'app/pages/sharing/smb/smb-form/restart-smb-dialog/restart-smb-dialog.component'; import { SmbValidationService } from 'app/pages/sharing/smb/smb-form/smb-validator.service'; -import { ApiService } from 'app/services/api.service'; import { DatasetService } from 'app/services/dataset-service/dataset.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { checkIfServiceIsEnabled } from 'app/store/services/services.actions'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectService } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/smb/smb-form/smb-validator.service.ts b/src/app/pages/sharing/smb/smb-form/smb-validator.service.ts index 34b11b73863..ae52ee8c393 100644 --- a/src/app/pages/sharing/smb/smb-form/smb-validator.service.ts +++ b/src/app/pages/sharing/smb/smb-form/smb-validator.service.ts @@ -8,7 +8,7 @@ import { Observable, catchError, debounceTime, distinctUntilChanged, of, switchMap, take, } from 'rxjs'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Injectable({ diff --git a/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts b/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts index 2402f063756..27e1c94a126 100644 --- a/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts +++ b/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts @@ -26,8 +26,8 @@ import { ServiceStateButtonComponent } from 'app/pages/sharing/components/shares import { SmbAclComponent } from 'app/pages/sharing/smb/smb-acl/smb-acl.component'; import { SmbFormComponent } from 'app/pages/sharing/smb/smb-form/smb-form.component'; import { SmbListComponent } from 'app/pages/sharing/smb/smb-list/smb-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectServices } from 'app/store/services/services.selectors'; const shares: Partial[] = [ diff --git a/src/app/pages/sharing/smb/smb-list/smb-list.component.ts b/src/app/pages/sharing/smb/smb-list/smb-list.component.ts index 5fae85712ae..3b92c3a3bee 100644 --- a/src/app/pages/sharing/smb/smb-list/smb-list.component.ts +++ b/src/app/pages/sharing/smb/smb-list/smb-list.component.ts @@ -45,9 +45,9 @@ import { SmbAclComponent } from 'app/pages/sharing/smb/smb-acl/smb-acl.component import { SmbFormComponent } from 'app/pages/sharing/smb/smb-form/smb-form.component'; import { smbListElements } from 'app/pages/sharing/smb/smb-list/smb-list.elements'; import { isRootShare } from 'app/pages/sharing/utils/smb.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ServicesState } from 'app/store/services/services.reducer'; import { selectService } from 'app/store/services/services.selectors'; diff --git a/src/app/pages/sharing/smb/smb-status/components/smb-lock-list/smb-lock-list.component.ts b/src/app/pages/sharing/smb/smb-status/components/smb-lock-list/smb-lock-list.component.ts index e67872e4596..af993ea04d1 100644 --- a/src/app/pages/sharing/smb/smb-status/components/smb-lock-list/smb-lock-list.component.ts +++ b/src/app/pages/sharing/smb/smb-status/components/smb-lock-list/smb-lock-list.component.ts @@ -24,7 +24,7 @@ import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table- import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SmbOpenFilesComponent } from 'app/pages/sharing/smb/smb-status/components/smb-open-files/smb-open-files.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/smb/smb-status/components/smb-notification-list/smb-notification-list.component.ts b/src/app/pages/sharing/smb/smb-status/components/smb-notification-list/smb-notification-list.component.ts index 258d8281f5f..e6bc50171bc 100644 --- a/src/app/pages/sharing/smb/smb-status/components/smb-notification-list/smb-notification-list.component.ts +++ b/src/app/pages/sharing/smb/smb-status/components/smb-notification-list/smb-notification-list.component.ts @@ -22,7 +22,7 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/smb/smb-status/components/smb-session-list/smb-session-list.component.ts b/src/app/pages/sharing/smb/smb-status/components/smb-session-list/smb-session-list.component.ts index 858aadb7550..b1cdcdd9a5a 100644 --- a/src/app/pages/sharing/smb/smb-status/components/smb-session-list/smb-session-list.component.ts +++ b/src/app/pages/sharing/smb/smb-status/components/smb-session-list/smb-session-list.component.ts @@ -22,7 +22,7 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/sharing/smb/smb-status/components/smb-share-list/smb-share-list.component.ts b/src/app/pages/sharing/smb/smb-status/components/smb-share-list/smb-share-list.component.ts index ddf36633dcc..8bd3f541b9a 100644 --- a/src/app/pages/sharing/smb/smb-status/components/smb-share-list/smb-share-list.component.ts +++ b/src/app/pages/sharing/smb/smb-status/components/smb-share-list/smb-share-list.component.ts @@ -22,7 +22,7 @@ import { IxTablePagerComponent } from 'app/modules/ix-table/components/ix-table- import { IxTableEmptyDirective } from 'app/modules/ix-table/directives/ix-table-empty.directive'; import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.spec.ts b/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.spec.ts index cfe9fac117a..c11547c19af 100644 --- a/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.spec.ts +++ b/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.spec.ts @@ -12,8 +12,8 @@ import { SetAdminPasswordFormComponent, } from 'app/pages/signin/set-admin-password-form/set-admin-password-form.component'; import { SigninStore } from 'app/pages/signin/store/signin.store'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SetAdminPasswordFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.ts b/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.ts index 6f6031842d9..599c17f30c9 100644 --- a/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.ts +++ b/src/app/pages/signin/set-admin-password-form/set-admin-password-form.component.ts @@ -16,8 +16,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { matchOthersFgValidator } from 'app/modules/forms/ix-forms/validators/password-validation/password-validation'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SigninStore } from 'app/pages/signin/store/signin.store'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; const adminUsername = 'truenas_admin'; diff --git a/src/app/pages/signin/signin-form/signin-form.component.ts b/src/app/pages/signin/signin-form/signin-form.component.ts index 55fe80db58a..c7d77d30089 100644 --- a/src/app/pages/signin/signin-form/signin-form.component.ts +++ b/src/app/pages/signin/signin-form/signin-form.component.ts @@ -23,8 +23,8 @@ import { iconMarker } from 'app/modules/ix-icon/icon-marker.util'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { InsecureConnectionComponent } from 'app/pages/signin/insecure-connection/insecure-connection.component'; import { SigninStore } from 'app/pages/signin/store/signin.store'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/signin/signin.component.spec.ts b/src/app/pages/signin/signin.component.spec.ts index 67b144decc7..d41fe7b9cd0 100644 --- a/src/app/pages/signin/signin.component.spec.ts +++ b/src/app/pages/signin/signin.component.spec.ts @@ -22,7 +22,7 @@ import { } from 'app/pages/signin/true-command-status/true-command-status.component'; import { AuthService } from 'app/services/auth/auth.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; describe('SigninComponent', () => { let spectator: Spectator; @@ -76,7 +76,7 @@ describe('SigninComponent', () => { mockProvider(TokenLastUsedService, { isTokenWithinTimeline$, }), - mockProvider(WebSocketConnectionService, { + mockProvider(WebSocketHandlerService, { isConnected$, }), ], diff --git a/src/app/pages/signin/signin.component.ts b/src/app/pages/signin/signin.component.ts index 109f2926c31..9c06084795f 100644 --- a/src/app/pages/signin/signin.component.ts +++ b/src/app/pages/signin/signin.component.ts @@ -28,7 +28,7 @@ import { SigninStore } from 'app/pages/signin/store/signin.store'; import { TrueCommandStatusComponent } from 'app/pages/signin/true-command-status/true-command-status.component'; import { AuthService } from 'app/services/auth/auth.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @UntilDestroy() @Component({ @@ -82,7 +82,7 @@ export class SigninComponent implements OnInit { ); constructor( - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, private signinStore: SigninStore, private dialog: DialogService, private authService: AuthService, diff --git a/src/app/pages/signin/store/signin.store.spec.ts b/src/app/pages/signin/store/signin.store.spec.ts index 0670a0614eb..e42682b9d1d 100644 --- a/src/app/pages/signin/store/signin.store.spec.ts +++ b/src/app/pages/signin/store/signin.store.spec.ts @@ -14,12 +14,12 @@ import { FailoverDisabledReasonEvent } from 'app/interfaces/failover-disabled-re import { GlobalTwoFactorConfig } from 'app/interfaces/two-factor-config.interface'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { SigninStore } from 'app/pages/signin/store/signin.store'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; import { UpdateService } from 'app/services/update.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; describe('SigninStore', () => { let spectator: SpectatorService; @@ -40,9 +40,9 @@ describe('SigninStore', () => { mockCall('failover.disabled.reasons', [FailoverDisabledReason.NoLicense]), mockCall('system.advanced.login_banner', ''), ]), - mockProvider(WebSocketConnectionService, { + mockProvider(WebSocketHandlerService, { isConnected$: of(true), - websocket$: of(), + responses$: of(), }), mockProvider(TokenLastUsedService, { isTokenWithinTimeline$, diff --git a/src/app/pages/signin/store/signin.store.ts b/src/app/pages/signin/store/signin.store.ts index e1385dc20c4..597b781fd85 100644 --- a/src/app/pages/signin/store/signin.store.ts +++ b/src/app/pages/signin/store/signin.store.ts @@ -17,13 +17,13 @@ import { FailoverStatus } from 'app/enums/failover-status.enum'; import { LoginResult } from 'app/enums/login-result.enum'; import { WINDOW } from 'app/helpers/window.helper'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; import { UpdateService } from 'app/services/update.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { loginBannerUpdated } from 'app/store/system-config/system-config.actions'; interface SigninState { @@ -76,7 +76,7 @@ export class SigninStore extends ComponentStore { private systemGeneralService: SystemGeneralService, private router: Router, private snackbar: MatSnackBar, - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, private errorHandler: ErrorHandlerService, private authService: AuthService, private updateService: UpdateService, diff --git a/src/app/pages/signin/true-command-status/true-command-status.component.spec.ts b/src/app/pages/signin/true-command-status/true-command-status.component.spec.ts index 7322474a1c4..5ed7901e733 100644 --- a/src/app/pages/signin/true-command-status/true-command-status.component.spec.ts +++ b/src/app/pages/signin/true-command-status/true-command-status.component.spec.ts @@ -3,7 +3,7 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { TrueCommandStatusComponent, } from 'app/pages/signin/true-command-status/true-command-status.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('TrueCommandStatusComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/signin/true-command-status/true-command-status.component.ts b/src/app/pages/signin/true-command-status/true-command-status.component.ts index 85d4c1ad5c5..486242253e7 100644 --- a/src/app/pages/signin/true-command-status/true-command-status.component.ts +++ b/src/app/pages/signin/true-command-status/true-command-status.component.ts @@ -5,7 +5,7 @@ import { import { UntilDestroy } from '@ngneat/until-destroy'; import { TranslateModule } from '@ngx-translate/core'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.spec.ts b/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.spec.ts index b2dac865624..55a4d4286db 100644 --- a/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.spec.ts +++ b/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.spec.ts @@ -26,7 +26,7 @@ import { } from 'app/pages/storage/components/dashboard-pool/topology-card/topology-card.component'; import { ZfsHealthCardComponent } from 'app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component'; import { PoolsDashboardStore } from 'app/pages/storage/stores/pools-dashboard-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DashboardPoolComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.ts b/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.ts index c3190748910..6f4e68b6952 100644 --- a/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.ts +++ b/src/app/pages/storage/components/dashboard-pool/dashboard-pool.component.ts @@ -29,8 +29,8 @@ import { ExportDisconnectModalComponent, } from 'app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component'; import { PoolsDashboardStore } from 'app/pages/storage/stores/pools-dashboard-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { DiskHealthCardComponent } from './disk-health-card/disk-health-card.component'; import { PoolUsageCardComponent } from './pool-usage-card/pool-usage-card.component'; import { TopologyCardComponent } from './topology-card/topology-card.component'; diff --git a/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.spec.ts b/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.spec.ts index d2bca98757d..239d82c05b3 100644 --- a/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.spec.ts +++ b/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.spec.ts @@ -19,7 +19,7 @@ import { SystemDatasetConfig } from 'app/interfaces/system-dataset-config.interf import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ExportDisconnectModalComponent } from './export-disconnect-modal.component'; const fakeData = { diff --git a/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.ts b/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.ts index a9c507c0ca6..38392319dac 100644 --- a/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.ts +++ b/src/app/pages/storage/components/dashboard-pool/export-disconnect-modal/export-disconnect-modal.component.ts @@ -35,8 +35,8 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { DatasetTreeStore } from 'app/pages/datasets/store/dataset-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.spec.ts b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.spec.ts index f3c31f26b85..996ff90e405 100644 --- a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.spec.ts +++ b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.spec.ts @@ -15,7 +15,7 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { AutotrimDialogComponent, } from 'app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AutotrimDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.ts b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.ts index e6779f14c55..f807022b6ec 100644 --- a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.ts +++ b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component.ts @@ -18,8 +18,8 @@ import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-ch import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.spec.ts b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.spec.ts index 92e83e51efd..a994a0f8f36 100644 --- a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.spec.ts +++ b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.spec.ts @@ -28,7 +28,7 @@ import { } from 'app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component'; import { ZfsHealthCardComponent } from 'app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component'; import { PoolsDashboardStore } from 'app/pages/storage/stores/pools-dashboard-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ZfsHealthCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.ts b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.ts index 900b5b24701..e0efbe52a42 100644 --- a/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.ts +++ b/src/app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.component.ts @@ -38,8 +38,8 @@ import { } from 'app/pages/storage/components/dashboard-pool/zfs-health-card/autotrim-dialog/autotrim-dialog.component'; import { zfsHealthCardElements } from 'app/pages/storage/components/dashboard-pool/zfs-health-card/zfs-health-card.elements'; import { PoolsDashboardStore } from 'app/pages/storage/stores/pools-dashboard-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/components/import-pool/import-pool.component.spec.ts b/src/app/pages/storage/components/import-pool/import-pool.component.spec.ts index f4fdd235c00..cbcd4172b40 100644 --- a/src/app/pages/storage/components/import-pool/import-pool.component.spec.ts +++ b/src/app/pages/storage/components/import-pool/import-pool.component.spec.ts @@ -15,7 +15,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxSelectHarness } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.harness'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ImportPoolComponent } from './import-pool.component'; describe('ImportPoolComponent', () => { diff --git a/src/app/pages/storage/components/import-pool/import-pool.component.ts b/src/app/pages/storage/components/import-pool/import-pool.component.ts index 8a8703ad876..51da1b1fa3a 100644 --- a/src/app/pages/storage/components/import-pool/import-pool.component.ts +++ b/src/app/pages/storage/components/import-pool/import-pool.component.ts @@ -30,8 +30,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/components/unused-resources/unused-resources.component.ts b/src/app/pages/storage/components/unused-resources/unused-resources.component.ts index b6bdd600531..349f6b426a9 100644 --- a/src/app/pages/storage/components/unused-resources/unused-resources.component.ts +++ b/src/app/pages/storage/components/unused-resources/unused-resources.component.ts @@ -10,8 +10,8 @@ import { import { DetailsDisk } from 'app/interfaces/disk.interface'; import { Pool } from 'app/interfaces/pool.interface'; import { ManageUnusedDiskDialogComponent } from 'app/pages/storage/components/unused-resources/unused-disk-card/manage-unused-disk-dialog/manage-unused-disk-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { UnusedDiskCardComponent } from './unused-disk-card/unused-disk-card.component'; @UntilDestroy() diff --git a/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.spec.ts b/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.spec.ts index feb462ee881..e6da23cb21f 100644 --- a/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.spec.ts @@ -19,7 +19,7 @@ import { ReplaceDiskDialogData, ReplaceDiskDialogComponent, } from 'app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ReplaceDiskDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.ts b/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.ts index 4d000a52a2a..acedb956b79 100644 --- a/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.ts +++ b/src/app/pages/storage/modules/devices/components/disk-info-card/replace-disk-dialog/replace-disk-dialog.component.ts @@ -17,8 +17,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface ReplaceDiskDialogData { diskName: string; diff --git a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.spec.ts b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.spec.ts index f9fdab89686..641eae4deb6 100644 --- a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.spec.ts @@ -11,7 +11,7 @@ import { TopologyDisk } from 'app/interfaces/storage.interface'; import { ManageDiskSedDialogComponent, } from 'app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { HardwareDiskEncryptionComponent } from './hardware-disk-encryption.component'; describe('HardwareDiskEncryptionComponent', () => { diff --git a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.ts b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.ts index 2f20365f1cf..abc42e89250 100644 --- a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.ts +++ b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/hardware-disk-encryption.component.ts @@ -19,7 +19,7 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { ManageDiskSedDialogComponent, } from 'app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.spec.ts b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.spec.ts index a6d90f947ec..f5b43df31bb 100644 --- a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { Disk } from 'app/interfaces/disk.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ManageDiskSedDialogComponent } from './manage-disk-sed-dialog.component'; describe('ManageDiskSedDialogComponent', () => { diff --git a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.ts b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.ts index 5e9b3361595..eb9a0641dd2 100644 --- a/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.ts +++ b/src/app/pages/storage/modules/devices/components/hardware-disk-encryption/manage-disk-sed-dialog/manage-disk-sed-dialog.component.ts @@ -18,8 +18,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.spec.ts b/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.spec.ts index 8e642fe65a8..122222134f9 100644 --- a/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.spec.ts @@ -15,7 +15,7 @@ import { TopologyDisk } from 'app/interfaces/storage.interface'; import { ManualTestDialogComponent, } from 'app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SmartInfoCardComponent } from './smart-info-card.component'; describe('SmartInfoCardComponent', () => { diff --git a/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.ts b/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.ts index 724a6fef573..5f29d88fa8f 100644 --- a/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.ts +++ b/src/app/pages/storage/modules/devices/components/smart-info-card/smart-info-card.component.ts @@ -29,7 +29,7 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { ManualTestDialogComponent, ManualTestDialogParams, } from 'app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.spec.ts b/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.spec.ts index 772ebd8311b..1ca8dc18b43 100644 --- a/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.spec.ts @@ -16,7 +16,7 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { ExtendDialogComponent, ExtendDialogParams, } from 'app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ExtendDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.ts b/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.ts index 52c35adfad7..cdba0303c5a 100644 --- a/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.ts +++ b/src/app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component.ts @@ -17,8 +17,8 @@ import { UnusedDiskSelectComponent } from 'app/modules/forms/custom-selects/unus import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface ExtendDialogParams { poolId: number; diff --git a/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.spec.ts b/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.spec.ts index e29831955a9..c9d4e1c5fed 100644 --- a/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.spec.ts @@ -23,7 +23,7 @@ import { RaidzExtendDialogComponent, RaidzExtendDialogParams, } from 'app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component'; import { DevicesStore } from 'app/pages/storage/modules/devices/stores/devices-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('RaidzExtendDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.ts b/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.ts index 4962c50e12b..09a285a3d13 100644 --- a/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.ts +++ b/src/app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component.ts @@ -20,8 +20,8 @@ import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { DevicesStore } from 'app/pages/storage/modules/devices/stores/devices-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface RaidzExtendDialogParams { poolId: number; diff --git a/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.spec.ts b/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.spec.ts index 1e5b6ca80df..7400dc691e4 100644 --- a/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.spec.ts +++ b/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.spec.ts @@ -22,7 +22,7 @@ import { } from 'app/pages/storage/modules/devices/components/zfs-info-card/extend-dialog/extend-dialog.component'; import { ZfsInfoCardComponent } from 'app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component'; import { DevicesStore } from 'app/pages/storage/modules/devices/stores/devices-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ZfsInfoCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.ts b/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.ts index 82abb4508cd..92f5be9f108 100644 --- a/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.ts +++ b/src/app/pages/storage/modules/devices/components/zfs-info-card/zfs-info-card.component.ts @@ -29,8 +29,8 @@ import { RaidzExtendDialogComponent, RaidzExtendDialogParams, } from 'app/pages/storage/modules/devices/components/zfs-info-card/raidz-extend-dialog/raidz-extend-dialog.component'; import { DevicesStore } from 'app/pages/storage/modules/devices/stores/devices-store.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; const raidzItems = [TopologyItemType.Raidz, TopologyItemType.Raidz1, TopologyItemType.Raidz2, TopologyItemType.Raidz3]; diff --git a/src/app/pages/storage/modules/devices/devices.component.ts b/src/app/pages/storage/modules/devices/devices.component.ts index 9e4341ac3fd..b47b4105774 100644 --- a/src/app/pages/storage/modules/devices/devices.component.ts +++ b/src/app/pages/storage/modules/devices/devices.component.ts @@ -50,7 +50,7 @@ import { DiskDetailsPanelComponent } from 'app/pages/storage/modules/devices/com import { TopologyItemNodeComponent } from 'app/pages/storage/modules/devices/components/topology-item-node/topology-item-node.component'; import { VDevGroupNodeComponent } from 'app/pages/storage/modules/devices/components/vdev-group-node/vdev-group-node.component'; import { DevicesStore } from 'app/pages/storage/modules/devices/stores/devices-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const raidzItems = [TopologyItemType.Raidz, TopologyItemType.Raidz1, TopologyItemType.Raidz2, TopologyItemType.Raidz3]; diff --git a/src/app/pages/storage/modules/devices/stores/devices-store.service.spec.ts b/src/app/pages/storage/modules/devices/stores/devices-store.service.spec.ts index c0b0c0f547d..885f971e0af 100644 --- a/src/app/pages/storage/modules/devices/stores/devices-store.service.spec.ts +++ b/src/app/pages/storage/modules/devices/stores/devices-store.service.spec.ts @@ -6,7 +6,7 @@ import { getTestScheduler } from 'app/core/testing/utils/get-test-scheduler.util import { Disk } from 'app/interfaces/disk.interface'; import { Pool } from 'app/interfaces/pool.interface'; import { DevicesState, DevicesStore } from 'app/pages/storage/modules/devices/stores/devices-store.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DevicesStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/storage/modules/devices/stores/devices-store.service.ts b/src/app/pages/storage/modules/devices/stores/devices-store.service.ts index 5a3711eb5d9..25fbccc8b23 100644 --- a/src/app/pages/storage/modules/devices/stores/devices-store.service.ts +++ b/src/app/pages/storage/modules/devices/stores/devices-store.service.ts @@ -11,7 +11,7 @@ import { Disk } from 'app/interfaces/disk.interface'; import { PoolTopology } from 'app/interfaces/pool.interface'; import { TopologyDisk, TopologyItem } from 'app/interfaces/storage.interface'; import { getTreeBranchToNode } from 'app/pages/datasets/utils/get-tree-branch-to-node.utils'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface DevicesState { isLoading: boolean; diff --git a/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.spec.ts b/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.spec.ts index 7a65ab05524..1e212bd65dd 100644 --- a/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.spec.ts +++ b/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.spec.ts @@ -15,7 +15,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { DiskBulkEditComponent } from './disk-bulk-edit.component'; const mockJobSuccessResponse = [{ diff --git a/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.ts b/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.ts index 0d8959e4af9..80033968a01 100644 --- a/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.ts +++ b/src/app/pages/storage/modules/disks/components/disk-bulk-edit/disk-bulk-edit.component.ts @@ -25,7 +25,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.spec.ts b/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.spec.ts index 210ff054b88..285df6b0351 100644 --- a/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.spec.ts +++ b/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.spec.ts @@ -14,7 +14,7 @@ import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/i import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { DiskFormComponent } from './disk-form.component'; describe('DiskFormComponent', () => { diff --git a/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.ts b/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.ts index c7e68ad8e5a..a309bbd6302 100644 --- a/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.ts +++ b/src/app/pages/storage/modules/disks/components/disk-form/disk-form.component.ts @@ -27,7 +27,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.ts b/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.ts index f82afd697d0..b67eebeeb86 100644 --- a/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.ts +++ b/src/app/pages/storage/modules/disks/components/disk-list/disk-list.component.ts @@ -43,8 +43,8 @@ import { DiskFormComponent } from 'app/pages/storage/modules/disks/components/di import { diskListElements } from 'app/pages/storage/modules/disks/components/disk-list/disk-list.elements'; import { DiskWipeDialogComponent } from 'app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component'; import { ManualTestDialogComponent, ManualTestDialogParams } from 'app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; // TODO: Exclude AnythingUi when NAS-127632 is done interface DiskUi extends Disk { diff --git a/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.spec.ts b/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.spec.ts index dc6f94c00dc..00ceef9aab5 100644 --- a/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.spec.ts @@ -13,7 +13,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { DiskWipeDialogComponent, } from 'app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DiskWipeDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.ts b/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.ts index 8da7179d67d..bfe56120268 100644 --- a/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.ts +++ b/src/app/pages/storage/modules/disks/components/disk-wipe-dialog/disk-wipe-dialog.component.ts @@ -17,8 +17,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; import { WarningComponent } from 'app/modules/forms/ix-forms/components/warning/warning.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.spec.ts b/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.spec.ts index 631ea4d9f46..9f6b2a4b97f 100644 --- a/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.spec.ts @@ -15,7 +15,7 @@ import { ManualSmartTest } from 'app/interfaces/smart-test.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { TestProgressRowComponent } from 'app/pages/storage/modules/disks/components/manual-test-dialog/test-progress-row/test-progress-row.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { ManualTestDialogComponent, ManualTestDialogParams } from './manual-test-dialog.component'; describe('ManualTestDialogComponent', () => { diff --git a/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.ts b/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.ts index 5db4ea2ad20..30cd8a7ad0f 100644 --- a/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.ts +++ b/src/app/pages/storage/modules/disks/components/manual-test-dialog/manual-test-dialog.component.ts @@ -21,7 +21,7 @@ import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-sele import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-datetime.pipe'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { TestProgressRowComponent } from 'app/pages/storage/modules/disks/components/manual-test-dialog/test-progress-row/test-progress-row.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface ManualTestDialogParams { selectedDisks: Disk[]; diff --git a/src/app/pages/storage/modules/disks/components/manual-test-dialog/test-progress-row/test-progress-row.component.ts b/src/app/pages/storage/modules/disks/components/manual-test-dialog/test-progress-row/test-progress-row.component.ts index 064b2b3a73b..cca41e96c86 100644 --- a/src/app/pages/storage/modules/disks/components/manual-test-dialog/test-progress-row/test-progress-row.component.ts +++ b/src/app/pages/storage/modules/disks/components/manual-test-dialog/test-progress-row/test-progress-row.component.ts @@ -15,8 +15,8 @@ import { SmartTestProgressUpdate } from 'app/interfaces/smart-test-progress.inte import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.ts b/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.ts index 17dcf8cea33..54ebbcafdb2 100644 --- a/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.ts +++ b/src/app/pages/storage/modules/disks/components/smart-test-result-list/smart-test-result-list.component.ts @@ -27,7 +27,7 @@ import { SortDirection } from 'app/modules/ix-table/enums/sort-direction.enum'; import { Column, ColumnComponent } from 'app/modules/ix-table/interfaces/column-component.class'; import { createTable } from 'app/modules/ix-table/utils'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/storage/modules/pool-manager/components/add-vdevs/store/add-vdevs-store.service.ts b/src/app/pages/storage/modules/pool-manager/components/add-vdevs/store/add-vdevs-store.service.ts index ef6958b3447..9352854908e 100644 --- a/src/app/pages/storage/modules/pool-manager/components/add-vdevs/store/add-vdevs-store.service.ts +++ b/src/app/pages/storage/modules/pool-manager/components/add-vdevs/store/add-vdevs-store.service.ts @@ -9,8 +9,8 @@ import { map } from 'rxjs/operators'; import { Pool, PoolTopology } from 'app/interfaces/pool.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { DiskStore } from 'app/pages/storage/modules/pool-manager/store/disk.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface AddVdevsState { pool: Pool; diff --git a/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.spec.ts b/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.spec.ts index b4dc0b32ecb..2519a32a796 100644 --- a/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.spec.ts +++ b/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.spec.ts @@ -10,9 +10,9 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { DownloadKeyDialogComponent, DownloadKeyDialogParams, } from 'app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DownloadKeyDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.ts b/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.ts index f8efc4b2761..49a183200d2 100644 --- a/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.ts +++ b/src/app/pages/storage/modules/pool-manager/components/download-key-dialog/download-key-dialog.component.ts @@ -17,9 +17,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form-actions/form-actions.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface DownloadKeyDialogParams { id: number; diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.spec.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.spec.ts index 722e05e2e72..3017b2888b2 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.spec.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.spec.ts @@ -51,7 +51,7 @@ import { } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/9-review-wizard-step/review-wizard-step.component'; import { PoolManagerValidationService } from 'app/pages/storage/modules/pool-manager/store/pool-manager-validation.service'; import { PoolManagerState, PoolManagerStore } from 'app/pages/storage/modules/pool-manager/store/pool-manager.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectHasEnclosureSupport } from 'app/store/system-info/system-info.selectors'; describe('PoolManagerWizardComponent', () => { diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.ts index e0466b1c08f..8367edb0148 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/pool-manager-wizard.component.ts @@ -37,8 +37,8 @@ import { PoolCreationWizardStep, getPoolCreationWizardStepIndex } from 'app/page import { PoolManagerValidationService } from 'app/pages/storage/modules/pool-manager/store/pool-manager-validation.service'; import { PoolManagerState, PoolManagerStore } from 'app/pages/storage/modules/pool-manager/store/pool-manager.store'; import { topologyToPayload } from 'app/pages/storage/modules/pool-manager/utils/topology.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectHasEnclosureSupport } from 'app/store/system-info/system-info.selectors'; import { GeneralWizardStepComponent } from './steps/1-general-wizard-step/general-wizard-step.component'; diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/general-wizard-step.component.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/general-wizard-step.component.ts index c6c8be92f6c..e33da3f52cc 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/general-wizard-step.component.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/general-wizard-step.component.ts @@ -23,7 +23,7 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { PoolWarningsComponent } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/components/pool-warnings/pool-warnings.component'; import { PoolWizardNameValidationService } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service'; import { PoolManagerStore } from 'app/pages/storage/modules/pool-manager/store/pool-manager.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const defaultEncryptionStandard = 'AES-256-GCM'; diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service.ts index b4331f904f9..97dea81a8fb 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service.ts @@ -7,8 +7,8 @@ import { Observable, catchError, debounceTime, distinctUntilChanged, of, switchMap, take, } from 'rxjs'; import { ErrorReport } from 'app/interfaces/error-report.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/add-vdev-to-pool.spec.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/add-vdev-to-pool.spec.ts index 874eb40d702..bef791b02af 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/add-vdev-to-pool.spec.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/add-vdev-to-pool.spec.ts @@ -22,7 +22,7 @@ import { PoolManagerHarness, } from 'app/pages/storage/modules/pool-manager/components/pool-manager/tests/pool-manager.harness'; import { PoolWizardNameValidationService } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AddVdevsComponent – Add Vdev to existing pool', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/create-pool.spec.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/create-pool.spec.ts index 38f2ad8a383..c7b9be45345 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/create-pool.spec.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/create-pool.spec.ts @@ -20,7 +20,7 @@ import { PoolManagerHarness, } from 'app/pages/storage/modules/pool-manager/components/pool-manager/tests/pool-manager.harness'; import { PoolWizardNameValidationService } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('PoolManagerComponent – create pool', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/draid-pool-creation.spec.ts b/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/draid-pool-creation.spec.ts index 957c5999cb5..c4418d34c33 100644 --- a/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/draid-pool-creation.spec.ts +++ b/src/app/pages/storage/modules/pool-manager/components/pool-manager/tests/draid-pool-creation.spec.ts @@ -22,7 +22,7 @@ import { PoolManagerHarness, } from 'app/pages/storage/modules/pool-manager/components/pool-manager/tests/pool-manager.harness'; import { PoolWizardNameValidationService } from 'app/pages/storage/modules/pool-manager/components/pool-manager-wizard/steps/1-general-wizard-step/pool-wizard-name-validation.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('PoolManagerComponent – creating dRAID pool', () => { let spectator: Spectator; diff --git a/src/app/pages/storage/modules/pool-manager/store/disk.store.ts b/src/app/pages/storage/modules/pool-manager/store/disk.store.ts index 5910ee7a6aa..aaa2a76ad2e 100644 --- a/src/app/pages/storage/modules/pool-manager/store/disk.store.ts +++ b/src/app/pages/storage/modules/pool-manager/store/disk.store.ts @@ -4,8 +4,8 @@ import { ComponentStore } from '@ngrx/component-store'; import { sortBy } from 'lodash-es'; import { Observable, tap } from 'rxjs'; import { DetailsDisk, DiskDetailsResponse } from 'app/interfaces/disk.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; interface DiskState { usedDisks: DetailsDisk[]; diff --git a/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.spec.ts b/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.spec.ts index e00941ba77b..1c31aa374e2 100644 --- a/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.spec.ts +++ b/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.spec.ts @@ -18,7 +18,7 @@ import { import { GenerateVdevsService, } from 'app/pages/storage/modules/pool-manager/utils/generate-vdevs/generate-vdevs.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('PoolManagerStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.ts b/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.ts index 0e32196274d..8808f4a5880 100644 --- a/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.ts +++ b/src/app/pages/storage/modules/pool-manager/store/pool-manager.store.ts @@ -33,8 +33,8 @@ import { topologyCategoryToDisks, topologyToDisks, } from 'app/pages/storage/modules/pool-manager/utils/topology.utils'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; export interface PoolManagerTopologyCategory { diff --git a/src/app/pages/storage/stores/pools-dashboard-store.service.spec.ts b/src/app/pages/storage/stores/pools-dashboard-store.service.spec.ts index 0576c01dc58..39a4e70fe67 100644 --- a/src/app/pages/storage/stores/pools-dashboard-store.service.spec.ts +++ b/src/app/pages/storage/stores/pools-dashboard-store.service.spec.ts @@ -13,8 +13,8 @@ import { Disk, DiskTemperatureAgg, StorageDashboardDisk } from 'app/interfaces/d import { Pool } from 'app/interfaces/pool.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { PoolsDashboardStore } from 'app/pages/storage/stores/pools-dashboard-store.service'; -import { ApiService } from 'app/services/api.service'; import { StorageService } from 'app/services/storage.service'; +import { ApiService } from 'app/services/websocket/api.service'; const temperatureAgg = { sda: { min: 10, max: 30, avg: 20 }, diff --git a/src/app/pages/storage/stores/pools-dashboard-store.service.ts b/src/app/pages/storage/stores/pools-dashboard-store.service.ts index 31594ed2a4e..7869958659a 100644 --- a/src/app/pages/storage/stores/pools-dashboard-store.service.ts +++ b/src/app/pages/storage/stores/pools-dashboard-store.service.ts @@ -14,8 +14,8 @@ import { Disk, DiskTemperatureAgg, StorageDashboardDisk } from 'app/interfaces/d import { Pool } from 'app/interfaces/pool.interface'; import { SmartTestResults } from 'app/interfaces/smart-test.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface PoolsDashboardState { arePoolsLoading: boolean; diff --git a/src/app/pages/system-tasks/config-reset/config-reset.component.spec.ts b/src/app/pages/system-tasks/config-reset/config-reset.component.spec.ts index 9d5467993e0..726ce33d636 100644 --- a/src/app/pages/system-tasks/config-reset/config-reset.component.spec.ts +++ b/src/app/pages/system-tasks/config-reset/config-reset.component.spec.ts @@ -11,8 +11,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyright-line.component'; import { ConfigResetComponent } from 'app/pages/system-tasks/config-reset/config-reset.component'; -import { ApiService } from 'app/services/api.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; describe('ConfigResetComponent', () => { let spectator: Spectator; @@ -30,7 +30,7 @@ describe('ConfigResetComponent', () => { ]), mockProvider(MatDialog), mockProvider(Location), - mockProvider(WebSocketConnectionService, { + mockProvider(WebSocketHandlerService, { isConnected$, prepareShutdown: jest.fn(), }), @@ -61,7 +61,7 @@ describe('ConfigResetComponent', () => { it('resets config when user visits the page and waits for websocket to reconnect', fakeAsync(() => { expect(spectator.inject(ApiService).job).toHaveBeenCalledWith('config.reset', [{ reboot: true }]); expect(spectator.inject(DialogService).jobDialog).toHaveBeenCalled(); - expect(spectator.inject(WebSocketConnectionService).prepareShutdown).toHaveBeenCalled(); + expect(spectator.inject(WebSocketHandlerService).prepareShutdown).toHaveBeenCalled(); })); it('takes user to sign-in page when new websocket connection is established after config reset', fakeAsync(() => { diff --git a/src/app/pages/system-tasks/config-reset/config-reset.component.ts b/src/app/pages/system-tasks/config-reset/config-reset.component.ts index 285039063af..9de0453132c 100644 --- a/src/app/pages/system-tasks/config-reset/config-reset.component.ts +++ b/src/app/pages/system-tasks/config-reset/config-reset.component.ts @@ -12,9 +12,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyright-line.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @UntilDestroy() @Component({ @@ -34,7 +34,7 @@ export class ConfigResetComponent implements OnInit, OnDestroy { private connectedSubscription: Timeout; constructor( - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, protected router: Router, protected loader: AppLoaderService, private errorHandler: ErrorHandlerService, diff --git a/src/app/pages/system-tasks/failover/failover.component.ts b/src/app/pages/system-tasks/failover/failover.component.ts index b7f9d8489d5..918dd80f934 100644 --- a/src/app/pages/system-tasks/failover/failover.component.ts +++ b/src/app/pages/system-tasks/failover/failover.component.ts @@ -11,9 +11,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyright-line.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { passiveNodeReplaced } from 'app/store/system-info/system-info.actions'; @UntilDestroy() @@ -35,7 +35,7 @@ export class FailoverComponent implements OnInit { constructor( protected ws: ApiService, private errorHandler: ErrorHandlerService, - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, protected router: Router, protected loader: AppLoaderService, protected dialogService: DialogService, diff --git a/src/app/pages/system-tasks/restart/restart.component.ts b/src/app/pages/system-tasks/restart/restart.component.ts index 9fd93c8850e..396a52b4279 100644 --- a/src/app/pages/system-tasks/restart/restart.component.ts +++ b/src/app/pages/system-tasks/restart/restart.component.ts @@ -9,9 +9,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyright-line.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @UntilDestroy() @Component({ @@ -31,7 +31,7 @@ import { WebSocketConnectionService } from 'app/services/websocket-connection.se export class RestartComponent implements OnInit { constructor( protected ws: ApiService, - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, protected router: Router, private route: ActivatedRoute, private errorHandler: ErrorHandlerService, @@ -59,7 +59,7 @@ export class RestartComponent implements OnInit { }, complete: () => { // show restart screen this.wsManager.prepareShutdown(); - this.wsManager.closeWebSocketConnection(); + this.wsManager.closeWsConnection(); setTimeout(() => { this.router.navigate(['/signin']); }, 5000); diff --git a/src/app/pages/system-tasks/shutdown/shutdown.component.ts b/src/app/pages/system-tasks/shutdown/shutdown.component.ts index 414a349bd5f..3b88eb4da03 100644 --- a/src/app/pages/system-tasks/shutdown/shutdown.component.ts +++ b/src/app/pages/system-tasks/shutdown/shutdown.component.ts @@ -7,9 +7,9 @@ import { TranslateModule } from '@ngx-translate/core'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { CopyrightLineComponent } from 'app/modules/layout/copyright-line/copyright-line.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @UntilDestroy() @Component({ @@ -29,7 +29,7 @@ import { WebSocketConnectionService } from 'app/services/websocket-connection.se export class ShutdownComponent implements OnInit { constructor( protected ws: ApiService, - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, private errorHandler: ErrorHandlerService, protected router: Router, private route: ActivatedRoute, diff --git a/src/app/pages/system/advanced/access/access-card/access-card.component.spec.ts b/src/app/pages/system/advanced/access/access-card/access-card.component.spec.ts index ab5bafb9b15..8c62e119583 100644 --- a/src/app/pages/system/advanced/access/access-card/access-card.component.spec.ts +++ b/src/app/pages/system/advanced/access/access-card/access-card.component.spec.ts @@ -20,10 +20,10 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { AccessCardComponent } from 'app/pages/system/advanced/access/access-card/access-card.component'; import { AccessFormComponent } from 'app/pages/system/advanced/access/access-form/access-form.component'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectAdvancedConfig, selectGeneralConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/system/advanced/access/access-card/access-card.component.ts b/src/app/pages/system/advanced/access/access-card/access-card.component.ts index aade7986740..63a7184bfa2 100644 --- a/src/app/pages/system/advanced/access/access-card/access-card.component.ts +++ b/src/app/pages/system/advanced/access/access-card/access-card.component.ts @@ -40,10 +40,10 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { accessCardElements } from 'app/pages/system/advanced/access/access-card/access-card.elements'; import { AccessFormComponent } from 'app/pages/system/advanced/access/access-form/access-form.component'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { defaultPreferences } from 'app/store/preferences/default-preferences.constant'; import { waitForPreferences } from 'app/store/preferences/preferences.selectors'; diff --git a/src/app/pages/system/advanced/access/access-form/access-form.component.spec.ts b/src/app/pages/system/advanced/access/access-form/access-form.component.spec.ts index ee5090db483..efc88bf35b0 100644 --- a/src/app/pages/system/advanced/access/access-form/access-form.component.spec.ts +++ b/src/app/pages/system/advanced/access/access-form/access-form.component.spec.ts @@ -13,9 +13,9 @@ import { Preferences } from 'app/interfaces/preferences.interface'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { AccessFormComponent } from 'app/pages/system/advanced/access/access-form/access-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { lifetimeTokenUpdated } from 'app/store/preferences/preferences.actions'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { advancedConfigUpdated, generalConfigUpdated, loginBannerUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/access/access-form/access-form.component.ts b/src/app/pages/system/advanced/access/access-form/access-form.component.ts index b938603da41..4d22fa6308d 100644 --- a/src/app/pages/system/advanced/access/access-form/access-form.component.ts +++ b/src/app/pages/system/advanced/access/access-form/access-form.component.ts @@ -22,10 +22,10 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { defaultPreferences } from 'app/store/preferences/default-preferences.constant'; import { lifetimeTokenUpdated } from 'app/store/preferences/preferences.actions'; diff --git a/src/app/pages/system/advanced/advanced-settings.component.ts b/src/app/pages/system/advanced/advanced-settings.component.ts index 4907c950581..20569bbdf11 100644 --- a/src/app/pages/system/advanced/advanced-settings.component.ts +++ b/src/app/pages/system/advanced/advanced-settings.component.ts @@ -10,7 +10,7 @@ import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { Role } from 'app/enums/role.enum'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { advancedSettingsElements } from 'app/pages/system/advanced/advanced-settings.elements'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AccessCardComponent } from './access/access-card/access-card.component'; import { AllowedAddressesCardComponent } from './allowed-addresses/allowed-addresses-card/allowed-addresses-card.component'; import { AuditCardComponent } from './audit/audit-card/audit-card.component'; diff --git a/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-card/allowed-addresses-card.component.ts b/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-card/allowed-addresses-card.component.ts index afd58a0d087..30a5da119b6 100644 --- a/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-card/allowed-addresses-card.component.ts +++ b/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-card/allowed-addresses-card.component.ts @@ -31,9 +31,9 @@ import { allowedAddressesCardElements } from 'app/pages/system/advanced/allowed- import { AllowedAddressesFormComponent, } from 'app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { generalConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.spec.ts b/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.spec.ts index 15e15816fd7..e669e8f9b10 100644 --- a/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.spec.ts +++ b/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.spec.ts @@ -14,8 +14,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { AllowedAddressesFormComponent } from 'app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AllowedAddressesComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.ts b/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.ts index 656a47bd0e4..f464be67b17 100644 --- a/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.ts +++ b/src/app/pages/system/advanced/allowed-addresses/allowed-addresses-form/allowed-addresses-form.component.ts @@ -26,8 +26,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { generalConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/audit/audit-card/audit-card.component.ts b/src/app/pages/system/advanced/audit/audit-card/audit-card.component.ts index 3d2a9b212de..80784498a83 100644 --- a/src/app/pages/system/advanced/audit/audit-card/audit-card.component.ts +++ b/src/app/pages/system/advanced/audit/audit-card/audit-card.component.ts @@ -17,8 +17,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; import { auditCardElements } from 'app/pages/system/advanced/audit/audit-card/audit-card.elements'; import { AuditFormComponent } from 'app/pages/system/advanced/audit/audit-form/audit-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy(this) @Component({ diff --git a/src/app/pages/system/advanced/audit/audit-form/audit-form.component.spec.ts b/src/app/pages/system/advanced/audit/audit-form/audit-form.component.spec.ts index 2ff6ade7500..b596caacc80 100644 --- a/src/app/pages/system/advanced/audit/audit-form/audit-form.component.spec.ts +++ b/src/app/pages/system/advanced/audit/audit-form/audit-form.component.spec.ts @@ -12,8 +12,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { AuditFormComponent } from 'app/pages/system/advanced/audit/audit-form/audit-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AuditFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/audit/audit-form/audit-form.component.ts b/src/app/pages/system/advanced/audit/audit-form/audit-form.component.ts index 0242587a05f..c3520596e14 100644 --- a/src/app/pages/system/advanced/audit/audit-form/audit-form.component.ts +++ b/src/app/pages/system/advanced/audit/audit-form/audit-form.component.ts @@ -27,8 +27,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/console/console-form/console-form.component.spec.ts b/src/app/pages/system/advanced/console/console-form/console-form.component.spec.ts index 6972552fec2..92f861b53ce 100644 --- a/src/app/pages/system/advanced/console/console-form/console-form.component.spec.ts +++ b/src/app/pages/system/advanced/console/console-form/console-form.component.spec.ts @@ -18,8 +18,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ConsoleConfig } from 'app/pages/system/advanced/console/console-card/console-card.component'; import { ConsoleFormComponent } from 'app/pages/system/advanced/console/console-form/console-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectAdvancedConfig } from 'app/store/system-config/system-config.selectors'; describe('ConsoleFormComponent', () => { diff --git a/src/app/pages/system/advanced/console/console-form/console-form.component.ts b/src/app/pages/system/advanced/console/console-form/console-form.component.ts index 44216c2178f..f7d56cadc9f 100644 --- a/src/app/pages/system/advanced/console/console-form/console-form.component.ts +++ b/src/app/pages/system/advanced/console/console-form/console-form.component.ts @@ -24,7 +24,7 @@ import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-he import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ConsoleConfig } from 'app/pages/system/advanced/console/console-card/console-card.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/cron/cron-card/cron-card.component.spec.ts b/src/app/pages/system/advanced/cron/cron-card/cron-card.component.spec.ts index 583f54c5ca0..e9a2ff7526c 100644 --- a/src/app/pages/system/advanced/cron/cron-card/cron-card.component.spec.ts +++ b/src/app/pages/system/advanced/cron/cron-card/cron-card.component.spec.ts @@ -16,10 +16,10 @@ import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-sett import { CronCardComponent } from 'app/pages/system/advanced/cron/cron-card/cron-card.component'; import { CronDeleteDialogComponent } from 'app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component'; import { CronFormComponent } from 'app/pages/system/advanced/cron/cron-form/cron-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('CronCardComponent', () => { diff --git a/src/app/pages/system/advanced/cron/cron-card/cron-card.component.ts b/src/app/pages/system/advanced/cron/cron-card/cron-card.component.ts index a49e881b5bb..c96c1342d55 100644 --- a/src/app/pages/system/advanced/cron/cron-card/cron-card.component.ts +++ b/src/app/pages/system/advanced/cron/cron-card/cron-card.component.ts @@ -38,10 +38,10 @@ import { cronCardElements } from 'app/pages/system/advanced/cron/cron-card/cron- import { CronDeleteDialogComponent } from 'app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component'; import { CronFormComponent } from 'app/pages/system/advanced/cron/cron-form/cron-form.component'; import { CronjobRow } from 'app/pages/system/advanced/cron/cron-list/cronjob-row.interface'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component.ts b/src/app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component.ts index 95fc5de8830..47e8a4065af 100644 --- a/src/app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component.ts +++ b/src/app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component.ts @@ -16,8 +16,8 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { CronjobRow } from 'app/pages/system/advanced/cron/cron-list/cronjob-row.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/cron/cron-form/cron-form.component.spec.ts b/src/app/pages/system/advanced/cron/cron-form/cron-form.component.spec.ts index c6516ffde03..8e211620688 100644 --- a/src/app/pages/system/advanced/cron/cron-form/cron-form.component.spec.ts +++ b/src/app/pages/system/advanced/cron/cron-form/cron-form.component.spec.ts @@ -13,10 +13,10 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { CronFormComponent } from 'app/pages/system/advanced/cron/cron-form/cron-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectTimezone } from 'app/store/system-config/system-config.selectors'; describe('CronFormComponent', () => { diff --git a/src/app/pages/system/advanced/cron/cron-form/cron-form.component.ts b/src/app/pages/system/advanced/cron/cron-form/cron-form.component.ts index b9835f59767..bfcb04e6511 100644 --- a/src/app/pages/system/advanced/cron/cron-form/cron-form.component.ts +++ b/src/app/pages/system/advanced/cron/cron-form/cron-form.component.ts @@ -26,8 +26,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { UserService } from 'app/services/user.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts b/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts index 618d4c161d6..c055c2cf0ea 100644 --- a/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts +++ b/src/app/pages/system/advanced/cron/cron-list/cron-list.component.spec.ts @@ -24,10 +24,10 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { CronDeleteDialogComponent } from 'app/pages/system/advanced/cron/cron-delete-dialog/cron-delete-dialog.component'; import { CronFormComponent } from 'app/pages/system/advanced/cron/cron-form/cron-form.component'; import { CronListComponent } from 'app/pages/system/advanced/cron/cron-list/cron-list.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { LocaleService } from 'app/services/locale.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemConfigState } from 'app/store/system-config/system-config.selectors'; describe('CronListComponent', () => { diff --git a/src/app/pages/system/advanced/cron/cron-list/cron-list.component.ts b/src/app/pages/system/advanced/cron/cron-list/cron-list.component.ts index 0eda4bb4d3a..220ca1237b8 100644 --- a/src/app/pages/system/advanced/cron/cron-list/cron-list.component.ts +++ b/src/app/pages/system/advanced/cron/cron-list/cron-list.component.ts @@ -35,10 +35,10 @@ import { CronDeleteDialogComponent } from 'app/pages/system/advanced/cron/cron-d import { CronFormComponent } from 'app/pages/system/advanced/cron/cron-form/cron-form.component'; import { cronElements } from 'app/pages/system/advanced/cron/cron-list/cron-list.elements'; import { CronjobRow } from 'app/pages/system/advanced/cron/cron-list/cronjob-row.interface'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { TaskService } from 'app/services/task.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-card/global-two-factor-card.component.ts b/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-card/global-two-factor-card.component.ts index a52390c64df..9f208fea181 100644 --- a/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-card/global-two-factor-card.component.ts +++ b/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-card/global-two-factor-card.component.ts @@ -22,8 +22,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; import { globalTwoFactorCardElements } from 'app/pages/system/advanced/global-two-factor-auth/global-two-factor-card/global-two-factor-card.elements'; import { GlobalTwoFactorAuthFormComponent } from 'app/pages/system/advanced/global-two-factor-auth/global-two-factor-form/global-two-factor-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-form/global-two-factor-form.component.ts b/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-form/global-two-factor-form.component.ts index bd41c39c02f..e8be85c7c3b 100644 --- a/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-form/global-two-factor-form.component.ts +++ b/src/app/pages/system/advanced/global-two-factor-auth/global-two-factor-form/global-two-factor-form.component.ts @@ -24,9 +24,9 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.spec.ts b/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.spec.ts index e0c3bad7c31..a4c41143e9e 100644 --- a/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.spec.ts +++ b/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.spec.ts @@ -19,8 +19,8 @@ import { import { InitShutdownFormComponent, } from 'app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InitShutdownCardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.ts b/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.ts index d758ebfe71a..ff6141a6c1d 100644 --- a/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.ts +++ b/src/app/pages/system/advanced/init-shutdown/init-shutdown-card/init-shutdown-card.component.ts @@ -37,9 +37,9 @@ import { initShutdownCardElements } from 'app/pages/system/advanced/init-shutdow import { InitShutdownFormComponent, } from 'app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component.ts b/src/app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component.ts index 1729f16fa26..1ac325f84da 100644 --- a/src/app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component.ts +++ b/src/app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component.ts @@ -27,8 +27,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy({ arrayName: 'subscriptions' }) @Component({ diff --git a/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts b/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts index 0201ea8d154..a1fdc61fb1b 100644 --- a/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts +++ b/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.spec.ts @@ -18,8 +18,8 @@ import { import { InitShutdownListComponent, } from 'app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InitShutdownListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.ts b/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.ts index ec8223b9062..69d7c758b7a 100644 --- a/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.ts +++ b/src/app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.component.ts @@ -35,9 +35,9 @@ import { InitShutdownFormComponent, } from 'app/pages/system/advanced/init-shutdown/init-shutdown-form/init-shutdown-form.component'; import { initShudownListElements } from 'app/pages/system/advanced/init-shutdown/init-shutdown-list/init-shutdown-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.spec.ts b/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.spec.ts index 1e8653fb11e..eca151ea586 100644 --- a/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.spec.ts +++ b/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.spec.ts @@ -13,11 +13,11 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { IsolatedGpusFormComponent } from 'app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { GpuService } from 'app/services/gpu/gpu.service'; import { IsolatedGpuValidatorService } from 'app/services/gpu/isolated-gpu-validator.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectAdvancedConfig } from 'app/store/system-config/system-config.selectors'; describe('IsolatedGpuPcisFormComponent', () => { diff --git a/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.ts b/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.ts index e4e87470d6e..3b80905d2c8 100644 --- a/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.ts +++ b/src/app/pages/system/advanced/isolated-gpus/isolated-gpus-form/isolated-gpus-form.component.ts @@ -18,8 +18,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { IsolatedGpuValidatorService } from 'app/services/gpu/isolated-gpu-validator.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; import { waitForAdvancedConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.spec.ts b/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.spec.ts index b586bc56e8d..a65344c70ed 100644 --- a/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.spec.ts +++ b/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.spec.ts @@ -10,8 +10,8 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { KernelFormComponent } from 'app/pages/system/advanced/kernel/kernel-form/kernel-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('KernelFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.ts b/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.ts index 9d44c9ba5b8..e5f9366bc9c 100644 --- a/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.ts +++ b/src/app/pages/system/advanced/kernel/kernel-form/kernel-form.component.ts @@ -18,8 +18,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/replication/replication-settings-card/replication-settings-card.component.ts b/src/app/pages/system/advanced/replication/replication-settings-card/replication-settings-card.component.ts index a51f1c912dd..b7df489e1fd 100644 --- a/src/app/pages/system/advanced/replication/replication-settings-card/replication-settings-card.component.ts +++ b/src/app/pages/system/advanced/replication/replication-settings-card/replication-settings-card.component.ts @@ -22,8 +22,8 @@ import { replicationSettingsCardElements } from 'app/pages/system/advanced/repli import { ReplicationSettingsFormComponent, } from 'app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.spec.ts b/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.spec.ts index 79a8489ee55..593f0a5b87d 100644 --- a/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.spec.ts +++ b/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.spec.ts @@ -10,9 +10,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ReplicationSettingsFormComponent } from 'app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ReplicationSettingsFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.ts b/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.ts index 82efd615761..b30a79f0d29 100644 --- a/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.ts +++ b/src/app/pages/system/advanced/replication/replication-settings-form/replication-settings-form.component.ts @@ -18,8 +18,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.spec.ts b/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.spec.ts index fe42a8689bb..de0ca704182 100644 --- a/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.spec.ts +++ b/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.spec.ts @@ -11,8 +11,8 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { SystemInfo } from 'app/interfaces/system-info.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { selectJob } from 'app/modules/jobs/store/job.selectors'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemInfo } from 'app/store/system-info/system-info.selectors'; import { SaveDebugButtonComponent } from './save-debug-button.component'; diff --git a/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.ts b/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.ts index 2342f96deb8..aa42fd2f55e 100644 --- a/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.ts +++ b/src/app/pages/system/advanced/save-debug-button/save-debug-button.component.ts @@ -15,9 +15,9 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { selectJob } from 'app/modules/jobs/store/job.selectors'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { saveDebugElement } from 'app/pages/system/advanced/save-debug-button/save-debug-button.elements'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-card/self-encrypting-drive-card.component.ts b/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-card/self-encrypting-drive-card.component.ts index 90a9c2c1ba2..c9a2296d0ca 100644 --- a/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-card/self-encrypting-drive-card.component.ts +++ b/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-card/self-encrypting-drive-card.component.ts @@ -23,8 +23,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; import { sedCardElements } from 'app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-card/self-encrypting-drive-card.elements'; import { SelfEncryptingDriveFormComponent } from 'app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForAdvancedConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.spec.ts b/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.spec.ts index 15f59b45249..e00fd4a0f40 100644 --- a/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.spec.ts +++ b/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.spec.ts @@ -10,8 +10,8 @@ import { SedUser } from 'app/enums/sed-user.enum'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { SelfEncryptingDriveFormComponent } from 'app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SedFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.ts b/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.ts index 1b696bd450a..c8c3c6ea956 100644 --- a/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.ts +++ b/src/app/pages/system/advanced/self-encrypting-drive/self-encrypting-drive-form/self-encrypting-drive-form.component.ts @@ -21,8 +21,8 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/storage/storage-card/storage-card.component.ts b/src/app/pages/system/advanced/storage/storage-card/storage-card.component.ts index c91a5e128e2..60fd1ed75c3 100644 --- a/src/app/pages/system/advanced/storage/storage-card/storage-card.component.ts +++ b/src/app/pages/system/advanced/storage/storage-card/storage-card.component.ts @@ -23,8 +23,8 @@ import { storageCardElements } from 'app/pages/system/advanced/storage/storage-c import { StorageSettingsFormComponent, } from 'app/pages/system/advanced/storage/storage-settings-form/storage-settings-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; @UntilDestroy() diff --git a/src/app/pages/system/advanced/storage/storage-settings-form/storage-settings-form.component.ts b/src/app/pages/system/advanced/storage/storage-settings-form/storage-settings-form.component.ts index 656c26df954..e7546cc6c62 100644 --- a/src/app/pages/system/advanced/storage/storage-settings-form/storage-settings-form.component.ts +++ b/src/app/pages/system/advanced/storage/storage-settings-form/storage-settings-form.component.ts @@ -28,7 +28,7 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectService } from 'app/store/services/services.selectors'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.spec.ts b/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.spec.ts index 77b2be8e15d..75b889d5be9 100644 --- a/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.spec.ts +++ b/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.spec.ts @@ -13,8 +13,8 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; import { TunableFormComponent } from 'app/pages/system/advanced/sysctl/tunable-form/tunable-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { SysctlCardComponent } from './sysctl-card.component'; describe('SysctlCardComponent', () => { diff --git a/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.ts b/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.ts index 7dd1f77d574..0e408f46486 100644 --- a/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.ts +++ b/src/app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.component.ts @@ -31,9 +31,9 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { AdvancedSettingsService } from 'app/pages/system/advanced/advanced-settings.service'; import { sysctlCardElements } from 'app/pages/system/advanced/sysctl/sysctl-card/sysctl-card.elements'; import { TunableFormComponent } from 'app/pages/system/advanced/sysctl/tunable-form/tunable-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.spec.ts b/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.spec.ts index adac118f11c..6ffd4ea2544 100644 --- a/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.spec.ts +++ b/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.spec.ts @@ -13,8 +13,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { TunableFormComponent } from 'app/pages/system/advanced/sysctl/tunable-form/tunable-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('TunableFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.ts b/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.ts index 619d585e935..1bca7c8174c 100644 --- a/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.ts +++ b/src/app/pages/system/advanced/sysctl/tunable-form/tunable-form.component.ts @@ -22,7 +22,7 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts b/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts index ccda130bd62..4e8d50e9d9b 100644 --- a/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts +++ b/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.spec.ts @@ -18,8 +18,8 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { TunableFormComponent } from 'app/pages/system/advanced/sysctl/tunable-form/tunable-form.component'; import { TunableListComponent } from 'app/pages/system/advanced/sysctl/tunable-list/tunable-list.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('TunableListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.ts b/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.ts index c6197027df7..fcdec1ec518 100644 --- a/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.ts +++ b/src/app/pages/system/advanced/sysctl/tunable-list/tunable-list.component.ts @@ -33,9 +33,9 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { TestDirective } from 'app/modules/test-id/test.directive'; import { TunableFormComponent } from 'app/pages/system/advanced/sysctl/tunable-form/tunable-form.component'; import { tunableListElements } from 'app/pages/system/advanced/sysctl/tunable-list/tunable-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.spec.ts b/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.spec.ts index c55c263c28b..d5b56b2ea01 100644 --- a/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.spec.ts +++ b/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.spec.ts @@ -13,8 +13,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { SyslogFormComponent } from 'app/pages/system/advanced/syslog/syslog-form/syslog-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SyslogFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.ts b/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.ts index 8b0c90f85ae..7d813658f31 100644 --- a/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.ts +++ b/src/app/pages/system/advanced/syslog/syslog-form/syslog-form.component.ts @@ -32,7 +32,7 @@ import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-he import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SyslogConfig } from 'app/pages/system/advanced/syslog/syslog-card/syslog-card.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/advanced/system-security/system-security-card/system-security-card.component.ts b/src/app/pages/system/advanced/system-security/system-security-card/system-security-card.component.ts index d35c889de4a..64821880d8e 100644 --- a/src/app/pages/system/advanced/system-security/system-security-card/system-security-card.component.ts +++ b/src/app/pages/system/advanced/system-security/system-security-card/system-security-card.component.ts @@ -17,8 +17,8 @@ import { SystemSecurityConfig } from 'app/interfaces/system-security-config.inte import { WithLoadingStateDirective } from 'app/modules/loader/directives/with-loading-state/with-loading-state.directive'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { SystemSecurityFormComponent } from 'app/pages/system/advanced/system-security/system-security-form/system-security-form.component'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.spec.ts b/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.spec.ts index fa6716b362c..2f6e19c3f54 100644 --- a/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.spec.ts +++ b/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.spec.ts @@ -15,9 +15,9 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { SystemSecurityFormComponent } from 'app/pages/system/advanced/system-security/system-security-form/system-security-form.component'; -import { ApiService } from 'app/services/api.service'; import { FipsService } from 'app/services/fips.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { selectSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.ts b/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.ts index 831049c5f02..b60aceb1164 100644 --- a/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.ts +++ b/src/app/pages/system/advanced/system-security/system-security-form/system-security-form.component.ts @@ -18,9 +18,9 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { FipsService } from 'app/services/fips.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/system/alert-config-form/alert-config-form.component.spec.ts b/src/app/pages/system/alert-config-form/alert-config-form.component.spec.ts index a3792996519..092e315d79b 100644 --- a/src/app/pages/system/alert-config-form/alert-config-form.component.spec.ts +++ b/src/app/pages/system/alert-config-form/alert-config-form.component.spec.ts @@ -10,7 +10,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { AlertConfigFormComponent } from 'app/pages/system/alert-config-form/alert-config-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AlertConfigFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/alert-config-form/alert-config-form.component.ts b/src/app/pages/system/alert-config-form/alert-config-form.component.ts index bb9ab3f4697..337fdbf62cf 100644 --- a/src/app/pages/system/alert-config-form/alert-config-form.component.ts +++ b/src/app/pages/system/alert-config-form/alert-config-form.component.ts @@ -25,8 +25,8 @@ import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestOverrideDirective } from 'app/modules/test-id/test-override/test-override.directive'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.spec.ts b/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.spec.ts index c29dc2d5db2..8bf270944a4 100644 --- a/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.spec.ts +++ b/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.spec.ts @@ -16,8 +16,8 @@ import { } from 'app/modules/ix-table/components/ix-table-columns-selector/ix-table-columns-selector.component'; import { AlertServiceComponent } from 'app/pages/system/alert-service/alert-service/alert-service.component'; import { AlertServiceListComponent } from 'app/pages/system/alert-service/alert-service-list/alert-service-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('AlertServiceListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.ts b/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.ts index 86e1bda4c1c..a30a22fc1b0 100644 --- a/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.ts +++ b/src/app/pages/system/alert-service/alert-service-list/alert-service-list.component.ts @@ -33,9 +33,9 @@ import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { AlertServiceComponent } from 'app/pages/system/alert-service/alert-service/alert-service.component'; import { alertServiceListElements } from 'app/pages/system/alert-service/alert-service-list/alert-service-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/alert-service/alert-service/alert-service.component.spec.ts b/src/app/pages/system/alert-service/alert-service/alert-service.component.spec.ts index 402e542820e..11b66ee293b 100644 --- a/src/app/pages/system/alert-service/alert-service/alert-service.component.spec.ts +++ b/src/app/pages/system/alert-service/alert-service/alert-service.component.spec.ts @@ -27,7 +27,7 @@ import { import { OpsGenieServiceComponent, } from 'app/pages/system/alert-service/alert-service/alert-services/ops-genie-service/ops-genie-service.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; jest.mock('./alert-services/aws-sns-service/aws-sns-service.component', () => { return { diff --git a/src/app/pages/system/alert-service/alert-service/alert-service.component.ts b/src/app/pages/system/alert-service/alert-service/alert-service.component.ts index 3a78753428f..ef4906f0707 100644 --- a/src/app/pages/system/alert-service/alert-service/alert-service.component.ts +++ b/src/app/pages/system/alert-service/alert-service/alert-service.component.ts @@ -65,7 +65,7 @@ import { import { VictorOpsServiceComponent, } from 'app/pages/system/alert-service/alert-service/alert-services/victor-ops-service/victor-ops-service.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/alert-settings2/alert-settings2.component.ts b/src/app/pages/system/alert-settings2/alert-settings2.component.ts index 3f735089052..b3cecef2503 100644 --- a/src/app/pages/system/alert-settings2/alert-settings2.component.ts +++ b/src/app/pages/system/alert-settings2/alert-settings2.component.ts @@ -22,8 +22,8 @@ import { iconMarker } from 'app/modules/ix-icon/icon-marker.util'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ThemeService } from 'app/services/theme/theme.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.spec.ts b/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.spec.ts index 021d877e81d..b090ac76e37 100644 --- a/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.spec.ts +++ b/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.spec.ts @@ -15,7 +15,7 @@ import { import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/form-error-handler.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { BootPoolAttachDialogComponent } from './boot-pool-attach-dialog.component'; describe('BootPoolAttachDialogComponent', () => { diff --git a/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.ts b/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.ts index 86258763c1b..fe539c8cbe0 100644 --- a/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.ts +++ b/src/app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component.ts @@ -20,7 +20,7 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.spec.ts b/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.spec.ts index f9cc25e83e3..e77eb30a762 100644 --- a/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.spec.ts +++ b/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.spec.ts @@ -15,7 +15,7 @@ import { BulkListItemComponent } from 'app/modules/lists/bulk-list-item/bulk-lis import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { BootPoolDeleteDialogComponent } from 'app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component'; import { fakeBootEnvironmentsDataSource } from 'app/pages/system/bootenv/test/fake-boot-environments'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const mockSuccessBulkResponse = [{ result: null, diff --git a/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.ts b/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.ts index 860649c9bfd..0e981440bf7 100644 --- a/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.ts +++ b/src/app/pages/system/bootenv/boot-pool-delete-dialog/boot-pool-delete-dialog.component.ts @@ -19,7 +19,7 @@ import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-ch import { BulkListItemComponent } from 'app/modules/lists/bulk-list-item/bulk-list-item.component'; import { BulkListItem, BulkListItemState } from 'app/modules/lists/bulk-list-item/bulk-list-item.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.spec.ts b/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.spec.ts index 375d4025070..009c6144673 100644 --- a/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.spec.ts +++ b/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.spec.ts @@ -14,7 +14,7 @@ import { UnusedDiskSelectComponent, } from 'app/modules/forms/custom-selects/unused-disk-select/unused-disk-select.component'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { BootPoolReplaceDialogComponent } from './boot-pool-replace-dialog.component'; describe('BootPoolReplaceDialogComponent', () => { diff --git a/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.ts b/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.ts index 6fa8570eae7..26b1d568fcf 100644 --- a/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.ts +++ b/src/app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component.ts @@ -22,8 +22,8 @@ import { IxFieldsetComponent } from 'app/modules/forms/ix-forms/components/ix-fi import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-progress-bar/fake-progress-bar.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.spec.ts b/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.spec.ts index fb022b5de7c..fe0441fc80a 100644 --- a/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.spec.ts +++ b/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.spec.ts @@ -12,8 +12,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { BootEnvironmentFormComponent } from 'app/pages/system/bootenv/bootenv-form/bootenv-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('BootEnvironmentFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.ts b/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.ts index 74174723d73..057d814e8b3 100644 --- a/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.ts +++ b/src/app/pages/system/bootenv/bootenv-form/bootenv-form.component.ts @@ -29,7 +29,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts b/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts index 46cdee3a37b..6f93acef28f 100644 --- a/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts +++ b/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.spec.ts @@ -13,9 +13,9 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { BootEnvironmentListComponent } from 'app/pages/system/bootenv/bootenv-list/bootenv-list.component'; import { fakeBootEnvironmentsDataSource } from 'app/pages/system/bootenv/test/fake-boot-environments'; -import { ApiService } from 'app/services/api.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('BootEnvironmentListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.ts b/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.ts index 714511feec3..efc8ecafef5 100644 --- a/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.ts +++ b/src/app/pages/system/bootenv/bootenv-list/bootenv-list.component.ts @@ -45,9 +45,9 @@ import { BootPoolDeleteDialogComponent } from 'app/pages/system/bootenv/boot-poo import { BootEnvironmentFormComponent } from 'app/pages/system/bootenv/bootenv-form/bootenv-form.component'; import { bootListElements } from 'app/pages/system/bootenv/bootenv-list/bootenv-list.elements'; import { BootenvStatsDialogComponent } from 'app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; // TODO: Exclude AnythingUi when NAS-127632 is done interface BootenvUi extends Bootenv { diff --git a/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.spec.ts b/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.spec.ts index 77cb803b3eb..ceecc9bbd0d 100644 --- a/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.spec.ts +++ b/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.spec.ts @@ -17,7 +17,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { FileSizePipe } from 'app/modules/pipes/file-size/file-size.pipe'; import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectAdvancedConfig } from 'app/store/system-config/system-config.selectors'; import { BootenvStatsDialogComponent } from './bootenv-stats-dialog.component'; diff --git a/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.ts b/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.ts index 5dae80cedab..288ce3d780f 100644 --- a/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.ts +++ b/src/app/pages/system/bootenv/bootenv-stats-dialog/bootenv-stats-dialog.component.ts @@ -21,8 +21,8 @@ import { FormatDateTimePipe } from 'app/modules/pipes/format-date-time/format-da import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForAdvancedConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/pages/system/bootenv/bootenv-status/bootenv-status.component.ts b/src/app/pages/system/bootenv/bootenv-status/bootenv-status.component.ts index 5805042df31..5b88f3afb80 100644 --- a/src/app/pages/system/bootenv/bootenv-status/bootenv-status.component.ts +++ b/src/app/pages/system/bootenv/bootenv-status/bootenv-status.component.ts @@ -36,8 +36,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { BootPoolAttachDialogComponent } from 'app/pages/system/bootenv/boot-pool-attach/boot-pool-attach-dialog.component'; import { BootPoolReplaceDialogComponent } from 'app/pages/system/bootenv/boot-pool-replace/boot-pool-replace-dialog.component'; import { bootEnvStatusElements } from 'app/pages/system/bootenv/bootenv-status/bootenv-status.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { BootenvNodeItemComponent } from './bootenv-node-item/bootenv-node-item.component'; export enum BootPoolActionType { diff --git a/src/app/pages/system/enclosure/components/identify-light/identify-light.component.spec.ts b/src/app/pages/system/enclosure/components/identify-light/identify-light.component.spec.ts index 11d56e906f3..0e273be959a 100644 --- a/src/app/pages/system/enclosure/components/identify-light/identify-light.component.spec.ts +++ b/src/app/pages/system/enclosure/components/identify-light/identify-light.component.spec.ts @@ -10,7 +10,7 @@ import { DashboardEnclosureSlot } from 'app/interfaces/enclosure.interface'; import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IdentifyLightComponent } from 'app/pages/system/enclosure/components/identify-light/identify-light.component'; import { EnclosureStore } from 'app/pages/system/enclosure/services/enclosure.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('IdentifyLightComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/enclosure/components/identify-light/identify-light.component.ts b/src/app/pages/system/enclosure/components/identify-light/identify-light.component.ts index 1bb690f83d7..325c585dfde 100644 --- a/src/app/pages/system/enclosure/components/identify-light/identify-light.component.ts +++ b/src/app/pages/system/enclosure/components/identify-light/identify-light.component.ts @@ -10,8 +10,8 @@ import { DriveBayLightStatus } from 'app/enums/enclosure-slot-status.enum'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { EnclosureStore } from 'app/pages/system/enclosure/services/enclosure.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.spec.ts b/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.spec.ts index fe933f67c50..8f6007ea0e5 100644 --- a/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.spec.ts +++ b/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.spec.ts @@ -11,8 +11,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { JbofFormComponent } from 'app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('JbofFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.ts b/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.ts index 0aac2ca16b1..3519004d08c 100644 --- a/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.ts +++ b/src/app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component.ts @@ -19,7 +19,7 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts b/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts index 480adc23c16..b655fa93ee6 100644 --- a/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts +++ b/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.spec.ts @@ -14,8 +14,8 @@ import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-tabl import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/page-header.component'; import { JbofFormComponent } from 'app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component'; import { JbofListComponent } from 'app/pages/system/enclosure/components/jbof-list/jbof-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeJbofDataSource: Jbof[] = [ { diff --git a/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.ts b/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.ts index 6d85f0b7dcc..16e83244145 100644 --- a/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.ts +++ b/src/app/pages/system/enclosure/components/jbof-list/jbof-list.component.ts @@ -32,9 +32,9 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { TestDirective } from 'app/modules/test-id/test.directive'; import { JbofFormComponent } from 'app/pages/system/enclosure/components/jbof-list/jbof-form/jbof-form.component'; import { jbofListElements } from 'app/pages/system/enclosure/components/jbof-list/jbof-list.elements'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.spec.ts b/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.spec.ts index cb7f32527dc..7c1f0d774fc 100644 --- a/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.spec.ts +++ b/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.spec.ts @@ -11,7 +11,7 @@ import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/i import { SetEnclosureLabelDialogComponent, SetEnclosureLabelDialogData, } from 'app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('SetEnclosureLabelDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.ts b/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.ts index 23742da9ed3..b2d6d4aa8b7 100644 --- a/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.ts +++ b/src/app/pages/system/enclosure/components/set-enclosure-label-dialog/set-enclosure-label-dialog.component.ts @@ -15,8 +15,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface SetEnclosureLabelDialogData { enclosureId: string; diff --git a/src/app/pages/system/enclosure/enclosure-dashboard.component.ts b/src/app/pages/system/enclosure/enclosure-dashboard.component.ts index 1ee2fd62662..6356d6bd17a 100644 --- a/src/app/pages/system/enclosure/enclosure-dashboard.component.ts +++ b/src/app/pages/system/enclosure/enclosure-dashboard.component.ts @@ -13,7 +13,7 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { TestDirective } from 'app/modules/test-id/test.directive'; import { ViewElementsMenuComponent } from 'app/pages/system/enclosure/components/enclosure-header/view-elements-menu/view-elements-menu.component'; import { EnclosureStore } from 'app/pages/system/enclosure/services/enclosure.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/enclosure/services/enclosure.store.spec.ts b/src/app/pages/system/enclosure/services/enclosure.store.spec.ts index 68874de080e..22676199a88 100644 --- a/src/app/pages/system/enclosure/services/enclosure.store.spec.ts +++ b/src/app/pages/system/enclosure/services/enclosure.store.spec.ts @@ -16,8 +16,8 @@ import { import { EnclosureStore } from 'app/pages/system/enclosure/services/enclosure.store'; import { EnclosureView } from 'app/pages/system/enclosure/types/enclosure-view.enum'; import { EnclosureSide } from 'app/pages/system/enclosure/utils/supported-enclosures'; -import { ApiService } from 'app/services/api.service'; import { ThemeService } from 'app/services/theme/theme.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('EnclosureStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/system/enclosure/services/enclosure.store.ts b/src/app/pages/system/enclosure/services/enclosure.store.ts index 1c55366eb11..92e07a5d198 100644 --- a/src/app/pages/system/enclosure/services/enclosure.store.ts +++ b/src/app/pages/system/enclosure/services/enclosure.store.ts @@ -14,9 +14,9 @@ import { EnclosureView } from 'app/pages/system/enclosure/types/enclosure-view.e import { getDefaultSide } from 'app/pages/system/enclosure/utils/get-default-side.utils'; import { getEnclosureLabel } from 'app/pages/system/enclosure/utils/get-enclosure-label.utils'; import { EnclosureSide } from 'app/pages/system/enclosure/utils/supported-enclosures'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { ThemeService } from 'app/services/theme/theme.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface EnclosureState { enclosures: DashboardEnclosure[]; diff --git a/src/app/pages/system/failover-settings/failover-settings.component.spec.ts b/src/app/pages/system/failover-settings/failover-settings.component.spec.ts index b180cf17153..1685b80daae 100644 --- a/src/app/pages/system/failover-settings/failover-settings.component.spec.ts +++ b/src/app/pages/system/failover-settings/failover-settings.component.spec.ts @@ -13,8 +13,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SearchInput1Component } from 'app/modules/forms/search-input1/search-input1.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { FailoverSettingsComponent } from 'app/pages/system/failover-settings/failover-settings.component'; -import { ApiService } from 'app/services/api.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; describe('FailoverComponent', () => { let spectator: Spectator; @@ -41,7 +41,7 @@ describe('FailoverComponent', () => { }), ]), mockProvider(SnackbarService), - mockProvider(WebSocketConnectionService, { + mockProvider(WebSocketHandlerService, { isConnected$: of(true), }), ], diff --git a/src/app/pages/system/failover-settings/failover-settings.component.ts b/src/app/pages/system/failover-settings/failover-settings.component.ts index ed41b868e95..94014305ef1 100644 --- a/src/app/pages/system/failover-settings/failover-settings.component.ts +++ b/src/app/pages/system/failover-settings/failover-settings.component.ts @@ -26,10 +26,10 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { failoverElements } from 'app/pages/system/failover-settings/failover-settings.elements'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { AppState } from 'app/store'; import { haSettingsUpdated } from 'app/store/ha-info/ha-info.actions'; @@ -92,7 +92,7 @@ export class FailoverSettingsComponent implements OnInit { private translate: TranslateService, private snackbar: SnackbarService, private store$: Store, - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, ) {} ngOnInit(): void { @@ -118,7 +118,7 @@ export class FailoverSettingsComponent implements OnInit { this.authService.logout().pipe(untilDestroyed(this)).subscribe({ next: () => { this.authService.clearAuthToken(); - this.wsManager.closeWebSocketConnection(); + this.wsManager.closeWsConnection(); }, }); } diff --git a/src/app/pages/system/general-settings/email/email-card/email-card.component.ts b/src/app/pages/system/general-settings/email/email-card/email-card.component.ts index 6df5300c596..f3bbf64678d 100644 --- a/src/app/pages/system/general-settings/email/email-card/email-card.component.ts +++ b/src/app/pages/system/general-settings/email/email-card/email-card.component.ts @@ -16,8 +16,8 @@ import { WithLoadingStateDirective } from 'app/modules/loader/directives/with-lo import { TestDirective } from 'app/modules/test-id/test.directive'; import { emailCardElements } from 'app/pages/system/general-settings/email/email-card/email-card.elements'; import { EmailFormComponent } from 'app/pages/system/general-settings/email/email-form/email-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/general-settings/email/email-form/email-form.component.spec.ts b/src/app/pages/system/general-settings/email/email-form/email-form.component.spec.ts index 18caeebf8a5..69f6be55fe4 100644 --- a/src/app/pages/system/general-settings/email/email-form/email-form.component.spec.ts +++ b/src/app/pages/system/general-settings/email/email-form/email-form.component.spec.ts @@ -21,8 +21,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemInfo } from 'app/store/system-info/system-info.selectors'; import { EmailFormComponent } from './email-form.component'; diff --git a/src/app/pages/system/general-settings/email/email-form/email-form.component.ts b/src/app/pages/system/general-settings/email/email-form/email-form.component.ts index e6cc3aa1fbc..77e433fff7b 100644 --- a/src/app/pages/system/general-settings/email/email-form/email-form.component.ts +++ b/src/app/pages/system/general-settings/email/email-form/email-form.component.ts @@ -32,9 +32,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; enum SendMethod { Smtp = 'smtp', diff --git a/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.spec.ts b/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.spec.ts index 4e633c7bde4..77675d83b04 100644 --- a/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.spec.ts +++ b/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.spec.ts @@ -19,10 +19,10 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { GuiFormComponent } from 'app/pages/system/general-settings/gui/gui-form/gui-form.component'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { ThemeService } from 'app/services/theme/theme.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { themeChangedInGuiForm } from 'app/store/preferences/preferences.actions'; import { selectPreferences, selectTheme } from 'app/store/preferences/preferences.selectors'; import { selectGeneralConfig } from 'app/store/system-config/system-config.selectors'; @@ -68,7 +68,7 @@ describe('GuiFormComponent', () => { mockProvider(SlideInRef, { slideInClosed$: of(), }), - mockProvider(WebSocketConnectionService), + mockProvider(WebSocketHandlerService), mockProvider(DialogService, { confirm: jest.fn(() => of(true)), }), @@ -166,7 +166,7 @@ describe('GuiFormComponent', () => { }); it('shows confirm dialog if HTTPS redirect is enabled', async () => { - const websocketManager = spectator.inject(WebSocketConnectionService); + const websocketManager = spectator.inject(WebSocketHandlerService); Object.defineProperty(websocketManager, 'isConnected$', { get: jest.fn(() => new BehaviorSubject(true)), }); @@ -186,7 +186,7 @@ describe('GuiFormComponent', () => { }); it('shows confirm dialog if service restart is needed and restarts it', async () => { - const websocketManager = spectator.inject(WebSocketConnectionService); + const websocketManager = spectator.inject(WebSocketHandlerService); Object.defineProperty(websocketManager, 'isConnected$', { get: jest.fn(() => new BehaviorSubject(true)), }); diff --git a/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts b/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts index d2b3e9b01ac..c7e5ddca87f 100644 --- a/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts +++ b/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts @@ -30,10 +30,10 @@ import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-header/modal-header.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { ThemeService } from 'app/services/theme/theme.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { AppState } from 'app/store'; import { guiFormSubmitted, themeChangedInGuiForm } from 'app/store/preferences/preferences.actions'; import { waitForPreferences } from 'app/store/preferences/preferences.selectors'; @@ -96,7 +96,7 @@ export class GuiFormComponent { private themeService: ThemeService, private cdr: ChangeDetectorRef, private ws: ApiService, - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, private dialog: DialogService, private loader: AppLoaderService, private translate: TranslateService, @@ -217,7 +217,7 @@ export class GuiFormComponent { ).subscribe({ next: () => { this.wsManager.setupConnectionUrl(protocol, hostname + ':' + port); - this.wsManager.closeWebSocketConnection(); + this.wsManager.closeWsConnection(); this.replaceHrefWhenWsConnected(href); }, error: (error: ApiError) => { diff --git a/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.spec.ts b/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.spec.ts index 39bead31ca8..0d78724db82 100644 --- a/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.spec.ts +++ b/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.spec.ts @@ -15,11 +15,11 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { LocalizationFormComponent } from 'app/pages/system/general-settings/localization/localization-form/localization-form.component'; -import { ApiService } from 'app/services/api.service'; import { LanguageService } from 'app/services/language.service'; import { LocaleService } from 'app/services/locale.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { localizationFormSubmitted } from 'app/store/preferences/preferences.actions'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectIsEnterprise } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.ts b/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.ts index 66f4d599f6b..a15d8add674 100644 --- a/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.ts +++ b/src/app/pages/system/general-settings/localization/localization-form/localization-form.component.ts @@ -26,10 +26,10 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { LanguageService } from 'app/services/language.service'; import { LocaleService } from 'app/services/locale.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { localizationFormSubmitted } from 'app/store/preferences/preferences.actions'; import { generalConfigUpdated } from 'app/store/system-config/system-config.actions'; diff --git a/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.spec.ts b/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.spec.ts index c231794cd77..a6df9f7803a 100644 --- a/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.spec.ts +++ b/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.spec.ts @@ -11,8 +11,8 @@ import { IxIconHarness } from 'app/modules/ix-icon/ix-icon.harness'; import { IxTableHarness } from 'app/modules/ix-table/components/ix-table/ix-table.harness'; import { NtpServerCardComponent } from 'app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component'; import { NtpServerFormComponent } from 'app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const fakeDataSource: NtpServer[] = [ { diff --git a/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.ts b/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.ts index 3f2ea75d4b7..d286d7c21ba 100644 --- a/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.ts +++ b/src/app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.component.ts @@ -27,9 +27,9 @@ import { createTable } from 'app/modules/ix-table/utils'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { ntpServerElements } from 'app/pages/system/general-settings/ntp-server/ntp-server-card/ntp-server-card.elements'; import { NtpServerFormComponent } from 'app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.spec.ts b/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.spec.ts index a642b5093e0..ddd20cad60d 100644 --- a/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.spec.ts +++ b/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.spec.ts @@ -10,8 +10,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { NtpServerFormComponent } from './ntp-server-form.component'; describe('NtpServerFormComponent', () => { diff --git a/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.ts b/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.ts index 7fb89ea8aa2..f1fa443768b 100644 --- a/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.ts +++ b/src/app/pages/system/general-settings/ntp-server/ntp-server-form/ntp-server-form.component.ts @@ -20,8 +20,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { greaterThanFg } from 'app/services/validators'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.spec.ts b/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.spec.ts index 541ec38667c..7fc3bb93d44 100644 --- a/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.spec.ts +++ b/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.spec.ts @@ -15,8 +15,8 @@ import { IxCheckboxHarness } from 'app/modules/forms/ix-forms/components/ix-chec import { SaveConfigDialogComponent, } from 'app/pages/system/general-settings/save-config-dialog/save-config-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemInfo } from 'app/store/system-info/system-info.selectors'; describe('SaveConfigDialogComponent', () => { diff --git a/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.ts b/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.ts index 48a91896eab..68c817db155 100644 --- a/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.ts +++ b/src/app/pages/system/general-settings/save-config-dialog/save-config-dialog.component.ts @@ -19,9 +19,9 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxCheckboxComponent } from 'app/modules/forms/ix-forms/components/ix-checkbox/ix-checkbox.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/system/general-settings/support/eula/eula.component.ts b/src/app/pages/system/general-settings/support/eula/eula.component.ts index 319e7a7957f..b8c38b22601 100644 --- a/src/app/pages/system/general-settings/support/eula/eula.component.ts +++ b/src/app/pages/system/general-settings/support/eula/eula.component.ts @@ -10,7 +10,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { UiSearchDirective } from 'app/directives/ui-search.directive'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { eulaElements } from 'app/pages/system/general-settings/support/eula/eula.elements'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/general-settings/support/license/license.component.spec.ts b/src/app/pages/system/general-settings/support/license/license.component.spec.ts index d23dea74885..8209f8b9a29 100644 --- a/src/app/pages/system/general-settings/support/license/license.component.spec.ts +++ b/src/app/pages/system/general-settings/support/license/license.component.spec.ts @@ -10,8 +10,8 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { LicenseComponent } from './license.component'; describe('LicenseComponent', () => { diff --git a/src/app/pages/system/general-settings/support/license/license.component.ts b/src/app/pages/system/general-settings/support/license/license.component.ts index e93475c6b2d..5d19a5ae673 100644 --- a/src/app/pages/system/general-settings/support/license/license.component.ts +++ b/src/app/pages/system/general-settings/support/license/license.component.ts @@ -19,7 +19,7 @@ import { FormErrorHandlerService } from 'app/modules/forms/ix-forms/services/for import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-header/modal-header.component'; import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/general-settings/support/proactive/proactive.component.spec.ts b/src/app/pages/system/general-settings/support/proactive/proactive.component.spec.ts index bec9f303a2f..d940404a20d 100644 --- a/src/app/pages/system/general-settings/support/proactive/proactive.component.spec.ts +++ b/src/app/pages/system/general-settings/support/proactive/proactive.component.spec.ts @@ -16,8 +16,8 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { ProactiveComponent } from 'app/pages/system/general-settings/support/proactive/proactive.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ProactiveComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/system/general-settings/support/proactive/proactive.component.ts b/src/app/pages/system/general-settings/support/proactive/proactive.component.ts index 8e7af3b3188..a720c17b2a3 100644 --- a/src/app/pages/system/general-settings/support/proactive/proactive.component.ts +++ b/src/app/pages/system/general-settings/support/proactive/proactive.component.ts @@ -26,8 +26,8 @@ import { ModalHeaderComponent } from 'app/modules/slide-ins/components/modal-hea import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/system/general-settings/support/support-card/support-card.component.spec.ts b/src/app/pages/system/general-settings/support/support-card/support-card.component.spec.ts index febe12e09b9..4e648e24dd5 100644 --- a/src/app/pages/system/general-settings/support/support-card/support-card.component.spec.ts +++ b/src/app/pages/system/general-settings/support/support-card/support-card.component.spec.ts @@ -24,7 +24,7 @@ import { } from 'app/pages/system/general-settings/support/set-production-status-dialog/set-production-status-dialog.component'; import { SupportCardComponent } from 'app/pages/system/general-settings/support/support-card/support-card.component'; import { SysInfoComponent } from 'app/pages/system/general-settings/support/sys-info/sys-info.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectSystemInfo } from 'app/store/system-info/system-info.selectors'; const systemInfo = { diff --git a/src/app/pages/system/general-settings/support/support-card/support-card.component.ts b/src/app/pages/system/general-settings/support/support-card/support-card.component.ts index 0770dc16b3e..5b64a0409bb 100644 --- a/src/app/pages/system/general-settings/support/support-card/support-card.component.ts +++ b/src/app/pages/system/general-settings/support/support-card/support-card.component.ts @@ -43,9 +43,9 @@ import { import { supportCardElements } from 'app/pages/system/general-settings/support/support-card/support-card.elements'; import { SysInfoComponent } from 'app/pages/system/general-settings/support/sys-info/sys-info.component'; import { SystemInfoInSupport } from 'app/pages/system/general-settings/support/system-info-in-support.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForSystemInfo } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.spec.ts b/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.spec.ts index cdc074c9e2e..d4e377b0206 100644 --- a/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.spec.ts +++ b/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.spec.ts @@ -18,7 +18,7 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxSelectHarness } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.harness'; import { ManualUpdateFormComponent } from 'app/pages/system/update/components/manual-update-form/manual-update-form.component'; import { SystemGeneralService } from 'app/services/system-general.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { selectPreferences } from 'app/store/preferences/preferences.selectors'; import { selectSystemInfo } from 'app/store/system-info/system-info.selectors'; @@ -58,7 +58,7 @@ describe('ManualUpdateFormComponent', () => { getItem: () => ProductType.ScaleEnterprise, }, }), - mockProvider(WebSocketConnectionService, { + mockProvider(WebSocketHandlerService, { isConnected$: of(true), }), provideMockStore({ diff --git a/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.ts b/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.ts index 81ce8789db1..42e85471c33 100644 --- a/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.ts +++ b/src/app/pages/system/update/components/manual-update-form/manual-update-form.component.ts @@ -35,11 +35,11 @@ import { selectJob } from 'app/modules/jobs/store/job.selectors'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { systemManualUpdateFormElements } from 'app/pages/system/update/components/manual-update-form/manual-update-form.elements'; import { updateAgainCode } from 'app/pages/system/update/utils/update-again-code.constant'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { UploadOptions, UploadService } from 'app/services/upload.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { updateRebootAfterManualUpdate } from 'app/store/preferences/preferences.actions'; diff --git a/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.spec.ts b/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.spec.ts index ba179a4e455..61ea995f524 100644 --- a/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.spec.ts +++ b/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.spec.ts @@ -18,8 +18,8 @@ import { SaveConfigDialogComponent } from 'app/pages/system/general-settings/sav import { UpdateActionsCardComponent } from 'app/pages/system/update/components/update-actions-card/update-actions-card.component'; import { TrainService } from 'app/pages/system/update/services/train.service'; import { UpdateService } from 'app/pages/system/update/services/update.service'; -import { ApiService } from 'app/services/api.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; describe('UpdateActionsCardComponent', () => { diff --git a/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.ts b/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.ts index fd24e51efcc..e3f10ee4a47 100644 --- a/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.ts +++ b/src/app/pages/system/update/components/update-actions-card/update-actions-card.component.ts @@ -38,9 +38,9 @@ import { Package } from 'app/pages/system/update/interfaces/package.interface'; import { TrainService } from 'app/pages/system/update/services/train.service'; import { UpdateService } from 'app/pages/system/update/services/update.service'; import { updateAgainCode } from 'app/pages/system/update/utils/update-again-code.constant'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SystemGeneralService } from 'app/services/system-general.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; diff --git a/src/app/pages/system/update/services/train.service.ts b/src/app/pages/system/update/services/train.service.ts index ad6084c6441..3b86224673c 100644 --- a/src/app/pages/system/update/services/train.service.ts +++ b/src/app/pages/system/update/services/train.service.ts @@ -10,8 +10,8 @@ import { SystemUpdateTrain, SystemUpdateTrains } from 'app/interfaces/system-upd import { DialogService } from 'app/modules/dialog/dialog.service'; import { Package } from 'app/pages/system/update/interfaces/package.interface'; import { UpdateService } from 'app/pages/system/update/services/update.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Injectable({ diff --git a/src/app/pages/system/update/services/update.service.ts b/src/app/pages/system/update/services/update.service.ts index 7699279b285..315c4c4c937 100644 --- a/src/app/pages/system/update/services/update.service.ts +++ b/src/app/pages/system/update/services/update.service.ts @@ -5,7 +5,7 @@ import { } from 'rxjs'; import { SystemUpdateStatus } from 'app/enums/system-update.enum'; import { Package } from 'app/pages/system/update/interfaces/package.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Injectable({ diff --git a/src/app/pages/two-factor-auth/two-factor.component.spec.ts b/src/app/pages/two-factor-auth/two-factor.component.spec.ts index 154e110f330..e47e1107a16 100644 --- a/src/app/pages/two-factor-auth/two-factor.component.spec.ts +++ b/src/app/pages/two-factor-auth/two-factor.component.spec.ts @@ -13,8 +13,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { WarningComponent } from 'app/modules/forms/ix-forms/components/warning/warning.component'; import { QrViewerComponent } from 'app/pages/two-factor-auth/qr-viewer/qr-viewer.component'; import { TwoFactorComponent } from 'app/pages/two-factor-auth/two-factor.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('TwoFactorComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/two-factor-auth/two-factor.component.ts b/src/app/pages/two-factor-auth/two-factor.component.ts index b82c95e99a1..9e5be5ed7b5 100644 --- a/src/app/pages/two-factor-auth/two-factor.component.ts +++ b/src/app/pages/two-factor-auth/two-factor.component.ts @@ -29,8 +29,8 @@ import { WarningComponent } from 'app/modules/forms/ix-forms/components/warning/ import { TestDirective } from 'app/modules/test-id/test.directive'; import { QrViewerComponent } from 'app/pages/two-factor-auth/qr-viewer/qr-viewer.component'; import { twoFactorElements } from 'app/pages/two-factor-auth/two-factor.elements'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.spec.ts b/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.spec.ts index a9cb8355e3b..741466b1bec 100644 --- a/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.spec.ts +++ b/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.spec.ts @@ -12,7 +12,7 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { GlobalConfigFormComponent, } from 'app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('GlobalConfigFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.ts b/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.ts index dcd57b2ce37..cdc6c6d6f0d 100644 --- a/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.ts +++ b/src/app/pages/virtualization/components/all-instances/all-instances-header/global-config-form/global-config-form.component.ts @@ -21,8 +21,8 @@ import { } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.spec.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.spec.ts index 37eb17fd07e..431cc99b675 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.spec.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.spec.ts @@ -12,7 +12,7 @@ import { InstanceDevicesComponent, } from 'app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InstanceDevicesComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.ts index 5198c4f8a44..e2dc8c80494 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-devices/instance-devices.component.ts @@ -20,8 +20,8 @@ import { MapValuePipe } from 'app/modules/pipes/map-value/map-value.pipe'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.spec.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.spec.ts index 35f88401f5f..0405e811c22 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.spec.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.spec.ts @@ -10,8 +10,8 @@ import { DialogService } from 'app/modules/dialog/dialog.service'; import { InstanceGeneralInfoComponent } from 'app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component'; import { InstanceEditFormComponent } from 'app/pages/virtualization/components/instance-edit-form/instance-edit-form.component'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; const demoInstance = { id: 'demo', diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.ts index 15cb4c614d1..421aa31b650 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-general-info/instance-general-info.component.ts @@ -17,9 +17,9 @@ import { IxFormatterService } from 'app/modules/forms/ix-forms/services/ix-forma import { YesNoPipe } from 'app/modules/pipes/yes-no/yes-no.pipe'; import { InstanceEditFormComponent } from 'app/pages/virtualization/components/instance-edit-form/instance-edit-form.component'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.spec.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.spec.ts index 7c58453efa1..bff66a48975 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.spec.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.spec.ts @@ -16,8 +16,8 @@ import { InstanceProxyFormComponent, } from 'app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InstanceProxiesComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.ts index 98c6133b7cf..e714404b41c 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxies.component.ts @@ -21,9 +21,9 @@ import { InstanceProxyFormComponent, } from 'app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; import { ChainedSlideInService } from 'app/services/chained-slide-in.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.spec.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.spec.ts index b4b84ffb9c7..89904972de0 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.spec.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.spec.ts @@ -10,7 +10,7 @@ import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service' import { InstanceProxyFormComponent, } from 'app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InstanceProxyFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.ts b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.ts index 81fe3ec8b19..129b42d0f49 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-details/instance-proxies/instance-proxy-form/instance-proxy-form.component.ts @@ -24,7 +24,7 @@ import { ChainedRef } from 'app/modules/slide-ins/chained-component-ref'; import { ModalHeader2Component } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.ts b/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.ts index 0101e065156..8026dd76e09 100644 --- a/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.ts +++ b/src/app/pages/virtualization/components/all-instances/instance-list/instance-list.component.ts @@ -21,8 +21,8 @@ import { FakeProgressBarComponent } from 'app/modules/loader/components/fake-pro import { TestDirective } from 'app/modules/test-id/test.directive'; import { InstanceRowComponent } from 'app/pages/virtualization/components/all-instances/instance-list/instance-row/instance-row.component'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.spec.ts b/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.spec.ts index b5274c2c9ed..c7add28c0bc 100644 --- a/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.spec.ts +++ b/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.spec.ts @@ -22,7 +22,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { InstanceEditFormComponent } from 'app/pages/virtualization/components/instance-edit-form/instance-edit-form.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InstanceEditFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.ts b/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.ts index d3adf8e431d..38ccb0d701a 100644 --- a/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.ts +++ b/src/app/pages/virtualization/components/instance-edit-form/instance-edit-form.component.ts @@ -27,7 +27,7 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.spec.ts b/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.spec.ts index a94d6eb4bf6..e5ca621174f 100644 --- a/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.spec.ts +++ b/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.spec.ts @@ -29,8 +29,8 @@ import { PageHeaderComponent } from 'app/modules/page-header/page-title-header/p import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { InstanceWizardComponent } from 'app/pages/virtualization/components/instance-wizard/instance-wizard.component'; import { VirtualizationImageWithId } from 'app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('InstanceWizardComponent', () => { let spectator: SpectatorRouting; diff --git a/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.ts b/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.ts index 3f50a4fe669..1776f39d52e 100644 --- a/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.ts +++ b/src/app/pages/virtualization/components/instance-wizard/instance-wizard.component.ts @@ -48,8 +48,8 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { SelectImageDialogComponent, VirtualizationImageWithId, } from 'app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.spec.ts b/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.spec.ts index 45e82642053..829cd3d1ee2 100644 --- a/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.spec.ts +++ b/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.spec.ts @@ -16,7 +16,7 @@ import { VirtualizationRemote } from 'app/enums/virtualization.enum'; import { VirtualizationImage } from 'app/interfaces/virtualization.interface'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { SelectImageDialogComponent } from 'app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; const imageChoices: Record = { 'almalinux/8/cloud': { diff --git a/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.ts b/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.ts index ecdfa5c62ad..72871b714f1 100644 --- a/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.ts +++ b/src/app/pages/virtualization/components/instance-wizard/select-image-dialog/select-image-dialog.component.ts @@ -21,8 +21,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; import { IxIconComponent } from 'app/modules/ix-icon/ix-icon.component'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export type VirtualizationImageWithId = VirtualizationImage & { id: string; diff --git a/src/app/pages/virtualization/stores/virtualization-config.store.spec.ts b/src/app/pages/virtualization/stores/virtualization-config.store.spec.ts index c3872a9ac5e..e70e28b25a5 100644 --- a/src/app/pages/virtualization/stores/virtualization-config.store.spec.ts +++ b/src/app/pages/virtualization/stores/virtualization-config.store.spec.ts @@ -3,7 +3,7 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { VirtualizationGlobalState } from 'app/enums/virtualization.enum'; import { VirtualizationGlobalConfig } from 'app/interfaces/virtualization.interface'; import { VirtualizationConfigStore } from 'app/pages/virtualization/stores/virtualization-config.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('VirtualizationConfigStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/virtualization/stores/virtualization-config.store.ts b/src/app/pages/virtualization/stores/virtualization-config.store.ts index 89cf0e98a17..a5a5ed22898 100644 --- a/src/app/pages/virtualization/stores/virtualization-config.store.ts +++ b/src/app/pages/virtualization/stores/virtualization-config.store.ts @@ -5,8 +5,8 @@ import { ComponentStore } from '@ngrx/component-store'; import { Subscription, switchMap, tap } from 'rxjs'; import { catchError } from 'rxjs/operators'; import { VirtualizationGlobalConfig } from 'app/interfaces/virtualization.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface VirtualizationConfigState { isLoading: boolean; diff --git a/src/app/pages/virtualization/stores/virtualization-instances.store.spec.ts b/src/app/pages/virtualization/stores/virtualization-instances.store.spec.ts index 21e6bcb22d1..b83dbda7f84 100644 --- a/src/app/pages/virtualization/stores/virtualization-instances.store.spec.ts +++ b/src/app/pages/virtualization/stores/virtualization-instances.store.spec.ts @@ -2,7 +2,7 @@ import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { VirtualizationDevice, VirtualizationInstance } from 'app/interfaces/virtualization.interface'; import { VirtualizationInstancesStore } from 'app/pages/virtualization/stores/virtualization-instances.store'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('VirtualizationInstancesStore', () => { let spectator: SpectatorService; diff --git a/src/app/pages/virtualization/stores/virtualization-instances.store.ts b/src/app/pages/virtualization/stores/virtualization-instances.store.ts index 95943904838..7eae826c07f 100644 --- a/src/app/pages/virtualization/stores/virtualization-instances.store.ts +++ b/src/app/pages/virtualization/stores/virtualization-instances.store.ts @@ -5,8 +5,8 @@ import { ComponentStore } from '@ngrx/component-store'; import { switchMap, tap } from 'rxjs'; import { catchError, filter, repeat } from 'rxjs/operators'; import { VirtualizationDevice, VirtualizationInstance } from 'app/interfaces/virtualization.interface'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface VirtualizationInstancesState { isLoading: boolean; diff --git a/src/app/pages/vm/devices/device-form/device-form.component.spec.ts b/src/app/pages/vm/devices/device-form/device-form.component.spec.ts index f0734a389e6..1d0ea520232 100644 --- a/src/app/pages/vm/devices/device-form/device-form.component.spec.ts +++ b/src/app/pages/vm/devices/device-form/device-form.component.spec.ts @@ -27,10 +27,10 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { DeviceFormComponent } from 'app/pages/vm/devices/device-form/device-form.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { SlideInService } from 'app/services/slide-in.service'; import { VmService } from 'app/services/vm.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeviceFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/devices/device-form/device-form.component.ts b/src/app/pages/vm/devices/device-form/device-form.component.ts index 3f269b8bb0a..353e022dd66 100644 --- a/src/app/pages/vm/devices/device-form/device-form.component.ts +++ b/src/app/pages/vm/devices/device-form/device-form.component.ts @@ -40,9 +40,9 @@ import { SlideInRef } from 'app/modules/slide-ins/slide-in-ref'; import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { NetworkService } from 'app/services/network.service'; +import { ApiService } from 'app/services/websocket/api.service'; const specifyCustom = T('Specify custom'); diff --git a/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.spec.ts b/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.spec.ts index 80e4de475a6..9509214af2c 100644 --- a/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.spec.ts +++ b/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.spec.ts @@ -13,7 +13,7 @@ import { VmDevice, VmDiskDevice, VmRawFileDevice } from 'app/interfaces/vm-devic import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { DeviceDeleteModalComponent } from 'app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeviceDeleteModalComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.ts b/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.ts index 6cc5d418eb5..90fbee9d9d3 100644 --- a/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.ts +++ b/src/app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component.ts @@ -20,8 +20,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts b/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts index 82058b22ca7..9a1f037a109 100644 --- a/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts +++ b/src/app/pages/vm/devices/device-list/device-list/device-list.component.spec.ts @@ -21,8 +21,8 @@ import { } from 'app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component'; import { DeviceDetailsComponent } from 'app/pages/vm/devices/device-list/device-details/device-details.component'; import { DeviceListComponent } from 'app/pages/vm/devices/device-list/device-list/device-list.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeviceListComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/devices/device-list/device-list/device-list.component.ts b/src/app/pages/vm/devices/device-list/device-list/device-list.component.ts index b15ba4e196f..e80fbdab970 100644 --- a/src/app/pages/vm/devices/device-list/device-list/device-list.component.ts +++ b/src/app/pages/vm/devices/device-list/device-list/device-list.component.ts @@ -36,8 +36,8 @@ import { DeviceDeleteModalComponent, } from 'app/pages/vm/devices/device-list/device-delete-modal/device-delete-modal.component'; import { DeviceDetailsComponent } from 'app/pages/vm/devices/device-list/device-details/device-details.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/utils/cpu-validator.service.spec.ts b/src/app/pages/vm/utils/cpu-validator.service.spec.ts index 71a848db3e6..8a7c327c4de 100644 --- a/src/app/pages/vm/utils/cpu-validator.service.spec.ts +++ b/src/app/pages/vm/utils/cpu-validator.service.spec.ts @@ -3,7 +3,7 @@ import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; import { lastValueFrom } from 'rxjs'; import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { CpuValidatorService } from 'app/pages/vm/utils/cpu-validator.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CpuValidatorService', () => { let spectator: SpectatorService; diff --git a/src/app/pages/vm/utils/cpu-validator.service.ts b/src/app/pages/vm/utils/cpu-validator.service.ts index 865e2831244..c2de58d023c 100644 --- a/src/app/pages/vm/utils/cpu-validator.service.ts +++ b/src/app/pages/vm/utils/cpu-validator.service.ts @@ -9,7 +9,7 @@ import { } from 'rxjs/operators'; import { helptextVmWizard } from 'app/helptext/vm/vm-wizard/vm-wizard'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; /** * An async validator. diff --git a/src/app/pages/vm/utils/free-space-validator.service.ts b/src/app/pages/vm/utils/free-space-validator.service.ts index 67ff96c20db..a182de31b77 100644 --- a/src/app/pages/vm/utils/free-space-validator.service.ts +++ b/src/app/pages/vm/utils/free-space-validator.service.ts @@ -5,7 +5,7 @@ import { Observable, of } from 'rxjs'; import { map, shareReplay } from 'rxjs/operators'; import { buildNormalizedFileSize } from 'app/helpers/file-size.utils'; import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; /** * Creates an async validator that checks if there is enough free space for the selected datastore. diff --git a/src/app/pages/vm/utils/vm-gpu.service.spec.ts b/src/app/pages/vm/utils/vm-gpu.service.spec.ts index 0c8a5607e5f..7a771fcf753 100644 --- a/src/app/pages/vm/utils/vm-gpu.service.spec.ts +++ b/src/app/pages/vm/utils/vm-gpu.service.spec.ts @@ -6,8 +6,8 @@ import { VmDeviceType } from 'app/enums/vm.enum'; import { Device } from 'app/interfaces/device.interface'; import { VirtualMachine } from 'app/interfaces/virtual-machine.interface'; import { VmGpuService } from 'app/pages/vm/utils/vm-gpu.service'; -import { ApiService } from 'app/services/api.service'; import { GpuService } from 'app/services/gpu/gpu.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('VmGpuService', () => { let spectator: SpectatorService; diff --git a/src/app/pages/vm/utils/vm-gpu.service.ts b/src/app/pages/vm/utils/vm-gpu.service.ts index 5d580341a69..26dcdbfb0af 100644 --- a/src/app/pages/vm/utils/vm-gpu.service.ts +++ b/src/app/pages/vm/utils/vm-gpu.service.ts @@ -8,8 +8,8 @@ import { Device, PciDevice } from 'app/interfaces/device.interface'; import { VirtualMachine } from 'app/interfaces/virtual-machine.interface'; import { VmPciPassthroughDevice } from 'app/interfaces/vm-device.interface'; import { byVmPciSlots } from 'app/pages/vm/utils/by-vm-pci-slots'; -import { ApiService } from 'app/services/api.service'; import { GpuService } from 'app/services/gpu/gpu.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/pages/vm/vm-edit-form/vm-edit-form.component.spec.ts b/src/app/pages/vm/vm-edit-form/vm-edit-form.component.spec.ts index 85c6138ed69..838be7ed429 100644 --- a/src/app/pages/vm/vm-edit-form/vm-edit-form.component.spec.ts +++ b/src/app/pages/vm/vm-edit-form/vm-edit-form.component.spec.ts @@ -18,10 +18,10 @@ import { SLIDE_IN_DATA } from 'app/modules/slide-ins/slide-in.token'; import { CpuValidatorService } from 'app/pages/vm/utils/cpu-validator.service'; import { VmGpuService } from 'app/pages/vm/utils/vm-gpu.service'; import { VmEditFormComponent } from 'app/pages/vm/vm-edit-form/vm-edit-form.component'; -import { ApiService } from 'app/services/api.service'; import { GpuService } from 'app/services/gpu/gpu.service'; import { IsolatedGpuValidatorService } from 'app/services/gpu/isolated-gpu-validator.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('VmEditFormComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/vm-edit-form/vm-edit-form.component.ts b/src/app/pages/vm/vm-edit-form/vm-edit-form.component.ts index 5ae7cc9a72c..09e8b4e89a4 100644 --- a/src/app/pages/vm/vm-edit-form/vm-edit-form.component.ts +++ b/src/app/pages/vm/vm-edit-form/vm-edit-form.component.ts @@ -35,10 +35,10 @@ import { byVmPciSlots } from 'app/pages/vm/utils/by-vm-pci-slots'; import { CpuValidatorService } from 'app/pages/vm/utils/cpu-validator.service'; import { vmCpusetPattern, vmNodesetPattern } from 'app/pages/vm/utils/vm-form-patterns.constant'; import { VmGpuService } from 'app/pages/vm/utils/vm-gpu.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { GpuService } from 'app/services/gpu/gpu.service'; import { IsolatedGpuValidatorService } from 'app/services/gpu/isolated-gpu-validator.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-list.component.ts b/src/app/pages/vm/vm-list.component.ts index a1682446961..2852f86f5dc 100644 --- a/src/app/pages/vm/vm-list.component.ts +++ b/src/app/pages/vm/vm-list.component.ts @@ -46,10 +46,10 @@ import { TestDirective } from 'app/modules/test-id/test.directive'; import { VirtualMachineDetailsRowComponent } from 'app/pages/vm/vm-list/vm-details-row/vm-details-row.component'; import { vmListElements } from 'app/pages/vm/vm-list.elements'; import { VmWizardComponent } from 'app/pages/vm/vm-wizard/vm-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { SlideInService } from 'app/services/slide-in.service'; import { SystemGeneralService } from 'app/services/system-general.service'; import { VmService } from 'app/services/vm.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.spec.ts b/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.spec.ts index 1290d05d0ed..0330931d9b1 100644 --- a/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.spec.ts +++ b/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { VirtualMachine } from 'app/interfaces/virtual-machine.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxInputHarness } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.harness'; import { CloneVmDialogComponent } from 'app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('CloneVmDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.ts b/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.ts index 5c4c9e31405..365900b927f 100644 --- a/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.ts +++ b/src/app/pages/vm/vm-list/clone-vm-dialog/clone-vm-dialog.component.ts @@ -16,8 +16,8 @@ import { FormActionsComponent } from 'app/modules/forms/ix-forms/components/form import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input/ix-input.component'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.spec.ts b/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.spec.ts index f62f6a0659f..370ad8c1b8c 100644 --- a/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.spec.ts +++ b/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.spec.ts @@ -10,7 +10,7 @@ import { VirtualMachine } from 'app/interfaces/virtual-machine.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harness'; import { DeleteVmDialogComponent } from 'app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('DeleteVmDialogComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.ts b/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.ts index 0a9be98cade..96339352230 100644 --- a/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.ts +++ b/src/app/pages/vm/vm-list/delete-vm-dialog/delete-vm-dialog.component.ts @@ -20,8 +20,8 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxValidatorsService } from 'app/modules/forms/ix-forms/services/ix-validators.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-wizard/steps/1-os-step/os-step.component.ts b/src/app/pages/vm/vm-wizard/steps/1-os-step/os-step.component.ts index 084aea4dd76..f9a443e682e 100644 --- a/src/app/pages/vm/vm-wizard/steps/1-os-step/os-step.component.ts +++ b/src/app/pages/vm/vm-wizard/steps/1-os-step/os-step.component.ts @@ -27,7 +27,7 @@ import { import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { vmNamePattern } from 'app/pages/vm/utils/vm-form-patterns.constant'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-wizard/steps/2-cpu-and-memory-step/cpu-and-memory-step.component.ts b/src/app/pages/vm/vm-wizard/steps/2-cpu-and-memory-step/cpu-and-memory-step.component.ts index 4954ad26f33..7f992da733a 100644 --- a/src/app/pages/vm/vm-wizard/steps/2-cpu-and-memory-step/cpu-and-memory-step.component.ts +++ b/src/app/pages/vm/vm-wizard/steps/2-cpu-and-memory-step/cpu-and-memory-step.component.ts @@ -23,7 +23,7 @@ import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.int import { TestDirective } from 'app/modules/test-id/test.directive'; import { CpuValidatorService } from 'app/pages/vm/utils/cpu-validator.service'; import { vmCpusetPattern, vmNodesetPattern } from 'app/pages/vm/utils/vm-form-patterns.constant'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-wizard/steps/3-disk-step/disk-step.component.ts b/src/app/pages/vm/vm-wizard/steps/3-disk-step/disk-step.component.ts index c83ee55f9ab..27d764c12b4 100644 --- a/src/app/pages/vm/vm-wizard/steps/3-disk-step/disk-step.component.ts +++ b/src/app/pages/vm/vm-wizard/steps/3-disk-step/disk-step.component.ts @@ -19,7 +19,7 @@ import { IxFormatterService } from 'app/modules/forms/ix-forms/services/ix-forma import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; import { FreeSpaceValidatorService } from 'app/pages/vm/utils/free-space-validator.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export enum NewOrExistingDisk { New = 'new', diff --git a/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.spec.ts b/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.spec.ts index a62d9aab481..90858ab5ed6 100644 --- a/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.spec.ts +++ b/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.spec.ts @@ -10,7 +10,7 @@ import { IxFormHarness } from 'app/modules/forms/ix-forms/testing/ix-form.harnes import { NetworkInterfaceStepComponent, } from 'app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('NetworkInterfaceStepComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.ts b/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.ts index 5334cbf3644..76e04850f12 100644 --- a/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.ts +++ b/src/app/pages/vm/vm-wizard/steps/4-network-interface-step/network-interface-step.component.ts @@ -17,7 +17,7 @@ import { IxInputComponent } from 'app/modules/forms/ix-forms/components/ix-input import { IxSelectComponent } from 'app/modules/forms/ix-forms/components/ix-select/ix-select.component'; import { SummaryProvider, SummarySection } from 'app/modules/summary/summary.interface'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/pages/vm/vm-wizard/vm-wizard.component.spec.ts b/src/app/pages/vm/vm-wizard/vm-wizard.component.spec.ts index 325212c5ba9..0fdfff477b9 100644 --- a/src/app/pages/vm/vm-wizard/vm-wizard.component.spec.ts +++ b/src/app/pages/vm/vm-wizard/vm-wizard.component.spec.ts @@ -34,11 +34,11 @@ import { } from 'app/pages/vm/vm-wizard/steps/5-installation-media-step/installation-media-step.component'; import { GpuStepComponent } from 'app/pages/vm/vm-wizard/steps/6-gpu-step/gpu-step.component'; import { VmWizardComponent } from 'app/pages/vm/vm-wizard/vm-wizard.component'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; import { GpuService } from 'app/services/gpu/gpu.service'; import { IsolatedGpuValidatorService } from 'app/services/gpu/isolated-gpu-validator.service'; import { SlideInService } from 'app/services/slide-in.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('VmWizardComponent', () => { let spectator: Spectator; diff --git a/src/app/pages/vm/vm-wizard/vm-wizard.component.ts b/src/app/pages/vm/vm-wizard/vm-wizard.component.ts index 11d2f89da90..a0b0270eb27 100644 --- a/src/app/pages/vm/vm-wizard/vm-wizard.component.ts +++ b/src/app/pages/vm/vm-wizard/vm-wizard.component.ts @@ -44,9 +44,9 @@ import { InstallationMediaStepComponent, } from 'app/pages/vm/vm-wizard/steps/5-installation-media-step/installation-media-step.component'; import { GpuStepComponent } from 'app/pages/vm/vm-wizard/steps/6-gpu-step/gpu-step.component'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; import { GpuService } from 'app/services/gpu/gpu.service'; +import { ApiService } from 'app/services/websocket/api.service'; @UntilDestroy() @Component({ diff --git a/src/app/services/api.service.spec.ts b/src/app/services/api.service.spec.ts deleted file mode 100644 index 0dc3646d3d0..00000000000 --- a/src/app/services/api.service.spec.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { mockProvider } from '@ngneat/spectator/jest'; -import { TranslateService } from '@ngx-translate/core'; -import { UUID } from 'angular2-uuid'; -import { - BehaviorSubject, Observable, - Subject, - firstValueFrom, -} from 'rxjs'; -import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; -import { JobState } from 'app/enums/job-state.enum'; -import { ApiEvent } from 'app/interfaces/api-message.interface'; -import { Pool } from 'app/interfaces/pool.interface'; -import { ApiService } from 'app/services/api.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; - -const mockWebSocketConnectionService = { - send: jest.fn(), - buildSubscriber: jest.fn().mockReturnValue(new Subject()), - websocket$: new BehaviorSubject(null), -}; - -const apiEventSubscription1$ = new BehaviorSubject(null); -const apiEventSubscription2$ = new BehaviorSubject(null); - -const mockEventSubscriptions = new Map>([ - ['event1', apiEventSubscription1$], - ['event2', apiEventSubscription2$], -]); - -describe('ApiService', () => { - let service: ApiService; - - beforeEach(() => { - TestBed.configureTestingModule({ - providers: [ - ApiService, - mockProvider(TranslateService), - { provide: WebSocketConnectionService, useValue: mockWebSocketConnectionService }, - ], - }); - - service = TestBed.inject(ApiService); - - jest.spyOn(service.clearSubscriptions$, 'next'); - - (service as unknown as { - eventSubscribers: Map>; - }).eventSubscribers = mockEventSubscriptions; - - jest.clearAllMocks(); - }); - - describe('call', () => { - it('should make a WS call and get a response', () => { - const uuid = 'fakeUUID'; - jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); - mockWebSocketConnectionService.websocket$.next({ - id: uuid, - msg: IncomingApiMessageType.Result, - result: {}, - }); - - service.call('cloudsync.providers').subscribe((result) => { - // TODO: Actually do nothing - expect(result).toEqual({}); - }); - - expect(mockWebSocketConnectionService.send).toHaveBeenCalled(); - }); - - it('should handle WS call errors', () => { - jest.spyOn(console, 'error').mockImplementation(); - const uuid = 'fakeUUID'; - jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); - mockWebSocketConnectionService.websocket$.next({ - id: uuid, - msg: IncomingApiMessageType.Result, - error: 'Test Error', - }); - - service.call('cloudsync.providers').subscribe( - { - next: () => {}, - error: (error) => { - expect(error).toBe('Test Error'); - }, - }, - ); - }); - }); - - describe('callAndSubscribe', () => { - it('should call and subscribe to updates', async () => { - const pools = [{ name: 'pool1' }, { name: 'pool2' }] as Pool[]; - const uuid = 'fakeUUID'; - jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); - mockWebSocketConnectionService.websocket$.next({ - id: uuid, - msg: IncomingApiMessageType.Result, - result: pools, - }); - - expect(await firstValueFrom(service.callAndSubscribe('pool.query'))).toEqual([ - { name: 'pool1' }, { name: 'pool2' }, - ]); - }); - }); - - describe('job', () => { - it('should start a job successfully', () => { - const uuid = 'fakeUUID'; - const mockJobId = 1234; - jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); - mockWebSocketConnectionService.websocket$.next({ - id: uuid, - msg: IncomingApiMessageType.Result, - result: mockJobId, - }); - - service.startJob('boot.attach').subscribe((response) => { - expect(response).toEqual(mockJobId); - }); - }); - - it('should handle a successful job', () => { - service.job('boot.attach').subscribe((result) => { - expect(result.state).toEqual(JobState.Failed); - }); - }); - }); - - describe('subscribe', () => { - it('should successfully subscribe', () => { - const eventData = { data: 'test' }; - (mockWebSocketConnectionService.buildSubscriber() as Subject).next(eventData); - - service.subscribe('alert.list').subscribe((data) => { - // TODO: Actually do nothing - expect(data).toEqual({}); - }); - - expect(mockWebSocketConnectionService.buildSubscriber).toHaveBeenCalled(); - }); - }); - - describe('subscribeToLogs', () => { - it('should successfully subscribe to logs', () => { - const logData = { data: 'log test' }; - (mockWebSocketConnectionService.buildSubscriber() as Subject).next(logData); - - service.subscribeToLogs('logName').subscribe((data) => { - // TODO: Actually do nothing - expect(data).toEqual({}); - }); - }); - }); - - describe('clearSubscriptions', () => { - it('should clear all event subscriptions', () => { - service.clearSubscriptions(); - - expect(service.clearSubscriptions$.next).toHaveBeenCalled(); - expect(mockEventSubscriptions.size).toBe(0); - }); - }); -}); diff --git a/src/app/services/auth/auth.service.spec.ts b/src/app/services/auth/auth.service.spec.ts index eef2cebef12..bfa0f50c616 100644 --- a/src/app/services/auth/auth.service.spec.ts +++ b/src/app/services/auth/auth.service.spec.ts @@ -15,14 +15,13 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { LoginResult } from 'app/enums/login-result.enum'; import { Role } from 'app/enums/role.enum'; -import { ApiCallMethod } from 'app/interfaces/api/api-call-directory.interface'; import { LoginExResponse, LoginExResponseType } from 'app/interfaces/auth.interface'; import { DashConfigItem } from 'app/interfaces/dash-config-item.interface'; import { LoggedInUser } from 'app/interfaces/ds-cache.interface'; import { Preferences } from 'app/interfaces/preferences.interface'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; const authMeUser = { pw_dir: 'dir', @@ -51,11 +50,16 @@ describe('AuthService', () => { mockProvider(LocalStorageService), mockApi([ mockCall('auth.me', authMeUser), + mockCall('auth.generate_token', 'DUMMY_TOKEN'), + mockCall('auth.login_ex', { + response_type: LoginExResponseType.Success, + user_info: { + privilege: { webui_access: true }, + }, + } as LoginExResponse), ]), - mockProvider(WebSocketConnectionService, { - send: jest.fn(), + mockProvider(WebSocketHandlerService, { isConnected$: of(true), - websocket$: of({}), }), { provide: STORAGE_STRATEGIES, @@ -71,24 +75,24 @@ describe('AuthService', () => { beforeEach(() => { spectator = createService(); - const originalMakeRequest = spectator.service.makeRequest.bind(spectator.service); - jest.spyOn(spectator.service, 'makeRequest').mockImplementation((method: ApiCallMethod, params: never) => { - originalMakeRequest(method, params).subscribe(); - - switch (method) { - case 'auth.generate_token': - return of('DUMMY_TOKEN'); - case 'auth.login_ex': - return of({ - response_type: LoginExResponseType.Success, - user_info: { - privilege: { webui_access: true }, - }, - } as LoginExResponse); - default: - return of(null); - } - }); + // const originalMakeRequest = spectator.service.makeRequest.bind(spectator.service); + // jest.spyOn(spectator.service, 'makeRequest').mockImplementation((method: ApiCallMethod, params: never) => { + // originalMakeRequest(method, params).subscribe(); + + // switch (method) { + // case 'auth.generate_token': + // return of('DUMMY_TOKEN'); + // case 'auth.login_ex': + // return of({ + // response_type: LoginExResponseType.Success, + // user_info: { + // privilege: { webui_access: true }, + // }, + // } as LoginExResponse); + // default: + // return of(null); + // } + // }); testScheduler = new TestScheduler((actual, expected) => { expect(actual).toEqual(expected); @@ -115,13 +119,13 @@ describe('AuthService', () => { { d: 'DUMMY_TOKEN' }, ); }); - expect(spectator.inject(WebSocketConnectionService).send).toHaveBeenCalledWith(expect.objectContaining({ + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ msg: IncomingApiMessageType.Method, method: 'auth.login_ex', params: [{ mechanism: 'PASSWORD_PLAIN', username: 'dummy', password: 'dummy' }], })); expect(spectator.inject(ApiService).call).not.toHaveBeenCalledWith('auth.me'); - expect(spectator.inject(WebSocketConnectionService).send).toHaveBeenCalledWith(expect.objectContaining({ + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ msg: IncomingApiMessageType.Method, method: 'auth.generate_token', })); @@ -146,13 +150,13 @@ describe('AuthService', () => { { d: 'DUMMY_TOKEN' }, ); }); - expect(spectator.inject(WebSocketConnectionService).send).toHaveBeenCalledWith(expect.objectContaining({ + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ msg: IncomingApiMessageType.Method, method: 'auth.login_ex', params: [{ mechanism: 'TOKEN_PLAIN', token: 'DUMMY_TOKEN' }], })); expect(spectator.inject(ApiService).call).not.toHaveBeenCalledWith('auth.me'); - expect(spectator.inject(WebSocketConnectionService).send).toHaveBeenCalledWith(expect.objectContaining({ + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ msg: IncomingApiMessageType.Method, method: 'auth.generate_token', })); @@ -178,7 +182,7 @@ describe('AuthService', () => { {}, ); }); - expect(spectator.inject(WebSocketConnectionService).send).toHaveBeenCalledWith(expect.objectContaining({ + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ msg: IncomingApiMessageType.Method, method: 'auth.logout', })); diff --git a/src/app/services/auth/auth.service.ts b/src/app/services/auth/auth.service.ts index 0e3a70a0223..babd4077f03 100644 --- a/src/app/services/auth/auth.service.ts +++ b/src/app/services/auth/auth.service.ts @@ -1,6 +1,5 @@ import { Inject, Injectable } from '@angular/core'; import { Store } from '@ngrx/store'; -import { UUID } from 'angular2-uuid'; import { LocalStorage } from 'ngx-webstorage'; import { BehaviorSubject, @@ -14,26 +13,18 @@ import { switchMap, take, tap, - throwError, timer, } from 'rxjs'; import { AccountAttribute } from 'app/enums/account-attribute.enum'; -import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { LoginResult } from 'app/enums/login-result.enum'; import { Role } from 'app/enums/role.enum'; import { WINDOW } from 'app/helpers/window.helper'; -import { - ApiCallMethod, - ApiCallParams, - ApiCallResponse, -} from 'app/interfaces/api/api-call-directory.interface'; -import { IncomingApiMessage, ResultMessage } from 'app/interfaces/api-message.interface'; import { LoginExMechanism, LoginExResponse, LoginExResponseType } from 'app/interfaces/auth.interface'; import { LoggedInUser } from 'app/interfaces/ds-cache.interface'; import { GlobalTwoFactorConfig } from 'app/interfaces/two-factor-config.interface'; -import { ApiService } from 'app/services/api.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { AppState } from 'app/store'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; @@ -91,7 +82,7 @@ export class AuthService { private cachedGlobalTwoFactorConfig: GlobalTwoFactorConfig; constructor( - private wsManager: WebSocketConnectionService, + private wsManager: WebSocketHandlerService, private store$: Store, private ws: ApiService, private tokenLastUsedService: TokenLastUsedService, @@ -133,8 +124,8 @@ export class AuthService { login(username: string, password: string, otp: string = null): Observable { return (otp - ? this.makeRequest('auth.login_ex_continue', [{ mechanism: LoginExMechanism.OtpToken, otp_token: otp }]) - : this.makeRequest('auth.login_ex', [{ mechanism: LoginExMechanism.PasswordPlain, username, password }]) + ? this.ws.call('auth.login_ex_continue', [{ mechanism: LoginExMechanism.OtpToken, otp_token: otp }]) + : this.ws.call('auth.login_ex', [{ mechanism: LoginExMechanism.PasswordPlain, username, password }]) ).pipe( switchMap((loginResult) => this.processLoginResult(loginResult)), ); @@ -146,7 +137,7 @@ export class AuthService { } performance.mark('Login Start'); - return this.makeRequest('auth.login_ex', [{ + return this.ws.call('auth.login_ex', [{ mechanism: LoginExMechanism.TokenPlain, token: this.token, }]).pipe( @@ -180,7 +171,7 @@ export class AuthService { } logout(): Observable { - return this.makeRequest('auth.logout').pipe( + return this.ws.call('auth.logout').pipe( tap(() => { this.clearAuthToken(); this.ws.clearSubscriptions(); @@ -224,58 +215,12 @@ export class AuthService { ); } - // TODO: See if we can move this somewhere, like in wsManager. - // TODO: Rewrite tests not to rely on mocking this private method. - makeRequest(method: M, params?: ApiCallParams): Observable> { - const uuid = UUID.UUID(); - const payload = { - method, - params, - id: uuid, - msg: IncomingApiMessageType.Method, - }; - - const requestTrigger$ = new Observable((subscriber) => { - performance.mark(`${method} - ${uuid} - start`); - this.wsManager.send(payload); - subscriber.next(); - }).pipe(take(1)); - - const uuidFilteredResponse$ = this.getFilteredWebSocketResponse(uuid); - - return combineLatest([ - requestTrigger$, - uuidFilteredResponse$, - ]).pipe( - take(1), - tap(() => { - performance.mark(`${method} - ${uuid} - end`); - performance.measure(method, `${method} - ${uuid} - start`, `${method} - ${uuid} - end`); - }), - map(([, response]) => response), - ); - } - - private getFilteredWebSocketResponse(uuid: string): Observable { - return this.wsManager.websocket$.pipe( - filter((data: IncomingApiMessage) => data.msg === IncomingApiMessageType.Result && data.id === uuid), - switchMap((data: IncomingApiMessage) => { - if ('error' in data && data.error) { - return throwError(() => data.error); - } - return of(data); - }), - map((data: ResultMessage) => data.result), - take(1), - ); - } - private setupPeriodicTokenGeneration(): void { if (!this.generateTokenSubscription || this.generateTokenSubscription.closed) { this.generateTokenSubscription = timer(0, this.tokenRegenerationTimeMillis).pipe( switchMap(() => this.isAuthenticated$.pipe(take(1))), filter((isAuthenticated) => isAuthenticated), - switchMap(() => this.makeRequest('auth.generate_token')), + switchMap(() => this.ws.call('auth.generate_token')), tap((token) => this.latestTokenGenerated$.next(token)), ).subscribe(); } diff --git a/src/app/services/cloud-credential.service.ts b/src/app/services/cloud-credential.service.ts index ff623ae1069..b05ea349586 100644 --- a/src/app/services/cloud-credential.service.ts +++ b/src/app/services/cloud-credential.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { CloudSyncBucket, CloudSyncCredential } from 'app/interfaces/cloudsync-credential.interface'; import { CloudSyncProvider } from 'app/interfaces/cloudsync-provider.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/services/dataset-service/dataset.service.ts b/src/app/services/dataset-service/dataset.service.ts index 3c815892786..7ecca1cf4ef 100644 --- a/src/app/services/dataset-service/dataset.service.ts +++ b/src/app/services/dataset-service/dataset.service.ts @@ -8,7 +8,7 @@ import { ExplorerNodeData } from 'app/interfaces/tree-node.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { TreeNodeProvider } from 'app/modules/forms/ix-forms/components/ix-explorer/tree-node-provider.interface'; import { isRootShare } from 'app/pages/sharing/utils/smb.utils'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class DatasetService { diff --git a/src/app/services/disk-temperature.service.ts b/src/app/services/disk-temperature.service.ts index 36aaed1e12f..3f5f8a12a1e 100644 --- a/src/app/services/disk-temperature.service.ts +++ b/src/app/services/disk-temperature.service.ts @@ -8,7 +8,7 @@ import { import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { EnclosureElementType } from 'app/enums/enclosure-slot-status.enum'; import { DiskTemperatures } from 'app/interfaces/disk.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface Temperature { keys: string[]; diff --git a/src/app/services/filesystem.service.spec.ts b/src/app/services/filesystem.service.spec.ts index 6e59af6707f..b17c4e1dc6c 100644 --- a/src/app/services/filesystem.service.spec.ts +++ b/src/app/services/filesystem.service.spec.ts @@ -6,8 +6,8 @@ import { FileAttribute } from 'app/enums/file-attribute.enum'; import { FileType } from 'app/enums/file-type.enum'; import { FileRecord } from 'app/interfaces/file-record.interface'; import { ExplorerNodeData, TreeNode } from 'app/interfaces/tree-node.interface'; -import { ApiService } from 'app/services/api.service'; import { FilesystemService } from 'app/services/filesystem.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('FilesystemService', () => { let spectator: SpectatorService; diff --git a/src/app/services/filesystem.service.ts b/src/app/services/filesystem.service.ts index e8bf8d0934d..c7a799ac0b0 100644 --- a/src/app/services/filesystem.service.ts +++ b/src/app/services/filesystem.service.ts @@ -7,7 +7,7 @@ import { FileRecord } from 'app/interfaces/file-record.interface'; import { QueryFilter, QueryOptions } from 'app/interfaces/query-api.interface'; import { ExplorerNodeData, TreeNode } from 'app/interfaces/tree-node.interface'; import { TreeNodeProvider } from 'app/modules/forms/ix-forms/components/ix-explorer/tree-node-provider.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class FilesystemService { diff --git a/src/app/services/fips.service.spec.ts b/src/app/services/fips.service.spec.ts index 5774c50bca1..eee54d9d0a1 100644 --- a/src/app/services/fips.service.spec.ts +++ b/src/app/services/fips.service.spec.ts @@ -8,8 +8,8 @@ import { of } from 'rxjs'; import { fakeSuccessfulJob } from 'app/core/testing/utils/fake-job.utils'; import { mockJob, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { FipsService } from 'app/services/fips.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('FipsService', () => { let spectator: SpectatorService; diff --git a/src/app/services/fips.service.ts b/src/app/services/fips.service.ts index 0bbb8b4a94b..7e6a7b2fe74 100644 --- a/src/app/services/fips.service.ts +++ b/src/app/services/fips.service.ts @@ -7,8 +7,8 @@ import { } from 'rxjs/operators'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { SnackbarService } from 'app/modules/snackbar/services/snackbar.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/services/global-store/global-store.service.spec.ts b/src/app/services/global-store/global-store.service.spec.ts index b556c55603b..1acfe9958d1 100644 --- a/src/app/services/global-store/global-store.service.spec.ts +++ b/src/app/services/global-store/global-store.service.spec.ts @@ -5,8 +5,8 @@ import { of } from 'rxjs'; import { ApiEvent } from 'app/interfaces/api-message.interface'; import { Pool } from 'app/interfaces/pool.interface'; import { QueryParams } from 'app/interfaces/query-api.interface'; -import { ApiService } from 'app/services/api.service'; import { globalStore } from 'app/services/global-store/global-store.service'; +import { ApiService } from 'app/services/websocket/api.service'; const poolResponse = [ { id: 1, name: 'pool_1' }, diff --git a/src/app/services/global-store/global-store.service.ts b/src/app/services/global-store/global-store.service.ts index d74edc8ed16..c565060f41e 100644 --- a/src/app/services/global-store/global-store.service.ts +++ b/src/app/services/global-store/global-store.service.ts @@ -5,7 +5,7 @@ import { import { ApiCallAndSubscribeMethod, ApiCallAndSubscribeResponse } from 'app/interfaces/api/api-call-and-subscribe-directory.interface'; import { ApiCallMethod, ApiCallParams, ApiCallResponse } from 'app/interfaces/api/api-call-directory.interface'; import { ApiEventMethod, ApiEventTyped } from 'app/interfaces/api-message.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; export interface GlobalStoreMembers< M1 extends ApiCallMethod, diff --git a/src/app/services/gpu/gpu-service.spec.ts b/src/app/services/gpu/gpu-service.spec.ts index 5749c12d9c5..6cbafbfdc25 100644 --- a/src/app/services/gpu/gpu-service.spec.ts +++ b/src/app/services/gpu/gpu-service.spec.ts @@ -8,8 +8,8 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { DeviceType } from 'app/enums/device-type.enum'; import { AdvancedConfig } from 'app/interfaces/advanced-config.interface'; import { Device } from 'app/interfaces/device.interface'; -import { ApiService } from 'app/services/api.service'; import { GpuService } from 'app/services/gpu/gpu.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; import { selectAdvancedConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/services/gpu/gpu.service.ts b/src/app/services/gpu/gpu.service.ts index dd566b473f4..b8a0f1e652a 100644 --- a/src/app/services/gpu/gpu.service.ts +++ b/src/app/services/gpu/gpu.service.ts @@ -11,7 +11,7 @@ import { import { DeviceType } from 'app/enums/device-type.enum'; import { Device } from 'app/interfaces/device.interface'; import { Option } from 'app/interfaces/option.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { advancedConfigUpdated } from 'app/store/system-config/system-config.actions'; import { waitForAdvancedConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/services/idmap.service.ts b/src/app/services/idmap.service.ts index 1ffe086c5db..ae9437c864a 100644 --- a/src/app/services/idmap.service.ts +++ b/src/app/services/idmap.service.ts @@ -3,7 +3,7 @@ import { Observable } from 'rxjs'; import { ActiveDirectoryConfig } from 'app/interfaces/active-directory-config.interface'; import { Certificate } from 'app/interfaces/certificate.interface'; import { IdmapBackendOptions } from 'app/interfaces/idmap-backend-options.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class IdmapService { diff --git a/src/app/services/iscsi.service.ts b/src/app/services/iscsi.service.ts index 58ed51e998c..e18fb7acd2b 100644 --- a/src/app/services/iscsi.service.ts +++ b/src/app/services/iscsi.service.ts @@ -9,7 +9,7 @@ import { IscsiTarget, IscsiTargetExtent, } from 'app/interfaces/iscsi.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/services/keychain-credential.service.ts b/src/app/services/keychain-credential.service.ts index 8563e717a1b..6a5e62c004a 100644 --- a/src/app/services/keychain-credential.service.ts +++ b/src/app/services/keychain-credential.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { KeychainCredentialType } from 'app/enums/keychain-credential-type.enum'; import { KeychainSshCredentials, KeychainSshKeyPair } from 'app/interfaces/keychain-credential.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/services/language.service.ts b/src/app/services/language.service.ts index c83a68a877e..43441b2ddcc 100644 --- a/src/app/services/language.service.ts +++ b/src/app/services/language.service.ts @@ -6,7 +6,7 @@ import { find } from 'lodash-es'; import { Observable, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { WINDOW } from 'app/helpers/window.helper'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { selectGeneralConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/services/network.service.ts b/src/app/services/network.service.ts index 92d7065dcdb..ffdfb09fa8f 100644 --- a/src/app/services/network.service.ts +++ b/src/app/services/network.service.ts @@ -4,7 +4,7 @@ import { filter, map } from 'rxjs/operators'; import { Choices } from 'app/interfaces/choices.interface'; import { Option } from 'app/interfaces/option.interface'; import { AllNetworkInterfacesUpdate } from 'app/interfaces/reporting.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class NetworkService { diff --git a/src/app/services/redirect.service.ts b/src/app/services/redirect.service.ts index aaa442db30a..f07ff98f2b0 100644 --- a/src/app/services/redirect.service.ts +++ b/src/app/services/redirect.service.ts @@ -7,7 +7,7 @@ import { filter, take } from 'rxjs/operators'; import { WINDOW } from 'app/helpers/window.helper'; import { RedirectDialogData } from 'app/modules/dialog/components/redirect-dialog/redirect-dialog-data.interface'; import { RedirectDialogComponent } from 'app/modules/dialog/components/redirect-dialog/redirect-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { waitForGeneralConfig } from 'app/store/system-config/system-config.selectors'; diff --git a/src/app/services/replication.service.spec.ts b/src/app/services/replication.service.spec.ts index a103468115b..b92bcdacd38 100644 --- a/src/app/services/replication.service.spec.ts +++ b/src/app/services/replication.service.spec.ts @@ -6,8 +6,8 @@ import { ExplorerNodeType } from 'app/enums/explorer-type.enum'; import { TransportMode } from 'app/enums/transport-mode.enum'; import { ExplorerNodeData, TreeNode } from 'app/interfaces/tree-node.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { ReplicationService } from 'app/services/replication.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('ReplicationService', () => { let spectator: SpectatorService; diff --git a/src/app/services/replication.service.ts b/src/app/services/replication.service.ts index fa23bad3fea..d9a5f858997 100644 --- a/src/app/services/replication.service.ts +++ b/src/app/services/replication.service.ts @@ -7,8 +7,8 @@ import { TransportMode } from 'app/enums/transport-mode.enum'; import { ReplicationTask } from 'app/interfaces/replication-task.interface'; import { ExplorerNodeData, TreeNode } from 'app/interfaces/tree-node.interface'; import { TreeNodeProvider } from 'app/modules/forms/ix-forms/components/ix-explorer/tree-node-provider.interface'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable() export class ReplicationService { diff --git a/src/app/services/storage.service.spec.ts b/src/app/services/storage.service.spec.ts index 78b5b1dfb0a..ceae7ca81d3 100644 --- a/src/app/services/storage.service.spec.ts +++ b/src/app/services/storage.service.spec.ts @@ -3,8 +3,8 @@ import { VdevType, TopologyItemType, TopologyWarning } from 'app/enums/v-dev-typ import { Disk } from 'app/interfaces/disk.interface'; import { PoolTopology } from 'app/interfaces/pool.interface'; import { TopologyDisk, TopologyItem, VDev } from 'app/interfaces/storage.interface'; -import { ApiService } from 'app/services/api.service'; import { StorageService } from 'app/services/storage.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('StorageService', () => { const storageService = new StorageService( diff --git a/src/app/services/storage.service.ts b/src/app/services/storage.service.ts index 4f87628f43b..f4a539a9f68 100644 --- a/src/app/services/storage.service.ts +++ b/src/app/services/storage.service.ts @@ -7,7 +7,7 @@ import { Disk } from 'app/interfaces/disk.interface'; import { FileSystemStat } from 'app/interfaces/filesystem-stat.interface'; import { Option } from 'app/interfaces/option.interface'; import { TopologyItem } from 'app/interfaces/storage.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class StorageService { diff --git a/src/app/services/system-general.service.ts b/src/app/services/system-general.service.ts index 90765418b2a..81e77098eb3 100644 --- a/src/app/services/system-general.service.ts +++ b/src/app/services/system-general.service.ts @@ -10,7 +10,7 @@ import { Certificate } from 'app/interfaces/certificate.interface'; import { Choices } from 'app/interfaces/choices.interface'; import { Job } from 'app/interfaces/job.interface'; import { Option } from 'app/interfaces/option.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class SystemGeneralService { diff --git a/src/app/services/token-last-used.service.spec.ts b/src/app/services/token-last-used.service.spec.ts index d9f9753bf85..a615102606e 100644 --- a/src/app/services/token-last-used.service.spec.ts +++ b/src/app/services/token-last-used.service.spec.ts @@ -5,9 +5,9 @@ import { mockApi } from 'app/core/testing/utils/mock-api.utils'; import { WINDOW } from 'app/helpers/window.helper'; import { LoggedInUser } from 'app/interfaces/ds-cache.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; +import { ApiService } from 'app/services/websocket/api.service'; describe('TokenLastUsedService', () => { let spectator: SpectatorService; diff --git a/src/app/services/token-last-used.service.ts b/src/app/services/token-last-used.service.ts index 35c969c97f1..889c78c4517 100644 --- a/src/app/services/token-last-used.service.ts +++ b/src/app/services/token-last-used.service.ts @@ -9,7 +9,7 @@ import { oneMinuteMillis } from 'app/constants/time.constant'; import { tapOnce } from 'app/helpers/operators/tap-once.operator'; import { WINDOW } from 'app/helpers/window.helper'; import { LoggedInUser } from 'app/interfaces/ds-cache.interface'; -import { ApiService } from 'app/services/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @UntilDestroy() @Injectable({ @@ -38,7 +38,8 @@ export class TokenLastUsedService { } constructor( - private ws: ApiService, + // private ws: ApiService, + private wsHandler: WebSocketHandlerService, @Inject(WINDOW) private window: Window, ) { } @@ -47,7 +48,7 @@ export class TokenLastUsedService { user$.pipe( filter(Boolean), tapOnce(() => this.updateTokenLastUsed()), - switchMap(() => this.ws.getWebSocketStream$().pipe(debounceTime(5000))), + switchMap(() => this.wsHandler.responses$.pipe(debounceTime(5000))), tap(() => this.updateTokenLastUsed()), untilDestroyed(this), ).subscribe(); diff --git a/src/app/services/update.service.ts b/src/app/services/update.service.ts index 12cd25f65e6..d2834ad6283 100644 --- a/src/app/services/update.service.ts +++ b/src/app/services/update.service.ts @@ -2,7 +2,7 @@ import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; import { WINDOW } from 'app/helpers/window.helper'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/services/user.service.ts b/src/app/services/user.service.ts index f952f66b4e6..4ee40677ab4 100644 --- a/src/app/services/user.service.ts +++ b/src/app/services/user.service.ts @@ -5,7 +5,7 @@ import { DsUncachedGroup, DsUncachedUser } from 'app/interfaces/ds-cache.interfa import { Group } from 'app/interfaces/group.interface'; import { QueryFilter } from 'app/interfaces/query-api.interface'; import { User } from 'app/interfaces/user.interface'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class UserService { diff --git a/src/app/services/vm.service.spec.ts b/src/app/services/vm.service.spec.ts index e8b86a78847..d3b46a2db73 100644 --- a/src/app/services/vm.service.spec.ts +++ b/src/app/services/vm.service.spec.ts @@ -7,7 +7,7 @@ import { mockCall, mockJob, mockApi } from 'app/core/testing/utils/mock-api.util import { VirtualMachine } from 'app/interfaces/virtual-machine.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { StopVmDialogComponent } from 'app/pages/vm/vm-list/stop-vm-dialog/stop-vm-dialog.component'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { VmService } from './vm.service'; describe('VmService', () => { diff --git a/src/app/services/vm.service.ts b/src/app/services/vm.service.ts index 76b393e4599..806a0deaaa0 100644 --- a/src/app/services/vm.service.ts +++ b/src/app/services/vm.service.ts @@ -21,9 +21,9 @@ import { import { DialogService } from 'app/modules/dialog/dialog.service'; import { AppLoaderService } from 'app/modules/loader/app-loader.service'; import { StopVmDialogComponent, StopVmDialogData } from 'app/pages/vm/vm-list/stop-vm-dialog/stop-vm-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { DownloadService } from 'app/services/download.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; @Injectable({ providedIn: 'root' }) export class VmService { diff --git a/src/app/services/websocket-connection.service.spec.ts b/src/app/services/websocket-connection.service.spec.ts deleted file mode 100644 index acb5b197b9e..00000000000 --- a/src/app/services/websocket-connection.service.spec.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { discardPeriodicTasks, fakeAsync, tick } from '@angular/core/testing'; -import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; -import { UUID } from 'angular2-uuid'; -import { WebSocketSubject, WebSocketSubjectConfig } from 'rxjs/webSocket'; -import { OutgoingApiMessageType } from 'app/enums/api-message-type.enum'; -import { WEBSOCKET } from 'app/helpers/websocket.helper'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; - -const fakeSocketUrl = 'ws://localhost:1234'; -let fakeSocketConfig: WebSocketSubjectConfig; -let fakeSocketsList: WebSocketSubject[]; - -function fakeSocket(urlConfigOrSource: WebSocketSubjectConfig): WebSocketSubject { - urlConfigOrSource.url = fakeSocketUrl; - fakeSocketConfig = urlConfigOrSource; - const fakeSocket$ = new WebSocketSubject(urlConfigOrSource); - fakeSocketsList.push(fakeSocket$); - return fakeSocket$; -} - -describe('WebSocketConnectionService', () => { - let spectator: SpectatorService; - let nextFakeSocket$: WebSocketSubject; - - const createService = createServiceFactory({ - service: WebSocketConnectionService, - providers: [ - { - provide: WEBSOCKET, - useFactory: () => fakeSocket, - }, - ], - }); - - beforeEach(() => { - fakeSocketsList = []; - spectator = createService(); - if (fakeSocketsList.length) { - nextFakeSocket$ = fakeSocketsList[fakeSocketsList.length - 1]; - } - }); - - it('checks socket config params', () => { - expect(fakeSocketConfig.url).toBe(fakeSocketUrl); - expect(typeof fakeSocketConfig.openObserver.next).toBe('function'); - expect(fakeSocketConfig.openObserver.next.name).toContain('onOpen'); - expect(typeof fakeSocketConfig.closeObserver.next).toBe('function'); - expect(fakeSocketConfig.closeObserver.next.name).toContain('onClose'); - }); - - it('sets shutDownInProgress to false when open connection', () => { - spectator.service.shutDownInProgress = true; - expect(spectator.service.shutDownInProgress).toBe(true); - - fakeSocketConfig.openObserver.next({} as Event); - expect(spectator.service.shutDownInProgress).toBe(false); - }); - - it('sends connect message', () => { - jest.spyOn(nextFakeSocket$, 'next'); - fakeSocketConfig.openObserver.next({} as Event); - - expect(nextFakeSocket$.next).toHaveBeenCalledWith({ support: ['1'], version: '1', msg: OutgoingApiMessageType.Connect }); - }); - - it('closes connection when isTryingReconnect is true', () => { - jest.spyOn(nextFakeSocket$, 'next'); - jest.spyOn(nextFakeSocket$, 'complete'); - - spectator.service.isTryingReconnect = true; - spectator.service.shutDownInProgress = true; - - fakeSocketConfig.openObserver.next({} as Event); - expect(spectator.service.shutDownInProgress).toBe(true); - expect(nextFakeSocket$.next).not.toHaveBeenCalled(); - expect(nextFakeSocket$.complete).toHaveBeenCalled(); - }); - - it('sends pings', fakeAsync(() => { - jest.spyOn(nextFakeSocket$, 'next'); - jest.spyOn(UUID, 'UUID') - .mockReturnValueOnce('ping-pong-uuid-1') - .mockReturnValueOnce('ping-pong-uuid-2') - .mockReturnValueOnce('ping-pong-uuid-3'); - - spectator.service.isConnected$.next(true); - - tick(20 * 1000); - expect(nextFakeSocket$.next).toHaveBeenNthCalledWith(1, { id: 'ping-pong-uuid-1', msg: OutgoingApiMessageType.Ping }); - expect(nextFakeSocket$.next).toHaveBeenCalledTimes(1); - tick(20 * 1000); - expect(nextFakeSocket$.next).toHaveBeenNthCalledWith(2, { id: 'ping-pong-uuid-2', msg: OutgoingApiMessageType.Ping }); - expect(nextFakeSocket$.next).toHaveBeenCalledTimes(2); - tick(20 * 1000); - expect(nextFakeSocket$.next).toHaveBeenNthCalledWith(3, { id: 'ping-pong-uuid-3', msg: OutgoingApiMessageType.Ping }); - expect(nextFakeSocket$.next).toHaveBeenCalledTimes(3); - - spectator.service.isConnected$.next(false); - tick(20 * 1000); - expect(nextFakeSocket$.next).toHaveBeenCalledTimes(3); - - discardPeriodicTasks(); - })); - - it('resumes calls that were paused because of broken connection', () => { - jest.spyOn(nextFakeSocket$, 'next'); - spectator.service.isConnected$.next(true); - spectator.service.send('message-1'); - - spectator.service.isConnected$.next(false); - spectator.service.send('message-2'); - spectator.service.send('message-3'); - - expect(nextFakeSocket$.next).toHaveBeenCalledWith('message-1'); - expect(nextFakeSocket$.next).not.toHaveBeenCalledWith('message-2'); - expect(nextFakeSocket$.next).not.toHaveBeenCalledWith('message-3'); - - spectator.service.isConnected$.next(true); - expect(nextFakeSocket$.next).toHaveBeenCalledWith('message-2'); - expect(nextFakeSocket$.next).toHaveBeenCalledWith('message-3'); - }); - - it('sets isClosed when close connection and isTryingReconnect is false', () => { - fakeSocketConfig.openObserver.next({} as Event); - spectator.service.isConnected$.next(true); - - fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); - - let isClosed; - spectator.service.isClosed$.subscribe((value) => isClosed = value); - expect(isClosed).toBe(true); - }); - - it('sets isAccessRestricted when close connection with code 1008', () => { - fakeSocketConfig.openObserver.next({} as Event); - spectator.service.isConnected$.next(true); - - fakeSocketConfig.closeObserver.next({ code: 1008 } as CloseEvent); - - let isAccessRestricted; - spectator.service.isAccessRestricted$.subscribe((value) => isAccessRestricted = value); - expect(isAccessRestricted).toBe(true); - }); - - it('trying to reconnect when close connection and isTryingReconnect is false', fakeAsync(() => { - jest.spyOn(fakeSocketsList[0], 'complete'); - fakeSocketConfig.openObserver.next({} as Event); - spectator.service.isConnected$.next(true); - - fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); - expect(spectator.service.isTryingReconnect).toBe(true); - expect(fakeSocketsList).toHaveLength(1); - - tick(5 * 1000); - expect(spectator.service.isTryingReconnect).toBe(false); - expect(fakeSocketsList).toHaveLength(2); - - expect(fakeSocketsList[0].complete).toHaveBeenCalled(); - - discardPeriodicTasks(); - })); - - it('ignores closing when close connection and isTryingReconnect is true', fakeAsync(() => { - jest.spyOn(fakeSocketsList[0], 'complete'); - fakeSocketConfig.openObserver.next({} as Event); - spectator.service.isConnected$.next(true); - spectator.service.isTryingReconnect = true; - - fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); - tick(5 * 1000); - - expect(fakeSocketsList).toHaveLength(1); - expect(fakeSocketsList[0].complete).not.toHaveBeenCalled(); - - let isClosed; - spectator.service.isClosed$.subscribe((value) => isClosed = value); - expect(isClosed).toBe(false); - - discardPeriodicTasks(); - })); -}); diff --git a/src/app/services/websocket-connection.service.ts b/src/app/services/websocket-connection.service.ts deleted file mode 100644 index a0340019f47..00000000000 --- a/src/app/services/websocket-connection.service.ts +++ /dev/null @@ -1,204 +0,0 @@ -import { Inject, Injectable } from '@angular/core'; -import { UUID } from 'angular2-uuid'; -import { environment } from 'environments/environment'; -import { - BehaviorSubject, interval, NEVER, Observable, of, switchMap, tap, timer, -} from 'rxjs'; -import { webSocket as rxjsWebSocket, WebSocketSubject } from 'rxjs/webSocket'; -import { IncomingApiMessageType, OutgoingApiMessageType } from 'app/enums/api-message-type.enum'; -import { WEBSOCKET } from 'app/helpers/websocket.helper'; -import { WINDOW } from 'app/helpers/window.helper'; -import { ApiEventMethod, ApiEventTyped, IncomingApiMessage } from 'app/interfaces/api-message.interface'; - -@Injectable({ - providedIn: 'root', -}) -export class WebSocketConnectionService { - private ws$: WebSocketSubject; - - private readonly pingTimeoutMillis = 20 * 1000; - private readonly reconnectTimeoutMillis = 5 * 1000; - private pendingCallsBeforeConnectionReady = new Map(); - - isTryingReconnect = false; - shutDownInProgress = false; - private connectionUrl = (this.window.location.protocol === 'https:' ? 'wss://' : 'ws://') + environment.remote + '/websocket'; - - private isConnectionReady = false; - private wsAsObservable$: Observable; - - get websocket$(): Observable { - return this.wsAsObservable$; - } - - readonly isConnected$ = new BehaviorSubject(false); - private readonly _isClosed$ = new BehaviorSubject(false); - private readonly _isAccessRestricted$ = new BehaviorSubject(false); - - set isClosed$(value: boolean) { - this._isClosed$.next(value); - } - - get isClosed$(): Observable { - return this._isClosed$; - } - - set isAccessRestricted$(value: boolean) { - this._isAccessRestricted$.next(value); - } - - get isAccessRestricted$(): Observable { - return this._isAccessRestricted$; - } - - constructor( - @Inject(WINDOW) protected window: Window, - @Inject(WEBSOCKET) private webSocket: typeof rxjsWebSocket, - ) { - this.initializeWebSocket(); - this.subscribeToConnectionStatus(); - this.setupPing(); - } - - private initializeWebSocket(): void { - if (this.ws$) { - this.ws$.complete(); - } - - performance.mark('WS Init'); - this.ws$ = this.webSocket({ - url: this.connectionUrl, - openObserver: { - next: this.onOpen.bind(this), - }, - closeObserver: { - next: this.onClose.bind(this), - }, - }); - this.wsAsObservable$ = this.ws$.asObservable().pipe( - switchMap((data: IncomingApiMessage) => { - if (this.hasAuthError(data)) { - console.error(data); - this.ws$.complete(); - } - return of(data); - }), - ); - // At least one explicit subscription required to keep the connection open - this.ws$.pipe( - tap((response: IncomingApiMessage) => { - if (response.msg === IncomingApiMessageType.Connected) { - performance.mark('WS Connected'); - performance.measure('Establishing WS connection', 'WS Init', 'WS Connected'); - this.isConnected$.next(true); - } - }), - ).subscribe(); - } - - private onOpen(): void { - if (this.isTryingReconnect) { - this.closeWebSocketConnection(); - return; - } - this.shutDownInProgress = false; - this.sendConnectMessage(); - } - - /** TODO: Extract disconnection logic somewhere else */ - private onClose(event: CloseEvent): void { - if (this.isTryingReconnect) { - return; - } - this.isTryingReconnect = true; - this.isConnected$.next(false); - this.isClosed$ = true; - if (event.code === 1008) { - this.isAccessRestricted$ = true; - } else { - this.reconnect(); - } - } - - reconnect(): void { - timer(this.reconnectTimeoutMillis).subscribe({ - next: () => { - this.isTryingReconnect = false; - this.initializeWebSocket(); - }, - }); - } - - private hasAuthError(data: IncomingApiMessage): boolean { - return 'error' in data && data.error.error === 207; - } - - private setupPing(): void { - this.isConnected$.pipe( - switchMap((isConnected) => { - if (!isConnected) { - return NEVER; - } - - return interval(this.pingTimeoutMillis); - }), - ).subscribe(() => { - this.ws$.next({ msg: OutgoingApiMessageType.Ping, id: UUID.UUID() }); - }); - } - - private sendConnectMessage(): void { - this.ws$.next({ - msg: OutgoingApiMessageType.Connect, - version: '1', - support: ['1'], - }); - } - - buildSubscriber>(name: K): Observable { - const id = UUID.UUID(); - return this.ws$.multiplex( - () => ({ id, name, msg: OutgoingApiMessageType.Sub }), - () => ({ id, msg: OutgoingApiMessageType.UnSub }), - (message: R) => (message.collection === name && message.msg !== IncomingApiMessageType.NoSub), - ) as Observable; - } - - send(payload: unknown): void { - if (this.isConnectionReady) { - this.ws$.next(payload); - } else { - this.pendingCallsBeforeConnectionReady.set(UUID.UUID(), payload); - } - } - - sendPendingCalls(): void { - this.pendingCallsBeforeConnectionReady.forEach((value, key) => { - this.send(value); - this.pendingCallsBeforeConnectionReady.delete(key); - }); - } - - closeWebSocketConnection(): void { - this.ws$.complete(); - } - - prepareShutdown(): void { - this.shutDownInProgress = true; - } - - setupConnectionUrl(protocol: string, remote: string): void { - this.connectionUrl = (protocol === 'https:' ? 'wss://' : 'ws://') + remote + '/websocket'; - } - - private subscribeToConnectionStatus(): void { - this.isConnected$.subscribe({ - next: (isConnected) => { - this.isConnectionReady = isConnected; - if (isConnected) { - this.sendPendingCalls(); - } - }, - }); - } -} diff --git a/src/app/services/api.service.ts b/src/app/services/websocket/api.service.ts similarity index 85% rename from src/app/services/api.service.ts rename to src/app/services/websocket/api.service.ts index 2efb34a149a..76bb67dbfe6 100644 --- a/src/app/services/api.service.ts +++ b/src/app/services/websocket/api.service.ts @@ -1,35 +1,23 @@ import { Injectable } from '@angular/core'; -import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { UUID } from 'angular2-uuid'; import { - merge, Observable, of, Subject, Subscriber, throwError, + filter, map, merge, Observable, of, share, startWith, Subject, Subscriber, switchMap, take, takeUntil, throwError, } from 'rxjs'; -import { - filter, map, share, startWith, switchMap, take, takeUntil, tap, -} from 'rxjs/operators'; import { ApiErrorName } from 'app/enums/api-error-name.enum'; import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { ResponseErrorType } from 'app/enums/response-error-type.enum'; import { applyApiEvent } from 'app/helpers/operators/apply-api-event.operator'; import { observeJob } from 'app/helpers/operators/observe-job.operator'; import { ApiCallAndSubscribeMethod, ApiCallAndSubscribeResponse } from 'app/interfaces/api/api-call-and-subscribe-directory.interface'; -import { - ApiCallMethod, - ApiCallParams, - ApiCallResponse, -} from 'app/interfaces/api/api-call-directory.interface'; -import { - ApiJobMethod, - ApiJobParams, - ApiJobResponse, -} from 'app/interfaces/api/api-job-directory.interface'; +import { ApiCallMethod, ApiCallParams, ApiCallResponse } from 'app/interfaces/api/api-call-directory.interface'; +import { ApiJobMethod, ApiJobParams, ApiJobResponse } from 'app/interfaces/api/api-job-directory.interface'; import { ApiError } from 'app/interfaces/api-error.interface'; import { ApiEvent, ApiEventMethod, ApiEventTyped, IncomingApiMessage, ResultMessage, } from 'app/interfaces/api-message.interface'; import { Job } from 'app/interfaces/job.interface'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; @Injectable({ providedIn: 'root', @@ -39,21 +27,16 @@ export class ApiService { readonly clearSubscriptions$ = new Subject(); constructor( - protected router: Router, - protected wsManager: WebSocketConnectionService, + protected wsHandler: WebSocketHandlerService, protected translate: TranslateService, ) { - this.wsManager.isConnected$?.subscribe((isConnected) => { + this.wsHandler.isConnected$?.subscribe((isConnected) => { if (!isConnected) { this.clearSubscriptions(); } }); } - private get ws$(): Observable { - return this.wsManager.websocket$; - } - call(method: M, params?: ApiCallParams): Observable> { return this.callMethod(method, params); } @@ -108,7 +91,7 @@ export class ApiService { return this.eventSubscribers.get(method as K); } const observable$ = new Observable((trigger: Subscriber>) => { - const subscription = this.wsManager.buildSubscriber>(method as K).subscribe(trigger); + const subscription = this.wsHandler.buildSubscriber>(method as K).subscribe(trigger); return () => { subscription.unsubscribe(); this.eventSubscribers.delete(method as K); @@ -139,23 +122,20 @@ export class ApiService { this.eventSubscribers.clear(); } - getWebSocketStream$(): Observable { - return this.ws$; - } - private callMethod(method: M, params?: ApiCallParams): Observable>; private callMethod(method: M, params?: ApiJobParams): Observable; private callMethod(method: M, params?: unknown): Observable { const uuid = UUID.UUID(); return of(uuid).pipe( - tap(() => { + switchMap(() => { performance.mark(`${method} - ${uuid} - start`); - this.wsManager.send({ + this.wsHandler.scheduleCall({ id: uuid, msg: IncomingApiMessageType.Method, method, params, }); + return this.wsHandler.responses$.pipe( + filter((data: IncomingApiMessage) => data.msg === IncomingApiMessageType.Result && data.id === uuid), + ); }), - switchMap(() => this.ws$), - filter((data: IncomingApiMessage) => data.msg === IncomingApiMessageType.Result && data.id === uuid), switchMap((data: IncomingApiMessage) => { if ('error' in data && data.error) { this.printError(data.error, { method, params }); @@ -203,7 +183,6 @@ export class ApiService { reason: this.translate.instant('Access denied to {method}', { method: context.method }), }; } - return error; } } diff --git a/src/app/services/websocket/api2.service.ts b/src/app/services/websocket/api2.service.ts deleted file mode 100644 index 202bae030a4..00000000000 --- a/src/app/services/websocket/api2.service.ts +++ /dev/null @@ -1,190 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; -import { UUID } from 'angular2-uuid'; -import { - filter, map, merge, Observable, of, share, startWith, Subject, Subscriber, switchMap, take, takeUntil, throwError, -} from 'rxjs'; -import { ApiErrorName } from 'app/enums/api-error-name.enum'; -import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; -import { ResponseErrorType } from 'app/enums/response-error-type.enum'; -import { applyApiEvent } from 'app/helpers/operators/apply-api-event.operator'; -import { observeJob } from 'app/helpers/operators/observe-job.operator'; -import { ApiCallAndSubscribeMethod, ApiCallAndSubscribeResponse } from 'app/interfaces/api/api-call-and-subscribe-directory.interface'; -import { ApiCallMethod, ApiCallParams, ApiCallResponse } from 'app/interfaces/api/api-call-directory.interface'; -import { ApiJobMethod, ApiJobParams, ApiJobResponse } from 'app/interfaces/api/api-job-directory.interface'; -import { ApiError } from 'app/interfaces/api-error.interface'; -import { - ApiEvent, ApiEventMethod, ApiEventTyped, IncomingApiMessage, ResultMessage, -} from 'app/interfaces/api-message.interface'; -import { Job } from 'app/interfaces/job.interface'; -import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; - -@Injectable({ - providedIn: 'root', -}) -export class Api2Service { - private readonly eventSubscribers = new Map>(); - readonly clearSubscriptions$ = new Subject(); - - constructor( - protected router: Router, - protected wsHandler: WebSocketHandlerService, - protected translate: TranslateService, - ) { - this.wsHandler.isConnected$?.subscribe((isConnected) => { - if (!isConnected) { - this.clearSubscriptions(); - } - }); - } - - call(method: M, params?: ApiCallParams): Observable> { - return this.callMethod(method, params); - } - - /** - * For jobs better to use the `selectJob` store selector. - */ - callAndSubscribe( - method: M, - params?: ApiCallParams, - ): Observable[]> { - return this.callMethod(method, params) - .pipe( - switchMap((items) => this.subscribe(method).pipe( - startWith(null), - map((event) => ([items, event])), - )), - applyApiEvent(), - takeUntil(this.clearSubscriptions$), - ); - } - - /** - * Use `job` when you care about job progress or result. - */ - startJob(method: M, params?: ApiJobParams): Observable { - return this.callMethod(method, params); - } - - /** - * In your subscription, next will be next job update, complete will be when the job is complete. - */ - job( - method: M, - params?: ApiJobParams, - ): Observable>> { - return this.callMethod(method, params).pipe( - switchMap((jobId: number) => { - return merge( - this.subscribeToJobUpdates(jobId), - // Get job status here for jobs that complete too fast. - this.call('core.get_jobs', [[['id', '=', jobId]]]).pipe(map((jobs) => jobs[0])), - ) - .pipe(observeJob()); - }), - takeUntil(this.clearSubscriptions$), - ) as Observable>>; - } - - subscribe(method: K | `${K}:${string}`): Observable> { - if (this.eventSubscribers.has(method as K)) { - return this.eventSubscribers.get(method as K); - } - const observable$ = new Observable((trigger: Subscriber>) => { - const subscription = this.wsHandler.buildSubscriber>(method as K).subscribe(trigger); - return () => { - subscription.unsubscribe(); - this.eventSubscribers.delete(method as K); - }; - }).pipe( - switchMap((apiEvent) => { - const erroredEvent = apiEvent as unknown as ResultMessage; - if (erroredEvent?.error) { - console.error('Error: ', erroredEvent.error); - return throwError(() => erroredEvent.error); - } - return of(apiEvent); - }), - share(), - takeUntil(this.clearSubscriptions$), - ); - - this.eventSubscribers.set(method as K, observable$); - return observable$; - } - - subscribeToLogs(name: string): Observable> { - return this.subscribe(name as ApiEventMethod) as unknown as Observable>; - } - - clearSubscriptions(): void { - this.clearSubscriptions$.next(); - this.eventSubscribers.clear(); - } - - private callMethod(method: M, params?: ApiCallParams): Observable>; - private callMethod(method: M, params?: ApiJobParams): Observable; - private callMethod(method: M, params?: unknown): Observable { - const uuid = UUID.UUID(); - return of(uuid).pipe( - switchMap(() => { - performance.mark(`${method} - ${uuid} - start`); - this.wsHandler.scheduleCall({ - id: uuid, msg: IncomingApiMessageType.Method, method, params, - }); - return this.wsHandler.responses$.pipe( - filter((data: IncomingApiMessage) => data.msg === IncomingApiMessageType.Result && data.id === uuid), - ); - }), - switchMap((data: IncomingApiMessage) => { - if ('error' in data && data.error) { - this.printError(data.error, { method, params }); - const error = this.enhanceError(data.error, { method }); - return throwError(() => error); - } - - performance.mark(`${method} - ${uuid} - end`); - performance.measure(method, `${method} - ${uuid} - start`, `${method} - ${uuid} - end`); - return of(data); - }), - - map((data: ResultMessage) => data.result), - take(1), - ); - } - - private subscribeToJobUpdates(jobId: number): Observable { - return this.subscribe('core.get_jobs').pipe( - filter((apiEvent) => apiEvent.id === jobId), - map((apiEvent) => apiEvent.fields), - takeUntil(this.clearSubscriptions$), - ); - } - - private printError(error: ApiError, context: { method: string; params: unknown }): void { - if (error.errname === ApiErrorName.NoAccess) { - console.error(`Access denied to ${context.method} with ${context.params ? JSON.stringify(context.params) : 'no params'}`); - return; - } - - // Do not log validation errors. - if (error.type === ResponseErrorType.Validation) { - return; - } - - console.error('Error: ', error); - } - - // TODO: Probably doesn't belong here. Consider building something similar to interceptors. - private enhanceError(error: ApiError, context: { method: string }): ApiError { - if (error.errname === ApiErrorName.NoAccess) { - return { - ...error, - reason: this.translate.instant('Access denied to {method}', { method: context.method }), - }; - } - return error; - } -} diff --git a/src/app/services/websocket/websocket-connection.class.ts b/src/app/services/websocket/websocket-connection.class.ts index 6651ff0bb4d..c3dab0a4958 100644 --- a/src/app/services/websocket/websocket-connection.class.ts +++ b/src/app/services/websocket/websocket-connection.class.ts @@ -29,6 +29,7 @@ export class WebSocketConnection { close(): void { this.ws$?.complete(); + this.ws$ = undefined; } event( diff --git a/src/app/services/websocket/websocket-handler.service.ts b/src/app/services/websocket/websocket-handler.service.ts index 694772fb058..2a04c1aefe0 100644 --- a/src/app/services/websocket/websocket-handler.service.ts +++ b/src/app/services/websocket/websocket-handler.service.ts @@ -2,7 +2,20 @@ import { Inject, Injectable } from '@angular/core'; import { UUID } from 'angular2-uuid'; import { environment } from 'environments/environment'; import { - BehaviorSubject, filter, interval, map, mergeMap, NEVER, Observable, of, Subject, switchMap, take, tap, timer, + BehaviorSubject, + filter, + interval, + map, + mergeMap, + NEVER, + Observable, + of, + Subject, + Subscription, + switchMap, + take, + tap, + timer, } from 'rxjs'; import { webSocket as rxjsWebSocket } from 'rxjs/webSocket'; import { IncomingApiMessageType, OutgoingApiMessageType } from 'app/enums/api-message-type.enum'; @@ -23,10 +36,13 @@ export class WebSocketHandlerService { private readonly pingTimeoutMillis = 20 * 1000; private readonly reconnectTimeoutMillis = 5 * 1000; + private reconnectTimerSubscription: Subscription; private readonly maxConcurrentCalls = 20; - private isReconnectScheduled = false; private shutDownInProgress = false; + get isSystemShuttingDown(): boolean { + return this.shutDownInProgress; + } private readonly hasRestrictedError$ = new BehaviorSubject(false); set isAccessRestricted$(value: boolean) { @@ -115,6 +131,8 @@ export class WebSocketHandlerService { } private connectWebSocket(): void { + this.wsConnection.close(); + performance.mark('WS Init'); this.wsConnection.connect({ url: this.connectionUrl, openObserver: { @@ -161,12 +179,11 @@ export class WebSocketHandlerService { } private onClose(event: CloseEvent): void { - if (this.isReconnectScheduled) { - return; - } - this.isReconnectScheduled = true; this.connectMsgReceived$.next(false); this.isConnectionLive$.next(false); + if (this.reconnectTimerSubscription) { + return; + } if (event.code === 1008) { this.isAccessRestricted$ = true; } else { @@ -174,18 +191,13 @@ export class WebSocketHandlerService { } } - private reconnect(): void { - this.isReconnectScheduled = true; - timer(this.reconnectTimeoutMillis).subscribe({ - next: () => { - this.isReconnectScheduled = false; - this.setupWebSocket(); - }, - }); + private unsubscribeReconnectSubscription(): void { + this.reconnectTimerSubscription.unsubscribe(); + this.reconnectTimerSubscription = undefined; } private onOpen(): void { - if (this.isReconnectScheduled) { + if (this.reconnectTimerSubscription) { this.wsConnection.close(); return; } @@ -210,4 +222,25 @@ export class WebSocketHandlerService { prepareShutdown(): void { this.shutDownInProgress = true; } + + reconnect(): void { + if (this.reconnectTimerSubscription) { + this.unsubscribeReconnectSubscription(); + } + + this.reconnectTimerSubscription = timer(this.reconnectTimeoutMillis).subscribe({ + next: () => { + this.unsubscribeReconnectSubscription(); + this.setupWebSocket(); + }, + }); + } + + closeWsConnection(): void { + this.wsConnection.close(); + } + + setupConnectionUrl(protocol: string, remote: string): void { + this.connectionUrl = (protocol === 'https:' ? 'wss://' : 'ws://') + remote + '/websocket'; + } } diff --git a/src/app/store/eula/eula.effects.spec.ts b/src/app/store/eula/eula.effects.spec.ts index 26899420fae..ebd92a1f235 100644 --- a/src/app/store/eula/eula.effects.spec.ts +++ b/src/app/store/eula/eula.effects.spec.ts @@ -8,7 +8,7 @@ import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { ProductType } from 'app/enums/product-type.enum'; import { Role } from 'app/enums/role.enum'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { EulaEffects } from 'app/store/eula/eula.effects'; import { selectProductType } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/store/eula/eula.effects.ts b/src/app/store/eula/eula.effects.ts index 82891772f92..5a5ed9a25de 100644 --- a/src/app/store/eula/eula.effects.ts +++ b/src/app/store/eula/eula.effects.ts @@ -9,9 +9,9 @@ import { import { Role } from 'app/enums/role.enum'; import { filterAsync } from 'app/helpers/operators/filter-async.operator'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { selectIsEnterprise } from 'app/store/system-info/system-info.selectors'; diff --git a/src/app/store/ha-info/ha-info.effects.ts b/src/app/store/ha-info/ha-info.effects.ts index 7f2307aad28..9c4ca5c3788 100644 --- a/src/app/store/ha-info/ha-info.effects.ts +++ b/src/app/store/ha-info/ha-info.effects.ts @@ -2,7 +2,7 @@ import { Inject, Injectable } from '@angular/core'; import { Actions, createEffect, ofType } from '@ngrx/effects'; import { map, mergeMap } from 'rxjs/operators'; import { WINDOW } from 'app/helpers/window.helper'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { passiveNodeReplaced } from 'app/store/system-info/system-info.actions'; import { diff --git a/src/app/store/ha-upgrade/ha-upgrade.effects.spec.ts b/src/app/store/ha-upgrade/ha-upgrade.effects.spec.ts index 2207109fce6..18b92fba5f4 100644 --- a/src/app/store/ha-upgrade/ha-upgrade.effects.spec.ts +++ b/src/app/store/ha-upgrade/ha-upgrade.effects.spec.ts @@ -7,7 +7,7 @@ import { mockCall, mockJob, mockApi } from 'app/core/testing/utils/mock-api.util import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { FailoverDisabledReason } from 'app/enums/failover-disabled-reason.enum'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { haStatusLoaded } from 'app/store/ha-info/ha-info.actions'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { diff --git a/src/app/store/ha-upgrade/ha-upgrade.effects.ts b/src/app/store/ha-upgrade/ha-upgrade.effects.ts index d370063797e..2401631471a 100644 --- a/src/app/store/ha-upgrade/ha-upgrade.effects.ts +++ b/src/app/store/ha-upgrade/ha-upgrade.effects.ts @@ -11,9 +11,9 @@ import { FailoverDisabledReason } from 'app/enums/failover-disabled-reason.enum' import { Role } from 'app/enums/role.enum'; import { filterAsync } from 'app/helpers/operators/filter-async.operator'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { haStatusLoaded } from 'app/store/ha-info/ha-info.actions'; import { selectIsHaLicensed } from 'app/store/ha-info/ha-info.selectors'; import { diff --git a/src/app/store/network-interfaces/network-interfaces.effects.spec.ts b/src/app/store/network-interfaces/network-interfaces.effects.spec.ts index 38d5fa133f9..9ff59f5cc8d 100644 --- a/src/app/store/network-interfaces/network-interfaces.effects.spec.ts +++ b/src/app/store/network-interfaces/network-interfaces.effects.spec.ts @@ -7,7 +7,7 @@ import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; import { helptextInterfaces } from 'app/helptext/network/interfaces/interfaces-list'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { checkinIndicatorPressed, diff --git a/src/app/store/network-interfaces/network-interfaces.effects.ts b/src/app/store/network-interfaces/network-interfaces.effects.ts index 0669cf6afea..ca331d364fd 100644 --- a/src/app/store/network-interfaces/network-interfaces.effects.ts +++ b/src/app/store/network-interfaces/network-interfaces.effects.ts @@ -11,9 +11,9 @@ import { Role } from 'app/enums/role.enum'; import { filterAsync } from 'app/helpers/operators/filter-async.operator'; import { helptextInterfaces } from 'app/helptext/network/interfaces/interfaces-list'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { checkinIndicatorPressed, diff --git a/src/app/store/preferences/preferences.effects.ts b/src/app/store/preferences/preferences.effects.ts index 00d72ec9f19..9fe0bd1a64b 100644 --- a/src/app/store/preferences/preferences.effects.ts +++ b/src/app/store/preferences/preferences.effects.ts @@ -5,8 +5,8 @@ import { EMPTY, throwError } from 'rxjs'; import { catchError, filter, map, mergeMap, switchMap, withLatestFrom, } from 'rxjs/operators'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { AppState } from 'app/store/index'; import { diff --git a/src/app/store/services/services.effects.spec.ts b/src/app/store/services/services.effects.spec.ts index 1382c77cc12..b8351a34799 100644 --- a/src/app/store/services/services.effects.spec.ts +++ b/src/app/store/services/services.effects.spec.ts @@ -13,7 +13,7 @@ import { ApiEvent } from 'app/interfaces/api-message.interface'; import { Service } from 'app/interfaces/service.interface'; import { StartServiceDialogComponent, StartServiceDialogResult } from 'app/modules/dialog/components/start-service-dialog/start-service-dialog.component'; import { DialogService } from 'app/modules/dialog/dialog.service'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { checkIfServiceIsEnabled, serviceChanged, serviceEnabled, servicesLoaded, serviceStarted, diff --git a/src/app/store/services/services.effects.ts b/src/app/store/services/services.effects.ts index f4fa5be5566..db9ad90f74e 100644 --- a/src/app/store/services/services.effects.ts +++ b/src/app/store/services/services.effects.ts @@ -9,9 +9,9 @@ import { ServiceName } from 'app/enums/service-name.enum'; import { ServiceStatus } from 'app/enums/service-status.enum'; import { filterAsync } from 'app/helpers/operators/filter-async.operator'; import { StartServiceDialogComponent, StartServiceDialogResult } from 'app/modules/dialog/components/start-service-dialog/start-service-dialog.component'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ServicesService } from 'app/services/services.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { AppState } from 'app/store'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { diff --git a/src/app/store/system-config/system-config.effects.ts b/src/app/store/system-config/system-config.effects.ts index 33e71247135..6b3f4b8db60 100644 --- a/src/app/store/system-config/system-config.effects.ts +++ b/src/app/store/system-config/system-config.effects.ts @@ -3,7 +3,7 @@ import { Actions, createEffect, ofType } from '@ngrx/effects'; import { EMPTY, forkJoin } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; import { WINDOW } from 'app/helpers/window.helper'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { advancedConfigUpdated, diff --git a/src/app/store/system-info/system-info.effects.ts b/src/app/store/system-info/system-info.effects.ts index 8d34c96bcfb..88901805936 100644 --- a/src/app/store/system-info/system-info.effects.ts +++ b/src/app/store/system-info/system-info.effects.ts @@ -4,7 +4,7 @@ import { EMPTY, of } from 'rxjs'; import { catchError, map, mergeMap, } from 'rxjs/operators'; -import { ApiService } from 'app/services/api.service'; +import { ApiService } from 'app/services/websocket/api.service'; import { adminUiInitialized } from 'app/store/admin-panel/admin.actions'; import { ixHardwareLoaded, diff --git a/src/main.ts b/src/main.ts index 7cd39dc4fd9..6272c7019bd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,7 +7,6 @@ import { MAT_SNACK_BAR_DEFAULT_OPTIONS, MatSnackBarConfig } from '@angular/mater import { BrowserModule, bootstrapApplication } from '@angular/platform-browser'; import { provideAnimations } from '@angular/platform-browser/animations'; import { - Router, withPreloading, provideRouter, PreloadAllModules, @@ -32,9 +31,9 @@ import { createTranslateLoader } from 'app/core/classes/icu-translations-loader' import { MockEnclosureApiService } from 'app/core/testing/mock-enclosure/mock-enclosure-api.service'; import { WINDOW, getWindow } from 'app/helpers/window.helper'; import { IxIconRegistry } from 'app/modules/ix-icon/ix-icon-registry.service'; -import { ApiService } from 'app/services/api.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; -import { WebSocketConnectionService } from 'app/services/websocket-connection.service'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; import { rootReducers, rootEffects } from 'app/store'; import { CustomRouterStateSerializer } from 'app/store/router/custom-router-serializer'; import { AppComponent } from './app/app.component'; @@ -111,12 +110,12 @@ bootstrapApplication(AppComponent, { }, { provide: ApiService, - deps: [Router, WebSocketConnectionService, TranslateService], - useFactory: (router: Router, connection: WebSocketConnectionService, translate: TranslateService) => { + deps: [WebSocketHandlerService, TranslateService], + useFactory: (connection: WebSocketHandlerService, translate: TranslateService) => { if (environment.mockConfig.enabled) { - return new MockEnclosureApiService(router, connection, translate); + return new MockEnclosureApiService(connection, translate); } - return new ApiService(router, connection, translate); + return new ApiService(connection, translate); }, }, provideCharts(withDefaultRegisterables()), diff --git a/src/setup-jest.ts b/src/setup-jest.ts index e49c95ad7d2..c73600d86db 100644 --- a/src/setup-jest.ts +++ b/src/setup-jest.ts @@ -86,9 +86,9 @@ import { } from 'app/modules/slide-ins/components/modal-header2/modal-header2.component'; import { TestOverrideDirective } from 'app/modules/test-id/test-override/test-override.directive'; import { TestDirective } from 'app/modules/test-id/test.directive'; -import { ApiService } from 'app/services/api.service'; import { AuthService } from 'app/services/auth/auth.service'; import { ErrorHandlerService } from 'app/services/error-handler.service'; +import { ApiService } from 'app/services/websocket/api.service'; failOnConsole(); From 267ac842f8ad9d4ba471cc7a5fafc0c50fba6747 Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Thu, 14 Nov 2024 04:03:22 +0500 Subject: [PATCH 02/10] NAS-131557: Update token-last-used.service.spec.ts --- src/app/services/token-last-used.service.spec.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/services/token-last-used.service.spec.ts b/src/app/services/token-last-used.service.spec.ts index a615102606e..135bac7032f 100644 --- a/src/app/services/token-last-used.service.spec.ts +++ b/src/app/services/token-last-used.service.spec.ts @@ -2,12 +2,14 @@ import { SpectatorService, createServiceFactory, mockProvider } from '@ngneat/sp import { of, Subject } from 'rxjs'; import { oneMinuteMillis } from 'app/constants/time.constant'; import { mockApi } from 'app/core/testing/utils/mock-api.utils'; +import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { WINDOW } from 'app/helpers/window.helper'; +import { IncomingApiMessage } from 'app/interfaces/api-message.interface'; import { LoggedInUser } from 'app/interfaces/ds-cache.interface'; import { DialogService } from 'app/modules/dialog/dialog.service'; import { AuthService } from 'app/services/auth/auth.service'; import { TokenLastUsedService } from 'app/services/token-last-used.service'; -import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; describe('TokenLastUsedService', () => { let spectator: SpectatorService; @@ -74,16 +76,16 @@ describe('TokenLastUsedService', () => { it('should update tokenLastUsed in localStorage on user and WebSocket activity', () => { const user$ = spectator.inject(AuthService).user$ as Subject; const updateTokenLastUsedSpy = jest.spyOn(spectator.service, 'updateTokenLastUsed'); - const ws$ = new Subject(); + const ws$ = new Subject(); - jest.spyOn(spectator.inject(ApiService), 'getWebSocketStream$').mockReturnValue(ws$); + jest.spyOn(WebSocketHandlerService.prototype, 'responses$', 'get').mockReturnValue(ws$); spectator.service.setupTokenLastUsedValue(of({} as LoggedInUser)); user$.next({} as LoggedInUser); expect(updateTokenLastUsedSpy).toHaveBeenCalled(); - ws$.next({}); + ws$.next({ msg: IncomingApiMessageType.Result, id: 'id' }); expect(updateTokenLastUsedSpy).toHaveBeenCalled(); }); }); From cf65a7d6ea6a0116b6bf4c63732163df3037089a Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Thu, 14 Nov 2024 04:08:21 +0500 Subject: [PATCH 03/10] NAS-131557: Update auth.service.spec.ts --- src/app/services/auth/auth.service.spec.ts | 37 ++++++++-------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/app/services/auth/auth.service.spec.ts b/src/app/services/auth/auth.service.spec.ts index bfa0f50c616..114685fefc3 100644 --- a/src/app/services/auth/auth.service.spec.ts +++ b/src/app/services/auth/auth.service.spec.ts @@ -12,7 +12,6 @@ import { TestScheduler } from 'rxjs/testing'; import { MockApiService } from 'app/core/testing/classes/mock-api.service'; import { mockCall, mockApi } from 'app/core/testing/utils/mock-api.utils'; import { mockAuth } from 'app/core/testing/utils/mock-auth.utils'; -import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; import { LoginResult } from 'app/enums/login-result.enum'; import { Role } from 'app/enums/role.enum'; import { LoginExResponse, LoginExResponseType } from 'app/interfaces/auth.interface'; @@ -51,6 +50,7 @@ describe('AuthService', () => { mockApi([ mockCall('auth.me', authMeUser), mockCall('auth.generate_token', 'DUMMY_TOKEN'), + mockCall('auth.logout'), mockCall('auth.login_ex', { response_type: LoginExResponseType.Success, user_info: { @@ -119,16 +119,12 @@ describe('AuthService', () => { { d: 'DUMMY_TOKEN' }, ); }); - expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ - msg: IncomingApiMessageType.Method, - method: 'auth.login_ex', - params: [{ mechanism: 'PASSWORD_PLAIN', username: 'dummy', password: 'dummy' }], - })); + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith( + 'auth.login_ex', + [{ mechanism: 'PASSWORD_PLAIN', username: 'dummy', password: 'dummy' }], + ); expect(spectator.inject(ApiService).call).not.toHaveBeenCalledWith('auth.me'); - expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ - msg: IncomingApiMessageType.Method, - method: 'auth.generate_token', - })); + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith('auth.generate_token'); }); it('initializes auth session with triggers and token with token login', () => { @@ -150,16 +146,12 @@ describe('AuthService', () => { { d: 'DUMMY_TOKEN' }, ); }); - expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ - msg: IncomingApiMessageType.Method, - method: 'auth.login_ex', - params: [{ mechanism: 'TOKEN_PLAIN', token: 'DUMMY_TOKEN' }], - })); + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith( + 'auth.login_ex', + [{ mechanism: 'TOKEN_PLAIN', token: 'DUMMY_TOKEN' }], + ); expect(spectator.inject(ApiService).call).not.toHaveBeenCalledWith('auth.me'); - expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ - msg: IncomingApiMessageType.Method, - method: 'auth.generate_token', - })); + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith('auth.generate_token'); }); }); @@ -170,7 +162,7 @@ describe('AuthService', () => { expectObservable(obs$).toBe( '(a|)', { - a: null, + a: undefined, }, ); expectObservable(spectator.service.isAuthenticated$).toBe( @@ -182,10 +174,7 @@ describe('AuthService', () => { {}, ); }); - expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(expect.objectContaining({ - msg: IncomingApiMessageType.Method, - method: 'auth.logout', - })); + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith('auth.logout'); }); }); From 188daccd4da0b533f56881c6f17141ae9e2f5f09 Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Thu, 14 Nov 2024 04:24:49 +0500 Subject: [PATCH 04/10] NAS-131557: Create api.service.spec.ts --- .../services/websocket/api.service.spec.ts | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 src/app/services/websocket/api.service.spec.ts diff --git a/src/app/services/websocket/api.service.spec.ts b/src/app/services/websocket/api.service.spec.ts new file mode 100644 index 00000000000..f887e18a81d --- /dev/null +++ b/src/app/services/websocket/api.service.spec.ts @@ -0,0 +1,167 @@ +import { TestBed } from '@angular/core/testing'; +import { mockProvider } from '@ngneat/spectator/jest'; +import { TranslateService } from '@ngx-translate/core'; +import { UUID } from 'angular2-uuid'; +import { + BehaviorSubject, Observable, + Subject, + firstValueFrom, +} from 'rxjs'; +import { IncomingApiMessageType } from 'app/enums/api-message-type.enum'; +import { JobState } from 'app/enums/job-state.enum'; +import { ApiEvent } from 'app/interfaces/api-message.interface'; +import { Pool } from 'app/interfaces/pool.interface'; +import { ApiService } from 'app/services/websocket/api.service'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; + +const mockWebSocketConnectionService = { + scheduleCall: jest.fn(), + buildSubscriber: jest.fn().mockReturnValue(new Subject()), + responses$: new BehaviorSubject(null), +}; + +const apiEventSubscription1$ = new BehaviorSubject(null); +const apiEventSubscription2$ = new BehaviorSubject(null); + +const mockEventSubscriptions = new Map>([ + ['event1', apiEventSubscription1$], + ['event2', apiEventSubscription2$], +]); + +describe('ApiService', () => { + let service: ApiService; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + ApiService, + mockProvider(TranslateService), + { provide: WebSocketHandlerService, useValue: mockWebSocketConnectionService }, + ], + }); + + service = TestBed.inject(ApiService); + + jest.spyOn(service.clearSubscriptions$, 'next'); + + (service as unknown as { + eventSubscribers: Map>; + }).eventSubscribers = mockEventSubscriptions; + + jest.clearAllMocks(); + }); + + describe('call', () => { + it('should make a WS call and get a response', () => { + const uuid = 'fakeUUID'; + jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); + mockWebSocketConnectionService.responses$.next({ + id: uuid, + msg: IncomingApiMessageType.Result, + result: {}, + }); + + service.call('cloudsync.providers').subscribe((result) => { + // TODO: Actually do nothing + expect(result).toEqual({}); + }); + + expect(mockWebSocketConnectionService.scheduleCall).toHaveBeenCalled(); + }); + + it('should handle WS call errors', () => { + jest.spyOn(console, 'error').mockImplementation(); + const uuid = 'fakeUUID'; + jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); + mockWebSocketConnectionService.responses$.next({ + id: uuid, + msg: IncomingApiMessageType.Result, + error: 'Test Error', + }); + + service.call('cloudsync.providers').subscribe( + { + next: () => {}, + error: (error) => { + expect(error).toBe('Test Error'); + }, + }, + ); + }); + }); + + describe('callAndSubscribe', () => { + it('should call and subscribe to updates', async () => { + const pools = [{ name: 'pool1' }, { name: 'pool2' }] as Pool[]; + const uuid = 'fakeUUID'; + jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); + mockWebSocketConnectionService.responses$.next({ + id: uuid, + msg: IncomingApiMessageType.Result, + result: pools, + }); + + expect(await firstValueFrom(service.callAndSubscribe('pool.query'))).toEqual([ + { name: 'pool1' }, { name: 'pool2' }, + ]); + }); + }); + + describe('job', () => { + it('should start a job successfully', () => { + const uuid = 'fakeUUID'; + const mockJobId = 1234; + jest.spyOn(UUID, 'UUID').mockReturnValue(uuid); + mockWebSocketConnectionService.responses$.next({ + id: uuid, + msg: IncomingApiMessageType.Result, + result: mockJobId, + }); + + service.startJob('boot.attach').subscribe((response) => { + expect(response).toEqual(mockJobId); + }); + }); + + it('should handle a successful job', () => { + service.job('boot.attach').subscribe((result) => { + expect(result.state).toEqual(JobState.Failed); + }); + }); + }); + + describe('subscribe', () => { + it('should successfully subscribe', () => { + const eventData = { data: 'test' }; + (mockWebSocketConnectionService.buildSubscriber() as Subject).next(eventData); + + service.subscribe('alert.list').subscribe((data) => { + // TODO: Actually do nothing + expect(data).toEqual({}); + }); + + expect(mockWebSocketConnectionService.buildSubscriber).toHaveBeenCalled(); + }); + }); + + describe('subscribeToLogs', () => { + it('should successfully subscribe to logs', () => { + const logData = { data: 'log test' }; + (mockWebSocketConnectionService.buildSubscriber() as Subject).next(logData); + + service.subscribeToLogs('logName').subscribe((data) => { + // TODO: Actually do nothing + expect(data).toEqual({}); + }); + }); + }); + + describe('clearSubscriptions', () => { + it('should clear all event subscriptions', () => { + service.clearSubscriptions(); + + expect(service.clearSubscriptions$.next).toHaveBeenCalled(); + expect(mockEventSubscriptions.size).toBe(0); + }); + }); +}); From 4f8551f84ce7378dc4b071983803fa5fde953fbd Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Thu, 14 Nov 2024 06:53:18 +0500 Subject: [PATCH 05/10] NAS-131557: Update websocket-handler.service.ts --- .../websocket/websocket-handler.service.ts | 52 ++++++++++++++----- src/assets/i18n/af.json | 2 + src/assets/i18n/ar.json | 2 + src/assets/i18n/ast.json | 2 + src/assets/i18n/az.json | 2 + src/assets/i18n/be.json | 2 + src/assets/i18n/bg.json | 2 + src/assets/i18n/bn.json | 2 + src/assets/i18n/br.json | 2 + src/assets/i18n/bs.json | 2 + src/assets/i18n/ca.json | 2 + src/assets/i18n/cs.json | 2 + src/assets/i18n/cy.json | 2 + src/assets/i18n/da.json | 2 + src/assets/i18n/de.json | 2 + src/assets/i18n/dsb.json | 2 + src/assets/i18n/el.json | 2 + src/assets/i18n/en-au.json | 2 + src/assets/i18n/en-gb.json | 2 + src/assets/i18n/en.json | 2 + src/assets/i18n/eo.json | 2 + src/assets/i18n/es-ar.json | 2 + src/assets/i18n/es-co.json | 2 + src/assets/i18n/es-mx.json | 2 + src/assets/i18n/es-ni.json | 2 + src/assets/i18n/es-ve.json | 2 + src/assets/i18n/es.json | 2 + src/assets/i18n/et.json | 2 + src/assets/i18n/eu.json | 2 + src/assets/i18n/fa.json | 2 + src/assets/i18n/fi.json | 2 + src/assets/i18n/fr.json | 2 + src/assets/i18n/fy.json | 2 + src/assets/i18n/ga.json | 2 + src/assets/i18n/gd.json | 2 + src/assets/i18n/gl.json | 2 + src/assets/i18n/he.json | 2 + src/assets/i18n/hi.json | 2 + src/assets/i18n/hr.json | 2 + src/assets/i18n/hsb.json | 2 + src/assets/i18n/hu.json | 2 + src/assets/i18n/ia.json | 2 + src/assets/i18n/id.json | 2 + src/assets/i18n/io.json | 2 + src/assets/i18n/is.json | 2 + src/assets/i18n/it.json | 2 + src/assets/i18n/ja.json | 2 + src/assets/i18n/ka.json | 2 + src/assets/i18n/kk.json | 2 + src/assets/i18n/km.json | 2 + src/assets/i18n/kn.json | 2 + src/assets/i18n/ko.json | 2 + src/assets/i18n/lb.json | 2 + src/assets/i18n/lt.json | 2 + src/assets/i18n/lv.json | 2 + src/assets/i18n/mk.json | 2 + src/assets/i18n/ml.json | 2 + src/assets/i18n/mn.json | 2 + src/assets/i18n/mr.json | 2 + src/assets/i18n/my.json | 2 + src/assets/i18n/nb.json | 2 + src/assets/i18n/ne.json | 2 + src/assets/i18n/nl.json | 2 + src/assets/i18n/nn.json | 2 + src/assets/i18n/os.json | 2 + src/assets/i18n/pa.json | 2 + src/assets/i18n/pl.json | 2 + src/assets/i18n/pt-br.json | 2 + src/assets/i18n/pt.json | 2 + src/assets/i18n/ro.json | 2 + src/assets/i18n/ru.json | 2 + src/assets/i18n/sk.json | 2 + src/assets/i18n/sl.json | 2 + src/assets/i18n/sq.json | 2 + src/assets/i18n/sr-latn.json | 2 + src/assets/i18n/sr.json | 2 + src/assets/i18n/strings.json | 2 + src/assets/i18n/sv.json | 2 + src/assets/i18n/sw.json | 2 + src/assets/i18n/ta.json | 2 + src/assets/i18n/te.json | 2 + src/assets/i18n/th.json | 2 + src/assets/i18n/tr.json | 2 + src/assets/i18n/tt.json | 2 + src/assets/i18n/udm.json | 2 + src/assets/i18n/uk.json | 2 + src/assets/i18n/vi.json | 2 + src/assets/i18n/zh-hans.json | 2 + src/assets/i18n/zh-hant.json | 2 + 89 files changed, 215 insertions(+), 13 deletions(-) diff --git a/src/app/services/websocket/websocket-handler.service.ts b/src/app/services/websocket/websocket-handler.service.ts index 2a04c1aefe0..e9e91c9359f 100644 --- a/src/app/services/websocket/websocket-handler.service.ts +++ b/src/app/services/websocket/websocket-handler.service.ts @@ -1,4 +1,6 @@ import { Inject, Injectable } from '@angular/core'; +import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; +import { TranslateService } from '@ngx-translate/core'; import { UUID } from 'angular2-uuid'; import { environment } from 'environments/environment'; import { @@ -22,8 +24,10 @@ import { IncomingApiMessageType, OutgoingApiMessageType } from 'app/enums/api-me import { WEBSOCKET } from 'app/helpers/websocket.helper'; import { WINDOW } from 'app/helpers/window.helper'; import { ApiEventMethod, ApiEventTyped, IncomingApiMessage } from 'app/interfaces/api-message.interface'; +import { DialogService } from 'app/modules/dialog/dialog.service'; import { WebSocketConnection } from 'app/services/websocket/websocket-connection.class'; +@UntilDestroy() @Injectable({ providedIn: 'root', }) @@ -66,8 +70,12 @@ export class WebSocketHandlerService { private activeCalls = 0; private readonly queuedCalls: { id: string; [key: string]: unknown }[] = []; private readonly pendingCalls = new Map(); + private showingConcurrentCallsError = false; + private callsInConcurrentCallsError = new Set(); constructor( + private dialogService: DialogService, + private translate: TranslateService, @Inject(WINDOW) protected window: Window, @Inject(WEBSOCKET) private webSocket: typeof rxjsWebSocket, ) { @@ -112,21 +120,39 @@ export class WebSocketHandlerService { } private raiseConcurrentCallsError(): void { - console.error( - 'Max concurrent calls', - JSON.stringify( - [ - ...this.queuedCalls, - ...(this.pendingCalls.values()), - ].map((call: { id: string; method: string }) => call.method), - ), - ); + const callsWithoutErrorsReported = [ + ...this.queuedCalls, + ...(this.pendingCalls.values()), + ].filter((call: { id: string; method: string }) => { + if (this.callsInConcurrentCallsError.has(call.id)) { + return false; + } + this.callsInConcurrentCallsError.add(call.id); + return true; + }).map((call: { id: string; method: string }) => { + return environment.production ? call.method : call; + }); + if (!callsWithoutErrorsReported.length) { + return; + } + console.error('Max concurrent calls', JSON.stringify(callsWithoutErrorsReported)); + + if (this.showingConcurrentCallsError) { + return; + } + if (!environment.production) { - throw new Error( - `Max concurrent calls limit reached. + this.showingConcurrentCallsError = true; + this.dialogService.error({ + message: this.translate.instant(`Max concurrent calls limit reached. There are more than 20 calls queued. - See queued calls in the browser's console logs`, - ); + See queued calls in the browser's console logs`), + title: this.translate.instant('Max Concurrent Calls'), + }).pipe(untilDestroyed(this)).subscribe({ + next: () => { + this.showingConcurrentCallsError = false; + }, + }); } } diff --git a/src/assets/i18n/af.json b/src/assets/i18n/af.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/af.json +++ b/src/assets/i18n/af.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ar.json b/src/assets/i18n/ar.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ar.json +++ b/src/assets/i18n/ar.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ast.json b/src/assets/i18n/ast.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ast.json +++ b/src/assets/i18n/ast.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/az.json b/src/assets/i18n/az.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/az.json +++ b/src/assets/i18n/az.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/be.json b/src/assets/i18n/be.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/be.json +++ b/src/assets/i18n/be.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/bg.json b/src/assets/i18n/bg.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/bg.json +++ b/src/assets/i18n/bg.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/bn.json b/src/assets/i18n/bn.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/bn.json +++ b/src/assets/i18n/bn.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/br.json b/src/assets/i18n/br.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/br.json +++ b/src/assets/i18n/br.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/bs.json b/src/assets/i18n/bs.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/bs.json +++ b/src/assets/i18n/bs.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ca.json b/src/assets/i18n/ca.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ca.json +++ b/src/assets/i18n/ca.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/cs.json b/src/assets/i18n/cs.json index fc09ec577a8..92adf50e6a2 100644 --- a/src/assets/i18n/cs.json +++ b/src/assets/i18n/cs.json @@ -2099,7 +2099,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/cy.json b/src/assets/i18n/cy.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/cy.json +++ b/src/assets/i18n/cy.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/da.json b/src/assets/i18n/da.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/da.json +++ b/src/assets/i18n/da.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 59738ecea18..17aa12506c6 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -1875,7 +1875,9 @@ "Matching regular expression": "", "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/dsb.json b/src/assets/i18n/dsb.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/dsb.json +++ b/src/assets/i18n/dsb.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/el.json b/src/assets/i18n/el.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/el.json +++ b/src/assets/i18n/el.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/en-au.json b/src/assets/i18n/en-au.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/en-au.json +++ b/src/assets/i18n/en-au.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/en-gb.json b/src/assets/i18n/en-gb.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/en-gb.json +++ b/src/assets/i18n/en-gb.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/eo.json b/src/assets/i18n/eo.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/eo.json +++ b/src/assets/i18n/eo.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/es-ar.json b/src/assets/i18n/es-ar.json index f8f659b2996..7ed3ad20dec 100644 --- a/src/assets/i18n/es-ar.json +++ b/src/assets/i18n/es-ar.json @@ -660,6 +660,8 @@ "Make the currently active TrueNAS controller the default when both TrueNAS controllers are online and HA is enabled. To change the default TrueNAS controller, unset this option on the default TrueNAS controller and allow the system to fail over. This briefly interrupts system services.": "", "Makes the group available for permissions editors over SMB protocol (and the share ACL editor). It is not used for SMB authentication or determining the user session token or internal permissions checks.": "", "Manage Global SED Password": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Metadata (Special) Small Block Size": "", "Metadata VDEVs": "", "Method Call": "", diff --git a/src/assets/i18n/es-co.json b/src/assets/i18n/es-co.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/es-co.json +++ b/src/assets/i18n/es-co.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/es-mx.json b/src/assets/i18n/es-mx.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/es-mx.json +++ b/src/assets/i18n/es-mx.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/es-ni.json b/src/assets/i18n/es-ni.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/es-ni.json +++ b/src/assets/i18n/es-ni.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/es-ve.json b/src/assets/i18n/es-ve.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/es-ve.json +++ b/src/assets/i18n/es-ve.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 4d9588e63aa..aecf02ab49d 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -2400,7 +2400,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/et.json b/src/assets/i18n/et.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/et.json +++ b/src/assets/i18n/et.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/eu.json b/src/assets/i18n/eu.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/eu.json +++ b/src/assets/i18n/eu.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/fa.json b/src/assets/i18n/fa.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/fa.json +++ b/src/assets/i18n/fa.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/fi.json b/src/assets/i18n/fi.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/fi.json +++ b/src/assets/i18n/fi.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index cc79585a5df..3e14ecd4727 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -422,6 +422,8 @@ "Maproot Group": "", "Maproot User": "", "Masquerade Address": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Maximize Dispersal": "", "Maximum Passive Port": "", "Mega": "", diff --git a/src/assets/i18n/fy.json b/src/assets/i18n/fy.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/fy.json +++ b/src/assets/i18n/fy.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ga.json b/src/assets/i18n/ga.json index a4c7ffeebf7..5176dbdae60 100644 --- a/src/assets/i18n/ga.json +++ b/src/assets/i18n/ga.json @@ -136,6 +136,8 @@ "Logs Details": "", "Machine Time: {machineTime} \n Browser Time: {browserTime}": "", "Maintenance Window": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Memory usage of app": "", "Modern OS: Extent block size 4k, TPC enabled, no Xen compat mode, SSD speed": "", "Move all items to the left side list": "", diff --git a/src/assets/i18n/gd.json b/src/assets/i18n/gd.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/gd.json +++ b/src/assets/i18n/gd.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/gl.json b/src/assets/i18n/gl.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/gl.json +++ b/src/assets/i18n/gl.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/he.json b/src/assets/i18n/he.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/he.json +++ b/src/assets/i18n/he.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/hi.json b/src/assets/i18n/hi.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/hi.json +++ b/src/assets/i18n/hi.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/hr.json b/src/assets/i18n/hr.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/hr.json +++ b/src/assets/i18n/hr.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/hsb.json b/src/assets/i18n/hsb.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/hsb.json +++ b/src/assets/i18n/hsb.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/hu.json b/src/assets/i18n/hu.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/hu.json +++ b/src/assets/i18n/hu.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ia.json b/src/assets/i18n/ia.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ia.json +++ b/src/assets/i18n/ia.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/id.json b/src/assets/i18n/id.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/id.json +++ b/src/assets/i18n/id.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/io.json b/src/assets/i18n/io.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/io.json +++ b/src/assets/i18n/io.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/is.json b/src/assets/i18n/is.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/is.json +++ b/src/assets/i18n/is.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/it.json b/src/assets/i18n/it.json index 34dac25aa43..29dfd7d1890 100644 --- a/src/assets/i18n/it.json +++ b/src/assets/i18n/it.json @@ -2432,7 +2432,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ja.json b/src/assets/i18n/ja.json index 86f0a0c6b12..2a4bb672918 100644 --- a/src/assets/i18n/ja.json +++ b/src/assets/i18n/ja.json @@ -2321,7 +2321,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ka.json b/src/assets/i18n/ka.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ka.json +++ b/src/assets/i18n/ka.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/kk.json b/src/assets/i18n/kk.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/kk.json +++ b/src/assets/i18n/kk.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/km.json b/src/assets/i18n/km.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/km.json +++ b/src/assets/i18n/km.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/kn.json b/src/assets/i18n/kn.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/kn.json +++ b/src/assets/i18n/kn.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json index 864b295586f..b26bb5dbde3 100644 --- a/src/assets/i18n/ko.json +++ b/src/assets/i18n/ko.json @@ -2202,7 +2202,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/lb.json b/src/assets/i18n/lb.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/lb.json +++ b/src/assets/i18n/lb.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/lt.json b/src/assets/i18n/lt.json index 5e3b01983e4..e0d36104d5a 100644 --- a/src/assets/i18n/lt.json +++ b/src/assets/i18n/lt.json @@ -2613,7 +2613,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/lv.json b/src/assets/i18n/lv.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/lv.json +++ b/src/assets/i18n/lv.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/mk.json b/src/assets/i18n/mk.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/mk.json +++ b/src/assets/i18n/mk.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ml.json b/src/assets/i18n/ml.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ml.json +++ b/src/assets/i18n/ml.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/mn.json b/src/assets/i18n/mn.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/mn.json +++ b/src/assets/i18n/mn.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/mr.json b/src/assets/i18n/mr.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/mr.json +++ b/src/assets/i18n/mr.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/my.json b/src/assets/i18n/my.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/my.json +++ b/src/assets/i18n/my.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/nb.json b/src/assets/i18n/nb.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/nb.json +++ b/src/assets/i18n/nb.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ne.json b/src/assets/i18n/ne.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ne.json +++ b/src/assets/i18n/ne.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index c629850f64c..b49369cdade 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -690,6 +690,8 @@ "Maproot Group": "", "Maproot User": "", "Masquerade Address": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Maximize Dispersal": "", "Maximum Passive Port": "", "Memory Stats": "", diff --git a/src/assets/i18n/nn.json b/src/assets/i18n/nn.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/nn.json +++ b/src/assets/i18n/nn.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/os.json b/src/assets/i18n/os.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/os.json +++ b/src/assets/i18n/os.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/pa.json b/src/assets/i18n/pa.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/pa.json +++ b/src/assets/i18n/pa.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/pl.json b/src/assets/i18n/pl.json index 81053ca8342..8cebf8c8049 100644 --- a/src/assets/i18n/pl.json +++ b/src/assets/i18n/pl.json @@ -2566,7 +2566,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/pt-br.json b/src/assets/i18n/pt-br.json index 5aaa6e72662..de09b4dc53e 100644 --- a/src/assets/i18n/pt-br.json +++ b/src/assets/i18n/pt-br.json @@ -2560,7 +2560,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json index d8e9b9b888b..64fe1843576 100644 --- a/src/assets/i18n/pt.json +++ b/src/assets/i18n/pt.json @@ -1473,7 +1473,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ro.json b/src/assets/i18n/ro.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ro.json +++ b/src/assets/i18n/ro.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ru.json b/src/assets/i18n/ru.json index 81971f03ec4..553181fb99d 100644 --- a/src/assets/i18n/ru.json +++ b/src/assets/i18n/ru.json @@ -1604,6 +1604,8 @@ "Matching naming schema": "", "Matching regular expression": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sk.json b/src/assets/i18n/sk.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sk.json +++ b/src/assets/i18n/sk.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sl.json b/src/assets/i18n/sl.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sl.json +++ b/src/assets/i18n/sl.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sq.json b/src/assets/i18n/sq.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sq.json +++ b/src/assets/i18n/sq.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sr-latn.json b/src/assets/i18n/sr-latn.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sr-latn.json +++ b/src/assets/i18n/sr-latn.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sr.json b/src/assets/i18n/sr.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sr.json +++ b/src/assets/i18n/sr.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/strings.json b/src/assets/i18n/strings.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/strings.json +++ b/src/assets/i18n/strings.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sv.json b/src/assets/i18n/sv.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sv.json +++ b/src/assets/i18n/sv.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/sw.json b/src/assets/i18n/sw.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/sw.json +++ b/src/assets/i18n/sw.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/ta.json b/src/assets/i18n/ta.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/ta.json +++ b/src/assets/i18n/ta.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/te.json b/src/assets/i18n/te.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/te.json +++ b/src/assets/i18n/te.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/th.json b/src/assets/i18n/th.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/th.json +++ b/src/assets/i18n/th.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/tr.json b/src/assets/i18n/tr.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/tr.json +++ b/src/assets/i18n/tr.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/tt.json b/src/assets/i18n/tt.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/tt.json +++ b/src/assets/i18n/tt.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/udm.json b/src/assets/i18n/udm.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/udm.json +++ b/src/assets/i18n/udm.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/uk.json b/src/assets/i18n/uk.json index f66c44e7147..2d9d4db0819 100644 --- a/src/assets/i18n/uk.json +++ b/src/assets/i18n/uk.json @@ -1010,6 +1010,8 @@ "Maproot Group": "", "Maproot User": "", "Masquerade Address": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Maximize Dispersal": "", "Maximum Passive Port": "", "Mega": "", diff --git a/src/assets/i18n/vi.json b/src/assets/i18n/vi.json index 5025bc85a34..54eadcbc5c1 100644 --- a/src/assets/i18n/vi.json +++ b/src/assets/i18n/vi.json @@ -2619,7 +2619,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", diff --git a/src/assets/i18n/zh-hans.json b/src/assets/i18n/zh-hans.json index 3d529e15a36..c45efde60bf 100644 --- a/src/assets/i18n/zh-hans.json +++ b/src/assets/i18n/zh-hans.json @@ -27,6 +27,8 @@ "Instance updated": "", "Instances you created will automatically appear here.": "", "List of files and directories to exclude from backup.
Separate entries by pressing Enter. See restic exclude patterns for more details about the --exclude option.": "", + "Max Concurrent Calls": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "My API Keys": "", "No devices added.": "", "No instances": "", diff --git a/src/assets/i18n/zh-hant.json b/src/assets/i18n/zh-hant.json index 7fd85e6062c..2d646945ec5 100644 --- a/src/assets/i18n/zh-hant.json +++ b/src/assets/i18n/zh-hant.json @@ -2181,7 +2181,9 @@ "Matching the fixed size of data, as in a database, may result in better performance.": "", "Mathematical instruction sets that determine how plaintext is converted into ciphertext. See Advanced Encryption Standard (AES) for more details.": "", "Mattermost username.": "", + "Max Concurrent Calls": "", "Max Poll": "", + "Max concurrent calls limit reached.\n There are more than 20 calls queued. \n See queued calls in the browser's console logs": "", "Max dataset nesting in ZFS is limited to 50. We are already at that limit in the parent dataset path. It is not possible to create anymore nested datasets under this path.": "", "Maximize Dispersal": "", "Maximize Enclosure Dispersal": "", From 55d5f5c0e88f8a7f5a706f0615642e97c745bd7a Mon Sep 17 00:00:00 2001 From: undsoft Date: Thu, 14 Nov 2024 11:36:24 +0100 Subject: [PATCH 06/10] NAS-131557: Use the new services for websocket connection --- .../smb/smb-list/smb-list.component.spec.ts | 2 +- src/assets/i18n/fr.json | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts b/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts index 6d2dbce00f5..89d806e4112 100644 --- a/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts +++ b/src/app/pages/sharing/smb/smb-list/smb-list.component.spec.ts @@ -155,7 +155,7 @@ describe('SmbListComponent', () => { await toggle.uncheck(); - expect(spectator.inject(WebSocketService).call).toHaveBeenCalledWith( + expect(spectator.inject(ApiService).call).toHaveBeenCalledWith( 'sharing.smb.update', [1, { enabled: false }], ); diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 740a77cf14b..77befb1d1bb 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -863,19 +863,16 @@ "UPS Utilization": "", "URL": "", "USB Devices": "", - "Unexpected power loss necessitating a restart.": "Perte de puissance inattendue nécessitant un redémarrage.", "Unix NSS Info": "", "Unix Primary Group": "", "Unix Socket": "", "Unknown PID": "", "Unlink": "", - "Unresponsive system necessitating a forced restart.": "Système qui ne répond pas nécessitant un redémarrage forcé.", "Unsaved Changes": "", "Update All": "", "Update Dashboard": "", "Update Interval": "", "Update Members": "", - "Update successful. Please restart for the update to take effect. Restart now?": "Mise à jour réussie. Veuillez redémarrer pour que la mise à jour soit effective. Redémarrer maintenant ?", "Updating Instance": "", "Updating custom app": "", "Updating settings": "", @@ -891,8 +888,6 @@ "User Read": "", "User Write": "", "User linked API Keys": "", - "User password": "Mot de passe utilisateur", - "Username associated with this API key.": "Nom d'utilisateur associé à cette clé API.", "Using 3rd party applications with TrueNAS extends its\n functionality beyond standard NAS use, which can introduce risks like data loss or system disruption.

\n iXsystems does not guarantee application safety or reliability, and such applications may not\n be covered by support contracts. Issues with core NAS functionality may be closed without\n further investigation if the same data or filesystems are accessed by these applications.": "", "VDEVs": "", "VLAN Settings": "", @@ -904,7 +899,6 @@ "VM Write": "", "VMWare Sync": "", "VMware Snapshot": "", - "VMware: Extent block size 512b, TPC enabled, no Xen compat mode, SSD speed": "VMware : taille de bloc étendue 512b, TPC activé, pas de mode de compatibilité Xen, vitesse SSD", "Validate Certificates": "", "Validate Remote Path": "", "Validate effective ACL": "", @@ -912,30 +906,21 @@ "Vdevs spans enclosure": "", "Vendor ID": "", "Verbose Logging": "", - "View logs": "Voir les logs", - "Virtual Machine": "Machine Virtuelle", "Virtualization Global Read": "", "Virtualization Global Write": "", "Virtualization Instance Write": "", - "Virtualization settings updated": "Paramètres de virtualisation mis à jour", "Voltage": "", "Warnings": "", "Watch List": "", "Weak Ciphers": "", "WebDAV": "", - "We’re unable to access the enclosure at the moment. Please ensure it’s connected properly and reload the page.": "Nous ne pouvons pas accéder au châssis pour le moment. Veuillez vous assurer qu'il est correctement connecté et recharger la page.", "What and When": "", "Widget {slot} Settings": "", "Widgets": "", "Winbind NSS Info": "", "Windows": "", "Workloads": "", - "Xen: Extent block size 512b, TPC enabled, Xen compat mode enabled, SSD speed": "Xen : taille de bloc étendue 512b, TPC activé, mode de compatibilité Xen activé, vitesse SSD", "Yandex": "", - "You are using an insecure connection. Switch to HTTPS for secure access.": "Vous utilisez une connexion non sécurisée. Passez à HTTPS pour un accès sécurisé.", - "You can also vote for new features on our forum.": "Vous pouvez également voter pour de nouvelles fonctionnalités sur notre forum.", - "You can only lock a dataset if it was encrypted with a passphrase": "Vous ne pouvez verrouiller un dataset que s'il a été chiffré avec une passphrase", - "You have unsaved changes. Are you sure you want to close?": "Vous avez des modifications non enregistrées. Êtes-vous sûr de vouloir fermer ?", "ZFS Errors": "", "Zoom In": "", "Zoom Out": "", @@ -4822,6 +4807,7 @@ "Unavailable": "Indisponible", "Uncheck": "Décocher", "Unencrypted": "Non chiffré", + "Unexpected power loss necessitating a restart.": "Perte de puissance inattendue nécessitant un redémarrage.", "Unhealthy": "Défectueux", "Unique LUN ID. The default is generated from the MAC address of the system.": "ID unique du LUN. La valeur par défaut est générée à partir de l'adresse MAC du système.", "Unique Virtual Host ID on the broadcast segment of the network. Configuring multiple Virtual IP addresses requires a separate VHID for each address.": "ID d'hôte virtuel unique sur le segment de broadcast du réseau. La configuration de plusieurs adresses IP virtuelles nécessite un VHID distinct pour chaque adresse.", @@ -4840,6 +4826,7 @@ "Unlock with Key file": "Déverrouiller avec un fichier clé", "Unlocked": "Débloqué", "Unlocking Datasets": "Déverrouillage des datasets", + "Unresponsive system necessitating a forced restart.": "Système qui ne répond pas nécessitant un redémarrage forcé.", "Unselect All": "Désélectionner tout", "Unset": "Désactiver", "Unset Generate Encryption Key to instead import a custom Hex key.": "Désélectionnez Générer la clé de chiffrement pour importer à la place une clé personnalisée.", @@ -4869,6 +4856,7 @@ "Update TrueCommand Settings": "Mettre à jour les paramètres de TrueCommand", "Update available": "Mise à jour disponible", "Update in Progress": "Mise-à-jour en cours", + "Update successful. Please restart for the update to take effect. Restart now?": "Mise à jour réussie. Veuillez redémarrer pour que la mise à jour soit effective. Redémarrer maintenant ?", "Updated 'Use as Home Share'": "Mise à jour 'Utiliser comme partage home'", "Updated Date": "Date de mise à jour", "Updates": "Mises à jour", @@ -4955,11 +4943,13 @@ "User is lacking permissions to access WebUI.": "L'utilisateur ne dispose pas des autorisations nécessaires pour accéder à WebUI.", "User limit to Docker Hub has almost been reached or has already been reached. The installation process may stall as images cannot be pulled. The current limit will be renewed in {seconds}. The application can still be staged for installation.": "La limite d’utilisateurs de Docker Hub a presque été atteinte ou a déjà été atteinte. Le processus d'installation peut s'arrêter car les images ne peuvent pas être extraites. La limite actuelle sera renouvelée dans {seconds}. L'application peut toujours être préparée pour l'installation.", "User passed to camcontrol security -u to unlock SEDs": "L'utilisateur est passé à camcontrol security -u pour déverrouiller les SEDs", + "User password": "Mot de passe utilisateur", "User password. Must be at least 12 and no more than 16 characters long.": "Mot de passe utilisateur. Doit comporter au moins 12 caractères et au plus 16 caractères.", "User updated": "Utilisateur mis à jour", "User who controls the dataset. This user always has permissions to read or write the ACL and read or write attributes. Users created manually or imported from a directory service appear in the drop-down menu.": "Utilisateur qui contrôle le dataset. Cet utilisateur a toujours l'autorisation de lire ou d'écrire l'ACL et de lire ou d'écrire des attributs. Les utilisateurs créés manuellement ou importés à partir d'un service d'annuaire apparaissent dans le menu déroulant.", "User-defined string used to decrypt the dataset. Can be used instead of an encryption key.
WARNING: the passphrase is the only means to decrypt the information stored in this dataset. Be sure to create a memorable passphrase or physically secure the passphrase.": "Chaîne définie par l'utilisateur utilisée pour déchiffrer le dataset. Peut être utilisée à la place d'une clé de chiffrement.
ATTENTION : la passphrase est le seul moyen de déchiffrer les informations stockées dans cet dataset. Veillez à créer une passphrase mémorisable ou à sécuriser physiquement la passphrase .", "Username": "Nom d'utilisateur", + "Username associated with this API key.": "Nom d'utilisateur associé à cette clé API.", "Username for this service.": "Nom d'utilisateur pour ce service.", "Username of the SNMP User-based Security Model (USM) user.": "Nom d'utilisateur de l'utilisateur SNMP User-based Security Model (USM).", "Username on the remote system to log in via Web UI to setup connection.": "Nom d'utilisateur sur le système distant pour se connecter via l'interface utilisateur Web pour configurer la connexion.", @@ -4986,6 +4976,7 @@ "VMware Snapshot Integration": "Intégration de l'instantané VMware", "VMware Snapshots": "Instantanés VMware", "VMware Sync": "VMWare Sync", + "VMware: Extent block size 512b, TPC enabled, no Xen compat mode, SSD speed": "VMware : taille de bloc étendue 512b, TPC activé, pas de mode de compatibilité Xen, vitesse SSD", "Validate Connection": "Valider la connexion", "Value": "Valeur", "Value must be a number": "La valeur doit être un nombre", @@ -5020,15 +5011,18 @@ "View Netdata": "Voir Netdata", "View Release Notes": "Afficher les notes de publication", "View Reports": "Afficher les rapports", + "View logs": "Voir les logs", "View/Download CSR": "Voir/Télécharger CSR", "View/Download Certificate": "Voir/Télécharger le certificat", "View/Download Key": "Voir/Télécharger la clé", "Virtual CPUs": "CPUs virtuels", "Virtual IP Address (Failover Address)": "Adresse IP virtuelle (adresse du failover)", + "Virtual Machine": "Machine Virtuelle", "Virtual Machines": "Machines virtuelles", "Virtual machine created": "Machine virtuelle créée", "Virtualization": "Virtualisation", "Virtualization is not supported": "La virtualisation n'est pas prise en charge", + "Virtualization settings updated": "Paramètres de virtualisation mis à jour", "Visible": "Visible", "Volume Mounts": "Montages du volume", "Volume Size": "Taille du volume", @@ -5072,6 +5066,7 @@ "Wednesday": "Mercredi", "Week(s)": "Semaine(s)", "Weeks": "Semaines", + "We’re unable to access the enclosure at the moment. Please ensure it’s connected properly and reload the page.": "Nous ne pouvons pas accéder au châssis pour le moment. Veuillez vous assurer qu'il est correctement connecté et recharger la page.", "What and Where": "Quoi et où", "When": "Quand", "When a group is selected, the root user is also limited to the permissions of that group.": "Lorsqu'un groupe est sélectionné, l'utilisateur root est également limité aux autorisations de ce groupe.", @@ -5127,6 +5122,7 @@ "Write Owner": "Propriétaire de l'écriture", "Wrong username or password. Please try again.": "Nom d'utilisateur ou mot de passe erroné. Veuillez réessayer.", "Xen initiator compat mode": "Mode compat d'initiateur Xen", + "Xen: Extent block size 512b, TPC enabled, Xen compat mode enabled, SSD speed": "Xen : taille de bloc étendue 512b, TPC activé, mode de compatibilité Xen activé, vitesse SSD", "Yandex Access Token.": "Yandex Access Token.", "Year(s)": "Année(s)", "Years": "Années", @@ -5134,10 +5130,14 @@ "Yes I understand the risks": "Oui, je comprends les risques", "Yesterday": "Hier", "You are trying to open:
\n{url}

\nBecause HTTP to HTTPS redirect is enabled in settings your browser will force HTTPS connection for this URL.
\nThis may create issues if app does not support secure connections.
\n
\nYou can try opening app url in an incognito mode.
\nAlternatively you can disable redirect in Settings, clear browser cache and try again.": "Vous essayez d'ouvrir :
\n{url}

\nLa redirection HTTP vers HTTPS étant activée dans les paramètres, votre navigateur forcera la connexion HTTPS pour cette URL.
\nCela peut créer des problèmes si l'application ne prend pas en charge les connexions sécurisées.
\n
\nVous pouvez essayer d'ouvrir l'URL de l'application en mode navigation privée.
\nVous pouvez également désactiver la redirection dans les paramètres, vider le cache du navigateur et réessayer.", + "You are using an insecure connection. Switch to HTTPS for secure access.": "Vous utilisez une connexion non sécurisée. Passez à HTTPS pour un accès sécurisé.", + "You can also vote for new features on our forum.": "Vous pouvez également voter pour de nouvelles fonctionnalités sur notre forum.", "You can join the TrueNAS Newsletter for monthly updates and latest developments.": "Vous pouvez rejoindre la Newsletter TrueNAS pour des mises à jour mensuelles et les derniers développements.", + "You can only lock a dataset if it was encrypted with a passphrase": "Vous ne pouvez verrouiller un dataset que s'il a été chiffré avec une passphrase", "You can search both for local groups as well as groups from Active Directory. Press ENTER to separate entries.": "Vous pouvez rechercher à la fois des groupes locaux et des groupes d'Active Directory. Appuyez sur ENTER pour séparer les entrées.", "You can search both for local users as well as users from Active Directory.Press ENTER to separate entries.": "Vous pouvez rechercher à la fois des utilisateurs locaux et des utilisateurs d'Active Directory. Appuyez sur ENTRÉE pour séparer les entrées.", "You have left the domain.": "Vous avez quitté le domaine.", + "You have unsaved changes. Are you sure you want to close?": "Vous avez des modifications non enregistrées. Êtes-vous sûr de vouloir fermer ?", "You may enter a specific IP address (e.g., 192.168.1.1) for individual access, or use an IP address with a subnet mask (e.g., 192.168.1.0/24) to define a range of addresses.": "Vous pouvez saisir une adresse IP spécifique (par exemple, 192.168.1.1) pour un accès individuel, ou utiliser une adresse IP avec un masque de sous-réseau (par exemple, 192.168.1.0/24) pour définir une plage d'adresses.", "Your dashboard is currently empty!": "Votre tableau de bord est actuellement vide !", "ZFS": "ZFS", From 2208a8e8686d913de84a01225da2666554e33181 Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Fri, 15 Nov 2024 17:59:33 +0500 Subject: [PATCH 07/10] NAS-131557: Added tests --- .../websocket-handler.service.spec.ts | 189 ++++++++++++++++++ .../websocket/websocket-handler.service.ts | 7 +- 2 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 src/app/services/websocket/websocket-handler.service.spec.ts diff --git a/src/app/services/websocket/websocket-handler.service.spec.ts b/src/app/services/websocket/websocket-handler.service.spec.ts new file mode 100644 index 00000000000..de71dc83ffd --- /dev/null +++ b/src/app/services/websocket/websocket-handler.service.spec.ts @@ -0,0 +1,189 @@ +import { + discardPeriodicTasks, fakeAsync, tick, +} from '@angular/core/testing'; +import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; +import { UUID } from 'angular2-uuid'; +import { Subject } from 'rxjs'; +import { WebSocketSubject, WebSocketSubjectConfig } from 'rxjs/webSocket'; +import { IncomingApiMessageType, OutgoingApiMessageType } from 'app/enums/api-message-type.enum'; +import { WEBSOCKET } from 'app/helpers/websocket.helper'; +import { WebSocketConnection } from 'app/services/websocket/websocket-connection.class'; +import { WebSocketHandlerService } from 'app/services/websocket/websocket-handler.service'; + +const fakeSocketUrl = 'ws://localhost:1234'; +let fakeSocketConfig: WebSocketSubjectConfig; +let fakeSocketsList: WebSocketSubject[]; + +function fakeSocketFactory(urlConfigOrSource: WebSocketSubjectConfig): WebSocketSubject { + urlConfigOrSource.url = fakeSocketUrl; + fakeSocketConfig = urlConfigOrSource; + const fakeSocket$ = new WebSocketSubject(urlConfigOrSource); + fakeSocketsList.push(fakeSocket$); + return fakeSocket$; +} + +describe('WebSocketConnectionService', () => { + let spectator: SpectatorService; + let responseStream$: Subject; + + const createService = createServiceFactory({ + service: WebSocketHandlerService, + providers: [ + { + provide: WEBSOCKET, + useFactory: () => fakeSocketFactory, + }, + ], + }); + + beforeEach(() => { + fakeSocketsList = []; + responseStream$ = new Subject(); + jest.spyOn(WebSocketConnection.prototype, 'send'); + jest.spyOn(WebSocketConnection.prototype, 'close'); + jest.spyOn(WebSocketConnection.prototype, 'stream$', 'get').mockImplementation(() => responseStream$.asObservable()); + spectator = createService(); + }); + + it('checks socket config params', () => { + expect(fakeSocketConfig.url).toBe(fakeSocketUrl); + expect(typeof fakeSocketConfig.openObserver.next).toBe('function'); + expect(fakeSocketConfig.openObserver.next.name).toContain('onOpen'); + expect(typeof fakeSocketConfig.closeObserver.next).toBe('function'); + expect(fakeSocketConfig.closeObserver.next.name).toContain('onClose'); + }); + + it('sets shutDownInProgress to false when open connection', () => { + spectator.service.prepareShutdown(); + expect(spectator.service.isSystemShuttingDown).toBe(true); + + fakeSocketConfig.openObserver.next({} as Event); + expect(spectator.service.isSystemShuttingDown).toBe(false); + }); + + it('sends connect message', () => { + fakeSocketConfig.openObserver.next({} as Event); + + expect(WebSocketConnection.prototype.send).toHaveBeenCalledWith({ support: ['1'], version: '1', msg: OutgoingApiMessageType.Connect }); + }); + + it('closes connection when isTryingReconnect is true', fakeAsync(() => { + fakeSocketConfig.openObserver.next({} as Event); + spectator.service.prepareShutdown(); + fakeSocketConfig.closeObserver.next({} as CloseEvent); + tick(3 * 1000); + fakeSocketConfig.openObserver.next({} as Event); + spectator.service.scheduleCall({ id: 'test', method: 'test-method' }); + + expect(spectator.service.isSystemShuttingDown).toBe(true); + expect(WebSocketConnection.prototype.send).not.toHaveBeenCalledWith({ id: 'test', method: 'test-method' }); + expect(WebSocketConnection.prototype.close).toHaveBeenCalled(); + + discardPeriodicTasks(); + })); + + it('sends pings', fakeAsync(() => { + jest.spyOn(UUID, 'UUID') + .mockReturnValueOnce('ping-pong-uuid-1') + .mockReturnValueOnce('ping-pong-uuid-2') + .mockReturnValueOnce('ping-pong-uuid-3'); + + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ msg: IncomingApiMessageType.Connected }); + + tick(20 * 1000); + expect(WebSocketConnection.prototype.send).toHaveBeenNthCalledWith(2, { id: 'ping-pong-uuid-1', msg: OutgoingApiMessageType.Ping }); + expect(WebSocketConnection.prototype.send).toHaveBeenCalledTimes(2); + tick(20 * 1000); + expect(WebSocketConnection.prototype.send).toHaveBeenNthCalledWith(3, { id: 'ping-pong-uuid-2', msg: OutgoingApiMessageType.Ping }); + expect(WebSocketConnection.prototype.send).toHaveBeenCalledTimes(3); + tick(20 * 1000); + expect(WebSocketConnection.prototype.send).toHaveBeenNthCalledWith(4, { id: 'ping-pong-uuid-3', msg: OutgoingApiMessageType.Ping }); + expect(WebSocketConnection.prototype.send).toHaveBeenCalledTimes(4); + + fakeSocketConfig.closeObserver.next({} as CloseEvent); + tick(20 * 1000); + expect(WebSocketConnection.prototype.send).toHaveBeenCalledTimes(4); + + discardPeriodicTasks(); + })); + + it('resumes calls that were paused because of broken connection', fakeAsync(() => { + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ msg: IncomingApiMessageType.Connected }); + spectator.service.scheduleCall({ id: 'message-1', method: 'message-1' }); + + fakeSocketConfig.closeObserver.next({} as CloseEvent); + spectator.service.scheduleCall({ id: 'message-2', method: 'message-2' }); + spectator.service.scheduleCall({ id: 'message-3', method: 'message-3' }); + + expect(WebSocketConnection.prototype.send).toHaveBeenCalledWith({ id: 'message-1', method: 'message-1' }); + expect(WebSocketConnection.prototype.send).not.toHaveBeenCalledWith({ id: 'message-2', method: 'message-2' }); + expect(WebSocketConnection.prototype.send).not.toHaveBeenCalledWith({ id: 'message-3', method: 'message-3' }); + tick(5000); + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ msg: IncomingApiMessageType.Connected }); + + tick(2000); + expect(WebSocketConnection.prototype.send).toHaveBeenCalledWith({ id: 'message-2', method: 'message-2' }); + expect(WebSocketConnection.prototype.send).toHaveBeenCalledWith({ id: 'message-3', method: 'message-3' }); + discardPeriodicTasks(); + })); + + it('sets isClosed when close connection and isTryingReconnect is false', () => { + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ id: 'test', msg: IncomingApiMessageType.Connected }); + + fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); + + let isClosed; + spectator.service.isClosed$.subscribe((value) => isClosed = value); + expect(isClosed).toBe(true); + }); + + it('sets isAccessRestricted when close connection with code 1008', () => { + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ id: 'test', msg: IncomingApiMessageType.Connected }); + + fakeSocketConfig.closeObserver.next({ code: 1008 } as CloseEvent); + + let isAccessRestricted; + spectator.service.isAccessRestricted$.subscribe((value) => isAccessRestricted = value); + expect(isAccessRestricted).toBe(true); + }); + + it('trying to reconnect when close connection and isTryingReconnect is false', fakeAsync(() => { + jest.spyOn(fakeSocketsList[0], 'complete'); + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ id: 'test', msg: IncomingApiMessageType.Connected }); + + fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); + expect(fakeSocketsList).toHaveLength(1); + + tick(5 * 1000); + expect(fakeSocketsList).toHaveLength(2); + + expect(fakeSocketsList[0].complete).toHaveBeenCalled(); + + discardPeriodicTasks(); + })); + + it('ignores closing when close connection and isTryingReconnect is true', fakeAsync(() => { + jest.spyOn(fakeSocketsList[0], 'complete'); + fakeSocketConfig.openObserver.next({} as Event); + responseStream$.next({ id: 'test', msg: IncomingApiMessageType.Connected }); + + fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); + tick(3 * 1000); + fakeSocketConfig.closeObserver.next({ code: 1006 } as CloseEvent); + + expect(fakeSocketsList).toHaveLength(1); + expect(fakeSocketsList[0].complete).not.toHaveBeenCalled(); + + let isClosed; + spectator.service.isClosed$.subscribe((value) => isClosed = value); + expect(isClosed).toBe(true); + + discardPeriodicTasks(); + })); +}); diff --git a/src/app/services/websocket/websocket-handler.service.ts b/src/app/services/websocket/websocket-handler.service.ts index e9e91c9359f..5567386b795 100644 --- a/src/app/services/websocket/websocket-handler.service.ts +++ b/src/app/services/websocket/websocket-handler.service.ts @@ -5,6 +5,7 @@ import { UUID } from 'angular2-uuid'; import { environment } from 'environments/environment'; import { BehaviorSubject, + combineLatest, filter, interval, map, @@ -90,7 +91,11 @@ export class WebSocketHandlerService { } private setupScheduledCalls(): void { - this.triggerNextCall$.pipe( + combineLatest([ + this.triggerNextCall$, + this.isConnected$, + ]).pipe( + filter(([, isConnected]) => isConnected), tap(() => { if (this.activeCalls + 1 < this.maxConcurrentCalls) { return; From 89129f85437ba4db568ede75e866602d9d7671b3 Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Mon, 18 Nov 2024 02:06:59 +0500 Subject: [PATCH 08/10] NAS-131557: Update token-last-used.service.ts --- src/app/services/token-last-used.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/services/token-last-used.service.ts b/src/app/services/token-last-used.service.ts index 889c78c4517..2ed4aee314f 100644 --- a/src/app/services/token-last-used.service.ts +++ b/src/app/services/token-last-used.service.ts @@ -38,7 +38,6 @@ export class TokenLastUsedService { } constructor( - // private ws: ApiService, private wsHandler: WebSocketHandlerService, @Inject(WINDOW) private window: Window, ) { From 549414a14e8ef07f34cf5102aae47c3a8942cd2c Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Mon, 18 Nov 2024 02:14:46 +0500 Subject: [PATCH 09/10] NAS-131557: Replace `closeWsConnection` with `reconnect` --- .../system-tasks/restart/restart.component.ts | 2 +- .../failover-settings.component.ts | 2 +- .../gui/gui-form/gui-form.component.ts | 2 +- .../websocket/websocket-connection.class.ts | 4 ++++ .../websocket/websocket-handler.service.ts | 14 +++++++++----- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/app/pages/system-tasks/restart/restart.component.ts b/src/app/pages/system-tasks/restart/restart.component.ts index 396a52b4279..5afad0c477d 100644 --- a/src/app/pages/system-tasks/restart/restart.component.ts +++ b/src/app/pages/system-tasks/restart/restart.component.ts @@ -59,7 +59,7 @@ export class RestartComponent implements OnInit { }, complete: () => { // show restart screen this.wsManager.prepareShutdown(); - this.wsManager.closeWsConnection(); + this.wsManager.reconnect(); setTimeout(() => { this.router.navigate(['/signin']); }, 5000); diff --git a/src/app/pages/system/failover-settings/failover-settings.component.ts b/src/app/pages/system/failover-settings/failover-settings.component.ts index 94014305ef1..80a9560c60c 100644 --- a/src/app/pages/system/failover-settings/failover-settings.component.ts +++ b/src/app/pages/system/failover-settings/failover-settings.component.ts @@ -118,7 +118,7 @@ export class FailoverSettingsComponent implements OnInit { this.authService.logout().pipe(untilDestroyed(this)).subscribe({ next: () => { this.authService.clearAuthToken(); - this.wsManager.closeWsConnection(); + this.wsManager.reconnect(); }, }); } diff --git a/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts b/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts index c7e5ddca87f..8f804e1a950 100644 --- a/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts +++ b/src/app/pages/system/general-settings/gui/gui-form/gui-form.component.ts @@ -217,7 +217,7 @@ export class GuiFormComponent { ).subscribe({ next: () => { this.wsManager.setupConnectionUrl(protocol, hostname + ':' + port); - this.wsManager.closeWsConnection(); + this.wsManager.reconnect(); this.replaceHrefWhenWsConnected(href); }, error: (error: ApiError) => { diff --git a/src/app/services/websocket/websocket-connection.class.ts b/src/app/services/websocket/websocket-connection.class.ts index c3dab0a4958..e1ad35314da 100644 --- a/src/app/services/websocket/websocket-connection.class.ts +++ b/src/app/services/websocket/websocket-connection.class.ts @@ -8,6 +8,10 @@ export class WebSocketConnection { return this.wsAsObservable$; } + get closed(): boolean { + return this.ws$?.closed; + } + constructor( private webSocket: typeof rxjsWebSocket, ) { } diff --git a/src/app/services/websocket/websocket-handler.service.ts b/src/app/services/websocket/websocket-handler.service.ts index 5567386b795..37cb7e83dae 100644 --- a/src/app/services/websocket/websocket-handler.service.ts +++ b/src/app/services/websocket/websocket-handler.service.ts @@ -218,7 +218,7 @@ export class WebSocketHandlerService { if (event.code === 1008) { this.isAccessRestricted$ = true; } else { - this.reconnect(); + this.initiateReconnect(); } } @@ -255,6 +255,14 @@ export class WebSocketHandlerService { } reconnect(): void { + if (this.wsConnection.closed) { + this.initiateReconnect(); + } else { + this.wsConnection.close(); + } + } + + private initiateReconnect(): void { if (this.reconnectTimerSubscription) { this.unsubscribeReconnectSubscription(); } @@ -267,10 +275,6 @@ export class WebSocketHandlerService { }); } - closeWsConnection(): void { - this.wsConnection.close(); - } - setupConnectionUrl(protocol: string, remote: string): void { this.connectionUrl = (protocol === 'https:' ? 'wss://' : 'ws://') + remote + '/websocket'; } From de58c8efa73d0c7a7bb9dfb2dcb9d7d52d0e54af Mon Sep 17 00:00:00 2001 From: RehanY147 Date: Mon, 18 Nov 2024 17:37:10 +0500 Subject: [PATCH 10/10] NAS-131557: Update auth.service.spec.ts --- src/app/services/auth/auth.service.spec.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/app/services/auth/auth.service.spec.ts b/src/app/services/auth/auth.service.spec.ts index 114685fefc3..b23bed2e8ed 100644 --- a/src/app/services/auth/auth.service.spec.ts +++ b/src/app/services/auth/auth.service.spec.ts @@ -74,26 +74,6 @@ describe('AuthService', () => { beforeEach(() => { spectator = createService(); - - // const originalMakeRequest = spectator.service.makeRequest.bind(spectator.service); - // jest.spyOn(spectator.service, 'makeRequest').mockImplementation((method: ApiCallMethod, params: never) => { - // originalMakeRequest(method, params).subscribe(); - - // switch (method) { - // case 'auth.generate_token': - // return of('DUMMY_TOKEN'); - // case 'auth.login_ex': - // return of({ - // response_type: LoginExResponseType.Success, - // user_info: { - // privilege: { webui_access: true }, - // }, - // } as LoginExResponse); - // default: - // return of(null); - // } - // }); - testScheduler = new TestScheduler((actual, expected) => { expect(actual).toEqual(expected); });