@flightctl/ui-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/fileMock.js +3 -0
- package/dist/__mocks__/fileMock.js.map +1 -0
- package/dist/__mocks__/styleMock.js +3 -0
- package/dist/__mocks__/styleMock.js.map +1 -0
- package/dist/jest.config.js +24 -0
- package/dist/jest.config.js.map +1 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.js +69 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.js.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.css +3 -0
- package/dist/src/components/DetailsPage/DetailsPage.js +42 -0
- package/dist/src/components/DetailsPage/DetailsPage.js.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.js +81 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.js.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.js +30 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.js.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.css +8 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.js +12 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.js.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +27 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.js +24 -0
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.js.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js +22 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js.map +1 -0
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.js +40 -0
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.js.map +1 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js +63 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +57 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.css +4 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +114 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.css +3 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js +50 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.css +3 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.js +34 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.js +38 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +31 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -0
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js +87 -0
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js.map +1 -0
- package/dist/src/components/Device/DeviceList/DeviceList.js +157 -0
- package/dist/src/components/Device/DeviceList/DeviceList.js.map +1 -0
- package/dist/src/components/Device/DeviceList/DeviceTableRow.js +62 -0
- package/dist/src/components/Device/DeviceList/DeviceTableRow.js.map +1 -0
- package/dist/src/components/Device/DeviceList/DeviceTableToolbar.js +80 -0
- package/dist/src/components/Device/DeviceList/DeviceTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DeviceList/types.js +4 -0
- package/dist/src/components/Device/DeviceList/types.js.map +1 -0
- package/dist/src/components/Device/DeviceList/useDeviceBackendFilters.js +94 -0
- package/dist/src/components/Device/DeviceList/useDeviceBackendFilters.js.map +1 -0
- package/dist/src/components/Device/DeviceList/useDeviceFilters.js +16 -0
- package/dist/src/components/Device/DeviceList/useDeviceFilters.js.map +1 -0
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js +98 -0
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.css +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +92 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js +32 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js +36 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +171 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +15 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js +22 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.css +3 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js +96 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js +94 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +45 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.js +48 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +45 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/types.js +3 -0
- package/dist/src/components/Device/EditDeviceWizard/types.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.js +35 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.js +65 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.js +39 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.js.map +1 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.js +46 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.js.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.css +3 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +103 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +42 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -0
- package/dist/src/components/ErrorAlert/ErrorAlert.js +13 -0
- package/dist/src/components/ErrorAlert/ErrorAlert.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.css +3 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +82 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js +32 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +85 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js +30 -0
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +46 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/types.js +3 -0
- package/dist/src/components/Fleet/CreateFleet/types.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.js +35 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.js +143 -0
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -0
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.js +55 -0
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.js +49 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js +69 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js +40 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js +37 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js +29 -0
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js.map +1 -0
- package/dist/src/components/Fleet/FleetList.js +130 -0
- package/dist/src/components/Fleet/FleetList.js.map +1 -0
- package/dist/src/components/Fleet/FleetRow.js +64 -0
- package/dist/src/components/Fleet/FleetRow.js.map +1 -0
- package/dist/src/components/Fleet/FleetStatus.js +34 -0
- package/dist/src/components/Fleet/FleetStatus.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.css +3 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js +106 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +69 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js +31 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.js +37 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.js +3 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.js.map +1 -0
- package/dist/src/components/Fleet/ResourceSyncRow.js +36 -0
- package/dist/src/components/Fleet/ResourceSyncRow.js.map +1 -0
- package/dist/src/components/ListPage/ListPage.js +12 -0
- package/dist/src/components/ListPage/ListPage.js.map +1 -0
- package/dist/src/components/ListPage/ListPageActions.js +30 -0
- package/dist/src/components/ListPage/ListPageActions.js.map +1 -0
- package/dist/src/components/ListPage/ListPageBody.js +21 -0
- package/dist/src/components/ListPage/ListPageBody.js.map +1 -0
- package/dist/src/components/ListPage/types.js +3 -0
- package/dist/src/components/ListPage/types.js.map +1 -0
- package/dist/src/components/NavItem/NavItem.js +20 -0
- package/dist/src/components/NavItem/NavItem.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js +30 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js +32 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +61 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js +64 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js +30 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.js +31 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js +46 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +1 -0
- package/dist/src/components/OverviewPage/Overview.js +16 -0
- package/dist/src/components/OverviewPage/Overview.js.map +1 -0
- package/dist/src/components/OverviewPage/OverviewPage.js +17 -0
- package/dist/src/components/OverviewPage/OverviewPage.js.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js +102 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.css +7 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +215 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +31 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -0
- package/dist/src/components/Repository/CreateRepository/types.js +3 -0
- package/dist/src/components/Repository/CreateRepository/types.js.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.js +454 -0
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js +93 -0
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +39 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js +64 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js +18 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js +24 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js +64 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js.map +1 -0
- package/dist/src/components/Repository/RepositoryList.js +133 -0
- package/dist/src/components/Repository/RepositoryList.js.map +1 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.css +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +140 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js +65 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js.map +1 -0
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.js +49 -0
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.js.map +1 -0
- package/dist/src/components/Status/ApplicationStatus.js +23 -0
- package/dist/src/components/Status/ApplicationStatus.js.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.js +23 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.js.map +1 -0
- package/dist/src/components/Status/DeviceResourceStatus.js +84 -0
- package/dist/src/components/Status/DeviceResourceStatus.js.map +1 -0
- package/dist/src/components/Status/DeviceStatus.js +18 -0
- package/dist/src/components/Status/DeviceStatus.js.map +1 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.js +18 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.js.map +1 -0
- package/dist/src/components/Status/IntegrityStatus.js +17 -0
- package/dist/src/components/Status/IntegrityStatus.js.map +1 -0
- package/dist/src/components/Status/RepositoryStatus.js +37 -0
- package/dist/src/components/Status/RepositoryStatus.js.map +1 -0
- package/dist/src/components/Status/StatusDisplay.css +9 -0
- package/dist/src/components/Status/StatusDisplay.js +33 -0
- package/dist/src/components/Status/StatusDisplay.js.map +1 -0
- package/dist/src/components/Status/SystemUpdateStatus.js +24 -0
- package/dist/src/components/Status/SystemUpdateStatus.js.map +1 -0
- package/dist/src/components/Status/SystemdStatus.js +21 -0
- package/dist/src/components/Status/SystemdStatus.js.map +1 -0
- package/dist/src/components/Status/utils.js +10 -0
- package/dist/src/components/Status/utils.js.map +1 -0
- package/dist/src/components/Table/Table.js +28 -0
- package/dist/src/components/Table/Table.js.map +1 -0
- package/dist/src/components/Table/TableActions.js +16 -0
- package/dist/src/components/Table/TableActions.js.map +1 -0
- package/dist/src/components/Table/TableTextSearch.js +13 -0
- package/dist/src/components/Table/TableTextSearch.js.map +1 -0
- package/dist/src/components/Terminal/Terminal.css +1 -0
- package/dist/src/components/Terminal/Terminal.js +79 -0
- package/dist/src/components/Terminal/Terminal.js.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.js +34 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.js.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.js +19 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.js.map +1 -0
- package/dist/src/components/charts/DonutChart.css +10 -0
- package/dist/src/components/charts/DonutChart.js +47 -0
- package/dist/src/components/charts/DonutChart.js.map +1 -0
- package/dist/src/components/common/CopyButton.js +18 -0
- package/dist/src/components/common/CopyButton.js.map +1 -0
- package/dist/src/components/common/EditableLabelControl.js +39 -0
- package/dist/src/components/common/EditableLabelControl.js.map +1 -0
- package/dist/src/components/common/ErrorBoundary.js +36 -0
- package/dist/src/components/common/ErrorBoundary.js.map +1 -0
- package/dist/src/components/common/HelperTextItems.js +25 -0
- package/dist/src/components/common/HelperTextItems.js.map +1 -0
- package/dist/src/components/common/LabelsView.css +9 -0
- package/dist/src/components/common/LabelsView.js +18 -0
- package/dist/src/components/common/LabelsView.js.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.js +51 -0
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -0
- package/dist/src/components/common/ResourceLink.css +29 -0
- package/dist/src/components/common/ResourceLink.js +30 -0
- package/dist/src/components/common/ResourceLink.js.map +1 -0
- package/dist/src/components/common/ResourceListEmptyState.js +10 -0
- package/dist/src/components/common/ResourceListEmptyState.js.map +1 -0
- package/dist/src/components/common/WithHelperText.css +3 -0
- package/dist/src/components/common/WithHelperText.js +16 -0
- package/dist/src/components/common/WithHelperText.js.map +1 -0
- package/dist/src/components/common/WithTooltip.js +8 -0
- package/dist/src/components/common/WithTooltip.js.map +1 -0
- package/dist/src/components/form/CheckboxField.js +29 -0
- package/dist/src/components/form/CheckboxField.js.map +1 -0
- package/dist/src/components/form/FieldHelperText.js +27 -0
- package/dist/src/components/form/FieldHelperText.js.map +1 -0
- package/dist/src/components/form/FilterSelect.css +8 -0
- package/dist/src/components/form/FilterSelect.js +30 -0
- package/dist/src/components/form/FilterSelect.js.map +1 -0
- package/dist/src/components/form/FlightCtlActionGroup.css +9 -0
- package/dist/src/components/form/FlightCtlActionGroup.js +10 -0
- package/dist/src/components/form/FlightCtlActionGroup.js.map +1 -0
- package/dist/src/components/form/FlightCtlForm.js +13 -0
- package/dist/src/components/form/FlightCtlForm.js.map +1 -0
- package/dist/src/components/form/FormSelect.css +8 -0
- package/dist/src/components/form/FormSelect.js +50 -0
- package/dist/src/components/form/FormSelect.js.map +1 -0
- package/dist/src/components/form/LabelsField.js +61 -0
- package/dist/src/components/form/LabelsField.js.map +1 -0
- package/dist/src/components/form/NameField.js +63 -0
- package/dist/src/components/form/NameField.js.map +1 -0
- package/dist/src/components/form/RadioField.js +32 -0
- package/dist/src/components/form/RadioField.js.map +1 -0
- package/dist/src/components/form/RichValidationTextField.js +66 -0
- package/dist/src/components/form/RichValidationTextField.js.map +1 -0
- package/dist/src/components/form/TextAreaField.js +28 -0
- package/dist/src/components/form/TextAreaField.js.map +1 -0
- package/dist/src/components/form/TextField.js +29 -0
- package/dist/src/components/form/TextField.js.map +1 -0
- package/dist/src/components/form/validations.js +286 -0
- package/dist/src/components/form/validations.js.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js +36 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +43 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.css +24 -0
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.js +62 -0
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.js.map +1 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.js +14 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.js.map +1 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.js +41 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.js.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +63 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.css +4 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js +126 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js +64 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +84 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +94 -0
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.js +62 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.js.map +1 -0
- package/dist/src/constants.js +8 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/hooks/useAppContext.js +61 -0
- package/dist/src/hooks/useAppContext.js.map +1 -0
- package/dist/src/hooks/useDeviceLabelMatch.js +78 -0
- package/dist/src/hooks/useDeviceLabelMatch.js.map +1 -0
- package/dist/src/hooks/useDocumentTitle.js +17 -0
- package/dist/src/hooks/useDocumentTitle.js.map +1 -0
- package/dist/src/hooks/useFetch.js +10 -0
- package/dist/src/hooks/useFetch.js.map +1 -0
- package/dist/src/hooks/useFetchPeriodically.js +75 -0
- package/dist/src/hooks/useFetchPeriodically.js.map +1 -0
- package/dist/src/hooks/useNavigate.js +65 -0
- package/dist/src/hooks/useNavigate.js.map +1 -0
- package/dist/src/hooks/useTableSelect.js +45 -0
- package/dist/src/hooks/useTableSelect.js.map +1 -0
- package/dist/src/hooks/useTableSort.js +38 -0
- package/dist/src/hooks/useTableSort.js.map +1 -0
- package/dist/src/hooks/useTableTextSearch.js +23 -0
- package/dist/src/hooks/useTableTextSearch.js.map +1 -0
- package/dist/src/hooks/useTemplateVersion.js +22 -0
- package/dist/src/hooks/useTemplateVersion.js.map +1 -0
- package/dist/src/hooks/useThemePreferences.js +61 -0
- package/dist/src/hooks/useThemePreferences.js.map +1 -0
- package/dist/src/hooks/useTranslation.js +12 -0
- package/dist/src/hooks/useTranslation.js.map +1 -0
- package/dist/src/hooks/useUserPreferences.js +16 -0
- package/dist/src/hooks/useUserPreferences.js.map +1 -0
- package/dist/src/hooks/useWebSocket.js +69 -0
- package/dist/src/hooks/useWebSocket.js.map +1 -0
- package/dist/src/setupTests.js +24 -0
- package/dist/src/setupTests.js.map +1 -0
- package/dist/src/tests/test-utils.js +21 -0
- package/dist/src/tests/test-utils.js.map +1 -0
- package/dist/src/types/deviceSpec.js +20 -0
- package/dist/src/types/deviceSpec.js.map +1 -0
- package/dist/src/types/extraTypes.js +20 -0
- package/dist/src/types/extraTypes.js.map +1 -0
- package/dist/src/types/typeUtils.js +12 -0
- package/dist/src/types/typeUtils.js.map +1 -0
- package/dist/src/utils/api.js +68 -0
- package/dist/src/utils/api.js.map +1 -0
- package/dist/src/utils/dates.js +53 -0
- package/dist/src/utils/dates.js.map +1 -0
- package/dist/src/utils/devices.js +37 -0
- package/dist/src/utils/devices.js.map +1 -0
- package/dist/src/utils/error.js +25 -0
- package/dist/src/utils/error.js.map +1 -0
- package/dist/src/utils/labels.js +44 -0
- package/dist/src/utils/labels.js.map +1 -0
- package/dist/src/utils/metrics.js +48 -0
- package/dist/src/utils/metrics.js.map +1 -0
- package/dist/src/utils/patch.js +108 -0
- package/dist/src/utils/patch.js.map +1 -0
- package/dist/src/utils/resource.js +6 -0
- package/dist/src/utils/resource.js.map +1 -0
- package/dist/src/utils/search.js +14 -0
- package/dist/src/utils/search.js.map +1 -0
- package/dist/src/utils/sort/device.js +89 -0
- package/dist/src/utils/sort/device.js.map +1 -0
- package/dist/src/utils/sort/fleet.js +20 -0
- package/dist/src/utils/sort/fleet.js.map +1 -0
- package/dist/src/utils/sort/generic.js +34 -0
- package/dist/src/utils/sort/generic.js.map +1 -0
- package/dist/src/utils/sort/repository.js +28 -0
- package/dist/src/utils/sort/repository.js.map +1 -0
- package/dist/src/utils/sort/resourceSync.js +29 -0
- package/dist/src/utils/sort/resourceSync.js.map +1 -0
- package/dist/src/utils/status/applications.js +56 -0
- package/dist/src/utils/status/applications.js.map +1 -0
- package/dist/src/utils/status/common.js +63 -0
- package/dist/src/utils/status/common.js.map +1 -0
- package/dist/src/utils/status/devices.js +65 -0
- package/dist/src/utils/status/devices.js.map +1 -0
- package/dist/src/utils/status/enrollmentRequest.js +49 -0
- package/dist/src/utils/status/enrollmentRequest.js.map +1 -0
- package/dist/src/utils/status/fleet.js +38 -0
- package/dist/src/utils/status/fleet.js.map +1 -0
- package/dist/src/utils/status/integrity.js +28 -0
- package/dist/src/utils/status/integrity.js.map +1 -0
- package/dist/src/utils/status/repository.js +88 -0
- package/dist/src/utils/status/repository.js.map +1 -0
- package/dist/src/utils/status/system.js +29 -0
- package/dist/src/utils/status/system.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileMock.js","sourceRoot":"","sources":["../../__mocks__/fileMock.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleMock.js","sourceRoot":"","sources":["../../__mocks__/styleMock.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// For a detailed explanation regarding each configuration property, visit:
|
|
3
|
+
// https://jestjs.io/docs/en/configuration.html
|
|
4
|
+
module.exports = {
|
|
5
|
+
// Automatically clear mock calls and instances between every test
|
|
6
|
+
clearMocks: true,
|
|
7
|
+
// Indicates whether the coverage information should be collected while executing the test
|
|
8
|
+
collectCoverage: false,
|
|
9
|
+
// The directory where Jest should output its coverage files
|
|
10
|
+
coverageDirectory: 'coverage',
|
|
11
|
+
// An array of directory names to be searched recursively up from the requiring module's location
|
|
12
|
+
moduleDirectories: ['node_modules', '<rootDir>/src'],
|
|
13
|
+
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
|
|
14
|
+
// A map from regular expressions to module names that allow to stub out resources with a single module
|
|
15
|
+
moduleNameMapper: {
|
|
16
|
+
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
|
|
17
|
+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
|
|
18
|
+
},
|
|
19
|
+
// A preset that is used as a base for Jest's configuration
|
|
20
|
+
preset: 'ts-jest/presets/js-with-ts',
|
|
21
|
+
// The test environment that will be used for testing.
|
|
22
|
+
testEnvironment: 'jest-environment-jsdom',
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=jest.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.js"],"names":[],"mappings":";AAAA,2EAA2E;AAC3E,+CAA+C;AAE/C,MAAM,CAAC,OAAO,GAAG;IACf,kEAAkE;IAClE,UAAU,EAAE,IAAI;IAEhB,0FAA0F;IAC1F,eAAe,EAAE,KAAK;IAEtB,4DAA4D;IAC5D,iBAAiB,EAAE,UAAU;IAE7B,iGAAiG;IACjG,iBAAiB,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;IAEpD,kBAAkB,EAAE,CAAC,6BAA6B,CAAC;IAEnD,uGAAuG;IACvG,gBAAgB,EAAE;QAChB,gBAAgB,EAAE,kCAAkC;QACpD,qFAAqF,EACnF,iCAAiC;KACpC;IAED,2DAA2D;IAC3D,MAAM,EAAE,4BAA4B;IAEpC,sDAAsD;IACtD,eAAe,EAAE,wBAAwB;CAC1C,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const exclamation_triangle_icon_1 = require("@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon");
|
|
7
|
+
const react_i18next_1 = require("react-i18next");
|
|
8
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
9
|
+
const useNavigate_1 = require("../../hooks/useNavigate");
|
|
10
|
+
const getKindMsgs = (t, kind, id) => {
|
|
11
|
+
switch (kind) {
|
|
12
|
+
case 'Fleets':
|
|
13
|
+
return {
|
|
14
|
+
title: t('Fleet not found'),
|
|
15
|
+
msg: (React.createElement(react_i18next_1.Trans, { t: t },
|
|
16
|
+
"We could not find the fleet with id ",
|
|
17
|
+
React.createElement("strong", null, id))),
|
|
18
|
+
};
|
|
19
|
+
case 'Devices':
|
|
20
|
+
return {
|
|
21
|
+
title: t('Device not found'),
|
|
22
|
+
msg: (React.createElement(react_i18next_1.Trans, { t: t },
|
|
23
|
+
"We could not find the device with id ",
|
|
24
|
+
React.createElement("strong", null, id))),
|
|
25
|
+
};
|
|
26
|
+
case 'Repositories':
|
|
27
|
+
return {
|
|
28
|
+
title: t('Repository not found'),
|
|
29
|
+
msg: (React.createElement(react_i18next_1.Trans, { t: t },
|
|
30
|
+
"We could not find the repository with id ",
|
|
31
|
+
React.createElement("strong", null, id))),
|
|
32
|
+
};
|
|
33
|
+
case 'Enrollment requests':
|
|
34
|
+
return {
|
|
35
|
+
title: t('Enrollment request not found'),
|
|
36
|
+
msg: (React.createElement(react_i18next_1.Trans, { t: t },
|
|
37
|
+
"We could not find the enrollment request with id ",
|
|
38
|
+
React.createElement("strong", null, id))),
|
|
39
|
+
};
|
|
40
|
+
default:
|
|
41
|
+
return {
|
|
42
|
+
title: kind.toLowerCase(),
|
|
43
|
+
msg: '',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const DetailsNotFound = ({ kind, id }) => {
|
|
48
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
49
|
+
const navigate = (0, useNavigate_1.useNavigate)();
|
|
50
|
+
const tryAgain = () => {
|
|
51
|
+
navigate(0);
|
|
52
|
+
};
|
|
53
|
+
const { title, msg } = getKindMsgs(t, kind, id);
|
|
54
|
+
return (React.createElement(react_core_1.PageSection, null,
|
|
55
|
+
React.createElement(react_core_1.EmptyState, { variant: "full" },
|
|
56
|
+
React.createElement(react_core_1.EmptyStateHeader, { titleText: title, icon: React.createElement(react_core_1.EmptyStateIcon, { icon: exclamation_triangle_icon_1.ExclamationTriangleIcon }), headingLevel: "h1" }),
|
|
57
|
+
React.createElement(react_core_1.EmptyStateBody, null,
|
|
58
|
+
React.createElement(react_core_1.Stack, null,
|
|
59
|
+
React.createElement(react_core_1.StackItem, null, msg),
|
|
60
|
+
React.createElement(react_core_1.StackItem, null,
|
|
61
|
+
React.createElement("small", null, t('This page will continue to attempt to fetch the details'))))),
|
|
62
|
+
React.createElement(react_core_1.EmptyStateFooter, null,
|
|
63
|
+
React.createElement(react_core_1.EmptyStateActions, null,
|
|
64
|
+
React.createElement(react_core_1.Button, { variant: "primary", onClick: () => navigate(useNavigate_1.ROUTE.ROOT) }, t('Take me home'))),
|
|
65
|
+
React.createElement(react_core_1.EmptyStateActions, null,
|
|
66
|
+
React.createElement(react_core_1.Button, { variant: "link", onClick: tryAgain }, t('Try refreshing manually')))))));
|
|
67
|
+
};
|
|
68
|
+
exports.default = DetailsNotFound;
|
|
69
|
+
//# sourceMappingURL=DetailsNotFound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsNotFound.js","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsNotFound.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAWgC;AAChC,+GAA0G;AAC1G,iDAAsC;AACtC,+DAA4D;AAE5D,yDAA6D;AAO7D,MAAM,WAAW,GAAG,CAAC,CAAY,EAAE,IAAY,EAAE,EAAU,EAAE,EAAE;IAC7D,QAAQ,IAAI,EAA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AE,IAAI,EAAE,EAAE,CAAC,CAAC;IAEhD,OAAO,CACL,oBAAC,wBAAW;QACV,oBAAC,uBAAU,IAAC,OAAO,EAAC,MAAM;YACxB,oBAAC,6BAAgB,IACf,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,oBAAC,2BAAc,IAAC,IAAI,EAAE,mDAAuB,GAAI,EACvD,YAAY,EAAC,IAAI,GACjB;YACF,oBAAC,2BAAc;gBACb,oBAAC,kBAAK;oBACJ,oBAAC,sBAAS,QAAE,GAAG,CAAa;oBAC5B,oBAAC,sBAAS;wBACR,mCAAQ,CAAC,CAAC,yDAAyD,CAAC,CAAS,CACnE,CACN,CACO;YACjB,oBAAC,6BAAgB;gBACf,oBAAC,8BAAiB;oBAChB,oBAAC,mBAAM,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAK,CAAC,IAAI,CAAC,IAC1D,CAAC,CAAC,cAAc,CAAC,CACX,CACS;gBACpB,oBAAC,8BAAiB;oBAChB,oBAAC,mBAAM,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,QAAQ,IACrC,CAAC,CAAC,yBAAyB,CAAC,CACtB,CACS,CACH,CACR,CACD,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const error_1 = require("../../utils/error");
|
|
7
|
+
const DetailsNotFound_1 = tslib_1.__importDefault(require("./DetailsNotFound"));
|
|
8
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
9
|
+
const useNavigate_1 = require("../../hooks/useNavigate");
|
|
10
|
+
const ErrorBoundary_1 = tslib_1.__importDefault(require("../common/ErrorBoundary"));
|
|
11
|
+
require("./DetailsPage.css");
|
|
12
|
+
const DetailsPage = ({ id, title, children, error, loading, resourceLink, resourceType, resourceTypeLabel, actions, nav, }) => {
|
|
13
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
14
|
+
let content = children;
|
|
15
|
+
if (error) {
|
|
16
|
+
const msg = (0, error_1.getErrorMessage)(error);
|
|
17
|
+
if (msg === 'Error 404: Not Found') {
|
|
18
|
+
return React.createElement(DetailsNotFound_1.default, { kind: resourceType, id: id });
|
|
19
|
+
}
|
|
20
|
+
content = (React.createElement(react_core_1.Alert, { isInline: true, variant: "danger", title: t('Failed to retrieve resource details') }, (0, error_1.getErrorMessage)(error)));
|
|
21
|
+
}
|
|
22
|
+
else if (loading) {
|
|
23
|
+
content = (React.createElement(react_core_1.Bullseye, null,
|
|
24
|
+
React.createElement(react_core_1.Spinner, null)));
|
|
25
|
+
}
|
|
26
|
+
return (React.createElement(React.Fragment, null,
|
|
27
|
+
React.createElement(react_core_1.PageSection, { variant: "light", type: "breadcrumb" },
|
|
28
|
+
React.createElement(react_core_1.Breadcrumb, null,
|
|
29
|
+
React.createElement(react_core_1.BreadcrumbItem, null,
|
|
30
|
+
React.createElement(useNavigate_1.Link, { to: resourceLink }, resourceTypeLabel)),
|
|
31
|
+
React.createElement(react_core_1.BreadcrumbItem, { isActive: true }, title || id))),
|
|
32
|
+
React.createElement(react_core_1.PageSection, { variant: "light" },
|
|
33
|
+
React.createElement(react_core_1.Split, { hasGutter: true },
|
|
34
|
+
React.createElement(react_core_1.SplitItem, { isFilled: true },
|
|
35
|
+
React.createElement(react_core_1.Title, { headingLevel: "h1", size: "3xl", role: "heading" }, title || id)),
|
|
36
|
+
React.createElement(react_core_1.SplitItem, null, actions))),
|
|
37
|
+
nav && (React.createElement(react_core_1.PageSection, { variant: "light", type: "nav", className: "fctl-details-page__nav" }, nav)),
|
|
38
|
+
React.createElement(react_core_1.PageSection, null,
|
|
39
|
+
React.createElement(ErrorBoundary_1.default, null, content))));
|
|
40
|
+
};
|
|
41
|
+
exports.default = DetailsPage;
|
|
42
|
+
//# sourceMappingURL=DetailsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsPage.js","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsPage.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAUgC;AAEhC,6CAAoD;AACpD,gFAAgD;AAChD,+DAA4D;AAC5D,yDAAsD;AACtD,oFAAoD;AAEpD,6BAA2B;AAe3B,MAAM,WAAW,GAA+B,CAAC,EAC/C,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,OAAO,EACP,GAAG,GACJ,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,IAAI,OAAO,GAAG,QAAQ,CAAC;IACvB,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,GAAG,GAAG,IAAA,uBAAe,EAAC,KAAK,CAAC,CAAC;QACnC,IAAI,GAAG,KAAK,sBAAsB,EAAE,CAAC;YACnC,OAAO,oBAAC,yBAAe,IAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,GAAI,CAAC;QACzD,CAAC;QACD,OAAO,GAAG,CACR,oBAAC,kBAAK,IAAC,QAAQ,QAAC,OAAO,EAAC,QAAQ,EAAC,KAAK,EAAE,CAAC,CAAC,qCAAqC,CAAC,IAC7E,IAAA,uBAAe,EAAC,KAAK,CAAC,CACjB,CACT,CAAC;IACJ,CAAC;SAAM,IAAI,OAAO,EAAE,CAAC;QACnB,OAAO,GAAG,CACR,oBAAC,qBAAQ;YACP,oBAAC,oBAAO,OAAG,CACF,CACZ,CAAC;IACJ,CAAC;IAED,OAAO,CACL;QACE,oBAAC,wBAAW,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY;YAC5C,oBAAC,uBAAU;gBACT,oBAAC,2BAAc;oBACb,oBAAC,kBAAI,IAAC,EAAE,EAAE,YAAY,IAAG,iBAAiB,CAAQ,CACnC;gBACjB,oBAAC,2BAAc,IAAC,QAAQ,UAAE,KAAK,IAAI,EAAE,CAAkB,CAC5C,CACD;QACd,oBAAC,wBAAW,IAAC,OAAO,EAAC,OAAO;YAC1B,oBAAC,kBAAK,IAAC,SAAS;gBACd,oBAAC,sBAAS,IAAC,QAAQ;oBACjB,oBAAC,kBAAK,IAAC,YAAY,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,IAC/C,KAAK,IAAI,EAAE,CACN,CACE;gBACZ,oBAAC,sBAAS,QAAE,OAAO,CAAa,CAC1B,CACI;QACb,GAAG,IAAI,CACN,oBAAC,wBAAW,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAC,wBAAwB,IACvE,GAAG,CACQ,CACf;QACD,oBAAC,wBAAW;YACV,oBAAC,uBAAa,QAAE,OAAO,CAAiB,CAC5B,CACb,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const test_utils_1 = require("../../tests/test-utils");
|
|
6
|
+
const DetailsPage_1 = tslib_1.__importDefault(require("./DetailsPage"));
|
|
7
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
8
|
+
const useNavigate_1 = require("../../hooks/useNavigate");
|
|
9
|
+
const baseProps = {
|
|
10
|
+
id: 'device-id',
|
|
11
|
+
title: 'MyTitle',
|
|
12
|
+
children: null,
|
|
13
|
+
error: null,
|
|
14
|
+
loading: false,
|
|
15
|
+
resourceLink: useNavigate_1.ROUTE.DEVICES,
|
|
16
|
+
resourceType: 'Devices',
|
|
17
|
+
resourceTypeLabel: 'Devices',
|
|
18
|
+
actions: undefined,
|
|
19
|
+
nav: undefined,
|
|
20
|
+
};
|
|
21
|
+
describe('Details page', () => {
|
|
22
|
+
it('is accessible', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
const { container } = (0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps), "Content"));
|
|
24
|
+
yield (0, test_utils_1.checkAccessibility)(container);
|
|
25
|
+
}));
|
|
26
|
+
describe('loading state', () => {
|
|
27
|
+
it('Shows a spinner and not the content when data is loading', () => {
|
|
28
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { loading: true }), "Content"));
|
|
29
|
+
expect(test_utils_1.screen.getByRole('progressbar')).toBeInTheDocument();
|
|
30
|
+
expect(test_utils_1.screen.queryByText('Content')).not.toBeInTheDocument();
|
|
31
|
+
});
|
|
32
|
+
it('Shows the content and not the spinner when it is not loading', () => {
|
|
33
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps), "Content"));
|
|
34
|
+
expect(test_utils_1.screen.queryByRole('progressbar')).not.toBeInTheDocument();
|
|
35
|
+
expect(test_utils_1.screen.getByText('Content')).toBeInTheDocument();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
describe('when in error state', () => {
|
|
39
|
+
const error = new Error('something bad happened');
|
|
40
|
+
it('shows the error message', () => {
|
|
41
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { error: error }), "Content"));
|
|
42
|
+
expect(test_utils_1.screen.getByText('Failed to retrieve resource details')).toBeInTheDocument();
|
|
43
|
+
expect(test_utils_1.screen.getByText('something bad happened')).toBeInTheDocument();
|
|
44
|
+
});
|
|
45
|
+
it('does not show the content', () => {
|
|
46
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { error: error }), "Content"));
|
|
47
|
+
expect(test_utils_1.screen.getByText('something bad happened')).toBeInTheDocument();
|
|
48
|
+
expect(test_utils_1.screen.queryByText('Content')).not.toBeInTheDocument();
|
|
49
|
+
});
|
|
50
|
+
it('shows PageNotFound if error is 404', () => {
|
|
51
|
+
const error404 = new Error('Error 404: Not Found');
|
|
52
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { error: error404 }), "Content"));
|
|
53
|
+
expect(test_utils_1.screen.getByText('Device not found')).toBeInTheDocument();
|
|
54
|
+
expect(test_utils_1.screen.queryByText('Content')).not.toBeInTheDocument();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe('Content', () => {
|
|
58
|
+
it('shows a link to the parent section', () => {
|
|
59
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps), "Content"));
|
|
60
|
+
expect(test_utils_1.screen.getByRole('link')).toHaveTextContent('Devices');
|
|
61
|
+
expect(test_utils_1.screen.getByRole('link')).toHaveAttribute('href', '/devicemanagement/devices');
|
|
62
|
+
});
|
|
63
|
+
it('shows the title over the id', () => {
|
|
64
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { title: "MyTitle", id: "device-id" }), "Content"));
|
|
65
|
+
expect(test_utils_1.screen.getByRole('heading')).toHaveTextContent('MyTitle');
|
|
66
|
+
expect(test_utils_1.screen.queryByText('device-id')).not.toBeInTheDocument();
|
|
67
|
+
});
|
|
68
|
+
it('shows the id when the title is missing', () => {
|
|
69
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { title: "", id: "device-id" }), "Content"));
|
|
70
|
+
expect(test_utils_1.screen.getByRole('heading')).toHaveTextContent('device-id');
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
describe('Actions', () => {
|
|
74
|
+
it('shows the actions', () => {
|
|
75
|
+
const action = React.createElement(react_core_1.Button, { variant: "primary" }, "Some action");
|
|
76
|
+
(0, test_utils_1.render)(React.createElement(DetailsPage_1.default, Object.assign({}, baseProps, { actions: action }), "Content"));
|
|
77
|
+
expect(test_utils_1.screen.getByText('Some action')).toBeInTheDocument();
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=DetailsPage.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsPage.spec.js","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsPage.spec.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,uDAA4E;AAE5E,wEAAmE;AACnE,uDAAgD;AAChD,yDAAgD;AAEhD,MAAM,SAAS,GAAqB;IAClC,EAAE,EAAE,WAAW;IACf,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,mBAAK,CAAC,OAAO;IAC3B,YAAY,EAAE,SAAS;IACvB,iBAAiB,EAAE,SAAS;IAC5B,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,SAAS;CACf,CAAC;AAEF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,eAAe,EAAE,GAAS,EAAE;QAC7B,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,mBAAM,EAAC,oBAAC,qBAAW,oBAAK,SAAS,aAAuB,CAAC,CAAC;QAEhF,MAAM,IAAA,+BAAkB,EAAC,SAAS,CAAC,CAAC;IACtC,CAAC,CAAA,CAAC,CAAC;IAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;YAClE,IAAA,mBAAM,EACJ,oBAAC,qBAAW,oBAAK,SAAS,IAAE,OAAO,qBAErB,CACf,CAAC;YAEF,MAAM,CAAC,mBAAM,CAAC,SAAS,CAAC,aAAa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AW,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAClE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,IAAA,mBAAM,EACJ,oBAAC,qBAAW,oBAAK,SAAS,IAAE,KAAK,EAAC,EAAE,EAAC,EAAE,EAAC,WAAW,eAErC,CACf,CAAC;YAEF,MAAM,CAAC,mBAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;YAC3B,MAAM,MAAM,GAAG,oBAAC,mBAAM,IAAC,OAAO,EAAC,SAAS,kBAAqB,CAAC;YAC9D,IAAA,mBAAM,EACJ,oBAAC,qBAAW,oBAAK,SAAS,IAAE,OAAO,EAAE,MAAM,eAE7B,CACf,CAAC;YAEF,MAAM,CAAC,mBAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDeleteAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
7
|
+
const DeleteModal_1 = tslib_1.__importDefault(require("../modals/DeleteModal/DeleteModal"));
|
|
8
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
9
|
+
const useDeleteAction = ({ resourceType, resourceName, onDelete, disabledReason }) => {
|
|
10
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
11
|
+
const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState(false);
|
|
12
|
+
const deleteAction = (React.createElement(react_core_1.DropdownItem, Object.assign({ onClick: () => setIsDeleteModalOpen(true) }, (disabledReason
|
|
13
|
+
? {
|
|
14
|
+
isAriaDisabled: true,
|
|
15
|
+
tooltipProps: {
|
|
16
|
+
content: disabledReason,
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
: undefined)), t('Delete {{ resourceType }}', { resourceType })));
|
|
20
|
+
const deleteModal = isDeleteModalOpen && (React.createElement(DeleteModal_1.default, { resourceType: resourceType, resourceName: resourceName, onClose: () => setIsDeleteModalOpen(false), onDelete: onDelete }));
|
|
21
|
+
return { deleteAction, deleteModal };
|
|
22
|
+
};
|
|
23
|
+
exports.useDeleteAction = useDeleteAction;
|
|
24
|
+
const DetailsPageActions = ({ children }) => {
|
|
25
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
26
|
+
const [actionsOpen, setActionsOpen] = React.useState(false);
|
|
27
|
+
return (React.createElement(react_core_1.Dropdown, { isOpen: actionsOpen, onSelect: () => setActionsOpen(false), popperProps: { position: 'left', preventOverflow: true }, toggle: (toggleRef) => (React.createElement(react_core_1.MenuToggle, { ref: toggleRef, isExpanded: actionsOpen, onClick: () => setActionsOpen(!actionsOpen), "aria-label": t('Actions dropdown'), variant: "primary" }, t('Actions'))) }, children));
|
|
28
|
+
};
|
|
29
|
+
exports.default = DetailsPageActions;
|
|
30
|
+
//# sourceMappingURL=DetailsPageActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsPageActions.js","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsPageActions.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uDAA4E;AAE5E,4FAA4D;AAC5D,+DAA4D;AASrD,MAAM,eAAe,GAAG,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,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xD,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CACrB,oBAAC,uBAAU,IACT,GAAG,EAAE,SAAS,EACd,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,WAAW,CAAC,gBAC/B,CAAC,CAAC,kBAAkB,CAAC,EACjC,OAAO,EAAC,SAAS,IAEhB,CAAC,CAAC,SAAS,CAAC,CACF,CACd,IAEA,QAAQ,CACA,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DetailsPageCardBody = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
require("./DetailsPageCard.css");
|
|
8
|
+
const DetailsPageCard = (props) => React.createElement(react_core_1.Card, Object.assign({ className: "fctl-details-page__card" }, props));
|
|
9
|
+
const DetailsPageCardBody = (props) => (React.createElement(react_core_1.CardBody, Object.assign({ className: "fctl-details-page__card-body" }, props)));
|
|
10
|
+
exports.DetailsPageCardBody = DetailsPageCardBody;
|
|
11
|
+
exports.default = DetailsPageCard;
|
|
12
|
+
//# sourceMappingURL=DetailsPageCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailsPageCard.js","sourceRoot":"","sources":["../../../../src/components/DetailsPage/DetailsPageCard.tsx"],"names":[],"mappings":";;;;AAAA,uDAAkF;AAClF,qDAA+B;AAE/B,iCAA+B;AAE/B,MAAM,eAAe,GAAwB,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAC,iBAAI,kBAAC,SAAS,EAAC,yBAAyB,IAAK,KAAK,EAAI,CAAC;AAEzG,MAAM,mBAAmB,GAA4B,CAAC,KAAK,EAAE,EAAE,CAAC,CACrE,oBAAC,qBAAQ,kBAAC,SAAS,EAAC,8BAA8B,IAAK,KAAK,EAAI,CACjE,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const react_table_1 = require("@patternfly/react-table");
|
|
7
|
+
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
8
|
+
const ApplicationStatus_1 = tslib_1.__importDefault(require("../../Status/ApplicationStatus"));
|
|
9
|
+
const ApplicationsTable = ({ appsStatus }) => {
|
|
10
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
11
|
+
const apps = Object.values(appsStatus.data);
|
|
12
|
+
return apps.length ? (React.createElement(react_table_1.Table, { "aria-label": t('Device applications table') },
|
|
13
|
+
React.createElement(react_table_1.Thead, null,
|
|
14
|
+
React.createElement(react_table_1.Tr, null,
|
|
15
|
+
React.createElement(react_table_1.Th, null, t('Name')),
|
|
16
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Status')),
|
|
17
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Ready')),
|
|
18
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Restarts')))),
|
|
19
|
+
React.createElement(react_table_1.Tbody, null, apps.map((appData) => (React.createElement(react_table_1.Tr, { key: appData.name },
|
|
20
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Name') }, appData.name),
|
|
21
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Status') },
|
|
22
|
+
React.createElement(ApplicationStatus_1.default, { status: appData.status })),
|
|
23
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Ready') }, appData.ready),
|
|
24
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Restarts') }, appData.restarts))))))) : (React.createElement(react_core_1.Bullseye, null, t('No applications found')));
|
|
25
|
+
};
|
|
26
|
+
exports.default = ApplicationsTable;
|
|
27
|
+
//# sourceMappingURL=ApplicationsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationsTable.js","sourceRoot":"","sources":["../../../../../src/components/DetailsPage/Tables/ApplicationsTable.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAAkD;AAClD,yDAA0E;AAG1E,kEAA+D;AAC/D,+FAA+D;AAM/D,MAAM,iBAAiB,GAAG,CAAC,EAAE,UAAU,EAA0B,EAAE,EAAE;IACnE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CACnB,oBAAC,mBAAK,kBAAa,CAAC,CAAC,2BAA2B,CAAC;QAC/C,oBAAC,mBAAK;YACJ,oBAAC,gBAAE;gBACD,oBAAC,gBAAE,QAAE,CAAC,CAAC,MAAM,CAAC,CAAM;gBACpB,oBAAC,gBAAE,IAAC,QAAQ,EAAC,MAAM,IAAE,CAAC,CAAC,QAAQ,CAAC,CAAM;gBACtC,oBAAC,gBAAE,IAAC,QAAQ,EAAC,MAAM,IAAE,CAAC,CAAC,OAAO,CAAC,CAAM;gBACrC,oBAAC,gBAAE,IAAC,QAAQ,EAAC,MAAM,IAAE,CAAC,CAAC,UAAU,CAAC,CAAM,CACrC,CACC;QACR,oBAAC,mBAAK,QACH,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACrB,oBAAC,gBAAE,IAAC,GAAG,EAAE,OAAO,CAAC,IAAI;YACnB,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAG,OAAO,CAAC,IAAI,CAAM;YAC7C,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC;gBACxB,oBAAC,2BAAiB,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,CAC1C;YACL,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,IAAG,OAAO,CAAC,KAAK,CAAM;YAC/C,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,IAAG,OAAO,CAAC,QAAQ,CAAM,CAClD,CACN,CAAC,CACI,CACF,CACT,CAAC,CAAC,CAAC,CACF,oBAAC,qBAAQ,QAAE,CAAC,CAAC,uBAAuB,CAAC,CAAY,CAClD,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
5
|
+
const react_table_1 = require("@patternfly/react-table");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
8
|
+
const ConditionsTable = ({ conditions, ariaLabel }) => {
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
return (conditions === null || conditions === void 0 ? void 0 : conditions.length) ? (React.createElement(react_table_1.Table, { "aria-label": ariaLabel },
|
|
11
|
+
React.createElement(react_table_1.Thead, null,
|
|
12
|
+
React.createElement(react_table_1.Tr, null,
|
|
13
|
+
React.createElement(react_table_1.Th, null, t('Type')),
|
|
14
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Status')),
|
|
15
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Reason')),
|
|
16
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Message')))),
|
|
17
|
+
React.createElement(react_table_1.Tbody, null, conditions.map((condition) => (React.createElement(react_table_1.Tr, { key: condition.type },
|
|
18
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Type') }, condition.type),
|
|
19
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Status') }, condition.status),
|
|
20
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Reason') }, condition.reason || '-'),
|
|
21
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Message') }, condition.message || '-'))))))) : (React.createElement(react_core_1.Bullseye, null, t('No conditions found')));
|
|
22
|
+
};
|
|
23
|
+
exports.default = ConditionsTable;
|
|
24
|
+
//# sourceMappingURL=ConditionsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionsTable.js","sourceRoot":"","sources":["../../../../../src/components/DetailsPage/Tables/ConditionsTable.tsx"],"names":[],"mappings":";;;AAAA,uDAAkD;AAClD,yDAA0E;AAE1E,qDAA+B;AAC/B,kEAA+D;AAO/D,MAAM,eAAe,GAAmC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE;IACpF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,OAAO,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,EAAC,CAAC,CAAC,CAC1B,oBAAC,mBAAK,kBAAa,SAAS;QAC1B,oBAAC,mBAAK;YACJ,oBAAC,gBAAE;gBACD,oBAAC,gBAAE,QAAE,CAAC,CAAC,MAAM,CAAC,CAAM;gBACpB,oBAAC,gBAAE,IAAC,QAAQ,EAAC,MAAM,IAAE,CAAC,CAAC,QAAQ,CAAC,CAAM;gBACtC,oBAAC,gBAAE,IAAC,QAAQ,EAAC,MAAM,IAAE,CAAC,CAAC,QAAQ,CAAC,CAAM;gBACtC,oBAAC,gBAAE,IAAC,QAAQ,EAAC,MAAM,IAAE,CAAC,CAAC,SAAS,CAAC,CAAM,CACpC,CACC;QACR,oBAAC,mBAAK,QACH,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAC7B,oBAAC,gBAAE,IAAC,GAAG,EAAE,SAAS,CAAC,IAAI;YACrB,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAG,SAAS,CAAC,IAAI,CAAM;YAC/C,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAG,SAAS,CAAC,MAAM,CAAM;YACnD,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAG,SAAS,CAAC,MAAM,IAAI,GAAG,CAAM;YAC1D,oBAAC,gBAAE,IAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,IAAG,SAAS,CAAC,OAAO,IAAI,GAAG,CAAM,CACzD,CACN,CAAC,CACI,CACF,CACT,CAAC,CAAC,CAAC,CACF,oBAAC,qBAAQ,QAAE,CAAC,CAAC,qBAAqB,CAAC,CAAY,CAChD,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
7
|
+
const IntegrityStatus_1 = tslib_1.__importDefault(require("../../Status/IntegrityStatus"));
|
|
8
|
+
const IntegrityDetails = ({ integrity }) => {
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
const info = integrity === null || integrity === void 0 ? void 0 : integrity.summary.info;
|
|
11
|
+
const status = integrity === null || integrity === void 0 ? void 0 : integrity.summary.status;
|
|
12
|
+
return info || status ? (React.createElement(react_core_1.DescriptionList, { columnModifier: { lg: '3Col' } },
|
|
13
|
+
status && (React.createElement(react_core_1.DescriptionListGroup, null,
|
|
14
|
+
React.createElement(react_core_1.DescriptionListTerm, null, t('Status')),
|
|
15
|
+
React.createElement(react_core_1.DescriptionListDescription, null,
|
|
16
|
+
React.createElement(IntegrityStatus_1.default, { status: status })))),
|
|
17
|
+
info && (React.createElement(react_core_1.DescriptionListGroup, null,
|
|
18
|
+
React.createElement(react_core_1.DescriptionListTerm, null, t('Details')),
|
|
19
|
+
React.createElement(react_core_1.DescriptionListDescription, null, info))))) : (React.createElement(react_core_1.Bullseye, null, t('No system integrity details found.')));
|
|
20
|
+
};
|
|
21
|
+
exports.default = IntegrityDetails;
|
|
22
|
+
//# sourceMappingURL=IntegrityDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrityDetails.js","sourceRoot":"","sources":["../../../../../src/components/DetailsPage/Tables/IntegrityDetails.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAMgC;AAGhC,kEAA+D;AAC/D,2FAA2D;AAM3D,MAAM,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAyB,EAAE,EAAE;IAChE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAC,IAAI,CAAC;IACrC,MAAM,MAAM,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAC,MAAM,CAAC;IACzC,OAAO,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,CACtB,oBAAC,4BAAe,IAAC,cAAc,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;QAC5C,MAAM,IAAI,CACT,oBAAC,iCAAoB;YACnB,oBAAC,gCAAmB,QAAE,CAAC,CAAC,QAAQ,CAAC,CAAuB;YACxD,oBAAC,uCAA0B;gBACzB,oBAAC,yBAAe,IAAC,MAAM,EAAE,MAAM,GAAI,CACR,CACR,CACxB;QACA,IAAI,IAAI,CACP,oBAAC,iCAAoB;YACnB,oBAAC,gCAAmB,QAAE,CAAC,CAAC,SAAS,CAAC,CAAuB;YACzD,oBAAC,uCAA0B,QAAE,IAAI,CAA8B,CAC1C,CACxB,CACe,CACnB,CAAC,CAAC,CAAC,CACF,oBAAC,qBAAQ,QAAE,CAAC,CAAC,oCAAoC,CAAC,CAAY,CAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const react_table_1 = require("@patternfly/react-table");
|
|
7
|
+
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
8
|
+
const SystemdStatus_1 = tslib_1.__importDefault(require("../../Status/SystemdStatus"));
|
|
9
|
+
const SystemdDetailsTable = ({ matchPatterns, systemdUnits }) => {
|
|
10
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
11
|
+
const hasPatterns = matchPatterns && matchPatterns.length > 0;
|
|
12
|
+
const hasUnits = systemdUnits && systemdUnits.length > 0;
|
|
13
|
+
if (!hasPatterns && !hasUnits) {
|
|
14
|
+
return React.createElement(react_core_1.Bullseye, null, t('No systemd units found'));
|
|
15
|
+
}
|
|
16
|
+
const patterns = {};
|
|
17
|
+
matchPatterns === null || matchPatterns === void 0 ? void 0 : matchPatterns.forEach((pattern) => {
|
|
18
|
+
patterns[pattern] = {
|
|
19
|
+
name: pattern,
|
|
20
|
+
status: '',
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
systemdUnits === null || systemdUnits === void 0 ? void 0 : systemdUnits.forEach((unit) => {
|
|
24
|
+
const name = unit.name;
|
|
25
|
+
patterns[name] = unit;
|
|
26
|
+
});
|
|
27
|
+
return (React.createElement(react_table_1.Table, { "aria-label": t('Device systemd table') },
|
|
28
|
+
React.createElement(react_table_1.Thead, null,
|
|
29
|
+
React.createElement(react_table_1.Tr, null,
|
|
30
|
+
React.createElement(react_table_1.Th, null, t('Name')),
|
|
31
|
+
React.createElement(react_table_1.Th, { modifier: "wrap" }, t('Status')))),
|
|
32
|
+
React.createElement(react_table_1.Tbody, null, Object.entries(patterns).map(([patternName, systemUnitState]) => {
|
|
33
|
+
return (React.createElement(react_table_1.Tr, { key: patternName },
|
|
34
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Name') }, patternName),
|
|
35
|
+
React.createElement(react_table_1.Td, { dataLabel: t('Status') },
|
|
36
|
+
React.createElement(SystemdStatus_1.default, { status: systemUnitState.status }))));
|
|
37
|
+
}))));
|
|
38
|
+
};
|
|
39
|
+
exports.default = SystemdDetailsTable;
|
|
40
|
+
//# sourceMappingURL=SystemdDetailsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemdDetailsTable.js","sourceRoot":"","sources":["../../../../../src/components/DetailsPage/Tables/SystemdDetailsTable.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAAkD;AAClD,yDAA0E;AAE1E,kEAA+D;AAC/D,uFAAuD;AAYvD,MAAM,mBAAmB,GAAG,CAAC,EAAE,aAAa,EAAE,YAAY,EAA4B,EAAE,EAAE;IACxF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IAEzD,IAAI,CAAC,WAAW,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,OAAO,oBAAC,qBAAQ,QAAE,CAAC,CAAC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AmB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const external_link_alt_icon_1 = require("@patternfly/react-icons/dist/js/icons/external-link-alt-icon");
|
|
7
|
+
const FlightCtlForm_1 = tslib_1.__importDefault(require("../../form/FlightCtlForm"));
|
|
8
|
+
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
9
|
+
const useAppContext_1 = require("../../../hooks/useAppContext");
|
|
10
|
+
const AddDeviceModal = ({ onClose }) => {
|
|
11
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
12
|
+
const { qcow2ImgUrl, bootcImgUrl } = (0, useAppContext_1.useAppContext)();
|
|
13
|
+
const [imgType, setImgType] = React.useState();
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
if (!!bootcImgUrl) {
|
|
16
|
+
setImgType('bootc');
|
|
17
|
+
}
|
|
18
|
+
else if (!!qcow2ImgUrl) {
|
|
19
|
+
setImgType('qcow2');
|
|
20
|
+
}
|
|
21
|
+
}, [qcow2ImgUrl, bootcImgUrl]);
|
|
22
|
+
const actions = [
|
|
23
|
+
React.createElement(react_core_1.Button, { key: "close", variant: "secondary", onClick: onClose }, t('Close')),
|
|
24
|
+
];
|
|
25
|
+
if (imgType === 'qcow2') {
|
|
26
|
+
actions.unshift(React.createElement(react_core_1.Button, { key: "download", onClick: () => window.open(qcow2ImgUrl, '_blank') }, t('Download disk')));
|
|
27
|
+
}
|
|
28
|
+
return (React.createElement(react_core_1.Modal, { variant: "medium", title: t('Add device'), onClose: onClose, isOpen: true, actions: actions },
|
|
29
|
+
React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
30
|
+
React.createElement(react_core_1.GridItem, null,
|
|
31
|
+
React.createElement(react_core_1.Alert, { variant: "info", isInline: true, title: t('Learn how to build a bootable container image') },
|
|
32
|
+
React.createElement(react_core_1.Button, { component: "a", variant: "link", isInline: true, href: "https://github.com/flightctl/flightctl/blob/main/docs/user/getting-started.md#building-a-bootable-container-image-including-the-flight-control-agent", target: "_blank", icon: React.createElement(external_link_alt_icon_1.ExternalLinkAltIcon, null), iconPosition: "end" }, t('View documentation')))),
|
|
33
|
+
React.createElement(react_core_1.GridItem, null,
|
|
34
|
+
React.createElement(react_core_1.Radio, { isChecked: imgType === 'bootc', name: "bootc", onChange: (_, checked) => checked && setImgType('bootc'), label: bootcImgUrl ? t('Use a container image (bootc)') : t('Use a container image (bootc) (Not available)'), id: "bootc", isDisabled: !bootcImgUrl }),
|
|
35
|
+
React.createElement(react_core_1.Radio, { isChecked: imgType === 'qcow2', name: "qcow2", onChange: (_, checked) => checked && setImgType('qcow2'), label: qcow2ImgUrl ? t('Use a disk image (qcow2)') : t('Use a disk image (qcow2) (Not available)'), id: "qcow2", isDisabled: !qcow2ImgUrl })),
|
|
36
|
+
React.createElement(react_core_1.GridItem, null,
|
|
37
|
+
imgType === 'bootc' && (React.createElement(react_core_1.Alert, { isInline: true, variant: "info", title: t('Adding devices instructions') },
|
|
38
|
+
React.createElement(react_core_1.TextContent, null,
|
|
39
|
+
React.createElement(react_core_1.TextList, { component: "ol", type: react_core_1.OrderType.number, style: { marginLeft: 0 } },
|
|
40
|
+
React.createElement(react_core_1.TextListItem, null, t('Boot you device.')),
|
|
41
|
+
React.createElement(react_core_1.TextListItem, null, t('Ensure that your device has a disk available for installation.')),
|
|
42
|
+
React.createElement(react_core_1.TextListItem, null,
|
|
43
|
+
t('Execute the following podman command'),
|
|
44
|
+
React.createElement(react_core_1.ClipboardCopy, { isReadOnly: true, hoverTip: t('Copy'), clickTip: t('Copied') }, `podman run --rm --privileged --pid=host -v /var/lib/containers:/var/lib/containers --security-opt label=type:unconfined_t ${bootcImgUrl} bootc install to-disk /path/to/disk`)),
|
|
45
|
+
React.createElement(react_core_1.TextListItem, null, t('Ensure that your device will boot from `/path/to/disk`.')),
|
|
46
|
+
React.createElement(react_core_1.TextListItem, null, t('Reboot the device.')),
|
|
47
|
+
React.createElement(react_core_1.TextListItem, null, t('Booted device should appear in the devices table. This might take a few minutes.')))))),
|
|
48
|
+
imgType === 'qcow2' && (React.createElement(react_core_1.Stack, { hasGutter: true },
|
|
49
|
+
React.createElement(react_core_1.StackItem, null,
|
|
50
|
+
React.createElement(react_core_1.Alert, { isInline: true, variant: "info", title: t('Adding devices instructions') },
|
|
51
|
+
React.createElement(react_core_1.TextContent, null,
|
|
52
|
+
React.createElement(react_core_1.TextList, { component: "ol", type: react_core_1.OrderType.number, style: { marginLeft: 0 } },
|
|
53
|
+
React.createElement(react_core_1.TextListItem, null, t('Download the qcow2 disk and use it to boot your device.')),
|
|
54
|
+
React.createElement(react_core_1.TextListItem, null, t('Booted device should appear in the devices table. This might take a few minutes.')))))),
|
|
55
|
+
React.createElement(react_core_1.StackItem, null,
|
|
56
|
+
React.createElement(FlightCtlForm_1.default, null,
|
|
57
|
+
React.createElement(react_core_1.FormGroup, { label: t('Disk URL') },
|
|
58
|
+
React.createElement(react_core_1.ClipboardCopy, { isReadOnly: true, hoverTip: t('Copy'), clickTip: t('Copied') }, qcow2ImgUrl)),
|
|
59
|
+
React.createElement(react_core_1.FormGroup, { label: t('Command to download the disk') },
|
|
60
|
+
React.createElement(react_core_1.ClipboardCopy, { isReadOnly: true, hoverTip: t('Copy'), clickTip: t('Copied') }, `wget -O disk.qcow2 ${qcow2ImgUrl}`))))))))));
|
|
61
|
+
};
|
|
62
|
+
exports.default = AddDeviceModal;
|
|
63
|
+
//# sourceMappingURL=AddDeviceModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddDeviceModal.js","sourceRoot":"","sources":["../../../../../src/components/Device/AddDeviceModal/AddDeviceModal.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAegC;AAChC,yGAAmG;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