@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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ConfigProviderSpec,
|
|
2
3
|
DeviceSpec,
|
|
3
4
|
FileSpec,
|
|
4
5
|
GitConfigProviderSpec,
|
|
@@ -29,6 +30,27 @@ const DEFAULT_INLINE_FILE_MODE = 420; // In Octal: 0644
|
|
|
29
30
|
const DEFAULT_INLINE_FILE_USER = 'root';
|
|
30
31
|
const DEFAULT_INLINE_FILE_GROUP = 'root';
|
|
31
32
|
|
|
33
|
+
export const ACM_REPO_NAME = 'acm-registration';
|
|
34
|
+
const ACM_CRD_YAML_PATH = '/var/local/acm-import/crd.yaml';
|
|
35
|
+
const ACM_IMPORT_YAML_PATH = '/var/local/acm-import/import.yaml';
|
|
36
|
+
const ACM_REPO_SUFFIX = `/agent-registration/manifests/`;
|
|
37
|
+
|
|
38
|
+
const MICROSHIFT_REGISTRATION_HOOK_NAME = 'apply-acm-manifests';
|
|
39
|
+
const MICROSHIFT_REGISTRATION_HOOK_FILE = '/etc/flightctl/hooks.d/afterupdating/50-acm-registration.yaml';
|
|
40
|
+
const MICROSHIFT_REGISTRATION_HOOK = `- if:
|
|
41
|
+
- path: /var/local/acm-import/crd.yaml
|
|
42
|
+
op: [created]
|
|
43
|
+
run: kubectl apply -f /var/local/acm-import/crd.yaml
|
|
44
|
+
envVars:
|
|
45
|
+
KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
|
|
46
|
+
- if:
|
|
47
|
+
- path: /var/local/acm-import/import.yaml
|
|
48
|
+
op: [created]
|
|
49
|
+
run: kubectl apply -f /var/local/acm-import/import.yaml
|
|
50
|
+
envVars:
|
|
51
|
+
KUBECONFIG: /var/lib/microshift/resources/kubeadmin/kubeconfig
|
|
52
|
+
`;
|
|
53
|
+
|
|
32
54
|
export const getConfigType = (config: ConfigSourceProvider): ConfigType | undefined => {
|
|
33
55
|
if (isGitProviderSpec(config)) {
|
|
34
56
|
return ConfigType.GIT;
|
|
@@ -201,14 +223,20 @@ export const getAPIConfig = (ct: SpecConfigTemplate): ConfigSourceProvider => {
|
|
|
201
223
|
return {
|
|
202
224
|
name: ct.name,
|
|
203
225
|
inline: ct.files.map((file) => {
|
|
204
|
-
|
|
226
|
+
const baseProps: FileSpec = {
|
|
205
227
|
path: file.path,
|
|
206
228
|
content: file.content,
|
|
207
|
-
group: file.group,
|
|
208
|
-
user: file.user,
|
|
209
229
|
mode: file.permissions ? parseInt(file.permissions, 8) : undefined,
|
|
210
230
|
contentEncoding: file.base64 ? FileSpec.contentEncoding.BASE64 : undefined,
|
|
211
231
|
};
|
|
232
|
+
// user / group fields cannot be sent as empty in PATCH operations
|
|
233
|
+
if (file.user) {
|
|
234
|
+
baseProps.user = file.user;
|
|
235
|
+
}
|
|
236
|
+
if (file.group) {
|
|
237
|
+
baseProps.group = file.group;
|
|
238
|
+
}
|
|
239
|
+
return baseProps;
|
|
212
240
|
}),
|
|
213
241
|
};
|
|
214
242
|
};
|
|
@@ -224,55 +252,136 @@ export const getApplicationValues = (deviceSpec?: DeviceSpec): ApplicationFormSp
|
|
|
224
252
|
});
|
|
225
253
|
};
|
|
226
254
|
|
|
227
|
-
export const getConfigTemplatesValues = (deviceSpec?: DeviceSpec) =>
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
255
|
+
export const getConfigTemplatesValues = (deviceSpec?: DeviceSpec, registerMicroShift?: boolean) => {
|
|
256
|
+
const deviceConfig = registerMicroShift
|
|
257
|
+
? deviceSpec?.config?.filter((c) => !isConfigACMCrd(c) && !isConfigACMImport(c) && !isMicroshiftRegistrationHook(c))
|
|
258
|
+
: deviceSpec?.config;
|
|
259
|
+
return (
|
|
260
|
+
deviceConfig?.map<SpecConfigTemplate>((c) => {
|
|
261
|
+
if (isGitProviderSpec(c)) {
|
|
262
|
+
return {
|
|
263
|
+
type: ConfigType.GIT,
|
|
264
|
+
name: c.name,
|
|
265
|
+
path: c.gitRef.path,
|
|
266
|
+
mountPath: c.gitRef.mountPath,
|
|
267
|
+
repository: c.gitRef.repository,
|
|
268
|
+
targetRevision: c.gitRef.targetRevision,
|
|
269
|
+
} as GitConfigTemplate;
|
|
270
|
+
}
|
|
271
|
+
if (isKubeProviderSpec(c)) {
|
|
272
|
+
return {
|
|
273
|
+
type: ConfigType.K8S_SECRET,
|
|
274
|
+
name: c.name,
|
|
275
|
+
mountPath: c.secretRef.mountPath,
|
|
276
|
+
secretName: c.secretRef.name,
|
|
277
|
+
secretNs: c.secretRef.namespace,
|
|
278
|
+
} as KubeSecretTemplate;
|
|
279
|
+
}
|
|
280
|
+
if (isHttpProviderSpec(c)) {
|
|
281
|
+
return {
|
|
282
|
+
type: ConfigType.HTTP,
|
|
283
|
+
name: c.name,
|
|
284
|
+
repository: c.httpRef.repository,
|
|
285
|
+
suffix: c.httpRef.suffix,
|
|
286
|
+
filePath: c.httpRef.filePath,
|
|
287
|
+
} as HttpConfigTemplate;
|
|
288
|
+
}
|
|
289
|
+
|
|
249
290
|
return {
|
|
250
|
-
type: ConfigType.
|
|
291
|
+
type: ConfigType.INLINE,
|
|
251
292
|
name: c.name,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
permissions: inline.mode !== undefined ? formatFileMode(inline.mode) : undefined,
|
|
267
|
-
content: inline.content,
|
|
268
|
-
base64: inline.contentEncoding === FileSpec.contentEncoding.BASE64,
|
|
269
|
-
} as InlineConfigTemplate['files'][0];
|
|
270
|
-
}),
|
|
271
|
-
} as InlineConfigTemplate;
|
|
272
|
-
}) || [];
|
|
293
|
+
files: c.inline.map((inline) => {
|
|
294
|
+
return {
|
|
295
|
+
user: inline.user,
|
|
296
|
+
group: inline.group,
|
|
297
|
+
path: inline.path,
|
|
298
|
+
permissions: inline.mode !== undefined ? formatFileMode(inline.mode) : undefined,
|
|
299
|
+
content: inline.content,
|
|
300
|
+
base64: inline.contentEncoding === FileSpec.contentEncoding.BASE64,
|
|
301
|
+
} as InlineConfigTemplate['files'][0];
|
|
302
|
+
}),
|
|
303
|
+
} as InlineConfigTemplate;
|
|
304
|
+
}) || []
|
|
305
|
+
);
|
|
306
|
+
};
|
|
273
307
|
|
|
274
308
|
export const formatFileMode = (mode: string | number): string => {
|
|
275
309
|
const modeStr = typeof mode === 'number' ? mode.toString(8) : mode;
|
|
276
310
|
const prefixSize = 4 - modeStr.length;
|
|
277
311
|
return prefixSize > 0 ? `${'0'.repeat(prefixSize)}${modeStr}` : modeStr;
|
|
278
312
|
};
|
|
313
|
+
|
|
314
|
+
export const ACMCrdConfig: HttpConfigProviderSpec = {
|
|
315
|
+
name: 'acm-crd',
|
|
316
|
+
httpRef: {
|
|
317
|
+
filePath: ACM_CRD_YAML_PATH,
|
|
318
|
+
repository: ACM_REPO_NAME,
|
|
319
|
+
suffix: '/agent-registration/crds/v1',
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export const ACMImportConfig: HttpConfigProviderSpec = {
|
|
324
|
+
name: 'acm-registration',
|
|
325
|
+
httpRef: {
|
|
326
|
+
filePath: ACM_IMPORT_YAML_PATH,
|
|
327
|
+
repository: ACM_REPO_NAME,
|
|
328
|
+
suffix: `${ACM_REPO_SUFFIX}{{ .metadata.name }}`,
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
const isConfigACMCrd = (c: ConfigProviderSpec) => {
|
|
333
|
+
if (!isHttpProviderSpec(c)) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
return (
|
|
337
|
+
c.name === ACMCrdConfig.name &&
|
|
338
|
+
c.httpRef.filePath === ACMCrdConfig.httpRef.filePath &&
|
|
339
|
+
c.httpRef.repository === ACMCrdConfig.httpRef.repository &&
|
|
340
|
+
c.httpRef.suffix === ACMCrdConfig.httpRef.suffix
|
|
341
|
+
);
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
const isConfigACMImport = (c: ConfigProviderSpec) => {
|
|
345
|
+
if (!isHttpProviderSpec(c)) {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
return (
|
|
349
|
+
c.name === ACMImportConfig.name &&
|
|
350
|
+
c.httpRef.filePath === ACMImportConfig.httpRef.filePath &&
|
|
351
|
+
c.httpRef.repository === ACMImportConfig.httpRef.repository &&
|
|
352
|
+
c.httpRef.suffix?.startsWith(ACM_REPO_SUFFIX)
|
|
353
|
+
);
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
const isMicroshiftRegistrationHook = (c: ConfigProviderSpec) => {
|
|
357
|
+
if (!isInlineProviderSpec(c)) {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
return (
|
|
361
|
+
c.name === MICROSHIFT_REGISTRATION_HOOK_NAME &&
|
|
362
|
+
c.inline.length === 1 &&
|
|
363
|
+
c.inline[0].path === MICROSHIFT_REGISTRATION_HOOK_FILE &&
|
|
364
|
+
c.inline[0].content === MICROSHIFT_REGISTRATION_HOOK
|
|
365
|
+
);
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
export const MicroshiftRegistrationHook: InlineConfigProviderSpec = {
|
|
369
|
+
name: MICROSHIFT_REGISTRATION_HOOK_NAME,
|
|
370
|
+
inline: [
|
|
371
|
+
{
|
|
372
|
+
path: MICROSHIFT_REGISTRATION_HOOK_FILE,
|
|
373
|
+
content: MICROSHIFT_REGISTRATION_HOOK,
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
export const hasMicroshiftRegistrationConfig = (deviceSpec?: DeviceSpec): boolean => {
|
|
379
|
+
if (!deviceSpec) {
|
|
380
|
+
return false;
|
|
381
|
+
}
|
|
382
|
+
const hasCrdsSpec = deviceSpec.config?.some(isConfigACMCrd);
|
|
383
|
+
const hasImportSpec = deviceSpec.config?.some(isConfigACMImport);
|
|
384
|
+
const hasRegistrationHook = deviceSpec.config?.some(isMicroshiftRegistrationHook);
|
|
385
|
+
|
|
386
|
+
return !!hasCrdsSpec && !!hasImportSpec && !!hasRegistrationHook;
|
|
387
|
+
};
|
|
@@ -10,6 +10,9 @@ import { ApplicationFormSpec, DeviceSpecConfigFormValues } from '../types';
|
|
|
10
10
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
11
11
|
import TextField from '../../../form/TextField';
|
|
12
12
|
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
13
|
+
import WithHelperText from '../../../common/WithHelperText';
|
|
14
|
+
import LearnMoreLink from '../../../common/LearnMoreLink';
|
|
15
|
+
import { CREATING_APPLICATIONS_LINK } from '../../../../links';
|
|
13
16
|
|
|
14
17
|
import './ApplicationsForm.css';
|
|
15
18
|
|
|
@@ -19,22 +22,45 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
19
22
|
const [{ value: app }] = useField<ApplicationFormSpec>(fieldName);
|
|
20
23
|
|
|
21
24
|
return (
|
|
22
|
-
<ExpandableFormSection
|
|
25
|
+
<ExpandableFormSection
|
|
26
|
+
title={t('Application {{ appNum }}', { appNum: index + 1 })}
|
|
27
|
+
fieldName={fieldName}
|
|
28
|
+
description={app.name || app.image}
|
|
29
|
+
>
|
|
23
30
|
<Grid hasGutter>
|
|
24
|
-
<FormGroup
|
|
31
|
+
<FormGroup
|
|
32
|
+
label={
|
|
33
|
+
<WithHelperText
|
|
34
|
+
ariaLabel={t('Image')}
|
|
35
|
+
content={
|
|
36
|
+
<span>
|
|
37
|
+
{t('The application image. Learn how to create one')}{' '}
|
|
38
|
+
<LearnMoreLink text={t('here')} link={CREATING_APPLICATIONS_LINK} />
|
|
39
|
+
</span>
|
|
40
|
+
}
|
|
41
|
+
showLabel
|
|
42
|
+
/>
|
|
43
|
+
}
|
|
44
|
+
isRequired
|
|
45
|
+
>
|
|
25
46
|
<TextField aria-label={t('Image')} name={`applications.${index}.image`} value={app.image} />
|
|
26
47
|
</FormGroup>
|
|
27
|
-
<FormGroup
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
<FormGroup
|
|
49
|
+
label={
|
|
50
|
+
<WithHelperText
|
|
51
|
+
ariaLabel={t('Application name')}
|
|
52
|
+
content={t(
|
|
53
|
+
'The image name will be used instead of when application name is not specified. Application name must be unique.',
|
|
54
|
+
)}
|
|
55
|
+
showLabel
|
|
56
|
+
/>
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
<TextField aria-label={t('Application name')} name={`applications.${index}.name`} value={app.name} />
|
|
34
60
|
</FormGroup>
|
|
35
61
|
<FieldArray name={`applications.${index}.variables`}>
|
|
36
62
|
{({ push, remove }) => (
|
|
37
|
-
|
|
63
|
+
<>
|
|
38
64
|
{app.variables.map((variable, varIndex) => (
|
|
39
65
|
<Split hasGutter key={varIndex}>
|
|
40
66
|
<SplitItem className="fctl-application-template__variable-name">
|
|
@@ -80,7 +106,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
80
106
|
{t('Add a variable')}
|
|
81
107
|
</Button>
|
|
82
108
|
</FormGroup>
|
|
83
|
-
|
|
109
|
+
</>
|
|
84
110
|
)}
|
|
85
111
|
</FieldArray>
|
|
86
112
|
</Grid>
|
|
@@ -88,53 +114,63 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
88
114
|
);
|
|
89
115
|
};
|
|
90
116
|
|
|
91
|
-
const
|
|
117
|
+
const ApplicationTemplates = () => {
|
|
92
118
|
const { t } = useTranslation();
|
|
93
119
|
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
94
120
|
|
|
95
121
|
return (
|
|
96
|
-
<
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
<FormGroup
|
|
123
|
+
label={
|
|
124
|
+
<WithHelperText
|
|
125
|
+
ariaLabel={t('Application workloads')}
|
|
126
|
+
content={t('Define the application workloads that shall run on the device.')}
|
|
127
|
+
showLabel
|
|
128
|
+
/>
|
|
129
|
+
}
|
|
130
|
+
>
|
|
131
|
+
<FieldArray name="applications">
|
|
132
|
+
{({ push, remove }) => (
|
|
133
|
+
<>
|
|
134
|
+
{values.applications.map((_app, index) => (
|
|
135
|
+
<FormSection key={index}>
|
|
136
|
+
<Split hasGutter>
|
|
137
|
+
<SplitItem isFilled>
|
|
138
|
+
<ApplicationSection index={index} />
|
|
139
|
+
</SplitItem>
|
|
140
|
+
<SplitItem>
|
|
141
|
+
<Button
|
|
142
|
+
variant="link"
|
|
143
|
+
icon={<MinusCircleIcon />}
|
|
144
|
+
iconPosition="start"
|
|
145
|
+
onClick={() => remove(index)}
|
|
146
|
+
/>
|
|
147
|
+
</SplitItem>
|
|
148
|
+
</Split>
|
|
149
|
+
</FormSection>
|
|
150
|
+
))}
|
|
151
|
+
<FormSection>
|
|
152
|
+
<FormGroup>
|
|
153
|
+
<Button
|
|
154
|
+
variant="link"
|
|
155
|
+
icon={<PlusCircleIcon />}
|
|
156
|
+
iconPosition="start"
|
|
157
|
+
onClick={() => {
|
|
158
|
+
push({
|
|
159
|
+
name: '',
|
|
160
|
+
image: '',
|
|
161
|
+
variables: [],
|
|
162
|
+
});
|
|
163
|
+
}}
|
|
164
|
+
>
|
|
165
|
+
{t('Add application')}
|
|
166
|
+
</Button>
|
|
167
|
+
</FormGroup>
|
|
114
168
|
</FormSection>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
variant="link"
|
|
120
|
-
icon={<PlusCircleIcon />}
|
|
121
|
-
iconPosition="start"
|
|
122
|
-
onClick={() => {
|
|
123
|
-
push({
|
|
124
|
-
name: '',
|
|
125
|
-
image: '',
|
|
126
|
-
variables: [],
|
|
127
|
-
});
|
|
128
|
-
}}
|
|
129
|
-
>
|
|
130
|
-
{t('Add application')}
|
|
131
|
-
</Button>
|
|
132
|
-
</FormGroup>
|
|
133
|
-
</FormSection>
|
|
134
|
-
</>
|
|
135
|
-
)}
|
|
136
|
-
</FieldArray>
|
|
169
|
+
</>
|
|
170
|
+
)}
|
|
171
|
+
</FieldArray>
|
|
172
|
+
</FormGroup>
|
|
137
173
|
);
|
|
138
174
|
};
|
|
139
175
|
|
|
140
|
-
export default
|
|
176
|
+
export default ApplicationTemplates;
|
|
@@ -6,18 +6,17 @@ import { FieldArray, useField, useFormikContext } from 'formik';
|
|
|
6
6
|
|
|
7
7
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
8
8
|
import FormSelectTypeahead from '../../../form/FormSelectTypeahead';
|
|
9
|
-
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
10
9
|
import TextField from '../../../form/TextField';
|
|
11
10
|
import UploadField from '../../../form/UploadField';
|
|
12
11
|
import CheckboxField from '../../../form/CheckboxField';
|
|
12
|
+
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
13
13
|
import { DeviceSpecConfigFormValues } from '../types';
|
|
14
14
|
import { InlineConfigTemplate } from '../../../../types/deviceSpec';
|
|
15
|
-
|
|
16
15
|
import { formatFileMode } from '../deviceSpecUtils';
|
|
17
16
|
|
|
18
17
|
const MAX_INLINE_FILE_SIZE_BYTES = 1024 * 1024;
|
|
19
18
|
|
|
20
|
-
const FileForm = ({ fieldName }: { fieldName: string }) => {
|
|
19
|
+
const FileForm = ({ fieldName, index }: { fieldName: string; index: number }) => {
|
|
21
20
|
const { t } = useTranslation();
|
|
22
21
|
const [{ value: file }] = useField<InlineConfigTemplate['files'][0]>(fieldName);
|
|
23
22
|
|
|
@@ -41,17 +40,16 @@ const FileForm = ({ fieldName }: { fieldName: string }) => {
|
|
|
41
40
|
);
|
|
42
41
|
|
|
43
42
|
return (
|
|
44
|
-
<ExpandableFormSection
|
|
43
|
+
<ExpandableFormSection
|
|
44
|
+
title={t('File {{ fileNum }}', { fileNum: index + 1 })}
|
|
45
|
+
fieldName={fieldName}
|
|
46
|
+
description={file.path}
|
|
47
|
+
>
|
|
45
48
|
<Grid hasGutter>
|
|
46
49
|
<FormGroup label={t('File path on the device')} isRequired>
|
|
47
50
|
<TextField name={`${fieldName}.path`} />
|
|
48
51
|
</FormGroup>
|
|
49
|
-
<UploadField
|
|
50
|
-
label={t('Content')}
|
|
51
|
-
name={`${fieldName}.content`}
|
|
52
|
-
maxFileBytes={MAX_INLINE_FILE_SIZE_BYTES}
|
|
53
|
-
isRequired
|
|
54
|
-
/>
|
|
52
|
+
<UploadField label={t('Content')} name={`${fieldName}.content`} maxFileBytes={MAX_INLINE_FILE_SIZE_BYTES} />
|
|
55
53
|
<FormGroup>
|
|
56
54
|
<CheckboxField name={`${fieldName}.base64`} label={t('Content is base64 encoded')} />
|
|
57
55
|
</FormGroup>
|
|
@@ -116,23 +114,21 @@ const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
|
116
114
|
{inlineConfig.files?.map((_, fileIndex) => {
|
|
117
115
|
const fieldName = `configTemplates[${index}].files[${fileIndex}]`;
|
|
118
116
|
return (
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
<
|
|
122
|
-
|
|
117
|
+
<Split key={fileIndex} hasGutter>
|
|
118
|
+
<SplitItem isFilled>
|
|
119
|
+
<FileForm index={fileIndex} fieldName={fieldName} />
|
|
120
|
+
</SplitItem>
|
|
121
|
+
{inlineConfig.files.length > 1 && (
|
|
122
|
+
<SplitItem>
|
|
123
|
+
<Button
|
|
124
|
+
variant="link"
|
|
125
|
+
icon={<MinusCircleIcon />}
|
|
126
|
+
iconPosition="start"
|
|
127
|
+
onClick={() => remove(fileIndex)}
|
|
128
|
+
/>
|
|
123
129
|
</SplitItem>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
<Button
|
|
127
|
-
variant="link"
|
|
128
|
-
icon={<MinusCircleIcon />}
|
|
129
|
-
iconPosition="start"
|
|
130
|
-
onClick={() => remove(fileIndex)}
|
|
131
|
-
/>
|
|
132
|
-
</SplitItem>
|
|
133
|
-
)}
|
|
134
|
-
</Split>
|
|
135
|
-
</FormSection>
|
|
130
|
+
)}
|
|
131
|
+
</Split>
|
|
136
132
|
);
|
|
137
133
|
})}
|
|
138
134
|
<FormSection>
|
|
@@ -19,6 +19,7 @@ type ConfigWithRepositoryTemplateFormProps = {
|
|
|
19
19
|
index: number;
|
|
20
20
|
repositories: Repository[];
|
|
21
21
|
repoRefetch: VoidFunction;
|
|
22
|
+
canCreateRepo: boolean;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
const getRepositoryItems = (
|
|
@@ -172,6 +173,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
172
173
|
index,
|
|
173
174
|
repositories,
|
|
174
175
|
repoRefetch,
|
|
176
|
+
canCreateRepo,
|
|
175
177
|
}: ConfigWithRepositoryTemplateFormProps) => {
|
|
176
178
|
const { t } = useTranslation();
|
|
177
179
|
const { values, setFieldValue } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
@@ -188,20 +190,23 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
188
190
|
<FormSelect
|
|
189
191
|
name={`configTemplates[${index}].repository`}
|
|
190
192
|
items={repositoryItems}
|
|
193
|
+
withStatusIcon
|
|
191
194
|
placeholderText={t('Select a repository')}
|
|
192
195
|
>
|
|
193
|
-
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
196
|
+
{canCreateRepo && (
|
|
197
|
+
<MenuFooter>
|
|
198
|
+
<Button
|
|
199
|
+
variant="link"
|
|
200
|
+
isInline
|
|
201
|
+
icon={<PlusCircleIcon />}
|
|
202
|
+
onClick={() => {
|
|
203
|
+
setCreateRepoModalOpen(true);
|
|
204
|
+
}}
|
|
205
|
+
>
|
|
206
|
+
{t('Create repository')}
|
|
207
|
+
</Button>
|
|
208
|
+
</MenuFooter>
|
|
209
|
+
)}
|
|
205
210
|
</FormSelect>
|
|
206
211
|
</FormGroup>
|
|
207
212
|
{repoType === RepoSpecType.GIT && <GitConfigForm template={ct as GitConfigTemplate} index={index} />}
|