@flightctl/ui-components 0.5.1 → 0.6.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/DetailsPage.d.ts +3 -2
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPage.js +2 -2
- package/dist/src/components/DetailsPage/DetailsPage.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +5 -3
- 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 +4 -5
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.js +110 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +7 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +9 -6
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js +3 -3
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.js +3 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +34 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +35 -30
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +11 -2
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +14 -11
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +9 -2
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js +21 -6
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js +11 -4
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +6 -5
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +123 -10
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js +19 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js +49 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +52 -19
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +13 -16
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js +5 -5
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +16 -16
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js +58 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +17 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts +2 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +29 -3
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.js +8 -7
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.d.ts.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.js.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts +1 -4
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +5 -5
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts +2 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +19 -11
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +5 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts +2 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js +8 -4
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +2 -2
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js +8 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts +19 -2
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js +53 -18
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js +1 -2
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js +22 -9
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js +4 -4
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js +5 -5
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.css +3 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js +127 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js +13 -4
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.js +8 -12
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js.map +1 -1
- package/dist/src/components/ListPage/ListPage.d.ts +1 -0
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -1
- package/dist/src/components/ListPage/ListPage.js +3 -3
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts +4 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts.map +1 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.js +90 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.js.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesModal.d.ts.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesModal.js.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesProvider.d.ts.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesProvider.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +3 -3
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/{ToDo/ToDoCard.js → Tasks/TasksCard.js} +4 -4
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.js.map +1 -0
- package/dist/src/components/OverviewPage/Overview.js +2 -2
- package/dist/src/components/OverviewPage/Overview.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +6 -5
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +3 -3
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.js +4 -1
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryList.js +3 -11
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +3 -6
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/Status/DeviceResourceStatus.js +3 -3
- package/dist/src/components/Status/utils.d.ts.map +1 -1
- package/dist/src/components/Status/utils.js +3 -3
- package/dist/src/components/Status/utils.js.map +1 -1
- package/dist/src/components/Table/Table.d.ts +2 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/Table.js +9 -5
- package/dist/src/components/Table/Table.js.map +1 -1
- package/dist/src/components/Table/TablePagination.d.ts.map +1 -1
- package/dist/src/components/Table/TablePagination.js +1 -1
- package/dist/src/components/Table/TablePagination.js.map +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -1
- package/dist/src/components/Terminal/Terminal.js +10 -3
- package/dist/src/components/Terminal/Terminal.js.map +1 -1
- package/dist/src/components/charts/DonutChart.js +1 -1
- package/dist/src/components/charts/DonutChart.js.map +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/WithHelperText.d.ts +10 -5
- package/dist/src/components/common/WithHelperText.d.ts.map +1 -1
- package/dist/src/components/common/WithHelperText.js +13 -8
- package/dist/src/components/common/WithHelperText.js.map +1 -1
- package/dist/src/components/form/CheckboxField.d.ts +6 -3
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -1
- package/dist/src/components/form/CheckboxField.js +20 -1
- package/dist/src/components/form/CheckboxField.js.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.d.ts +3 -3
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.js +43 -53
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -1
- package/dist/src/components/form/RichValidationTextField.js +8 -4
- package/dist/src/components/form/RichValidationTextField.js.map +1 -1
- package/dist/src/components/form/validations.d.ts +44 -4
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +148 -25
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js +5 -3
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +3 -2
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +7 -12
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js.map +1 -1
- 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.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -1
- package/dist/src/hooks/timeZones.d.ts +3 -0
- package/dist/src/hooks/timeZones.d.ts.map +1 -0
- package/dist/src/hooks/timeZones.js +607 -0
- package/dist/src/hooks/timeZones.js.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +14 -8
- package/dist/src/hooks/useAppContext.d.ts.map +1 -1
- package/dist/src/hooks/useAppContext.js +13 -6
- package/dist/src/hooks/useAppContext.js.map +1 -1
- package/dist/src/hooks/useFetch.d.ts +3 -5
- package/dist/src/hooks/useFetch.d.ts.map +1 -1
- package/dist/src/hooks/useFetch.js +3 -2
- package/dist/src/hooks/useFetch.js.map +1 -1
- package/dist/src/hooks/useNavigate.d.ts +2 -1
- package/dist/src/hooks/useNavigate.d.ts.map +1 -1
- package/dist/src/hooks/useNavigate.js +1 -0
- package/dist/src/hooks/useNavigate.js.map +1 -1
- package/dist/src/hooks/useTimeZones.d.ts +4 -0
- package/dist/src/hooks/useTimeZones.d.ts.map +1 -0
- package/dist/src/hooks/useTimeZones.js +22 -0
- package/dist/src/hooks/useTimeZones.js.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +6 -2
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/src/hooks/useWebSocket.js +22 -7
- 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 -1
- package/dist/src/links.js +10 -3
- package/dist/src/links.js.map +1 -1
- package/dist/src/types/deviceSpec.d.ts +93 -5
- package/dist/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/src/types/deviceSpec.js +28 -2
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +19 -1
- package/dist/src/types/extraTypes.d.ts.map +1 -1
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/utils/labels.d.ts +1 -0
- package/dist/src/utils/labels.d.ts.map +1 -1
- package/dist/src/utils/labels.js +9 -2
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/patch.d.ts +13 -5
- package/dist/src/utils/patch.d.ts.map +1 -1
- package/dist/src/utils/patch.js +115 -71
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/query.d.ts +1 -0
- package/dist/src/utils/query.d.ts.map +1 -1
- package/dist/src/utils/query.js +10 -3
- package/dist/src/utils/query.js.map +1 -1
- package/dist/src/utils/search.d.ts +6 -0
- package/dist/src/utils/search.d.ts.map +1 -1
- package/dist/src/utils/search.js +9 -1
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/time.d.ts +31 -0
- package/dist/src/utils/time.d.ts.map +1 -0
- package/dist/src/utils/time.js +134 -0
- package/dist/src/utils/time.js.map +1 -0
- package/package.json +1 -4
- package/src/components/DetailsPage/DetailsPage.tsx +6 -4
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +6 -3
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +4 -13
- package/src/components/Device/DeviceDetails/DeviceAliasEdit.tsx +180 -0
- package/src/components/Device/DeviceDetails/DeviceApplications.tsx +8 -1
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +21 -5
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +3 -4
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsx +7 -10
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsx +3 -3
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +43 -5
- package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +2 -1
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +66 -38
- package/src/components/Device/DevicesPage/DevicesPage.tsx +11 -2
- package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +16 -11
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +11 -2
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.tsx +22 -6
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +15 -2
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +147 -14
- package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +28 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +94 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +81 -50
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +23 -28
- package/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx +1 -2
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +18 -39
- package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +8 -14
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +26 -39
- package/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.tsx +88 -0
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +18 -19
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +3 -3
- package/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx +2 -2
- package/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.tsx +2 -1
- package/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/utils.ts +16 -9
- package/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.tsx +7 -6
- package/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.tsx +1 -5
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +7 -9
- package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +30 -17
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +5 -1
- package/src/components/EnrollmentRequest/useEnrollmentRequests.ts +12 -4
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +4 -3
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +9 -2
- package/src/components/Fleet/CreateFleet/fleetSpecUtils.ts +51 -17
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +1 -1
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +2 -13
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +3 -3
- package/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.tsx +10 -1
- package/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.tsx +49 -16
- package/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx +18 -33
- package/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx +14 -24
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.css +3 -0
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx +246 -0
- package/src/components/Fleet/CreateFleet/utils.ts +23 -7
- package/src/components/Fleet/FleetsPage.tsx +15 -17
- package/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.tsx +1 -1
- package/src/components/ListPage/ListPage.tsx +7 -4
- package/src/components/Masthead/CommandLineToolsPage.tsx +179 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +6 -6
- package/src/components/OverviewPage/Cards/{ToDo/ToDoCard.tsx → Tasks/TasksCard.tsx} +3 -3
- package/src/components/OverviewPage/Overview.tsx +2 -2
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +11 -26
- package/src/components/Repository/CreateRepository/CreateResourceSyncsForm.tsx +8 -17
- package/src/components/Repository/CreateRepository/utils.ts +4 -1
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +3 -4
- package/src/components/Repository/RepositoryList.tsx +9 -16
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +7 -11
- package/src/components/Status/DeviceResourceStatus.tsx +4 -4
- package/src/components/Status/utils.ts +3 -5
- package/src/components/Table/Table.tsx +32 -9
- package/src/components/Table/TablePagination.tsx +0 -1
- package/src/components/Terminal/Terminal.tsx +10 -4
- package/src/components/charts/DonutChart.tsx +2 -2
- package/src/components/common/LeaveFormConfirmation.tsx +2 -2
- package/src/components/common/WithHelperText.tsx +53 -21
- package/src/components/form/CheckboxField.tsx +28 -3
- package/src/components/form/FormSelectTypeahead.tsx +53 -80
- package/src/components/form/RichValidationTextField.tsx +73 -62
- package/src/components/form/validations.ts +207 -28
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx +5 -5
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +3 -2
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +9 -20
- package/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +2 -2
- package/src/hooks/timeZones.ts +606 -0
- package/src/hooks/useAppContext.tsx +20 -10
- package/src/hooks/useFetch.ts +3 -2
- package/src/hooks/useNavigate.tsx +1 -0
- package/src/hooks/useTimeZones.ts +26 -0
- package/src/hooks/useWebSocket.ts +29 -7
- package/src/links.ts +13 -4
- package/src/types/deviceSpec.ts +118 -2
- package/src/types/extraTypes.ts +33 -1
- package/src/utils/labels.ts +7 -1
- package/src/utils/patch.ts +126 -72
- package/src/utils/query.ts +13 -4
- package/src/utils/search.ts +8 -0
- package/src/utils/time.ts +147 -0
- package/dist/jest.config.d.ts +0 -12
- package/dist/jest.config.d.ts.map +0 -1
- package/dist/jest.config.js +0 -24
- package/dist/jest.config.js.map +0 -1
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts +0 -2
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts.map +0 -1
- package/dist/src/components/DetailsPage/DetailsPage.spec.js +0 -81
- package/dist/src/components/DetailsPage/DetailsPage.spec.js.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +0 -23
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/types.js +0 -3
- package/dist/src/components/Device/EditDeviceWizard/types.js.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +0 -29
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/types.js +0 -9
- package/dist/src/components/Fleet/CreateFleet/types.js.map +0 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts +0 -4
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +0 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesModal.js.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesProvider.js.map +0 -1
- package/dist/src/setupTests.d.ts +0 -2
- package/dist/src/setupTests.d.ts.map +0 -1
- package/dist/src/setupTests.js +0 -24
- package/dist/src/setupTests.js.map +0 -1
- package/dist/src/tests/test-utils.d.ts +0 -7
- package/dist/src/tests/test-utils.d.ts.map +0 -1
- package/dist/src/tests/test-utils.js +0 -21
- package/dist/src/tests/test-utils.js.map +0 -1
- package/src/components/DetailsPage/DetailsPage.spec.tsx +0 -128
- package/src/components/Device/EditDeviceWizard/types.ts +0 -22
- package/src/components/Fleet/CreateFleet/types.ts +0 -33
- package/src/setupTests.ts +0 -21
- package/src/tests/test-utils.tsx +0 -21
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesModal.d.ts +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesModal.js +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.d.ts +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.js +0 -0
- /package/src/components/{UserPreferences → Masthead}/UserPreferencesModal.tsx +0 -0
- /package/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.tsx +0 -0
|
@@ -6,13 +6,12 @@ import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exc
|
|
|
6
6
|
import { TFunction, Trans } from 'react-i18next';
|
|
7
7
|
|
|
8
8
|
import { RepoSpecType, Repository } from '@flightctl/types';
|
|
9
|
-
import { GitConfigTemplate, HttpConfigTemplate } from '../../../../types/deviceSpec';
|
|
9
|
+
import { DeviceSpecConfigFormValues, GitConfigTemplate, HttpConfigTemplate } from '../../../../types/deviceSpec';
|
|
10
10
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
11
|
-
import { DeviceSpecConfigFormValues } from '../types';
|
|
12
11
|
import TextField from '../../../form/TextField';
|
|
13
12
|
import FormSelect from '../../../form/FormSelect';
|
|
14
13
|
import CreateRepositoryModal from '../../../modals/CreateRepositoryModal/CreateRepositoryModal';
|
|
15
|
-
import
|
|
14
|
+
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
16
15
|
|
|
17
16
|
type ConfigWithRepositoryTemplateFormProps = {
|
|
18
17
|
repoType: RepoSpecType;
|
|
@@ -66,14 +65,9 @@ const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index
|
|
|
66
65
|
value={template.targetRevision}
|
|
67
66
|
/>
|
|
68
67
|
</FormGroup>
|
|
69
|
-
<
|
|
70
|
-
label={
|
|
71
|
-
|
|
72
|
-
ariaLabel={t('Path')}
|
|
73
|
-
content={t('Path in the repository where the configuration file(s) are located')}
|
|
74
|
-
showLabel
|
|
75
|
-
/>
|
|
76
|
-
}
|
|
68
|
+
<FormGroupWithHelperText
|
|
69
|
+
label={t('Path')}
|
|
70
|
+
content={t('Path in the repository where the configuration files are located.')}
|
|
77
71
|
isRequired
|
|
78
72
|
>
|
|
79
73
|
<TextField
|
|
@@ -82,16 +76,11 @@ const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index
|
|
|
82
76
|
value={template.path}
|
|
83
77
|
placeholder={t('/absolute/path')}
|
|
84
78
|
/>
|
|
85
|
-
</
|
|
86
|
-
<
|
|
79
|
+
</FormGroupWithHelperText>
|
|
80
|
+
<FormGroupWithHelperText
|
|
81
|
+
label={t('Mount path')}
|
|
82
|
+
content={t('Path in the device where the configurations will be stored.')}
|
|
87
83
|
isRequired
|
|
88
|
-
label={
|
|
89
|
-
<WithHelperText
|
|
90
|
-
ariaLabel={t('Mount path')}
|
|
91
|
-
content={t('Path in the device where the configurations will be stored')}
|
|
92
|
-
showLabel
|
|
93
|
-
/>
|
|
94
|
-
}
|
|
95
84
|
>
|
|
96
85
|
<TextField
|
|
97
86
|
aria-label={t('Mount path')}
|
|
@@ -99,7 +88,7 @@ const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index
|
|
|
99
88
|
value={template.mountPath}
|
|
100
89
|
placeholder={t('/absolute/path')}
|
|
101
90
|
/>
|
|
102
|
-
</
|
|
91
|
+
</FormGroupWithHelperText>
|
|
103
92
|
</>
|
|
104
93
|
);
|
|
105
94
|
};
|
|
@@ -129,16 +118,11 @@ const HttpConfigForm = ({
|
|
|
129
118
|
|
|
130
119
|
return (
|
|
131
120
|
<>
|
|
132
|
-
<
|
|
121
|
+
<FormGroupWithHelperText
|
|
133
122
|
label={t('Suffix')}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
content={t(
|
|
138
|
-
"Suffix that will be combined with the repository's base URL to invoke the HTTP service. Can include query parameters.",
|
|
139
|
-
)}
|
|
140
|
-
/>
|
|
141
|
-
}
|
|
123
|
+
content={t(
|
|
124
|
+
"Suffix that will be combined with the repository's base URL to invoke the HTTP service. Can include query parameters.",
|
|
125
|
+
)}
|
|
142
126
|
>
|
|
143
127
|
<TextField
|
|
144
128
|
aria-label={t('Suffix')}
|
|
@@ -146,15 +130,10 @@ const HttpConfigForm = ({
|
|
|
146
130
|
value={template.suffix || ''}
|
|
147
131
|
helperText={suffixHelperText}
|
|
148
132
|
/>
|
|
149
|
-
</
|
|
150
|
-
<
|
|
133
|
+
</FormGroupWithHelperText>
|
|
134
|
+
<FormGroupWithHelperText
|
|
151
135
|
label={t('File path')}
|
|
152
|
-
|
|
153
|
-
<WithHelperText
|
|
154
|
-
ariaLabel={t('File path')}
|
|
155
|
-
content={t('Path of the file where the response will be stored in the device filesystem.')}
|
|
156
|
-
/>
|
|
157
|
-
}
|
|
136
|
+
content={t('Path of the file where the response will be stored in the device filesystem.')}
|
|
158
137
|
isRequired
|
|
159
138
|
>
|
|
160
139
|
<TextField
|
|
@@ -163,7 +142,7 @@ const HttpConfigForm = ({
|
|
|
163
142
|
value={template.filePath || ''}
|
|
164
143
|
placeholder={t('/absolute/path')}
|
|
165
144
|
/>
|
|
166
|
-
</
|
|
145
|
+
</FormGroupWithHelperText>
|
|
167
146
|
</>
|
|
168
147
|
);
|
|
169
148
|
};
|
|
@@ -16,12 +16,11 @@ import { MinusCircleIcon } from '@patternfly/react-icons/dist/js/icons/minus-cir
|
|
|
16
16
|
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
17
17
|
|
|
18
18
|
import { RepoSpecType, Repository, RepositoryList } from '@flightctl/types';
|
|
19
|
-
import { ConfigType, SpecConfigTemplate } from '../../../../types/deviceSpec';
|
|
20
|
-
import { DeviceSpecConfigFormValues } from '../types';
|
|
19
|
+
import { ConfigType, DeviceSpecConfigFormValues, SpecConfigTemplate } from '../../../../types/deviceSpec';
|
|
21
20
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
22
21
|
import { useFetchPeriodically } from '../../../../hooks/useFetchPeriodically';
|
|
23
22
|
import { getErrorMessage } from '../../../../utils/error';
|
|
24
|
-
import
|
|
23
|
+
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
25
24
|
import { getDnsSubdomainValidations } from '../../../form/validations';
|
|
26
25
|
import ErrorHelperText from '../../../form/FieldHelperText';
|
|
27
26
|
import FormSelect from '../../../form/FormSelect';
|
|
@@ -124,16 +123,11 @@ const ConfigurationTemplatesForm = ({ repositories, repoRefetch, canCreateRepo,
|
|
|
124
123
|
const generalError = typeof errors.configTemplates === 'string' ? errors.configTemplates : undefined;
|
|
125
124
|
|
|
126
125
|
return (
|
|
127
|
-
<
|
|
128
|
-
label={
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"Define configuration files that shall be present on the device's file system. For example: systemd service config, network config, firewall config, etc.",
|
|
133
|
-
)}
|
|
134
|
-
showLabel
|
|
135
|
-
/>
|
|
136
|
-
}
|
|
126
|
+
<FormGroupWithHelperText
|
|
127
|
+
label={t('Host configurations (files)')}
|
|
128
|
+
content={t(
|
|
129
|
+
"Define configuration files that shall be present on the device's file system. For example: systemd service config, network config, firewall config, etc.",
|
|
130
|
+
)}
|
|
137
131
|
>
|
|
138
132
|
<FieldArray name="configTemplates">
|
|
139
133
|
{({ push, remove }) => (
|
|
@@ -183,7 +177,7 @@ const ConfigurationTemplatesForm = ({ repositories, repoRefetch, canCreateRepo,
|
|
|
183
177
|
</>
|
|
184
178
|
)}
|
|
185
179
|
</FieldArray>
|
|
186
|
-
</
|
|
180
|
+
</FormGroupWithHelperText>
|
|
187
181
|
);
|
|
188
182
|
};
|
|
189
183
|
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Alert,
|
|
2
|
+
import { Alert, CodeBlock, CodeBlockCode, FormGroup, Grid, Spinner } from '@patternfly/react-core';
|
|
3
3
|
import { FormikErrors, useFormikContext } from 'formik';
|
|
4
4
|
import { Trans } from 'react-i18next';
|
|
5
5
|
import { Repository } from '@flightctl/types';
|
|
6
|
-
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
7
6
|
|
|
8
|
-
import { USING_TEMPLATE_VARIABLES_LINK } from '../../../../links';
|
|
7
|
+
import { CREATE_ACM_REPOSITORY, USING_TEMPLATE_VARIABLES_LINK } from '../../../../links';
|
|
9
8
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
10
|
-
import
|
|
9
|
+
import LabelWithHelperText, { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
11
10
|
import LearnMoreLink from '../../../common/LearnMoreLink';
|
|
12
11
|
import TextField from '../../../form/TextField';
|
|
13
12
|
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
14
|
-
import { DeviceSpecConfigFormValues } from '
|
|
13
|
+
import { DeviceSpecConfigFormValues } from '../../../../types/deviceSpec';
|
|
15
14
|
import ConfigurationTemplates from './ConfigurationTemplates';
|
|
16
15
|
import ApplicationsForm from './ApplicationTemplates';
|
|
17
16
|
import SystemdUnitsForm from './SystemdUnitsForm';
|
|
18
17
|
import CheckboxField from '../../../form/CheckboxField';
|
|
19
18
|
import { useFetchPeriodically } from '../../../../hooks/useFetchPeriodically';
|
|
20
|
-
import { useAppContext } from '../../../../hooks/useAppContext';
|
|
19
|
+
import { FlightCtlApp, useAppContext } from '../../../../hooks/useAppContext';
|
|
21
20
|
import { ACM_REPO_NAME } from '../deviceSpecUtils';
|
|
22
21
|
|
|
23
22
|
export const deviceTemplateStepId = 'device-template';
|
|
@@ -50,8 +49,8 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
50
49
|
isFleet ? (
|
|
51
50
|
<>
|
|
52
51
|
{t('Register all MicroShift devices to ACM')}
|
|
53
|
-
<
|
|
54
|
-
|
|
52
|
+
<LabelWithHelperText
|
|
53
|
+
label="MicroShift registration"
|
|
55
54
|
content={
|
|
56
55
|
<>
|
|
57
56
|
{t(
|
|
@@ -63,13 +62,14 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
63
62
|
)}
|
|
64
63
|
</>
|
|
65
64
|
}
|
|
65
|
+
hideLabel
|
|
66
66
|
/>
|
|
67
67
|
</>
|
|
68
68
|
) : (
|
|
69
69
|
<>
|
|
70
70
|
{t('Register this MicroShift device to ACM')}
|
|
71
|
-
<
|
|
72
|
-
|
|
71
|
+
<LabelWithHelperText
|
|
72
|
+
label="MicroShift registration"
|
|
73
73
|
content={
|
|
74
74
|
<>
|
|
75
75
|
{t('Select this when the device is running MicroShift and you want to register it to ACM.')}
|
|
@@ -79,6 +79,7 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
79
79
|
)}
|
|
80
80
|
</>
|
|
81
81
|
}
|
|
82
|
+
hideLabel
|
|
82
83
|
/>
|
|
83
84
|
</>
|
|
84
85
|
)
|
|
@@ -88,21 +89,12 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
88
89
|
</FormGroup>
|
|
89
90
|
{isDisabled && (
|
|
90
91
|
<FormGroup>
|
|
91
|
-
<Alert variant="warning" title={t(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
isInline
|
|
98
|
-
href="https://github.com/flightctl/flightctl/blob/main/docs/user/registering-microshift-devices-acm.md#creating-repositories-in-flight-control"
|
|
99
|
-
target="_blank"
|
|
100
|
-
icon={<ExternalLinkAltIcon />}
|
|
101
|
-
iconPosition="end"
|
|
102
|
-
>
|
|
103
|
-
View documentation
|
|
104
|
-
</Button>
|
|
105
|
-
</Trans>
|
|
92
|
+
<Alert variant="warning" title={t('Cannot register MicroShift devices')} isInline>
|
|
93
|
+
{t(`{{ repository }} repository is missing. To re-create the repository`, {
|
|
94
|
+
repository: `'${ACM_REPO_NAME}'`,
|
|
95
|
+
})}
|
|
96
|
+
{', '}
|
|
97
|
+
<LearnMoreLink link={CREATE_ACM_REPOSITORY} text={t('view documentation')} />
|
|
106
98
|
</Alert>
|
|
107
99
|
</FormGroup>
|
|
108
100
|
)}
|
|
@@ -130,17 +122,12 @@ const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
130
122
|
<LearnMoreLink link={USING_TEMPLATE_VARIABLES_LINK} />
|
|
131
123
|
</Alert>
|
|
132
124
|
)}
|
|
133
|
-
<
|
|
134
|
-
label={
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
? t("The target system image for this fleet's devices.")
|
|
140
|
-
: t('The target system image for this device.')
|
|
141
|
-
}
|
|
142
|
-
showLabel
|
|
143
|
-
/>
|
|
125
|
+
<FormGroupWithHelperText
|
|
126
|
+
label={t('System image')}
|
|
127
|
+
content={
|
|
128
|
+
isFleet
|
|
129
|
+
? t("The target system image for this fleet's devices.")
|
|
130
|
+
: t('The target system image for this device.')
|
|
144
131
|
}
|
|
145
132
|
>
|
|
146
133
|
<TextField
|
|
@@ -148,10 +135,10 @@ const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
148
135
|
aria-label={t('System image')}
|
|
149
136
|
value={values.osImage}
|
|
150
137
|
helperText={t(
|
|
151
|
-
'Must be a reference to a bootable container image (
|
|
138
|
+
'Must be a reference to a bootable container image (such as "quay.io/<my-org>/my-rhel-with-fc-agent:<version>"). If you do not want to manage your OS from Edge management, leave this field empty.',
|
|
152
139
|
)}
|
|
153
140
|
/>
|
|
154
|
-
</
|
|
141
|
+
</FormGroupWithHelperText>
|
|
155
142
|
<FormGroup>
|
|
156
143
|
<ConfigurationTemplates />
|
|
157
144
|
</FormGroup>
|
|
@@ -163,7 +150,7 @@ const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
163
150
|
<SystemdUnitsForm />
|
|
164
151
|
</FormGroup>
|
|
165
152
|
)}
|
|
166
|
-
{appType ===
|
|
153
|
+
{appType === FlightCtlApp.OCP && <MicroShiftCheckbox isFleet={isFleet} />}
|
|
167
154
|
</FlightCtlForm>
|
|
168
155
|
</Grid>
|
|
169
156
|
);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert, Checkbox, FormGroup, Grid, Title } from '@patternfly/react-core';
|
|
3
|
+
import { FormikErrors, useFormikContext } from 'formik';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
6
|
+
import UpdateConfirmChangesModal from '../../../Fleet/CreateFleet/steps/UpdateConfirmChangesModal';
|
|
7
|
+
import UpdateStepUpdatePolicy from '../../../Fleet/CreateFleet/steps/UpdateStepUpdatePolicy';
|
|
8
|
+
import { getEmptyUpdateFormParams } from '../../../Fleet/CreateFleet/fleetSpecUtils';
|
|
9
|
+
|
|
10
|
+
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
11
|
+
import { DeviceSpecConfigFormValues } from '../../../../types/deviceSpec';
|
|
12
|
+
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
13
|
+
|
|
14
|
+
export const deviceUpdatePolicyStepId = 'update-policy';
|
|
15
|
+
|
|
16
|
+
export const isUpdatePolicyStepValid = (errors: FormikErrors<DeviceSpecConfigFormValues>) => !errors.updatePolicy;
|
|
17
|
+
|
|
18
|
+
const UpdatePolicyStep = () => {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
values: { updatePolicy },
|
|
23
|
+
setFieldValue,
|
|
24
|
+
setFieldTouched,
|
|
25
|
+
} = useFormikContext<DeviceSpecConfigFormValues>();
|
|
26
|
+
|
|
27
|
+
const [alertSwitchToBasic, setAlertSwitchToBasic] = React.useState<boolean>();
|
|
28
|
+
const hasAdvancedMode = updatePolicy.isAdvanced;
|
|
29
|
+
|
|
30
|
+
const onChangeUpdatePolicy = async (toAdvanced: boolean) => {
|
|
31
|
+
if (toAdvanced) {
|
|
32
|
+
await setFieldTouched('updatePolicy', true);
|
|
33
|
+
} else {
|
|
34
|
+
await setFieldValue('updatePolicy', getEmptyUpdateFormParams(), true);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const onAdvancedEnableChange = (toAdvanced: boolean) => {
|
|
39
|
+
if (toAdvanced) {
|
|
40
|
+
setFieldValue('updatePolicy.isAdvanced', true);
|
|
41
|
+
onChangeUpdatePolicy(true);
|
|
42
|
+
} else {
|
|
43
|
+
setAlertSwitchToBasic(true);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const onModalClose = (doSwitch: boolean) => {
|
|
48
|
+
setAlertSwitchToBasic(false);
|
|
49
|
+
if (doSwitch) {
|
|
50
|
+
onChangeUpdatePolicy(false);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Grid lg={8}>
|
|
56
|
+
<FlightCtlForm>
|
|
57
|
+
<FormGroup>
|
|
58
|
+
<Checkbox
|
|
59
|
+
label={t('Use basic configurations')}
|
|
60
|
+
isChecked={!hasAdvancedMode}
|
|
61
|
+
id="basic-update-configuration"
|
|
62
|
+
onChange={(_ev: React.FormEvent<HTMLInputElement>, toBasic: boolean) => {
|
|
63
|
+
onAdvancedEnableChange(!toBasic);
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
</FormGroup>
|
|
67
|
+
{hasAdvancedMode ? (
|
|
68
|
+
<>
|
|
69
|
+
<Title headingLevel="h3">{t('Advanced configurations')}</Title>
|
|
70
|
+
<FormGroupWithHelperText
|
|
71
|
+
label={t('Update policies')}
|
|
72
|
+
content={t('Update policies allow you to control when updates should be downloaded and applied.')}
|
|
73
|
+
>
|
|
74
|
+
<UpdateStepUpdatePolicy />
|
|
75
|
+
</FormGroupWithHelperText>
|
|
76
|
+
</>
|
|
77
|
+
) : (
|
|
78
|
+
<Alert isInline variant="info" title={t('Default update policy')}>
|
|
79
|
+
{t('The device will download and apply updates as soon as they are available.')}
|
|
80
|
+
</Alert>
|
|
81
|
+
)}
|
|
82
|
+
{alertSwitchToBasic && <UpdateConfirmChangesModal setting="update-policies" onClose={onModalClose} />}
|
|
83
|
+
</FlightCtlForm>
|
|
84
|
+
</Grid>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default UpdatePolicyStep;
|
|
@@ -9,7 +9,7 @@ import LabelsField from '../../../form/LabelsField';
|
|
|
9
9
|
import RichValidationTextField from '../../../form/RichValidationTextField';
|
|
10
10
|
import { getLabelValueValidations } from '../../../form/validations';
|
|
11
11
|
import DeviceLabelMatch from '../../../modals/ApproveDeviceModal/DeviceLabelMatch';
|
|
12
|
-
import { EditDeviceFormValues } from '
|
|
12
|
+
import { EditDeviceFormValues } from '../../../../types/deviceSpec';
|
|
13
13
|
|
|
14
14
|
export const generalInfoStepId = 'general-info';
|
|
15
15
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Stack, StackItem } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
|
-
import { ApplicationFormSpec } from '../types';
|
|
5
4
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
5
|
+
import { AppForm, getAppIdentifier, isInlineAppForm } from '../../../../types/deviceSpec';
|
|
6
6
|
|
|
7
|
-
const ReviewApplications = ({ apps }: { apps:
|
|
7
|
+
const ReviewApplications = ({ apps }: { apps: AppForm[] }) => {
|
|
8
8
|
const { t } = useTranslation();
|
|
9
9
|
if (apps.length === 0) {
|
|
10
10
|
return '-';
|
|
@@ -12,22 +12,21 @@ const ReviewApplications = ({ apps }: { apps: ApplicationFormSpec[] }) => {
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<Stack hasGutter>
|
|
15
|
-
{apps.map((app, index) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
))}
|
|
15
|
+
{apps.map((app, index) => {
|
|
16
|
+
const isInlineApp = isInlineAppForm(app);
|
|
17
|
+
const type = isInlineApp ? t('Inline') : t('Image based');
|
|
18
|
+
let name: string = '';
|
|
19
|
+
if (isInlineApp || app.name) {
|
|
20
|
+
name = app.name as string;
|
|
21
|
+
} else if (app.image) {
|
|
22
|
+
name = `${t('Unnamed')} (${app.image})`;
|
|
23
|
+
}
|
|
24
|
+
return (
|
|
25
|
+
<StackItem key={`${getAppIdentifier(app)}_${index}`}>
|
|
26
|
+
{name} ({type})
|
|
27
|
+
</StackItem>
|
|
28
|
+
);
|
|
29
|
+
})}
|
|
31
30
|
</Stack>
|
|
32
31
|
);
|
|
33
32
|
};
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
StackItem,
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
11
|
|
|
12
|
-
import { EditDeviceFormValues } from '
|
|
12
|
+
import { EditDeviceFormValues } from '../../../../types/deviceSpec';
|
|
13
13
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
14
14
|
import LabelsView from '../../../common/LabelsView';
|
|
15
15
|
import { toAPILabel } from '../../../../utils/labels';
|
|
16
16
|
import { getErrorMessage } from '../../../../utils/error';
|
|
17
17
|
import FlightControlDescriptionList from '../../../common/FlightCtlDescriptionList';
|
|
18
18
|
import RepositorySourceList from '../../../Repository/RepositoryDetails/RepositorySourceList';
|
|
19
|
-
import {
|
|
19
|
+
import { getApiConfig } from '../deviceSpecUtils';
|
|
20
20
|
import ReviewApplications from './ReviewApplications';
|
|
21
21
|
|
|
22
22
|
export const reviewDeviceStepId = 'review-device';
|
|
@@ -63,7 +63,7 @@ const ReviewStep = ({ error }: { error?: string }) => {
|
|
|
63
63
|
<DescriptionListGroup>
|
|
64
64
|
<DescriptionListTerm>{t('Configurations')}</DescriptionListTerm>
|
|
65
65
|
<DescriptionListDescription>
|
|
66
|
-
<RepositorySourceList configs={values.configTemplates.map(
|
|
66
|
+
<RepositorySourceList configs={values.configTemplates.map(getApiConfig)} />
|
|
67
67
|
</DescriptionListDescription>
|
|
68
68
|
</DescriptionListGroup>
|
|
69
69
|
)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Label, LabelGroup } from '@patternfly/react-core';
|
|
3
|
-
import {
|
|
3
|
+
import { SystemdUnitsFormValues } from '../../SystemdUnitsModal/TrackSystemdUnitsForm';
|
|
4
4
|
|
|
5
|
-
const ReviewTrackedSystemdServices = ({ systemdUnits }:
|
|
5
|
+
const ReviewTrackedSystemdServices = ({ systemdUnits }: SystemdUnitsFormValues) => {
|
|
6
6
|
if (systemdUnits.length === 0) {
|
|
7
7
|
return '-';
|
|
8
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Stack, StackItem } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
|
-
import { DisruptionBudgetForm, RolloutPolicyForm } from '
|
|
4
|
+
import { DisruptionBudgetForm, RolloutPolicyForm } from '../../../../types/deviceSpec';
|
|
5
|
+
|
|
5
6
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
6
7
|
import LabelsView from '../../../common/LabelsView';
|
|
7
8
|
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Label, LabelGroup } from '@patternfly/react-core';
|
|
3
3
|
import { useFormikContext } from 'formik';
|
|
4
4
|
|
|
5
|
-
import { DeviceSpecConfigFormValues } from '
|
|
5
|
+
import { DeviceSpecConfigFormValues } from '../../../../types/deviceSpec';
|
|
6
6
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
7
7
|
|
|
8
8
|
import ErrorHelperText from '../../../form/FieldHelperText';
|
|
@@ -7,15 +7,17 @@ import {
|
|
|
7
7
|
validKubernetesLabelValue,
|
|
8
8
|
validLabelsSchema,
|
|
9
9
|
validOsImage,
|
|
10
|
+
validUpdatePolicySchema,
|
|
10
11
|
} from '../../form/validations';
|
|
11
|
-
import { appendJSONPatch,
|
|
12
|
+
import { appendJSONPatch, getDeviceLabelPatches, getUpdatePolicyPatches } from '../../../utils/patch';
|
|
12
13
|
import { Device, PatchRequest } from '@flightctl/types';
|
|
13
|
-
import { EditDeviceFormValues } from '
|
|
14
|
+
import { EditDeviceFormValues, UpdatePolicyForm } from './../../../types/deviceSpec';
|
|
14
15
|
import {
|
|
15
16
|
ACMCrdConfig,
|
|
16
17
|
ACMImportConfig,
|
|
17
18
|
MicroshiftRegistrationHook,
|
|
18
|
-
|
|
19
|
+
getApiConfig,
|
|
20
|
+
getApplicationPatches,
|
|
19
21
|
getDeviceSpecConfigPatches,
|
|
20
22
|
} from './deviceSpecUtils';
|
|
21
23
|
|
|
@@ -27,6 +29,7 @@ export const getValidationSchema = (t: TFunction) =>
|
|
|
27
29
|
labels: validLabelsSchema(t),
|
|
28
30
|
configTemplates: validConfigTemplatesSchema(t),
|
|
29
31
|
applications: validApplicationsSchema(t),
|
|
32
|
+
updatePolicy: validUpdatePolicySchema(t),
|
|
30
33
|
}),
|
|
31
34
|
);
|
|
32
35
|
|
|
@@ -37,11 +40,7 @@ export const getDevicePatches = (currentDevice: Device, updatedDevice: EditDevic
|
|
|
37
40
|
const currentLabels = currentDevice.metadata.labels || {};
|
|
38
41
|
const updatedLabels = [...updatedDevice.labels];
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
updatedLabels.push({ key: 'alias', value: updatedDevice.deviceAlias });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const deviceLabelPatches = getLabelPatches('/metadata/labels', currentLabels, updatedLabels);
|
|
43
|
+
const deviceLabelPatches = getDeviceLabelPatches(currentLabels, updatedLabels, updatedDevice.deviceAlias);
|
|
45
44
|
allPatches = allPatches.concat(deviceLabelPatches);
|
|
46
45
|
|
|
47
46
|
if (updatedDevice.fleetMatch) {
|
|
@@ -74,7 +73,7 @@ export const getDevicePatches = (currentDevice: Device, updatedDevice: EditDevic
|
|
|
74
73
|
|
|
75
74
|
// Configurations
|
|
76
75
|
const currentConfigs = currentDevice.spec?.config || [];
|
|
77
|
-
const newConfigs = updatedDevice.configTemplates.map(
|
|
76
|
+
const newConfigs = updatedDevice.configTemplates.map(getApiConfig);
|
|
78
77
|
if (updatedDevice.registerMicroShift) {
|
|
79
78
|
newConfigs.push(ACMCrdConfig, ACMImportConfig, MicroshiftRegistrationHook);
|
|
80
79
|
}
|
|
@@ -85,5 +84,13 @@ export const getDevicePatches = (currentDevice: Device, updatedDevice: EditDevic
|
|
|
85
84
|
const appPatches = getApplicationPatches('/spec', currentDevice.spec?.applications || [], updatedDevice.applications);
|
|
86
85
|
allPatches = allPatches.concat(appPatches);
|
|
87
86
|
|
|
87
|
+
// Updates
|
|
88
|
+
const updatesPatches = getUpdatePolicyPatches(
|
|
89
|
+
'/spec/updatePolicy',
|
|
90
|
+
currentDevice.spec?.updatePolicy,
|
|
91
|
+
updatedDevice.updatePolicy as Required<UpdatePolicyForm>,
|
|
92
|
+
);
|
|
93
|
+
allPatches = allPatches.concat(updatesPatches);
|
|
94
|
+
|
|
88
95
|
return allPatches;
|
|
89
96
|
};
|
|
@@ -8,7 +8,7 @@ import { useTranslation } from '../../../hooks/useTranslation';
|
|
|
8
8
|
import { getErrorMessage } from '../../../utils/error';
|
|
9
9
|
import { getStringListPatches } from '../../../utils/patch';
|
|
10
10
|
import { deviceSystemdUnitsValidationSchema } from '../../form/validations';
|
|
11
|
-
import TrackSystemdUnitsForm, {
|
|
11
|
+
import TrackSystemdUnitsForm, { SystemdUnitsFormValues } from './TrackSystemdUnitsForm';
|
|
12
12
|
|
|
13
13
|
type SystemdUnitsModalProps = {
|
|
14
14
|
onClose: (hasChanges?: boolean, addedSystemdUnits?: string[]) => void;
|
|
@@ -27,11 +27,12 @@ const SystemdUnitsModal: React.FC<SystemdUnitsModalProps> = ({ onClose, device }
|
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const { patch } = useFetch();
|
|
29
29
|
const [error, setError] = React.useState<string>();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
const currentSystemdUnits: SystemdUnitsFormValues['systemdUnits'] = (device.spec?.systemd?.matchPatterns || []).map(
|
|
31
|
+
(p) => ({
|
|
32
|
+
pattern: p,
|
|
33
|
+
exists: true,
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
38
|
<Modal title={t('Track systemd services')} isOpen onClose={() => onClose()} variant="small">
|
|
@@ -6,11 +6,7 @@ import { useTranslation } from '../../../hooks/useTranslation';
|
|
|
6
6
|
import ErrorHelperText from '../../form/FieldHelperText';
|
|
7
7
|
import FlightCtlActionGroup from '../../form/FlightCtlActionGroup';
|
|
8
8
|
import FlightCtlForm from '../../form/FlightCtlForm';
|
|
9
|
-
|
|
10
|
-
export type SystemdUnitFormValue = {
|
|
11
|
-
pattern: string;
|
|
12
|
-
exists: boolean;
|
|
13
|
-
};
|
|
9
|
+
import { SystemdUnitFormValue } from '../../../types/deviceSpec';
|
|
14
10
|
|
|
15
11
|
export type SystemdUnitsFormValues = {
|
|
16
12
|
systemdUnits: SystemdUnitFormValue[];
|