@flightctl/ui-components 0.0.10 → 0.4.0-rc2
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 -4
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +18 -9
- 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 +0 -3
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js +2 -2
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts +1 -4
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +70 -16
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +6 -8
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +41 -37
- 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/useDevices.d.ts +9 -10
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/useDevices.js +9 -29
- 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/{Device/DevicesPage → EnrollmentRequest}/EnrollmentRequestList.js +40 -38
- 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/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/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 +34 -24
- 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 +11 -3
- package/dist/src/components/Fleet/useFleets.d.ts.map +1 -1
- package/dist/src/components/Fleet/useFleets.js +22 -12
- package/dist/src/components/Fleet/useFleets.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +5 -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/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 +0 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/Table.js +2 -2
- 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/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/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 +4 -3
- 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/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 +9 -0
- package/dist/src/utils/query.d.ts.map +1 -1
- package/dist/src/utils/query.js +33 -1
- package/dist/src/utils/query.js.map +1 -1
- 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/package.json +5 -5
- 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 +0 -7
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +93 -40
- package/src/components/Device/DevicesPage/DevicesPage.tsx +64 -58
- package/src/components/Device/DevicesPage/types.ts +1 -13
- package/src/components/Device/DevicesPage/useDevices.ts +19 -38
- 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/{Device/DevicesPage → EnrollmentRequest}/EnrollmentRequestList.tsx +57 -48
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +28 -17
- package/src/components/{Device/DevicesPage → EnrollmentRequest}/EnrollmentRequestTableToolbar.tsx +3 -2
- 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/FleetResourceSyncs.tsx +53 -41
- package/src/components/Fleet/FleetRow.tsx +28 -16
- package/src/components/Fleet/FleetsPage.tsx +63 -53
- 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 +40 -22
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +5 -18
- package/src/components/OverviewPage/Cards/Status/StatusCardFilters.tsx +0 -7
- 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 -71
- package/src/components/Repository/useRepositories.ts +59 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +41 -40
- package/src/components/Table/Table.tsx +3 -4
- package/src/components/Table/TablePagination.tsx +74 -0
- package/src/components/Terminal/Terminal.tsx +1 -0
- 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 +8 -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/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 +41 -0
- package/src/utils/search.ts +1 -1
- 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 -6
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts.map +0 -1
- 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/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/useApiTableSort.d.ts +0 -8
- package/dist/src/hooks/useApiTableSort.d.ts.map +0 -1
- package/dist/src/hooks/useApiTableSort.js +0 -44
- package/dist/src/hooks/useApiTableSort.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/generic.d.ts +0 -5
- package/dist/src/utils/sort/generic.d.ts.map +0 -1
- package/dist/src/utils/sort/generic.js +0 -10
- 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/MatchPatternsModal/MatchPatternsForm.tsx +0 -92
- package/src/components/common/HelperTextItems.tsx +0 -25
- package/src/hooks/useApiTableSort.ts +0 -49
- package/src/hooks/useTableSort.ts +0 -42
- package/src/utils/sort/generic.ts +0 -8
- package/src/utils/sort/repository.ts +0 -28
- package/src/utils/sort/resourceSync.ts +0 -30
|
@@ -11,6 +11,7 @@ const useFetch_1 = require("../../../hooks/useFetch");
|
|
|
11
11
|
const ListPage_1 = tslib_1.__importDefault(require("../../ListPage/ListPage"));
|
|
12
12
|
const ListPageBody_1 = tslib_1.__importDefault(require("../../ListPage/ListPageBody"));
|
|
13
13
|
const ListPageActions_1 = require("../../ListPage/ListPageActions");
|
|
14
|
+
const TablePagination_1 = tslib_1.__importDefault(require("../../Table/TablePagination"));
|
|
14
15
|
const AddDeviceModal_1 = tslib_1.__importDefault(require("../AddDeviceModal/AddDeviceModal"));
|
|
15
16
|
const Table_1 = tslib_1.__importDefault(require("../../Table/Table"));
|
|
16
17
|
const DeviceTableToolbar_1 = tslib_1.__importDefault(require("./DeviceTableToolbar"));
|
|
@@ -20,21 +21,23 @@ const ResourceListEmptyState_1 = tslib_1.__importDefault(require("../../common/R
|
|
|
20
21
|
const useTableSelect_1 = require("../../../hooks/useTableSelect");
|
|
21
22
|
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
22
23
|
const useNavigate_1 = require("../../../hooks/useNavigate");
|
|
24
|
+
const useTablePagination_1 = require("../../../hooks/useTablePagination");
|
|
23
25
|
const useDevices_1 = require("./useDevices");
|
|
24
26
|
const useDeviceBackendFilters_1 = require("./useDeviceBackendFilters");
|
|
25
27
|
const utils_1 = require("../../Status/utils");
|
|
26
|
-
const EnrollmentRequestList_1 = tslib_1.__importDefault(require("
|
|
27
|
-
const
|
|
28
|
-
const
|
|
28
|
+
const EnrollmentRequestList_1 = tslib_1.__importDefault(require("../../EnrollmentRequest/EnrollmentRequestList"));
|
|
29
|
+
const PageWithPermissions_1 = tslib_1.__importDefault(require("../../common/PageWithPermissions"));
|
|
30
|
+
const rbac_1 = require("../../../types/rbac");
|
|
31
|
+
const useAccessReview_1 = require("../../../hooks/useAccessReview");
|
|
29
32
|
const DeviceEmptyState = ({ onAddDevice }) => {
|
|
30
33
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
34
|
+
const [canCreateFleet] = (0, useAccessReview_1.useAccessReview)(rbac_1.RESOURCE.FLEET, rbac_1.VERB.CREATE);
|
|
31
35
|
return (React.createElement(ResourceListEmptyState_1.default, { icon: microchip_icon_1.MicrochipIcon, titleText: t('No devices here!') },
|
|
32
|
-
React.createElement(react_core_1.EmptyStateBody, null,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
" and add devices into it.")),
|
|
36
|
+
React.createElement(react_core_1.EmptyStateBody, null, canCreateFleet ? (React.createElement(react_i18next_1.Trans, { t: t },
|
|
37
|
+
"You can add devices and label them to match fleets, or you can",
|
|
38
|
+
' ',
|
|
39
|
+
React.createElement(useNavigate_1.Link, { to: useNavigate_1.ROUTE.FLEET_CREATE }, "start with a fleet"),
|
|
40
|
+
" and add devices into it.")) : (t('You can add devices and label them to match fleets'))),
|
|
38
41
|
React.createElement(react_core_1.EmptyStateFooter, null,
|
|
39
42
|
React.createElement(react_core_1.EmptyStateActions, null,
|
|
40
43
|
React.createElement(react_core_1.Button, { onClick: onAddDevice }, t('Add devices'))))));
|
|
@@ -42,39 +45,30 @@ const DeviceEmptyState = ({ onAddDevice }) => {
|
|
|
42
45
|
const getDeviceColumns = (t) => [
|
|
43
46
|
{
|
|
44
47
|
name: t('Alias'),
|
|
45
|
-
// Sorting works on this field even though "alias" is actually a label
|
|
46
|
-
sortableField: 'metadata.alias',
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
name: t('Name'),
|
|
50
|
-
sortableField: 'metadata.name',
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
name: t('Fleet'),
|
|
54
|
-
sortableField: 'metadata.owner',
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
56
|
name: t('Application status'),
|
|
58
57
|
helperText: (0, utils_1.getApplicationStatusHelperText)(t),
|
|
59
|
-
sortableField: 'status.applicationsSummary.status',
|
|
60
58
|
},
|
|
61
59
|
{
|
|
62
60
|
name: t('Device status'),
|
|
63
61
|
helperText: (0, utils_1.getDeviceStatusHelperText)(t),
|
|
64
|
-
sortableField: 'status.summary.status',
|
|
65
|
-
defaultSort: true,
|
|
66
62
|
},
|
|
67
63
|
{
|
|
68
64
|
name: t('Update status'),
|
|
69
65
|
helperText: (0, utils_1.getUpdateStatusHelperText)(t),
|
|
70
|
-
sortableField: 'status.updated.status',
|
|
71
66
|
},
|
|
72
67
|
{
|
|
73
68
|
name: t('Last seen'),
|
|
74
|
-
sortableField: 'status.lastSeen',
|
|
75
69
|
},
|
|
76
70
|
];
|
|
77
|
-
const DeviceTable = ({ devices, refetch, nameOrAlias, setNameOrAlias, ownerFleets, setOwnerFleets, activeStatuses, setActiveStatuses,
|
|
71
|
+
const DeviceTable = ({ devices, refetch, nameOrAlias, setNameOrAlias, ownerFleets, setOwnerFleets, activeStatuses, setActiveStatuses, selectedLabels, setSelectedLabels, hasFiltersEnabled, isFilterUpdating, deviceColumns, pagination, }) => {
|
|
78
72
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
79
73
|
const [addDeviceModal, setAddDeviceModal] = React.useState(false);
|
|
80
74
|
const [isMassDeleteModalOpen, setIsMassDeleteModalOpen] = React.useState(false);
|
|
@@ -87,14 +81,17 @@ const DeviceTable = ({ devices, refetch, nameOrAlias, setNameOrAlias, ownerFleet
|
|
|
87
81
|
refetch();
|
|
88
82
|
}),
|
|
89
83
|
});
|
|
84
|
+
const [canDelete] = (0, useAccessReview_1.useAccessReview)(rbac_1.RESOURCE.DEVICE, rbac_1.VERB.DELETE);
|
|
85
|
+
const [canEdit] = (0, useAccessReview_1.useAccessReview)(rbac_1.RESOURCE.DEVICE, rbac_1.VERB.PATCH);
|
|
90
86
|
return (React.createElement(React.Fragment, null,
|
|
91
|
-
React.createElement(DeviceTableToolbar_1.default, { nameOrAlias: nameOrAlias, setNameOrAlias: setNameOrAlias, ownerFleets: ownerFleets, setOwnerFleets: setOwnerFleets, activeStatuses: activeStatuses, setActiveStatuses: setActiveStatuses,
|
|
87
|
+
React.createElement(DeviceTableToolbar_1.default, { nameOrAlias: nameOrAlias, setNameOrAlias: setNameOrAlias, ownerFleets: ownerFleets, setOwnerFleets: setOwnerFleets, activeStatuses: activeStatuses, setActiveStatuses: setActiveStatuses, selectedLabels: selectedLabels, setSelectedLabels: setSelectedLabels, isFilterUpdating: isFilterUpdating },
|
|
92
88
|
React.createElement(react_core_1.ToolbarItem, null,
|
|
93
89
|
React.createElement(react_core_1.Button, { onClick: () => setAddDeviceModal(true) }, t('Add devices'))),
|
|
94
|
-
React.createElement(react_core_1.ToolbarItem, null,
|
|
95
|
-
React.createElement(react_core_1.Button, { isDisabled: !hasSelectedRows, onClick: () => setIsMassDeleteModalOpen(true), variant: "secondary" }, t('Delete devices')))),
|
|
96
|
-
React.createElement(Table_1.default, { "aria-label": t('Devices table'), loading: isFilterUpdating, columns: deviceColumns, emptyFilters: !hasFiltersEnabled, emptyData: devices.length === 0,
|
|
97
|
-
React.createElement(react_table_1.Tbody, null, devices.map((device, index) => (React.createElement(DeviceTableRow_1.default, { key: device.metadata.name || '', device: device, deleteAction: deleteDeviceAction, onRowSelect: onRowSelect, isRowSelected: isRowSelected, rowIndex: index }))))),
|
|
90
|
+
canDelete && (React.createElement(react_core_1.ToolbarItem, null,
|
|
91
|
+
React.createElement(react_core_1.Button, { isDisabled: !hasSelectedRows, onClick: () => setIsMassDeleteModalOpen(true), variant: "secondary" }, t('Delete devices'))))),
|
|
92
|
+
React.createElement(Table_1.default, { "aria-label": t('Devices table'), loading: isFilterUpdating, columns: deviceColumns, emptyFilters: !hasFiltersEnabled, emptyData: devices.length === 0, isAllSelected: isAllSelected, onSelectAll: setAllSelected },
|
|
93
|
+
React.createElement(react_table_1.Tbody, null, devices.map((device, index) => (React.createElement(DeviceTableRow_1.default, { key: device.metadata.name || '', device: device, deleteAction: deleteDeviceAction, onRowSelect: onRowSelect, isRowSelected: isRowSelected, rowIndex: index, canDelete: canDelete, canEdit: canEdit }))))),
|
|
94
|
+
React.createElement(TablePagination_1.default, { isUpdating: isFilterUpdating, pagination: pagination }),
|
|
98
95
|
!hasFiltersEnabled && devices.length === 0 && React.createElement(DeviceEmptyState, { onAddDevice: () => setAddDeviceModal(true) }),
|
|
99
96
|
deleteDeviceModal,
|
|
100
97
|
addDeviceModal && React.createElement(AddDeviceModal_1.default, { onClose: () => setAddDeviceModal(false) }),
|
|
@@ -104,27 +101,34 @@ const DeviceTable = ({ devices, refetch, nameOrAlias, setNameOrAlias, ownerFleet
|
|
|
104
101
|
} }))));
|
|
105
102
|
};
|
|
106
103
|
exports.DeviceTable = DeviceTable;
|
|
107
|
-
const DevicesPage = () => {
|
|
104
|
+
const DevicesPage = ({ canListER }) => {
|
|
108
105
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
109
106
|
const deviceColumns = React.useMemo(() => getDeviceColumns(t), [t]);
|
|
110
107
|
const { nameOrAlias, setNameOrAlias, ownerFleets, activeStatuses, hasFiltersEnabled, setOwnerFleets, setActiveStatuses, selectedLabels, setSelectedLabels, } = (0, useDeviceBackendFilters_1.useDeviceBackendFilters)();
|
|
111
|
-
const {
|
|
112
|
-
const [data, loading, error, updating, refetch
|
|
108
|
+
const { currentPage, setCurrentPage, onPageFetched, nextContinue, itemCount } = (0, useTablePagination_1.useTablePagination)();
|
|
109
|
+
const [data, loading, error, updating, refetch] = (0, useDevices_1.useDevices)({
|
|
113
110
|
nameOrAlias,
|
|
114
111
|
ownerFleets,
|
|
115
112
|
activeStatuses,
|
|
116
113
|
labels: selectedLabels,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
});
|
|
120
|
-
const [fleetsList, flLoading, flError] = (0, useFetchPeriodically_1.useFetchPeriodically)({
|
|
121
|
-
endpoint: 'fleets',
|
|
114
|
+
nextContinue,
|
|
115
|
+
onPageFetched,
|
|
122
116
|
});
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
const pagination = React.useMemo(() => ({
|
|
118
|
+
currentPage,
|
|
119
|
+
setCurrentPage,
|
|
120
|
+
itemCount,
|
|
121
|
+
}), [currentPage, setCurrentPage, itemCount]);
|
|
122
|
+
return (React.createElement(React.Fragment, null,
|
|
123
|
+
canListER && React.createElement(EnrollmentRequestList_1.default, { refetchDevices: refetch }),
|
|
125
124
|
React.createElement(ListPage_1.default, { title: t('Devices') },
|
|
126
|
-
React.createElement(ListPageBody_1.default, { error: error
|
|
127
|
-
React.createElement(exports.DeviceTable, { devices: data,
|
|
125
|
+
React.createElement(ListPageBody_1.default, { error: error, loading: loading },
|
|
126
|
+
React.createElement(exports.DeviceTable, { devices: data, refetch: refetch, nameOrAlias: nameOrAlias, setNameOrAlias: setNameOrAlias, hasFiltersEnabled: hasFiltersEnabled || updating, ownerFleets: ownerFleets, activeStatuses: activeStatuses, setOwnerFleets: setOwnerFleets, setActiveStatuses: setActiveStatuses, selectedLabels: selectedLabels, setSelectedLabels: setSelectedLabels, isFilterUpdating: updating, deviceColumns: deviceColumns, pagination: pagination })))));
|
|
127
|
+
};
|
|
128
|
+
const DevicesPageWithPermissions = () => {
|
|
129
|
+
const [canListDevice, deviceLoading] = (0, useAccessReview_1.useAccessReview)(rbac_1.RESOURCE.DEVICE, rbac_1.VERB.LIST);
|
|
130
|
+
const [canListER, erLoading] = (0, useAccessReview_1.useAccessReview)(rbac_1.RESOURCE.ENROLLMENT_REQUEST, rbac_1.VERB.LIST);
|
|
131
|
+
return (React.createElement(PageWithPermissions_1.default, { loading: deviceLoading || erLoading, allowed: canListDevice || canListER }, canListDevice ? React.createElement(DevicesPage, { canListER: canListER }) : React.createElement(EnrollmentRequestList_1.default, { isStandalone: true })));
|
|
128
132
|
};
|
|
129
|
-
exports.default =
|
|
133
|
+
exports.default = DevicesPageWithPermissions;
|
|
130
134
|
//# sourceMappingURL=DevicesPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevicesPage.js","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/DevicesPage.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"DevicesPage.js","sourceRoot":"","sources":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I,QAAQ,EAChD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,QAAQ,EAC1B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,GACtB,CACW,CACN,CACV,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,GAAG,EAAE;IACtC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,GAAG,IAAA,iCAAe,EAAC,eAAQ,CAAC,MAAM,EAAE,WAAI,CAAC,IAAI,CAAC,CAAC;IACnF,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,IAAA,iCAAe,EAAC,eAAQ,CAAC,kBAAkB,EAAE,WAAI,CAAC,IAAI,CAAC,CAAC;IAEvF,OAAO,CACL,oBAAC,6BAAmB,IAAC,OAAO,EAAE,aAAa,IAAI,SAAS,EAAE,OAAO,EAAE,aAAa,IAAI,SAAS,IAC1F,aAAa,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,SAAS,EAAE,SAAS,GAAI,CAAC,CAAC,CAAC,oBAAC,+BAAqB,IAAC,YAAY,SAAG,CAC3E,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,0BAA0B,CAAC"}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { StatusItem } from '../../../utils/status/common';
|
|
1
|
+
import { FilterSearchParams } from '../../../utils/status/devices';
|
|
3
2
|
import { ApplicationsSummaryStatusType, DeviceSummaryStatusType, DeviceUpdatedStatusType } from '@flightctl/types';
|
|
4
|
-
type FilterOptionsProps<T extends DeviceSummaryStatus> = {
|
|
5
|
-
filter: string;
|
|
6
|
-
items: Array<StatusItem<T>>;
|
|
7
|
-
selectedFilters: Array<T>;
|
|
8
|
-
onClick: (value: string) => void;
|
|
9
|
-
};
|
|
10
|
-
export type FilterOptionsFC = <T extends DeviceSummaryStatus>(props: FilterOptionsProps<T>) => JSX.Element | JSX.Element[];
|
|
11
3
|
export type FilterStatusMap = {
|
|
12
4
|
[FilterSearchParams.AppStatus]: ApplicationsSummaryStatusType[];
|
|
13
5
|
[FilterSearchParams.DeviceStatus]: DeviceSummaryStatusType[];
|
|
14
6
|
[FilterSearchParams.UpdatedStatus]: DeviceUpdatedStatusType[];
|
|
15
7
|
};
|
|
16
8
|
export type UpdateStatus = (statusType?: keyof FilterStatusMap, status?: string) => void;
|
|
17
|
-
export {};
|
|
18
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEnH,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,6BAA6B,EAAE,CAAC;IAChE,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC7D,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,UAAU,CAAC,EAAE,MAAM,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/types.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/types.ts"],"names":[],"mappings":";;AAAA,2DAAmE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Device, DevicesSummary } from '@flightctl/types';
|
|
1
|
+
import { Device, DeviceList, DevicesSummary } from '@flightctl/types';
|
|
2
2
|
import { FlightCtlLabel } from '../../../types/extraTypes';
|
|
3
3
|
import { FilterStatusMap } from './types';
|
|
4
4
|
type DevicesEndpointArgs = {
|
|
@@ -6,9 +6,8 @@ type DevicesEndpointArgs = {
|
|
|
6
6
|
ownerFleets?: string[];
|
|
7
7
|
activeStatuses?: FilterStatusMap;
|
|
8
8
|
labels?: FlightCtlLabel[];
|
|
9
|
-
sortField?: string;
|
|
10
|
-
direction?: string;
|
|
11
9
|
summaryOnly?: boolean;
|
|
10
|
+
nextContinue?: string;
|
|
12
11
|
};
|
|
13
12
|
export declare const useDevicesEndpoint: (args: DevicesEndpointArgs) => [string, boolean];
|
|
14
13
|
export declare const useDevicesSummary: ({ ownerFleets, labels, }: {
|
|
@@ -16,12 +15,12 @@ export declare const useDevicesSummary: ({ ownerFleets, labels, }: {
|
|
|
16
15
|
labels?: FlightCtlLabel[] | undefined;
|
|
17
16
|
}) => [DevicesSummary | undefined, boolean];
|
|
18
17
|
export declare const useDevices: (args: {
|
|
19
|
-
nameOrAlias?: string;
|
|
20
|
-
ownerFleets?: string[];
|
|
21
|
-
activeStatuses?: FilterStatusMap;
|
|
22
|
-
labels?: FlightCtlLabel[];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}) => [Device[], boolean, unknown, boolean, VoidFunction
|
|
18
|
+
nameOrAlias?: string | undefined;
|
|
19
|
+
ownerFleets?: string[] | undefined;
|
|
20
|
+
activeStatuses?: FilterStatusMap | undefined;
|
|
21
|
+
labels?: FlightCtlLabel[] | undefined;
|
|
22
|
+
nextContinue?: string | undefined;
|
|
23
|
+
onPageFetched?: ((data: DeviceList) => void) | undefined;
|
|
24
|
+
}) => [Device[], boolean, unknown, boolean, VoidFunction];
|
|
26
25
|
export {};
|
|
27
26
|
//# sourceMappingURL=useDevices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDevices.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/useDevices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDevices.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/useDevices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAItE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,KAAK,mBAAmB,GAAG;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AA+CF,eAAO,MAAM,kBAAkB,SAAU,mBAAmB,KAAG,CAAC,MAAM,EAAE,OAAO,CAI9E,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;MAM1B,CAAC,cAAc,GAAG,SAAS,EAAE,OAAO,CAOvC,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;4BAME,UAAU,KAAK,IAAI;MACxC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAWrD,CAAC"}
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useDevices = exports.useDevicesSummary = exports.useDevicesEndpoint = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
5
|
const use_debounce_1 = require("use-debounce");
|
|
7
|
-
const types_1 = require("@flightctl/types");
|
|
8
6
|
const devices_1 = require("../../../utils/status/devices");
|
|
9
7
|
const queryUtils = tslib_1.__importStar(require("../../../utils/query"));
|
|
10
|
-
const labels_1 = require("../../../utils/labels");
|
|
11
8
|
const useFetchPeriodically_1 = require("../../../hooks/useFetchPeriodically");
|
|
12
|
-
const
|
|
9
|
+
const constants_1 = require("../../../constants");
|
|
10
|
+
const getDevicesEndpoint = ({ nameOrAlias, ownerFleets, activeStatuses, labels, nextContinue, summaryOnly, }) => {
|
|
13
11
|
const filterByAppStatus = activeStatuses === null || activeStatuses === void 0 ? void 0 : activeStatuses[devices_1.FilterSearchParams.AppStatus];
|
|
14
12
|
const filterByDevStatus = activeStatuses === null || activeStatuses === void 0 ? void 0 : activeStatuses[devices_1.FilterSearchParams.DeviceStatus];
|
|
15
13
|
const filterByUpdateStatus = activeStatuses === null || activeStatuses === void 0 ? void 0 : activeStatuses[devices_1.FilterSearchParams.UpdatedStatus];
|
|
@@ -31,9 +29,11 @@ const getDevicesEndpoint = ({ nameOrAlias, ownerFleets, activeStatuses, labels,
|
|
|
31
29
|
if (summaryOnly) {
|
|
32
30
|
params.set('summaryOnly', 'true');
|
|
33
31
|
}
|
|
34
|
-
if (
|
|
35
|
-
params.set('
|
|
36
|
-
|
|
32
|
+
if (nextContinue !== undefined) {
|
|
33
|
+
params.set('limit', `${constants_1.PAGE_SIZE}`);
|
|
34
|
+
}
|
|
35
|
+
if (nextContinue) {
|
|
36
|
+
params.set('continue', nextContinue);
|
|
37
37
|
}
|
|
38
38
|
return params.size ? `devices?${params.toString()}` : 'devices';
|
|
39
39
|
};
|
|
@@ -52,31 +52,11 @@ const useDevicesSummary = ({ ownerFleets, labels, }) => {
|
|
|
52
52
|
};
|
|
53
53
|
exports.useDevicesSummary = useDevicesSummary;
|
|
54
54
|
const useDevices = (args) => {
|
|
55
|
-
const [deviceLabelList] = (0, useFetchPeriodically_1.useFetchPeriodically)({
|
|
56
|
-
endpoint: 'devices',
|
|
57
|
-
});
|
|
58
55
|
const [devicesEndpoint, devicesDebouncing] = (0, exports.useDevicesEndpoint)(args);
|
|
59
56
|
const [devicesList, devicesLoading, devicesError, devicesRefetch, updating] = (0, useFetchPeriodically_1.useFetchPeriodically)({
|
|
60
57
|
endpoint: devicesEndpoint,
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const labelsSet = new Set();
|
|
64
|
-
deviceLabelList === null || deviceLabelList === void 0 ? void 0 : deviceLabelList.items.forEach((device) => {
|
|
65
|
-
const deviceLabels = (0, labels_1.fromAPILabel)(device.metadata.labels || {}).filter((label) => label.key !== 'alias');
|
|
66
|
-
deviceLabels.forEach((label) => {
|
|
67
|
-
labelsSet.add(label);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
return Array.from(labelsSet);
|
|
71
|
-
}, [deviceLabelList]);
|
|
72
|
-
return [
|
|
73
|
-
(devicesList === null || devicesList === void 0 ? void 0 : devicesList.items) || [],
|
|
74
|
-
devicesLoading,
|
|
75
|
-
devicesError,
|
|
76
|
-
updating || devicesDebouncing,
|
|
77
|
-
devicesRefetch,
|
|
78
|
-
allLabels || [],
|
|
79
|
-
];
|
|
58
|
+
}, args.onPageFetched);
|
|
59
|
+
return [(devicesList === null || devicesList === void 0 ? void 0 : devicesList.items) || [], devicesLoading, devicesError, updating || devicesDebouncing, devicesRefetch];
|
|
80
60
|
};
|
|
81
61
|
exports.useDevices = useDevices;
|
|
82
62
|
//# sourceMappingURL=useDevices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDevices.js","sourceRoot":"","sources":["../../../../../src/components/Device/DevicesPage/useDevices.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"useDevices.js","sourceRoot":"","sources":["../../../../../src/components/Device/Dev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AQ,EAAE,eAAe;KAC1B,CAAC,CAAC;IAEH,OAAO,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC,CAAC;AAbW,QAAA,iBAAiB,qBAa5B;AAEK,MAAM,UAAU,GAAG,CAAC,IAO1B,EAAuD,EAAE;IACxD,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,GAAG,IAAA,0BAAkB,EAAC,IAAI,CAAC,CAAC;IAEtE,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,CAAC,GAAG,IAAA,2CAAoB,EAChG;QACE,QAAQ,EAAE,eAAe;KAC1B,EACD,IAAI,CAAC,aAAa,CACnB,CAAC;IAEF,OAAO,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,IAAI,iBAAiB,EAAE,cAAc,CAAC,CAAC;AACjH,CAAC,CAAC;AAlBW,QAAA,UAAU,cAkBrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import './EditDeviceWizard.css';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const EditDeviceWizardWithPermissions: () => React.JSX.Element;
|
|
4
|
+
export default EditDeviceWizardWithPermissions;
|
|
5
5
|
//# sourceMappingURL=EditDeviceWizard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditDeviceWizard.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"EditDeviceWizard.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B,OAAO,wBAAwB,CAAC;AA4HhC,QAAA,MAAM,+BAA+B,yBAOpC,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
|
|
@@ -19,6 +19,9 @@ const useFetch_1 = require("../../../hooks/useFetch");
|
|
|
19
19
|
const useEditDevice_1 = require("./useEditDevice");
|
|
20
20
|
const EditDeviceWizardNav_1 = tslib_1.__importDefault(require("./EditDeviceWizardNav"));
|
|
21
21
|
const EditDeviceWizardFooter_1 = tslib_1.__importDefault(require("./EditDeviceWizardFooter"));
|
|
22
|
+
const PageWithPermissions_1 = tslib_1.__importDefault(require("../../common/PageWithPermissions"));
|
|
23
|
+
const rbac_1 = require("../../../types/rbac");
|
|
24
|
+
const useAccessReview_1 = require("../../../hooks/useAccessReview");
|
|
22
25
|
require("./EditDeviceWizard.css");
|
|
23
26
|
const EditDeviceWizard = () => {
|
|
24
27
|
var _a, _b, _c;
|
|
@@ -41,13 +44,16 @@ const EditDeviceWizard = () => {
|
|
|
41
44
|
body = (React.createElement(react_core_1.Alert, { isInline: true, variant: "info", title: t('Device is non-editable') }, t('This device is managed by a fleet and it cannot be edited directly.')));
|
|
42
45
|
}
|
|
43
46
|
else if (device) {
|
|
47
|
+
const registerMicroShift = (0, deviceSpecUtils_1.hasMicroshiftRegistrationConfig)(device.spec);
|
|
44
48
|
body = (React.createElement(formik_1.Formik, { initialValues: {
|
|
45
49
|
deviceAlias,
|
|
46
|
-
osImage: (_c = (_b = device.spec) === null || _b === void 0 ? void 0 : _b.os) === null || _c === void 0 ? void 0 : _c.image,
|
|
50
|
+
osImage: ((_c = (_b = device.spec) === null || _b === void 0 ? void 0 : _b.os) === null || _c === void 0 ? void 0 : _c.image) || '',
|
|
47
51
|
labels: (0, labels_1.fromAPILabel)(device.metadata.labels || {}).filter((label) => label.key !== 'alias'),
|
|
48
|
-
configTemplates: (0, deviceSpecUtils_1.getConfigTemplatesValues)(device.spec),
|
|
52
|
+
configTemplates: (0, deviceSpecUtils_1.getConfigTemplatesValues)(device.spec, registerMicroShift),
|
|
49
53
|
fleetMatch: '', // Initially this is always a fleetless device
|
|
50
54
|
applications: (0, deviceSpecUtils_1.getApplicationValues)(device.spec),
|
|
55
|
+
systemdUnits: [],
|
|
56
|
+
registerMicroShift,
|
|
51
57
|
}, validationSchema: (0, utils_1.getValidationSchema)(t), validateOnMount: true, onSubmit: (values) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
52
58
|
setSubmitError(undefined);
|
|
53
59
|
try {
|
|
@@ -67,7 +73,11 @@ const EditDeviceWizard = () => {
|
|
|
67
73
|
const isTemplateStepDisabled = !(generalStepValid && canEditTemplate);
|
|
68
74
|
return (React.createElement(React.Fragment, null,
|
|
69
75
|
React.createElement(LeaveFormConfirmation_1.default, null),
|
|
70
|
-
React.createElement(react_core_1.Wizard, { className: "fctl-edit-device__wizard", footer: React.createElement(EditDeviceWizardFooter_1.default, null), nav: React.createElement(EditDeviceWizardNav_1.default, null)
|
|
76
|
+
React.createElement(react_core_1.Wizard, { className: "fctl-edit-device__wizard", footer: React.createElement(EditDeviceWizardFooter_1.default, null), nav: React.createElement(EditDeviceWizardNav_1.default, null), onStepChange: () => {
|
|
77
|
+
if (submitError) {
|
|
78
|
+
setSubmitError(undefined);
|
|
79
|
+
}
|
|
80
|
+
} },
|
|
71
81
|
React.createElement(react_core_1.WizardStep, { name: t('General info'), id: GeneralInfoStep_1.generalInfoStepId },
|
|
72
82
|
React.createElement(GeneralInfoStep_1.default, null)),
|
|
73
83
|
React.createElement(react_core_1.WizardStep, { name: t('Device template'), id: DeviceTemplateStep_1.deviceTemplateStepId, isDisabled: isTemplateStepDisabled },
|
|
@@ -89,5 +99,10 @@ const EditDeviceWizard = () => {
|
|
|
89
99
|
React.createElement(react_core_1.PageSection, { variant: react_core_1.PageSectionVariants.light, type: "wizard" },
|
|
90
100
|
React.createElement(ErrorBoundary_1.default, null, body))));
|
|
91
101
|
};
|
|
92
|
-
|
|
102
|
+
const EditDeviceWizardWithPermissions = () => {
|
|
103
|
+
const [allowed, loading] = (0, useAccessReview_1.useAccessReview)(rbac_1.RESOURCE.DEVICE, rbac_1.VERB.PATCH);
|
|
104
|
+
return (React.createElement(PageWithPermissions_1.default, { allowed: allowed, loading: loading },
|
|
105
|
+
React.createElement(EditDeviceWizard, null)));
|
|
106
|
+
};
|
|
107
|
+
exports.default = EditDeviceWizardWithPermissions;
|
|
93
108
|
//# sourceMappingURL=EditDeviceWizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditDeviceWizard.js","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAAgC;AAChC,uDAWgC;AAIhC,gDAAuD;AACvD,kDAAqD;AACrD,kEAA+D;AAC/D,4DAAsE;AACtE,uGAAuE;AACvE,uFAAuD;AACvD,mFAAqG;AACrG,yFAAiH;AACjH,qFAAgF;AAChF,mCAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"EditDeviceWizard.js","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAAgC;AAChC,uDAWgC;AAIhC,gDAAuD;AACvD,kDAAqD;AACrD,kEAA+D;AAC/D,4DAAsE;AACtE,uGAAuE;AACvE,uFAAuD;AACvD,mFAAqG;AACrG,yFAAiH;AACjH,qFAAgF;AAChF,mCAAgE;AAChE,uDAAoH;AACpH,sDAAmD;AACnD,mDAAgD;AAChD,wFAAwD;AACxD,8FAA8D;AAC9D,mGAAmE;AACnE,8CAAqD;AACrD,oEAAiE;AAEjE,kCAAgC;AAEhC,MAAM,gBAAgB,GAAG,GAAG,EAAE;;IAC5B,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,CAAC,WAAW,EAAE,cAAc,C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,uBAAU;gBACT,oBAAC,2BAAc;oBACb,oBAAC,kBAAI,IAAC,EAAE,EAAE,mBAAK,CAAC,OAAO,IAAG,CAAC,CAAC,SAAS,CAAC,CAAQ,CAC/B;gBAChB,QAAQ,IAAI,CACX,oBAAC,2BAAc;oBACb,oBAAC,kBAAI,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,mBAAK,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAG,WAAW,CAAQ,CACnE,CAClB;gBACD,oBAAC,2BAAc,IAAC,QAAQ,UAAE,CAAC,CAAC,aAAa,CAAC,CAAkB,CACjD,CACD;QACd,oBAAC,wBAAW,IAAC,OAAO,EAAE,gCAAmB,CAAC,KAAK;YAC7C,oBAAC,kBAAK,IAAC,YAAY,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,IAChC,CAAC,CAAC,aAAa,CAAC,CACX,CACI;QACd,oBAAC,wBAAW,IAAC,OAAO,EAAE,gCAAmB,CAAC,KAAK,EAAE,IAAI,EAAC,QAAQ;YAC5D,oBAAC,uBAAa,QAAE,IAAI,CAAiB,CACzB,CACb,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAG,GAAG,EAAE;IAC3C,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAA,iCAAe,EAAC,eAAQ,CAAC,MAAM,EAAE,WAAI,CAAC,KAAK,CAAC,CAAC;IACxE,OAAO,CACL,oBAAC,6BAAmB,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;QACrD,oBAAC,gBAAgB,OAAG,CACA,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,+BAA+B,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { DeviceSpec, PatchRequest } from '@flightctl/types';
|
|
1
|
+
import { DeviceSpec, HttpConfigProviderSpec, InlineConfigProviderSpec, PatchRequest } from '@flightctl/types';
|
|
2
2
|
import { ConfigSourceProvider, ConfigType, SpecConfigTemplate } from '../../../types/deviceSpec';
|
|
3
3
|
import { ApplicationFormSpec } from './types';
|
|
4
|
+
export declare const ACM_REPO_NAME = "acm-registration";
|
|
4
5
|
export declare const getConfigType: (config: ConfigSourceProvider) => ConfigType | undefined;
|
|
5
6
|
export declare const getDeviceSpecConfigPatches: (currentConfigs: ConfigSourceProvider[], newConfigs: ConfigSourceProvider[], configPath: string) => PatchRequest;
|
|
6
7
|
export declare const getAPIConfig: (ct: SpecConfigTemplate) => ConfigSourceProvider;
|
|
7
8
|
export declare const getApplicationValues: (deviceSpec?: DeviceSpec) => ApplicationFormSpec[];
|
|
8
|
-
export declare const getConfigTemplatesValues: (deviceSpec?: DeviceSpec) => SpecConfigTemplate[];
|
|
9
|
+
export declare const getConfigTemplatesValues: (deviceSpec?: DeviceSpec, registerMicroShift?: boolean) => SpecConfigTemplate[];
|
|
9
10
|
export declare const formatFileMode: (mode: string | number) => string;
|
|
11
|
+
export declare const ACMCrdConfig: HttpConfigProviderSpec;
|
|
12
|
+
export declare const ACMImportConfig: HttpConfigProviderSpec;
|
|
13
|
+
export declare const MicroshiftRegistrationHook: InlineConfigProviderSpec;
|
|
14
|
+
export declare const hasMicroshiftRegistrationConfig: (deviceSpec?: DeviceSpec) => boolean;
|
|
10
15
|
//# sourceMappingURL=deviceSpecUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceSpecUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/deviceSpecUtils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deviceSpecUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/deviceSpecUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAGV,sBAAsB,EACtB,wBAAwB,EAExB,YAAY,EACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,UAAU,EAKV,kBAAkB,EAQnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM9C,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAqBhD,eAAO,MAAM,aAAa,WAAY,oBAAoB,KAAG,UAAU,GAAG,SAYzE,CAAC;AAgEF,eAAO,MAAM,0BAA0B,mBACrB,oBAAoB,EAAE,cAC1B,oBAAoB,EAAE,cACtB,MAAM,iBAwDnB,CAAC;AAEF,eAAO,MAAM,YAAY,OAAQ,kBAAkB,KAAG,oBAmDrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,gBAAiB,UAAU,KAAG,mBAAmB,EASjF,CAAC;AAEF,eAAO,MAAM,wBAAwB,gBAAiB,UAAU,uBAAuB,OAAO,yBAmD7F,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,MAAM,GAAG,MAAM,KAAG,MAItD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,sBAO1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,sBAO7B,CAAC;AAsCF,eAAO,MAAM,0BAA0B,EAAE,wBAQxC,CAAC;AAEF,eAAO,MAAM,+BAA+B,gBAAiB,UAAU,KAAG,OASzE,CAAC"}
|