@flightctl/ui-components 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__mocks__/fileMock.d.ts +3 -0
- package/dist/__mocks__/fileMock.d.ts.map +1 -0
- package/dist/__mocks__/styleMock.d.ts +2 -0
- package/dist/__mocks__/styleMock.d.ts.map +1 -0
- package/dist/jest.config.d.ts +12 -0
- package/dist/jest.config.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.d.ts +8 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts +18 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts +2 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts +17 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.d.ts +7 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +2 -3
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.d.ts +9 -0
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js +2 -1
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts +12 -0
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts.map +1 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts +6 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts +4 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +10 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts +12 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +24 -22
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.d.ts +8 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js +3 -3
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceOs.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.js +24 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts +9 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts +17 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js +61 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts +14 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/DeviceTableRow.js +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts +21 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/DeviceTableToolbar.js +5 -6
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.css +16 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts +18 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +127 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +22 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList/DeviceList.js → DevicesPage/DevicesPage.js} +20 -47
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts +13 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js +104 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts +11 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js +18 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/types.d.ts +18 -0
- package/dist/src/components/Device/DevicesPage/types.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/types.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts +12 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceBackendFilters.js +1 -1
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts +8 -0
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceFilters.js +3 -3
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts +21 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js +83 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +87 -21
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.css +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js +61 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +88 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js +3 -3
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js +26 -31
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts +11 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +14 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +26 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +9 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +20 -0
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.d.ts +3 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +44 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.js +6 -4
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts +11 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts.map +1 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts +17 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts +5 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +2 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts +15 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +9 -13
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts +6 -0
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts +5 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts +7 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts +4 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +4 -5
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +10 -0
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts +7 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +11 -6
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +8 -0
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.d.ts +3 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.js +8 -3
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts +7 -0
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts +4 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts +7 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js +10 -20
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts +9 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js +18 -12
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts +7 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.d.ts +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js.map +1 -1
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts +7 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js +115 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -0
- package/dist/src/components/Fleet/FleetRow.d.ts +13 -0
- package/dist/src/components/Fleet/FleetRow.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetRow.js +5 -5
- package/dist/src/components/Fleet/FleetRow.js.map +1 -1
- package/dist/src/components/Fleet/FleetStatus.d.ts +7 -0
- package/dist/src/components/Fleet/FleetStatus.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetsPage.d.ts +4 -0
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -0
- package/dist/src/components/Fleet/{FleetList.js → FleetsPage.js} +28 -42
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts +5 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts +12 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.d.ts +8 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.d.ts +7 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.d.ts +6 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPage.d.ts +10 -0
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPage.js +2 -2
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/ListPage/ListPageActions.d.ts +17 -0
- package/dist/src/components/ListPage/ListPageActions.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPageActions.js +13 -2
- package/dist/src/components/ListPage/ListPageActions.js.map +1 -1
- package/dist/src/components/ListPage/ListPageBody.d.ts +9 -0
- package/dist/src/components/ListPage/ListPageBody.d.ts.map +1 -0
- package/dist/src/components/ListPage/types.d.ts +16 -0
- package/dist/src/components/ListPage/types.d.ts.map +1 -0
- package/dist/src/components/NavItem/NavItem.d.ts +8 -0
- package/dist/src/components/NavItem/NavItem.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js +5 -17
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js +7 -20
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +11 -10
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts +14 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js +22 -51
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js +5 -17
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/utils.d.ts +15 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.js +9 -26
- package/dist/src/components/OverviewPage/Cards/Status/utils.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js +2 -3
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Overview.d.ts +4 -0
- package/dist/src/components/OverviewPage/Overview.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/OverviewPage.d.ts +4 -0
- package/dist/src/components/OverviewPage/OverviewPage.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts +4 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts +21 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +8 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts +9 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +18 -11
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/types.d.ts +42 -0
- package/dist/src/components/Repository/CreateRepository/types.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.d.ts +75 -0
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.js +40 -7
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts +9 -0
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts +4 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +3 -2
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.d.ts +7 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js +14 -13
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts +6 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.d.ts +22 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js +43 -11
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.d.ts +7 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js +30 -33
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts +5 -0
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryList.js +3 -3
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.css +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +72 -25
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/ResourceSync/ResourceSyncStatus.d.ts +9 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.d.ts.map +1 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js +9 -18
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js.map +1 -1
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.d.ts +4 -0
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationStatus.d.ts +13 -0
- package/dist/src/components/Status/ApplicationStatus.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.d.ts +13 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.js.map +1 -1
- package/dist/src/components/Status/DeviceResourceStatus.d.ts +9 -0
- package/dist/src/components/Status/DeviceResourceStatus.d.ts.map +1 -0
- package/dist/src/components/Status/DeviceStatus.d.ts +7 -0
- package/dist/src/components/Status/DeviceStatus.d.ts.map +1 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.d.ts +7 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.d.ts.map +1 -0
- package/dist/src/components/Status/IntegrityStatus.d.ts +7 -0
- package/dist/src/components/Status/IntegrityStatus.d.ts.map +1 -0
- package/dist/src/components/Status/RepositoryStatus.d.ts +10 -0
- package/dist/src/components/Status/RepositoryStatus.d.ts.map +1 -0
- package/dist/src/components/Status/StatusDisplay.css +3 -0
- package/dist/src/components/Status/StatusDisplay.d.ts +23 -0
- package/dist/src/components/Status/StatusDisplay.d.ts.map +1 -0
- package/dist/src/components/Status/SystemUpdateStatus.d.ts +7 -0
- package/dist/src/components/Status/SystemUpdateStatus.d.ts.map +1 -0
- package/dist/src/components/Status/SystemdStatus.d.ts +6 -0
- package/dist/src/components/Status/SystemdStatus.d.ts.map +1 -0
- package/dist/src/components/Status/utils.d.ts +5 -0
- package/dist/src/components/Status/utils.d.ts.map +1 -0
- package/dist/src/components/Table/Table.d.ts +25 -0
- package/dist/src/components/Table/Table.d.ts.map +1 -0
- package/dist/src/components/Table/TableActions.d.ts +7 -0
- package/dist/src/components/Table/TableActions.d.ts.map +1 -0
- package/dist/src/components/Table/TableActions.js +3 -3
- package/dist/src/components/Table/TableActions.js.map +1 -1
- package/dist/src/components/Table/TableTextSearch.d.ts +9 -0
- package/dist/src/components/Table/TableTextSearch.d.ts.map +1 -0
- package/dist/src/components/Table/TableTextSearch.js +2 -4
- package/dist/src/components/Table/TableTextSearch.js.map +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts +15 -0
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts +7 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts +11 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts.map +1 -0
- package/dist/src/components/charts/DonutChart.d.ts +17 -0
- package/dist/src/components/charts/DonutChart.d.ts.map +1 -0
- package/dist/src/components/charts/utils.d.ts +15 -0
- package/dist/src/components/charts/utils.d.ts.map +1 -0
- package/dist/src/components/charts/utils.js +30 -0
- package/dist/src/components/charts/utils.js.map +1 -0
- package/dist/src/components/common/CopyButton.d.ts +10 -0
- package/dist/src/components/common/CopyButton.d.ts.map +1 -0
- package/dist/src/components/common/CopyButton.js +3 -3
- package/dist/src/components/common/CopyButton.js.map +1 -1
- package/dist/src/components/common/EditableLabelControl.d.ts +10 -0
- package/dist/src/components/common/EditableLabelControl.d.ts.map +1 -0
- package/dist/src/components/common/ErrorBoundary.d.ts +9 -0
- package/dist/src/components/common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/common/FlightCtlDescriptionList.d.ts +5 -0
- package/dist/src/components/common/FlightCtlDescriptionList.d.ts.map +1 -0
- package/dist/src/components/common/FlightCtlDescriptionList.js +13 -0
- package/dist/src/components/common/FlightCtlDescriptionList.js.map +1 -0
- package/dist/src/components/common/HelperTextItems.d.ts +3 -0
- package/dist/src/components/common/HelperTextItems.d.ts.map +1 -0
- package/dist/src/components/common/HelperTextItems.js +1 -9
- package/dist/src/components/common/HelperTextItems.js.map +1 -1
- package/dist/src/components/common/LabelsView.d.ts +10 -0
- package/dist/src/components/common/LabelsView.d.ts.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.d.ts +4 -0
- package/dist/src/components/common/LeaveFormConfirmation.d.ts.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.js +4 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/ResourceLink.d.ts +13 -0
- package/dist/src/components/common/ResourceLink.d.ts.map +1 -0
- package/dist/src/components/common/ResourceListEmptyState.d.ts +8 -0
- package/dist/src/components/common/ResourceListEmptyState.d.ts.map +1 -0
- package/dist/src/components/common/WithHelperText.d.ts +11 -0
- package/dist/src/components/common/WithHelperText.d.ts.map +1 -0
- package/dist/src/components/common/WithTooltip.d.ts +10 -0
- package/dist/src/components/common/WithTooltip.d.ts.map +1 -0
- package/dist/src/components/form/CheckboxField.d.ts +10 -0
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -0
- package/dist/src/components/{Device/EditDeviceWizard/steps/ConfigTemplateForm.css → form/ExpandableFormSection.css} +2 -2
- package/dist/src/components/form/ExpandableFormSection.d.ts +11 -0
- package/dist/src/components/form/ExpandableFormSection.d.ts.map +1 -0
- package/dist/src/components/form/ExpandableFormSection.js +30 -0
- package/dist/src/components/form/ExpandableFormSection.js.map +1 -0
- package/dist/src/components/form/FieldHelperText.d.ts +14 -0
- package/dist/src/components/form/FieldHelperText.d.ts.map +1 -0
- package/dist/src/components/form/FilterSelect.css +11 -1
- package/dist/src/components/form/FilterSelect.d.ts +16 -0
- package/dist/src/components/form/FilterSelect.d.ts.map +1 -0
- package/dist/src/components/form/FilterSelect.js +14 -9
- package/dist/src/components/form/FilterSelect.js.map +1 -1
- package/dist/src/components/form/FlightCtlActionGroup.d.ts +5 -0
- package/dist/src/components/form/FlightCtlActionGroup.d.ts.map +1 -0
- package/dist/src/components/form/FlightCtlForm.d.ts +6 -0
- package/dist/src/components/form/FlightCtlForm.d.ts.map +1 -0
- package/dist/src/components/form/FormSelect.css +8 -0
- package/dist/src/components/form/FormSelect.d.ts +16 -0
- package/dist/src/components/form/FormSelect.d.ts.map +1 -0
- package/dist/src/components/form/FormSelectTypeahead.d.ts +19 -0
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -0
- package/dist/src/components/form/FormSelectTypeahead.js +116 -0
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -0
- package/dist/src/components/form/LabelsField.d.ts +12 -0
- package/dist/src/components/form/LabelsField.d.ts.map +1 -0
- package/dist/src/components/form/NameField.d.ts +10 -0
- package/dist/src/components/form/NameField.d.ts.map +1 -0
- package/dist/src/components/form/RadioField.d.ts +12 -0
- package/dist/src/components/form/RadioField.d.ts.map +1 -0
- package/dist/src/components/form/RichValidationTextField.d.ts +13 -0
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -0
- package/dist/src/components/form/SwitchField.d.ts +9 -0
- package/dist/src/components/form/SwitchField.d.ts.map +1 -0
- package/dist/src/components/form/SwitchField.js +24 -0
- package/dist/src/components/form/SwitchField.js.map +1 -0
- package/dist/src/components/form/TextAreaField.d.ts +11 -0
- package/dist/src/components/form/TextAreaField.d.ts.map +1 -0
- package/dist/src/components/form/TextField.d.ts +10 -0
- package/dist/src/components/form/TextField.d.ts.map +1 -0
- package/dist/src/components/form/UploadField.d.ts +13 -0
- package/dist/src/components/form/UploadField.d.ts.map +1 -0
- package/dist/src/components/form/UploadField.js +74 -0
- package/dist/src/components/form/UploadField.js.map +1 -0
- package/dist/src/components/form/validations.d.ts +82 -0
- package/dist/src/components/form/validations.d.ts.map +1 -0
- package/dist/src/components/form/validations.js +54 -19
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.d.ts +16 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.d.ts.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts +6 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.d.ts +8 -0
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.d.ts.map +1 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts +11 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts +10 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts +9 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +1 -2
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts +11 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js +3 -41
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +22 -21
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts.map +1 -0
- package/dist/src/constants.d.ts +4 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +70 -0
- package/dist/src/hooks/useAppContext.d.ts.map +1 -0
- package/dist/src/hooks/useDeviceLabelMatch.d.ts +9 -0
- package/dist/src/hooks/useDeviceLabelMatch.d.ts.map +1 -0
- package/dist/src/hooks/useDocumentTitle.d.ts +2 -0
- package/dist/src/hooks/useDocumentTitle.d.ts.map +1 -0
- package/dist/src/hooks/useFetch.d.ts +12 -0
- package/dist/src/hooks/useFetch.d.ts.map +1 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts +3 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts.map +1 -0
- package/dist/src/hooks/useNavigate.d.ts +38 -0
- package/dist/src/hooks/useNavigate.d.ts.map +1 -0
- package/dist/src/hooks/useTableSelect.d.ts +13 -0
- package/dist/src/hooks/useTableSelect.d.ts.map +1 -0
- package/dist/src/hooks/useTableSort.d.ts +7 -0
- package/dist/src/hooks/useTableSort.d.ts.map +1 -0
- package/dist/src/hooks/useTableTextSearch.d.ts +6 -0
- package/dist/src/hooks/useTableTextSearch.d.ts.map +1 -0
- package/dist/src/hooks/useTemplateVersion.d.ts +3 -0
- package/dist/src/hooks/useTemplateVersion.d.ts.map +1 -0
- package/dist/src/hooks/useThemePreferences.d.ts +8 -0
- package/dist/src/hooks/useThemePreferences.d.ts.map +1 -0
- package/dist/src/hooks/useTranslation.d.ts +2 -0
- package/dist/src/hooks/useTranslation.d.ts.map +1 -0
- package/dist/src/hooks/useUserPreferences.d.ts +2 -0
- package/dist/src/hooks/useUserPreferences.d.ts.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +8 -0
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -0
- package/dist/src/setupTests.d.ts +2 -0
- package/dist/src/setupTests.d.ts.map +1 -0
- package/dist/src/tests/test-utils.d.ts +7 -0
- package/dist/src/tests/test-utils.d.ts.map +1 -0
- package/dist/src/types/deviceSpec.d.ts +57 -0
- package/dist/src/types/deviceSpec.d.ts.map +1 -0
- package/dist/src/types/deviceSpec.js +41 -9
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +36 -0
- package/dist/src/types/extraTypes.d.ts.map +1 -0
- package/dist/src/types/extraTypes.js +1 -3
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/types/typeUtils.d.ts +3 -0
- package/dist/src/types/typeUtils.d.ts.map +1 -0
- package/dist/src/utils/api.d.ts +24 -0
- package/dist/src/utils/api.d.ts.map +1 -0
- package/dist/src/utils/dates.d.ts +5 -0
- package/dist/src/utils/dates.d.ts.map +1 -0
- package/dist/src/utils/devices.d.ts +4 -0
- package/dist/src/utils/devices.d.ts.map +1 -0
- package/dist/src/utils/devices.js +1 -27
- package/dist/src/utils/devices.js.map +1 -1
- package/dist/src/utils/error.d.ts +4 -0
- package/dist/src/utils/error.d.ts.map +1 -0
- package/dist/src/utils/labels.d.ts +11 -0
- package/dist/src/utils/labels.d.ts.map +1 -0
- package/dist/src/utils/labels.js +4 -14
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/metrics.d.ts +9 -0
- package/dist/src/utils/metrics.d.ts.map +1 -0
- package/dist/src/utils/patch.d.ts +15 -0
- package/dist/src/utils/patch.d.ts.map +1 -0
- package/dist/src/utils/patch.js +71 -1
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/resource.d.ts +6 -0
- package/dist/src/utils/resource.d.ts.map +1 -0
- package/dist/src/utils/search.d.ts +3 -0
- package/dist/src/utils/search.d.ts.map +1 -0
- package/dist/src/utils/search.js +15 -1
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/sort/device.d.ts +4 -0
- package/dist/src/utils/sort/device.d.ts.map +1 -0
- package/dist/src/utils/sort/device.js +3 -43
- package/dist/src/utils/sort/device.js.map +1 -1
- package/dist/src/utils/sort/fleet.d.ts +4 -0
- package/dist/src/utils/sort/fleet.d.ts.map +1 -0
- package/dist/src/utils/sort/fleet.js +6 -8
- package/dist/src/utils/sort/fleet.js.map +1 -1
- package/dist/src/utils/sort/generic.d.ts +8 -0
- package/dist/src/utils/sort/generic.d.ts.map +1 -0
- package/dist/src/utils/sort/generic.js +14 -11
- package/dist/src/utils/sort/generic.js.map +1 -1
- package/dist/src/utils/sort/repository.d.ts +6 -0
- package/dist/src/utils/sort/repository.d.ts.map +1 -0
- package/dist/src/utils/sort/repository.js +2 -2
- package/dist/src/utils/sort/repository.js.map +1 -1
- package/dist/src/utils/sort/resourceSync.d.ts +6 -0
- package/dist/src/utils/sort/resourceSync.d.ts.map +1 -0
- package/dist/src/utils/status/applications.d.ts +7 -0
- package/dist/src/utils/status/applications.d.ts.map +1 -0
- package/dist/src/utils/status/applications.js +19 -21
- package/dist/src/utils/status/applications.js.map +1 -1
- package/dist/src/utils/status/common.d.ts +12 -0
- package/dist/src/utils/status/common.d.ts.map +1 -0
- package/dist/src/utils/status/devices.d.ts +17 -0
- package/dist/src/utils/status/devices.d.ts.map +1 -0
- package/dist/src/utils/status/devices.js +9 -19
- package/dist/src/utils/status/devices.js.map +1 -1
- package/dist/src/utils/status/enrollmentRequest.d.ts +12 -0
- package/dist/src/utils/status/enrollmentRequest.d.ts.map +1 -0
- package/dist/src/utils/status/fleet.d.ts +15 -0
- package/dist/src/utils/status/fleet.d.ts.map +1 -0
- package/dist/src/utils/status/integrity.d.ts +5 -0
- package/dist/src/utils/status/integrity.d.ts.map +1 -0
- package/dist/src/utils/status/repository.d.ts +24 -0
- package/dist/src/utils/status/repository.d.ts.map +1 -0
- package/dist/src/utils/status/repository.js +9 -5
- package/dist/src/utils/status/repository.js.map +1 -1
- package/dist/src/utils/status/system.d.ts +6 -0
- package/dist/src/utils/status/system.d.ts.map +1 -0
- package/dist/src/utils/status/system.js +5 -5
- package/dist/src/utils/status/system.js.map +1 -1
- package/package.json +10 -2
- package/src/components/DetailsPage/DetailsNotFound.tsx +114 -0
- package/src/components/DetailsPage/DetailsPage.css +3 -0
- package/src/components/DetailsPage/DetailsPage.spec.tsx +128 -0
- package/src/components/DetailsPage/DetailsPage.tsx +99 -0
- package/src/components/DetailsPage/DetailsPageActions.tsx +73 -0
- package/src/components/DetailsPage/DetailsPageCard.css +8 -0
- package/src/components/DetailsPage/DetailsPageCard.tsx +12 -0
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +44 -0
- package/src/components/DetailsPage/Tables/ConditionsTable.tsx +40 -0
- package/src/components/DetailsPage/Tables/IntegrityDetails.tsx +44 -0
- package/src/components/DetailsPage/Tables/SystemdDetailsTable.tsx +63 -0
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +146 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +117 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.css +4 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +216 -0
- package/src/components/Device/DeviceDetails/DeviceFleet.css +3 -0
- package/src/components/Device/DeviceDetails/DeviceFleet.tsx +76 -0
- package/src/components/Device/DeviceDetails/DeviceOs.tsx +43 -0
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.css +3 -0
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.tsx +60 -0
- package/src/components/Device/DeviceDetails/SystemdTable.tsx +65 -0
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +53 -0
- package/src/components/Device/DevicesPage/DeviceFilterSelect.tsx +111 -0
- package/src/components/Device/DevicesPage/DeviceTableRow.tsx +95 -0
- package/src/components/Device/DevicesPage/DeviceTableToolbar.tsx +195 -0
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.css +16 -0
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +305 -0
- package/src/components/Device/DevicesPage/DevicesPage.tsx +265 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestList.tsx +183 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.tsx +35 -0
- package/src/components/Device/DevicesPage/types.ts +22 -0
- package/src/components/Device/DevicesPage/useDeviceBackendFilters.ts +119 -0
- package/src/components/Device/DevicesPage/useDeviceFilters.ts +15 -0
- package/src/components/Device/DevicesPage/useDevices.ts +112 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.css +4 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +150 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.tsx +52 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +66 -0
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +278 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.css +4 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.tsx +140 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +161 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx +50 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.tsx +174 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +229 -0
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +75 -0
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +61 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +35 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +83 -0
- package/src/components/Device/EditDeviceWizard/types.ts +19 -0
- package/src/components/Device/EditDeviceWizard/useEditDevice.ts +36 -0
- package/src/components/Device/EditDeviceWizard/utils.ts +79 -0
- package/src/components/Device/MatchPatternsModal/MatchPatternsForm.tsx +92 -0
- package/src/components/Device/MatchPatternsModal/MatchPatternsModal.tsx +62 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.css +3 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +226 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +69 -0
- package/src/components/ErrorAlert/ErrorAlert.tsx +15 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.css +3 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +152 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +56 -0
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +114 -0
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +55 -0
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +83 -0
- package/src/components/Fleet/CreateFleet/types.ts +8 -0
- package/src/components/Fleet/CreateFleet/useEditFleet.ts +35 -0
- package/src/components/Fleet/CreateFleet/utils.ts +160 -0
- package/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx +89 -0
- package/src/components/Fleet/FleetDetails/FleetDetails.tsx +97 -0
- package/src/components/Fleet/FleetDetails/FleetDetailsContent.tsx +97 -0
- package/src/components/Fleet/FleetDetails/FleetDevices.tsx +115 -0
- package/src/components/Fleet/FleetDetails/FleetDevicesLink.tsx +16 -0
- package/src/components/Fleet/FleetDetails/FleetOwnerLink.tsx +51 -0
- package/src/components/Fleet/FleetResourceSyncs.tsx +161 -0
- package/src/components/Fleet/FleetRow.tsx +86 -0
- package/src/components/Fleet/FleetStatus.tsx +37 -0
- package/src/components/Fleet/FleetsPage.tsx +204 -0
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.css +3 -0
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.tsx +216 -0
- package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +115 -0
- package/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.tsx +42 -0
- package/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.tsx +70 -0
- package/src/components/Fleet/ImportFleetWizard/types.ts +6 -0
- package/src/components/ListPage/ListPage.tsx +22 -0
- package/src/components/ListPage/ListPageActions.tsx +68 -0
- package/src/components/ListPage/ListPageBody.tsx +34 -0
- package/src/components/ListPage/types.ts +13 -0
- package/src/components/NavItem/NavItem.tsx +42 -0
- package/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.tsx +39 -0
- package/src/components/OverviewPage/Cards/Status/DeviceStatusChart.tsx +38 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +115 -0
- package/src/components/OverviewPage/Cards/Status/StatusCardFilters.tsx +111 -0
- package/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.tsx +39 -0
- package/src/components/OverviewPage/Cards/Status/utils.ts +19 -0
- package/src/components/OverviewPage/Cards/ToDo/ToDoCard.tsx +72 -0
- package/src/components/OverviewPage/Overview.tsx +19 -0
- package/src/components/OverviewPage/OverviewPage.tsx +22 -0
- package/src/components/Repository/CreateRepository/CreateRepository.tsx +144 -0
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.css +7 -0
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +440 -0
- package/src/components/Repository/CreateRepository/CreateResourceSyncsForm.tsx +98 -0
- package/src/components/Repository/CreateRepository/types.ts +43 -0
- package/src/components/Repository/CreateRepository/utils.ts +539 -0
- package/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.tsx +156 -0
- package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +78 -0
- package/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsx +102 -0
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +28 -0
- package/src/components/Repository/RepositoryDetails/RepositorySource.tsx +96 -0
- package/src/components/Repository/RepositoryDetails/RepositorySourceList.tsx +79 -0
- package/src/components/Repository/RepositoryList.tsx +216 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.css +14 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +322 -0
- package/src/components/ResourceSync/ResourceSyncStatus.tsx +77 -0
- package/src/components/ResourceSync/ResourceSyncToRepository.tsx +73 -0
- package/src/components/Status/ApplicationStatus.tsx +25 -0
- package/src/components/Status/ApplicationSummaryStatus.tsx +24 -0
- package/src/components/Status/DeviceResourceStatus.tsx +112 -0
- package/src/components/Status/DeviceStatus.tsx +20 -0
- package/src/components/Status/EnrollmentRequestStatus.tsx +24 -0
- package/src/components/Status/IntegrityStatus.tsx +19 -0
- package/src/components/Status/RepositoryStatus.tsx +50 -0
- package/src/components/Status/StatusDisplay.css +12 -0
- package/src/components/Status/StatusDisplay.tsx +83 -0
- package/src/components/Status/SystemUpdateStatus.tsx +34 -0
- package/src/components/Status/SystemdStatus.tsx +22 -0
- package/src/components/Status/utils.ts +8 -0
- package/src/components/Table/Table.tsx +78 -0
- package/src/components/Table/TableActions.tsx +33 -0
- package/src/components/Table/TableTextSearch.tsx +23 -0
- package/src/components/Terminal/Terminal.css +1 -0
- package/src/components/Terminal/Terminal.tsx +100 -0
- package/src/components/UserPreferences/UserPreferencesModal.tsx +85 -0
- package/src/components/UserPreferences/UserPreferencesProvider.tsx +29 -0
- package/src/components/charts/DonutChart.css +10 -0
- package/src/components/charts/DonutChart.tsx +115 -0
- package/src/components/charts/utils.ts +38 -0
- package/src/components/common/CopyButton.tsx +36 -0
- package/src/components/common/EditableLabelControl.tsx +69 -0
- package/src/components/common/ErrorBoundary.tsx +53 -0
- package/src/components/common/FlightCtlDescriptionList.tsx +13 -0
- package/src/components/common/HelperTextItems.tsx +25 -0
- package/src/components/common/LabelsView.css +9 -0
- package/src/components/common/LabelsView.tsx +38 -0
- package/src/components/common/LeaveFormConfirmation.tsx +96 -0
- package/src/components/common/ResourceLink.css +29 -0
- package/src/components/common/ResourceLink.tsx +42 -0
- package/src/components/common/ResourceListEmptyState.tsx +19 -0
- package/src/components/common/WithHelperText.css +3 -0
- package/src/components/common/WithHelperText.tsx +34 -0
- package/src/components/common/WithTooltip.tsx +14 -0
- package/src/components/form/CheckboxField.tsx +39 -0
- package/src/components/form/ExpandableFormSection.css +3 -0
- package/src/components/form/ExpandableFormSection.tsx +59 -0
- package/src/components/form/FieldHelperText.tsx +45 -0
- package/src/components/form/FilterSelect.css +18 -0
- package/src/components/form/FilterSelect.tsx +92 -0
- package/src/components/form/FlightCtlActionGroup.css +9 -0
- package/src/components/form/FlightCtlActionGroup.tsx +11 -0
- package/src/components/form/FlightCtlForm.tsx +18 -0
- package/src/components/form/FormSelect.css +16 -0
- package/src/components/form/FormSelect.tsx +96 -0
- package/src/components/form/FormSelectTypeahead.tsx +212 -0
- package/src/components/form/LabelsField.tsx +116 -0
- package/src/components/form/NameField.tsx +73 -0
- package/src/components/form/RadioField.tsx +57 -0
- package/src/components/form/RichValidationTextField.tsx +142 -0
- package/src/components/form/SwitchField.tsx +32 -0
- package/src/components/form/TextAreaField.tsx +46 -0
- package/src/components/form/TextField.tsx +49 -0
- package/src/components/form/UploadField.tsx +133 -0
- package/src/components/form/validations.ts +386 -0
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx +74 -0
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +65 -0
- package/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.css +24 -0
- package/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.tsx +101 -0
- package/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsx +25 -0
- package/src/components/modals/DeleteModal/DeleteModal.tsx +68 -0
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +101 -0
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.css +4 -0
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.tsx +192 -0
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +117 -0
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +193 -0
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +172 -0
- package/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.tsx +116 -0
- package/src/constants.ts +4 -0
- package/src/hooks/useAppContext.tsx +108 -0
- package/src/hooks/useDeviceLabelMatch.ts +101 -0
- package/src/hooks/useDocumentTitle.ts +12 -0
- package/src/hooks/useFetch.ts +10 -0
- package/src/hooks/useFetchPeriodically.ts +82 -0
- package/src/hooks/useNavigate.tsx +92 -0
- package/src/hooks/useTableSelect.ts +48 -0
- package/src/hooks/useTableSort.ts +42 -0
- package/src/hooks/useTableTextSearch.ts +23 -0
- package/src/hooks/useTemplateVersion.ts +23 -0
- package/src/hooks/useThemePreferences.ts +64 -0
- package/src/hooks/useTranslation.ts +8 -0
- package/src/hooks/useUserPreferences.ts +16 -0
- package/src/hooks/useWebSocket.ts +74 -0
- package/src/setupTests.ts +21 -0
- package/src/tests/test-utils.tsx +21 -0
- package/src/types/deviceSpec.ts +110 -0
- package/src/types/extraTypes.ts +52 -0
- package/src/types/typeUtils.ts +7 -0
- package/src/typings.d.ts +12 -0
- package/src/utils/api.ts +87 -0
- package/src/utils/dates.ts +60 -0
- package/src/utils/devices.ts +10 -0
- package/src/utils/error.ts +24 -0
- package/src/utils/labels.ts +40 -0
- package/src/utils/metrics.ts +49 -0
- package/src/utils/patch.ts +202 -0
- package/src/utils/resource.ts +4 -0
- package/src/utils/search.ts +25 -0
- package/src/utils/sort/device.ts +60 -0
- package/src/utils/sort/fleet.ts +16 -0
- package/src/utils/sort/generic.ts +37 -0
- package/src/utils/sort/repository.ts +28 -0
- package/src/utils/sort/resourceSync.ts +30 -0
- package/src/utils/status/applications.ts +58 -0
- package/src/utils/status/common.ts +71 -0
- package/src/utils/status/devices.ts +74 -0
- package/src/utils/status/enrollmentRequest.ts +49 -0
- package/src/utils/status/fleet.ts +47 -0
- package/src/utils/status/integrity.ts +26 -0
- package/src/utils/status/repository.ts +117 -0
- package/src/utils/status/system.ts +28 -0
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js +0 -87
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceList.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceTableRow.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceTableToolbar.js.map +0 -1
- package/dist/src/components/Device/DeviceList/types.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceBackendFilters.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceFilters.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js +0 -98
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js +0 -29
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js.map +0 -1
- package/dist/src/components/Fleet/FleetList.js.map +0 -1
- package/dist/src/components/Fleet/ResourceSyncRow.js +0 -36
- package/dist/src/components/Fleet/ResourceSyncRow.js.map +0 -1
- /package/dist/src/components/Device/{DeviceList → DevicesPage}/types.js +0 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button, FormGroup, FormSection, Grid, Split, SplitItem } from '@patternfly/react-core';
|
|
3
|
+
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
4
|
+
import { MinusCircleIcon } from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
|
|
5
|
+
import { FieldArray, useField, useFormikContext } from 'formik';
|
|
6
|
+
|
|
7
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
8
|
+
import FormSelectTypeahead from '../../../form/FormSelectTypeahead';
|
|
9
|
+
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
10
|
+
import TextField from '../../../form/TextField';
|
|
11
|
+
import UploadField from '../../../form/UploadField';
|
|
12
|
+
import CheckboxField from '../../../form/CheckboxField';
|
|
13
|
+
import { DeviceSpecConfigFormValues } from '../types';
|
|
14
|
+
import { InlineConfigTemplate } from '../../../../types/deviceSpec';
|
|
15
|
+
|
|
16
|
+
import { formatFileMode } from '../deviceSpecUtils';
|
|
17
|
+
|
|
18
|
+
const MAX_INLINE_FILE_SIZE_BYTES = 1024 * 1024;
|
|
19
|
+
|
|
20
|
+
const FileForm = ({ fieldName }: { fieldName: string }) => {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const [{ value: file }] = useField<InlineConfigTemplate['files'][0]>(fieldName);
|
|
23
|
+
|
|
24
|
+
const permissions = React.useMemo(
|
|
25
|
+
() => ({
|
|
26
|
+
'0777': t('(0777) Read, write, and execute permissions for all users.'),
|
|
27
|
+
'0755': t("(0755) Read and execute permission for all users. The file's owner also has write permission."),
|
|
28
|
+
'0750': t(
|
|
29
|
+
"(0750) Read and execute permission for the owner and group. The file's owner also has write permission.",
|
|
30
|
+
),
|
|
31
|
+
'0700': t("(0700) Read, write, and execute permissions for the file's owner only."),
|
|
32
|
+
'0666': t('(0666) Read and write permissions for all users. No execute permissions for others.'),
|
|
33
|
+
'0664': t('(0664) Read and write permissions for the owner and group. Read-only permission for all others.'),
|
|
34
|
+
'0660': t('(0660) Read and write permissions for the owner and group.'),
|
|
35
|
+
'0644': t('(0644) Read and write permissions for the owner. Read-only permission for all others.'),
|
|
36
|
+
'0640': t('(0640) Read and write permissions for the owner, and read-only permission for the group.'),
|
|
37
|
+
'0600': t('(0600) Read and write permissions for the owner.'),
|
|
38
|
+
'0400': t('(0400) Read permission for the owner.'),
|
|
39
|
+
}),
|
|
40
|
+
[t],
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<ExpandableFormSection title={t('File')} fieldName={fieldName} description={file.path}>
|
|
45
|
+
<Grid hasGutter>
|
|
46
|
+
<FormGroup label={t('File path on the device')} isRequired>
|
|
47
|
+
<TextField name={`${fieldName}.path`} />
|
|
48
|
+
</FormGroup>
|
|
49
|
+
<UploadField
|
|
50
|
+
label={t('Content')}
|
|
51
|
+
name={`${fieldName}.content`}
|
|
52
|
+
maxFileBytes={MAX_INLINE_FILE_SIZE_BYTES}
|
|
53
|
+
isRequired
|
|
54
|
+
/>
|
|
55
|
+
<FormGroup>
|
|
56
|
+
<CheckboxField name={`${fieldName}.base64`} label={t('Content is base64 encoded')} />
|
|
57
|
+
</FormGroup>
|
|
58
|
+
<FormGroup label={t('Permissions')}>
|
|
59
|
+
<FormSelectTypeahead
|
|
60
|
+
name={`${fieldName}.permissions`}
|
|
61
|
+
placeholderText={t('Select permissions')}
|
|
62
|
+
helperText={t('Select from the list or type in the permission code in octal notation')}
|
|
63
|
+
defaultId="0644"
|
|
64
|
+
items={permissions}
|
|
65
|
+
validateNewItem={(value) => {
|
|
66
|
+
try {
|
|
67
|
+
if (value !== '' && value.length <= 4) {
|
|
68
|
+
const valNum = Number(`0o${value}`);
|
|
69
|
+
if (isFinite(valNum) && valNum >= 0 && valNum <= 0o7777) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} catch {
|
|
74
|
+
return t('Invalid permissions');
|
|
75
|
+
}
|
|
76
|
+
return t('Invalid permissions');
|
|
77
|
+
}}
|
|
78
|
+
transformNewItem={formatFileMode}
|
|
79
|
+
/>
|
|
80
|
+
</FormGroup>
|
|
81
|
+
<FormGroup label={t('User')}>
|
|
82
|
+
<TextField name={`${fieldName}.user`} placeholder="root" />
|
|
83
|
+
</FormGroup>
|
|
84
|
+
<FormGroup label={t('Group')}>
|
|
85
|
+
<TextField name={`${fieldName}.group`} placeholder="root" />
|
|
86
|
+
</FormGroup>
|
|
87
|
+
</Grid>
|
|
88
|
+
</ExpandableFormSection>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
type ConfigInlineTemplateFormProps = {
|
|
93
|
+
index: number;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
97
|
+
const { t } = useTranslation();
|
|
98
|
+
const { values, setFieldValue } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
99
|
+
const inlineConfig = values.configTemplates[index] as InlineConfigTemplate;
|
|
100
|
+
React.useEffect(() => {
|
|
101
|
+
if (!inlineConfig.files?.length) {
|
|
102
|
+
setFieldValue(`configTemplates.${index}.files`, [
|
|
103
|
+
{
|
|
104
|
+
path: '',
|
|
105
|
+
content: '',
|
|
106
|
+
},
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
// eslint-disable-next-line
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<FieldArray name={`configTemplates.${index}.files`}>
|
|
114
|
+
{({ push, remove }) => (
|
|
115
|
+
<>
|
|
116
|
+
{inlineConfig.files?.map((_, fileIndex) => {
|
|
117
|
+
const fieldName = `configTemplates[${index}].files[${fileIndex}]`;
|
|
118
|
+
return (
|
|
119
|
+
<FormSection key={fileIndex}>
|
|
120
|
+
<Split hasGutter>
|
|
121
|
+
<SplitItem isFilled>
|
|
122
|
+
<FileForm fieldName={fieldName} />
|
|
123
|
+
</SplitItem>
|
|
124
|
+
{inlineConfig.files.length > 1 && (
|
|
125
|
+
<SplitItem>
|
|
126
|
+
<Button
|
|
127
|
+
variant="link"
|
|
128
|
+
icon={<MinusCircleIcon />}
|
|
129
|
+
iconPosition="start"
|
|
130
|
+
onClick={() => remove(fileIndex)}
|
|
131
|
+
/>
|
|
132
|
+
</SplitItem>
|
|
133
|
+
)}
|
|
134
|
+
</Split>
|
|
135
|
+
</FormSection>
|
|
136
|
+
);
|
|
137
|
+
})}
|
|
138
|
+
<FormSection>
|
|
139
|
+
<FormGroup>
|
|
140
|
+
<Button
|
|
141
|
+
variant="link"
|
|
142
|
+
icon={<PlusCircleIcon />}
|
|
143
|
+
iconPosition="start"
|
|
144
|
+
onClick={() => {
|
|
145
|
+
push({
|
|
146
|
+
path: '',
|
|
147
|
+
content: '',
|
|
148
|
+
});
|
|
149
|
+
}}
|
|
150
|
+
>
|
|
151
|
+
{t('Add file')}
|
|
152
|
+
</Button>
|
|
153
|
+
</FormGroup>
|
|
154
|
+
</FormSection>
|
|
155
|
+
</>
|
|
156
|
+
)}
|
|
157
|
+
</FieldArray>
|
|
158
|
+
);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export default ConfigInlineTemplateForm;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useFormikContext } from 'formik';
|
|
3
|
+
import { FormGroup } from '@patternfly/react-core';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
6
|
+
|
|
7
|
+
import TextField from '../../../form/TextField';
|
|
8
|
+
import { DeviceSpecConfigFormValues } from '../types';
|
|
9
|
+
import { KubeSecretTemplate } from '../../../../types/deviceSpec';
|
|
10
|
+
|
|
11
|
+
type ConfigK8sSecretTemplateFormProps = {
|
|
12
|
+
index: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const ConfigK8sSecretTemplateForm = ({ index }: ConfigK8sSecretTemplateFormProps) => {
|
|
16
|
+
const { t } = useTranslation();
|
|
17
|
+
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
18
|
+
const template = values.configTemplates[index] as KubeSecretTemplate;
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<FormGroup label={t('Secret name')} isRequired>
|
|
22
|
+
<TextField
|
|
23
|
+
aria-label={t('Secret name')}
|
|
24
|
+
value={template.secretName}
|
|
25
|
+
name={`configTemplates.${index}.secretName`}
|
|
26
|
+
isDisabled
|
|
27
|
+
/>
|
|
28
|
+
</FormGroup>
|
|
29
|
+
<FormGroup label={t('Secret namespace')} isRequired>
|
|
30
|
+
<TextField
|
|
31
|
+
aria-label={t('Secret namespace')}
|
|
32
|
+
name={`configTemplates.${index}.secretNs`}
|
|
33
|
+
value={template.secretNs}
|
|
34
|
+
isDisabled
|
|
35
|
+
/>
|
|
36
|
+
</FormGroup>
|
|
37
|
+
<FormGroup label={t('Mount path')} isRequired>
|
|
38
|
+
<TextField
|
|
39
|
+
aria-label={t('Mount path')}
|
|
40
|
+
name={`configTemplates.${index}.mountPath`}
|
|
41
|
+
value={template.mountPath}
|
|
42
|
+
placeholder={t('/absolute/path')}
|
|
43
|
+
isDisabled
|
|
44
|
+
/>
|
|
45
|
+
</FormGroup>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default ConfigK8sSecretTemplateForm;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Alert,
|
|
5
|
+
Bullseye,
|
|
6
|
+
Button,
|
|
7
|
+
FormGroup,
|
|
8
|
+
FormSection,
|
|
9
|
+
Grid,
|
|
10
|
+
Spinner,
|
|
11
|
+
Split,
|
|
12
|
+
SplitItem,
|
|
13
|
+
} from '@patternfly/react-core';
|
|
14
|
+
import { FieldArray, useField, useFormikContext } from 'formik';
|
|
15
|
+
import { MinusCircleIcon } from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
|
|
16
|
+
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
17
|
+
|
|
18
|
+
import { RepoSpecType, Repository, RepositoryList } from '@flightctl/types';
|
|
19
|
+
import { ConfigType, SpecConfigTemplate } from '../../../../types/deviceSpec';
|
|
20
|
+
import { DeviceSpecConfigFormValues } from '../types';
|
|
21
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
22
|
+
import { useFetchPeriodically } from '../../../../hooks/useFetchPeriodically';
|
|
23
|
+
import { getErrorMessage } from '../../../../utils/error';
|
|
24
|
+
import { sortByName } from '../../../../utils/sort/generic';
|
|
25
|
+
import { getDnsSubdomainValidations } from '../../../form/validations';
|
|
26
|
+
import ErrorHelperText from '../../../form/FieldHelperText';
|
|
27
|
+
import FormSelect from '../../../form/FormSelect';
|
|
28
|
+
import RichValidationTextField from '../../../form/RichValidationTextField';
|
|
29
|
+
import ConfigWithRepositoryTemplateForm from './ConfigWithRepositoryTemplateForm';
|
|
30
|
+
import ConfigK8sSecretTemplateForm from './ConfigK8sSecretTemplateForm';
|
|
31
|
+
import ConfigInlineTemplateForm from './ConfigInlineTemplateForm';
|
|
32
|
+
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
33
|
+
|
|
34
|
+
const useValidateOnMount = () => {
|
|
35
|
+
const { validateForm } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
36
|
+
|
|
37
|
+
// validate new config section on mount
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
validateForm();
|
|
40
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
|
+
}, []);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
type ConfigSectionProps = {
|
|
45
|
+
index: number;
|
|
46
|
+
repositories: Repository[];
|
|
47
|
+
repoRefetch: VoidFunction;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const ConfigSection = ({ index, repositories, repoRefetch }: ConfigSectionProps) => {
|
|
51
|
+
const { t } = useTranslation();
|
|
52
|
+
const fieldName = `configTemplates[${index}]`;
|
|
53
|
+
const [
|
|
54
|
+
{
|
|
55
|
+
value: { name, type },
|
|
56
|
+
},
|
|
57
|
+
] = useField<SpecConfigTemplate>(fieldName);
|
|
58
|
+
|
|
59
|
+
useValidateOnMount();
|
|
60
|
+
|
|
61
|
+
const items = React.useMemo(() => {
|
|
62
|
+
const options = {
|
|
63
|
+
[ConfigType.GIT]: { label: t('Git configuration') },
|
|
64
|
+
[ConfigType.HTTP]: { label: t('Http configuration') },
|
|
65
|
+
[ConfigType.INLINE]: { label: t('Inline configuration') },
|
|
66
|
+
};
|
|
67
|
+
if (type === ConfigType.K8S_SECRET) {
|
|
68
|
+
options[ConfigType.K8S_SECRET] = { label: t('Kubernetes secret provider') };
|
|
69
|
+
}
|
|
70
|
+
return options;
|
|
71
|
+
// The k8s secret option must remain active for this config even when the users switch the configType to a different one
|
|
72
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
|
+
}, [t]);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<ExpandableFormSection title={t('Configurations')} fieldName={fieldName} description={name}>
|
|
77
|
+
<Grid hasGutter>
|
|
78
|
+
<RichValidationTextField
|
|
79
|
+
fieldName={`${fieldName}.name`}
|
|
80
|
+
aria-label={t('Source name')}
|
|
81
|
+
validations={getDnsSubdomainValidations(t)}
|
|
82
|
+
isRequired
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
<FormGroup label={t('Source type')} isRequired>
|
|
86
|
+
<FormSelect items={items} name={`${fieldName}.type`} placeholderText={t('Select a source type')} />
|
|
87
|
+
</FormGroup>
|
|
88
|
+
|
|
89
|
+
{type === ConfigType.K8S_SECRET && <ConfigK8sSecretTemplateForm index={index} />}
|
|
90
|
+
{type === ConfigType.INLINE && <ConfigInlineTemplateForm index={index} />}
|
|
91
|
+
{(type === ConfigType.GIT || type === ConfigType.HTTP) && (
|
|
92
|
+
<ConfigWithRepositoryTemplateForm
|
|
93
|
+
repoType={type === ConfigType.HTTP ? RepoSpecType.HTTP : RepoSpecType.GIT}
|
|
94
|
+
index={index}
|
|
95
|
+
repositories={repositories}
|
|
96
|
+
repoRefetch={repoRefetch}
|
|
97
|
+
/>
|
|
98
|
+
)}
|
|
99
|
+
</Grid>
|
|
100
|
+
</ExpandableFormSection>
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const ConfigTemplateForm = () => {
|
|
105
|
+
const { t } = useTranslation();
|
|
106
|
+
const { values, errors } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
107
|
+
const [repositoryList, isLoading, error, refetch] = useFetchPeriodically<RepositoryList>({
|
|
108
|
+
endpoint: 'repositories',
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
const repositories = React.useMemo(() => sortByName(repositoryList?.items || []), [repositoryList]);
|
|
112
|
+
|
|
113
|
+
const generalError = typeof errors.configTemplates === 'string' ? errors.configTemplates : undefined;
|
|
114
|
+
|
|
115
|
+
if (error) {
|
|
116
|
+
return (
|
|
117
|
+
<Alert isInline variant="danger" title={t('Failed to load repositories')}>
|
|
118
|
+
{getErrorMessage(error)}
|
|
119
|
+
</Alert>
|
|
120
|
+
);
|
|
121
|
+
} else if (isLoading) {
|
|
122
|
+
return (
|
|
123
|
+
<Bullseye>
|
|
124
|
+
<Spinner />
|
|
125
|
+
</Bullseye>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<FieldArray name="configTemplates">
|
|
131
|
+
{({ push, remove }) => (
|
|
132
|
+
<>
|
|
133
|
+
{values.configTemplates.map((_, index) => (
|
|
134
|
+
<FormSection key={index}>
|
|
135
|
+
<Split hasGutter>
|
|
136
|
+
<SplitItem isFilled>
|
|
137
|
+
<ConfigSection index={index} repositories={repositories} repoRefetch={refetch} />
|
|
138
|
+
</SplitItem>
|
|
139
|
+
<SplitItem>
|
|
140
|
+
<Button
|
|
141
|
+
variant="link"
|
|
142
|
+
icon={<MinusCircleIcon />}
|
|
143
|
+
iconPosition="start"
|
|
144
|
+
onClick={() => remove(index)}
|
|
145
|
+
/>
|
|
146
|
+
</SplitItem>
|
|
147
|
+
</Split>
|
|
148
|
+
</FormSection>
|
|
149
|
+
))}
|
|
150
|
+
<FormSection>
|
|
151
|
+
<FormGroup>
|
|
152
|
+
<Button
|
|
153
|
+
variant="link"
|
|
154
|
+
icon={<PlusCircleIcon />}
|
|
155
|
+
iconPosition="start"
|
|
156
|
+
onClick={() => {
|
|
157
|
+
push({
|
|
158
|
+
name: '',
|
|
159
|
+
type: '',
|
|
160
|
+
});
|
|
161
|
+
}}
|
|
162
|
+
>
|
|
163
|
+
{t('Add configuration')}
|
|
164
|
+
</Button>
|
|
165
|
+
</FormGroup>
|
|
166
|
+
</FormSection>
|
|
167
|
+
<ErrorHelperText error={generalError} />
|
|
168
|
+
</>
|
|
169
|
+
)}
|
|
170
|
+
</FieldArray>
|
|
171
|
+
);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export default ConfigTemplateForm;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useFormikContext } from 'formik';
|
|
3
|
+
import { Button, FormGroup, Icon, MenuFooter } from '@patternfly/react-core';
|
|
4
|
+
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
5
|
+
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
6
|
+
import { TFunction, Trans } from 'react-i18next';
|
|
7
|
+
|
|
8
|
+
import { RepoSpecType, Repository } from '@flightctl/types';
|
|
9
|
+
import { GitConfigTemplate, HttpConfigTemplate } from '../../../../types/deviceSpec';
|
|
10
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
11
|
+
import { DeviceSpecConfigFormValues } from '../types';
|
|
12
|
+
import TextField from '../../../form/TextField';
|
|
13
|
+
import FormSelect from '../../../form/FormSelect';
|
|
14
|
+
import CreateRepositoryModal from '../../../modals/CreateRepositoryModal/CreateRepositoryModal';
|
|
15
|
+
import WithHelperText from '../../../common/WithHelperText';
|
|
16
|
+
|
|
17
|
+
type ConfigWithRepositoryTemplateFormProps = {
|
|
18
|
+
repoType: RepoSpecType;
|
|
19
|
+
index: number;
|
|
20
|
+
repositories: Repository[];
|
|
21
|
+
repoRefetch: VoidFunction;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const getRepositoryItems = (
|
|
25
|
+
t: TFunction,
|
|
26
|
+
repositories: Repository[],
|
|
27
|
+
repoType: RepoSpecType,
|
|
28
|
+
forcedRepoName?: string,
|
|
29
|
+
) => {
|
|
30
|
+
const repositoryItems = repositories.reduce((acc, curr) => {
|
|
31
|
+
if (curr.spec.type === repoType) {
|
|
32
|
+
acc[curr.metadata.name || ''] = {
|
|
33
|
+
label: curr.metadata.name,
|
|
34
|
+
description: curr.spec.url,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return acc;
|
|
38
|
+
}, {});
|
|
39
|
+
// If there's a broken reference to a repository, we must add an item so the name shows in the dropdown
|
|
40
|
+
if (forcedRepoName && !repositoryItems[forcedRepoName]) {
|
|
41
|
+
repositoryItems[forcedRepoName] = {
|
|
42
|
+
label: forcedRepoName,
|
|
43
|
+
description: (
|
|
44
|
+
<>
|
|
45
|
+
<Icon size="sm" status="danger">
|
|
46
|
+
<ExclamationCircleIcon />
|
|
47
|
+
</Icon>{' '}
|
|
48
|
+
{t('Missing repository')}
|
|
49
|
+
</>
|
|
50
|
+
),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return repositoryItems;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index: number }) => {
|
|
57
|
+
const { t } = useTranslation();
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<>
|
|
61
|
+
<FormGroup label={t('Branch/tag/commit')} isRequired>
|
|
62
|
+
<TextField
|
|
63
|
+
aria-label={t('Branch/tag/commit')}
|
|
64
|
+
name={`configTemplates[${index}].targetRevision`}
|
|
65
|
+
value={template.targetRevision}
|
|
66
|
+
/>
|
|
67
|
+
</FormGroup>
|
|
68
|
+
<FormGroup
|
|
69
|
+
label={
|
|
70
|
+
<WithHelperText
|
|
71
|
+
ariaLabel={t('Path')}
|
|
72
|
+
content={t('Path in the repository where the configuration file(s) are located')}
|
|
73
|
+
showLabel
|
|
74
|
+
/>
|
|
75
|
+
}
|
|
76
|
+
isRequired
|
|
77
|
+
>
|
|
78
|
+
<TextField
|
|
79
|
+
aria-label={t('Path')}
|
|
80
|
+
name={`configTemplates[${index}].path`}
|
|
81
|
+
value={template.path}
|
|
82
|
+
placeholder={t('/absolute/path')}
|
|
83
|
+
/>
|
|
84
|
+
</FormGroup>
|
|
85
|
+
<FormGroup
|
|
86
|
+
isRequired
|
|
87
|
+
label={
|
|
88
|
+
<WithHelperText
|
|
89
|
+
ariaLabel={t('Mount path')}
|
|
90
|
+
content={t('Path in the device where the configurations will be stored')}
|
|
91
|
+
showLabel
|
|
92
|
+
/>
|
|
93
|
+
}
|
|
94
|
+
>
|
|
95
|
+
<TextField
|
|
96
|
+
aria-label={t('Mount path')}
|
|
97
|
+
name={`configTemplates[${index}].mountPath`}
|
|
98
|
+
value={template.mountPath}
|
|
99
|
+
placeholder={t('/absolute/path')}
|
|
100
|
+
/>
|
|
101
|
+
</FormGroup>
|
|
102
|
+
</>
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const HttpConfigForm = ({
|
|
107
|
+
template,
|
|
108
|
+
baseURL,
|
|
109
|
+
index,
|
|
110
|
+
}: {
|
|
111
|
+
template: HttpConfigTemplate;
|
|
112
|
+
index: number;
|
|
113
|
+
baseURL?: string;
|
|
114
|
+
}) => {
|
|
115
|
+
const { t } = useTranslation();
|
|
116
|
+
|
|
117
|
+
let suffixHelperText: React.ReactNode;
|
|
118
|
+
if (baseURL) {
|
|
119
|
+
const fullURL = `${baseURL}${template.suffix || ''}`;
|
|
120
|
+
suffixHelperText = (
|
|
121
|
+
<Trans t={t}>
|
|
122
|
+
Full HTTP service URL: <strong>{fullURL}</strong>
|
|
123
|
+
</Trans>
|
|
124
|
+
);
|
|
125
|
+
} else {
|
|
126
|
+
suffixHelperText = t('Select a repository to generate the full URL');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<>
|
|
131
|
+
<FormGroup
|
|
132
|
+
label={t('Suffix')}
|
|
133
|
+
labelIcon={
|
|
134
|
+
<WithHelperText
|
|
135
|
+
ariaLabel={t('Suffix')}
|
|
136
|
+
content={t(
|
|
137
|
+
"Suffix that will be combined with the repository's base URL to invoke the HTTP service. Can include query parameters.",
|
|
138
|
+
)}
|
|
139
|
+
/>
|
|
140
|
+
}
|
|
141
|
+
>
|
|
142
|
+
<TextField
|
|
143
|
+
aria-label={t('Suffix')}
|
|
144
|
+
name={`configTemplates[${index}].suffix`}
|
|
145
|
+
value={template.suffix || ''}
|
|
146
|
+
helperText={suffixHelperText}
|
|
147
|
+
/>
|
|
148
|
+
</FormGroup>
|
|
149
|
+
<FormGroup
|
|
150
|
+
label={t('File path')}
|
|
151
|
+
labelIcon={
|
|
152
|
+
<WithHelperText
|
|
153
|
+
ariaLabel={t('File path')}
|
|
154
|
+
content={t('Path of the file where the response will be stored in the device filesystem.')}
|
|
155
|
+
/>
|
|
156
|
+
}
|
|
157
|
+
isRequired
|
|
158
|
+
>
|
|
159
|
+
<TextField
|
|
160
|
+
aria-label={t('File path')}
|
|
161
|
+
name={`configTemplates[${index}].filePath`}
|
|
162
|
+
value={template.filePath || ''}
|
|
163
|
+
placeholder={t('/absolute/path')}
|
|
164
|
+
/>
|
|
165
|
+
</FormGroup>
|
|
166
|
+
</>
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const ConfigWithRepositoryTemplateForm = ({
|
|
171
|
+
repoType,
|
|
172
|
+
index,
|
|
173
|
+
repositories,
|
|
174
|
+
repoRefetch,
|
|
175
|
+
}: ConfigWithRepositoryTemplateFormProps) => {
|
|
176
|
+
const { t } = useTranslation();
|
|
177
|
+
const { values, setFieldValue } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
178
|
+
const [createRepoModalOpen, setCreateRepoModalOpen] = React.useState(false);
|
|
179
|
+
|
|
180
|
+
const ct = values.configTemplates[index] as HttpConfigTemplate | GitConfigTemplate;
|
|
181
|
+
const selectedRepoName = ct?.repository;
|
|
182
|
+
|
|
183
|
+
const repositoryItems = getRepositoryItems(t, repositories, repoType, selectedRepoName);
|
|
184
|
+
const selectedRepo = repositories.find((repo) => repo.metadata.name === selectedRepoName);
|
|
185
|
+
return (
|
|
186
|
+
<>
|
|
187
|
+
<FormGroup label={t('Repository')} isRequired>
|
|
188
|
+
<FormSelect
|
|
189
|
+
name={`configTemplates[${index}].repository`}
|
|
190
|
+
items={repositoryItems}
|
|
191
|
+
placeholderText={t('Select a repository')}
|
|
192
|
+
>
|
|
193
|
+
<MenuFooter>
|
|
194
|
+
<Button
|
|
195
|
+
variant="link"
|
|
196
|
+
isInline
|
|
197
|
+
icon={<PlusCircleIcon />}
|
|
198
|
+
onClick={() => {
|
|
199
|
+
setCreateRepoModalOpen(true);
|
|
200
|
+
}}
|
|
201
|
+
>
|
|
202
|
+
{t('Create repository')}
|
|
203
|
+
</Button>
|
|
204
|
+
</MenuFooter>
|
|
205
|
+
</FormSelect>
|
|
206
|
+
</FormGroup>
|
|
207
|
+
{repoType === RepoSpecType.GIT && <GitConfigForm template={ct as GitConfigTemplate} index={index} />}
|
|
208
|
+
{repoType === RepoSpecType.HTTP && (
|
|
209
|
+
<HttpConfigForm template={ct as HttpConfigTemplate} index={index} baseURL={selectedRepo?.spec.url} />
|
|
210
|
+
)}
|
|
211
|
+
{createRepoModalOpen && (
|
|
212
|
+
<CreateRepositoryModal
|
|
213
|
+
onClose={() => setCreateRepoModalOpen(false)}
|
|
214
|
+
onSuccess={(repo) => {
|
|
215
|
+
setCreateRepoModalOpen(false);
|
|
216
|
+
repoRefetch();
|
|
217
|
+
void setFieldValue(`configTemplates[${index}].repository`, repo.metadata.name, true);
|
|
218
|
+
}}
|
|
219
|
+
options={{
|
|
220
|
+
canUseResourceSyncs: false,
|
|
221
|
+
allowedRepoTypes: [repoType],
|
|
222
|
+
}}
|
|
223
|
+
/>
|
|
224
|
+
)}
|
|
225
|
+
</>
|
|
226
|
+
);
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export default ConfigWithRepositoryTemplateForm;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert, CodeBlock, CodeBlockCode, FormGroup, Grid } from '@patternfly/react-core';
|
|
3
|
+
import { FormikErrors, useFormikContext } from 'formik';
|
|
4
|
+
import { Trans } from 'react-i18next';
|
|
5
|
+
|
|
6
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
7
|
+
import WithHelperText from '../../../common/WithHelperText';
|
|
8
|
+
import TextField from '../../../form/TextField';
|
|
9
|
+
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
10
|
+
import { DeviceSpecConfigFormValues } from '../types';
|
|
11
|
+
import ConfigTemplateForm from './ConfigTemplateForm';
|
|
12
|
+
import ApplicationsForm from './ApplicationsForm';
|
|
13
|
+
|
|
14
|
+
export const deviceTemplateStepId = 'device-template';
|
|
15
|
+
|
|
16
|
+
export const isDeviceTemplateStepValid = (errors: FormikErrors<DeviceSpecConfigFormValues>) => {
|
|
17
|
+
return !errors.osImage && !errors.configTemplates && !errors.applications;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const templateOption1 = '{{ device.metadata.labels[key] }}';
|
|
21
|
+
const templateOption2 = '{{ device.metadata.name }}';
|
|
22
|
+
const exampleCode = `/device-configs/factory-floors/floor-{{ device.metadata.labels[factory-floor] }}`;
|
|
23
|
+
|
|
24
|
+
const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
27
|
+
return (
|
|
28
|
+
<Grid span={8}>
|
|
29
|
+
<FlightCtlForm>
|
|
30
|
+
{isFleet && (
|
|
31
|
+
<Alert isInline variant="info" title={t('Using template variables')} isExpandable>
|
|
32
|
+
<Trans t={t}>
|
|
33
|
+
Add a variable by using <strong>{templateOption1}</strong> or <strong>{templateOption2}</strong> and it
|
|
34
|
+
will be applied based on each device’s details. For example, you could set the following value to
|
|
35
|
+
apply different files in a Git configuration:
|
|
36
|
+
</Trans>
|
|
37
|
+
<CodeBlock className="pf-v5-u-mt-md">
|
|
38
|
+
<CodeBlockCode>{exampleCode}</CodeBlockCode>
|
|
39
|
+
</CodeBlock>
|
|
40
|
+
</Alert>
|
|
41
|
+
)}
|
|
42
|
+
<FormGroup
|
|
43
|
+
label={
|
|
44
|
+
<WithHelperText
|
|
45
|
+
ariaLabel={t('System image')}
|
|
46
|
+
content={
|
|
47
|
+
isFleet
|
|
48
|
+
? t("The target system image for this fleet's devices.")
|
|
49
|
+
: t('The target system image for this device.')
|
|
50
|
+
}
|
|
51
|
+
showLabel
|
|
52
|
+
/>
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
<TextField
|
|
56
|
+
name="osImage"
|
|
57
|
+
aria-label={t('System image')}
|
|
58
|
+
value={values.osImage}
|
|
59
|
+
helperText={t(
|
|
60
|
+
'Must be either an OCI image ref (e.g. "quay.io/redhat/rhde:9.3") or ostree ref (e.g. "https://ostree.fedoraproject.org/iot?ref=fedora/stable/x86_64/iot"). Keep this empty if you do not want to manage your OS from Flight Control.',
|
|
61
|
+
)}
|
|
62
|
+
/>
|
|
63
|
+
</FormGroup>
|
|
64
|
+
<FormGroup>
|
|
65
|
+
<ConfigTemplateForm />
|
|
66
|
+
</FormGroup>
|
|
67
|
+
<FormGroup>
|
|
68
|
+
<ApplicationsForm />
|
|
69
|
+
</FormGroup>
|
|
70
|
+
</FlightCtlForm>
|
|
71
|
+
</Grid>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export default DeviceTemplateStep;
|