├── .browserslistrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .yarnrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── angular.json ├── build ├── cypress.config.ts ├── cypress └── tsconfig.json ├── dco-signoffs ├── AshishJabble-dco-signoff.txt ├── AshwinGopalakrishnan-dco-signoff.txt ├── BillHunt-dco-signoff.txt ├── MarkRiddoch-dco-signoff.txt ├── MohdShariq-dco-signoff.txt ├── MonikaSharma-dco-signoff.txt ├── PraveenGarg-dco-signoff.txt └── other-dco-signoff.txt ├── deploy ├── deploy-rh ├── docker-compose.yml ├── docker └── nginx-docker.conf ├── docs ├── changelog.md ├── debian-readme.md ├── developers-guide.md ├── docker-readme.md ├── prerequisite-macos.md ├── prerequisite-redhat.md ├── prerequisite-ubuntu.md ├── prerequisite-windows.md ├── rpm-readme.md └── windows-nginx-deployment-guide.md ├── e2e ├── environment.ts ├── po │ ├── app.admin.ts │ ├── app.filters.ts │ ├── app.non-admin.ts │ ├── app.skip.ts │ └── south.page.ts ├── run ├── specs │ ├── app.e2e-common.ts │ └── app.e2e-south.ts └── tsconfig.e2e.json ├── extra-webpack.config.js ├── git-version ├── grab-git-info.js ├── karma.conf.js ├── make_deb ├── make_rpm ├── nginx.conf ├── nginx.dockerfile ├── package.json ├── packages ├── Debian │ └── DEBIAN │ │ ├── control │ │ ├── postinst │ │ ├── postrm │ │ └── preinst └── RPM │ └── SPECS │ └── fledge-gui.spec ├── raspbian └── raspian-stretch-lite-setup.md ├── reporter-config.json ├── requirements ├── requirements-test ├── src ├── app │ ├── app.component.css │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── app.routing.ts │ ├── components │ │ ├── common │ │ │ ├── alert-dialog │ │ │ │ ├── alert-dailog.component.spec.ts │ │ │ │ ├── alert-dialog.component.css │ │ │ │ ├── alert-dialog.component.html │ │ │ │ ├── alert-dialog.component.ts │ │ │ │ └── alert-dialog.module.ts │ │ │ ├── alert │ │ │ │ ├── alert.component.css │ │ │ │ ├── alert.component.html │ │ │ │ ├── alert.component.spec.ts │ │ │ │ └── alert.component.ts │ │ │ ├── chart │ │ │ │ ├── chart.component.spec.ts │ │ │ │ ├── chart.component.ts │ │ │ │ ├── chart.module.ts │ │ │ │ └── index.ts │ │ │ ├── confirmation-dialog │ │ │ │ ├── confirmation-dialog.component.css │ │ │ │ ├── confirmation-dialog.component.html │ │ │ │ ├── confirmation-dialog.component.spec.ts │ │ │ │ ├── confirmation-dialog.component.ts │ │ │ │ ├── dialog.service.spec.ts │ │ │ │ └── dialog.service.ts │ │ │ ├── file-export-modal │ │ │ │ ├── file-export-modal.component.css │ │ │ │ ├── file-export-modal.component.html │ │ │ │ ├── file-export-modal.component.spec.ts │ │ │ │ └── file-export-modal.component.ts │ │ │ ├── file-import-modal │ │ │ │ ├── file-import-modal.component.css │ │ │ │ ├── file-import-modal.component.html │ │ │ │ ├── file-import-modal.component.spec.ts │ │ │ │ └── file-import-modal.component.ts │ │ │ ├── file-upload-modal │ │ │ │ ├── file-upload-modal.component.css │ │ │ │ ├── file-upload-modal.component.html │ │ │ │ ├── file-upload-modal.component.spec.ts │ │ │ │ └── file-upload-modal.component.ts │ │ │ ├── node-editor │ │ │ │ ├── color-palette.ts │ │ │ │ ├── connection.ts │ │ │ │ ├── connector.ts │ │ │ │ ├── controls │ │ │ │ │ ├── common-custom-control.ts │ │ │ │ │ ├── filter-custom-control.ts │ │ │ │ │ ├── north-custom-control.ts │ │ │ │ │ ├── notification-custom-control.ts │ │ │ │ │ └── south-custom-control.ts │ │ │ │ ├── custom-background.ts │ │ │ │ ├── custom-connection │ │ │ │ │ ├── custom-connection.component.css │ │ │ │ │ ├── custom-connection.component.html │ │ │ │ │ ├── custom-connection.component.spec.ts │ │ │ │ │ └── custom-connection.component.ts │ │ │ │ ├── custom-node │ │ │ │ │ ├── custom-node.component.css │ │ │ │ │ ├── custom-node.component.html │ │ │ │ │ ├── custom-node.component.spec.ts │ │ │ │ │ └── custom-node.component.ts │ │ │ │ ├── custom-notification-node │ │ │ │ │ ├── custom-notification-node.component.css │ │ │ │ │ ├── custom-notification-node.component.html │ │ │ │ │ ├── custom-notification-node.component.spec.ts │ │ │ │ │ └── custom-notification-node.component.ts │ │ │ │ ├── custom-socket │ │ │ │ │ ├── custom-socket.component.css │ │ │ │ │ ├── custom-socket.component.html │ │ │ │ │ ├── custom-socket.component.spec.ts │ │ │ │ │ └── custom-socket.component.ts │ │ │ │ ├── drop-plugin.ts │ │ │ │ ├── drop-stratgey.ts │ │ │ │ ├── editor.ts │ │ │ │ ├── flow-editor.module.ts │ │ │ │ ├── flow-editor.service.spec.ts │ │ │ │ ├── flow-editor.service.ts │ │ │ │ ├── insert-node │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── node-editor.component.css │ │ │ │ ├── node-editor.component.html │ │ │ │ ├── node-editor.component.spec.ts │ │ │ │ ├── node-editor.component.ts │ │ │ │ ├── nodes │ │ │ │ │ ├── add-notification.ts │ │ │ │ │ ├── add-service.ts │ │ │ │ │ ├── add-task.ts │ │ │ │ │ ├── filter.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── north.ts │ │ │ │ │ ├── notification.ts │ │ │ │ │ ├── south.ts │ │ │ │ │ └── storage.ts │ │ │ │ ├── ref.directive.spec.ts │ │ │ │ ├── ref.directive.ts │ │ │ │ ├── selector.ts │ │ │ │ ├── south │ │ │ │ │ ├── asset-readings │ │ │ │ │ │ ├── readings-count.component.css │ │ │ │ │ │ ├── readings-count.component.html │ │ │ │ │ │ └── readings-count.component.ts │ │ │ │ │ └── asset-tracker │ │ │ │ │ │ ├── asset-tracker.component.css │ │ │ │ │ │ ├── asset-tracker.component.html │ │ │ │ │ │ ├── asset-tracker.component.spec.ts │ │ │ │ │ │ └── asset-tracker.component.ts │ │ │ │ ├── toolbar │ │ │ │ │ ├── toolbar.component.css │ │ │ │ │ ├── toolbar.component.html │ │ │ │ │ ├── toolbar.component.spec.ts │ │ │ │ │ └── toolbar.component.ts │ │ │ │ └── types.ts │ │ │ ├── number-input-debounce │ │ │ │ ├── number-input-debounce.component.css │ │ │ │ ├── number-input-debounce.component.spec.ts │ │ │ │ ├── number-input-debounce.component.ts │ │ │ │ └── number-input-debounce.module.ts │ │ │ ├── pagination │ │ │ │ ├── index.ts │ │ │ │ ├── pagination.component.css │ │ │ │ ├── pagination.component.html │ │ │ │ ├── pagination.component.spec.ts │ │ │ │ ├── pagination.component.ts │ │ │ │ └── pagination.module.ts │ │ │ ├── progress-bar │ │ │ │ ├── progress-bar.component.css │ │ │ │ ├── progress-bar.component.html │ │ │ │ ├── progress-bar.component.spec.ts │ │ │ │ └── progress-bar.component.ts │ │ │ ├── quickview │ │ │ │ ├── quickview.component.css │ │ │ │ ├── quickview.component.html │ │ │ │ ├── quickview.component.spec.ts │ │ │ │ ├── quickview.component.ts │ │ │ │ └── quickview.module.ts │ │ │ ├── range-slider │ │ │ │ ├── range-slider.component.css │ │ │ │ ├── range-slider.component.html │ │ │ │ ├── range-slider.component.spec.ts │ │ │ │ ├── range-slider.component.ts │ │ │ │ ├── range-slider.service.spec.ts │ │ │ │ └── range-slider.service.ts │ │ │ ├── restart-modal │ │ │ │ ├── restart-modal.component.css │ │ │ │ ├── restart-modal.component.html │ │ │ │ ├── restart-modal.component.spec.ts │ │ │ │ └── restart-modal.component.ts │ │ │ ├── shut-down │ │ │ │ ├── shut-down.component.css │ │ │ │ ├── shut-down.component.spec.ts │ │ │ │ ├── shutdown-modal.component.html │ │ │ │ └── shutdown-modal.component.ts │ │ │ └── time-dropdown │ │ │ │ ├── time-dropdown.component.css │ │ │ │ ├── time-dropdown.component.html │ │ │ │ ├── time-dropdown.component.spec.ts │ │ │ │ └── time-dropdown.component.ts │ │ ├── core │ │ │ ├── asset-readings │ │ │ │ ├── asset-reading-summary │ │ │ │ │ ├── asset-reading-summary.component.css │ │ │ │ │ ├── asset-reading-summary.component.html │ │ │ │ │ ├── asset-reading-summary.component.spec.ts │ │ │ │ │ └── asset-reading-summary.component.ts │ │ │ │ ├── assets.module.ts │ │ │ │ ├── assets │ │ │ │ │ ├── assets.component.css │ │ │ │ │ ├── assets.component.html │ │ │ │ │ ├── assets.component.spec.ts │ │ │ │ │ ├── assets.component.ts │ │ │ │ │ └── index.ts │ │ │ │ └── readings-graph │ │ │ │ │ ├── readings-graph.component.css │ │ │ │ │ ├── readings-graph.component.html │ │ │ │ │ ├── readings-graph.component.spec.ts │ │ │ │ │ └── readings-graph.component.ts │ │ │ ├── backup-restore │ │ │ │ ├── backup-restore.component.css │ │ │ │ ├── backup-restore.component.html │ │ │ │ ├── backup-restore.component.spec.ts │ │ │ │ ├── backup-restore.component.ts │ │ │ │ ├── backup-restore.module.ts │ │ │ │ └── index.ts │ │ │ ├── certificate │ │ │ │ ├── certificate-store │ │ │ │ │ ├── certificate-store.component.css │ │ │ │ │ ├── certificate-store.component.html │ │ │ │ │ ├── certificate-store.component.spec.ts │ │ │ │ │ ├── certificate-store.component.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── certificate.module.ts │ │ │ │ └── upload-certificate │ │ │ │ │ ├── certificate-store.component.spec.ts │ │ │ │ │ ├── upload-certificate.component.css │ │ │ │ │ ├── upload-certificate.component.html │ │ │ │ │ └── upload-certificate.component.ts │ │ │ ├── configuration-manager │ │ │ │ ├── bucket-configuration │ │ │ │ │ ├── bucket-configuration.component.css │ │ │ │ │ ├── bucket-configuration.component.html │ │ │ │ │ ├── bucket-configuration.component.spec.ts │ │ │ │ │ └── bucket-configuration.component.ts │ │ │ │ ├── button-panel │ │ │ │ │ ├── button-panel.component.css │ │ │ │ │ ├── button-panel.component.html │ │ │ │ │ ├── button-panel.component.spec.ts │ │ │ │ │ └── button-panel.component.ts │ │ │ │ ├── configuration-group │ │ │ │ │ ├── configuration-group.component.css │ │ │ │ │ ├── configuration-group.component.html │ │ │ │ │ ├── configuration-group.component.spec.ts │ │ │ │ │ ├── configuration-group.component.ts │ │ │ │ │ └── tab-header-slider.ts │ │ │ │ ├── configuration-manager.component.css │ │ │ │ ├── configuration-manager.component.html │ │ │ │ ├── configuration-manager.component.spec.ts │ │ │ │ ├── configuration-manager.component.ts │ │ │ │ ├── configuration-type-validation.ts │ │ │ │ ├── configuration.module.ts │ │ │ │ ├── dynamic-group │ │ │ │ │ ├── dynamic-group.component.css │ │ │ │ │ ├── dynamic-group.component.html │ │ │ │ │ ├── dynamic-group.component.spec.ts │ │ │ │ │ └── dynamic-group.component.ts │ │ │ │ ├── index.ts │ │ │ │ ├── kv-list-type-configuration │ │ │ │ │ ├── kv-list-type-configuration.component.css │ │ │ │ │ ├── kv-list-type-configuration.component.html │ │ │ │ │ ├── kv-list-type-configuration.component.spec.ts │ │ │ │ │ └── kv-list-type-configuration.component.ts │ │ │ │ ├── kvlist-card │ │ │ │ │ ├── kvlist-card.component.css │ │ │ │ │ ├── kvlist-card.component.html │ │ │ │ │ ├── kvlist-card.component.spec.ts │ │ │ │ │ └── kvlist-card.component.ts │ │ │ │ ├── list-card │ │ │ │ │ ├── list-card.component.css │ │ │ │ │ ├── list-card.component.html │ │ │ │ │ ├── list-card.component.spec.ts │ │ │ │ │ └── list-card.component.ts │ │ │ │ ├── list-table │ │ │ │ │ ├── list-table.component.css │ │ │ │ │ ├── list-table.component.html │ │ │ │ │ ├── list-table.component.spec.ts │ │ │ │ │ └── list-table.component.ts │ │ │ │ ├── list-type-configuration │ │ │ │ │ ├── list-type-configuration.component.css │ │ │ │ │ ├── list-type-configuration.component.html │ │ │ │ │ ├── list-type-configuration.component.spec.ts │ │ │ │ │ └── list-type-configuration.component.ts │ │ │ │ ├── plugin-persist-data │ │ │ │ │ ├── plugin-persist-data.component.css │ │ │ │ │ ├── plugin-persist-data.component.html │ │ │ │ │ ├── plugin-persist-data.component.spec.ts │ │ │ │ │ ├── plugin-persist-data.component.ts │ │ │ │ │ ├── plugin-persist-data.service.spec.ts │ │ │ │ │ └── plugin-persist-data.service.ts │ │ │ │ ├── property-configuration │ │ │ │ │ ├── property-configuration.component.css │ │ │ │ │ ├── property-configuration.component.html │ │ │ │ │ ├── property-configuration.component.spec.ts │ │ │ │ │ └── property-configuration.component.ts │ │ │ │ ├── show-configuration │ │ │ │ │ ├── show-configuration.component.css │ │ │ │ │ ├── show-configuration.component.html │ │ │ │ │ ├── show-configuration.component.spec.ts │ │ │ │ │ └── show-configuration.component.ts │ │ │ │ ├── static-configuration │ │ │ │ │ ├── static-configuration.component.css │ │ │ │ │ ├── static-configuration.component.html │ │ │ │ │ └── static-configuration.component.ts │ │ │ │ ├── tab-navigation │ │ │ │ │ ├── tab-navigation.component.css │ │ │ │ │ ├── tab-navigation.component.html │ │ │ │ │ └── tab-navigation.component.ts │ │ │ │ └── toggle-switch │ │ │ │ │ ├── toggle-switch.component.css │ │ │ │ │ ├── toggle-switch.component.html │ │ │ │ │ ├── toggle-switch.component.spec.ts │ │ │ │ │ └── toggle-switch.component.ts │ │ │ ├── control-dispatcher │ │ │ │ ├── add-control-acl │ │ │ │ │ ├── add-control-acl.component.css │ │ │ │ │ ├── add-control-acl.component.html │ │ │ │ │ ├── add-control-acl.component.spec.ts │ │ │ │ │ └── add-control-acl.component.ts │ │ │ │ ├── add-control-script │ │ │ │ │ ├── add-control-script.component.css │ │ │ │ │ ├── add-control-script.component.html │ │ │ │ │ ├── add-control-script.component.spec.ts │ │ │ │ │ ├── add-control-script.component.ts │ │ │ │ │ └── add-step │ │ │ │ │ │ ├── add-configure │ │ │ │ │ │ ├── add-configure.component.css │ │ │ │ │ │ ├── add-configure.component.html │ │ │ │ │ │ ├── add-configure.component.spec.ts │ │ │ │ │ │ └── add-configure.component.ts │ │ │ │ │ │ ├── add-delay │ │ │ │ │ │ ├── add-delay.component.css │ │ │ │ │ │ ├── add-delay.component.html │ │ │ │ │ │ ├── add-delay.component.spec.ts │ │ │ │ │ │ └── add-delay.component.ts │ │ │ │ │ │ ├── add-operation │ │ │ │ │ │ ├── add-operation.component.css │ │ │ │ │ │ ├── add-operation.component.html │ │ │ │ │ │ ├── add-operation.component.spec.ts │ │ │ │ │ │ └── add-operation.component.ts │ │ │ │ │ │ ├── add-script │ │ │ │ │ │ ├── add-script.component.css │ │ │ │ │ │ ├── add-script.component.html │ │ │ │ │ │ ├── add-script.component.spec.ts │ │ │ │ │ │ └── add-script.component.ts │ │ │ │ │ │ ├── add-step-condition │ │ │ │ │ │ ├── add-step-condition.component.css │ │ │ │ │ │ ├── add-step-condition.component.html │ │ │ │ │ │ ├── add-step-condition.component.spec.ts │ │ │ │ │ │ └── add-step-condition.component.ts │ │ │ │ │ │ ├── add-step-value │ │ │ │ │ │ ├── add-step-value.component.css │ │ │ │ │ │ ├── add-step-value.component.html │ │ │ │ │ │ ├── add-step-value.component.spec.ts │ │ │ │ │ │ └── add-step-value.component.ts │ │ │ │ │ │ ├── add-step.component.css │ │ │ │ │ │ ├── add-step.component.html │ │ │ │ │ │ ├── add-step.component.spec.ts │ │ │ │ │ │ ├── add-step.component.ts │ │ │ │ │ │ └── add-write │ │ │ │ │ │ ├── add-write.component.css │ │ │ │ │ │ ├── add-write.component.html │ │ │ │ │ │ ├── add-write.component.spec.ts │ │ │ │ │ │ └── add-write.component.ts │ │ │ │ ├── api-flow │ │ │ │ │ ├── add-edit-api-flow │ │ │ │ │ │ ├── add-edit-api-flow.component.css │ │ │ │ │ │ ├── add-edit-api-flow.component.html │ │ │ │ │ │ ├── add-edit-api-flow.component.spec.ts │ │ │ │ │ │ └── add-edit-api-flow.component.ts │ │ │ │ │ ├── api-flow.component.css │ │ │ │ │ ├── api-flow.component.html │ │ │ │ │ ├── api-flow.component.spec.ts │ │ │ │ │ └── api-flow.component.ts │ │ │ │ ├── control-dispatcher.module.ts │ │ │ │ ├── control-schedule-task │ │ │ │ │ ├── control-schedule-task-details.component.css │ │ │ │ │ ├── control-schedule-task-details.component.html │ │ │ │ │ ├── control-schedule-task-details.component.spec.ts │ │ │ │ │ └── control-schedule-task-details.component.ts │ │ │ │ ├── control-utils.service.ts │ │ │ │ ├── list-control-dispatcher │ │ │ │ │ ├── acl-list │ │ │ │ │ │ ├── acl-list.component.css │ │ │ │ │ │ ├── acl-list.component.html │ │ │ │ │ │ ├── acl-list.component.spec.ts │ │ │ │ │ │ └── acl-list.component.ts │ │ │ │ │ ├── control-scripts-list │ │ │ │ │ │ ├── control-scripts-list.component.css │ │ │ │ │ │ ├── control-scripts-list.component.html │ │ │ │ │ │ ├── control-scripts-list.component.spec.ts │ │ │ │ │ │ └── control-scripts-list.component.ts │ │ │ │ │ └── control-tasks-list │ │ │ │ │ │ ├── control-tasks-list.component.css │ │ │ │ │ │ ├── control-tasks-list.component.html │ │ │ │ │ │ ├── control-tasks-list.component.spec.ts │ │ │ │ │ │ └── control-tasks-list.component.ts │ │ │ │ └── pipelines │ │ │ │ │ ├── add-pipeline-filter │ │ │ │ │ ├── add-pipeline-filter.component.css │ │ │ │ │ ├── add-pipeline-filter.component.html │ │ │ │ │ ├── add-pipeline-filter.component.spec.ts │ │ │ │ │ └── add-pipeline-filter.component.ts │ │ │ │ │ ├── add-pipeline │ │ │ │ │ ├── add-control-pipeline.component.css │ │ │ │ │ ├── add-control-pipeline.component.html │ │ │ │ │ ├── add-control-pipeline.component.spec.ts │ │ │ │ │ └── add-control-pipeline.component.ts │ │ │ │ │ ├── control-pipelines.component.css │ │ │ │ │ ├── control-pipelines.component.html │ │ │ │ │ ├── control-pipelines.component.spec.ts │ │ │ │ │ └── control-pipelines.component.ts │ │ │ ├── dashboard │ │ │ │ ├── dashboard.component.css │ │ │ │ ├── dashboard.component.html │ │ │ │ ├── dashboard.component.spec.ts │ │ │ │ ├── dashboard.component.ts │ │ │ │ ├── dashboard.module.ts │ │ │ │ └── index.ts │ │ │ ├── developer │ │ │ │ ├── additional-services │ │ │ │ │ ├── additional-service-modal │ │ │ │ │ │ ├── additional-service-modal.component.css │ │ │ │ │ │ ├── additional-service-modal.component.html │ │ │ │ │ │ ├── additional-service-modal.component.spec.ts │ │ │ │ │ │ └── additional-service-modal.component.ts │ │ │ │ │ ├── additional-services-context-menu │ │ │ │ │ │ ├── additional-services-context-menu.component.css │ │ │ │ │ │ ├── additional-services-context-menu.component.html │ │ │ │ │ │ ├── additional-services-context-menu.component.spec.ts │ │ │ │ │ │ └── additional-services-context-menu.component.ts │ │ │ │ │ ├── additional-services-utils.service.ts │ │ │ │ │ ├── list-additional-services.component.css │ │ │ │ │ ├── list-additional-services.component.html │ │ │ │ │ ├── list-additional-services.component.spec.ts │ │ │ │ │ └── list-additional-services.component.ts │ │ │ │ ├── developer.module.ts │ │ │ │ ├── packages │ │ │ │ │ ├── install-python-package │ │ │ │ │ │ ├── install-python-package.component.css │ │ │ │ │ │ ├── install-python-package.component.html │ │ │ │ │ │ ├── install-python-package.component.spec.ts │ │ │ │ │ │ └── install-python-package.component.ts │ │ │ │ │ └── list-python-packages │ │ │ │ │ │ ├── list-python-packages.component.css │ │ │ │ │ │ ├── list-python-packages.component.html │ │ │ │ │ │ ├── list-python-packages.component.spec.ts │ │ │ │ │ │ └── list-python-packages.component.ts │ │ │ │ └── perfmon │ │ │ │ │ └── list │ │ │ │ │ ├── table.component.html │ │ │ │ │ └── table.component.ts │ │ │ ├── filter │ │ │ │ ├── add-filter-wizard │ │ │ │ │ ├── add-filter-wizard.component.css │ │ │ │ │ ├── add-filter-wizard.component.html │ │ │ │ │ ├── add-filter-wizard.component.spec.ts │ │ │ │ │ └── add-filter-wizard.component.ts │ │ │ │ ├── filter-alert │ │ │ │ │ ├── filter-alert.component.css │ │ │ │ │ ├── filter-alert.component.html │ │ │ │ │ ├── filter-alert.component.spec.ts │ │ │ │ │ └── filter-alert.component.ts │ │ │ │ ├── filter-list │ │ │ │ │ ├── filter-list.component.css │ │ │ │ │ ├── filter-list.component.html │ │ │ │ │ ├── filter-list.component.spec.ts │ │ │ │ │ └── filter-list.component.ts │ │ │ │ └── filter.module.ts │ │ │ ├── logs │ │ │ │ ├── audit-log │ │ │ │ │ ├── audit-log.component.css │ │ │ │ │ ├── audit-log.component.html │ │ │ │ │ ├── audit-log.component.spec.ts │ │ │ │ │ ├── audit-log.component.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── logs.module.ts │ │ │ │ ├── notification-log │ │ │ │ │ ├── notification-log.component.css │ │ │ │ │ ├── notification-log.component.html │ │ │ │ │ ├── notification-log.component.spec.ts │ │ │ │ │ └── notification-log.component.ts │ │ │ │ ├── packages-log │ │ │ │ │ ├── packages-log.component.css │ │ │ │ │ ├── packages-log.component.html │ │ │ │ │ ├── packages-log.component.spec.ts │ │ │ │ │ ├── packages-log.component.ts │ │ │ │ │ └── view-logs │ │ │ │ │ │ ├── view-logs.component.css │ │ │ │ │ │ ├── view-logs.component.html │ │ │ │ │ │ ├── view-logs.component.spec.ts │ │ │ │ │ │ └── view-logs.component.ts │ │ │ │ ├── system-log │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── system-log.component.css │ │ │ │ │ ├── system-log.component.html │ │ │ │ │ ├── system-log.component.spec.ts │ │ │ │ │ └── system-log.component.ts │ │ │ │ └── tasks │ │ │ │ │ ├── tasks.component.css │ │ │ │ │ ├── tasks.component.html │ │ │ │ │ ├── tasks.component.spec.ts │ │ │ │ │ └── tasks.component.ts │ │ │ ├── north │ │ │ │ ├── add-task-wizard │ │ │ │ │ ├── add-task-wizard.component.css │ │ │ │ │ ├── add-task-wizard.component.html │ │ │ │ │ ├── add-task-wizard.component.spec.ts │ │ │ │ │ └── add-task-wizard.component.ts │ │ │ │ ├── north-task-modal │ │ │ │ │ ├── north-task-modal.component.css │ │ │ │ │ ├── north-task-modal.component.html │ │ │ │ │ ├── north-task-modal.component.spec.ts │ │ │ │ │ └── north-task-modal.component.ts │ │ │ │ ├── north-task.ts │ │ │ │ ├── north.component.css │ │ │ │ ├── north.component.html │ │ │ │ ├── north.component.spec.ts │ │ │ │ ├── north.component.ts │ │ │ │ ├── north.module.ts │ │ │ │ └── task-schedule │ │ │ │ │ ├── task-schedule.component.css │ │ │ │ │ ├── task-schedule.component.html │ │ │ │ │ ├── task-schedule.component.spec.ts │ │ │ │ │ └── task-schedule.component.ts │ │ │ ├── notifications │ │ │ │ ├── add-notification-wizard │ │ │ │ │ ├── add-notification-wizard.component.css │ │ │ │ │ ├── add-notification-wizard.component.html │ │ │ │ │ ├── add-notification-wizard.component.spec.ts │ │ │ │ │ └── add-notification-wizard.component.ts │ │ │ │ ├── notification-modal │ │ │ │ │ ├── notification-modal.component.css │ │ │ │ │ ├── notification-modal.component.html │ │ │ │ │ ├── notification-modal.component.spec.ts │ │ │ │ │ └── notification-modal.component.ts │ │ │ │ ├── notification.ts │ │ │ │ ├── notifications.component.css │ │ │ │ ├── notifications.component.html │ │ │ │ ├── notifications.component.spec.ts │ │ │ │ ├── notifications.component.ts │ │ │ │ ├── notifications.module.ts │ │ │ │ ├── service-config │ │ │ │ │ ├── service-config.component.css │ │ │ │ │ ├── service-config.component.html │ │ │ │ │ ├── service-config.component.spec.ts │ │ │ │ │ └── service-config.component.ts │ │ │ │ └── service-warning │ │ │ │ │ ├── service-warning.component.css │ │ │ │ │ ├── service-warning.component.html │ │ │ │ │ ├── service-warning.component.spec.ts │ │ │ │ │ └── service-warning.component.ts │ │ │ ├── plugin-modal │ │ │ │ ├── plugin-modal.component.css │ │ │ │ ├── plugin-modal.component.html │ │ │ │ ├── plugin-modal.component.spec.ts │ │ │ │ └── plugin-modal.component.ts │ │ │ ├── scheduler │ │ │ │ ├── list-schedules │ │ │ │ │ ├── list-schedules.component.css │ │ │ │ │ ├── list-schedules.component.html │ │ │ │ │ ├── list-schedules.component.spec.ts │ │ │ │ │ └── list-schedules.component.ts │ │ │ │ ├── schedule.ts │ │ │ │ ├── scheduler.module.ts │ │ │ │ └── update-schedule │ │ │ │ │ ├── schedule-type.resolver.ts │ │ │ │ │ ├── update-schedule.component.css │ │ │ │ │ ├── update-schedule.component.html │ │ │ │ │ ├── update-schedule.component.spec.ts │ │ │ │ │ └── update-schedule.component.ts │ │ │ ├── service-discovery │ │ │ │ ├── index.ts │ │ │ │ ├── service-discovery.component.css │ │ │ │ ├── service-discovery.component.html │ │ │ │ ├── service-discovery.component.spec.ts │ │ │ │ └── service-discovery.component.ts │ │ │ ├── settings │ │ │ │ ├── index.ts │ │ │ │ ├── settings.component.css │ │ │ │ ├── settings.component.html │ │ │ │ ├── settings.component.spec.ts │ │ │ │ └── settings.component.ts │ │ │ ├── south │ │ │ │ ├── add-service-wizard │ │ │ │ │ ├── add-service-wizard.component.css │ │ │ │ │ ├── add-service-wizard.component.html │ │ │ │ │ ├── add-service-wizard.component.spec.ts │ │ │ │ │ └── add-service-wizard.component.ts │ │ │ │ ├── south-service-modal │ │ │ │ │ ├── south-service-modal.component.css │ │ │ │ │ ├── south-service-modal.component.html │ │ │ │ │ ├── south-service-modal.component.spec.ts │ │ │ │ │ └── south-service-modal.component.ts │ │ │ │ ├── south-service.ts │ │ │ │ ├── south.component.css │ │ │ │ ├── south.component.html │ │ │ │ ├── south.component.spec.ts │ │ │ │ ├── south.component.ts │ │ │ │ └── south.module.ts │ │ │ ├── support │ │ │ │ ├── index.ts │ │ │ │ ├── support.component.css │ │ │ │ ├── support.component.html │ │ │ │ ├── support.component.spec.ts │ │ │ │ ├── support.component.ts │ │ │ │ └── support.module.ts │ │ │ ├── system-alert │ │ │ │ ├── system-alert.component.css │ │ │ │ ├── system-alert.component.html │ │ │ │ ├── system-alert.component.spec.ts │ │ │ │ ├── system-alert.component.ts │ │ │ │ └── system-alert.module.ts │ │ │ └── user-management │ │ │ │ ├── create-user │ │ │ │ ├── create-user.component.css │ │ │ │ ├── create-user.component.html │ │ │ │ ├── create-user.component.spec.ts │ │ │ │ └── create-user.component.ts │ │ │ │ ├── index.ts │ │ │ │ ├── reset-password │ │ │ │ ├── reset-password.component.css │ │ │ │ ├── reset-password.component.html │ │ │ │ ├── reset-password.component.spec.ts │ │ │ │ └── reset-password.component.ts │ │ │ │ ├── update-user │ │ │ │ ├── update-user.component.css │ │ │ │ ├── update-user.component.html │ │ │ │ ├── update-user.component.spec.ts │ │ │ │ └── update-user.component.ts │ │ │ │ ├── user-management.component.css │ │ │ │ ├── user-management.component.html │ │ │ │ ├── user-management.component.spec.ts │ │ │ │ ├── user-management.component.ts │ │ │ │ ├── user-profile │ │ │ │ ├── user-profile.component.css │ │ │ │ ├── user-profile.component.html │ │ │ │ ├── user-profile.component.spec.ts │ │ │ │ └── user-profile.component.ts │ │ │ │ └── user.management.module.ts │ │ └── layout │ │ │ ├── certificate-base-login │ │ │ ├── certificate-base-login.component.css │ │ │ ├── certificate-base-login.component.html │ │ │ ├── certificate-base-login.component.spec.ts │ │ │ ├── certificate-base-login.component.ts │ │ │ └── index.ts │ │ │ ├── footer │ │ │ ├── footer.component.css │ │ │ ├── footer.component.html │ │ │ ├── footer.component.spec.ts │ │ │ ├── footer.component.ts │ │ │ └── index.ts │ │ │ ├── login │ │ │ ├── index.ts │ │ │ ├── login.component.css │ │ │ ├── login.component.html │ │ │ ├── login.component.spec.ts │ │ │ └── login.component.ts │ │ │ ├── navbar │ │ │ ├── navbar.component.css │ │ │ ├── navbar.component.html │ │ │ ├── navbar.component.spec.ts │ │ │ └── navbar.component.ts │ │ │ └── side-menu │ │ │ ├── index.ts │ │ │ ├── side-menu.component.css │ │ │ ├── side-menu.component.html │ │ │ ├── side-menu.component.spec.ts │ │ │ └── side-menu.component.ts │ ├── directives │ │ ├── access-control.directive.ts │ │ ├── custom-json-validator.directive.ts │ │ ├── custom-max-validator.directive.ts │ │ ├── custom-min-validator.directive.ts │ │ ├── custom-validator.ts │ │ ├── directives.module.ts │ │ ├── disable-until-response.directive.ts │ │ ├── empty-space-validator.directive.ts │ │ ├── equal-validator.directive.ts │ │ ├── float-only.directive.ts │ │ ├── index.ts │ │ ├── input-mask.directive.ts │ │ ├── input-trim.directive.ts │ │ ├── integer-only.directive.ts │ │ ├── max-length.directive.ts │ │ └── number-only.directive.ts │ ├── guards │ │ ├── access.guard.ts │ │ ├── admin.guard.ts │ │ ├── auth-required.guard.ts │ │ ├── authenticated-user.guard.ts │ │ ├── can-deactivate │ │ │ └── can-deactivate.guard.ts │ │ ├── data-view-role.guard.ts │ │ ├── developer.guard.ts │ │ ├── index.ts │ │ └── roles.gurad.ts │ ├── microfrontend │ │ ├── lookup.service.ts │ │ └── microfrontend.ts │ ├── models │ │ ├── available-services.ts │ │ ├── control │ │ │ └── api-flow.ts │ │ ├── index.ts │ │ ├── schedules.ts │ │ ├── service.ts │ │ ├── system-alert.ts │ │ └── user.ts │ ├── pipes │ │ ├── date-formatter-pipe.ts │ │ ├── filter.ts │ │ ├── index.ts │ │ ├── keys.ts │ │ ├── pipes.module.ts │ │ ├── search.pipe.ts │ │ ├── truncate-middle-of-text.pipe.ts │ │ └── truncate.pipe.ts │ ├── services │ │ ├── acl.service.spec.ts │ │ ├── acl.service.ts │ │ ├── alert.service.ts │ │ ├── assets.service.spec.ts │ │ ├── assets.service.ts │ │ ├── audit.service.spec.ts │ │ ├── audit.service.ts │ │ ├── auth.service.ts │ │ ├── backup-restore.service.spec.ts │ │ ├── backup-restore.service.ts │ │ ├── certificate.service.ts │ │ ├── configuration-control.service.spec.ts │ │ ├── configuration-control.service.ts │ │ ├── configuration.service.spec.ts │ │ ├── configuration.service.ts │ │ ├── connected-service-status.service.ts │ │ ├── control-api-flow.service.spec.ts │ │ ├── control-api-flow.service.ts │ │ ├── control-dispatcher.service.spec.ts │ │ ├── control-dispatcher.service.ts │ │ ├── control-pipelines.service.spec.ts │ │ ├── control-pipelines.service.ts │ │ ├── developer-features.service.ts │ │ ├── discovery.service.spec.ts │ │ ├── discovery.service.ts │ │ ├── doc.service.ts │ │ ├── file-import.service.spec.ts │ │ ├── file-import.service.ts │ │ ├── file-uploader.service.ts │ │ ├── filter.service.spec.ts │ │ ├── filter.service.ts │ │ ├── generate-csv.service.spec.ts │ │ ├── generate-csv.service.ts │ │ ├── http.request.interceptor.ts │ │ ├── index.ts │ │ ├── north.service.ts │ │ ├── notifications.service.spec.ts │ │ ├── notifications.service.ts │ │ ├── package-manager.service.spec.ts │ │ ├── package-manager.service.ts │ │ ├── packages-log.service.spec.ts │ │ ├── packages-log.service.ts │ │ ├── perfmon.service.ts │ │ ├── ping.service.spec.ts │ │ ├── ping.service.ts │ │ ├── plugin.service.ts │ │ ├── progress-bar.service.spec.ts │ │ ├── progress-bar.service.ts │ │ ├── response-handler.service.ts │ │ ├── roles.service.ts │ │ ├── schedules.service.spec.ts │ │ ├── schedules.service.ts │ │ ├── services-api.service.spec.ts │ │ ├── services-api.service.ts │ │ ├── shared.service.ts │ │ ├── statistics.service.spec.ts │ │ ├── statistics.service.ts │ │ ├── storage.service.ts │ │ ├── support.service.spec.ts │ │ ├── support.service.ts │ │ ├── system-alert.service.spec.ts │ │ ├── system-alert.service.ts │ │ ├── system-log.service.spec.ts │ │ ├── system-log.service.ts │ │ ├── timezone.service.ts │ │ ├── toast.service.ts │ │ ├── user.service.spec.ts │ │ └── user.service.ts │ ├── shared.module.ts │ └── utils.ts ├── assets │ ├── .gitkeep │ ├── favicon.ico │ ├── fledge.png │ ├── icons │ │ └── svg │ │ │ ├── control-dispatch.svg │ │ │ ├── north-icon.svg │ │ │ └── south-icon.svg │ └── routes.json ├── bootstrap.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── fledge.html ├── main.ts ├── menu-utils.ts ├── polyfills.ts ├── styles.css ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── typings.d.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json ├── tslint.json ├── webpack.config.js ├── webpack.prod.config.js └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | # Browsers that we support 2 | 3 | last 2 Chrome versions 4 | 5 | last 2 Safari versions 6 | 7 | last 2 Firefox versions 8 | 9 | last 2 Edge versions 10 | 11 | iOS >=15 -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Long story short 2 | 3 | 4 | 5 | ## Expected behaviour 6 | 7 | 8 | 9 | ## Actual behaviour 10 | 11 | 12 | 13 | ## Steps to reproduce 14 | 15 | 17 | 18 | ## Your environment 19 | 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## What do these changes do? 4 | 5 | 6 | 7 | ## Are there changes in behavior for the user? 8 | 9 | 10 | 11 | ## Related issue number 12 | 13 | 14 | 15 | ## Checklist 16 | 17 | - [ ] Code is well written w.r.t. best practices and proper comments 18 | - [ ] Unit tests for the changes exist 19 | - [ ] e2e tests for the changes exist 20 | - [ ] Documentation reflects the changes including changelog 21 | - [ ] Build works with nginx-light deployment 22 | - [ ] Build works with Docker, if any change on docker related config files 23 | 24 | 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /out-tsc 6 | .angular 7 | *.tar.gz 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/ 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | testem.log 35 | yarn-error.log 36 | /typings 37 | 38 | # e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | /e2e/reports/* 42 | /cypress/* 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | 48 | # Debian build packages 49 | packages/build/ 50 | 51 | # git-version file 52 | src/git-version.json 53 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | network-timeout 600000 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Fledge 2 | 3 | The Fledge project welcomes contributions of any kind, please see [CONTRIBUTING.md](https://github.com/fledge-iot/fledge/blob/develop/CONTRIBUTING.md) in the main Fledge repository for details and guidance. 4 | -------------------------------------------------------------------------------- /cypress.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'cypress' 2 | 3 | export default defineConfig({ 4 | reporter: 'cypress-multi-reporters', 5 | reporterOptions: { 6 | configFile: 'reporter-config.json', 7 | }, 8 | e2e: { 9 | 'baseUrl': 'http://localhost:4200', 10 | supportFile: false, 11 | specPattern: [ 12 | './e2e/**/*.e2e-*.ts' 13 | ], 14 | setupNodeEvents(on) { 15 | require('cypress-mochawesome-reporter/plugin')(on); 16 | }, 17 | }, 18 | 19 | viewportWidth: 1600, 20 | viewportHeight: 900, 21 | defaultCommandTimeout: 11000, 22 | }) -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "sourceMap": false, 6 | "types": ["cypress"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dco-signoffs/AshishJabble-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Ashish Jabble hereby sign-off-by all my past commits to this repository 2 | subject to the Developer Certificate of Origin (DCO), Version 1,1. In 3 | the past I have used emails: ashish@dianomic.com 4 | -------------------------------------------------------------------------------- /dco-signoffs/AshwinGopalakrishnan-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Ashwin Gopalakrishnan hereby sign-off-by all my past commits to this repository 2 | subject tothe Developer Certificate of Origin (DCO), Version 1,1. In 3 | the past I have used emails: ashwin@dianomic.com 4 | -------------------------------------------------------------------------------- /dco-signoffs/BillHunt-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Bill Hunt hereby sign-off-by all of my past commits to this repo subject to 2 | the Developer Certificate of Origin (DCO), Version 1.1. In the past I have 3 | used emails: bill@dianomic.com, bill@thomlex.com 4 | -------------------------------------------------------------------------------- /dco-signoffs/MarkRiddoch-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Mark Riddoch hereby sign-off-by all my past commits to this repository 2 | subject tothe Developer Certificate of Origin (DCO), Version 1,1. In 3 | the past I have used emails: mark@dianomic.com 4 | -------------------------------------------------------------------------------- /dco-signoffs/MohdShariq-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Mohd Shariq, hereby sign-off-by all my past commits to this repository 2 | subject to the Developer Certificate of Origin (DCO), Version 1,1. In the past, 3 | I have used emails: mohd.shariq@nerdapplabs.com, mshariqaftab@gmail.com 4 | -------------------------------------------------------------------------------- /dco-signoffs/MonikaSharma-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Monika Sharma, hereby sign-off-by all my past commits to this repository 2 | subject to the Developer Certificate of Origin (DCO), Version 1.1. In 3 | the past I have used emails: monika@dianomic.com, monika.sharma@nerdapplabs.com 4 | -------------------------------------------------------------------------------- /dco-signoffs/PraveenGarg-dco-signoff.txt: -------------------------------------------------------------------------------- 1 | I, Praveen Garg, hereby sign-off-by all my past commits to this repository 2 | subject to the Developer Certificate of Origin (DCO), Version 1,1. In 3 | the past I have used emails: praveen.garg@nerdapplabs.com 4 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Run docker-compose build 2 | # Run docker-compose up 3 | 4 | version: '3.1' 5 | 6 | services: 7 | 8 | fledge: 9 | container_name: fledge-gui 10 | image: nginx 11 | build: 12 | context: . 13 | dockerfile: nginx.dockerfile 14 | ports: 15 | - "8080:80" 16 | # - "443:443" 17 | 18 | networks: 19 | - app-network 20 | 21 | networks: 22 | app-network: 23 | driver: bridge 24 | -------------------------------------------------------------------------------- /docker/nginx-docker.conf: -------------------------------------------------------------------------------- 1 | worker_processes 4; 2 | 3 | events { worker_connections 1024; } 4 | 5 | http { 6 | include /etc/nginx/mime.types; 7 | 8 | server { 9 | root /usr/share/nginx/html/; 10 | 11 | server_name localhost; 12 | 13 | sendfile on; 14 | 15 | location / { 16 | index fledge.html; 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/docker-readme.md: -------------------------------------------------------------------------------- 1 | ## Installation 2 | 3 | ### Mac & Windows 4 | 5 | Install Docker CE for Mac and Windows (http://docker.com) 6 | 7 | ### Ubuntu 8 | 9 | To install Docker CE follow the instructions given here: 10 | 11 | https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ 12 | 13 | #### Install docker-compose 14 | 15 | ``` 16 | $ sudo apt install docker-compose 17 | ``` 18 | ### Run app 19 | 20 | > Make sure to run `./build` to make sure docker container can load build artificats from `dist` directory 21 | 22 | ``` 23 | $ docker-compose build 24 | $ docker-compose up 25 | ``` 26 | 27 | > To run in deamon mode: `docker-compose up -d` 28 | 29 | Navigate to http://localhost:8080 30 | 31 | ### Stopping docker-compose 32 | ``` 33 | $ docker-compose down 34 | ``` 35 | -------------------------------------------------------------------------------- /docs/prerequisite-macos.md: -------------------------------------------------------------------------------- 1 | ## Prerequisite to setup Fledge UI Client 2 | 3 | ### Node 4 | 5 | https://nodejs.org/en/download/ 6 | 7 | ### Install yarn 8 | 9 | `$ brew install yarn` 10 | 11 | OR 12 | 13 | `$ sudo npm install --global yarn` 14 | -------------------------------------------------------------------------------- /docs/prerequisite-redhat.md: -------------------------------------------------------------------------------- 1 | 2 | ## Prerequisite to setup Fledge UI Client on CentOS Stream/RHEL 3 | 4 | ### Node 5 | 6 | Install nodejs (LTS version) 7 | 8 | ``` 9 | $ yum install -y gcc-c++ make 10 | $ curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash - 11 | $ sudo yum install nodejs 12 | ``` 13 | 14 | ### Install yarn 15 | 16 | `$ sudo npm install -g yarn` 17 | 18 | -------------------------------------------------------------------------------- /docs/prerequisite-ubuntu.md: -------------------------------------------------------------------------------- 1 | ## Prerequisite to setup Fledge UI Client 2 | 3 | ### Node 4 | 5 | Install nodejs (LTS version) 6 | 7 | ``` 8 | $ curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - 9 | $ sudo apt-get install nodejs 10 | ``` 11 | 12 | ### Install yarn 13 | 14 | `$ sudo npm install -g yarn` 15 | -------------------------------------------------------------------------------- /docs/prerequisite-windows.md: -------------------------------------------------------------------------------- 1 | ## Prerequisite to setup Fledge UI Client 2 | 3 | ### Node 4 | 5 | https://nodejs.org/en/download/ 6 | 7 | ### Install yarn 8 | 9 | https://yarnpkg.com/en/docs/install#windows-stable 10 | 11 | 12 | ### Install angular CLI (globally) 13 | 14 | `npm install @angular/cli -g` 15 | 16 | https://cli.angular.io/ 17 | -------------------------------------------------------------------------------- /e2e/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | HOST: 'localhost', 3 | SERVICE_PORT: '8081', 4 | AUTH_OPTIONAL: false 5 | }; 6 | -------------------------------------------------------------------------------- /e2e/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | sudo DEBIAN_FRONTEND=noninteractive apt install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb 3 | 4 | yarn 5 | 6 | ELECTRON_RUN_AS_NODE=1; yarn e2e --browser chrome; 7 | #Xvfb :1 -screen 0 1280x800x24 & export DISPLAY=:1; yarn e2e 8 | -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /extra-webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require("webpack"); 2 | const LodashModuleReplacementPlugin = require('lodash-webpack-plugin'); 3 | 4 | const webpackConfig = { 5 | resolve: { 6 | alias: { 7 | // 'lodash-es': 'lodash' 8 | } 9 | }, 10 | plugins: [ 11 | new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/), 12 | // new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/) 13 | new LodashModuleReplacementPlugin() 14 | ] 15 | } 16 | 17 | module.exports = webpackConfig 18 | -------------------------------------------------------------------------------- /git-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | create_git_version_info_json () { 4 | > src/git-version.json 5 | echo '{"hash": ""}' >> src/git-version.json 6 | } 7 | 8 | DIR=".git" 9 | if [ ! -d "$DIR" ]; then 10 | echo 'WARNING: This is not a git repository!' >&2 11 | create_git_version_info_json 12 | exit 0; 13 | fi 14 | 15 | if ! [ -x "$(command -v git)" ]; then 16 | echo 'WARNING: git is not installed!' >&2 17 | create_git_version_info_json 18 | else 19 | v=$(git --version) 20 | echo $v 21 | if [[ $v == "git version 2"* ]]; then 22 | node grab-git-info 23 | else 24 | create_git_version_info_json 25 | fi 26 | fi 27 | -------------------------------------------------------------------------------- /grab-git-info.js: -------------------------------------------------------------------------------- 1 | const { gitDescribe } = require('git-describe'); 2 | const { writeFileSync } = require('fs'); 3 | const path = require('path'); 4 | 5 | const file = path.join(__dirname, 'src/git-version.json'); 6 | gitDescribe(__dirname, { 7 | longSemver: true, 8 | dirtySemver: false, 9 | }) 10 | .then((gitInfo) => { 11 | const infoJson = JSON.stringify(gitInfo, null, 2); 12 | writeFileSync(file, infoJson); 13 | }) 14 | .catch((err) => { 15 | console.error(err)} 16 | ); 17 | 18 | -------------------------------------------------------------------------------- /nginx.dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | LABEL author="Mohd. Shariq" 4 | 5 | COPY ./dist/ /usr/share/nginx/html/ 6 | COPY ./docker/nginx-docker.conf /etc/nginx/nginx.conf 7 | 8 | EXPOSE 8080 9 | 10 | ENTRYPOINT ["nginx", "-g", "daemon off;"] 11 | -------------------------------------------------------------------------------- /packages/Debian/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: fledge-gui 2 | Version: 0.0.0 3 | Section: devel 4 | Priority: optional 5 | Architecture: all 6 | Depends: nginx-light 7 | Conflicts: 8 | Maintainer: Dianomic Systems Inc. 9 | Homepage: http://www.dianomic.com 10 | Description: Fledge GUI 11 | -------------------------------------------------------------------------------- /reporter-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "reporterEnabled" : "cypress-junit-reporter, cypress-mochawesome-reporter", 3 | "cypressJunitReporterReporterOptions" : {"mochaFile": "e2e/reports/xml/[hash].xml"}, 4 | "cypressMochawesomeReporterReporterOptions" : {"reportDir": "e2e/reports/html"} 5 | } -------------------------------------------------------------------------------- /requirements-test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Install Node v18 that is required to run e2e test on cypress" 4 | set -e 5 | 6 | isNodeInstalled=`which node` && currentNodeVer=`node -v` || echo '' 7 | requiredNodeVer="v18" 8 | # Check if Node.js is not installed or the installed version is lesser than the ${requiredNodeVer} 9 | if [[ "$isNodeInstalled" = "" ]] || [[ "$(printf '%s\n' "$requiredNodeVer" "$currentNodeVer" | sort -V | head -n1)" != "$requiredNodeVer" ]]; then 10 | curl -L https://deb.nodesource.com/setup_18.x | sudo -E bash - 11 | sudo apt install -y nodejs 12 | fi -------------------------------------------------------------------------------- /src/app/components/common/alert-dialog/alert-dailog.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AlertDialogComponent } from './alert-dialog.component'; 4 | 5 | describe('AlertDialogComponent', () => { 6 | let component: AlertDialogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AlertDialogComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AlertDialogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/alert-dialog/alert-dialog.component.css: -------------------------------------------------------------------------------- 1 | .modal-card-body { 2 | padding: 2rem 1.5rem; 3 | } -------------------------------------------------------------------------------- /src/app/components/common/alert-dialog/alert-dialog.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 4 | 5 | import { AlertDialogComponent } from './alert-dialog.component'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | AlertDialogComponent 10 | ], 11 | imports: [ 12 | ReactiveFormsModule, 13 | FormsModule, 14 | CommonModule 15 | ], 16 | providers: [], 17 | exports: [AlertDialogComponent] 18 | }) 19 | export class AlertDialogModule {} 20 | -------------------------------------------------------------------------------- /src/app/components/common/alert/alert.component.css: -------------------------------------------------------------------------------- 1 | #alert { 2 | position: fixed; 3 | padding: 1.5em; 4 | bottom: 0.1%; 5 | right: 0.1%; 6 | z-index: 9999999; 7 | } 8 | 9 | .delete { 10 | margin-top: 5px; 11 | margin-right: 5px; 12 | position: absolute; 13 | top: 0; 14 | right: 0; 15 | } -------------------------------------------------------------------------------- /src/app/components/common/alert/alert.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AlertComponent } from './alert.component'; 4 | 5 | describe('AlertComponent', () => { 6 | let component: AlertComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AlertComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AlertComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/chart/chart.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ChartComponent } from './chart.component'; 4 | 5 | describe('ChartComponent', () => { 6 | let component: ChartComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ChartComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ChartComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/chart/chart.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { ChartComponent } from './chart.component'; 4 | 5 | @NgModule({ 6 | declarations: [ ChartComponent ], 7 | exports: [ ChartComponent ] 8 | }) 9 | export class ChartModule { 10 | constructor() { } 11 | } 12 | -------------------------------------------------------------------------------- /src/app/components/common/chart/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chart.component'; 2 | export * from './chart.module'; 3 | -------------------------------------------------------------------------------- /src/app/components/common/confirmation-dialog/confirmation-dialog.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/common/confirmation-dialog/confirmation-dialog.component.css -------------------------------------------------------------------------------- /src/app/components/common/confirmation-dialog/confirmation-dialog.component.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/app/components/common/confirmation-dialog/confirmation-dialog.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ConfirmationDialogComponent } from './confirmation-dialog.component'; 4 | 5 | describe('ConfirmationDialogComponent', () => { 6 | let component: ConfirmationDialogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ConfirmationDialogComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ConfirmationDialogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/confirmation-dialog/dialog.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { DialogService } from './dialog.service'; 4 | 5 | describe('DialogService', () => { 6 | let service: DialogService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(DialogService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/components/common/file-export-modal/file-export-modal.component.css: -------------------------------------------------------------------------------- 1 | .modal-card-body { 2 | overflow: visible; 3 | } 4 | 5 | .modal-card-head { 6 | padding: 12px !important; 7 | border-top-left-radius: 3px; 8 | border-top-right-radius: 3px; 9 | } -------------------------------------------------------------------------------- /src/app/components/common/file-export-modal/file-export-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FileExportModalComponent } from './file-export-modal.component'; 4 | 5 | describe('FileExportModalComponent', () => { 6 | let component: FileExportModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [FileExportModalComponent] 12 | }); 13 | fixture = TestBed.createComponent(FileExportModalComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/common/file-import-modal/file-import-modal.component.css: -------------------------------------------------------------------------------- 1 | .invalid { 2 | display: block; 3 | font-size: 0.75rem; 4 | } 5 | 6 | .error { 7 | border: 1px solid #f14668; 8 | border-radius: 6px; 9 | } -------------------------------------------------------------------------------- /src/app/components/common/file-import-modal/file-import-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FileImportModalComponent } from './file-import-modal.component'; 4 | 5 | describe('FileImportModalComponent', () => { 6 | let component: FileImportModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [FileImportModalComponent] 12 | }); 13 | fixture = TestBed.createComponent(FileImportModalComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/common/file-upload-modal/file-upload-modal.component.css: -------------------------------------------------------------------------------- 1 | .modal-card-body { 2 | padding: 2rem 1.5rem; 3 | } 4 | 5 | .file-name { 6 | max-width: 20rem !important; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/common/file-upload-modal/file-upload-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FileUploadModalComponent } from './file-upload-modal.component'; 4 | 5 | describe('FileUploadModalComponent', () => { 6 | let component: FileUploadModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ FileUploadModalComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FileUploadModalComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/color-palette.ts: -------------------------------------------------------------------------------- 1 | export const colors = [ 2 | '#fad5af', 3 | '#f6b26c', 4 | '#fad8b4', 5 | '#f5a554', 6 | '#e0b68c', 7 | '#c7a27c', 8 | '#ae8e6d', 9 | '#95795d', 10 | '#7c654e', 11 | ] -------------------------------------------------------------------------------- /src/app/components/common/node-editor/connection.ts: -------------------------------------------------------------------------------- 1 | import { CurveFactory } from 'd3-shape'; 2 | import { Filter, North, Notification, South } from './nodes'; 3 | import { ClassicPreset } from 'rete'; 4 | 5 | type Node = South | North | Filter | Notification; 6 | export class Connection extends ClassicPreset.Connection { 7 | selected?: boolean 8 | click: (data: Connection) => void 9 | remove: (data: Connection) => void 10 | curve?: CurveFactory 11 | 12 | constructor(events: { click: (data: Connection) => void, remove: (data: Connection) => void }, source: A, target: B, public isLoop?: boolean) { 13 | super(source, 'port', target, 'port') 14 | this.click = events.click; 15 | this.remove = events.remove; 16 | this.isLoop = false; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/controls/common-custom-control.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | export class NameControl extends ClassicPreset.Control { 4 | constructor(public name: string) { 5 | super(); 6 | } 7 | } 8 | 9 | export class PluginControl extends ClassicPreset.Control { 10 | constructor(public plugin: string) { 11 | super(); 12 | } 13 | } 14 | 15 | export class PluginVersionControl extends ClassicPreset.Control { 16 | constructor(public pluginVersion: string) { 17 | super(); 18 | } 19 | } 20 | 21 | export class StatusControl extends ClassicPreset.Control { 22 | constructor(public status: string) { 23 | super(); 24 | } 25 | } 26 | 27 | export class EnabledControl extends ClassicPreset.Control { 28 | constructor(public enabled: boolean) { 29 | super(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/controls/filter-custom-control.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | export class FilterColorControl extends ClassicPreset.Control { 4 | constructor(public color: string) { 5 | super(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/controls/north-custom-control.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | export class SentReadingsControl extends ClassicPreset.Control { 4 | constructor(public sent: number) { 5 | super(); 6 | } 7 | } 8 | 9 | export class ExecutionControl extends ClassicPreset.Control { 10 | constructor(public execution: string) { 11 | super(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/controls/notification-custom-control.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | export class RuleControl extends ClassicPreset.Control { 4 | constructor(public pluginName: string) { 5 | super(); 6 | } 7 | } 8 | 9 | export class ChannelControl extends ClassicPreset.Control { 10 | constructor(public pluginName: string) { 11 | super(); 12 | } 13 | } 14 | 15 | export class NotificationTypeControl extends ClassicPreset.Control { 16 | constructor(public type: string) { 17 | super(); 18 | } 19 | } 20 | 21 | export class ServiceStatusControl extends ClassicPreset.Control { 22 | constructor(public enabled: boolean) { 23 | super(); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/controls/south-custom-control.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | export class ReadingControl extends ClassicPreset.Control { 4 | constructor(public count: string) { 5 | super(); 6 | } 7 | } 8 | 9 | export class AssetControl extends ClassicPreset.Control { 10 | constructor(public count: string) { 11 | super(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-connection/custom-connection.component.css: -------------------------------------------------------------------------------- 1 | svg { 2 | overflow: visible; 3 | position: absolute; 4 | pointer-events: none; 5 | } 6 | 7 | svg path { 8 | fill: none; 9 | stroke-width: 1px; 10 | stroke: steelblue; 11 | pointer-events: auto; 12 | } 13 | 14 | svg path.selected { 15 | stroke: rgb(255, 217, 44); 16 | } 17 | 18 | .hover-path { 19 | stroke-width: 14px !important; 20 | stroke: transparent !important; 21 | } 22 | 23 | .connection-status { 24 | position: absolute; 25 | transform: translate(-50%, -50%); 26 | border: 0px; 27 | width: auto; 28 | height: auto; 29 | cursor: pointer; 30 | } -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-connection/custom-connection.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-connection/custom-connection.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomConnectionComponent } from './custom-connection.component'; 4 | 5 | describe('CustomConnectionComponent', () => { 6 | let component: CustomConnectionComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ CustomConnectionComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CustomConnectionComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-node/custom-node.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomNodeComponent } from './custom-node.component'; 4 | 5 | describe('CustomNodeComponent', () => { 6 | let component: CustomNodeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ CustomNodeComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CustomNodeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-socket/custom-socket.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: inline-block; 3 | cursor: pointer; 4 | border: 8px solid white; 5 | border-radius: 12px; 6 | width: 24px; 7 | height: 24px; 8 | margin: 1px; 9 | vertical-align: middle; 10 | background: #96b38a; 11 | z-index: 2; 12 | box-sizing: border-box; 13 | } 14 | 15 | :host:hover { 16 | border-width: 0px; 17 | } 18 | 19 | :host.multiple { 20 | border-color: yellow; 21 | } 22 | 23 | :host.output { 24 | margin-right: -12px; 25 | } 26 | 27 | :host.input { 28 | margin-left: -12px; 29 | } -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-socket/custom-socket.component.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/common/node-editor/custom-socket/custom-socket.component.html -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-socket/custom-socket.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CustomSocketComponent } from './custom-socket.component'; 4 | 5 | describe('CustomSocketComponent', () => { 6 | let component: CustomSocketComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ CustomSocketComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CustomSocketComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/custom-socket/custom-socket.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input, ChangeDetectorRef, OnChanges } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-custom-socket', 5 | template: ``, 6 | styleUrls: ['./custom-socket.component.css'] 7 | }) 8 | export class CustomSocketComponent implements OnChanges { 9 | 10 | @Input() data!: any; 11 | @Input() rendered!: any; 12 | 13 | constructor(private cdr: ChangeDetectorRef) { 14 | this.cdr.detach() 15 | } 16 | 17 | ngOnChanges(): void { 18 | this.cdr.detectChanges() 19 | requestAnimationFrame(() => this.rendered()) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/flow-editor.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { FlowEditorService } from './flow-editor.service'; 4 | 5 | describe('FlowEditorService', () => { 6 | let service: FlowEditorService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(FlowEditorService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/insert-node/types.ts: -------------------------------------------------------------------------------- 1 | export type Position = { 2 | x: number; 3 | y: number; 4 | }; 5 | export type Size = { 6 | width: number; 7 | height: number; 8 | }; 9 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/node-editor.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { NodeEditorComponent } from './node-editor.component'; 4 | 5 | describe('NodeEditorComponent', () => { 6 | let component: NodeEditorComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ NodeEditorComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NodeEditorComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/nodes/add-notification.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | import { ServiceStatusControl } from "../controls/notification-custom-control"; 3 | 4 | export class AddNotification extends ClassicPreset.Node { 5 | height = 100; 6 | width = 198; 7 | parent?: string; 8 | 9 | constructor(isServiceAvailable) { 10 | super("AddNotification"); 11 | const serviceStatus = new ServiceStatusControl(isServiceAvailable); 12 | this.addControl('serviceStatusControl', serviceStatus); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/nodes/add-service.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | 4 | export class AddService extends ClassicPreset.Node { 5 | height = 100; 6 | width = 200; 7 | parent?: string; 8 | 9 | constructor() { 10 | super("AddService"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/nodes/add-task.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | 4 | export class AddTask extends ClassicPreset.Node { 5 | height = 100; 6 | width = 200; 7 | parent?: string; 8 | 9 | constructor() { 10 | super("AddTask"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/nodes/index.ts: -------------------------------------------------------------------------------- 1 | export { Notification } from './notification'; 2 | export { Storage } from './storage'; 3 | export { South } from './south'; 4 | export { Filter } from "./filter"; 5 | export { North } from "./north"; 6 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/nodes/storage.ts: -------------------------------------------------------------------------------- 1 | import { ClassicPreset } from "rete"; 2 | 3 | 4 | export class Storage extends ClassicPreset.Node { 5 | height = 50; 6 | width = 100; 7 | parent?: string; 8 | 9 | constructor(socket: ClassicPreset.Socket) { 10 | super("Storage"); 11 | this.addInput("port", new ClassicPreset.Input(socket)); 12 | this.addOutput("port", new ClassicPreset.Output(socket)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/ref.directive.spec.ts: -------------------------------------------------------------------------------- 1 | import { RefDirective } from './ref.directive'; 2 | 3 | describe('RefDirective', () => { 4 | it('should create an instance', () => { 5 | const directive = new RefDirective(); 6 | expect(directive).toBeTruthy(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/ref.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, ElementRef, Input, OnChanges } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[refComponent]' 5 | }) 6 | export class RefDirective implements OnChanges { 7 | @Input() data!: any 8 | @Input() emit!: any 9 | 10 | constructor(private el: ElementRef) { } 11 | 12 | ngOnChanges() { 13 | this.emit({ type: 'render', data: { ...this.data, element: this.el.nativeElement } }) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/south/asset-readings/readings-count.component.css: -------------------------------------------------------------------------------- 1 | :host:hover .reading, 2 | :host:hover .asset { 3 | visibility: visible; 4 | } 5 | 6 | .reading-details { 7 | display: flex; 8 | justify-content: center; 9 | } 10 | 11 | .reading { 12 | font-size: 14px; 13 | visibility: hidden; 14 | } 15 | 16 | .asset { 17 | font-size: 12px; 18 | color: grey; 19 | padding-top: 8px; 20 | padding-left: 4px; 21 | visibility: hidden; 22 | } 23 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/south/asset-readings/readings-count.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FlowEditorService } from '../../flow-editor.service'; 3 | 4 | @Component({ 5 | selector: 'readings-count', 6 | templateUrl: './readings-count.component.html', 7 | styleUrls: ['./readings-count.component.css'], 8 | }) 9 | export class ReadingsCountComponent { 10 | @Input() readingCount: string; 11 | @Input() assetCount: string; 12 | @Input() serviceName; 13 | constructor(public flowEditorService: FlowEditorService) { } 14 | 15 | showReadingsPerAsset() { 16 | this.flowEditorService.showItemsInQuickview.next({ showReadings: true, serviceName: this.serviceName }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/south/asset-tracker/asset-tracker.component.css: -------------------------------------------------------------------------------- 1 | .readings-count { 2 | vertical-align: middle; 3 | max-width: max-content; 4 | } 5 | 6 | .deprecate { 7 | padding-right: 10px; 8 | color: #363636; 9 | } 10 | 11 | .table { 12 | font-size: 0.9em; 13 | } 14 | 15 | .readings-breadcrumb { 16 | padding-top: 0.85rem; 17 | margin-top: 10px; 18 | font-size: 0.95rem; 19 | margin-bottom: 0.25rem !important; 20 | display: inline-block; 21 | } 22 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/south/asset-tracker/asset-tracker.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AssetTrackerComponent } from './asset-tracker.component'; 4 | 5 | describe('AssetTrackerComponent', () => { 6 | let component: AssetTrackerComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [AssetTrackerComponent] 12 | }); 13 | fixture = TestBed.createComponent(AssetTrackerComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/toolbar/toolbar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ToolbarComponent } from './toolbar.component'; 4 | 5 | describe('ToolbarComponent', () => { 6 | let component: ToolbarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ToolbarComponent] 12 | }); 13 | fixture = TestBed.createComponent(ToolbarComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/common/node-editor/types.ts: -------------------------------------------------------------------------------- 1 | import { NgElement as NgEl, NgElementStrategy } from '@angular/elements'; 2 | 3 | export type NgElement = NgEl & { ngElementStrategy: NgElementStrategy & { setInputValue(key: string, value: any): void } } 4 | export type NodeProps = { data: any, rendered: any, emit: any } & NgElement 5 | 6 | export type Position = { x: number, y: number } 7 | 8 | export type RenderSignal = 9 | | { type: 'render', data: { element: HTMLElement, filled?: boolean, type: Type } & Data } 10 | | { type: 'rendered', data: { element: HTMLElement, type: Type } & Data } -------------------------------------------------------------------------------- /src/app/components/common/number-input-debounce/number-input-debounce.component.css: -------------------------------------------------------------------------------- 1 | input[type=number]::-webkit-inner-spin-button, 2 | input[type=number]::-webkit-outer-spin-button { 3 | -webkit-appearance: none; 4 | } 5 | 6 | input[type=number] { 7 | -moz-appearance: textfield; 8 | } 9 | -------------------------------------------------------------------------------- /src/app/components/common/number-input-debounce/number-input-debounce.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 4 | 5 | import { NumberInputDebounceComponent } from './number-input-debounce.component'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | NumberInputDebounceComponent 10 | ], 11 | imports: [ 12 | ReactiveFormsModule, 13 | FormsModule, 14 | CommonModule 15 | ], 16 | providers: [], 17 | exports: [NumberInputDebounceComponent] 18 | }) 19 | export class NumberInputDebounceModule { } 20 | -------------------------------------------------------------------------------- /src/app/components/common/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pagination.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/common/pagination/pagination.component.css: -------------------------------------------------------------------------------- 1 | .inline { 2 | display: inline-block; 3 | width: 50px; 4 | height: 20px; 5 | } 6 | 7 | .columns:last-child { 8 | margin-bottom: 0; 9 | } 10 | 11 | .container.is-fluid { 12 | z-index: 0; 13 | } 14 | -------------------------------------------------------------------------------- /src/app/components/common/pagination/pagination.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { PaginationComponent } from './pagination.component'; 4 | 5 | describe('PaginationComponent', () => { 6 | let component: PaginationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ PaginationComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(PaginationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/pagination/pagination.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 4 | 5 | import { PaginationComponent } from '.'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | PaginationComponent 10 | ], 11 | imports: [ 12 | ReactiveFormsModule, 13 | FormsModule, 14 | CommonModule 15 | ], 16 | providers: [], 17 | exports: [PaginationComponent] 18 | }) 19 | export class PaginationModule { } 20 | -------------------------------------------------------------------------------- /src/app/components/common/progress-bar/progress-bar.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/common/progress-bar/progress-bar.component.css -------------------------------------------------------------------------------- /src/app/components/common/progress-bar/progress-bar.component.html: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /src/app/components/common/progress-bar/progress-bar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ProgressBarComponent } from './progress-bar.component'; 4 | 5 | describe('ProgressBarComponent', () => { 6 | let component: ProgressBarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ProgressBarComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ProgressBarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/progress-bar/progress-bar.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-progress-bar', 5 | templateUrl: 'progress-bar.component.html', 6 | styleUrls: ['./progress-bar.component.css'] 7 | }) 8 | 9 | export class ProgressBarComponent implements OnInit { 10 | 11 | constructor() { } 12 | ngOnInit() {} 13 | } 14 | -------------------------------------------------------------------------------- /src/app/components/common/quickview/quickview.component.css: -------------------------------------------------------------------------------- 1 | .title { 2 | margin-bottom: 0px !important; 3 | } 4 | 5 | .quickview-block { 6 | display: inline-block; 7 | width: 95%; 8 | } 9 | 10 | .quickview.is-active { 11 | right: 0 !important; 12 | } 13 | 14 | @media screen and (min-width: 1px) { 15 | .quickview { 16 | width: 66%; 17 | right: -66%; 18 | } 19 | } 20 | 21 | .delete { 22 | float: right; 23 | } 24 | 25 | .quickview-body { 26 | border-left: 1px dashed silver; 27 | } -------------------------------------------------------------------------------- /src/app/components/common/quickview/quickview.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 |
8 |
-------------------------------------------------------------------------------- /src/app/components/common/quickview/quickview.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { QuickviewComponent } from './quickview.component'; 4 | 5 | describe('QuickviewComponent', () => { 6 | let component: QuickviewComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ QuickviewComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(QuickviewComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/quickview/quickview.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { QuickviewComponent } from './quickview.component'; 4 | 5 | 6 | 7 | @NgModule({ 8 | declarations: [QuickviewComponent], 9 | imports: [ 10 | CommonModule 11 | ], 12 | exports: [QuickviewComponent] 13 | }) 14 | export class QuickviewModule { } 15 | -------------------------------------------------------------------------------- /src/app/components/common/range-slider/range-slider.component.html: -------------------------------------------------------------------------------- 1 | 3 | {{rangeSliderService.getAlpha()}} 4 | alpha 5 | -------------------------------------------------------------------------------- /src/app/components/common/range-slider/range-slider.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { RangeSliderComponent } from './range-slider.component'; 4 | 5 | describe('RangeSliderComponent', () => { 6 | let component: RangeSliderComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [RangeSliderComponent] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(RangeSliderComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/range-slider/range-slider.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { RangeSliderService } from './range-slider.service'; 4 | 5 | describe('RangeSliderService', () => { 6 | let service: RangeSliderService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(RangeSliderService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/components/common/range-slider/range-slider.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BehaviorSubject } from 'rxjs'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class RangeSliderService { 8 | private alpha = 1 //default 9 | alphaSubject: BehaviorSubject = new BehaviorSubject(this.alpha); 10 | constructor() { } 11 | 12 | public getAlpha(): number { 13 | return this.alpha; 14 | } 15 | 16 | public setAlpha(alpha: number) { 17 | this.alphaSubject.next(alpha); 18 | } 19 | 20 | public alphaControl(visible: boolean) { 21 | localStorage.setItem('ALPHA_CONTROL', JSON.stringify(visible)); 22 | } 23 | 24 | public getAlphControlStatus(): boolean { 25 | const controlStatus: boolean = JSON.parse(localStorage.getItem('ALPHA_CONTROL')); 26 | return controlStatus ? controlStatus : false; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/app/components/common/restart-modal/restart-modal.component.css: -------------------------------------------------------------------------------- 1 | .modal-card-body { 2 | padding: 2rem 1.5rem; 3 | } -------------------------------------------------------------------------------- /src/app/components/common/restart-modal/restart-modal.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/common/restart-modal/restart-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { RestartModalComponent } from './restart-modal.component'; 4 | 5 | describe('RestartModalComponent', () => { 6 | let component: RestartModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ RestartModalComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(RestartModalComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/shut-down/shut-down.component.css: -------------------------------------------------------------------------------- 1 | .modal-card-body { 2 | padding: 2rem 1.5rem; 3 | } -------------------------------------------------------------------------------- /src/app/components/common/shut-down/shut-down.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ShutdownModalComponent } from './shutdown-modal.component'; 4 | 5 | describe('ShutdownModalComponent', () => { 6 | let component: ShutdownModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ShutdownModalComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ShutdownModalComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/common/shut-down/shutdown-modal.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/common/time-dropdown/time-dropdown.component.css: -------------------------------------------------------------------------------- 1 | #time { 2 | height: 36px; 3 | } 4 | 5 | .no-padding { 6 | padding: 0px !important; 7 | } 8 | 9 | .unit-button { 10 | min-width: 90px; 11 | } -------------------------------------------------------------------------------- /src/app/components/common/time-dropdown/time-dropdown.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { TimeDropdownComponent } from './time-dropdown.component'; 4 | 5 | describe('TimeDropdownComponent', () => { 6 | let component: TimeDropdownComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ TimeDropdownComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(TimeDropdownComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/asset-readings/asset-reading-summary/asset-reading-summary.component.css: -------------------------------------------------------------------------------- 1 | .summary, 2 | .summary .table { 3 | background-color: #f8f9f9; 4 | border-radius: 5px; 5 | } 6 | 7 | @media screen and (max-width: 769px) { 8 | .summary { 9 | width: 736px; 10 | } 11 | } 12 | 13 | .is-info { 14 | background-color: #85c1e9 !important; 15 | } 16 | 17 | table.is-borderless tr a { 18 | padding-left: 0; 19 | } 20 | 21 | table.is-borderless tr { 22 | border: 0 !important; 23 | vertical-align: middle; 24 | } 25 | 26 | table.is-borderless td { 27 | border: 0 !important; 28 | } 29 | 30 | .data-table { 31 | width: 100%; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/app/components/core/asset-readings/assets/assets.component.css: -------------------------------------------------------------------------------- 1 | .pagination-section { 2 | padding: 1rem; 3 | } 4 | 5 | @media screen and (min-height: 955px) { 6 | table.scroll { 7 | max-height: 75vh; 8 | } 9 | } 10 | 11 | @media screen and (min-height: 800px) and (max-height: 955px) { 12 | table.scroll { 13 | max-height: 72vh; 14 | } 15 | } 16 | 17 | @media screen and (min-height: 600px) and (max-height: 800px) { 18 | table.scroll { 19 | max-height: 67vh; 20 | } 21 | } 22 | 23 | @media screen and (max-height: 600px) { 24 | table.scroll { 25 | max-height: 55vh; 26 | } 27 | } 28 | 29 | .tooltip-help { 30 | padding-right: 1.0rem; 31 | padding-top: 1.0rem !important; 32 | } 33 | 34 | .assets-control { 35 | padding-right: 1.3rem; 36 | padding-top: 1.0rem !important; 37 | margin-right: 8px !important; 38 | } 39 | 40 | .tooltip { 41 | opacity: 1.0 !important; 42 | } 43 | -------------------------------------------------------------------------------- /src/app/components/core/asset-readings/assets/assets.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AssetsComponent } from './assets.component'; 4 | 5 | describe('AssetsComponent', () => { 6 | let component: AssetsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AssetsComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AssetsComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/asset-readings/assets/index.ts: -------------------------------------------------------------------------------- 1 | export * from './assets.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/asset-readings/readings-graph/readings-graph.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ReadingsGraphComponent } from './readings-graph.component'; 4 | 5 | describe('ReadingsGraphComponent', () => { 6 | let component: ReadingsGraphComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ReadingsGraphComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ReadingsGraphComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/backup-restore/backup-restore.component.css: -------------------------------------------------------------------------------- 1 | .align-content { 2 | vertical-align: middle; 3 | } 4 | 5 | .fix-margin { 6 | margin-top: 0px !important; 7 | margin-right: 2px !important; 8 | } 9 | 10 | .help-pad { 11 | margin-right: 0.7rem; 12 | } 13 | 14 | .sort-order { 15 | display: inline-block; 16 | cursor: pointer !important; 17 | } 18 | 19 | .context-menu { 20 | border: none; 21 | } 22 | 23 | @media only screen and (min-width: 768px) { 24 | .backup-card-content { 25 | overflow: visible; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/app/components/core/backup-restore/backup-restore.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { BackupRestoreComponent } from './backup-restore.component'; 4 | 5 | describe('BackupRestoreComponent', () => { 6 | let component: BackupRestoreComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ BackupRestoreComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(BackupRestoreComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/backup-restore/index.ts: -------------------------------------------------------------------------------- 1 | export * from './backup-restore.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/certificate/certificate-store/certificate-store.component.css: -------------------------------------------------------------------------------- 1 | .showInCenter { 2 | vertical-align: middle; 3 | } 4 | -------------------------------------------------------------------------------- /src/app/components/core/certificate/certificate-store/certificate-store.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { CertificateStoreComponent } from './certificate-store.component'; 4 | 5 | describe('CertificateStoreComponent', () => { 6 | let component: CertificateStoreComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CertificateStoreComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CertificateStoreComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/certificate/certificate-store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './certificate-store.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/certificate/upload-certificate/certificate-store.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { UploadCertificateComponent } from './upload-certificate.component'; 4 | 5 | describe('UploadCertificateComponent', () => { 6 | let component: UploadCertificateComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UploadCertificateComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UploadCertificateComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/certificate/upload-certificate/upload-certificate.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/core/certificate/upload-certificate/upload-certificate.component.css -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/bucket-configuration/bucket-configuration.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/core/configuration-manager/bucket-configuration/bucket-configuration.component.css -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/bucket-configuration/bucket-configuration.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/button-panel/button-panel.component.css: -------------------------------------------------------------------------------- 1 | .button-container { 2 | border: 1px solid whitesmoke; 3 | border-radius: 4px; 4 | } 5 | 6 | .button { 7 | border: none; 8 | } 9 | 10 | .button:hover { 11 | background-color: whitesmoke; 12 | } 13 | 14 | .button:disabled { 15 | opacity: 1 !important; 16 | background-color: lightgray; 17 | pointer-events: none; 18 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/button-panel/button-panel.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ButtonPanelComponent } from './button-panel.component'; 4 | 5 | describe('ButtonPanelComponent', () => { 6 | let component: ButtonPanelComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ButtonPanelComponent] 12 | }); 13 | fixture = TestBed.createComponent(ButtonPanelComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/configuration-group/configuration-group.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ConfigurationGroupComponent } from './configuration-group.component'; 4 | 5 | describe('ConfigurationGroupComponent', () => { 6 | let component: ConfigurationGroupComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ConfigurationGroupComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ConfigurationGroupComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/dynamic-group/dynamic-group.component.css: -------------------------------------------------------------------------------- 1 | .subtab-menu { 2 | border-right: 1px solid #dbdbdb; 3 | } 4 | 5 | .custom-width { 6 | width: 100%; 7 | } 8 | 9 | .is-extra-small-font { 10 | font-size: 0.85rem !important; 11 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/dynamic-group/dynamic-group.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { DynamicGroupComponent } from './dynamic-group.component'; 4 | 5 | describe('DynamicGroupComponent', () => { 6 | let component: DynamicGroupComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [DynamicGroupComponent] 12 | }); 13 | fixture = TestBed.createComponent(DynamicGroupComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/index.ts: -------------------------------------------------------------------------------- 1 | export * from './configuration-manager.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/kv-list-type-configuration/kv-list-type-configuration.component.css: -------------------------------------------------------------------------------- 1 | .kv-column:last-child { 2 | margin-top: 0px !important; 3 | margin-bottom: 0px !important; 4 | } 5 | 6 | .btn-panel { 7 | visibility: hidden; 8 | } 9 | 10 | .lower-btn-panel { 11 | margin-top: -6px; 12 | } 13 | 14 | .upper-btn-panel { 15 | margin-top: -11px; 16 | } 17 | 18 | .btn-panel-container { 19 | height: 15px; 20 | position: relative; 21 | z-index: 5; 22 | display: flex; 23 | } 24 | 25 | .items-container:hover .btn-panel { 26 | visibility: visible; 27 | } 28 | 29 | .export-btn { 30 | width: 10px; 31 | } 32 | 33 | .toggle-btn-container { 34 | margin-top: -10px; 35 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/kvlist-card/kvlist-card.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { KvlistCardComponent } from './kvlist-card.component'; 4 | 5 | describe('KvlistCardComponent', () => { 6 | let component: KvlistCardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [KvlistCardComponent] 12 | }); 13 | fixture = TestBed.createComponent(KvlistCardComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/list-card/list-card.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ListCardComponent } from './list-card.component'; 4 | 5 | describe('ListCardComponent', () => { 6 | let component: ListCardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ListCardComponent] 12 | }); 13 | fixture = TestBed.createComponent(ListCardComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/list-table/list-table.component.css: -------------------------------------------------------------------------------- 1 | .sticky-header { 2 | position: sticky; 3 | top: 0px; 4 | background: white; 5 | z-index: 10; 6 | } 7 | 8 | table thead th { 9 | font-size: 0.825rem !important; 10 | } 11 | 12 | .delete-icon { 13 | visibility: hidden; 14 | cursor: pointer; 15 | } 16 | 17 | tr:hover .delete-icon { 18 | visibility: visible; 19 | } 20 | 21 | .table-wrapper { 22 | position: relative; 23 | display: inline-block; 24 | } 25 | 26 | .button-bar { 27 | position: absolute; 28 | top: 10px; 29 | right: 0px; 30 | visibility: hidden; 31 | z-index: 11; 32 | } 33 | 34 | .table-wrapper:hover .button-bar { 35 | visibility: visible; 36 | } 37 | 38 | .input { 39 | min-width: 120px; 40 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/list-table/list-table.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ListTableComponent } from './list-table.component'; 4 | 5 | describe('ListTableComponent', () => { 6 | let component: ListTableComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ListTableComponent] 12 | }); 13 | fixture = TestBed.createComponent(ListTableComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/list-type-configuration/list-type-configuration.component.css: -------------------------------------------------------------------------------- 1 | .help { 2 | font-weight: 400; 3 | margin-top: 0; 4 | max-width: 100px; 5 | white-space: nowrap; 6 | overflow: hidden; 7 | text-overflow: ellipsis; 8 | } 9 | 10 | .btn-panel { 11 | visibility: hidden; 12 | } 13 | 14 | .lower-btn-panel { 15 | margin-top: -6px; 16 | } 17 | 18 | .upper-btn-panel { 19 | margin-top: -11px; 20 | } 21 | 22 | .btn-panel-container { 23 | height: 15px; 24 | position: relative; 25 | z-index: 5; 26 | display: flex; 27 | } 28 | 29 | .items-container:hover .btn-panel { 30 | visibility: visible; 31 | } 32 | 33 | .export-btn { 34 | width: 10px; 35 | } 36 | 37 | .toggle-btn-container { 38 | margin-top: -10px; 39 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/plugin-persist-data/plugin-persist-data.component.css: -------------------------------------------------------------------------------- 1 | .context-menu { 2 | border: none; 3 | } 4 | 5 | .dropdown-content { 6 | max-width: max-content !important; 7 | } 8 | 9 | .is-disable{ 10 | pointer-events: none; 11 | opacity: .65; 12 | } 13 | 14 | .dropdown { 15 | width: auto !important; 16 | } 17 | 18 | pre { 19 | white-space: pre-wrap; 20 | } 21 | 22 | .dropdown-menu { 23 | padding-left: 25px !important; 24 | } 25 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/plugin-persist-data/plugin-persist-data.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { PluginPersistDataComponent } from './plugin-persist-data.component'; 4 | 5 | describe('PluginPersistDataComponent', () => { 6 | let component: PluginPersistDataComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [PluginPersistDataComponent] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(PluginPersistDataComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/plugin-persist-data/plugin-persist-data.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { PluginPersistDataService } from './plugin-persist-data.service'; 4 | 5 | describe('PluginPersistDataService', () => { 6 | let service: PluginPersistDataService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(PluginPersistDataService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/property-configuration/property-configuration.component.css: -------------------------------------------------------------------------------- 1 | .input { 2 | min-width: 120px; 3 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/property-configuration/property-configuration.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { PropertyConfigurationComponent } from './property-configuration.component'; 4 | 5 | describe('PropertyConfigurationComponent', () => { 6 | let component: PropertyConfigurationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [PropertyConfigurationComponent] 12 | }); 13 | fixture = TestBed.createComponent(PropertyConfigurationComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/property-configuration/property-configuration.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { FormControl } from '@angular/forms'; 3 | import { RolesService } from '../../../../services'; 4 | 5 | 6 | @Component({ 7 | selector: 'app-property-configuration', 8 | templateUrl: './property-configuration.component.html', 9 | styleUrls: ['./property-configuration.component.css'] 10 | }) 11 | export class PropertyConfigurationComponent { 12 | @Input() control: FormControl; 13 | @Input() configuration 14 | @Input() permissions = []; 15 | 16 | constructor(public rolesService: RolesService) { } 17 | 18 | togglePassword(input: any): any { 19 | input.type = input.type === 'password' ? 'text' : 'password'; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/show-configuration/show-configuration.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ShowConfigurationComponent } from './show-configuration.component'; 4 | 5 | describe('ShowConfigurationComponent', () => { 6 | let component: ShowConfigurationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ShowConfigurationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ShowConfigurationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/static-configuration/static-configuration.component.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: 769px) { 2 | .field-body { 3 | flex-grow: 2 !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/tab-navigation/tab-navigation.component.css: -------------------------------------------------------------------------------- 1 | .tab-navigation.button:focus:not(:active), 2 | .tab-navigation.button.is-focused:not(:active) { 3 | box-shadow: none !important 4 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/tab-navigation/tab-navigation.component.html: -------------------------------------------------------------------------------- 1 |
2 | 6 | 9 |
-------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/toggle-switch/toggle-switch.component.css: -------------------------------------------------------------------------------- 1 | .toggle-btn { 2 | font-size: 0.6rem; 3 | } -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/toggle-switch/toggle-switch.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 9 |

10 |

11 | 18 |

19 |
-------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/toggle-switch/toggle-switch.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ToggleSwitchComponent } from './toggle-switch.component'; 4 | 5 | describe('ToggleSwitchComponent', () => { 6 | let component: ToggleSwitchComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ToggleSwitchComponent] 12 | }); 13 | fixture = TestBed.createComponent(ToggleSwitchComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/configuration-manager/toggle-switch/toggle-switch.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-toggle-switch', 5 | templateUrl: './toggle-switch.component.html', 6 | styleUrls: ['./toggle-switch.component.css'] 7 | }) 8 | export class ToggleSwitchComponent { 9 | @Output() currentView = new EventEmitter(); 10 | @Input() isListView; 11 | 12 | setCurrentView(view: string) { 13 | if (view == 'list') { 14 | this.isListView = true; 15 | this.currentView.emit({ isListView: true }); 16 | } 17 | else { 18 | this.isListView = false; 19 | this.currentView.emit({ isListView: false }); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-acl/add-control-acl.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddControlAclComponent } from './add-control-acl.component'; 4 | 5 | describe('AddControlAclComponent', () => { 6 | let component: AddControlAclComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddControlAclComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddControlAclComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-control-script.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddControlScriptComponent } from './add-control-script.component'; 4 | 5 | describe('AddControlScriptComponent', () => { 6 | let component: AddControlScriptComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddControlScriptComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddControlScriptComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-configure/add-configure.component.css: -------------------------------------------------------------------------------- 1 | .field-body .field { 2 | margin-bottom: 5px; 3 | } 4 | 5 | .field-label { 6 | text-align: left; 7 | } 8 | 9 | .tree-dropdown { 10 | padding-left: 5px; 11 | } 12 | 13 | ::ng-deep .tree-children .toggle-children, 14 | ::ng-deep .node-wrapper .toggle-children { 15 | opacity: 0.4; 16 | } -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-configure/add-configure.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddConfigureComponent } from './add-configure.component'; 4 | 5 | describe('AddConfigureComponent', () => { 6 | let component: AddConfigureComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddConfigureComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddConfigureComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-delay/add-delay.component.css: -------------------------------------------------------------------------------- 1 | .field-body .field { 2 | margin-bottom: 5px; 3 | } 4 | 5 | .field-label { 6 | text-align: left; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-delay/add-delay.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddDelayComponent } from './add-delay.component'; 4 | 5 | describe('AddDelayComponent', () => { 6 | let component: AddDelayComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddDelayComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddDelayComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-operation/add-operation.component.css: -------------------------------------------------------------------------------- 1 | .field-body .field { 2 | margin-bottom: 5px; 3 | } 4 | 5 | .field-label { 6 | text-align: left; 7 | } 8 | 9 | .name-control { 10 | max-width: 70%; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-operation/add-operation.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddOperationComponent } from './add-operation.component'; 4 | 5 | describe('AddOperationComponent', () => { 6 | let component: AddOperationComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddOperationComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddOperationComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-script/add-script.component.css: -------------------------------------------------------------------------------- 1 | .field-body .field { 2 | margin-bottom: 5px; 3 | } 4 | 5 | .field-label { 6 | text-align: left; 7 | } -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-script/add-script.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddScriptComponent } from './add-script.component'; 4 | 5 | describe('AddScriptComponent', () => { 6 | let component: AddScriptComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddScriptComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddScriptComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-step-condition/add-step-condition.component.css: -------------------------------------------------------------------------------- 1 | .delete { 2 | vertical-align: middle !important; 3 | } 4 | 5 | .button.is-light.like-link { 6 | background-color: white; 7 | } 8 | 9 | .button.is-light.like-link:hover { 10 | font-style: bold; 11 | } 12 | 13 | .field-label { 14 | text-align: left; 15 | } 16 | 17 | .btn-condition { 18 | font-weight: 600; 19 | } 20 | 21 | .btn-field-body { 22 | margin-left: -12px; 23 | } 24 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-step-value/add-step-value.component.css: -------------------------------------------------------------------------------- 1 | .field-body .field:not(:last-child) { 2 | margin-bottom: 5px; 3 | } 4 | 5 | .delete { 6 | vertical-align: middle !important; 7 | } 8 | 9 | .button.is-light.like-link { 10 | background-color: white; 11 | } 12 | 13 | .button.is-light.like-link:hover { 14 | font-style: bold; 15 | } 16 | 17 | .field-label { 18 | text-align: left; 19 | } 20 | 21 | .btn-field-body { 22 | margin-left: -12px; 23 | margin-bottom: 5px; 24 | } 25 | 26 | .no-parameter { 27 | padding-top: calc(0.5em - 1px); 28 | padding-bottom: calc(0.5em - 1px); 29 | } 30 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-step-value/add-step-value.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddStepValueComponent } from './add-step-value.component'; 4 | 5 | describe('AddStepValueComponent', () => { 6 | let component: AddStepValueComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddStepValueComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddStepValueComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-step.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddStepComponent } from './add-step.component'; 4 | 5 | describe('AddStepComponent', () => { 6 | let component: AddStepComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddStepComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddStepComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-write/add-write.component.css: -------------------------------------------------------------------------------- 1 | .field-body .field { 2 | margin-bottom: 5px; 3 | } 4 | 5 | .field-label { 6 | text-align: left; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/add-control-script/add-step/add-write/add-write.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddWriteComponent } from './add-write.component'; 4 | 5 | describe('AddWriteComponent', () => { 6 | let component: AddWriteComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddWriteComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddWriteComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/api-flow/add-edit-api-flow/add-edit-api-flow.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddEditFlowAPIComponent } from './add-edit-api-flow.component'; 4 | 5 | describe('AddEditFlowAPIComponent', () => { 6 | let component: AddEditFlowAPIComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddEditFlowAPIComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddEditFlowAPIComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/api-flow/api-flow.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { APIFlowComponent } from './api-flow.component'; 4 | 5 | describe('APIFlowComponent', () => { 6 | let component: APIFlowComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ APIFlowComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(APIFlowComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/list-control-dispatcher/acl-list/acl-list.component.css: -------------------------------------------------------------------------------- 1 | .btn-delete { 2 | border-color: transparent !important; 3 | opacity: 0; 4 | } 5 | 6 | tr:hover .btn-delete { 7 | opacity: 1; 8 | } 9 | 10 | .child-table th { 11 | padding-left: 0.1em !important; 12 | padding-top: 0.1em !important; 13 | padding-bottom: 0.1em !important; 14 | } 15 | 16 | .acl-usage { 17 | padding: 0.1em 0.7em; 18 | } 19 | 20 | .context-menu { 21 | border: none; 22 | } 23 | 24 | .is-hoverable.acl-table tr:hover .context-menu { 25 | background-color: #fafafa; 26 | } 27 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/list-control-dispatcher/acl-list/acl-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AclListComponent } from './acl-list.component'; 4 | 5 | describe('AclListComponent', () => { 6 | let component: AclListComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AclListComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AclListComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/list-control-dispatcher/control-scripts-list/control-scripts-list.component.css: -------------------------------------------------------------------------------- 1 | tr:hover .btn-delete { 2 | opacity: 1; 3 | } 4 | 5 | .is-hoverable { 6 | cursor: pointer !important; 7 | } 8 | 9 | 10 | .btn-delete { 11 | border-color: transparent !important; 12 | opacity: 0; 13 | } 14 | 15 | .button.is-light { 16 | background-color: transparent !important 17 | } 18 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/list-control-dispatcher/control-tasks-list/control-tasks-list.component.css: -------------------------------------------------------------------------------- 1 | .align-content { 2 | vertical-align: middle; 3 | } 4 | 5 | .btn-delete { 6 | border-color: transparent !important; 7 | opacity: 0; 8 | } 9 | 10 | 11 | tr:hover .btn-delete { 12 | opacity: 1; 13 | } 14 | 15 | 16 | .parameter.is-borderless td, .parameter.is-borderless th { 17 | border: 0; 18 | padding: 2px 12px 0px 0px; 19 | font-size: 90%; 20 | } 21 | 22 | .is-borderless td, .is-borderless th { 23 | border: 0; 24 | padding: 2px 12px 0px 0px; 25 | } 26 | 27 | 28 | .is-hoverable { 29 | cursor: pointer !important; 30 | } 31 | 32 | .button.is-light { 33 | background-color: transparent !important 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/pipelines/add-pipeline-filter/add-pipeline-filter.component.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: 769px) { 2 | .modal-card { 3 | width: 80%; 4 | } 5 | } 6 | 7 | .ctrl-pipeline { 8 | padding-top: 2px; 9 | } 10 | 11 | .modal-card-title { 12 | font-size: 0.9rem !important; 13 | } 14 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/pipelines/add-pipeline-filter/add-pipeline-filter.component.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/pipelines/add-pipeline/add-control-pipeline.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AddControlPipelineComponent } from './add-control-pipeline.component'; 4 | 5 | describe('AddControlPipelineComponent', () => { 6 | let component: AddControlPipelineComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ AddControlPipelineComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddControlPipelineComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/pipelines/control-pipelines.component.css: -------------------------------------------------------------------------------- 1 | table tr td { 2 | vertical-align: middle; 3 | } 4 | 5 | .is-text { 6 | padding-left: 0; 7 | padding-right: 0; 8 | } 9 | 10 | .fade { 11 | background-color:#f5f5f5 !important; 12 | } 13 | 14 | .pipeline-name { 15 | color: #3273dc; 16 | text-decoration: none; 17 | } 18 | 19 | .context-menu { 20 | border: none; 21 | } 22 | 23 | .src-dest-name { 24 | color: #707070; 25 | font-size: .85rem; 26 | margin-top: 0rem !important; 27 | } 28 | 29 | .is-hoverable.pipeline-table tr:hover .context-menu { 30 | background-color: #fafafa; 31 | } 32 | 33 | span.is-small { 34 | font-size: 0.9rem; 35 | } 36 | 37 | .pipeline-table { 38 | display: block; 39 | } 40 | 41 | .fa-plus { 42 | font-size: .65em; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/app/components/core/control-dispatcher/pipelines/control-pipelines.component.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/core/control-dispatcher/pipelines/control-pipelines.component.spec.ts -------------------------------------------------------------------------------- /src/app/components/core/dashboard/dashboard.component.css: -------------------------------------------------------------------------------- 1 | .box { 2 | height: 100%; 3 | } 4 | 5 | .columns { 6 | padding: 0% !important; 7 | } 8 | 9 | .custom-col { 10 | padding-right: 1.0rem !important; 11 | padding-top: 1.0rem !important; 12 | } 13 | 14 | .dropdown-content { 15 | width: auto; 16 | height: auto; 17 | max-height: 70vh; 18 | overflow-y: scroll; 19 | padding-right: .5rem; 20 | } 21 | 22 | .columns:not(:last-child) { 23 | margin-bottom: 0% !important; 24 | } 25 | 26 | .dropdown { 27 | width: auto !important; 28 | } 29 | 30 | .dropdown-columns { 31 | margin-top: 10px; 32 | } 33 | 34 | .dropdown-column { 35 | padding-top: 0px; 36 | } 37 | -------------------------------------------------------------------------------- /src/app/components/core/dashboard/dashboard.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { DashboardComponent } from './dashboard.component'; 4 | 5 | describe('DashboardComponent', () => { 6 | let component: DashboardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ DashboardComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(DashboardComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/dashboard/dashboard.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | 5 | import { DashboardComponent } from '.'; 6 | import { DateFormatterPipe } from '../../../pipes'; 7 | import { StatisticsService } from '../../../services'; 8 | import { ChartModule } from '../../common/chart'; 9 | import { NumberInputDebounceModule } from '../../common/number-input-debounce/number-input-debounce.module'; 10 | 11 | @NgModule({ 12 | declarations: [ 13 | DashboardComponent 14 | ], 15 | imports: [ 16 | FormsModule, 17 | CommonModule, 18 | NumberInputDebounceModule, 19 | ChartModule, 20 | ], 21 | providers: [StatisticsService, DateFormatterPipe], 22 | exports: [] 23 | }) 24 | export class DashboardModule { } 25 | -------------------------------------------------------------------------------- /src/app/components/core/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dashboard.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/developer/additional-services/additional-service-modal/additional-service-modal.component.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: 769px) { 2 | .field-body { 3 | flex-grow: 2 !important; 4 | } 5 | .margin-bottom { 6 | margin-bottom: -0.75rem; 7 | } 8 | } 9 | 10 | .field.is-narrow { 11 | width: 50% !important; 12 | } 13 | 14 | .notification-label { 15 | max-width: 100px !important; 16 | } 17 | 18 | .hr-text { 19 | opacity: .3; 20 | } 21 | 22 | .is-hovered { 23 | margin-top: 7px; 24 | } 25 | 26 | .enable-div { 27 | margin: 1.5rem 1rem; 28 | } 29 | 30 | .modal-card-head { 31 | padding: 12px !important; 32 | border-top-left-radius: 3px; 33 | border-top-right-radius: 3px; 34 | } 35 | 36 | .service-info { 37 | white-space: nowrap; 38 | } 39 | 40 | .service-info-padding { 41 | padding-left: 6.1rem !important; 42 | } 43 | -------------------------------------------------------------------------------- /src/app/components/core/developer/additional-services/additional-services-context-menu/additional-services-context-menu.component.css: -------------------------------------------------------------------------------- 1 | .context-menu { 2 | border: none; 3 | } 4 | -------------------------------------------------------------------------------- /src/app/components/core/developer/additional-services/list-additional-services.component.css: -------------------------------------------------------------------------------- 1 | .btn-delete { 2 | border-color: transparent !important; 3 | opacity: 0; 4 | } 5 | 6 | tr:hover .btn-delete { 7 | opacity: 1; 8 | } 9 | 10 | .context-menu { 11 | border: none; 12 | } 13 | 14 | .cog-icon { 15 | background: none; 16 | border: none; 17 | font-size: 0.85rem; 18 | } 19 | 20 | .service-table { 21 | width: 50%; 22 | } 23 | 24 | #refresh-check { 25 | margin-left: 3px; 26 | } 27 | 28 | .breadcrumb { 29 | margin-bottom: 0px !important; 30 | } 31 | 32 | .dashed-border td { 33 | border-top: 1px dashed silver; 34 | } 35 | 36 | .change-overflow { 37 | overflow: visible; 38 | } 39 | 40 | .remove-border td { 41 | border-bottom: 0px; 42 | } 43 | -------------------------------------------------------------------------------- /src/app/components/core/developer/packages/install-python-package/install-python-package.component.css: -------------------------------------------------------------------------------- 1 | .field-label { 2 | text-align: left; 3 | } 4 | 5 | .field.is-narrow { 6 | width: 50% !important; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/components/core/developer/packages/list-python-packages/list-python-packages.component.css: -------------------------------------------------------------------------------- 1 | .add-button { 2 | margin: 5px; 3 | } 4 | 5 | .python-package-breadcrumb { 6 | display: flex; 7 | flex-grow: 1; 8 | } 9 | -------------------------------------------------------------------------------- /src/app/components/core/filter/add-filter-wizard/add-filter-wizard.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AddFilterWizardComponent } from './add-filter-wizard.component'; 4 | 5 | describe('AddFilterPluginWizardComponent', () => { 6 | let component: AddFilterWizardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AddFilterWizardComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddFilterWizardComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/filter/filter-alert/filter-alert.component.css: -------------------------------------------------------------------------------- 1 | .modal-card-body { 2 | padding: 2rem 1.5rem; 3 | } -------------------------------------------------------------------------------- /src/app/components/core/filter/filter-alert/filter-alert.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { FilterAlertComponent } from './filter-alert.component'; 4 | 5 | describe('FilterAlertComponent', () => { 6 | let component: FilterAlertComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ FilterAlertComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FilterAlertComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/filter/filter-list/filter-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { FilterListComponent } from './filter-list.component'; 4 | 5 | describe('FilterListComponent', () => { 6 | let component: FilterListComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [FilterListComponent] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FilterListComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/logs/audit-log/audit-log.component.css: -------------------------------------------------------------------------------- 1 | table { 2 | overflow-x: auto; 3 | display: block; 4 | } 5 | 6 | table tbody { 7 | overflow-y: scroll; 8 | overflow-x: auto; 9 | } 10 | 11 | .card { overflow: visible;} 12 | .card-content { overflow: visible; } 13 | 14 | .dropdown-trigger > .button { 15 | width: 80%; 16 | } 17 | 18 | .tooltip { 19 | opacity: 1.0 !important; 20 | } 21 | 22 | #refresh-check { 23 | margin-left: 3px; 24 | } 25 | 26 | .auto-refresh { 27 | margin-right: 30px; 28 | font-size: 0.75rem; 29 | color: #363636; 30 | font-weight: 700; 31 | } 32 | 33 | .checkmark { 34 | vertical-align: middle !important; 35 | } 36 | 37 | .card-header-title { 38 | max-height: 45px !important; 39 | } 40 | -------------------------------------------------------------------------------- /src/app/components/core/logs/audit-log/audit-log.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AuditLogComponent } from './audit-log.component'; 4 | 5 | describe('AuditLogComponent', () => { 6 | let component: AuditLogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AuditLogComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AuditLogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/logs/audit-log/index.ts: -------------------------------------------------------------------------------- 1 | export * from './audit-log.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/logs/notification-log/notification-log.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { NotificationLogComponent } from './notification-log.component'; 4 | 5 | describe('NotificationLogComponent', () => { 6 | let component: NotificationLogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NotificationLogComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NotificationLogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/logs/packages-log/packages-log.component.css: -------------------------------------------------------------------------------- 1 | .is-text { 2 | padding-left: 0; 3 | padding-right: 0; 4 | } 5 | 6 | #refresh-check { 7 | margin-left: 3px; 8 | } 9 | 10 | .auto-refresh { 11 | margin-right: 30px; 12 | font-size: 0.75rem; 13 | color: #363636; 14 | font-weight: 700; 15 | } 16 | 17 | .checkmark { 18 | vertical-align: middle !important; 19 | } 20 | 21 | .card-header-title { 22 | max-height: 45px !important; 23 | } 24 | -------------------------------------------------------------------------------- /src/app/components/core/logs/packages-log/packages-log.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { PackagesLogComponent } from './packages-log.component'; 4 | 5 | describe('PackagesLogComponent', () => { 6 | let component: PackagesLogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ PackagesLogComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(PackagesLogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/logs/packages-log/view-logs/view-logs.component.css: -------------------------------------------------------------------------------- 1 | .modal-content { 2 | width: 80%; 3 | } 4 | 5 | pre { 6 | margin: 14px; 7 | } 8 | 9 | .modal { 10 | z-index: 100; 11 | } -------------------------------------------------------------------------------- /src/app/components/core/logs/packages-log/view-logs/view-logs.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/components/core/logs/packages-log/view-logs/view-logs.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ViewLogsComponent } from './view-logs.component'; 4 | 5 | describe('ViewLogsComponent', () => { 6 | let component: ViewLogsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ViewLogsComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ViewLogsComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/logs/system-log/index.ts: -------------------------------------------------------------------------------- 1 | export * from './system-log.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/logs/system-log/system-log.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SystemLogComponent } from './system-log.component'; 4 | 5 | describe('SystemLogComponent', () => { 6 | let component: SystemLogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SystemLogComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SystemLogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/logs/tasks/tasks.component.css: -------------------------------------------------------------------------------- 1 | .cancel-btn { 2 | height: 3.25em; 3 | } 4 | 5 | .fade { 6 | background-color:#f5f5f5 !important; 7 | } 8 | 9 | #refresh-check { 10 | margin-left: 3px; 11 | } 12 | 13 | .auto-refresh { 14 | margin-right: 30px; 15 | font-size: 0.75rem; 16 | color: #363636; 17 | font-weight: 700; 18 | } 19 | 20 | .checkmark { 21 | vertical-align: middle !important; 22 | } 23 | 24 | .card-header-title { 25 | max-height: 45px !important; 26 | } 27 | -------------------------------------------------------------------------------- /src/app/components/core/logs/tasks/tasks.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { TasksComponent } from './tasks.component'; 4 | 5 | describe('TasksComponent', () => { 6 | let component: TasksComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [TasksComponent] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(TasksComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/north/add-task-wizard/add-task-wizard.component.css: -------------------------------------------------------------------------------- 1 | .description { 2 | flex-shrink: initial !important; 3 | } 4 | 5 | .container.is-fluid { 6 | margin-top: 10px; 7 | } 8 | 9 | .service-checkbox { 10 | padding-top: 0.375rem; 11 | } 12 | 13 | .help-icon { 14 | cursor: pointer !important; 15 | } 16 | 17 | .enabled-field { 18 | flex-grow: 0.5; 19 | } 20 | 21 | .box { 22 | margin-bottom: 1.5rem !important; 23 | } -------------------------------------------------------------------------------- /src/app/components/core/north/add-task-wizard/add-task-wizard.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AddTaskWizardComponent } from './add-task-wizard.component'; 4 | 5 | describe('AddTaskWizardComponent', () => { 6 | let component: AddTaskWizardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AddTaskWizardComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddTaskWizardComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/north/north-task-modal/north-task-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { NorthTaskModalComponent } from './north-task-modal.component'; 4 | 5 | describe('NorthTaskModalComponent', () => { 6 | let component: NorthTaskModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NorthTaskModalComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NorthTaskModalComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/north/north-task.ts: -------------------------------------------------------------------------------- 1 | export interface NorthTask { 2 | id: string 3 | name: string 4 | processName: string 5 | repeat: number 6 | day: any 7 | repeatDays?: number 8 | repeatTime?: number 9 | enabled: boolean 10 | exclusive: boolean 11 | execution: string 12 | taskStatus: TaskStatus 13 | sent: number 14 | plugin: Plugin 15 | status?: string 16 | } 17 | 18 | export interface TaskStatus { 19 | state: string 20 | startTime: string 21 | endTime: string 22 | exitCode: string 23 | reason: string 24 | } 25 | 26 | export interface Plugin { 27 | name: string 28 | version: string 29 | } 30 | -------------------------------------------------------------------------------- /src/app/components/core/north/north.component.css: -------------------------------------------------------------------------------- 1 | table tr td { 2 | vertical-align: middle; 3 | } 4 | 5 | .is-text { 6 | padding-left: 0; 7 | padding-right: 0; 8 | } 9 | 10 | .fade { 11 | background-color:#f5f5f5 !important; 12 | } 13 | -------------------------------------------------------------------------------- /src/app/components/core/north/north.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { NorthComponent } from './north.component'; 4 | 5 | describe('NorthComponent', () => { 6 | let component: NorthComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NorthComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NorthComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/north/task-schedule/task-schedule.component.css: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | padding-top: 0.85rem; 3 | margin-top: 10px; 4 | font-size: 0.95rem; 5 | margin-bottom: 0.25rem !important; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/components/core/north/task-schedule/task-schedule.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { TaskScheduleComponent } from './task-schedule.component'; 4 | 5 | describe('TaskScheduleComponent', () => { 6 | let component: TaskScheduleComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [TaskScheduleComponent] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(TaskScheduleComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/add-notification-wizard/add-notification-wizard.component.css: -------------------------------------------------------------------------------- 1 | .is-vertical-center { 2 | display: flex; 3 | align-items: center; 4 | } 5 | 6 | .description { 7 | flex-shrink: initial !important; 8 | } 9 | 10 | .dropdown.notification-type, 11 | .retrigger-time { 12 | width: 15%; 13 | } 14 | 15 | .tooltip.has-tooltip-multiline::before { 16 | min-width: 16rem !important; 17 | } 18 | 19 | .container.is-fluid { 20 | margin-top: 10px; 21 | } 22 | 23 | .notification-type-help { 24 | margin: 7px; 25 | } 26 | 27 | .box { 28 | margin-bottom: 1.5rem !important; 29 | } -------------------------------------------------------------------------------- /src/app/components/core/notifications/notification-modal/notification-modal.component.css: -------------------------------------------------------------------------------- 1 | .box { 2 | box-shadow: 0 0 0 0 !important; 3 | } 4 | 5 | .is-hidden { 6 | display: none; 7 | } 8 | 9 | .align { 10 | vertical-align: middle; 11 | } 12 | 13 | .field-body { 14 | flex-grow : 2 !important; 15 | } 16 | 17 | a { color: black; } 18 | 19 | @media screen and (min-width: 769px) { 20 | .modal-card { 21 | width: 80%; 22 | } 23 | } 24 | 25 | .hr-text { 26 | height: 1.5em; 27 | } 28 | 29 | .help-icon { 30 | cursor: pointer !important; 31 | padding-top: 1rem; 32 | } 33 | 34 | .modal-card-head { 35 | padding: 12px !important; 36 | border-top-left-radius: 3px; 37 | border-top-right-radius: 3px; 38 | } 39 | 40 | .modal-subtitle { 41 | margin-top: 0.35rem !important; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/notification.ts: -------------------------------------------------------------------------------- 1 | export interface Notification { 2 | name: string 3 | rule: string 4 | channel: number 5 | notificationType: string 6 | retriggerTime: number 7 | enable: boolean 8 | isServiceEnabled: boolean 9 | } 10 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/notifications.component.css: -------------------------------------------------------------------------------- 1 | .align-content { 2 | vertical-align: middle; 3 | } 4 | 5 | .delete { 6 | margin: 1.5rem; 7 | position: absolute; 8 | top: 0; 9 | right: 0; 10 | } 11 | 12 | .is-text { 13 | padding-left: 0; 14 | padding-right: 0; 15 | } 16 | 17 | .is-hidden { 18 | display: none; 19 | } 20 | 21 | .custom-pad { 22 | margin-top: 6px; 23 | } 24 | 25 | .disable-tag { 26 | opacity: 0.5; 27 | filter: alpha(opacity=50); 28 | } 29 | 30 | button { 31 | margin-top: 0.5rem; 32 | margin-right: 0.2rem; 33 | } 34 | 35 | #refresh-check { 36 | margin: auto; 37 | } 38 | 39 | .fade { 40 | background-color: #f5f5f5 !important; 41 | } 42 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/notifications.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { NotificationsComponent } from './notifications.component'; 4 | 5 | describe('NotificationsComponent', () => { 6 | let component: NotificationsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NotificationsComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NotificationsComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/service-config/service-config.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/core/notifications/service-config/service-config.component.css -------------------------------------------------------------------------------- /src/app/components/core/notifications/service-config/service-config.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/service-config/service-config.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ServiceConfigComponent } from './service-config.component'; 4 | 5 | describe('ServiceConfigComponent', () => { 6 | let component: ServiceConfigComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ ServiceConfigComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ServiceConfigComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/service-config/service-config.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; 2 | import { RolesService } from '../../../../services'; 3 | 4 | @Component({ 5 | selector: 'app-service-config', 6 | templateUrl: './service-config.component.html', 7 | styleUrls: ['./service-config.component.css'] 8 | }) 9 | export class ServiceConfigComponent implements OnInit { 10 | @Output() serviceConfigureModal = new EventEmitter(); 11 | @Input() from: string; 12 | 13 | constructor( 14 | public rolesService: RolesService) {} 15 | 16 | ngOnInit(): void { 17 | } 18 | 19 | /** 20 | * Open Configure Service modal 21 | */ 22 | openConfigureModal() { 23 | this.serviceConfigureModal.emit(true); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/service-warning/service-warning.component.css: -------------------------------------------------------------------------------- 1 | .custom-pad { 2 | margin-right: 20px; 3 | } 4 | 5 | .btn-pad { 6 | margin-top: 6px; 7 | } 8 | 9 | .card-content { 10 | overflow: initial !important; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/components/core/notifications/service-warning/service-warning.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ServiceWarningComponent } from './service-warning.component'; 4 | 5 | describe('ServiceWarningComponent', () => { 6 | let component: ServiceWarningComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ServiceWarningComponent] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ServiceWarningComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/plugin-modal/plugin-modal.component.css: -------------------------------------------------------------------------------- 1 | .loading { 2 | cursor: progress; 3 | } 4 | 5 | :host ::ng-deep ng-select .ng-dropdown-panel { 6 | z-index: 40 !important; 7 | } 8 | 9 | :host ::ng-deep ng-select .ng-dropdown-panel .ng-dropdown-panel-items { 10 | max-height: 200px !important; 11 | } 12 | 13 | :host ::ng-deep ng-select .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled { 14 | color: #848181 !important; 15 | font-size: 0.80rem !important; 16 | } 17 | 18 | :host ::ng-deep ng-select { 19 | font-size: 0.9rem !important; 20 | } 21 | 22 | .modal-card { 23 | overflow: visible !important; 24 | } 25 | 26 | .modal-card-body { 27 | overflow: visible !important; 28 | } -------------------------------------------------------------------------------- /src/app/components/core/plugin-modal/plugin-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { PluginModalComponent } from './plugin-modal.component'; 4 | 5 | describe('PluginModalComponent', () => { 6 | let component: PluginModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ PluginModalComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(PluginModalComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/scheduler/list-schedules/list-schedules.component.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-height: 800px) and (max-height: 955px) { 2 | table.scroll { 3 | max-height: 65vh; 4 | } 5 | } 6 | 7 | @media screen and (max-height: 600px) { 8 | table.scroll { 9 | max-height: 48vh; 10 | } 11 | } 12 | 13 | .fa-minus-circle { 14 | color: rgb(178, 34, 34) 15 | } 16 | 17 | .fade { 18 | background-color:#f5f5f5 !important 19 | } 20 | 21 | .fa::before { 22 | display: inline-block; 23 | } 24 | 25 | .ed-btn { 26 | height: auto; 27 | opacity: 0.8; 28 | } 29 | -------------------------------------------------------------------------------- /src/app/components/core/scheduler/list-schedules/list-schedules.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ListSchedulesComponent } from './list-schedules.component'; 4 | 5 | describe('ListSchedulesComponent', () => { 6 | let component: ListSchedulesComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ListSchedulesComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ListSchedulesComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/scheduler/schedule.ts: -------------------------------------------------------------------------------- 1 | export interface Schedule { 2 | id?: string 3 | name: string 4 | processName?: string 5 | type: any 6 | repeat: number 7 | repeatDay?: number 8 | time: number 9 | day: any 10 | exclusive: boolean 11 | enabled: boolean 12 | } -------------------------------------------------------------------------------- /src/app/components/core/scheduler/update-schedule/update-schedule.component.css: -------------------------------------------------------------------------------- 1 | #repeat_day{ 2 | float: left; 3 | width: 18%; 4 | } 5 | 6 | #repeat_time{ 7 | width: 81%; 8 | margin-left: 1%; 9 | } 10 | 11 | .modal-card { overflow: visible;} 12 | .modal-card-body { overflow: visible; } 13 | 14 | @media screen and (min-width: 769px) { 15 | .modal-card { 16 | width: 50%; 17 | } 18 | } 19 | 20 | :host ::ng-deep .ng-select .ng-select-container { 21 | font-size: 0.8em; 22 | min-height: 0px; 23 | } 24 | 25 | :host ::ng-deep .ng-select.ng-select-single .ng-select-container { 26 | height: 2.3em; 27 | font-size: 0.8em; 28 | } 29 | 30 | :host ::ng-deep .ng-select.ng-select-single .ng-dropdown-panel .ng-dropdown-panel-items { 31 | font-size: 0.8em !important; 32 | } 33 | -------------------------------------------------------------------------------- /src/app/components/core/scheduler/update-schedule/update-schedule.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { UpdateScheduleComponent } from './update-schedule.component'; 4 | 5 | describe('UpdateScheduleComponent', () => { 6 | let component: UpdateScheduleComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UpdateScheduleComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UpdateScheduleComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/service-discovery/index.ts: -------------------------------------------------------------------------------- 1 | export * from './service-discovery.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/service-discovery/service-discovery.component.css: -------------------------------------------------------------------------------- 1 | .hidden { 2 | display: none !important; 3 | } -------------------------------------------------------------------------------- /src/app/components/core/service-discovery/service-discovery.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ServiceDiscoveryComponent } from './service-discovery.component'; 4 | 5 | describe('ServiceDiscoveryComponent', () => { 6 | let component: ServiceDiscoveryComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ServiceDiscoveryComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ServiceDiscoveryComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './settings.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/settings/settings.component.css: -------------------------------------------------------------------------------- 1 | .panel.is-mobile { 2 | margin-top: 10px; 3 | } 4 | 5 | #settings { 6 | overflow: visible; 7 | } 8 | #settings-content { 9 | overflow: visible; 10 | } 11 | 12 | @media screen and (min-width: 769px) { 13 | #connection-content { 14 | overflow: visible; 15 | } 16 | } 17 | 18 | .conn-info { 19 | text-align: right; 20 | font-size: 0.85em; 21 | color: darkgray; 22 | } 23 | 24 | .alert-box { 25 | margin-top: 1rem !important; 26 | } 27 | 28 | .alpha-control { 29 | margin-top: 32px; 30 | } 31 | 32 | .no-padding { 33 | padding: 0px !important; 34 | } 35 | 36 | .additional-services-text { 37 | font-size: 0.75rem; 38 | } 39 | -------------------------------------------------------------------------------- /src/app/components/core/settings/settings.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SettingsComponent } from './settings.component'; 4 | 5 | describe('SettingsComponent', () => { 6 | let component: SettingsComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SettingsComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SettingsComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/south/add-service-wizard/add-service-wizard.component.css: -------------------------------------------------------------------------------- 1 | .hidden { 2 | display: none; 3 | } 4 | 5 | .description { 6 | flex-shrink: initial !important; 7 | } 8 | 9 | .container.is-fluid { 10 | margin-top: 10px; 11 | } 12 | 13 | .help-icon { 14 | cursor: pointer !important; 15 | } 16 | 17 | .enabled-field { 18 | flex-grow: 0.5; 19 | } 20 | 21 | .box { 22 | margin-bottom: 1.5rem !important; 23 | } -------------------------------------------------------------------------------- /src/app/components/core/south/add-service-wizard/add-service-wizard.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { AddServiceWizardComponent } from './add-service-wizard.component'; 4 | 5 | describe('AddServiceWizardComponent', () => { 6 | let component: AddServiceWizardComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AddServiceWizardComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AddServiceWizardComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/south/south-service-modal/south-service-modal.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SouthServiceModalComponent } from './south-service-modal.component'; 4 | 5 | describe('SouthServiceModalComponent', () => { 6 | let component: SouthServiceModalComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SouthServiceModalComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SouthServiceModalComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/south/south-service.ts: -------------------------------------------------------------------------------- 1 | export interface Service { 2 | name: string 3 | address: string 4 | management_port: number 5 | service_port: number 6 | protocol: string 7 | status: string 8 | assets: Asset[] 9 | plugin: Plugin 10 | schedule_enabled: boolean 11 | } 12 | 13 | export interface Asset { 14 | count: number 15 | asset: string 16 | } 17 | 18 | export interface Plugin { 19 | name: string 20 | version: string 21 | } 22 | -------------------------------------------------------------------------------- /src/app/components/core/south/south.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SouthComponent } from './south.component'; 4 | 5 | describe('SouthComponent', () => { 6 | let component: SouthComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SouthComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SouthComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/support/index.ts: -------------------------------------------------------------------------------- 1 | export * from './support.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/support/support.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/core/support/support.component.css -------------------------------------------------------------------------------- /src/app/components/core/support/support.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SupportComponent } from './support.component'; 4 | 5 | describe('SupportComponent', () => { 6 | let component: SupportComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SupportComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SupportComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/system-alert/system-alert.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SystemAlertComponent } from './system-alert.component'; 4 | 5 | describe('SystemAlertComponent', () => { 6 | let component: SystemAlertComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [SystemAlertComponent] 12 | }); 13 | fixture = TestBed.createComponent(SystemAlertComponent); 14 | component = fixture.componentInstance; 15 | fixture.detectChanges(); 16 | }); 17 | 18 | it('should create', () => { 19 | expect(component).toBeTruthy(); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/app/components/core/system-alert/system-alert.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { SystemAlertComponent } from './system-alert.component'; 5 | import { SystemAlertService } from '../../../services'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | SystemAlertComponent 10 | ], 11 | imports: [ 12 | CommonModule 13 | ], 14 | providers: [SystemAlertService], 15 | exports: [SystemAlertComponent] 16 | }) 17 | export class SystemAlertModule { } 18 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/create-user/create-user.component.css: -------------------------------------------------------------------------------- 1 | .user-card-footer { 2 | padding-left: 3rem; 3 | } -------------------------------------------------------------------------------- /src/app/components/core/user-management/create-user/create-user.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { CreateUserComponent } from './create-user.component'; 4 | 5 | describe('CreateUserComponent', () => { 6 | let component: CreateUserComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CreateUserComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CreateUserComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user-management.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/reset-password/reset-password.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/app/components/core/user-management/reset-password/reset-password.component.css -------------------------------------------------------------------------------- /src/app/components/core/user-management/reset-password/reset-password.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { ResetPasswordComponent } from './reset-password.component'; 4 | 5 | describe('ResetPasswordComponent', () => { 6 | let component: ResetPasswordComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ResetPasswordComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ResetPasswordComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/update-user/update-user.component.css: -------------------------------------------------------------------------------- 1 | #update_user_modal { 2 | overflow: visible; 3 | 4 | } 5 | 6 | .modal-card-body { 7 | overflow: visible; 8 | } 9 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/update-user/update-user.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { UpdateUserComponent } from './update-user.component'; 4 | 5 | describe('UpdateUserComponent', () => { 6 | let component: UpdateUserComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UpdateUserComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UpdateUserComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/user-management.component.css: -------------------------------------------------------------------------------- 1 | .fa::before { 2 | display: inline-block; 3 | } 4 | 5 | .tabs { 6 | position: relative; 7 | } 8 | 9 | .context-menu { 10 | border: none; 11 | } 12 | 13 | @media only screen and (min-width: 1024px) { 14 | 15 | .user-table, 16 | .card-data { 17 | overflow: visible; 18 | } 19 | } 20 | 21 | .user-table { 22 | width: 92%; 23 | } 24 | 25 | .tags-groups { 26 | white-space: nowrap; 27 | } 28 | 29 | .desc-col { 30 | max-width: 18rem; 31 | } 32 | 33 | .is-hoverable.user-table tr:hover .context-menu { 34 | background-color: #fafafa; 35 | } 36 | 37 | .action-items { 38 | position: absolute; 39 | right: 0; 40 | } 41 | 42 | #add-user { 43 | border-bottom-width: 0; 44 | } 45 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/user-management.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { UserManagementComponent } from './user-management.component'; 4 | 5 | describe('UserManagementComponent', () => { 6 | let component: UserManagementComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UserManagementComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UserManagementComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/user-profile/user-profile.component.css: -------------------------------------------------------------------------------- 1 | .link-is-small { 2 | font-size: 0.9rem; 3 | } 4 | -------------------------------------------------------------------------------- /src/app/components/core/user-management/user-profile/user-profile.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { UserProfileComponent } from './user-profile.component'; 4 | 5 | describe('UserProfileComponent', () => { 6 | let component: UserProfileComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UserProfileComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UserProfileComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/layout/certificate-base-login/certificate-base-login.component.css: -------------------------------------------------------------------------------- 1 | .field-label { 2 | flex-grow: 2 !important; 3 | } 4 | 5 | .disabled { 6 | color: grey; 7 | } 8 | 9 | .is-fullwidth { 10 | width: 100%; 11 | } 12 | 13 | .btn-txt { 14 | padding-right: 0; 15 | } 16 | 17 | .browse-crt-modal { 18 | padding-top: 40px; 19 | padding-bottom: 48px; 20 | } -------------------------------------------------------------------------------- /src/app/components/layout/certificate-base-login/index.ts: -------------------------------------------------------------------------------- 1 | export * from './certificate-base-login.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/layout/footer/footer.component.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | position: relative; 3 | vertical-align: top; 4 | max-height: 100vh; 5 | overflow-x: hidden; 6 | overflow-y: auto; 7 | width: -webkit-fill-available; 8 | top: 0; 9 | bottom: 0; 10 | padding: 10px; 11 | } -------------------------------------------------------------------------------- /src/app/components/layout/footer/footer.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
{{appVersion}}
4 | 5 | © {{copyrightYear}} DIANOMIC SYSTEMS INC. All Rights Reserved. 6 | 7 |
8 |
-------------------------------------------------------------------------------- /src/app/components/layout/footer/footer.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { FooterComponent } from './footer.component'; 4 | 5 | describe('FooterComponent', () => { 6 | let component: FooterComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ FooterComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(FooterComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/layout/footer/footer.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import * as data from '../../../../git-version.json'; 4 | import * as moment from 'moment'; 5 | 6 | @Component({ 7 | selector: 'app-footer', 8 | templateUrl: 'footer.component.html', 9 | styleUrls: ['./footer.component.css'] 10 | }) 11 | 12 | export class FooterComponent implements OnInit { 13 | public appVersion; 14 | public git = data['default']; 15 | copyrightYear = moment().year(); 16 | 17 | constructor(public router: Router) { } 18 | 19 | ngOnInit(): void { 20 | this.appVersion = `v${this.git.semverString}`; 21 | if (this.git?.distance == 0) { 22 | // released version 23 | this.appVersion = `v${this.git.semverString.replace('+0', '')}` 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/app/components/layout/footer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './footer.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/layout/login/index.ts: -------------------------------------------------------------------------------- 1 | export * from './login.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/layout/login/login.component.css: -------------------------------------------------------------------------------- 1 | .grey-link { 2 | color: grey; 3 | text-decoration: underline; 4 | } 5 | -------------------------------------------------------------------------------- /src/app/components/layout/login/login.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { LoginComponent } from './login.component'; 4 | 5 | describe('LoginComponent', () => { 6 | let component: LoginComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ LoginComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(LoginComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/layout/navbar/navbar.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { NavbarComponent } from './navbar.component'; 4 | 5 | describe('NavbarComponent', () => { 6 | let component: NavbarComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ NavbarComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(NavbarComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/components/layout/side-menu/index.ts: -------------------------------------------------------------------------------- 1 | export * from './side-menu.component'; 2 | -------------------------------------------------------------------------------- /src/app/components/layout/side-menu/side-menu.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 2 | 3 | import { SideMenuComponent } from './side-menu.component'; 4 | 5 | describe('SideMenuComponent', () => { 6 | let component: SideMenuComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(waitForAsync(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SideMenuComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SideMenuComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should be created', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/directives/custom-json-validator.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input } from '@angular/core'; 2 | import { UntypedFormControl, NG_VALIDATORS, Validator } from '@angular/forms'; 3 | 4 | @Directive({ 5 | selector: '[jsonValue][formControlName],[jsonValue][formControl],[jsonValue][ngModel]', 6 | providers: [{ provide: NG_VALIDATORS, useExisting: CustomJsonDirective, multi: true }] 7 | }) 8 | export class CustomJsonDirective implements Validator { 9 | @Input() 10 | jsonValue: string; 11 | parseError: boolean; 12 | validate(c: UntypedFormControl): { [key: string]: any } { 13 | const v = c.value; 14 | try { 15 | this.jsonValue = JSON.parse(v); 16 | this.parseError = false; 17 | } catch (ex) { 18 | this.parseError = true; 19 | } 20 | return (this.parseError) ? { 'jsonValue': true } : null; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/app/directives/custom-max-validator.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input } from '@angular/core'; 2 | import { UntypedFormControl, NG_VALIDATORS, Validator } from '@angular/forms'; 3 | 4 | @Directive({ 5 | selector: '[maxValue][formControlName],[maxValue][formControl],[maxValue][ngModel]', 6 | providers: [{ provide: NG_VALIDATORS, useExisting: CustomMaxDirective, multi: true }] 7 | }) 8 | export class CustomMaxDirective implements Validator { 9 | @Input() 10 | maxValue: number; 11 | 12 | validate(c: UntypedFormControl): { [key: string]: any } { 13 | const v = c.value; 14 | return (+v > +this.maxValue) ? { 'maxValue': true } : null; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/directives/custom-min-validator.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input } from '@angular/core'; 2 | import { UntypedFormControl, NG_VALIDATORS, Validator } from '@angular/forms'; 3 | 4 | @Directive({ 5 | selector: '[minValue][formControlName],[minValue][formControl],[minValue][ngModel]', 6 | providers: [{ provide: NG_VALIDATORS, useExisting: CustomMinDirective, multi: true }] 7 | }) 8 | export class CustomMinDirective implements Validator { 9 | @Input() 10 | minValue: number; 11 | 12 | validate(c: UntypedFormControl): { [key: string]: any } { 13 | const v = c.value; 14 | return (+v < +this.minValue) ? { 'minValue': true } : null; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/directives/empty-space-validator.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | import { NG_VALIDATORS, Validator, AbstractControl } from '@angular/forms'; 3 | 4 | @Directive({ 5 | selector: '[nospaceValidator]', 6 | providers: [{ provide: NG_VALIDATORS, useExisting: EmptySpaceValidatorDirective, multi: true }] 7 | }) 8 | export class EmptySpaceValidatorDirective implements Validator { 9 | 10 | constructor() { } 11 | 12 | nospaceValidator(control: AbstractControl): { [s: string]: boolean } { 13 | if (control.value && control.value.trim() === '') { 14 | return { nospace: true }; 15 | } 16 | } 17 | 18 | validate(control: AbstractControl): { [key: string]: any } | null { 19 | return this.nospaceValidator(control); 20 | } 21 | } -------------------------------------------------------------------------------- /src/app/directives/index.ts: -------------------------------------------------------------------------------- 1 | export * from './number-only.directive'; 2 | export * from './equal-validator.directive'; 3 | -------------------------------------------------------------------------------- /src/app/directives/max-length.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, Input } from '@angular/core'; 2 | import { NG_VALIDATORS, UntypedFormControl, Validator } from '@angular/forms'; 3 | 4 | @Directive({ 5 | selector: '[maxLength][formControlName],[maxLength][formControl],[maxLength][ngModel]', 6 | providers: [{ provide: NG_VALIDATORS, useExisting: MaxLengthDirective, multi: true }] 7 | }) 8 | export class MaxLengthDirective implements Validator { 9 | @Input() maxLength: number; 10 | 11 | validate(control: UntypedFormControl): { [key: string]: any } { 12 | return this.hasValidLength(control.value) && control.value.length > this.maxLength 13 | ? { 'maxLength': true } : null; 14 | } 15 | hasValidLength(value: any): boolean { 16 | return value != null && typeof value.length === 'number'; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/directives/number-only.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostListener } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[appNumberOnly]' 5 | }) 6 | export class NumberOnlyDirective { 7 | 8 | constructor() { } 9 | 10 | @HostListener('keypress') onkeypress(e) { 11 | const event = e || window.event; 12 | if (event) { 13 | return this.isNumberKey(event); 14 | } 15 | } 16 | 17 | isNumberKey(event) { 18 | const charCode = (event.which) ? event.which : event.keyCode; 19 | if (charCode !== 45 && charCode !== 46 && charCode > 31 && (charCode < 48 || charCode > 57)) { 20 | return false; 21 | } 22 | return true; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/app/guards/access.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { RolesService } from '../services'; 4 | 5 | @Injectable() 6 | export class AccessGuard { 7 | constructor(private router: Router, public rolesService: RolesService) { } 8 | canActivate() { 9 | const canAccess = this.rolesService.hasAdminPermissionsOrAnonymousAllowed(); 10 | if (canAccess) { 11 | return true; 12 | } 13 | this.router.navigateByUrl(''); 14 | return false; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/guards/admin.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class AdminGuard { 6 | constructor(private router: Router) { } 7 | canActivate() { 8 | const isAdmin = JSON.parse(sessionStorage.getItem('isAdmin')); 9 | if (isAdmin) { 10 | // logged in as admin then return true 11 | return true; 12 | } 13 | // If not logged in as admin then redirect to dashboard 14 | this.router.navigate(['']); 15 | return false; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/app/guards/auth-required.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class AuthRequiredGuard { 6 | constructor(private router: Router) { } 7 | canActivate() { 8 | if (sessionStorage.getItem('token') || sessionStorage.getItem('LOGIN_SKIPPED') == 'true') { 9 | // return true for (auth=optional) OR (auth=mandatory and token is available) 10 | return true; 11 | } 12 | // redirect to login for auth=mandatory and without any user token i.e. trying to access pages URL 13 | this.router.navigate(['/login']); 14 | return false; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/guards/authenticated-user.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class AuthenticatedUserGuard { 6 | constructor(private router: Router) { } 7 | canActivate() { 8 | if (sessionStorage.getItem('token')) { 9 | // logged in so return true 10 | return true; 11 | } 12 | this.router.navigate(['']); 13 | return false; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/app/guards/can-deactivate/can-deactivate.guard.ts: -------------------------------------------------------------------------------- 1 | import { CanDeactivateFn } from '@angular/router'; 2 | import { Observable } from 'rxjs'; 3 | 4 | export interface CanComponentDeactivate { 5 | canDeactivate?: () => Observable | Promise | boolean; 6 | } 7 | 8 | export const canDeactivateGuard: CanDeactivateFn = 9 | (component: CanComponentDeactivate) => component.canDeactivate ? component.canDeactivate() : true; 10 | -------------------------------------------------------------------------------- /src/app/guards/data-view-role.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | import { RolesService } from '../services'; 4 | 5 | @Injectable() 6 | export class DataViewRoleGuard { 7 | constructor(public rolesService: RolesService) { } 8 | canActivate() { 9 | const isDataViewRole = this.rolesService.hasDataViewRole(); 10 | if (isDataViewRole) { 11 | return false; 12 | } 13 | return true; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/app/guards/developer.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { DeveloperFeaturesService } from '../services/developer-features.service'; 4 | import { RolesService } from '../services'; 5 | 6 | @Injectable() 7 | export class DeveloperGuard { 8 | constructor( 9 | private router: Router, 10 | public rolesService: RolesService, 11 | public developerFeaturesService: DeveloperFeaturesService 12 | ) { } 13 | canActivate() { 14 | const canEdit = this.rolesService.hasEditPermissions(); 15 | if (canEdit) { 16 | const isDeveloper = this.developerFeaturesService.getDeveloperFeatureControl(); 17 | if (isDeveloper) { 18 | return true; 19 | } 20 | } 21 | this.router.navigateByUrl(''); 22 | return false; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/app/guards/index.ts: -------------------------------------------------------------------------------- 1 | export * from './authenticated-user.guard'; 2 | export * from './admin.guard'; 3 | export * from './auth-required.guard'; 4 | export * from './roles.gurad'; 5 | export * from './data-view-role.guard' 6 | export * from './access.guard' 7 | 8 | -------------------------------------------------------------------------------- /src/app/guards/roles.gurad.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { RolesService } from '../services'; 4 | 5 | @Injectable() 6 | export class RolesGuard { 7 | constructor(private router: Router, public rolesService: RolesService) { } 8 | canActivate() { 9 | const canEdit = this.rolesService.hasEditPermissions(); 10 | if (canEdit) { 11 | return true; 12 | } 13 | this.router.navigateByUrl(''); 14 | return false; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/microfrontend/microfrontend.ts: -------------------------------------------------------------------------------- 1 | import { LoadRemoteModuleOptions } from '@angular-architects/module-federation'; 2 | 3 | export type Microfrontend = LoadRemoteModuleOptions & { 4 | displayName: string; 5 | routePath: string; 6 | ngModuleName: string; 7 | }; 8 | -------------------------------------------------------------------------------- /src/app/models/available-services.ts: -------------------------------------------------------------------------------- 1 | // interface for Available Services 2 | 3 | export class AvailableServices { 4 | services: string[]; 5 | link: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/app/models/control/api-flow.ts: -------------------------------------------------------------------------------- 1 | // interface for Control API Entrypoints 2 | 3 | export class APIFlow { 4 | name: string; 5 | description: string; 6 | permitted: boolean; 7 | type: string; 8 | operation_name?: string; 9 | destination: string; 10 | destination_name?: string; 11 | constants: {}; 12 | variables: {}; 13 | anonymous: any; // TODO: FOGL-8070 14 | allow: string[] // List of allowed users' username 15 | } 16 | -------------------------------------------------------------------------------- /src/app/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './user'; 2 | export * from './control/api-flow'; 3 | export * from './available-services'; 4 | export * from './schedules'; 5 | export * from './service'; 6 | export * from './system-alert'; 7 | -------------------------------------------------------------------------------- /src/app/models/schedules.ts: -------------------------------------------------------------------------------- 1 | // interface for Schedule 2 | 3 | export class Schedule { 4 | id: string; 5 | name: string; 6 | processName: boolean; 7 | type: string; 8 | repeat: number; 9 | time: number; 10 | day: number; 11 | exclusive: boolean; 12 | enabled: boolean; 13 | } 14 | -------------------------------------------------------------------------------- /src/app/models/service.ts: -------------------------------------------------------------------------------- 1 | // interface for Service 2 | 3 | export class Service { 4 | name: string; 5 | type: string; 6 | address: string; 7 | management_port: number; 8 | service_port: number; 9 | protocol: string; 10 | status: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/models/system-alert.ts: -------------------------------------------------------------------------------- 1 | // interface for System Alert 2 | 3 | export class SystemAlert { 4 | key: string; 5 | message: string; 6 | timestamp: Date; 7 | urgency: string; 8 | } 9 | 10 | export class SystemAlerts { 11 | alerts: SystemAlert[]; 12 | } 13 | -------------------------------------------------------------------------------- /src/app/models/user.ts: -------------------------------------------------------------------------------- 1 | export class User { 2 | userId: number; 3 | username: string; 4 | real_name: string; 5 | access_method: string; 6 | password: string; 7 | description: string; 8 | confirmPassword: string; 9 | role_id: number; 10 | blockUntil?: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/pipes/date-formatter-pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | import * as moment from 'moment'; 3 | import { TimezoneService } from '../services/timezone.service'; 4 | 5 | /* 6 | * Time helper using momentjs 7 | * Usage: 8 | * timestamp | dateparser:'DD.MM.YYYY' 9 | * Defaults to 'L' - locale ie. '01/24/2017' 10 | */ 11 | @Pipe({ name: 'dateparser' }) 12 | export class DateFormatterPipe implements PipeTransform { 13 | constructor(private timezoneService: TimezoneService) { } 14 | transform(value: string, arg: string): string { 15 | if (value != '') { 16 | const timezone = this.timezoneService.getTimezone(); 17 | const time = timezone === 'local' ? moment.utc(value).local().format(arg) : moment.utc(value).format(arg); 18 | return time; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/pipes/filter.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ 4 | name: 'filter' 5 | }) 6 | @Injectable() 7 | export class FilterPipe implements PipeTransform { 8 | transform(items: any[], field: string, value: string): any[] { 9 | if (!field || !value) { 10 | return items; 11 | } 12 | return items.filter(singleItem => 13 | singleItem.source.toLowerCase().indexOf(value.toLowerCase()) !== -1 || 14 | singleItem.severity.toLowerCase().indexOf(value.toLowerCase()) !== -1) ; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app/pipes/index.ts: -------------------------------------------------------------------------------- 1 | export * from './keys'; 2 | export * from './filter'; 3 | export * from './date-formatter-pipe'; 4 | export * from './search.pipe'; 5 | export * from './truncate.pipe'; 6 | export * from './truncate-middle-of-text.pipe'; -------------------------------------------------------------------------------- /src/app/pipes/keys.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ name: 'keys' }) 4 | export class KeysPipe implements PipeTransform { 5 | transform(value: any): any { 6 | const keys: any[] = []; 7 | for (const key in value) { 8 | keys.push({ key: key, value: value[key] }); 9 | } 10 | return keys; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/app/pipes/pipes.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { DateFormatterPipe, FilterPipe, KeysPipe, SearchPipe, TruncatePipe, TruncateMiddleOfTextPipe } from '.'; 4 | 5 | @NgModule({ 6 | declarations: [DateFormatterPipe, KeysPipe, FilterPipe, SearchPipe, TruncatePipe, TruncateMiddleOfTextPipe], 7 | exports: [DateFormatterPipe, KeysPipe, FilterPipe, SearchPipe, TruncatePipe, TruncateMiddleOfTextPipe] 8 | }) 9 | export class PipesModule { } 10 | -------------------------------------------------------------------------------- /src/app/pipes/truncate-middle-of-text.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ 4 | name: 'truncateMiddleOfText' 5 | }) 6 | export class TruncateMiddleOfTextPipe implements PipeTransform { 7 | transform(value: string, maxLength: number = 16): string { 8 | if (!value || value.length <= maxLength) return value; 9 | const halfLength = Math.floor((maxLength - 3) / 2); // Subtract 3 for "..." 10 | return value.slice(0, halfLength) + '...' + value.slice(-halfLength); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/app/pipes/truncate.pipe.ts: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | @Pipe({ 3 | name: 'truncate' 4 | }) 5 | export class TruncatePipe implements PipeTransform { 6 | transform(item: string, from: string): any { 7 | return item ? item.substring(item.lastIndexOf(from) + 1) : item; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/app/services/acl.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { AclService } from './acl.service'; 4 | 5 | describe('AclService', () => { 6 | let service: AclService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(AclService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/services/assets.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { AssetsService } from './assets.service'; 4 | 5 | describe('AssetsService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [AssetsService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([AssetsService], (service: AssetsService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/audit.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | import { AuditService } from './audit.service'; 3 | 4 | describe('AuditService', () => { 5 | beforeEach(() => { 6 | TestBed.configureTestingModule({ 7 | providers: [AuditService] 8 | }); 9 | }); 10 | 11 | it('should be created', inject([AuditService], (service: AuditService) => { 12 | expect(service).toBeTruthy(); 13 | })); 14 | }); 15 | -------------------------------------------------------------------------------- /src/app/services/backup-restore.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { BackupRestoreService } from './backup-restore.service'; 4 | 5 | describe('BackupRestoreService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [BackupRestoreService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([BackupRestoreService], (service: BackupRestoreService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/configuration-control.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ConfigurationControlService } from './configuration-control.service'; 4 | 5 | describe('ConfigurationControlService', () => { 6 | let service: ConfigurationControlService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ConfigurationControlService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/services/configuration.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { ConfigurationService } from './configuration.service'; 4 | 5 | describe('ConfigurationService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [ConfigurationService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([ConfigurationService], (service: ConfigurationService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/connected-service-status.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BehaviorSubject } from 'rxjs'; 3 | 4 | @Injectable() 5 | export class ConnectedServiceStatus { 6 | private messageSource = new BehaviorSubject(false); 7 | currentMessage = this.messageSource.asObservable(); 8 | 9 | constructor() { } 10 | 11 | changeMessage(connectedServiceStatus: boolean) { 12 | this.messageSource.next(connectedServiceStatus); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/app/services/control-api-flow.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ControlAPIFlowService } from './control-api-flow.service'; 4 | 5 | describe('ControlAPIFlow', () => { 6 | let service: ControlAPIFlowService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ControlAPIFlowService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/services/control-dispatcher.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ControlDispatcherService } from './control-dispatcher.service'; 4 | 5 | describe('ControlDispatcherService', () => { 6 | let service: ControlDispatcherService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ControlDispatcherService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/services/control-pipelines.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { ControlPipelinesService } from './control-pipelines.service'; 4 | 5 | describe('ControlPipelinesService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [ControlPipelinesService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([ControlPipelinesService], (service: ControlPipelinesService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/developer-features.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class DeveloperFeaturesService { 7 | constructor() { } 8 | 9 | public setDeveloperFeatureControl(visible: boolean) { 10 | localStorage.setItem('DEV_FEATURES', JSON.stringify(visible)); 11 | } 12 | 13 | public getDeveloperFeatureControl(): boolean { 14 | const controlStatus: boolean = JSON.parse(localStorage.getItem('DEV_FEATURES')); 15 | return controlStatus ? controlStatus : false; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/app/services/discovery.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { DiscoveryService } from './discovery.service'; 4 | 5 | describe('DiscoveryService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [DiscoveryService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([DiscoveryService], (service: DiscoveryService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/discovery.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient, HttpHeaders } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { throwError } from 'rxjs'; 4 | import { catchError, map } from 'rxjs/operators'; 5 | 6 | import { InterceptorSkipHeader } from '../services/http.request.interceptor'; 7 | 8 | @Injectable() 9 | export class DiscoveryService { 10 | 11 | constructor(private http: HttpClient) { } 12 | 13 | /** 14 | * GET | /fledge/discover 15 | */ 16 | discover(discoveryUrl) { 17 | const headers = new HttpHeaders().set(InterceptorSkipHeader, ''); 18 | return this.http.get(discoveryUrl, { headers: headers }).pipe( 19 | map(response => response), 20 | catchError(error => throwError(error))); 21 | } 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/services/file-import.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { FileImportService } from './file-import.service'; 4 | 5 | describe('FileImportService', () => { 6 | let service: FileImportService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(FileImportService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/services/filter.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { FilterService } from './filter.service'; 4 | 5 | describe('FilterService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: FilterService = TestBed.get(FilterService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/services/generate-csv.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { GenerateCsvService } from './generate-csv.service'; 4 | 5 | describe('GenerateCsvService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: GenerateCsvService = TestBed.get(GenerateCsvService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/services/notifications.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { NotificationsService } from './notifications.service'; 4 | 5 | describe('NotificationsService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: NotificationsService = TestBed.get(NotificationsService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/services/package-manager.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { PackageManagerService } from './package-manager.service'; 4 | 5 | describe('PackageManagerService', () => { 6 | let service: PackageManagerService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(PackageManagerService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/services/packages-log.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { PackagesLogService } from './packages-log.service'; 4 | 5 | describe('PackagesLogService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: PackagesLogService = TestBed.get(PackagesLogService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/services/perfmon.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { environment } from '../../environments/environment'; 4 | import { throwError } from 'rxjs'; 5 | import { catchError, map } from 'rxjs/operators'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class PerfMonService { 11 | 12 | private GET_MONITORS = environment.BASE_URL + 'monitors'; 13 | 14 | constructor(private http: HttpClient) { } 15 | 16 | 17 | public getPerformanceMonitors() { 18 | return this.http.get(this.GET_MONITORS).pipe( 19 | map(response => response), 20 | catchError(error => throwError(error))); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/app/services/ping.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { PingService } from './ping.service'; 4 | 5 | describe('PingService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [PingService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([PingService], (service: PingService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/progress-bar.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ProgressBarService } from './progress-bar.service'; 4 | 5 | describe('ProgressBarService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: ProgressBarService = TestBed.get(ProgressBarService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/app/services/progress-bar.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { NgProgress, NgProgressRef } from 'ngx-progressbar'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class ProgressBarService { 8 | private progressRef: NgProgressRef; 9 | 10 | constructor(public ngProgress: NgProgress) { 11 | this.progressRef = this.ngProgress.ref(); 12 | } 13 | 14 | start() { 15 | this.progressRef.start(); 16 | } 17 | 18 | done() { 19 | this.progressRef.complete(); 20 | } 21 | 22 | set(n?:number) { 23 | this.progressRef.set(n); 24 | } 25 | 26 | inc(amount?:number) { 27 | this.progressRef.inc(amount); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/app/services/response-handler.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { ToastService } from './toast.service'; 3 | 4 | @Injectable( 5 | { providedIn: "root" } 6 | ) 7 | export class ResponseHandler { 8 | 9 | constructor(private toastService: ToastService) { } 10 | 11 | handleResponseMessage(type: string) { 12 | if (type === 'schedule') { 13 | this.toastService.success('Schedule updated successfully.') 14 | } else if (type === 'plugin-config') 15 | this.toastService.success('Configuration updated successfully.'); 16 | else if (type === 'filter-config') { 17 | this.toastService.success('Filter configuration updated successfully.'); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/app/services/schedules.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { SchedulesService } from './schedules.service'; 4 | 5 | describe('SchedulesService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [SchedulesService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([SchedulesService], (service: SchedulesService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/services-api.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { ServicesApiService } from './services-api.service'; 4 | 5 | describe('ServicesApiService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [ServicesApiService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([ServicesApiService], (service: ServicesApiService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/statistics.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { StatisticsService } from './statistics.service'; 4 | 5 | describe('StatisticsService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [StatisticsService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([StatisticsService], (service: StatisticsService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/support.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { SupportService } from './support.service'; 4 | 5 | describe('SupportService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [SupportService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([SupportService], (service: SupportService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/system-alert.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { SystemAlertService } from './system-alert.service'; 4 | 5 | describe('SystemAlertService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [SystemAlertService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([SystemAlertService], (service: SystemAlertService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/system-log.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { SystemLogService } from './system-log.service'; 4 | 5 | describe('SystemLogService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [SystemLogService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([SystemLogService], (service: SystemLogService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/app/services/timezone.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class TimezoneService { 7 | private timezone: string = 'local'; // set default to local 8 | constructor() { } 9 | 10 | setTimezone(val: string) { 11 | this.timezone = val; 12 | } 13 | 14 | getTimezone() { 15 | return this.timezone; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/app/services/user.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { UserService } from './user.service'; 4 | 5 | describe('UserService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [UserService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([UserService], (service: UserService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/assets/favicon.ico -------------------------------------------------------------------------------- /src/assets/fledge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fledge-iot/fledge-gui/459901926a9e11c6b337a2b735bd5e111677c92e/src/assets/fledge.png -------------------------------------------------------------------------------- /src/assets/routes.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | BASE_URL: localStorage.getItem('SERVICE_URL') == 4 | null ? 'http://' + location.hostname + ':8081/fledge/' : localStorage.getItem('SERVICE_URL'), 5 | VERSION: require('../../package.json').version 6 | }; 7 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false, 8 | BASE_URL: localStorage.getItem('SERVICE_URL') == null ? 9 | 'http://' + location.hostname + ':8081/fledge/' : localStorage.getItem('SERVICE_URL'), 10 | VERSION: require('../../package.json').version 11 | }; 12 | -------------------------------------------------------------------------------- /src/fledge.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Fledge 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 |
22 |
23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap') 2 | .catch(err => console.error(err)); 3 | 4 | -------------------------------------------------------------------------------- /src/menu-utils.ts: -------------------------------------------------------------------------------- 1 | import { loadRemoteModule } from '@angular-architects/module-federation'; 2 | import { Routes } from '@angular/router'; 3 | import { appRoutes } from './app/app.routing'; 4 | import { Microfrontend } from './app/microfrontend/microfrontend'; 5 | 6 | export function buildRoutes(options: Microfrontend[]): Routes { 7 | const lazyRoutes: Routes = options.map(o => ({ 8 | path: o.routePath, 9 | loadChildren: () => loadRemoteModule(o).then(m => m[o.ngModuleName]) 10 | })); 11 | 12 | /** 13 | * add redirection routh path after mfe because router order 14 | * is static path first followed by an empty path route 15 | * Read more https://angular.io/guide/router#route-order 16 | */ 17 | lazyRoutes.push({ path: '**', redirectTo: '' }); 18 | // remove list item of appRoutes that is { path: '**', redirectTo: '' } 19 | return [...appRoutes.slice(0, -1), ...lazyRoutes]; 20 | } 21 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "types": ["node"] 7 | }, 8 | "exclude": [ 9 | "test.ts", 10 | "**/*.spec.ts" 11 | ], 12 | "files": [ 13 | "main.ts", 14 | "polyfills.ts" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "baseUrl": "./", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "node" 10 | ] 11 | }, 12 | "files": [ 13 | "test.ts", 14 | "polyfills.ts" 15 | ], 16 | "include": [ 17 | "**/*.spec.ts", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [], 6 | "target": "es2017" 7 | }, 8 | "files": ["src/main.ts", "src/polyfills.ts"], 9 | "include": ["src/**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "importHelpers": true, 7 | "module": "es2020", 8 | "outDir": "./dist/out-tsc", 9 | "declaration": false, 10 | "moduleResolution": "node", 11 | "resolveJsonModule": true, 12 | "emitDecoratorMetadata": true, 13 | "experimentalDecorators": true, 14 | "allowSyntheticDefaultImports": true, 15 | "noUnusedParameters": false, 16 | "target": "ES2022", 17 | "types": [ 18 | "node" 19 | ], 20 | "typeRoots": [ 21 | "node_modules/@types" 22 | ], 23 | "lib": [ 24 | "es2020", 25 | "dom" 26 | ], 27 | "useDefineForClassFields": false 28 | }, 29 | "exclude": ["*.eot", "*.woff2", "*.svg", "*.woff"] 30 | } 31 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config'); 2 | --------------------------------------------------------------------------------