@flightctl/ui-components 0.7.2 → 0.8.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/DetailsPageActions.d.ts +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.js +1 -1
- package/dist/src/components/DetailsPage/DetailsPageActions.js.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js +18 -14
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +10 -11
- 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 +31 -10
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +2 -2
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +2 -2
- 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 +4 -2
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +30 -5
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +2 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js +6 -5
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +3 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js +13 -9
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts +3 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +20 -17
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts +2 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +18 -14
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts +2 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js +20 -15
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts +3 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +34 -20
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +2 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +14 -15
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts +3 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js +6 -36
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.d.ts +4 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.js +19 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +2 -16
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.js +3 -3
- 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 +28 -26
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +11 -16
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/Events/EventItem.d.ts +7 -0
- package/dist/src/components/Events/EventItem.d.ts.map +1 -0
- package/dist/src/components/Events/EventItem.js +25 -0
- package/dist/src/components/Events/EventItem.js.map +1 -0
- package/dist/src/components/Events/EventsCard.css +5 -0
- package/dist/src/components/Events/EventsCard.d.ts +11 -0
- package/dist/src/components/Events/EventsCard.d.ts.map +1 -0
- package/dist/src/components/Events/EventsCard.js +81 -0
- package/dist/src/components/Events/EventsCard.js.map +1 -0
- package/dist/src/components/Events/useEvents.d.ts +21 -0
- package/dist/src/components/Events/useEvents.d.ts.map +1 -0
- package/dist/src/components/Events/useEvents.js +105 -0
- package/dist/src/components/Events/useEvents.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +27 -9
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts +2 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js +13 -2
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts +3 -33
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js +7 -21
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts +4 -2
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +10 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +5 -3
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js +4 -4
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +10 -9
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts +3 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js +8 -86
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.d.ts +3 -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 +3 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js +16 -13
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts +3 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js +20 -20
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js.map +1 -1
- 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 +37 -23
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts.map +1 -1
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.js +20 -16
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js +8 -5
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/{FleetDetails.d.ts → FleetDetailsPage.d.ts} +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/{FleetDetails.js → FleetDetailsPage.js} +23 -17
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.js.map +1 -0
- package/dist/src/components/Fleet/FleetRow.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetRow.js +9 -12
- package/dist/src/components/Fleet/FleetRow.js.map +1 -1
- package/dist/src/components/Masthead/UserPreferencesModal.d.ts.map +1 -1
- package/dist/src/components/Masthead/UserPreferencesModal.js +14 -15
- package/dist/src/components/Masthead/UserPreferencesModal.js.map +1 -1
- package/dist/src/components/Masthead/UserPreferencesProvider.d.ts +8 -5
- package/dist/src/components/Masthead/UserPreferencesProvider.d.ts.map +1 -1
- package/dist/src/components/Masthead/UserPreferencesProvider.js +7 -5
- package/dist/src/components/Masthead/UserPreferencesProvider.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +11 -7
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.js +2 -3
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js +25 -24
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +22 -8
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +18 -15
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/common/CodeEditor/CodeEditorTheme.d.ts +5 -0
- package/dist/src/components/common/CodeEditor/CodeEditorTheme.d.ts.map +1 -0
- package/dist/src/components/common/CodeEditor/CodeEditorTheme.js +52 -0
- package/dist/src/components/common/CodeEditor/CodeEditorTheme.js.map +1 -0
- package/dist/src/components/common/CodeEditor/Shortcut.css +22 -0
- package/dist/src/components/common/CodeEditor/Shortcut.d.ts +20 -0
- package/dist/src/components/common/CodeEditor/Shortcut.d.ts.map +1 -0
- package/dist/src/components/common/CodeEditor/Shortcut.js +46 -0
- package/dist/src/components/common/CodeEditor/Shortcut.js.map +1 -0
- package/dist/src/components/common/CodeEditor/YamlEditor.css +12 -0
- package/dist/src/components/common/CodeEditor/YamlEditor.d.ts +16 -0
- package/dist/src/components/common/CodeEditor/YamlEditor.d.ts.map +1 -0
- package/dist/src/components/common/CodeEditor/YamlEditor.js +48 -0
- package/dist/src/components/common/CodeEditor/YamlEditor.js.map +1 -0
- package/dist/src/components/common/CodeEditor/YamlEditorBase.css +3 -0
- package/dist/src/components/common/CodeEditor/YamlEditorBase.d.ts +11 -0
- package/dist/src/components/common/CodeEditor/YamlEditorBase.d.ts.map +1 -0
- package/dist/src/components/common/CodeEditor/YamlEditorBase.js +75 -0
- package/dist/src/components/common/CodeEditor/YamlEditorBase.js.map +1 -0
- package/dist/src/components/common/CodeEditor/useShortcutPopover.d.ts +3 -0
- package/dist/src/components/common/CodeEditor/useShortcutPopover.d.ts.map +1 -0
- package/dist/src/components/common/CodeEditor/useShortcutPopover.js +26 -0
- package/dist/src/components/common/CodeEditor/useShortcutPopover.js.map +1 -0
- package/dist/src/components/common/LabelsView.d.ts +1 -3
- package/dist/src/components/common/LabelsView.d.ts.map +1 -1
- package/dist/src/components/common/LabelsView.js +2 -4
- package/dist/src/components/common/LabelsView.js.map +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.d.ts.map +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js +8 -7
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/TechPreviewBadge.d.ts.map +1 -1
- package/dist/src/components/common/TechPreviewBadge.js +3 -2
- package/dist/src/components/common/TechPreviewBadge.js.map +1 -1
- package/dist/src/components/form/FlightCtlActionGroup.d.ts +1 -1
- package/dist/src/components/form/FlightCtlActionGroup.d.ts.map +1 -1
- package/dist/src/components/form/FlightCtlActionGroup.js.map +1 -1
- package/dist/src/components/form/FormSelect.d.ts +4 -2
- package/dist/src/components/form/FormSelect.d.ts.map +1 -1
- package/dist/src/components/form/FormSelect.js +12 -1
- package/dist/src/components/form/FormSelect.js.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.d.ts +4 -3
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.js +18 -1
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -1
- package/dist/src/components/form/LabelsField.d.ts +4 -3
- package/dist/src/components/form/LabelsField.d.ts.map +1 -1
- package/dist/src/components/form/LabelsField.js +15 -5
- package/dist/src/components/form/LabelsField.js.map +1 -1
- package/dist/src/components/form/NameField.d.ts +2 -2
- package/dist/src/components/form/NameField.d.ts.map +1 -1
- package/dist/src/components/form/NameField.js +14 -4
- package/dist/src/components/form/NameField.js.map +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts +2 -2
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -1
- package/dist/src/components/form/RichValidationTextField.js +13 -1
- package/dist/src/components/form/RichValidationTextField.js.map +1 -1
- package/dist/src/components/form/TextListField.d.ts +4 -2
- package/dist/src/components/form/TextListField.d.ts.map +1 -1
- package/dist/src/components/form/TextListField.js +13 -3
- package/dist/src/components/form/TextListField.js.map +1 -1
- package/dist/src/components/form/UploadField.d.ts +3 -2
- package/dist/src/components/form/UploadField.d.ts.map +1 -1
- package/dist/src/components/form/UploadField.js +10 -1
- package/dist/src/components/form/UploadField.js.map +1 -1
- package/dist/src/components/form/validations.d.ts +1 -2
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +1 -4
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +4 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts.map +1 -1
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.js +5 -3
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.js.map +1 -1
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.d.ts.map +1 -1
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.js +32 -29
- package/dist/src/components/modals/DecommissionModal/DecommissionModal.js.map +1 -1
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts.map +1 -1
- package/dist/src/components/modals/DeleteModal/DeleteModal.js +18 -15
- package/dist/src/components/modals/DeleteModal/DeleteModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js +33 -30
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js +27 -24
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js +26 -23
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +30 -25
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +29 -26
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts +1 -1
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.js +28 -25
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.js.map +1 -1
- package/dist/src/constants.d.ts +2 -1
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +3 -1
- package/dist/src/constants.js.map +1 -1
- package/dist/src/hooks/useAppLinks.d.ts +5 -0
- package/dist/src/hooks/useAppLinks.d.ts.map +1 -0
- package/dist/src/hooks/useAppLinks.js +45 -0
- package/dist/src/hooks/useAppLinks.js.map +1 -0
- package/dist/src/{components/EnrollmentRequest/EnrollmentRequestDetails/useEnrollmentRequestSystemInfo.d.ts → hooks/useDeviceSpecSystemInfo.d.ts} +2 -2
- package/dist/src/hooks/useDeviceSpecSystemInfo.d.ts.map +1 -0
- package/dist/src/{components/EnrollmentRequest/EnrollmentRequestDetails/useEnrollmentRequestSystemInfo.js → hooks/useDeviceSpecSystemInfo.js} +18 -10
- package/dist/src/hooks/useDeviceSpecSystemInfo.js.map +1 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts +2 -2
- package/dist/src/hooks/useFetchPeriodically.d.ts.map +1 -1
- package/dist/src/hooks/useFetchPeriodically.js +1 -1
- package/dist/src/hooks/useFetchPeriodically.js.map +1 -1
- package/dist/src/hooks/useThemePreferences.d.ts +6 -3
- package/dist/src/hooks/useThemePreferences.d.ts.map +1 -1
- package/dist/src/hooks/useThemePreferences.js +46 -23
- package/dist/src/hooks/useThemePreferences.js.map +1 -1
- package/dist/src/types/deviceSpec.d.ts +7 -2
- package/dist/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/src/types/deviceSpec.js +16 -12
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +3 -2
- package/dist/src/types/extraTypes.d.ts.map +1 -1
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/utils/dates.d.ts +2 -1
- package/dist/src/utils/dates.d.ts.map +1 -1
- package/dist/src/utils/dates.js +20 -20
- package/dist/src/utils/dates.js.map +1 -1
- package/dist/src/utils/patch.d.ts.map +1 -1
- package/dist/src/utils/patch.js +2 -1
- package/dist/src/utils/patch.js.map +1 -1
- package/package.json +6 -2
- package/src/components/DetailsPage/DetailsPageActions.tsx +2 -1
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +27 -22
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +10 -19
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +65 -21
- package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +2 -2
- package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +2 -2
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +6 -1
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +29 -5
- package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +19 -5
- package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +53 -23
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +68 -53
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +40 -25
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +38 -17
- package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +81 -38
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +15 -19
- package/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.tsx +7 -47
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.tsx +2 -2
- package/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +30 -2
- package/src/components/Device/EditDeviceWizard/utils.ts +6 -7
- package/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.tsx +38 -35
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +8 -19
- package/src/components/Events/EventItem.tsx +38 -0
- package/src/components/Events/EventsCard.css +5 -0
- package/src/components/Events/EventsCard.tsx +157 -0
- package/src/components/Events/useEvents.ts +136 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +29 -13
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +25 -10
- package/src/components/Fleet/CreateFleet/fleetSpecUtils.ts +9 -23
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +12 -1
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +10 -5
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +20 -17
- package/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.tsx +18 -122
- package/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx +4 -1
- package/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx +50 -31
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx +57 -12
- package/src/components/Fleet/CreateFleet/utils.ts +40 -22
- package/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx +28 -28
- package/src/components/Fleet/FleetDetails/FleetDetailsContent.tsx +10 -9
- package/src/components/Fleet/FleetDetails/{FleetDetails.tsx → FleetDetailsPage.tsx} +40 -25
- package/src/components/Fleet/FleetRow.tsx +10 -11
- package/src/components/Masthead/UserPreferencesModal.tsx +43 -56
- package/src/components/Masthead/UserPreferencesProvider.tsx +15 -10
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +14 -15
- package/src/components/Repository/CreateRepository/utils.ts +2 -3
- package/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.tsx +54 -55
- package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +47 -14
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +28 -25
- package/src/components/common/CodeEditor/CodeEditorTheme.ts +53 -0
- package/src/components/common/CodeEditor/Shortcut.css +22 -0
- package/src/components/common/CodeEditor/Shortcut.tsx +90 -0
- package/src/components/common/CodeEditor/YamlEditor.css +12 -0
- package/src/components/common/CodeEditor/YamlEditor.tsx +81 -0
- package/src/components/common/CodeEditor/YamlEditorBase.css +3 -0
- package/src/components/common/CodeEditor/YamlEditorBase.tsx +124 -0
- package/src/components/common/CodeEditor/useShortcutPopover.tsx +39 -0
- package/src/components/common/LabelsView.tsx +2 -11
- package/src/components/common/LeaveFormConfirmation.tsx +14 -18
- package/src/components/common/TechPreviewBadge.tsx +3 -1
- package/src/components/form/FlightCtlActionGroup.tsx +1 -1
- package/src/components/form/FormSelect.tsx +14 -3
- package/src/components/form/FormSelectTypeahead.tsx +24 -3
- package/src/components/form/LabelsField.tsx +20 -20
- package/src/components/form/NameField.tsx +18 -4
- package/src/components/form/RichValidationTextField.tsx +20 -1
- package/src/components/form/TextListField.tsx +19 -3
- package/src/components/form/UploadField.tsx +16 -2
- package/src/components/form/validations.ts +1 -4
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +12 -7
- package/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsx +6 -3
- package/src/components/modals/DecommissionModal/DecommissionModal.tsx +60 -56
- package/src/components/modals/DeleteModal/DeleteModal.tsx +25 -27
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.tsx +81 -92
- package/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.tsx +64 -67
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +60 -62
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +80 -87
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +70 -73
- package/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.tsx +62 -63
- package/src/constants.ts +2 -1
- package/src/hooks/useAppLinks.ts +49 -0
- package/src/{components/EnrollmentRequest/EnrollmentRequestDetails/useEnrollmentRequestSystemInfo.tsx → hooks/useDeviceSpecSystemInfo.tsx} +15 -7
- package/src/hooks/useFetchPeriodically.ts +3 -3
- package/src/hooks/useThemePreferences.ts +48 -21
- package/src/types/deviceSpec.ts +25 -13
- package/src/types/extraTypes.ts +7 -4
- package/src/utils/dates.ts +23 -24
- package/src/utils/patch.ts +3 -1
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.css +0 -3
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts +0 -9
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts.map +0 -1
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.js +0 -34
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.js.map +0 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/useEnrollmentRequestSystemInfo.d.ts.map +0 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/useEnrollmentRequestSystemInfo.js.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts +0 -9
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js +0 -61
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.js.map +0 -1
- package/dist/src/components/common/LabelsView.css +0 -9
- package/dist/src/links.d.ts +0 -7
- package/dist/src/links.d.ts.map +0 -1
- package/dist/src/links.js +0 -14
- package/dist/src/links.js.map +0 -1
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.css +0 -3
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.tsx +0 -60
- package/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.tsx +0 -96
- package/src/components/common/LabelsView.css +0 -9
- package/src/links.ts +0 -16
|
@@ -18,6 +18,7 @@ type ConfigWithRepositoryTemplateFormProps = {
|
|
|
18
18
|
index: number;
|
|
19
19
|
repositories: Repository[];
|
|
20
20
|
repoRefetch: VoidFunction;
|
|
21
|
+
isReadOnly?: boolean;
|
|
21
22
|
canCreateRepo: boolean;
|
|
22
23
|
};
|
|
23
24
|
|
|
@@ -53,7 +54,15 @@ const getRepositoryItems = (
|
|
|
53
54
|
return repositoryItems;
|
|
54
55
|
};
|
|
55
56
|
|
|
56
|
-
const GitConfigForm = ({
|
|
57
|
+
const GitConfigForm = ({
|
|
58
|
+
template,
|
|
59
|
+
index,
|
|
60
|
+
isReadOnly,
|
|
61
|
+
}: {
|
|
62
|
+
template: GitConfigTemplate;
|
|
63
|
+
index: number;
|
|
64
|
+
isReadOnly?: boolean;
|
|
65
|
+
}) => {
|
|
57
66
|
const { t } = useTranslation();
|
|
58
67
|
|
|
59
68
|
return (
|
|
@@ -63,6 +72,7 @@ const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index
|
|
|
63
72
|
aria-label={t('Branch/tag/commit')}
|
|
64
73
|
name={`configTemplates[${index}].targetRevision`}
|
|
65
74
|
value={template.targetRevision}
|
|
75
|
+
isDisabled={isReadOnly}
|
|
66
76
|
/>
|
|
67
77
|
</FormGroup>
|
|
68
78
|
<FormGroupWithHelperText
|
|
@@ -75,18 +85,7 @@ const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index
|
|
|
75
85
|
name={`configTemplates[${index}].path`}
|
|
76
86
|
value={template.path}
|
|
77
87
|
placeholder={t('/absolute/path')}
|
|
78
|
-
|
|
79
|
-
</FormGroupWithHelperText>
|
|
80
|
-
<FormGroupWithHelperText
|
|
81
|
-
label={t('Mount path')}
|
|
82
|
-
content={t('Path in the device where the configurations will be stored.')}
|
|
83
|
-
isRequired
|
|
84
|
-
>
|
|
85
|
-
<TextField
|
|
86
|
-
aria-label={t('Mount path')}
|
|
87
|
-
name={`configTemplates[${index}].mountPath`}
|
|
88
|
-
value={template.mountPath}
|
|
89
|
-
placeholder={t('/absolute/path')}
|
|
88
|
+
isDisabled={isReadOnly}
|
|
90
89
|
/>
|
|
91
90
|
</FormGroupWithHelperText>
|
|
92
91
|
</>
|
|
@@ -97,10 +96,12 @@ const HttpConfigForm = ({
|
|
|
97
96
|
template,
|
|
98
97
|
baseURL,
|
|
99
98
|
index,
|
|
99
|
+
isReadOnly,
|
|
100
100
|
}: {
|
|
101
101
|
template: HttpConfigTemplate;
|
|
102
102
|
index: number;
|
|
103
103
|
baseURL?: string;
|
|
104
|
+
isReadOnly?: boolean;
|
|
104
105
|
}) => {
|
|
105
106
|
const { t } = useTranslation();
|
|
106
107
|
|
|
@@ -129,6 +130,7 @@ const HttpConfigForm = ({
|
|
|
129
130
|
name={`configTemplates[${index}].suffix`}
|
|
130
131
|
value={template.suffix || ''}
|
|
131
132
|
helperText={suffixHelperText}
|
|
133
|
+
isDisabled={isReadOnly}
|
|
132
134
|
/>
|
|
133
135
|
</FormGroupWithHelperText>
|
|
134
136
|
<FormGroupWithHelperText
|
|
@@ -141,6 +143,7 @@ const HttpConfigForm = ({
|
|
|
141
143
|
name={`configTemplates[${index}].filePath`}
|
|
142
144
|
value={template.filePath || ''}
|
|
143
145
|
placeholder={t('/absolute/path')}
|
|
146
|
+
isDisabled={isReadOnly}
|
|
144
147
|
/>
|
|
145
148
|
</FormGroupWithHelperText>
|
|
146
149
|
</>
|
|
@@ -152,6 +155,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
152
155
|
index,
|
|
153
156
|
repositories,
|
|
154
157
|
repoRefetch,
|
|
158
|
+
isReadOnly,
|
|
155
159
|
canCreateRepo,
|
|
156
160
|
}: ConfigWithRepositoryTemplateFormProps) => {
|
|
157
161
|
const { t } = useTranslation();
|
|
@@ -159,9 +163,17 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
159
163
|
const [createRepoModalOpen, setCreateRepoModalOpen] = React.useState(false);
|
|
160
164
|
|
|
161
165
|
const ct = values.configTemplates[index] as HttpConfigTemplate | GitConfigTemplate;
|
|
162
|
-
const selectedRepoName = ct
|
|
166
|
+
const selectedRepoName = ct.repository;
|
|
167
|
+
|
|
168
|
+
const repositoryItems = isReadOnly
|
|
169
|
+
? {
|
|
170
|
+
[selectedRepoName]: {
|
|
171
|
+
label: selectedRepoName,
|
|
172
|
+
description: '',
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
: getRepositoryItems(t, repositories, repoType, selectedRepoName);
|
|
163
176
|
|
|
164
|
-
const repositoryItems = getRepositoryItems(t, repositories, repoType, selectedRepoName);
|
|
165
177
|
const selectedRepo = repositories.find((repo) => repo.metadata.name === selectedRepoName);
|
|
166
178
|
return (
|
|
167
179
|
<>
|
|
@@ -171,6 +183,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
171
183
|
items={repositoryItems}
|
|
172
184
|
withStatusIcon
|
|
173
185
|
placeholderText={t('Select a repository')}
|
|
186
|
+
isDisabled={isReadOnly}
|
|
174
187
|
>
|
|
175
188
|
{canCreateRepo && (
|
|
176
189
|
<MenuFooter>
|
|
@@ -181,6 +194,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
181
194
|
onClick={() => {
|
|
182
195
|
setCreateRepoModalOpen(true);
|
|
183
196
|
}}
|
|
197
|
+
isDisabled={isReadOnly}
|
|
184
198
|
>
|
|
185
199
|
{t('Create repository')}
|
|
186
200
|
</Button>
|
|
@@ -188,9 +202,16 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
188
202
|
)}
|
|
189
203
|
</FormSelect>
|
|
190
204
|
</FormGroup>
|
|
191
|
-
{repoType === RepoSpecType.GIT &&
|
|
205
|
+
{repoType === RepoSpecType.GIT && (
|
|
206
|
+
<GitConfigForm template={ct as GitConfigTemplate} index={index} isReadOnly={isReadOnly} />
|
|
207
|
+
)}
|
|
192
208
|
{repoType === RepoSpecType.HTTP && (
|
|
193
|
-
<HttpConfigForm
|
|
209
|
+
<HttpConfigForm
|
|
210
|
+
template={ct as HttpConfigTemplate}
|
|
211
|
+
index={index}
|
|
212
|
+
baseURL={selectedRepo?.spec.url}
|
|
213
|
+
isReadOnly={isReadOnly}
|
|
214
|
+
/>
|
|
194
215
|
)}
|
|
195
216
|
{createRepoModalOpen && (
|
|
196
217
|
<CreateRepositoryModal
|
|
@@ -47,12 +47,14 @@ type ConfigSectionProps = {
|
|
|
47
47
|
repoRefetch: VoidFunction;
|
|
48
48
|
canCreateRepo: boolean;
|
|
49
49
|
canListRepo: boolean;
|
|
50
|
+
isReadOnly?: boolean;
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
const ConfigSection = ({
|
|
53
54
|
index,
|
|
54
55
|
repositories,
|
|
55
56
|
repoRefetch,
|
|
57
|
+
isReadOnly,
|
|
56
58
|
canCreateRepo,
|
|
57
59
|
canListRepo,
|
|
58
60
|
}: ConfigSectionProps & { index: number }) => {
|
|
@@ -67,20 +69,33 @@ const ConfigSection = ({
|
|
|
67
69
|
useValidateOnMount();
|
|
68
70
|
|
|
69
71
|
const items = React.useMemo(() => {
|
|
70
|
-
const
|
|
72
|
+
const allOptions = {
|
|
71
73
|
[ConfigType.INLINE]: { label: t('Inline configuration') },
|
|
74
|
+
[ConfigType.GIT]: { label: t('Git configuration') },
|
|
75
|
+
[ConfigType.HTTP]: { label: t('Http configuration') },
|
|
76
|
+
[ConfigType.K8S_SECRET]: { label: t('Kubernetes secret') },
|
|
77
|
+
};
|
|
78
|
+
if (isReadOnly) {
|
|
79
|
+
return {
|
|
80
|
+
[type]: allOptions[type],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const options = {
|
|
85
|
+
[ConfigType.INLINE]: allOptions[ConfigType.INLINE],
|
|
72
86
|
};
|
|
73
87
|
if (canListRepo && (canCreateRepo || repositories.length > 0)) {
|
|
74
|
-
options[ConfigType.GIT] =
|
|
75
|
-
options[ConfigType.HTTP] =
|
|
88
|
+
options[ConfigType.GIT] = allOptions[ConfigType.GIT];
|
|
89
|
+
options[ConfigType.HTTP] = allOptions[ConfigType.HTTP];
|
|
76
90
|
}
|
|
77
91
|
if (type === ConfigType.K8S_SECRET) {
|
|
78
|
-
options[ConfigType.K8S_SECRET] =
|
|
92
|
+
options[ConfigType.K8S_SECRET] = allOptions[ConfigType.K8S_SECRET];
|
|
79
93
|
}
|
|
94
|
+
|
|
80
95
|
return options;
|
|
81
96
|
// The k8s secret option must remain active for this config even when the users switch the configType to a different one
|
|
82
97
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
|
-
}, [t, canListRepo]);
|
|
98
|
+
}, [t, canListRepo, isReadOnly]);
|
|
84
99
|
|
|
85
100
|
return (
|
|
86
101
|
<ExpandableFormSection
|
|
@@ -90,6 +105,7 @@ const ConfigSection = ({
|
|
|
90
105
|
>
|
|
91
106
|
<Grid hasGutter>
|
|
92
107
|
<RichValidationTextField
|
|
108
|
+
isDisabled={isReadOnly}
|
|
93
109
|
fieldName={`${fieldName}.name`}
|
|
94
110
|
aria-label={t('Source name')}
|
|
95
111
|
validations={getDnsSubdomainValidations(t)}
|
|
@@ -97,15 +113,21 @@ const ConfigSection = ({
|
|
|
97
113
|
/>
|
|
98
114
|
|
|
99
115
|
<FormGroup label={t('Source type')} isRequired>
|
|
100
|
-
<FormSelect
|
|
116
|
+
<FormSelect
|
|
117
|
+
items={items}
|
|
118
|
+
name={`${fieldName}.type`}
|
|
119
|
+
placeholderText={t('Select a source type')}
|
|
120
|
+
isDisabled={isReadOnly}
|
|
121
|
+
/>
|
|
101
122
|
</FormGroup>
|
|
102
123
|
|
|
103
124
|
{type === ConfigType.K8S_SECRET && <ConfigK8sSecretTemplateForm index={index} />}
|
|
104
|
-
{type === ConfigType.INLINE && <ConfigInlineTemplateForm index={index} />}
|
|
125
|
+
{type === ConfigType.INLINE && <ConfigInlineTemplateForm index={index} isReadOnly={isReadOnly} />}
|
|
105
126
|
{(type === ConfigType.GIT || type === ConfigType.HTTP) && (
|
|
106
127
|
<ConfigWithRepositoryTemplateForm
|
|
107
128
|
repoType={type === ConfigType.HTTP ? RepoSpecType.HTTP : RepoSpecType.GIT}
|
|
108
129
|
index={index}
|
|
130
|
+
isReadOnly={isReadOnly}
|
|
109
131
|
canCreateRepo={canCreateRepo}
|
|
110
132
|
repositories={repositories}
|
|
111
133
|
repoRefetch={repoRefetch}
|
|
@@ -116,9 +138,18 @@ const ConfigSection = ({
|
|
|
116
138
|
);
|
|
117
139
|
};
|
|
118
140
|
|
|
119
|
-
const ConfigurationTemplatesForm = ({
|
|
141
|
+
const ConfigurationTemplatesForm = ({
|
|
142
|
+
repositories,
|
|
143
|
+
repoRefetch,
|
|
144
|
+
isReadOnly,
|
|
145
|
+
canCreateRepo,
|
|
146
|
+
canListRepo,
|
|
147
|
+
}: ConfigSectionProps) => {
|
|
120
148
|
const { t } = useTranslation();
|
|
121
149
|
const { values, errors } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
150
|
+
if (isReadOnly && values.configTemplates.length === 0) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
122
153
|
|
|
123
154
|
const generalError = typeof errors.configTemplates === 'string' ? errors.configTemplates : undefined;
|
|
124
155
|
|
|
@@ -138,41 +169,46 @@ const ConfigurationTemplatesForm = ({ repositories, repoRefetch, canCreateRepo,
|
|
|
138
169
|
<SplitItem isFilled>
|
|
139
170
|
<ConfigSection
|
|
140
171
|
index={index}
|
|
172
|
+
isReadOnly={isReadOnly}
|
|
141
173
|
canCreateRepo={canCreateRepo}
|
|
142
174
|
repositories={repositories}
|
|
143
175
|
repoRefetch={repoRefetch}
|
|
144
176
|
canListRepo={canListRepo}
|
|
145
177
|
/>
|
|
146
178
|
</SplitItem>
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
179
|
+
{!isReadOnly && (
|
|
180
|
+
<SplitItem>
|
|
181
|
+
<Button
|
|
182
|
+
aria-label={t('Delete configuration')}
|
|
183
|
+
variant="link"
|
|
184
|
+
icon={<MinusCircleIcon />}
|
|
185
|
+
iconPosition="start"
|
|
186
|
+
onClick={() => remove(index)}
|
|
187
|
+
/>
|
|
188
|
+
</SplitItem>
|
|
189
|
+
)}
|
|
156
190
|
</Split>
|
|
157
191
|
</FormSection>
|
|
158
192
|
))}
|
|
159
|
-
|
|
160
|
-
<
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
193
|
+
{!isReadOnly && (
|
|
194
|
+
<FormSection>
|
|
195
|
+
<FormGroup>
|
|
196
|
+
<Button
|
|
197
|
+
variant="link"
|
|
198
|
+
icon={<PlusCircleIcon />}
|
|
199
|
+
iconPosition="start"
|
|
200
|
+
onClick={() => {
|
|
201
|
+
push({
|
|
202
|
+
name: '',
|
|
203
|
+
type: '',
|
|
204
|
+
});
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
207
|
+
{t('Add configuration')}
|
|
208
|
+
</Button>
|
|
209
|
+
</FormGroup>
|
|
210
|
+
</FormSection>
|
|
211
|
+
)}
|
|
176
212
|
<ErrorHelperText error={generalError} />
|
|
177
213
|
</>
|
|
178
214
|
)}
|
|
@@ -181,7 +217,7 @@ const ConfigurationTemplatesForm = ({ repositories, repoRefetch, canCreateRepo,
|
|
|
181
217
|
);
|
|
182
218
|
};
|
|
183
219
|
|
|
184
|
-
const ConfigurationTemplates = () => {
|
|
220
|
+
const ConfigurationTemplates = ({ isReadOnly }: { isReadOnly?: boolean }) => {
|
|
185
221
|
const [canCreateRepo] = useAccessReview(RESOURCE.REPOSITORY, VERB.CREATE);
|
|
186
222
|
const [repositoryList, isLoading, error, refetch] = useFetchPeriodically<RepositoryList>({
|
|
187
223
|
endpoint: 'repositories',
|
|
@@ -207,6 +243,7 @@ const ConfigurationTemplates = () => {
|
|
|
207
243
|
|
|
208
244
|
return (
|
|
209
245
|
<ConfigurationTemplatesForm
|
|
246
|
+
isReadOnly={isReadOnly}
|
|
210
247
|
canListRepo
|
|
211
248
|
canCreateRepo={canCreateRepo}
|
|
212
249
|
repositories={repositories}
|
|
@@ -215,12 +252,18 @@ const ConfigurationTemplates = () => {
|
|
|
215
252
|
);
|
|
216
253
|
};
|
|
217
254
|
|
|
218
|
-
const ConfigurationTemplatesWithPermissions = () => {
|
|
255
|
+
const ConfigurationTemplatesWithPermissions = ({ isReadOnly }) => {
|
|
219
256
|
const [canListRepo] = useAccessReview(RESOURCE.REPOSITORY, VERB.LIST);
|
|
220
|
-
return canListRepo ? (
|
|
257
|
+
return canListRepo && !isReadOnly ? (
|
|
221
258
|
<ConfigurationTemplates />
|
|
222
259
|
) : (
|
|
223
|
-
<ConfigurationTemplatesForm
|
|
260
|
+
<ConfigurationTemplatesForm
|
|
261
|
+
isReadOnly
|
|
262
|
+
canListRepo={false}
|
|
263
|
+
canCreateRepo={false}
|
|
264
|
+
repositories={[]}
|
|
265
|
+
repoRefetch={() => {}}
|
|
266
|
+
/>
|
|
224
267
|
);
|
|
225
268
|
};
|
|
226
269
|
|
|
@@ -4,7 +4,6 @@ import { FormikErrors, useFormikContext } from 'formik';
|
|
|
4
4
|
import { Trans } from 'react-i18next';
|
|
5
5
|
import { Repository } from '@flightctl/types';
|
|
6
6
|
|
|
7
|
-
import { CREATE_ACM_REPOSITORY, USING_TEMPLATE_VARIABLES_LINK } from '../../../../links';
|
|
8
7
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
9
8
|
import LabelWithHelperText, { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
10
9
|
import LearnMoreLink from '../../../common/LearnMoreLink';
|
|
@@ -15,6 +14,7 @@ import ConfigurationTemplates from './ConfigurationTemplates';
|
|
|
15
14
|
import ApplicationsForm from './ApplicationTemplates';
|
|
16
15
|
import SystemdUnitsForm from './SystemdUnitsForm';
|
|
17
16
|
import CheckboxField from '../../../form/CheckboxField';
|
|
17
|
+
import { useAppLinks } from '../../../../hooks/useAppLinks';
|
|
18
18
|
import { useFetchPeriodically } from '../../../../hooks/useFetchPeriodically';
|
|
19
19
|
import { FlightCtlApp, useAppContext } from '../../../../hooks/useAppContext';
|
|
20
20
|
import { ACM_REPO_NAME } from '../deviceSpecUtils';
|
|
@@ -28,9 +28,10 @@ const templateOption1 = '{{ .metadata.labels.key }}';
|
|
|
28
28
|
const templateOption2 = '{{ .metadata.name }}';
|
|
29
29
|
const exampleCode = `/device-configs/deployment-sites/site-{{ .metadata.labels.site }}`;
|
|
30
30
|
|
|
31
|
-
const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
31
|
+
const MicroShiftCheckbox = ({ isFleet, isReadOnly }: { isFleet: boolean; isReadOnly?: boolean }) => {
|
|
32
32
|
const { initialValues } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
33
33
|
const { t } = useTranslation();
|
|
34
|
+
const createAcmRepoLink = useAppLinks('createAcmRepo');
|
|
34
35
|
|
|
35
36
|
const [repo, loading, error] = useFetchPeriodically<Required<Repository>>({
|
|
36
37
|
endpoint: `repositories/${ACM_REPO_NAME}`,
|
|
@@ -84,7 +85,7 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
84
85
|
</>
|
|
85
86
|
)
|
|
86
87
|
}
|
|
87
|
-
isDisabled={isDisabled}
|
|
88
|
+
isDisabled={isDisabled || isReadOnly}
|
|
88
89
|
/>
|
|
89
90
|
</FormGroup>
|
|
90
91
|
{isDisabled && (
|
|
@@ -94,7 +95,7 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
94
95
|
repository: `'${ACM_REPO_NAME}'`,
|
|
95
96
|
})}
|
|
96
97
|
{', '}
|
|
97
|
-
<LearnMoreLink link={
|
|
98
|
+
<LearnMoreLink link={createAcmRepoLink} text={t('view documentation')} />
|
|
98
99
|
</Alert>
|
|
99
100
|
</FormGroup>
|
|
100
101
|
)}
|
|
@@ -102,14 +103,16 @@ const MicroShiftCheckbox = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
102
103
|
);
|
|
103
104
|
};
|
|
104
105
|
|
|
105
|
-
const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
106
|
+
const DeviceTemplateStep = ({ isFleet, isReadOnly }: { isFleet: boolean; isReadOnly?: boolean }) => {
|
|
106
107
|
const { appType } = useAppContext();
|
|
107
108
|
const { t } = useTranslation();
|
|
108
109
|
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
110
|
+
const useTemplateVarsLink = useAppLinks('useTemplateVars');
|
|
111
|
+
|
|
109
112
|
return (
|
|
110
113
|
<Grid span={8}>
|
|
111
114
|
<FlightCtlForm>
|
|
112
|
-
{isFleet && (
|
|
115
|
+
{isFleet && !isReadOnly && (
|
|
113
116
|
<Alert isInline variant="info" title={t('Using template variables')} isExpandable>
|
|
114
117
|
<Trans t={t}>
|
|
115
118
|
Add a variable by using <strong>{templateOption1}</strong> or <strong>{templateOption2}</strong> and it
|
|
@@ -119,7 +122,7 @@ const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
119
122
|
<CodeBlock className="pf-v5-u-mt-md">
|
|
120
123
|
<CodeBlockCode>{exampleCode}</CodeBlockCode>
|
|
121
124
|
</CodeBlock>
|
|
122
|
-
<LearnMoreLink link={
|
|
125
|
+
<LearnMoreLink link={useTemplateVarsLink} />
|
|
123
126
|
</Alert>
|
|
124
127
|
)}
|
|
125
128
|
<FormGroupWithHelperText
|
|
@@ -134,23 +137,16 @@ const DeviceTemplateStep = ({ isFleet }: { isFleet: boolean }) => {
|
|
|
134
137
|
name="osImage"
|
|
135
138
|
aria-label={t('System image')}
|
|
136
139
|
value={values.osImage}
|
|
140
|
+
isDisabled={isReadOnly}
|
|
137
141
|
helperText={t(
|
|
138
142
|
'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.',
|
|
139
143
|
)}
|
|
140
144
|
/>
|
|
141
145
|
</FormGroupWithHelperText>
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
<ApplicationsForm />
|
|
147
|
-
</FormGroup>
|
|
148
|
-
{isFleet && (
|
|
149
|
-
<FormGroup label={t('Tracked systemd services')}>
|
|
150
|
-
<SystemdUnitsForm />
|
|
151
|
-
</FormGroup>
|
|
152
|
-
)}
|
|
153
|
-
{appType === FlightCtlApp.OCP && <MicroShiftCheckbox isFleet={isFleet} />}
|
|
146
|
+
<ConfigurationTemplates isReadOnly={isReadOnly} />
|
|
147
|
+
<ApplicationsForm isReadOnly={isReadOnly} />
|
|
148
|
+
{isFleet && <SystemdUnitsForm isReadOnly={isReadOnly} />}
|
|
149
|
+
{appType === FlightCtlApp.OCP && <MicroShiftCheckbox isFleet={isFleet} isReadOnly={isReadOnly} />}
|
|
154
150
|
</FlightCtlForm>
|
|
155
151
|
</Grid>
|
|
156
152
|
);
|
|
@@ -1,77 +1,38 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Alert,
|
|
2
|
+
import { Alert, Grid, Title } from '@patternfly/react-core';
|
|
3
3
|
import { FormikErrors, useFormikContext } from 'formik';
|
|
4
4
|
|
|
5
5
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
6
|
-
import UpdateConfirmChangesModal from '../../../Fleet/CreateFleet/steps/UpdateConfirmChangesModal';
|
|
7
6
|
import UpdateStepUpdatePolicy from '../../../Fleet/CreateFleet/steps/UpdateStepUpdatePolicy';
|
|
8
|
-
import { getEmptyUpdateFormParams } from '../../../Fleet/CreateFleet/fleetSpecUtils';
|
|
9
7
|
|
|
10
8
|
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
11
9
|
import { DeviceSpecConfigFormValues } from '../../../../types/deviceSpec';
|
|
12
10
|
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
11
|
+
import CheckboxField from '../../../form/CheckboxField';
|
|
13
12
|
|
|
14
13
|
export const deviceUpdatePolicyStepId = 'update-policy';
|
|
15
14
|
|
|
16
15
|
export const isUpdatePolicyStepValid = (errors: FormikErrors<DeviceSpecConfigFormValues>) => !errors.updatePolicy;
|
|
17
16
|
|
|
18
|
-
const UpdatePolicyStep = () => {
|
|
17
|
+
const UpdatePolicyStep = ({ isReadOnly }: { isReadOnly?: boolean }) => {
|
|
19
18
|
const { t } = useTranslation();
|
|
20
19
|
|
|
21
20
|
const {
|
|
22
|
-
values: {
|
|
23
|
-
setFieldValue,
|
|
24
|
-
setFieldTouched,
|
|
21
|
+
values: { useBasicUpdateConfig },
|
|
25
22
|
} = useFormikContext<DeviceSpecConfigFormValues>();
|
|
26
23
|
|
|
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
24
|
return (
|
|
55
25
|
<Grid lg={8}>
|
|
56
26
|
<FlightCtlForm>
|
|
57
|
-
<
|
|
58
|
-
|
|
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 ? (
|
|
27
|
+
<CheckboxField name="useBasicUpdateConfig" label={t('Use basic configurations')} isDisabled={isReadOnly} />
|
|
28
|
+
{!useBasicUpdateConfig ? (
|
|
68
29
|
<>
|
|
69
30
|
<Title headingLevel="h3">{t('Advanced configurations')}</Title>
|
|
70
31
|
<FormGroupWithHelperText
|
|
71
32
|
label={t('Update policies')}
|
|
72
33
|
content={t('Update policies allow you to control when updates should be downloaded and applied.')}
|
|
73
34
|
>
|
|
74
|
-
<UpdateStepUpdatePolicy />
|
|
35
|
+
<UpdateStepUpdatePolicy isReadOnly={isReadOnly} />
|
|
75
36
|
</FormGroupWithHelperText>
|
|
76
37
|
</>
|
|
77
38
|
) : (
|
|
@@ -79,7 +40,6 @@ const UpdatePolicyStep = () => {
|
|
|
79
40
|
{t('The device will download and apply updates as soon as they are available.')}
|
|
80
41
|
</Alert>
|
|
81
42
|
)}
|
|
82
|
-
{alertSwitchToBasic && <UpdateConfirmChangesModal setting="update-policies" onClose={onModalClose} />}
|
|
83
43
|
</FlightCtlForm>
|
|
84
44
|
</Grid>
|
|
85
45
|
);
|
|
@@ -35,7 +35,7 @@ const ReviewStep = ({ error }: { error?: string }) => {
|
|
|
35
35
|
}}
|
|
36
36
|
>
|
|
37
37
|
<DescriptionListGroup>
|
|
38
|
-
<DescriptionListTerm>{t('
|
|
38
|
+
<DescriptionListTerm>{t('Device alias')}</DescriptionListTerm>
|
|
39
39
|
<DescriptionListDescription>{values.deviceAlias || t('Untitled')}</DescriptionListDescription>
|
|
40
40
|
</DescriptionListGroup>
|
|
41
41
|
{values.labels.length > 0 && (
|
|
@@ -10,8 +10,8 @@ export const ReviewUpdateRolloutPolicy = ({ rolloutPolicy }: { rolloutPolicy: Ro
|
|
|
10
10
|
const { t } = useTranslation();
|
|
11
11
|
|
|
12
12
|
return rolloutPolicy.isAdvanced
|
|
13
|
-
? '
|
|
14
|
-
:
|
|
13
|
+
? t('{{ count }} batches have been defined', { count: rolloutPolicy.batches.length })
|
|
14
|
+
: '-';
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const ReviewUpdateDisruptionBudget = ({ disruptionBudget }: { disruptionBudget: DisruptionBudgetForm }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Label, LabelGroup } from '@patternfly/react-core';
|
|
2
|
+
import { FormGroup, Label, LabelGroup } from '@patternfly/react-core';
|
|
3
3
|
import { useFormikContext } from 'formik';
|
|
4
4
|
|
|
5
5
|
import { DeviceSpecConfigFormValues } from '../../../../types/deviceSpec';
|
|
@@ -7,6 +7,7 @@ import { useTranslation } from '../../../../hooks/useTranslation';
|
|
|
7
7
|
|
|
8
8
|
import ErrorHelperText from '../../../form/FieldHelperText';
|
|
9
9
|
import EditableLabelControl from '../../../common/EditableLabelControl';
|
|
10
|
+
import LabelsView from '../../../common/LabelsView';
|
|
10
11
|
|
|
11
12
|
const SystemdUnitsForm = () => {
|
|
12
13
|
const { t } = useTranslation();
|
|
@@ -74,4 +75,31 @@ const SystemdUnitsForm = () => {
|
|
|
74
75
|
);
|
|
75
76
|
};
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
const SystemdUnitsFormWrapper = ({ isReadOnly }: { isReadOnly?: boolean }) => {
|
|
79
|
+
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
80
|
+
const { t } = useTranslation();
|
|
81
|
+
|
|
82
|
+
if (isReadOnly && values.systemdUnits.length === 0) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (isReadOnly) {
|
|
87
|
+
const labels: Record<string, string> = {};
|
|
88
|
+
values.systemdUnits.forEach((systemdUnit) => {
|
|
89
|
+
labels[systemdUnit.pattern] = '';
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<FormGroup label={t('Tracked systemd services')}>
|
|
94
|
+
<LabelsView prefix="systemdUnits" labels={labels} />
|
|
95
|
+
</FormGroup>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
return (
|
|
99
|
+
<FormGroup label={t('Tracked systemd services')}>
|
|
100
|
+
<SystemdUnitsForm />
|
|
101
|
+
</FormGroup>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default SystemdUnitsFormWrapper;
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
} from './deviceSpecUtils';
|
|
23
23
|
|
|
24
24
|
export const getValidationSchema = (t: TFunction) =>
|
|
25
|
-
Yup.lazy(() =>
|
|
25
|
+
Yup.lazy((values: EditDeviceFormValues) =>
|
|
26
26
|
Yup.object({
|
|
27
27
|
deviceAlias: validKubernetesLabelValue(t, { isRequired: false, fieldName: t('Alias') }),
|
|
28
28
|
osImage: validOsImage(t, { isFleet: false }),
|
|
29
29
|
labels: validLabelsSchema(t),
|
|
30
30
|
configTemplates: validConfigTemplatesSchema(t),
|
|
31
31
|
applications: validApplicationsSchema(t),
|
|
32
|
-
updatePolicy: validUpdatePolicySchema(t),
|
|
32
|
+
updatePolicy: values.updatePolicy.isAdvanced ? validUpdatePolicySchema(t) : Yup.object(),
|
|
33
33
|
}),
|
|
34
34
|
);
|
|
35
35
|
|
|
@@ -85,11 +85,10 @@ export const getDevicePatches = (currentDevice: Device, updatedDevice: EditDevic
|
|
|
85
85
|
allPatches = allPatches.concat(appPatches);
|
|
86
86
|
|
|
87
87
|
// Updates
|
|
88
|
-
const updatesPatches = getUpdatePolicyPatches(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
);
|
|
88
|
+
const updatesPatches = getUpdatePolicyPatches('/spec/updatePolicy', currentDevice.spec?.updatePolicy, {
|
|
89
|
+
...updatedDevice.updatePolicy,
|
|
90
|
+
isAdvanced: !updatedDevice.useBasicUpdateConfig,
|
|
91
|
+
} as Required<UpdatePolicyForm>);
|
|
93
92
|
allPatches = allPatches.concat(updatesPatches);
|
|
94
93
|
|
|
95
94
|
return allPatches;
|