@flightctl/ui-components 0.0.5 → 0.4.0-rc1
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/src/components/DetailsPage/Tables/ApplicationsTable.css +7 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts +8 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +91 -9
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js +15 -51
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +65 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts +5 -2
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +19 -10
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts +3 -4
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +6 -18
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts +4 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +13 -4
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js +4 -14
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts +2 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.js +14 -6
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts +2 -5
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js +8 -8
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts +3 -6
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +91 -17
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +10 -6
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +46 -42
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/types.d.ts +1 -10
- package/dist/src/components/Device/DevicesPage/types.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/types.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts +2 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.js +10 -3
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts +8 -3
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/useDevices.js +26 -47
- package/dist/src/components/Device/DevicesPage/useDevices.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts +2 -2
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +19 -4
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +7 -2
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +99 -7
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/{ApplicationsForm.js → ApplicationTemplates.js} +31 -24
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +9 -10
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts +2 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js +5 -6
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/{ConfigTemplateForm.js → ConfigurationTemplates.js} +42 -28
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +53 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.js +13 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.js +38 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +3 -0
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.js +5 -2
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/{MatchPatternsModal/MatchPatternsModal.d.ts → SystemdUnitsModal/SystemdUnitsModal.d.ts} +6 -6
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.d.ts.map +1 -0
- package/dist/src/components/Device/{MatchPatternsModal/MatchPatternsModal.js → SystemdUnitsModal/SystemdUnitsModal.js} +28 -15
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.js.map +1 -0
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts +15 -0
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts.map +1 -0
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.js +57 -0
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.js.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts +2 -2
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +14 -4
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts +9 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +97 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts +2 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +15 -11
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/{Device/DevicesPage → EnrollmentRequest}/EnrollmentRequestTableToolbar.d.ts +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableToolbar.d.ts.map +1 -0
- package/dist/src/components/{Device/DevicesPage → EnrollmentRequest}/EnrollmentRequestTableToolbar.js +2 -2
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableToolbar.js.map +1 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.css +10 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.d.ts +5 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.js +22 -0
- package/dist/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.js.map +1 -0
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts +9 -0
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js +42 -0
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts +2 -2
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +19 -2
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +2 -4
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +6 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js +61 -35
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts +2 -2
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.js +16 -6
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js +7 -7
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js.map +1 -1
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts +2 -5
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetResourceSyncs.js +38 -24
- package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -1
- package/dist/src/components/Fleet/FleetRow.d.ts +2 -0
- package/dist/src/components/Fleet/FleetRow.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetRow.js +16 -14
- package/dist/src/components/Fleet/FleetRow.js.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.d.ts +2 -2
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.js +37 -33
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts +2 -2
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js +11 -2
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +5 -2
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
- package/dist/src/components/Fleet/useFleets.d.ts +26 -0
- package/dist/src/components/Fleet/useFleets.d.ts.map +1 -0
- package/dist/src/components/Fleet/useFleets.js +71 -0
- package/dist/src/components/Fleet/useFleets.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +6 -14
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts +0 -3
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js +2 -2
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js +5 -9
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Overview.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Overview.js +11 -5
- package/dist/src/components/OverviewPage/Overview.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts +2 -2
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js +15 -6
- package/dist/src/components/Repository/CreateRepository/CreateRepository.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +4 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.js +22 -6
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js +3 -2
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts +2 -2
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +16 -5
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts +0 -1
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryList.js +55 -46
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/Repository/useRepositories.d.ts +16 -0
- package/dist/src/components/Repository/useRepositories.d.ts.map +1 -0
- package/dist/src/components/Repository/useRepositories.js +40 -0
- package/dist/src/components/Repository/useRepositories.js.map +1 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +21 -23
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/Table/Table.d.ts +12 -3
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/Table.js +4 -4
- package/dist/src/components/Table/Table.js.map +1 -1
- package/dist/src/components/Table/TablePagination.d.ts +8 -0
- package/dist/src/components/Table/TablePagination.d.ts.map +1 -0
- package/dist/src/components/Table/TablePagination.js +38 -0
- package/dist/src/components/Table/TablePagination.js.map +1 -0
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -1
- package/dist/src/components/Terminal/Terminal.js +1 -0
- package/dist/src/components/Terminal/Terminal.js.map +1 -1
- package/dist/src/components/charts/DonutChart.css +5 -0
- package/dist/src/components/charts/DonutChart.js +1 -1
- package/dist/src/components/charts/DonutChart.js.map +1 -1
- package/dist/src/components/common/AccessDenied.d.ts +4 -0
- package/dist/src/components/common/AccessDenied.d.ts.map +1 -0
- package/dist/src/components/common/AccessDenied.js +15 -0
- package/dist/src/components/common/AccessDenied.js.map +1 -0
- package/dist/src/components/common/ButtonWithPermissions.d.ts +8 -0
- package/dist/src/components/common/ButtonWithPermissions.d.ts.map +1 -0
- package/dist/src/components/common/ButtonWithPermissions.js +12 -0
- package/dist/src/components/common/ButtonWithPermissions.js.map +1 -0
- package/dist/src/components/common/LearnMoreLink.d.ts +7 -0
- package/dist/src/components/common/LearnMoreLink.d.ts.map +1 -0
- package/dist/src/components/common/LearnMoreLink.js +13 -0
- package/dist/src/components/common/LearnMoreLink.js.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.js +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/PageWithPermissions.d.ts +7 -0
- package/dist/src/components/common/PageWithPermissions.d.ts.map +1 -0
- package/dist/src/components/common/PageWithPermissions.js +17 -0
- package/dist/src/components/common/PageWithPermissions.js.map +1 -0
- package/dist/src/components/form/FilterSelect.d.ts +2 -4
- package/dist/src/components/form/FilterSelect.d.ts.map +1 -1
- package/dist/src/components/form/FilterSelect.js.map +1 -1
- package/dist/src/components/form/FlightCtlForm.css +3 -0
- package/dist/src/components/form/FlightCtlForm.d.ts +1 -0
- package/dist/src/components/form/FlightCtlForm.d.ts.map +1 -1
- package/dist/src/components/form/FlightCtlForm.js +2 -1
- package/dist/src/components/form/FlightCtlForm.js.map +1 -1
- package/dist/src/components/form/FormSelect.d.ts +1 -0
- package/dist/src/components/form/FormSelect.d.ts.map +1 -1
- package/dist/src/components/form/FormSelect.js +14 -2
- package/dist/src/components/form/FormSelect.js.map +1 -1
- package/dist/src/components/form/LabelsField.d.ts +2 -1
- package/dist/src/components/form/LabelsField.d.ts.map +1 -1
- package/dist/src/components/form/LabelsField.js +6 -6
- package/dist/src/components/form/LabelsField.js.map +1 -1
- package/dist/src/components/form/validations.d.ts +13 -2
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +39 -24
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +2 -5
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts +2 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +4 -4
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js +2 -3
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +6 -5
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -1
- package/dist/src/constants.d.ts +2 -1
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +3 -1
- package/dist/src/constants.js.map +1 -1
- package/dist/src/hooks/useAccessReview.d.ts +4 -0
- package/dist/src/hooks/useAccessReview.d.ts.map +1 -0
- package/dist/src/hooks/useAccessReview.js +33 -0
- package/dist/src/hooks/useAccessReview.js.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +8 -7
- package/dist/src/hooks/useAppContext.d.ts.map +1 -1
- package/dist/src/hooks/useAppContext.js +2 -2
- package/dist/src/hooks/useAppContext.js.map +1 -1
- package/dist/src/hooks/useFetch.d.ts +4 -2
- package/dist/src/hooks/useFetch.d.ts.map +1 -1
- package/dist/src/hooks/useFetchPeriodically.d.ts +1 -1
- package/dist/src/hooks/useFetchPeriodically.d.ts.map +1 -1
- package/dist/src/hooks/useFetchPeriodically.js +4 -1
- package/dist/src/hooks/useFetchPeriodically.js.map +1 -1
- package/dist/src/hooks/useFleetImportAccessReview.d.ts +3 -0
- package/dist/src/hooks/useFleetImportAccessReview.d.ts.map +1 -0
- package/dist/src/hooks/useFleetImportAccessReview.js +12 -0
- package/dist/src/hooks/useFleetImportAccessReview.js.map +1 -0
- package/dist/src/hooks/useNavigate.d.ts +3 -3
- package/dist/src/hooks/useNavigate.d.ts.map +1 -1
- package/dist/src/hooks/useNavigate.js +3 -3
- package/dist/src/hooks/useNavigate.js.map +1 -1
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.d.ts +2 -0
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.d.ts.map +1 -0
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.js +13 -0
- package/dist/src/hooks/usePendingEnrollmentRequestsCount.js.map +1 -0
- package/dist/src/hooks/useTablePagination.d.ts +10 -0
- package/dist/src/hooks/useTablePagination.d.ts.map +1 -0
- package/dist/src/hooks/useTablePagination.js +33 -0
- package/dist/src/hooks/useTablePagination.js.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +2 -2
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/src/hooks/useWebSocket.js.map +1 -1
- package/dist/src/links.d.ts +3 -0
- package/dist/src/links.d.ts.map +1 -0
- package/dist/src/links.js +6 -0
- package/dist/src/links.js.map +1 -0
- package/dist/src/types/rbac.d.ts +18 -0
- package/dist/src/types/rbac.d.ts.map +1 -0
- package/dist/src/types/rbac.js +23 -0
- package/dist/src/types/rbac.js.map +1 -0
- package/dist/src/utils/api.d.ts +3 -3
- package/dist/src/utils/api.d.ts.map +1 -1
- package/dist/src/utils/api.js.map +1 -1
- package/dist/src/utils/labels.d.ts +1 -1
- package/dist/src/utils/labels.d.ts.map +1 -1
- package/dist/src/utils/labels.js +4 -8
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/query.d.ts +15 -0
- package/dist/src/utils/query.d.ts.map +1 -0
- package/dist/src/utils/query.js +64 -0
- package/dist/src/utils/query.js.map +1 -0
- package/dist/src/utils/search.d.ts +1 -0
- package/dist/src/utils/search.d.ts.map +1 -1
- package/dist/src/utils/search.js +7 -7
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/status/devices.d.ts +2 -1
- package/dist/src/utils/status/devices.d.ts.map +1 -1
- package/dist/src/utils/status/devices.js +1 -0
- package/dist/src/utils/status/devices.js.map +1 -1
- package/package.json +10 -10
- package/src/components/DetailsPage/Tables/ApplicationsTable.css +7 -0
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +150 -13
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +31 -132
- package/src/components/Device/DeviceDetails/DeviceApplications.tsx +102 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +33 -16
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +8 -38
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +21 -4
- package/src/components/Device/DevicesPage/DeviceFilterSelect.tsx +13 -34
- package/src/components/Device/DevicesPage/DeviceTableRow.tsx +21 -9
- package/src/components/Device/DevicesPage/DeviceTableToolbar.tsx +13 -20
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +128 -48
- package/src/components/Device/DevicesPage/DevicesPage.tsx +86 -66
- package/src/components/Device/DevicesPage/types.ts +1 -13
- package/src/components/Device/DevicesPage/useDeviceBackendFilters.ts +14 -3
- package/src/components/Device/DevicesPage/useDevices.ts +49 -57
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +24 -4
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +156 -47
- package/src/components/Device/EditDeviceWizard/steps/{ApplicationsForm.tsx → ApplicationTemplates.tsx} +89 -53
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +22 -26
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +17 -12
- package/src/components/Device/EditDeviceWizard/steps/{ConfigTemplateForm.tsx → ConfigurationTemplates.tsx} +110 -52
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +108 -11
- package/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx +19 -0
- package/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +75 -0
- package/src/components/Device/EditDeviceWizard/types.ts +3 -0
- package/src/components/Device/EditDeviceWizard/utils.ts +14 -4
- package/src/components/Device/{MatchPatternsModal/MatchPatternsModal.tsx → SystemdUnitsModal/SystemdUnitsModal.tsx} +36 -19
- package/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.tsx +114 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +28 -9
- package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +167 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +28 -17
- package/src/components/{Device/DevicesPage → EnrollmentRequest}/EnrollmentRequestTableToolbar.tsx +3 -2
- package/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.css +10 -0
- package/src/components/EnrollmentRequest/PendingEnrollmentRequestsBadge.tsx +27 -0
- package/src/components/EnrollmentRequest/useEnrollmentRequests.ts +63 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +28 -2
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +2 -5
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +7 -0
- package/src/components/Fleet/CreateFleet/utils.ts +101 -49
- package/src/components/Fleet/FleetDetails/FleetDetails.tsx +57 -36
- package/src/components/Fleet/FleetDetails/FleetDevices.tsx +12 -18
- package/src/components/Fleet/FleetResourceSyncs.tsx +53 -41
- package/src/components/Fleet/FleetRow.tsx +28 -16
- package/src/components/Fleet/FleetsPage.tsx +70 -49
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.tsx +16 -3
- package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +25 -19
- package/src/components/Fleet/useFleets.ts +104 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +6 -18
- package/src/components/OverviewPage/Cards/Status/StatusCardFilters.tsx +0 -7
- package/src/components/OverviewPage/Cards/ToDo/ToDoCard.tsx +6 -10
- package/src/components/OverviewPage/Overview.tsx +20 -8
- package/src/components/Repository/CreateRepository/CreateRepository.tsx +25 -9
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +5 -2
- package/src/components/Repository/CreateRepository/utils.ts +23 -7
- package/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.tsx +5 -3
- package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +32 -10
- package/src/components/Repository/RepositoryList.tsx +113 -70
- package/src/components/Repository/useRepositories.ts +59 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +42 -40
- package/src/components/Table/Table.tsx +22 -9
- package/src/components/Table/TablePagination.tsx +74 -0
- package/src/components/Terminal/Terminal.tsx +1 -0
- package/src/components/charts/DonutChart.css +5 -0
- package/src/components/charts/DonutChart.tsx +1 -1
- package/src/components/common/AccessDenied.tsx +17 -0
- package/src/components/common/ButtonWithPermissions.tsx +14 -0
- package/src/components/common/LearnMoreLink.tsx +26 -0
- package/src/components/common/PageWithPermissions.tsx +19 -0
- package/src/components/form/FilterSelect.tsx +2 -4
- package/src/components/form/FlightCtlForm.css +3 -0
- package/src/components/form/FlightCtlForm.tsx +3 -1
- package/src/components/form/FormSelect.tsx +22 -2
- package/src/components/form/LabelsField.tsx +17 -13
- package/src/components/form/validations.ts +53 -25
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +2 -5
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +9 -4
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.tsx +2 -4
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +10 -5
- package/src/constants.ts +2 -1
- package/src/hooks/useAccessReview.ts +33 -0
- package/src/hooks/useAppContext.tsx +6 -5
- package/src/hooks/useFetchPeriodically.ts +4 -0
- package/src/hooks/useFleetImportAccessReview.ts +8 -0
- package/src/hooks/useNavigate.tsx +3 -3
- package/src/hooks/usePendingEnrollmentRequestsCount.ts +12 -0
- package/src/hooks/useTablePagination.tsx +44 -0
- package/src/hooks/useWebSocket.ts +4 -4
- package/src/links.ts +5 -0
- package/src/types/rbac.ts +18 -0
- package/src/utils/api.ts +3 -3
- package/src/utils/labels.ts +3 -7
- package/src/utils/query.ts +70 -0
- package/src/utils/search.ts +1 -1
- package/src/utils/status/devices.ts +1 -0
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts +0 -12
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts.map +0 -1
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.js +0 -40
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.js.map +0 -1
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts +0 -10
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts.map +0 -1
- package/dist/src/components/Device/DeviceDetails/SystemdTable.js +0 -38
- package/dist/src/components/Device/DeviceDetails/SystemdTable.js.map +0 -1
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts +0 -13
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts.map +0 -1
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js +0 -104
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js.map +0 -1
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts.map +0 -1
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js.map +0 -1
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts +0 -8
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts.map +0 -1
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.js +0 -16
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.js.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts +0 -5
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts +0 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js.map +0 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts +0 -11
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts.map +0 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.js +0 -39
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.js.map +0 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts.map +0 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.js.map +0 -1
- package/dist/src/components/common/HelperTextItems.d.ts +0 -3
- package/dist/src/components/common/HelperTextItems.d.ts.map +0 -1
- package/dist/src/components/common/HelperTextItems.js +0 -17
- package/dist/src/components/common/HelperTextItems.js.map +0 -1
- package/dist/src/hooks/useTableSort.d.ts +0 -7
- package/dist/src/hooks/useTableSort.d.ts.map +0 -1
- package/dist/src/hooks/useTableSort.js +0 -38
- package/dist/src/hooks/useTableSort.js.map +0 -1
- package/dist/src/utils/sort/device.d.ts +0 -4
- package/dist/src/utils/sort/device.d.ts.map +0 -1
- package/dist/src/utils/sort/device.js +0 -49
- package/dist/src/utils/sort/device.js.map +0 -1
- package/dist/src/utils/sort/fleet.d.ts +0 -4
- package/dist/src/utils/sort/fleet.d.ts.map +0 -1
- package/dist/src/utils/sort/fleet.js +0 -18
- package/dist/src/utils/sort/fleet.js.map +0 -1
- package/dist/src/utils/sort/generic.d.ts +0 -8
- package/dist/src/utils/sort/generic.d.ts.map +0 -1
- package/dist/src/utils/sort/generic.js +0 -37
- package/dist/src/utils/sort/generic.js.map +0 -1
- package/dist/src/utils/sort/repository.d.ts +0 -6
- package/dist/src/utils/sort/repository.d.ts.map +0 -1
- package/dist/src/utils/sort/repository.js +0 -28
- package/dist/src/utils/sort/repository.js.map +0 -1
- package/dist/src/utils/sort/resourceSync.d.ts +0 -6
- package/dist/src/utils/sort/resourceSync.d.ts.map +0 -1
- package/dist/src/utils/sort/resourceSync.js +0 -29
- package/dist/src/utils/sort/resourceSync.js.map +0 -1
- package/src/components/DetailsPage/Tables/SystemdDetailsTable.tsx +0 -63
- package/src/components/Device/DeviceDetails/SystemdTable.tsx +0 -65
- package/src/components/Device/DevicesPage/EnrollmentRequestList.tsx +0 -183
- package/src/components/Device/DevicesPage/useDeviceFilters.ts +0 -15
- package/src/components/Device/MatchPatternsModal/MatchPatternsForm.tsx +0 -92
- package/src/components/common/HelperTextItems.tsx +0 -25
- package/src/hooks/useTableSort.ts +0 -42
- package/src/utils/sort/device.ts +0 -60
- package/src/utils/sort/fleet.ts +0 -16
- package/src/utils/sort/generic.ts +0 -37
- package/src/utils/sort/repository.ts +0 -28
- package/src/utils/sort/resourceSync.ts +0 -30
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../../../src/utils/sort/fleet.ts"],"names":[],"mappings":";;;AACA,2CAAqD;AAE9C,MAAM,iBAAiB,GAAG,CAAC,MAAoB,EAAE,EAAE,CACxD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;;IACnB,MAAM,GAAG,GAAG,CAAA,MAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,0CAAE,KAAK,KAAI,GAAG,CAAC;IAClD,MAAM,GAAG,GAAG,CAAA,MAAA,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,0CAAE,KAAK,KAAI,GAAG,CAAC;IAClD,OAAO,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC,CAAC,CAAC;AALQ,QAAA,iBAAiB,qBAKzB;AAEE,MAAM,YAAY,GAAG,CAAC,MAAoB,EAAE,EAAE,CACnD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACnB,MAAM,OAAO,GAAG,IAAA,0BAAkB,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,OAAO,GAAG,IAAA,0BAAkB,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC,CAAC,CAAC;AALQ,QAAA,YAAY,gBAKpB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Device, EnrollmentRequest, ObjectMeta } from '@flightctl/types';
|
|
2
|
-
export declare const sortByName: <R extends {
|
|
3
|
-
metadata: ObjectMeta;
|
|
4
|
-
}>(resources: R[]) => R[];
|
|
5
|
-
export declare const sortByLastSeenDate: (devices: Device[]) => Device[];
|
|
6
|
-
export declare const sortByCreationDate: (enrollments: EnrollmentRequest[]) => EnrollmentRequest[];
|
|
7
|
-
export declare const sortByAlias: (devices: Device[]) => Device[];
|
|
8
|
-
//# sourceMappingURL=generic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../../src/utils/sort/generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEzE,eAAO,MAAM,UAAU;cAA0B,UAAU;yBAKvD,CAAC;AAEL,eAAO,MAAM,kBAAkB,YAAa,MAAM,EAAE,aAahD,CAAC;AAEL,eAAO,MAAM,kBAAkB,gBAAiB,iBAAiB,EAAE,wBAK/D,CAAC;AAEL,eAAO,MAAM,WAAW,YAAa,MAAM,EAAE,aAKzC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortByAlias = exports.sortByCreationDate = exports.sortByLastSeenDate = exports.sortByName = void 0;
|
|
4
|
-
const sortByName = (resources) => resources.sort((a, b) => {
|
|
5
|
-
const aName = a.metadata.name || '-';
|
|
6
|
-
const bName = b.metadata.name || '-';
|
|
7
|
-
return aName.localeCompare(bName);
|
|
8
|
-
});
|
|
9
|
-
exports.sortByName = sortByName;
|
|
10
|
-
const sortByLastSeenDate = (devices) => devices.sort((a, b) => {
|
|
11
|
-
const getDate = (device) => {
|
|
12
|
-
var _a;
|
|
13
|
-
const lastSeen = (_a = device.status) === null || _a === void 0 ? void 0 : _a.lastSeen;
|
|
14
|
-
if (lastSeen) {
|
|
15
|
-
return lastSeen;
|
|
16
|
-
}
|
|
17
|
-
return device.metadata.creationTimestamp || 0;
|
|
18
|
-
};
|
|
19
|
-
const aDate = getDate(a);
|
|
20
|
-
const bDate = getDate(b);
|
|
21
|
-
return new Date(aDate).getTime() - new Date(bDate).getTime();
|
|
22
|
-
});
|
|
23
|
-
exports.sortByLastSeenDate = sortByLastSeenDate;
|
|
24
|
-
const sortByCreationDate = (enrollments) => enrollments.sort((a, b) => {
|
|
25
|
-
const aDate = a.metadata.creationTimestamp || 0;
|
|
26
|
-
const bDate = b.metadata.creationTimestamp || 0;
|
|
27
|
-
return new Date(aDate).getTime() - new Date(bDate).getTime();
|
|
28
|
-
});
|
|
29
|
-
exports.sortByCreationDate = sortByCreationDate;
|
|
30
|
-
const sortByAlias = (devices) => devices.sort((a, b) => {
|
|
31
|
-
var _a, _b;
|
|
32
|
-
const aAlias = ((_a = a.metadata.labels) === null || _a === void 0 ? void 0 : _a.alias) || '-';
|
|
33
|
-
const bAlias = ((_b = b.metadata.labels) === null || _b === void 0 ? void 0 : _b.alias) || '-';
|
|
34
|
-
return aAlias.localeCompare(bAlias);
|
|
35
|
-
});
|
|
36
|
-
exports.sortByAlias = sortByAlias;
|
|
37
|
-
//# sourceMappingURL=generic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../../src/utils/sort/generic.ts"],"names":[],"mappings":";;;AAEO,MAAM,UAAU,GAAG,CAAqC,SAAc,EAAE,EAAE,CAC/E,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,GAAG,CAAC;IACrC,MAAM,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,IAAI,GAAG,CAAC;IACrC,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AALQ,QAAA,UAAU,cAKlB;AAEE,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAE,EAAE,CACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACpB,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,EAAE;;QACjC,MAAM,QAAQ,GAAG,MAAA,MAAM,CAAC,MAAM,0CAAE,QAAQ,CAAC;QACzC,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,CAAC,iBAAiB,IAAI,CAAC,CAAC;IAChD,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;AAC/D,CAAC,CAAC,CAAC;AAbQ,QAAA,kBAAkB,sBAa1B;AAEE,MAAM,kBAAkB,GAAG,CAAC,WAAgC,EAAE,EAAE,CACrE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACxB,MAAM,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,IAAI,CAAC,CAAC;IAChD,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;AAC/D,CAAC,CAAC,CAAC;AALQ,QAAA,kBAAkB,sBAK1B;AAEE,MAAM,WAAW,GAAG,CAAC,OAAiB,EAAE,EAAE,CAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;;IACpB,MAAM,MAAM,GAAG,CAAA,MAAA,CAAC,CAAC,QAAQ,CAAC,MAAM,0CAAE,KAAK,KAAI,GAAG,CAAC;IAC/C,MAAM,MAAM,GAAG,CAAA,MAAA,CAAC,CAAC,QAAQ,CAAC,MAAM,0CAAE,KAAK,KAAI,GAAG,CAAC;IAC/C,OAAO,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC;AALQ,QAAA,WAAW,eAKnB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Repository } from '@flightctl/types';
|
|
2
|
-
export declare const sortRepositoriesByUrl: (resources: Repository[]) => Repository[];
|
|
3
|
-
export declare const sortRepositoriesBySyncStatus: (resources: Repository[]) => Repository[];
|
|
4
|
-
export declare const sortRepositoriesByLastTransition: (resources: Repository[]) => Repository[];
|
|
5
|
-
export declare const sortRepositoriesByType: (resources: Repository[]) => Repository[];
|
|
6
|
-
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/utils/sort/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG5D,eAAO,MAAM,qBAAqB,cAAe,UAAU,EAAE,iBAKzD,CAAC;AAEL,eAAO,MAAM,4BAA4B,cAAe,UAAU,EAAE,iBAKhE,CAAC;AAEL,eAAO,MAAM,gCAAgC,cAAe,UAAU,EAAE,iBAKpE,CAAC;AAEL,eAAO,MAAM,sBAAsB,cAAe,UAAU,EAAE,iBAG1D,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortRepositoriesByType = exports.sortRepositoriesByLastTransition = exports.sortRepositoriesBySyncStatus = exports.sortRepositoriesByUrl = void 0;
|
|
4
|
-
const types_1 = require("@flightctl/types");
|
|
5
|
-
const repository_1 = require("../status/repository");
|
|
6
|
-
const sortRepositoriesByUrl = (resources) => resources.sort((a, b) => {
|
|
7
|
-
const aUrl = a.spec.url || '-';
|
|
8
|
-
const bUrl = b.spec.url || '-';
|
|
9
|
-
return aUrl.localeCompare(bUrl);
|
|
10
|
-
});
|
|
11
|
-
exports.sortRepositoriesByUrl = sortRepositoriesByUrl;
|
|
12
|
-
const sortRepositoriesBySyncStatus = (resources) => resources.sort((a, b) => {
|
|
13
|
-
const aStatus = (0, repository_1.getRepositorySyncStatus)(a);
|
|
14
|
-
const bStatus = (0, repository_1.getRepositorySyncStatus)(b);
|
|
15
|
-
return aStatus.status.localeCompare(bStatus.status);
|
|
16
|
-
});
|
|
17
|
-
exports.sortRepositoriesBySyncStatus = sortRepositoriesBySyncStatus;
|
|
18
|
-
const sortRepositoriesByLastTransition = (resources) => resources.sort((a, b) => {
|
|
19
|
-
const aTransition = (0, repository_1.getLastTransitionTimeText)(a).timestamp;
|
|
20
|
-
const bTransition = (0, repository_1.getLastTransitionTimeText)(b).timestamp;
|
|
21
|
-
return new Date(bTransition).getTime() - new Date(aTransition).getTime();
|
|
22
|
-
});
|
|
23
|
-
exports.sortRepositoriesByLastTransition = sortRepositoriesByLastTransition;
|
|
24
|
-
const sortRepositoriesByType = (resources) => resources.sort((a, b) => {
|
|
25
|
-
return (a.spec.type || types_1.RepoSpecType.GIT).localeCompare(b.spec.type || types_1.RepoSpecType.GIT);
|
|
26
|
-
});
|
|
27
|
-
exports.sortRepositoriesByType = sortRepositoriesByType;
|
|
28
|
-
//# sourceMappingURL=repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../../src/utils/sort/repository.ts"],"names":[],"mappings":";;;AAAA,4CAA4D;AAC5D,qDAA0F;AAEnF,MAAM,qBAAqB,GAAG,CAAC,SAAuB,EAAE,EAAE,CAC/D,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;IAC/B,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;IAC/B,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AALQ,QAAA,qBAAqB,yBAK7B;AAEE,MAAM,4BAA4B,GAAG,CAAC,SAAuB,EAAE,EAAE,CACtE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,OAAO,GAAG,IAAA,oCAAuB,EAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAA,oCAAuB,EAAC,CAAC,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AALQ,QAAA,4BAA4B,gCAKpC;AAEE,MAAM,gCAAgC,GAAG,CAAC,SAAuB,EAAE,EAAE,CAC1E,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,WAAW,GAAG,IAAA,sCAAyB,EAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,MAAM,WAAW,GAAG,IAAA,sCAAyB,EAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,CAAC;AAC3E,CAAC,CAAC,CAAC;AALQ,QAAA,gCAAgC,oCAKxC;AAEE,MAAM,sBAAsB,GAAG,CAAC,SAAuB,EAAE,EAAE,CAChE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,oBAAY,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,oBAAY,CAAC,GAAG,CAAC,CAAC;AAC1F,CAAC,CAAC,CAAC;AAHQ,QAAA,sBAAsB,0BAG9B"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ResourceSync } from '@flightctl/types';
|
|
2
|
-
export declare const sortResourceSyncsByPath: (resources: ResourceSync[]) => ResourceSync[];
|
|
3
|
-
export declare const sortResourceSyncsByRevision: (resources: ResourceSync[]) => ResourceSync[];
|
|
4
|
-
export declare const sortResourceSyncsByStatus: (resources: ResourceSync[]) => ResourceSync[];
|
|
5
|
-
export declare const sortResourceSyncsByHash: (resources: ResourceSync[]) => ResourceSync[];
|
|
6
|
-
//# sourceMappingURL=resourceSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceSync.d.ts","sourceRoot":"","sources":["../../../../src/utils/sort/resourceSync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,eAAO,MAAM,uBAAuB,cAAe,YAAY,EAAE,mBAK7D,CAAC;AAEL,eAAO,MAAM,2BAA2B,cAAe,YAAY,EAAE,mBAKjE,CAAC;AAEL,eAAO,MAAM,yBAAyB,cAAe,YAAY,EAAE,mBAK/D,CAAC;AAEL,eAAO,MAAM,uBAAuB,cAAe,YAAY,EAAE,mBAK7D,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortResourceSyncsByHash = exports.sortResourceSyncsByStatus = exports.sortResourceSyncsByRevision = exports.sortResourceSyncsByPath = void 0;
|
|
4
|
-
const repository_1 = require("../status/repository");
|
|
5
|
-
const sortResourceSyncsByPath = (resources) => resources.sort((a, b) => {
|
|
6
|
-
const aPath = a.spec.path || '-';
|
|
7
|
-
const bPath = b.spec.path || '-';
|
|
8
|
-
return aPath.localeCompare(bPath);
|
|
9
|
-
});
|
|
10
|
-
exports.sortResourceSyncsByPath = sortResourceSyncsByPath;
|
|
11
|
-
const sortResourceSyncsByRevision = (resources) => resources.sort((a, b) => {
|
|
12
|
-
const aRevision = a.spec.targetRevision || '-';
|
|
13
|
-
const bRevision = b.spec.targetRevision || '-';
|
|
14
|
-
return aRevision.localeCompare(bRevision);
|
|
15
|
-
});
|
|
16
|
-
exports.sortResourceSyncsByRevision = sortResourceSyncsByRevision;
|
|
17
|
-
const sortResourceSyncsByStatus = (resources) => resources.sort((a, b) => {
|
|
18
|
-
const aStatus = (0, repository_1.getRepositorySyncStatus)(a);
|
|
19
|
-
const bStatus = (0, repository_1.getRepositorySyncStatus)(b);
|
|
20
|
-
return aStatus.status.localeCompare(bStatus.status);
|
|
21
|
-
});
|
|
22
|
-
exports.sortResourceSyncsByStatus = sortResourceSyncsByStatus;
|
|
23
|
-
const sortResourceSyncsByHash = (resources) => resources.sort((a, b) => {
|
|
24
|
-
const aHash = (0, repository_1.getObservedHash)(a) || '-';
|
|
25
|
-
const bHash = (0, repository_1.getObservedHash)(b) || '-';
|
|
26
|
-
return aHash.localeCompare(bHash);
|
|
27
|
-
});
|
|
28
|
-
exports.sortResourceSyncsByHash = sortResourceSyncsByHash;
|
|
29
|
-
//# sourceMappingURL=resourceSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceSync.js","sourceRoot":"","sources":["../../../../src/utils/sort/resourceSync.ts"],"names":[],"mappings":";;;AACA,qDAAgF;AAEzE,MAAM,uBAAuB,GAAG,CAAC,SAAyB,EAAE,EAAE,CACnE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC;IACjC,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC;IACjC,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AALQ,QAAA,uBAAuB,2BAK/B;AAEE,MAAM,2BAA2B,GAAG,CAAC,SAAyB,EAAE,EAAE,CACvE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,GAAG,CAAC;IAC/C,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,GAAG,CAAC;IAC/C,OAAO,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC;AALQ,QAAA,2BAA2B,+BAKnC;AAEE,MAAM,yBAAyB,GAAG,CAAC,SAAyB,EAAE,EAAE,CACrE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,OAAO,GAAG,IAAA,oCAAuB,EAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAA,oCAAuB,EAAC,CAAC,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AALQ,QAAA,yBAAyB,6BAKjC;AAEE,MAAM,uBAAuB,GAAG,CAAC,SAAyB,EAAE,EAAE,CACnE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IACtB,MAAM,KAAK,GAAG,IAAA,4BAAe,EAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IACxC,MAAM,KAAK,GAAG,IAAA,4BAAe,EAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IACxC,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AALQ,QAAA,uBAAuB,2BAK/B"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Bullseye } from '@patternfly/react-core';
|
|
3
|
-
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
|
|
4
|
-
|
|
5
|
-
import { useTranslation } from '../../../hooks/useTranslation';
|
|
6
|
-
import SystemdStatus from '../../Status/SystemdStatus';
|
|
7
|
-
|
|
8
|
-
interface DeviceSystemdUnitStatus {
|
|
9
|
-
name: string;
|
|
10
|
-
status: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type SystemdDetailsTableProps = {
|
|
14
|
-
matchPatterns?: Array<string>;
|
|
15
|
-
systemdUnits: DeviceSystemdUnitStatus[] | undefined;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const SystemdDetailsTable = ({ matchPatterns, systemdUnits }: SystemdDetailsTableProps) => {
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
const hasPatterns = matchPatterns && matchPatterns.length > 0;
|
|
21
|
-
const hasUnits = systemdUnits && systemdUnits.length > 0;
|
|
22
|
-
|
|
23
|
-
if (!hasPatterns && !hasUnits) {
|
|
24
|
-
return <Bullseye>{t('No systemd units found')}</Bullseye>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const patterns: Record<string, DeviceSystemdUnitStatus> = {};
|
|
28
|
-
matchPatterns?.forEach((pattern) => {
|
|
29
|
-
patterns[pattern] = {
|
|
30
|
-
name: pattern,
|
|
31
|
-
status: '',
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
systemdUnits?.forEach((unit) => {
|
|
35
|
-
const name = unit.name;
|
|
36
|
-
patterns[name] = unit;
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<Table aria-label={t('Device systemd table')}>
|
|
41
|
-
<Thead>
|
|
42
|
-
<Tr>
|
|
43
|
-
<Th>{t('Name')}</Th>
|
|
44
|
-
<Th modifier="wrap">{t('Status')}</Th>
|
|
45
|
-
</Tr>
|
|
46
|
-
</Thead>
|
|
47
|
-
<Tbody>
|
|
48
|
-
{Object.entries(patterns).map(([patternName, systemUnitState]) => {
|
|
49
|
-
return (
|
|
50
|
-
<Tr key={patternName}>
|
|
51
|
-
<Td dataLabel={t('Name')}>{patternName}</Td>
|
|
52
|
-
<Td dataLabel={t('Status')}>
|
|
53
|
-
<SystemdStatus status={systemUnitState.status} />
|
|
54
|
-
</Td>
|
|
55
|
-
</Tr>
|
|
56
|
-
);
|
|
57
|
-
})}
|
|
58
|
-
</Tbody>
|
|
59
|
-
</Table>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default SystemdDetailsTable;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Button, Stack, StackItem } from '@patternfly/react-core';
|
|
3
|
-
import { PencilAltIcon } from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
|
|
4
|
-
|
|
5
|
-
import { Device, TemplateVersion } from '@flightctl/types';
|
|
6
|
-
import WithTooltip from '../../common/WithTooltip';
|
|
7
|
-
import { getDeviceFleet } from '../../../utils/devices';
|
|
8
|
-
|
|
9
|
-
import MatchPatternsModal from '../MatchPatternsModal/MatchPatternsModal';
|
|
10
|
-
import { useTranslation } from '../../../hooks/useTranslation';
|
|
11
|
-
import SystemdDetailsTable from '../../DetailsPage/Tables/SystemdDetailsTable';
|
|
12
|
-
|
|
13
|
-
type SystemdTableProps = {
|
|
14
|
-
device: Device;
|
|
15
|
-
onSystemdUnitsUpdate: VoidFunction;
|
|
16
|
-
templateVersion?: TemplateVersion;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const SystemdTable: React.FC<SystemdTableProps> = ({ device, templateVersion, onSystemdUnitsUpdate }) => {
|
|
20
|
-
const { t } = useTranslation();
|
|
21
|
-
const [isModalOpen, setIsModalOpen] = React.useState(false);
|
|
22
|
-
|
|
23
|
-
const disabledEditReason = getDeviceFleet(device.metadata)
|
|
24
|
-
? t('The device is owned by a fleet and it cannot be edited')
|
|
25
|
-
: '';
|
|
26
|
-
|
|
27
|
-
const matchPatterns = templateVersion
|
|
28
|
-
? templateVersion?.status?.systemd?.matchPatterns
|
|
29
|
-
: device.spec?.systemd?.matchPatterns;
|
|
30
|
-
// There is no status information for systemdunits
|
|
31
|
-
const systemdUnits = [];
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<>
|
|
35
|
-
<Stack hasGutter>
|
|
36
|
-
<StackItem>
|
|
37
|
-
<Button
|
|
38
|
-
variant="link"
|
|
39
|
-
icon={<PencilAltIcon />}
|
|
40
|
-
onClick={() => setIsModalOpen(true)}
|
|
41
|
-
isAriaDisabled={!!disabledEditReason}
|
|
42
|
-
>
|
|
43
|
-
<WithTooltip showTooltip={!!disabledEditReason} content={disabledEditReason}>
|
|
44
|
-
<span>{t('Edit')}</span>
|
|
45
|
-
</WithTooltip>
|
|
46
|
-
</Button>
|
|
47
|
-
</StackItem>
|
|
48
|
-
<StackItem>
|
|
49
|
-
<SystemdDetailsTable matchPatterns={matchPatterns} systemdUnits={systemdUnits} />
|
|
50
|
-
</StackItem>
|
|
51
|
-
</Stack>
|
|
52
|
-
{isModalOpen && (
|
|
53
|
-
<MatchPatternsModal
|
|
54
|
-
device={device}
|
|
55
|
-
onClose={(reload) => {
|
|
56
|
-
setIsModalOpen(false);
|
|
57
|
-
reload && onSystemdUnitsUpdate();
|
|
58
|
-
}}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
61
|
-
</>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default SystemdTable;
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TFunction } from 'react-i18next';
|
|
3
|
-
import { Tbody } from '@patternfly/react-table';
|
|
4
|
-
import { SelectList, SelectOption, Spinner, ToolbarItem } from '@patternfly/react-core';
|
|
5
|
-
|
|
6
|
-
import { EnrollmentRequest, EnrollmentRequestList as EnrollmentRequestListType } from '@flightctl/types';
|
|
7
|
-
|
|
8
|
-
import Table, { TableColumn } from '../../Table/Table';
|
|
9
|
-
import TableActions from '../../Table/TableActions';
|
|
10
|
-
import ListPage from '../../ListPage/ListPage';
|
|
11
|
-
import ListPageBody from '../../ListPage/ListPageBody';
|
|
12
|
-
import { useDeleteListAction } from '../../ListPage/ListPageActions';
|
|
13
|
-
import { useFetch } from '../../../hooks/useFetch';
|
|
14
|
-
import { useTranslation } from '../../../hooks/useTranslation';
|
|
15
|
-
import { useFetchPeriodically } from '../../../hooks/useFetchPeriodically';
|
|
16
|
-
import { useTableSelect } from '../../../hooks/useTableSelect';
|
|
17
|
-
import { useTableSort } from '../../../hooks/useTableSort';
|
|
18
|
-
import { useTableTextSearch } from '../../../hooks/useTableTextSearch';
|
|
19
|
-
import { sortByCreationDate, sortByName } from '../../../utils/sort/generic';
|
|
20
|
-
|
|
21
|
-
import ApproveDeviceModal from '../../modals/ApproveDeviceModal/ApproveDeviceModal';
|
|
22
|
-
import MassDeleteDeviceModal from '../../modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal';
|
|
23
|
-
import MassApproveDeviceModal from '../../modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal';
|
|
24
|
-
import EnrollmentRequestTableRow from '../../EnrollmentRequest/EnrollmentRequestTableRow';
|
|
25
|
-
import EnrollmentRequestTableToolbar from './EnrollmentRequestTableToolbar';
|
|
26
|
-
|
|
27
|
-
const getEnrollmentColumns = (t: TFunction): TableColumn<EnrollmentRequest>[] => [
|
|
28
|
-
{
|
|
29
|
-
name: t('Name'),
|
|
30
|
-
onSort: sortByName,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: t('Created'),
|
|
34
|
-
onSort: sortByCreationDate,
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
interface EnrollmentRequestTableProps {
|
|
39
|
-
pendingEnrollments: Array<EnrollmentRequest>;
|
|
40
|
-
approveRefetch: VoidFunction;
|
|
41
|
-
deleteRefetch: VoidFunction;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const getSearchText = (er: EnrollmentRequest) => [er.metadata.name];
|
|
45
|
-
|
|
46
|
-
export const EnrollmentRequestTable = ({
|
|
47
|
-
pendingEnrollments,
|
|
48
|
-
approveRefetch,
|
|
49
|
-
deleteRefetch,
|
|
50
|
-
}: EnrollmentRequestTableProps) => {
|
|
51
|
-
const { t } = useTranslation();
|
|
52
|
-
const { remove } = useFetch();
|
|
53
|
-
|
|
54
|
-
const [approvingErId, setApprovingErId] = React.useState<string>();
|
|
55
|
-
const [isMassDeleteModalOpen, setIsMassDeleteModalOpen] = React.useState(false);
|
|
56
|
-
const [isMassApproveModalOpen, setIsMassApproveModalOpen] = React.useState(false);
|
|
57
|
-
|
|
58
|
-
const enrollmentColumns = React.useMemo(() => getEnrollmentColumns(t), [t]);
|
|
59
|
-
|
|
60
|
-
const { search, setSearch, filteredData } = useTableTextSearch(pendingEnrollments, getSearchText);
|
|
61
|
-
const { getSortParams, sortedData } = useTableSort(filteredData, enrollmentColumns);
|
|
62
|
-
|
|
63
|
-
const { onRowSelect, hasSelectedRows, isAllSelected, isRowSelected, setAllSelected } = useTableSelect();
|
|
64
|
-
|
|
65
|
-
const { deleteAction, deleteModal } = useDeleteListAction({
|
|
66
|
-
resourceType: 'EnrollmentRequest',
|
|
67
|
-
onDelete: async (enrollmentId: string) => {
|
|
68
|
-
await remove(`enrollmentrequests/${enrollmentId}`);
|
|
69
|
-
deleteRefetch();
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const currentEnrollmentRequest = pendingEnrollments.find((er) => er.metadata.name === approvingErId);
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<>
|
|
77
|
-
<EnrollmentRequestTableToolbar search={search} setSearch={setSearch} enrollments={pendingEnrollments}>
|
|
78
|
-
<ToolbarItem>
|
|
79
|
-
<TableActions isDisabled={!hasSelectedRows}>
|
|
80
|
-
<SelectList>
|
|
81
|
-
<SelectOption onClick={() => setIsMassApproveModalOpen(true)}>{t('Approve')}</SelectOption>
|
|
82
|
-
<SelectOption onClick={() => setIsMassDeleteModalOpen(true)}>{t('Delete')}</SelectOption>
|
|
83
|
-
</SelectList>
|
|
84
|
-
</TableActions>
|
|
85
|
-
</ToolbarItem>
|
|
86
|
-
</EnrollmentRequestTableToolbar>
|
|
87
|
-
<Table
|
|
88
|
-
aria-label={t('Table for devices pending approval')}
|
|
89
|
-
columns={enrollmentColumns}
|
|
90
|
-
emptyFilters={filteredData.length === 0}
|
|
91
|
-
emptyData={false}
|
|
92
|
-
getSortParams={getSortParams}
|
|
93
|
-
isAllSelected={isAllSelected}
|
|
94
|
-
onSelectAll={setAllSelected}
|
|
95
|
-
>
|
|
96
|
-
<Tbody>
|
|
97
|
-
{sortedData.map((er, index) => (
|
|
98
|
-
<EnrollmentRequestTableRow
|
|
99
|
-
key={er.metadata.name || ''}
|
|
100
|
-
er={er}
|
|
101
|
-
deleteAction={deleteAction}
|
|
102
|
-
onRowSelect={onRowSelect}
|
|
103
|
-
isRowSelected={isRowSelected}
|
|
104
|
-
rowIndex={index}
|
|
105
|
-
onApprove={() => {
|
|
106
|
-
setApprovingErId(er.metadata.name as string);
|
|
107
|
-
}}
|
|
108
|
-
/>
|
|
109
|
-
))}
|
|
110
|
-
</Tbody>
|
|
111
|
-
</Table>
|
|
112
|
-
|
|
113
|
-
{deleteModal}
|
|
114
|
-
{currentEnrollmentRequest && (
|
|
115
|
-
<ApproveDeviceModal
|
|
116
|
-
enrollmentRequest={currentEnrollmentRequest}
|
|
117
|
-
onClose={(updateList) => {
|
|
118
|
-
setApprovingErId(undefined);
|
|
119
|
-
updateList && approveRefetch();
|
|
120
|
-
}}
|
|
121
|
-
/>
|
|
122
|
-
)}
|
|
123
|
-
{isMassDeleteModalOpen && (
|
|
124
|
-
<MassDeleteDeviceModal
|
|
125
|
-
onClose={() => setIsMassDeleteModalOpen(false)}
|
|
126
|
-
resources={filteredData.filter(isRowSelected)}
|
|
127
|
-
onDeleteSuccess={() => {
|
|
128
|
-
setIsMassDeleteModalOpen(false);
|
|
129
|
-
deleteRefetch();
|
|
130
|
-
}}
|
|
131
|
-
/>
|
|
132
|
-
)}
|
|
133
|
-
{isMassApproveModalOpen && (
|
|
134
|
-
<MassApproveDeviceModal
|
|
135
|
-
onClose={() => setIsMassApproveModalOpen(false)}
|
|
136
|
-
pendingEnrollments={filteredData.filter(isRowSelected)}
|
|
137
|
-
onApproveSuccess={() => {
|
|
138
|
-
setAllSelected(false);
|
|
139
|
-
setIsMassApproveModalOpen(false);
|
|
140
|
-
approveRefetch();
|
|
141
|
-
}}
|
|
142
|
-
/>
|
|
143
|
-
)}
|
|
144
|
-
</>
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
const EnrollmentRequestList = ({ refetchDevices }: { refetchDevices: VoidFunction }) => {
|
|
149
|
-
const { t } = useTranslation();
|
|
150
|
-
const [erList, isLoading, error, refetch] = useFetchPeriodically<EnrollmentRequestListType>({
|
|
151
|
-
endpoint: 'enrollmentrequests',
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
if (isLoading) {
|
|
155
|
-
return <Spinner size="md" />;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// The content only appears if there are pending enrollment requests
|
|
159
|
-
// TODO move the filter as part of the query once it's available via the API
|
|
160
|
-
const pendingEnrollments = (erList?.items || []).filter((er) => er.status?.approval?.approved !== true);
|
|
161
|
-
|
|
162
|
-
if (pendingEnrollments.length === 0) {
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
const approveRefetch = () => {
|
|
167
|
-
refetch();
|
|
168
|
-
refetchDevices();
|
|
169
|
-
};
|
|
170
|
-
return (
|
|
171
|
-
<ListPage title={t('Devices pending approval')} headingLevel="h2">
|
|
172
|
-
<ListPageBody error={error} loading={false}>
|
|
173
|
-
<EnrollmentRequestTable
|
|
174
|
-
pendingEnrollments={pendingEnrollments}
|
|
175
|
-
approveRefetch={approveRefetch}
|
|
176
|
-
deleteRefetch={refetch}
|
|
177
|
-
/>
|
|
178
|
-
</ListPageBody>
|
|
179
|
-
</ListPage>
|
|
180
|
-
);
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
export default EnrollmentRequestList;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Device } from '@flightctl/types';
|
|
2
|
-
import { useTableTextSearch } from '../../../hooks/useTableTextSearch';
|
|
3
|
-
|
|
4
|
-
const getSearchText = (device: Device) => [device.metadata.name, device.metadata.labels?.alias];
|
|
5
|
-
|
|
6
|
-
export const useDeviceFilters = (devices: Array<Device>) => {
|
|
7
|
-
const { search, setSearch, filteredData } = useTableTextSearch(devices, getSearchText);
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
filteredData,
|
|
11
|
-
search,
|
|
12
|
-
setSearch,
|
|
13
|
-
hasFiltersEnabled: !!search,
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Alert, Button, Label, LabelGroup } from '@patternfly/react-core';
|
|
3
|
-
import { useFormikContext } from 'formik';
|
|
4
|
-
|
|
5
|
-
import ErrorHelperText from '../../form/FieldHelperText';
|
|
6
|
-
import FlightCtlActionGroup from '../../form/FlightCtlActionGroup';
|
|
7
|
-
import FlightCtlForm from '../../form/FlightCtlForm';
|
|
8
|
-
import { useTranslation } from '../../../hooks/useTranslation';
|
|
9
|
-
import EditableLabelControl from '../../common/EditableLabelControl';
|
|
10
|
-
|
|
11
|
-
export type MatchPatternsFormValues = {
|
|
12
|
-
matchPatterns: string[];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type MatchPatternsFormProps = {
|
|
16
|
-
onClose: (reload?: boolean) => void;
|
|
17
|
-
error?: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const MatchPatternsForm: React.FC<MatchPatternsFormProps> = ({ onClose, error }) => {
|
|
21
|
-
const { t } = useTranslation();
|
|
22
|
-
const {
|
|
23
|
-
values,
|
|
24
|
-
setFieldValue,
|
|
25
|
-
submitForm,
|
|
26
|
-
isSubmitting,
|
|
27
|
-
errors: formErrors,
|
|
28
|
-
} = useFormikContext<MatchPatternsFormValues>();
|
|
29
|
-
|
|
30
|
-
const onPatternClose = (e: React.MouseEvent<Element, MouseEvent>, index: number) => {
|
|
31
|
-
const newMatchPatterns = [...values.matchPatterns];
|
|
32
|
-
newMatchPatterns.splice(index, 1);
|
|
33
|
-
void setFieldValue('matchPatterns', newMatchPatterns);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const onAdd = (text: string) => {
|
|
37
|
-
const newMatchPatterns = [...values.matchPatterns, text];
|
|
38
|
-
void setFieldValue('matchPatterns', newMatchPatterns);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const onEdit = (index: number, nextText: string) => {
|
|
42
|
-
const newMatchPatterns = [...values.matchPatterns];
|
|
43
|
-
newMatchPatterns.splice(index, 1, nextText);
|
|
44
|
-
void setFieldValue('matchPatterns', newMatchPatterns);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const hasFormErrors = !!formErrors.matchPatterns;
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<FlightCtlForm>
|
|
51
|
-
<LabelGroup
|
|
52
|
-
isEditable
|
|
53
|
-
addLabelControl={
|
|
54
|
-
<EditableLabelControl defaultLabel="name.service" addButtonText={t('Add match pattern')} onAddLabel={onAdd} />
|
|
55
|
-
}
|
|
56
|
-
numLabels={20}
|
|
57
|
-
defaultIsOpen
|
|
58
|
-
>
|
|
59
|
-
{values.matchPatterns.map((pattern, index) => (
|
|
60
|
-
<Label
|
|
61
|
-
key={index}
|
|
62
|
-
id={`${index}`}
|
|
63
|
-
onClose={(e) => onPatternClose(e, index)}
|
|
64
|
-
onEditCancel={(_, prevText) => onEdit(index, prevText)}
|
|
65
|
-
onEditComplete={(_, newText) => onEdit(index, newText)}
|
|
66
|
-
isEditable
|
|
67
|
-
>
|
|
68
|
-
{pattern}
|
|
69
|
-
</Label>
|
|
70
|
-
))}
|
|
71
|
-
</LabelGroup>
|
|
72
|
-
<ErrorHelperText error={formErrors.matchPatterns} />
|
|
73
|
-
{error && <Alert isInline title={error} variant="danger" />}
|
|
74
|
-
<FlightCtlActionGroup>
|
|
75
|
-
<Button
|
|
76
|
-
key="confirm"
|
|
77
|
-
variant="primary"
|
|
78
|
-
onClick={submitForm}
|
|
79
|
-
isDisabled={isSubmitting || hasFormErrors}
|
|
80
|
-
isLoading={isSubmitting}
|
|
81
|
-
>
|
|
82
|
-
{t('Update match patterns')}
|
|
83
|
-
</Button>
|
|
84
|
-
<Button key="cancel" variant="link" onClick={() => onClose()} isDisabled={isSubmitting}>
|
|
85
|
-
{t('Cancel')}
|
|
86
|
-
</Button>
|
|
87
|
-
</FlightCtlActionGroup>
|
|
88
|
-
</FlightCtlForm>
|
|
89
|
-
);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export default MatchPatternsForm;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
3
|
-
import { Button } from '@patternfly/react-core';
|
|
4
|
-
|
|
5
|
-
import { useTranslation } from '../../hooks/useTranslation';
|
|
6
|
-
|
|
7
|
-
export const KubernetesLabelHelperText = () => {
|
|
8
|
-
const { t } = useTranslation();
|
|
9
|
-
return (
|
|
10
|
-
<>
|
|
11
|
-
{t('Must be a valid Kubernetes label')}{' '}
|
|
12
|
-
<Button
|
|
13
|
-
component="a"
|
|
14
|
-
variant="link"
|
|
15
|
-
isInline
|
|
16
|
-
icon={<ExternalLinkAltIcon />}
|
|
17
|
-
target="_blank"
|
|
18
|
-
rel="noopener noreferrer"
|
|
19
|
-
href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/"
|
|
20
|
-
>
|
|
21
|
-
{t('Learn more')}
|
|
22
|
-
</Button>
|
|
23
|
-
</>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { TableColumn } from '../components/Table/Table';
|
|
2
|
-
import { ThProps } from '@patternfly/react-table';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
const getDefaultIndex = <D>(columns: TableColumn<D>[]) => {
|
|
6
|
-
const defaultColumnIndex = columns.findIndex((c) => c.defaultSort);
|
|
7
|
-
return defaultColumnIndex === -1 ? 0 : defaultColumnIndex;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const useTableSort = <D>(data: D[], columns: TableColumn<D>[]) => {
|
|
11
|
-
const [activeSortIndex, setActiveSortIndex] = React.useState<number>(getDefaultIndex(columns));
|
|
12
|
-
const [activeSortDirection, setActiveSortDirection] = React.useState<'asc' | 'desc'>('asc');
|
|
13
|
-
|
|
14
|
-
const getSortParams = React.useCallback(
|
|
15
|
-
(columnIndex: number): ThProps['sort'] =>
|
|
16
|
-
columns[columnIndex].onSort
|
|
17
|
-
? {
|
|
18
|
-
sortBy: {
|
|
19
|
-
index: activeSortIndex,
|
|
20
|
-
direction: activeSortDirection,
|
|
21
|
-
defaultDirection: 'asc',
|
|
22
|
-
},
|
|
23
|
-
onSort: (_, index, direction) => {
|
|
24
|
-
setActiveSortIndex(index);
|
|
25
|
-
setActiveSortDirection(direction);
|
|
26
|
-
},
|
|
27
|
-
columnIndex,
|
|
28
|
-
}
|
|
29
|
-
: undefined,
|
|
30
|
-
[activeSortIndex, activeSortDirection, columns],
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const sortedData = React.useMemo(() => {
|
|
34
|
-
const sorted = columns[activeSortIndex].onSort?.(data);
|
|
35
|
-
if (activeSortDirection === 'desc') {
|
|
36
|
-
sorted?.reverse();
|
|
37
|
-
}
|
|
38
|
-
return sorted || data;
|
|
39
|
-
}, [columns, data, activeSortIndex, activeSortDirection]);
|
|
40
|
-
|
|
41
|
-
return { getSortParams, sortedData };
|
|
42
|
-
};
|