@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,65 @@
|
|
|
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 check_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/check-circle-icon");
|
|
7
|
+
const in_progress_icon_1 = require("@patternfly/react-icons/dist/js/icons/in-progress-icon");
|
|
8
|
+
const outlined_question_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/outlined-question-circle-icon");
|
|
9
|
+
const exclamation_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/exclamation-circle-icon");
|
|
10
|
+
const types_1 = require("@flightctl/types");
|
|
11
|
+
const WithTooltip_1 = tslib_1.__importDefault(require("../common/WithTooltip"));
|
|
12
|
+
const repository_1 = require("../../utils/status/repository");
|
|
13
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
14
|
+
const useNavigate_1 = require("../../hooks/useNavigate");
|
|
15
|
+
const react_i18next_1 = require("react-i18next");
|
|
16
|
+
const ResourceSyncStatus = ({ resourceSync, showLinksOnError = false }) => {
|
|
17
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
18
|
+
const statusType = (0, repository_1.getRepositorySyncStatus)(resourceSync, t);
|
|
19
|
+
const statusLabels = (0, repository_1.repositoryStatusLabels)(t);
|
|
20
|
+
let color;
|
|
21
|
+
let icon;
|
|
22
|
+
switch (statusType.status) {
|
|
23
|
+
case types_1.ConditionType.ResourceSyncResourceParsed:
|
|
24
|
+
case 'Sync pending':
|
|
25
|
+
color = 'orange';
|
|
26
|
+
icon = React.createElement(in_progress_icon_1.InProgressIcon, null);
|
|
27
|
+
break;
|
|
28
|
+
case types_1.ConditionType.ResourceSyncSynced:
|
|
29
|
+
case types_1.ConditionType.RepositoryAccessible:
|
|
30
|
+
color = 'green';
|
|
31
|
+
icon = React.createElement(check_circle_icon_1.CheckCircleIcon, null);
|
|
32
|
+
break;
|
|
33
|
+
case 'Not parsed':
|
|
34
|
+
case 'Not synced':
|
|
35
|
+
case 'Not accessible':
|
|
36
|
+
color = 'red';
|
|
37
|
+
icon = React.createElement(exclamation_circle_icon_1.ExclamationCircleIcon, null);
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
color = 'grey';
|
|
41
|
+
icon = React.createElement(outlined_question_circle_icon_1.OutlinedQuestionCircleIcon, null);
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
if (color === 'red' && showLinksOnError) {
|
|
45
|
+
const repositoryName = resourceSync.spec.repository;
|
|
46
|
+
const rsName = resourceSync.metadata.name;
|
|
47
|
+
return (React.createElement(react_core_1.Popover, { triggerAction: "hover", "aria-label": t('Invalid resource sync configuration'), headerContent: t('Invalid resource sync configuration'), bodyContent: React.createElement(react_core_1.Stack, { hasGutter: true },
|
|
48
|
+
React.createElement(react_core_1.StackItem, null,
|
|
49
|
+
React.createElement(react_i18next_1.Trans, { t: t },
|
|
50
|
+
"An error occurred when trying to apply the resource sync ",
|
|
51
|
+
React.createElement("strong", null, rsName),
|
|
52
|
+
" from repository",
|
|
53
|
+
' ',
|
|
54
|
+
React.createElement("strong", null, repositoryName),
|
|
55
|
+
":")),
|
|
56
|
+
React.createElement(react_core_1.StackItem, null, statusType.message),
|
|
57
|
+
React.createElement(react_core_1.StackItem, null,
|
|
58
|
+
React.createElement(useNavigate_1.Link, { to: { route: useNavigate_1.ROUTE.RESOURCE_SYNC_DETAILS, postfix: resourceSync.metadata.name } }, "Review and fix the configuration"))) },
|
|
59
|
+
React.createElement(react_core_1.Label, { color: color, icon: icon }, statusLabels[statusType.status])));
|
|
60
|
+
}
|
|
61
|
+
return (React.createElement(WithTooltip_1.default, { showTooltip: !!statusType.message, content: statusType.message },
|
|
62
|
+
React.createElement(react_core_1.Label, { color: color, icon: icon }, statusLabels[statusType.status])));
|
|
63
|
+
};
|
|
64
|
+
exports.default = ResourceSyncStatus;
|
|
65
|
+
//# sourceMappingURL=ResourceSyncStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceSyncStatus.js","sourceRoot":"","sources":["../../../../src/components/ResourceSync/ResourceSyncStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAAsF;AACtF,+FAA0F;AAC1F,6FAAwF;AACxF,uHAAiH;AACjH,2GAAsG;AAEtG,4CAA+D;AAC/D,gFAAgD;AAChD,8DAAgG;AAChG,+DAA4D;AAC5D,yDAAsD;AACtD,iDAAsC;AAOtC,MAAM,kBAAkB,GAAG,CAAC,EAAE,YAAY,EAAE,gBAAgB,GAAG,KAAK,EAA2B,EAAE,EAAE;IACjG,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,UAAU,GAAG,IAAA,oCAAuB,EAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAC5D,MAAM,YAAY,GAAG,IAAA,mCAAsB,EAAC,CAAC,CAAC,CAAC;IAE/C,IAAI,KAA0B,CAAC;IAC/B,IAAI,IAAqB,CAAC;IAE1B,QAAQ,UAAU,CAAC,MAAM,EAAE,CAAC;QAC1B,KAAK,qBAAa,CAAC,0BAA0B,CAAC;QAC9C,KAAK,cAAc;YACjB,KAAK,GAAG,QAAQ,CAAC;YACjB,IAAI,GAAG,oBAAC,iCAAc,OAAG,CAAC;YAC1B,MAAM;QACR,KAAK,qBAAa,CAAC,kBAAkB,CAAC;QACtC,KAAK,qBAAa,CAAC,oBAAoB;YACrC,KAAK,GAAG,OAAO,CAAC;YAChB,IAAI,GAAG,oBAAC,mCAAe,OAAG,CAAC;YAC3B,MAAM;QACR,KAAK,YAAY,CAAC;QAClB,KAAK,YAAY,CAAC;QAClB,KAAK,gBAAgB;YACnB,KAAK,GAAG,KAAK,CAAC;YACd,IAAI,GAAG,oBAAC,+CAAqB,OAAG,CAAC;YACjC,MAAM;QACR;YACE,KAAK,GAAG,MAAM,CAAC;YACf,IAAI,GAAG,oBAAC,0DAA0B,OAAG,CAAC;YACtC,MAAM;IACV,CAAC;IAED,IAAI,KAAK,KAAK,KAAK,IAAI,gBAAgB,EAAE,CAAC;QACxC,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;QACpD,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC1C,OAAO,CACL,oBAAC,oBAAO,IACN,aAAa,EAAC,OAAO,gBACT,CAAC,CAAC,qCAAqC,CAAC,EACpD,aAAa,EAAE,CAAC,CAAC,qCAAqC,CAAC,EACvD,WAAW,EACT,oBAAC,kBAAK,IAAC,SAAS;gBACd,oBAAC,sBAAS;oBACR,oBAAC,qBAAK,IAAC,CAAC,EAAE,CAAC;;wBACgD,oCAAS,MAAM,CAAU;;wBAAiB,GAAG;wBACtG,oCAAS,cAAc,CAAU;4BAC3B,CACE;gBACZ,oBAAC,sBAAS,QAAE,UAAU,CAAC,OAAO,CAAa;gBAC3C,oBAAC,sBAAS;oBACR,oBAAC,kBAAI,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,mBAAK,CAAC,qBAAqB,EAAE,OAAO,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,uCAE9E,CACG,CACN;YAGV,oBAAC,kBAAK,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,IAC5B,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAC1B,CACA,CACX,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,qBAAW,IAAC,WAAW,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO;QACzE,oBAAC,kBAAK,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,IAC5B,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,CAC1B,CACI,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 useFetch_1 = require("../../hooks/useFetch");
|
|
6
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
7
|
+
const react_i18next_1 = require("react-i18next");
|
|
8
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
9
|
+
const useNavigate_1 = require("../../hooks/useNavigate");
|
|
10
|
+
const useAppContext_1 = require("../../hooks/useAppContext");
|
|
11
|
+
const ResourceSyncToRepository = () => {
|
|
12
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
13
|
+
const navigate = (0, useNavigate_1.useNavigate)();
|
|
14
|
+
const { get } = (0, useFetch_1.useFetch)();
|
|
15
|
+
const [error, setError] = React.useState();
|
|
16
|
+
const { router: { useParams }, } = (0, useAppContext_1.useAppContext)();
|
|
17
|
+
const { rsId } = useParams();
|
|
18
|
+
React.useEffect(() => {
|
|
19
|
+
const fetchDetails = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
try {
|
|
21
|
+
const rsDetails = yield get(`resourcesyncs/${rsId}`);
|
|
22
|
+
const repository = rsDetails.spec.repository;
|
|
23
|
+
if (repository) {
|
|
24
|
+
setError(undefined);
|
|
25
|
+
navigate({ route: useNavigate_1.ROUTE.REPO_DETAILS, postfix: `${repository}#${rsId}` });
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
setError(t('Resource sync {{rsId}} is not linked to a repository', { rsId }));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
setError(t('Resource sync {{rsId}} could not be found', { rsId }));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
void fetchDetails();
|
|
36
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
+
}, [get, navigate, rsId]);
|
|
38
|
+
return (React.createElement(react_core_1.PageSection, { variant: "light" },
|
|
39
|
+
React.createElement(react_core_1.Title, { headingLevel: "h1", size: "3xl" }, t('Resource sync {{rsId}}', { rsId })),
|
|
40
|
+
error ? (React.createElement(react_core_1.EmptyState, null,
|
|
41
|
+
React.createElement(react_core_1.EmptyStateHeader, null,
|
|
42
|
+
React.createElement(react_i18next_1.Trans, { t: t },
|
|
43
|
+
"Could not find the details for the resource sync ",
|
|
44
|
+
React.createElement("strong", null, rsId))),
|
|
45
|
+
React.createElement(react_core_1.EmptyStateBody, null, error))) : (React.createElement(react_core_1.Bullseye, null,
|
|
46
|
+
React.createElement(react_core_1.Spinner, null)))));
|
|
47
|
+
};
|
|
48
|
+
exports.default = ResourceSyncToRepository;
|
|
49
|
+
//# sourceMappingURL=ResourceSyncToRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceSyncToRepository.js","sourceRoot":"","sources":["../../../../src/components/ResourceSync/ResourceSyncToRepository.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mDAAgD;AAChD,uDAQgC;AAEhC,iDAAsC;AACtC,+DAA4D;AAC5D,yDAA6D;AAC7D,6DAA0D;AAE1D,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,mBAAQ,GAAE,CAAC;IAE3B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;IACnD,MAAM,EACJ,MAAM,EAAE,EAAE,SAAS,EAAE,GACtB,GAAG,IAAA,6BAAa,GAAE,CAAC;IACpB,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAsB,CAAC;IAEjD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,YAAY,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC;gBACH,MAAM,SAAS,GAAG,MAAM,GAAG,CAAe,iBAAiB,IAAI,EAAE,CAAC,CAAC;gBAEnE,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;gBAC7C,IAAI,UAAU,EAAE,CAAC;oBACf,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACpB,QAAQ,CAAC,EAAE,KAAK,EAAE,mBAAK,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,UAAU,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;gBAC5E,CAAC;qBAAM,CAAC;oBACN,QAAQ,CAAC,CAAC,CAAC,sDAAsD,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;gBAChF,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,QAAQ,CAAC,CAAC,CAAC,2CAA2C,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACrE,CAAC;QACH,CAAC,CAAA,CAAC;QAEF,KAAK,YAAY,EAAE,CAAC;QACpB,uDAAuD;IACzD,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;IAE1B,OAAO,CACL,oBAAC,wBAAW,IAAC,OAAO,EAAC,OAAO;QAC1B,oBAAC,kBAAK,IAAC,YAAY,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,IAChC,CAAC,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,CAAC,CAChC;QACP,KAAK,CAAC,CAAC,CAAC,CACP,oBAAC,uBAAU;YACT,oBAAC,6BAAgB;gBACf,oBAAC,qBAAK,IAAC,CAAC,EAAE,CAAC;;oBACwC,oCAAS,IAAI,CAAU,CAClE,CACS;YACnB,oBAAC,2BAAc,QAAE,KAAK,CAAkB,CAC7B,CACd,CAAC,CAAC,CAAC,CACF,oBAAC,qBAAQ;YACP,oBAAC,oBAAO,OAAG,CACF,CACZ,CACW,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 useTranslation_1 = require("../../hooks/useTranslation");
|
|
6
|
+
const applications_1 = require("../../utils/status/applications");
|
|
7
|
+
const StatusDisplay_1 = tslib_1.__importDefault(require("./StatusDisplay"));
|
|
8
|
+
/**
|
|
9
|
+
* Refers to the summary status of all applications in one device
|
|
10
|
+
*
|
|
11
|
+
* @param status the summary application status
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
const ApplicationStatus = ({ status }) => {
|
|
15
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
16
|
+
const statusItems = (0, applications_1.getApplicationStatusItems)(t);
|
|
17
|
+
const item = statusItems.find((statusItem) => {
|
|
18
|
+
return statusItem.id === status;
|
|
19
|
+
});
|
|
20
|
+
return React.createElement(StatusDisplay_1.default, { item: item });
|
|
21
|
+
};
|
|
22
|
+
exports.default = ApplicationStatus;
|
|
23
|
+
//# sourceMappingURL=ApplicationStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/ApplicationStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAG/B,+DAA4D;AAC5D,kEAA4E;AAC5E,4EAA4C;AAE5C;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,EAAE,MAAM,EAAsC,EAAE,EAAE;IAC3E,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,WAAW,GAAG,IAAA,wCAAyB,EAAC,CAAC,CAAC,CAAC;IAEjD,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,OAAO,UAAU,CAAC,EAAE,KAAK,MAAM,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAa,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACvC,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 useTranslation_1 = require("../../hooks/useTranslation");
|
|
6
|
+
const applications_1 = require("../../utils/status/applications");
|
|
7
|
+
const StatusDisplay_1 = tslib_1.__importDefault(require("./StatusDisplay"));
|
|
8
|
+
/**
|
|
9
|
+
* Refers to the summary status of all applications in one device
|
|
10
|
+
*
|
|
11
|
+
* @param status the summary application status
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
const ApplicationSummaryStatus = ({ statusSummary }) => {
|
|
15
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
16
|
+
const statusItems = (0, applications_1.getApplicationSummaryStatusItems)(t);
|
|
17
|
+
const item = statusItems.find((statusItem) => {
|
|
18
|
+
return statusItem.id === (statusSummary === null || statusSummary === void 0 ? void 0 : statusSummary.status);
|
|
19
|
+
});
|
|
20
|
+
return React.createElement(StatusDisplay_1.default, { item: item, message: statusSummary === null || statusSummary === void 0 ? void 0 : statusSummary.info });
|
|
21
|
+
};
|
|
22
|
+
exports.default = ApplicationSummaryStatus;
|
|
23
|
+
//# sourceMappingURL=ApplicationSummaryStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationSummaryStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/ApplicationSummaryStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAG/B,+DAA4D;AAC5D,kEAAmF;AACnF,4EAA4C;AAE5C;;;;;GAKG;AACH,MAAM,wBAAwB,GAAG,CAAC,EAAE,aAAa,EAAiD,EAAE,EAAE;IACpG,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,WAAW,GAAG,IAAA,+CAAgC,EAAC,CAAC,CAAC,CAAC;IAExD,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,OAAO,UAAU,CAAC,EAAE,MAAK,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAA,CAAC;IACjD,CAAC,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAa,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,GAAI,CAAC;AACrE,CAAC,CAAC;AACF,kBAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 types_1 = require("@flightctl/types");
|
|
6
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
7
|
+
const StatusDisplay_1 = require("./StatusDisplay");
|
|
8
|
+
const getMonitorTypeLabel = (monitorType, t) => {
|
|
9
|
+
switch (monitorType) {
|
|
10
|
+
case 'cpu':
|
|
11
|
+
return t('CPU');
|
|
12
|
+
case 'memory':
|
|
13
|
+
return t('Memory');
|
|
14
|
+
case 'disk':
|
|
15
|
+
return t('Disk');
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const getTriggeredResourceAlert = (resourcesInfo, monitorType, monitorStatus) => {
|
|
19
|
+
if (!monitorStatus ||
|
|
20
|
+
[
|
|
21
|
+
types_1.DeviceResourceStatusType.DeviceResourceStatusHealthy,
|
|
22
|
+
types_1.DeviceResourceStatusType.DeviceResourceStatusUnknown,
|
|
23
|
+
].includes(monitorStatus)) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const monitorDetails = resourcesInfo.find((item) => item.monitorType === monitorType && item.alertRules.length > 0);
|
|
27
|
+
if (!monitorDetails) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
// Attempt to find the rule matching exactly the monitor's status
|
|
31
|
+
return monitorDetails.alertRules.find((alertRule) => {
|
|
32
|
+
switch (monitorStatus) {
|
|
33
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusWarning:
|
|
34
|
+
return alertRule.severity === types_1.ResourceAlertSeverityType.ResourceAlertSeverityTypeWarning;
|
|
35
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusCritical:
|
|
36
|
+
return alertRule.severity === types_1.ResourceAlertSeverityType.ResourceAlertSeverityTypeCritical;
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const DeviceResourceStatus = ({ device, monitorType }) => {
|
|
42
|
+
var _a, _b, _c;
|
|
43
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
44
|
+
if (!device) {
|
|
45
|
+
return React.createElement(StatusDisplay_1.StatusDisplayContent, { level: "unknown", label: t('Unknown') });
|
|
46
|
+
}
|
|
47
|
+
let level;
|
|
48
|
+
let label;
|
|
49
|
+
let messageTitle = '';
|
|
50
|
+
const status = (_a = device.status) === null || _a === void 0 ? void 0 : _a.resources[monitorType];
|
|
51
|
+
const triggeredAlert = getTriggeredResourceAlert((_c = (_b = device.spec) === null || _b === void 0 ? void 0 : _b.resources) !== null && _c !== void 0 ? _c : [], monitorType, status);
|
|
52
|
+
if (triggeredAlert) {
|
|
53
|
+
label = t('Past threshold ({{ percent }}%)', { percent: triggeredAlert.percentage });
|
|
54
|
+
messageTitle = t('{{ monitorType }} pressure - {{ status }}', {
|
|
55
|
+
monitorType: getMonitorTypeLabel(monitorType, t),
|
|
56
|
+
status,
|
|
57
|
+
}); // eg CPU pressure - critical
|
|
58
|
+
}
|
|
59
|
+
else if (status === types_1.DeviceResourceStatusType.DeviceResourceStatusHealthy) {
|
|
60
|
+
label = t('Within limits');
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
label = status || t('Unknown');
|
|
64
|
+
}
|
|
65
|
+
switch (status) {
|
|
66
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusHealthy:
|
|
67
|
+
level = 'success';
|
|
68
|
+
break;
|
|
69
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusWarning:
|
|
70
|
+
level = 'warning';
|
|
71
|
+
break;
|
|
72
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusCritical:
|
|
73
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusError:
|
|
74
|
+
level = 'danger';
|
|
75
|
+
break;
|
|
76
|
+
case types_1.DeviceResourceStatusType.DeviceResourceStatusUnknown:
|
|
77
|
+
case undefined:
|
|
78
|
+
level = 'unknown';
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return (React.createElement(StatusDisplay_1.StatusDisplayContent, { level: level, label: label, messageTitle: messageTitle, message: triggeredAlert === null || triggeredAlert === void 0 ? void 0 : triggeredAlert.description }));
|
|
82
|
+
};
|
|
83
|
+
exports.default = DeviceResourceStatus;
|
|
84
|
+
//# sourceMappingURL=DeviceResourceStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceResourceStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/DeviceResourceStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAG/B,4CAM0B;AAE1B,+DAA4D;AAE5D,mDAAuD;AAIvD,MAAM,mBAAmB,GAAG,CAAC,WAAwB,EAAE,CAAY,EAAE,EAAE;IACrE,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,KAAK;YACR,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;QAClB,KAAK,QAAQ;YACX,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;QACrB,KAAK,MAAM;YACT,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAChC,aAAyC,EACzC,WAAwB,EACxB,aAAwC,EACxC,EAAE;IACF,IACE,CAAC,aAAa;QACd;YACE,gCAAwB,CAAC,2BAA2B;YACpD,gCAAwB,CAAC,2BAA2B;SACrD,CAAC,QAAQ,CAAC,aAAa,CAAC,EACzB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,WAAW,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpH,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iEAAiE;IACjE,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;QAClD,QAAQ,aAAa,EAAE,CAAC;YACtB,KAAK,gCAAwB,CAAC,2BAA2B;gBACvD,OAAO,SAAS,CAAC,QAAQ,KAAK,iCAAyB,CAAC,gCAAgC,CAAC;YAC3F,KAAK,gCAAwB,CAAC,4BAA4B;gBACxD,OAAO,SAAS,CAAC,QAAQ,KAAK,iCAAyB,CAAC,iCAAiC,CAAC;QAC9F,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,EAAE,MAAM,EAAE,WAAW,EAA4D,EAAE,EAAE;;IACjH,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,oBAAC,oCAAoB,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,GAAI,CAAC;IACvE,CAAC;IAED,IAAI,KAAkB,CAAC;IACvB,IAAI,KAAa,CAAC;IAClB,IAAI,YAAY,GAAW,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,MAAA,MAAM,CAAC,MAAM,0CAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,yBAAyB,CAAC,MAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,SAAS,mCAAI,EAAE,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAEpG,IAAI,cAAc,EAAE,CAAC;QACnB,KAAK,GAAG,CAAC,CAAC,iCAAiC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC;QACrF,YAAY,GAAG,CAAC,CAAC,2CAA2C,EAAE;YAC5D,WAAW,EAAE,mBAAmB,CAAC,WAAW,EAAE,CAAC,CAAC;YAChD,MAAM;SACP,CAAC,CAAC,CAAC,6BAA6B;IACnC,CAAC;SAAM,IAAI,MAAM,KAAK,gCAAwB,CAAC,2BAA2B,EAAE,CAAC;QAC3E,KAAK,GAAG,CAAC,CAAC,eAAe,CAAC,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,KAAK,GAAG,MAAM,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,gCAAwB,CAAC,2BAA2B;YACvD,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACR,KAAK,gCAAwB,CAAC,2BAA2B;YACvD,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACR,KAAK,gCAAwB,CAAC,4BAA4B,CAAC;QAC3D,KAAK,gCAAwB,CAAC,yBAAyB;YACrD,KAAK,GAAG,QAAQ,CAAC;YACjB,MAAM;QACR,KAAK,gCAAwB,CAAC,2BAA2B,CAAC;QAC1D,KAAK,SAAS;YACZ,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;IACV,CAAC;IAED,OAAO,CACL,oBAAC,oCAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 useTranslation_1 = require("../../hooks/useTranslation");
|
|
6
|
+
const devices_1 = require("../../utils/status/devices");
|
|
7
|
+
const StatusDisplay_1 = tslib_1.__importDefault(require("./StatusDisplay"));
|
|
8
|
+
const DeviceStatus = ({ deviceStatus }) => {
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
const status = (0, devices_1.getDeviceSummaryStatus)(deviceStatus === null || deviceStatus === void 0 ? void 0 : deviceStatus.summary);
|
|
11
|
+
const statusItems = (0, devices_1.getDeviceStatusItems)(t);
|
|
12
|
+
const item = statusItems.find((statusItem) => {
|
|
13
|
+
return statusItem.id === status;
|
|
14
|
+
});
|
|
15
|
+
return React.createElement(StatusDisplay_1.default, { item: item, message: deviceStatus === null || deviceStatus === void 0 ? void 0 : deviceStatus.summary.info });
|
|
16
|
+
};
|
|
17
|
+
exports.default = DeviceStatus;
|
|
18
|
+
//# sourceMappingURL=DeviceStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/DeviceStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAG/B,+DAA4D;AAC5D,wDAA0F;AAC1F,4EAA4C;AAE5C,MAAM,YAAY,GAAG,CAAC,EAAE,YAAY,EAAmC,EAAE,EAAE;IACzE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,IAAA,gCAAsB,EAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,WAAW,GAAG,IAAA,8BAAoB,EAAC,CAAC,CAAC,CAAC;IAE5C,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,OAAO,UAAU,CAAC,EAAE,KAAK,MAAM,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAa,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,IAAI,GAAI,CAAC;AAC5E,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 enrollmentRequest_1 = require("../../utils/status/enrollmentRequest");
|
|
6
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
7
|
+
const StatusDisplay_1 = tslib_1.__importDefault(require("./StatusDisplay"));
|
|
8
|
+
const EnrollmentRequestStatus = ({ er }) => {
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
const status = er ? (0, enrollmentRequest_1.getApprovalStatus)(er) : enrollmentRequest_1.EnrollmentRequestStatus.Unknown;
|
|
11
|
+
const statusItems = (0, enrollmentRequest_1.getEnrollmentRequestsStatusItems)(t);
|
|
12
|
+
const item = statusItems.find((statusItem) => {
|
|
13
|
+
return statusItem.id === status;
|
|
14
|
+
});
|
|
15
|
+
return React.createElement(StatusDisplay_1.default, { item: item });
|
|
16
|
+
};
|
|
17
|
+
exports.default = EnrollmentRequestStatus;
|
|
18
|
+
//# sourceMappingURL=EnrollmentRequestStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnrollmentRequestStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/EnrollmentRequestStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAG/B,4EAI8C;AAC9C,+DAA4D;AAC5D,4EAA4C;AAE5C,MAAM,uBAAuB,GAAG,CAAC,EAAE,EAAE,EAA8B,EAAE,EAAE;IACrE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,IAAA,qCAAiB,EAAC,EAAE,CAAC,CAAC,CAAC,CAAC,2CAA2B,CAAC,OAAO,CAAC;IAChF,MAAM,WAAW,GAAG,IAAA,oDAAgC,EAAC,CAAC,CAAC,CAAC;IAExD,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,OAAO,UAAU,CAAC,EAAE,KAAK,MAAM,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAa,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACvC,CAAC,CAAC;AAEF,kBAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 useTranslation_1 = require("../../hooks/useTranslation");
|
|
6
|
+
const StatusDisplay_1 = tslib_1.__importDefault(require("./StatusDisplay"));
|
|
7
|
+
const integrity_1 = require("../../utils/status/integrity");
|
|
8
|
+
const IntegrityStatus = ({ status }) => {
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
const statusItems = (0, integrity_1.getIntegrityStatusItems)(t);
|
|
11
|
+
const item = statusItems.find((statusItem) => {
|
|
12
|
+
return statusItem.id === status;
|
|
13
|
+
});
|
|
14
|
+
return React.createElement(StatusDisplay_1.default, { item: item });
|
|
15
|
+
};
|
|
16
|
+
exports.default = IntegrityStatus;
|
|
17
|
+
//# sourceMappingURL=IntegrityStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrityStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/IntegrityStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAG/B,+DAA4D;AAC5D,4EAA4C;AAC5C,4DAAuE;AAEvE,MAAM,eAAe,GAAG,CAAC,EAAE,MAAM,EAAiD,EAAE,EAAE;IACpF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,WAAW,GAAG,IAAA,mCAAuB,EAAC,CAAC,CAAC,CAAC;IAE/C,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,OAAO,UAAU,CAAC,EAAE,KAAK,MAAM,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAa,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACvC,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 in_progress_icon_1 = require("@patternfly/react-icons/dist/js/icons/in-progress-icon");
|
|
6
|
+
const types_1 = require("@flightctl/types");
|
|
7
|
+
const repository_1 = require("../../utils/status/repository");
|
|
8
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
9
|
+
const StatusDisplay_1 = require("./StatusDisplay");
|
|
10
|
+
const RepositoryStatus = ({ statusInfo }) => {
|
|
11
|
+
const statusType = statusInfo.status;
|
|
12
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
13
|
+
const statusLabels = (0, repository_1.repositoryStatusLabels)(t);
|
|
14
|
+
let customIcon;
|
|
15
|
+
let status;
|
|
16
|
+
switch (statusType) {
|
|
17
|
+
case types_1.ConditionType.ResourceSyncSynced:
|
|
18
|
+
case types_1.ConditionType.RepositoryAccessible:
|
|
19
|
+
status = 'success';
|
|
20
|
+
break;
|
|
21
|
+
case 'Sync pending':
|
|
22
|
+
status = 'warning';
|
|
23
|
+
customIcon = in_progress_icon_1.InProgressIcon;
|
|
24
|
+
break;
|
|
25
|
+
case 'Not synced':
|
|
26
|
+
case 'Not parsed':
|
|
27
|
+
case 'Not accessible':
|
|
28
|
+
status = 'danger';
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
status = 'unknown';
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
return (React.createElement(StatusDisplay_1.StatusDisplayContent, { label: statusLabels[statusType], level: status, customIcon: customIcon, message: statusInfo.message }));
|
|
35
|
+
};
|
|
36
|
+
exports.default = RepositoryStatus;
|
|
37
|
+
//# sourceMappingURL=RepositoryStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/RepositoryStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,6FAAwF;AAExF,4CAAiD;AACjD,8DAA6F;AAE7F,+DAA4D;AAC5D,mDAAuD;AAGvD,MAAM,gBAAgB,GAAG,CAAC,EAAE,UAAU,EAAsE,EAAE,EAAE;IAC9G,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,YAAY,GAAG,IAAA,mCAAsB,EAAC,CAAC,CAAC,CAAC;IAE/C,IAAI,UAA0D,CAAC;IAC/D,IAAI,MAAmB,CAAC;IAExB,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,qBAAa,CAAC,kBAAkB,CAAC;QACtC,KAAK,qBAAa,CAAC,oBAAoB;YACrC,MAAM,GAAG,SAAS,CAAC;YACnB,MAAM;QACR,KAAK,cAAc;YACjB,MAAM,GAAG,SAAS,CAAC;YACnB,UAAU,GAAG,iCAAc,CAAC;YAC5B,MAAM;QACR,KAAK,YAAY,CAAC;QAClB,KAAK,YAAY,CAAC;QAClB,KAAK,gBAAgB;YACnB,MAAM,GAAG,QAAQ,CAAC;YAClB,MAAM;QAER;YACE,MAAM,GAAG,SAAS,CAAC;YACnB,MAAM;IACV,CAAC;IAED,OAAO,CACL,oBAAC,oCAAoB,IACnB,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,UAAU,CAAC,OAAO,GAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
.ftcl_status-label > div {
|
|
2
|
+
/* Reduce the space between the icon and the label, caused by the table rules */
|
|
3
|
+
--pf-v5-l-flex--spacer--column: 0.5rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.fctl-status-display-content__popover .pf-v5-c-popover__body {
|
|
7
|
+
overflow-y: scroll;
|
|
8
|
+
max-height: 30vh;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusDisplayContent = 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 common_1 = require("../../utils/status/common");
|
|
8
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
9
|
+
require("./StatusDisplay.css");
|
|
10
|
+
const StatusDisplayContent = ({ label, messageTitle, message, level, customIcon }) => {
|
|
11
|
+
const iconLevel = level === 'unknown' ? undefined : level;
|
|
12
|
+
const IconComponent = customIcon || (0, common_1.getDefaultStatusIcon)(level);
|
|
13
|
+
if (message) {
|
|
14
|
+
return (React.createElement(react_core_1.Popover, { "aria-label": "status popover", headerContent: messageTitle || label, bodyContent: message, className: "fctl-status-display-content__popover", hasAutoWidth: false },
|
|
15
|
+
React.createElement(react_core_1.Button, { variant: "link", isInline: true, icon: React.createElement(react_core_1.Icon, { status: iconLevel, style: { '--pf-v5-c-icon__content--Color': (0, common_1.getDefaultStatusColor)(level) } },
|
|
16
|
+
React.createElement(IconComponent, null)) }, label)));
|
|
17
|
+
}
|
|
18
|
+
return (React.createElement(react_core_1.Flex, { className: "ftcl_status-label" },
|
|
19
|
+
React.createElement(react_core_1.FlexItem, null,
|
|
20
|
+
React.createElement(react_core_1.Icon, { status: iconLevel, style: { '--pf-v5-c-icon__content--Color': (0, common_1.getDefaultStatusColor)(level) } },
|
|
21
|
+
React.createElement(IconComponent, null))),
|
|
22
|
+
React.createElement(react_core_1.FlexItem, null, label)));
|
|
23
|
+
};
|
|
24
|
+
exports.StatusDisplayContent = StatusDisplayContent;
|
|
25
|
+
const StatusDisplay = ({ item, message }) => {
|
|
26
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
27
|
+
if (!item) {
|
|
28
|
+
return React.createElement(exports.StatusDisplayContent, { level: "unknown", label: t('Unknown') });
|
|
29
|
+
}
|
|
30
|
+
return React.createElement(exports.StatusDisplayContent, { level: item.level, customIcon: item.customIcon, label: item.label, message: message });
|
|
31
|
+
};
|
|
32
|
+
exports.default = StatusDisplay;
|
|
33
|
+
//# sourceMappingURL=StatusDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusDisplay.js","sourceRoot":"","sources":["../../../../src/components/Status/StatusDisplay.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,uDAA+E;AAG/E,sDAAqG;AACrG,+DAA4D;AAE5D,+BAA6B;AAUtB,MAAM,oBAAoB,GAAG,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAoB,EAAE,EAAE;IAC5G,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,MAAM,aAAa,GAAG,UAAU,IAAI,IAAA,6BAAoB,EAAC,KAAK,CAAC,CAAC;IAEhE,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,oBAAC,oBAAO,kBACK,gBAAgB,EAC3B,aAAa,EAAE,YAAY,IAAI,KAAK,EACpC,WAAW,EAAE,OAAO,EACpB,SAAS,EAAC,sCAAsC,EAChD,YAAY,EAAE,KAAK;YAEnB,oBAAC,mBAAM,IACL,OAAO,EAAC,MAAM,EACd,QAAQ,QACR,IAAI,EACF,oBAAC,iBAAI,IACH,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,EAAE,gCAAgC,EAAE,IAAA,8BAAqB,EAAC,KAAK,CAAC,EAAyB;oBAEhG,oBAAC,aAAa,OAAG,CACZ,IAGR,KAAK,CACC,CACD,CACX,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,iBAAI,IAAC,SAAS,EAAC,mBAAmB;QACjC,oBAAC,qBAAQ;YACP,oBAAC,iBAAI,IACH,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,EAAE,gCAAgC,EAAE,IAAA,8BAAqB,EAAC,KAAK,CAAC,EAAyB;gBAEhG,oBAAC,aAAa,OAAG,CACZ,CACE;QACX,oBAAC,qBAAQ,QAAE,KAAK,CAAY,CACvB,CACR,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,oBAAoB,wBA4C/B;AAWF,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAsB,EAAE,EAAE;IAC9D,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,oBAAC,4BAAoB,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,GAAI,CAAC;IACvE,CAAC;IAED,OAAO,oBAAC,4BAAoB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AACvH,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 types_1 = require("@flightctl/types");
|
|
6
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
7
|
+
const StatusDisplay_1 = tslib_1.__importStar(require("./StatusDisplay"));
|
|
8
|
+
const system_1 = require("../../utils/status/system");
|
|
9
|
+
const SystemUpdateStatus = ({ deviceStatus }) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
12
|
+
const statusItems = (0, system_1.getSystemUpdateStatusItems)(t);
|
|
13
|
+
// TODO Until Update status if fully implemented in the backend, we check for the "SpecValid" error condition
|
|
14
|
+
const invalidSpec = (_a = deviceStatus === null || deviceStatus === void 0 ? void 0 : deviceStatus.conditions) === null || _a === void 0 ? void 0 : _a.find((c) => c.type === types_1.ConditionType.DeviceSpecValid && c.status === types_1.ConditionStatus.ConditionStatusFalse);
|
|
15
|
+
if (invalidSpec) {
|
|
16
|
+
return (React.createElement(StatusDisplay_1.StatusDisplayContent, { level: "danger", label: t('Updates blocked'), messageTitle: t('Invalid configuration'), message: invalidSpec.message }));
|
|
17
|
+
}
|
|
18
|
+
const item = statusItems.find((statusItem) => {
|
|
19
|
+
return statusItem.id === (deviceStatus === null || deviceStatus === void 0 ? void 0 : deviceStatus.updated.status);
|
|
20
|
+
});
|
|
21
|
+
return React.createElement(StatusDisplay_1.default, { item: item, message: deviceStatus === null || deviceStatus === void 0 ? void 0 : deviceStatus.updated.info });
|
|
22
|
+
};
|
|
23
|
+
exports.default = SystemUpdateStatus;
|
|
24
|
+
//# sourceMappingURL=SystemUpdateStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemUpdateStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/SystemUpdateStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,4CAAgF;AAChF,+DAA4D;AAC5D,yEAAsE;AACtE,sDAAuE;AAEvE,MAAM,kBAAkB,GAAG,CAAC,EAAE,YAAY,EAAmC,EAAE,EAAE;;IAC/E,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,IAAA,mCAA0B,EAAC,CAAC,CAAC,CAAC;IAElD,6GAA6G;IAC7G,MAAM,WAAW,GAAG,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,0CAAE,IAAI,CAChD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,qBAAa,CAAC,eAAe,IAAI,CAAC,CAAC,MAAM,KAAK,uBAAe,CAAC,oBAAoB,CACrG,CAAC;IAEF,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CACL,oBAAC,oCAAoB,IACnB,KAAK,EAAC,QAAQ,EACd,KAAK,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAC3B,YAAY,EAAE,CAAC,CAAC,uBAAuB,CAAC,EACxC,OAAO,EAAE,WAAW,CAAC,OAAO,GAC5B,CACH,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,OAAO,UAAU,CAAC,EAAE,MAAK,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,MAAM,CAAA,CAAC;IACxD,CAAC,CAAC,CAAC;IACH,OAAO,oBAAC,uBAAa,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC,IAAI,GAAI,CAAC;AAC5E,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 useTranslation_1 = require("../../hooks/useTranslation");
|
|
6
|
+
const StatusDisplay_1 = require("./StatusDisplay");
|
|
7
|
+
const SystemdStatus = ({ status }) => {
|
|
8
|
+
let level;
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
switch (status) {
|
|
11
|
+
case 'running':
|
|
12
|
+
level = 'success';
|
|
13
|
+
break;
|
|
14
|
+
default:
|
|
15
|
+
level = 'unknown';
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
return React.createElement(StatusDisplay_1.StatusDisplayContent, { level: level, label: status || t('Unknown') });
|
|
19
|
+
};
|
|
20
|
+
exports.default = SystemdStatus;
|
|
21
|
+
//# sourceMappingURL=SystemdStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemdStatus.js","sourceRoot":"","sources":["../../../../src/components/Status/SystemdStatus.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,+DAA4D;AAE5D,mDAAuD;AAEvD,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAkC,EAAE,EAAE;IACnE,IAAI,KAAkB,CAAC;IACvB,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;QACR;YACE,KAAK,GAAG,SAAS,CAAC;YAClB,MAAM;IACV,CAAC;IACD,OAAO,oBAAC,oCAAoB,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC,SAAS,CAAC,GAAI,CAAC;AAC/E,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUpdateStatusHelperText = exports.getDeviceStatusHelperText = exports.getApplicationStatusHelperText = void 0;
|
|
4
|
+
const getApplicationStatusHelperText = (t) => t('Indicates the overall status of application workloads on the device.');
|
|
5
|
+
exports.getApplicationStatusHelperText = getApplicationStatusHelperText;
|
|
6
|
+
const getDeviceStatusHelperText = (t) => t('Indicates the overall status of the device hardware and operating system.');
|
|
7
|
+
exports.getDeviceStatusHelperText = getDeviceStatusHelperText;
|
|
8
|
+
const getUpdateStatusHelperText = (t) => t('Indicates whether a system is running the latest target configuration or is updating towards it.');
|
|
9
|
+
exports.getUpdateStatusHelperText = getUpdateStatusHelperText;
|
|
10
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/Status/utils.ts"],"names":[],"mappings":";;;AAEO,MAAM,8BAA8B,GAAG,CAAC,CAAY,EAAE,EAAE,CAC7D,CAAC,CAAC,sEAAsE,CAAC,CAAC;AAD/D,QAAA,8BAA8B,kCACiC;AACrE,MAAM,yBAAyB,GAAG,CAAC,CAAY,EAAE,EAAE,CACxD,CAAC,CAAC,2EAA2E,CAAC,CAAC;AADpE,QAAA,yBAAyB,6BAC2C;AAC1E,MAAM,yBAAyB,GAAG,CAAC,CAAY,EAAE,EAAE,CACxD,CAAC,CAAC,kGAAkG,CAAC,CAAC;AAD3F,QAAA,yBAAyB,6BACkE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 WithHelperText_1 = tslib_1.__importDefault(require("../common/WithHelperText"));
|
|
9
|
+
const Table = (_a) => {
|
|
10
|
+
var { columns, children, emptyFilters, emptyData, getSortParams, onSelectAll, isAllSelected } = _a, rest = tslib_1.__rest(_a, ["columns", "children", "emptyFilters", "emptyData", "getSortParams", "onSelectAll", "isAllSelected"]);
|
|
11
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
12
|
+
if (emptyFilters && !emptyData) {
|
|
13
|
+
return (React.createElement(react_core_1.PageSection, { variant: "light" },
|
|
14
|
+
React.createElement(react_core_1.Bullseye, null, t('No resources are matching the current filters.'))));
|
|
15
|
+
}
|
|
16
|
+
return (React.createElement(react_table_1.Table, Object.assign({}, rest),
|
|
17
|
+
React.createElement(react_table_1.Thead, null,
|
|
18
|
+
React.createElement(react_table_1.Tr, null,
|
|
19
|
+
!emptyData && onSelectAll && (React.createElement(react_table_1.Th, { select: {
|
|
20
|
+
onSelect: (_event, isSelecting) => onSelectAll(isSelecting),
|
|
21
|
+
isSelected: !!isAllSelected,
|
|
22
|
+
} })),
|
|
23
|
+
columns.map((c, index) => (React.createElement(react_table_1.Th, Object.assign({ key: c.name, sort: getSortParams(index) }, c.thProps), c.helperText ? (React.createElement(WithHelperText_1.default, { ariaLabel: c.name, showLabel: true, content: c.helperText, triggerAction: "hover" })) : (c.name)))),
|
|
24
|
+
React.createElement(react_table_1.Td, null))),
|
|
25
|
+
children));
|
|
26
|
+
};
|
|
27
|
+
exports.default = Table;
|
|
28
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../src/components/Table/Table.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAA+D;AAC/D,yDAAuF;AACvF,+DAA4D;AAC5D,sFAAsD;AAyBtD,MAAM,KAAK,GAAY,CAAC,EASvB,EAAE,EAAE;QATmB,EACtB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,OAEd,EADI,IAAI,sBARe,qGASvB,CADQ;IAEP,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,IAAI,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;QAC/B,OAAO,CACL,oBAAC,wBAAW,IAAC,OAAO,EAAC,OAAO;YAC1B,oBAAC,qBAAQ,QAAE,CAAC,CAAC,gDAAgD,CAAC,CAAY,CAC9D,CACf,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,mBAAO,oBAAK,IAAI;QACf,oBAAC,mBAAK;YACJ,oBAAC,gBAAE;gBACA,CAAC,SAAS,IAAI,WAAW,IAAI,CAC5B,oBAAC,gBAAE,IACD,MAAM,EAAE;wBACN,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC;wBAC3D,UAAU,EAAE,CAAC,CAAC,aAAa;qBAC5B,GACD,CACH;gBACA,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CACzB,oBAAC,gBAAE,kBAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,IAAM,CAAC,CAAC,OAAO,GACvD,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CACd,oBAAC,wBAAc,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,QAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,aAAa,EAAC,OAAO,GAAG,CAC7F,CAAC,CAAC,CAAC,CACF,CAAC,CAAC,IAAI,CACP,CACE,CACN,CAAC;gBACF,oBAAC,gBAAE,OAAG,CACH,CACC;QACP,QAAQ,CACD,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
7
|
+
const TableActions = ({ children }) => {
|
|
8
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
9
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
10
|
+
const onToggle = () => {
|
|
11
|
+
setIsOpen(!isOpen);
|
|
12
|
+
};
|
|
13
|
+
return (React.createElement(react_core_1.Select, { isOpen: isOpen, onSelect: onToggle, onOpenChange: setIsOpen, toggle: (toggleRef) => (React.createElement(react_core_1.MenuToggle, { ref: toggleRef, onClick: onToggle, id: "actions", isExpanded: isOpen }, t('Actions'))) }, children));
|
|
14
|
+
};
|
|
15
|
+
exports.default = TableActions;
|
|
16
|
+
//# sourceMappingURL=TableActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableActions.js","sourceRoot":"","sources":["../../../../src/components/Table/TableActions.tsx"],"names":[],"mappings":";;;AAAA,uDAA4D;AAC5D,qDAA+B;AAC/B,+DAA4D;AAM5D,MAAM,YAAY,GAAgC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC,CAAC;IACF,OAAO,CACL,oBAAC,mBAAM,IACL,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,SAAS,EACvB,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,CACrB,oBAAC,uBAAU,IAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAC,SAAS,EAAC,UAAU,EAAE,MAAM,IAC3E,CAAC,CAAC,SAAS,CAAC,CACF,CACd,IAEA,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const useTranslation_1 = require("../../hooks/useTranslation");
|
|
7
|
+
const TableTextSearch = (_a) => {
|
|
8
|
+
var { value, setValue, placeholder, onClear } = _a, rest = tslib_1.__rest(_a, ["value", "setValue", "placeholder", "onClear"]);
|
|
9
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
10
|
+
return (React.createElement(react_core_1.SearchInput, Object.assign({ "aria-label": placeholder || t('Search by name'), onChange: (_event, value) => (value === '' && onClear ? onClear() : setValue(value)), value: value, placeholder: placeholder || t('Search by name'), onClear: () => (onClear ? onClear() : setValue('')) }, rest)));
|
|
11
|
+
};
|
|
12
|
+
exports.default = TableTextSearch;
|
|
13
|
+
//# sourceMappingURL=TableTextSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableTextSearch.js","sourceRoot":"","sources":["../../../../src/components/Table/TableTextSearch.tsx"],"names":[],"mappings":";;;AAAA,uDAAuE;AACvE,qDAA+B;AAC/B,+DAA4D;AAO5D,MAAM,eAAe,GAAmC,CAAC,EAAkD,EAAE,EAAE;QAAtD,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,OAAW,EAAN,IAAI,sBAAhD,+CAAkD,CAAF;IACvG,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,OAAO,CACL,oBAAC,wBAAW,gCACE,WAAW,IAAI,CAAC,CAAC,gBAAgB,CAAC,EAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EACpF,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,IAAI,CAAC,CAAC,gBAAgB,CAAC,EAC/C,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAC/C,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '@xterm/xterm/css/xterm.css';
|