@flightctl/ui-components 0.7.2 → 0.8.0-rc1
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 +29 -1
- 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 +21 -14
- 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 +1 -14
- 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.js +1 -1
- 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 -1
- 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 +28 -1
- 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 +39 -5
- 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 -1
- 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 -12
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateStepDisruptionBudget.js","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAAkC;AAClC,uDAAqF;AAErF,qEAAkE;AAClE,oFAAoD;AACpD,wFAAwD;AACxD,4FAA4D;AAC5D,mEAAyE;AAGzE,MAAM,0BAA0B,GAAG,
|
|
1
|
+
{"version":3,"file":"UpdateStepDisruptionBudget.js","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAAkC;AAClC,uDAAqF;AAErF,qEAAkE;AAClE,oFAAoD;AACpD,wFAAwD;AACxD,4FAA4D;AAC5D,mEAAyE;AAGzE,MAAM,0BAA0B,GAAG,CAAC,EAAE,UAAU,EAA2B,EAAE,EAAE;IAC7E,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,IAAA,iBAAQ,EAAuB,kBAAkB,CAAC,CAAC;IAEpE,OAAO,CACL;QACE,oBAAC,wCAAuB,IACtB,KAAK,EAAE,CAAC,CAAC,6BA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ReadOnly }: {
|
|
3
|
+
isReadOnly: boolean;
|
|
4
|
+
}) => React.JSX.Element | null;
|
|
3
5
|
export default UpdateStepRolloutPolicy;
|
|
4
6
|
//# sourceMappingURL=UpdateStepRolloutPolicy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateStepRolloutPolicy.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UpdateStepRolloutPolicy.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4G/B,QAAA,MAAM,uBAAuB;gBAAkC,OAAO;8BAwFrE,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -14,7 +14,7 @@ const NumberField_1 = tslib_1.__importDefault(require("../../../form/NumberField
|
|
|
14
14
|
const WithHelperText_1 = require("../../../common/WithHelperText");
|
|
15
15
|
const useTranslation_1 = require("../../../../hooks/useTranslation");
|
|
16
16
|
const fleetSpecUtils_1 = require("../fleetSpecUtils");
|
|
17
|
-
const RolloutPolicyBatch = ({ index }) => {
|
|
17
|
+
const RolloutPolicyBatch = ({ index, isReadOnly }) => {
|
|
18
18
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
19
19
|
const items = React.useMemo(() => ({
|
|
20
20
|
percent: t('Percentage'),
|
|
@@ -25,28 +25,31 @@ const RolloutPolicyBatch = ({ index }) => {
|
|
|
25
25
|
return (React.createElement(ExpandableFormSection_1.default, { title: t('Batch {{ batchNum }}', { batchNum: index + 1 }), fieldName: `rolloutPolicy.batches.${index}` },
|
|
26
26
|
React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
27
27
|
typeof meta.error === 'string' && (React.createElement(react_core_1.GridItem, null,
|
|
28
|
-
React.createElement(FieldHelperText_1.default, { meta: meta }))),
|
|
28
|
+
React.createElement(FieldHelperText_1.default, { meta: meta, touchRequired: false }))),
|
|
29
29
|
React.createElement(react_core_1.FormGroup, { label: t('Select devices using labels') },
|
|
30
|
-
React.createElement(LabelsField_1.default, { "aria-label": t('Label selector'), name: `rolloutPolicy.batches.${index}.selector
|
|
30
|
+
React.createElement(LabelsField_1.default, { "aria-label": t('Label selector'), name: `rolloutPolicy.batches.${index}.selector`, isDisabled: isReadOnly })),
|
|
31
31
|
React.createElement(react_core_1.FormGroup, { label: t('Select a subset using') },
|
|
32
32
|
React.createElement(react_core_1.Split, { hasGutter: true },
|
|
33
33
|
React.createElement(react_core_1.SplitItem, null,
|
|
34
|
-
React.createElement(FormSelect_1.default, { items: items, name: `rolloutPolicy.batches.${index}.limitType
|
|
34
|
+
React.createElement(FormSelect_1.default, { items: items, name: `rolloutPolicy.batches.${index}.limitType`, isDisabled: isReadOnly })),
|
|
35
35
|
React.createElement(react_core_1.SplitItem, null,
|
|
36
|
-
React.createElement(NumberField_1.default, { "aria-label": t('Numeric selector'), name: `rolloutPolicy.batches.${index}.limit`, min: 1, max: isPercent ? 100 : undefined, widthChars: isPercent ? 3 : 8, unit: isPercent ? '%' : undefined })))),
|
|
36
|
+
React.createElement(NumberField_1.default, { "aria-label": t('Numeric selector'), name: `rolloutPolicy.batches.${index}.limit`, min: 1, max: isPercent ? 100 : undefined, widthChars: isPercent ? 3 : 8, unit: isPercent ? '%' : undefined, isDisabled: isReadOnly })))),
|
|
37
37
|
React.createElement(WithHelperText_1.FormGroupWithHelperText, { label: t('Success threshold'), content: t('The minimum percentage of devices that must be updated successfully in order to continue updating the next batch of devices.'), isRequired: true },
|
|
38
38
|
React.createElement(react_core_1.Flex, { flexWrap: { default: 'wrap' } },
|
|
39
39
|
React.createElement(react_core_1.FlexItem, null,
|
|
40
40
|
t('If'),
|
|
41
41
|
" "),
|
|
42
42
|
React.createElement(react_core_1.FlexItem, null,
|
|
43
|
-
React.createElement(NumberField_1.default, { "aria-label": t('Success threshold'), name: `rolloutPolicy.batches.${index}.successThreshold`, min: 1, max: 100, isRequired: true })),
|
|
43
|
+
React.createElement(NumberField_1.default, { "aria-label": t('Success threshold'), name: `rolloutPolicy.batches.${index}.successThreshold`, min: 1, max: 100, isRequired: true, isDisabled: isReadOnly })),
|
|
44
44
|
React.createElement(react_core_1.FlexItem, { flex: { lg: 'flex_1' }, style: { minWidth: 200 } }, t("% of the batch devices pass the success threshold, move to next batch or the rest of fleet's devices.")))))));
|
|
45
45
|
};
|
|
46
|
-
const UpdateStepRolloutPolicy = () => {
|
|
46
|
+
const UpdateStepRolloutPolicy = ({ isReadOnly }) => {
|
|
47
47
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
48
48
|
const { values: { rolloutPolicy }, } = (0, formik_1.useFormikContext)();
|
|
49
49
|
const batches = rolloutPolicy.batches || [];
|
|
50
|
+
if (isReadOnly && batches.length === 0) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
50
53
|
return (React.createElement(React.Fragment, null,
|
|
51
54
|
React.createElement(react_core_1.Alert, { isInline: true, variant: "info", title: t('Batch sequencing') },
|
|
52
55
|
t('Batches will be applied from first to last.'),
|
|
@@ -56,7 +59,7 @@ const UpdateStepRolloutPolicy = () => {
|
|
|
56
59
|
React.createElement(react_core_1.Flex, null,
|
|
57
60
|
React.createElement(react_core_1.FlexItem, null, t('Timeout devices that fail to update after')),
|
|
58
61
|
React.createElement(react_core_1.FlexItem, null,
|
|
59
|
-
React.createElement(NumberField_1.default, { "aria-label": t('Update timeout'), name: "rolloutPolicy.updateTimeout", min: 1, isRequired: true })),
|
|
62
|
+
React.createElement(NumberField_1.default, { "aria-label": t('Update timeout'), name: "rolloutPolicy.updateTimeout", min: 1, isRequired: true, isDisabled: isReadOnly })),
|
|
60
63
|
React.createElement(react_core_1.FlexItem, null,
|
|
61
64
|
t('minutes'),
|
|
62
65
|
"."))),
|
|
@@ -65,14 +68,14 @@ const UpdateStepRolloutPolicy = () => {
|
|
|
65
68
|
batches.map((_, index) => (React.createElement(react_core_1.FormSection, { key: index },
|
|
66
69
|
React.createElement(react_core_1.Split, { hasGutter: true },
|
|
67
70
|
React.createElement(react_core_1.SplitItem, { isFilled: true },
|
|
68
|
-
React.createElement(RolloutPolicyBatch, { index: index })),
|
|
69
|
-
React.createElement(react_core_1.SplitItem, null,
|
|
70
|
-
React.createElement(react_core_1.Button, { "aria-label": t('Delete batch'), variant: "link", icon: React.createElement(icons_1.MinusCircleIcon, null), iconPosition: "start", onClick: () => remove(index), isDisabled: batches.length === 1 })))))),
|
|
71
|
-
React.createElement(react_core_1.FormSection, null,
|
|
71
|
+
React.createElement(RolloutPolicyBatch, { index: index, isReadOnly: isReadOnly })),
|
|
72
|
+
!isReadOnly && (React.createElement(react_core_1.SplitItem, null,
|
|
73
|
+
React.createElement(react_core_1.Button, { "aria-label": t('Delete batch'), variant: "link", icon: React.createElement(icons_1.MinusCircleIcon, null), iconPosition: "start", onClick: () => remove(index), isDisabled: batches.length === 1 }))))))),
|
|
74
|
+
!isReadOnly && (React.createElement(react_core_1.FormSection, null,
|
|
72
75
|
React.createElement(react_core_1.FormGroup, null,
|
|
73
76
|
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(icons_1.PlusCircleIcon, null), iconPosition: "start", onClick: () => {
|
|
74
77
|
push((0, fleetSpecUtils_1.getEmptyInitializedBatch)());
|
|
75
|
-
} }, t('Add batch'))))))))));
|
|
78
|
+
} }, t('Add batch')))))))))));
|
|
76
79
|
};
|
|
77
80
|
exports.default = UpdateStepRolloutPolicy;
|
|
78
81
|
//# sourceMappingURL=UpdateStepRolloutPolicy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateStepRolloutPolicy.js","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAWgC;AAChC,mCAAgE;AAChE,iEAAwF;AAExF,6DAA0F;AAC1F,4FAA4D;AAC5D,wGAAwE;AACxE,oFAAoD;AACpD,kFAAkD;AAClD,oFAAoD;AACpD,mEAAyE;AACzE,qEAAkE;AAClE,sDAA6D;AAE7D,MAAM,kBAAkB,GAAG,CAAC,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"UpdateStepRolloutPolicy.js","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAWgC;AAChC,mCAAgE;AAChE,iEAAwF;AAExF,6DAA0F;AAC1F,4FAA4D;AAC5D,wGAAwE;AACxE,oFAAoD;AACpD,kFAAkD;AAClD,oFAAoD;AACpD,mEAAyE;AACzE,qEAAkE;AAClE,sDAA6D;AAE7D,MAAM,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,EAA0C,EAAE,EAAE;IAC3F,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAE/B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CACzB,GAAG,EAAE,CAAC,CAAC;QACL,OAAO,EAAE,CAAC,CAAC,YAAY,CAAC;QACxB,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC;KAC9B,CAAC,EACF,CAAC,CAAC,CAAC,CACJ,CAAC;IAEF,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,GAAG,IAAA,iBAAQ,EAAY,yBAAyB,KAAK,EAAE,CAAC,CAAC;IAEvF,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,KAAK,2BAAc,CAAC,iBAAiB,CAAC;IACvE,OAAO,CACL,oBAAC,+BAAqB,IACpB,KAAK,EAAE,CAAC,CAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,EACzD,SAA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IAAI,CAAC,IAAA,yCAAwB,GAAE,CAAC,CAAC;4BACnC,CAAC,IAEA,CAAC,CAAC,WAAW,CAAC,CACR,CACC,CACA,CACf,CACA,CACJ,CACU,CACH,CACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,uBAAuB,CAAC"}
|
|
@@ -4,6 +4,8 @@ export declare enum ScheduleBlockType {
|
|
|
4
4
|
Download = "download",
|
|
5
5
|
Install = "install"
|
|
6
6
|
}
|
|
7
|
-
declare const UpdateStepUpdatePolicy: (
|
|
7
|
+
declare const UpdateStepUpdatePolicy: ({ isReadOnly }: {
|
|
8
|
+
isReadOnly?: boolean | undefined;
|
|
9
|
+
}) => React.JSX.Element;
|
|
8
10
|
export default UpdateStepUpdatePolicy;
|
|
9
11
|
//# sourceMappingURL=UpdateStepUpdatePolicy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateStepUpdatePolicy.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,8BAA8B,CAAC;AAEtC,oBAAY,iBAAiB;IAC3B,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;
|
|
1
|
+
{"version":3,"file":"UpdateStepUpdatePolicy.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,8BAA8B,CAAC;AAEtC,oBAAY,iBAAiB;IAC3B,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAuND,QAAA,MAAM,sBAAsB;;uBAsD3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -19,7 +19,7 @@ var ScheduleBlockType;
|
|
|
19
19
|
ScheduleBlockType["Download"] = "download";
|
|
20
20
|
ScheduleBlockType["Install"] = "install";
|
|
21
21
|
})(ScheduleBlockType || (exports.ScheduleBlockType = ScheduleBlockType = {}));
|
|
22
|
-
const ScheduleTimeZone = ({ blockType }) => {
|
|
22
|
+
const ScheduleTimeZone = ({ blockType, isReadOnly }) => {
|
|
23
23
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
24
24
|
const id = `updatePolicy.${blockType}TimeZone`;
|
|
25
25
|
const [_a, , { setValue }] = (0, formik_1.useField)({
|
|
@@ -30,10 +30,10 @@ const ScheduleTimeZone = ({ blockType }) => {
|
|
|
30
30
|
setValue(isChecked ? timeUtils.localDeviceTimezone : '');
|
|
31
31
|
};
|
|
32
32
|
return (React.createElement(react_core_1.FormGroup, { id: `form-control__${id}`, fieldId: id, isStack: true, className: "fctl-policy-timezone" },
|
|
33
|
-
React.createElement(react_core_1.Checkbox, Object.assign({}, rest, { isChecked: timeZone === timeUtils.localDeviceTimezone, id: id, onChange: onChangeTimezoneCheckbox, label: t("Use device's local timezone") })),
|
|
34
|
-
timeZone !== timeUtils.localDeviceTimezone && React.createElement(FormSelectTypeahead_1.default, { name: id, defaultId: "", items: zones })));
|
|
33
|
+
React.createElement(react_core_1.Checkbox, Object.assign({}, rest, { isChecked: timeZone === timeUtils.localDeviceTimezone, id: id, onChange: onChangeTimezoneCheckbox, label: t("Use device's local timezone"), isDisabled: isReadOnly })),
|
|
34
|
+
timeZone !== timeUtils.localDeviceTimezone && (React.createElement(FormSelectTypeahead_1.default, { name: id, defaultId: "", items: zones, isDisabled: isReadOnly }))));
|
|
35
35
|
};
|
|
36
|
-
const ScheduleBlock = ({ blockType, updatePolicy, onScheduleModeSwitch, weekDayError }) => {
|
|
36
|
+
const ScheduleBlock = ({ blockType, updatePolicy, onScheduleModeSwitch, weekDayError, isReadOnly, }) => {
|
|
37
37
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
38
38
|
let ariaLabel;
|
|
39
39
|
let helperContent;
|
|
@@ -73,36 +73,36 @@ const ScheduleBlock = ({ blockType, updatePolicy, onScheduleModeSwitch, weekDayE
|
|
|
73
73
|
React.createElement(react_core_1.StackItem, null,
|
|
74
74
|
React.createElement(react_core_1.Flex, null,
|
|
75
75
|
React.createElement(react_core_1.FlexItem, null,
|
|
76
|
-
React.createElement(FormSelectTypeahead_1.default, { name: `updatePolicy.${blockType}StartsAt`, placeholderText: t('hh:mm', { nsSeparator: '|' }), defaultId: timeUtils.defaultStartTime, items: selectableTimes, isValidTypedItem: isValidTypedItem, transformTypedItem: transformTypedItem })),
|
|
76
|
+
React.createElement(FormSelectTypeahead_1.default, { name: `updatePolicy.${blockType}StartsAt`, placeholderText: t('hh:mm', { nsSeparator: '|' }), defaultId: timeUtils.defaultStartTime, items: selectableTimes, isValidTypedItem: isValidTypedItem, transformTypedItem: transformTypedItem, isDisabled: isReadOnly })),
|
|
77
77
|
React.createElement(react_core_1.FlexItem, null,
|
|
78
|
-
React.createElement(FormSelectTypeahead_1.default, { name: `updatePolicy.${blockType}EndsAt`, placeholderText: t('hh:mm', { nsSeparator: '|' }), defaultId: timeUtils.defaultEndTime, items: selectableTimes, isValidTypedItem: isValidTypedItem, transformTypedItem: transformTypedItem })),
|
|
78
|
+
React.createElement(FormSelectTypeahead_1.default, { name: `updatePolicy.${blockType}EndsAt`, placeholderText: t('hh:mm', { nsSeparator: '|' }), defaultId: timeUtils.defaultEndTime, items: selectableTimes, isValidTypedItem: isValidTypedItem, transformTypedItem: transformTypedItem, isDisabled: isReadOnly })),
|
|
79
79
|
React.createElement(react_core_1.FlexItem, null,
|
|
80
|
-
React.createElement(RadioField_1.default, { id: `daily-${blockType}`, name: `updatePolicy.${blockType}ScheduleMode`, label: t('Daily'), checkedValue: timeUtils.UpdateScheduleMode.Daily })),
|
|
80
|
+
React.createElement(RadioField_1.default, { id: `daily-${blockType}`, name: `updatePolicy.${blockType}ScheduleMode`, label: t('Daily'), checkedValue: timeUtils.UpdateScheduleMode.Daily, isDisabled: isReadOnly })),
|
|
81
81
|
React.createElement(react_core_1.FlexItem, null,
|
|
82
|
-
React.createElement(RadioField_1.default, { id: `weekly-${blockType}`, name: `updatePolicy.${blockType}ScheduleMode`, label: t('Weekly'), checkedValue: timeUtils.UpdateScheduleMode.Weekly, onChangeCustom: () => onScheduleModeSwitch(blockType) })))),
|
|
82
|
+
React.createElement(RadioField_1.default, { id: `weekly-${blockType}`, name: `updatePolicy.${blockType}ScheduleMode`, label: t('Weekly'), checkedValue: timeUtils.UpdateScheduleMode.Weekly, onChangeCustom: () => onScheduleModeSwitch(blockType), isDisabled: isReadOnly })))),
|
|
83
83
|
isWeekly && (React.createElement(formik_1.FieldArray, { name: `updatePolicy.${blockType}WeekDays` }, () => (React.createElement(React.Fragment, null,
|
|
84
84
|
React.createElement(react_core_1.StackItem, null,
|
|
85
85
|
React.createElement(react_core_1.Flex, null,
|
|
86
86
|
React.createElement(react_core_1.FlexItem, null,
|
|
87
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[0]`, label: t('Sun') })),
|
|
87
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[0]`, label: t('Sun'), isDisabled: isReadOnly })),
|
|
88
88
|
React.createElement(react_core_1.FlexItem, null,
|
|
89
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[1]`, label: t('Mon') })),
|
|
89
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[1]`, label: t('Mon'), isDisabled: isReadOnly })),
|
|
90
90
|
React.createElement(react_core_1.FlexItem, null,
|
|
91
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[2]`, label: t('Tue') })),
|
|
91
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[2]`, label: t('Tue'), isDisabled: isReadOnly })),
|
|
92
92
|
React.createElement(react_core_1.FlexItem, null,
|
|
93
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[3]`, label: t('Wed') })),
|
|
93
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[3]`, label: t('Wed'), isDisabled: isReadOnly })),
|
|
94
94
|
React.createElement(react_core_1.FlexItem, null,
|
|
95
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[4]`, label: t('Thu') })),
|
|
95
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[4]`, label: t('Thu'), isDisabled: isReadOnly })),
|
|
96
96
|
React.createElement(react_core_1.FlexItem, null,
|
|
97
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[5]`, label: t('Fri') })),
|
|
97
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[5]`, label: t('Fri'), isDisabled: isReadOnly })),
|
|
98
98
|
React.createElement(react_core_1.FlexItem, null,
|
|
99
|
-
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[6]`, label: t('Sat') })))),
|
|
99
|
+
React.createElement(CheckboxField_1.CheckboxFieldGroupValidation, { name: `updatePolicy.${blockType}WeekDays[6]`, label: t('Sat'), isDisabled: isReadOnly })))),
|
|
100
100
|
React.createElement(react_core_1.StackItem, null,
|
|
101
101
|
React.createElement(FieldHelperText_1.default, { error: weekDayError })))))),
|
|
102
102
|
React.createElement(react_core_1.StackItem, { style: { maxWidth: 500 } },
|
|
103
|
-
React.createElement(ScheduleTimeZone, { blockType: blockType })))));
|
|
103
|
+
React.createElement(ScheduleTimeZone, { blockType: blockType, isReadOnly: isReadOnly })))));
|
|
104
104
|
};
|
|
105
|
-
const UpdateStepUpdatePolicy = () => {
|
|
105
|
+
const UpdateStepUpdatePolicy = ({ isReadOnly }) => {
|
|
106
106
|
var _a, _b;
|
|
107
107
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
108
108
|
const { values: { updatePolicy }, errors, setFieldValue, } = (0, formik_1.useFormikContext)();
|
|
@@ -117,11 +117,11 @@ const UpdateStepUpdatePolicy = () => {
|
|
|
117
117
|
};
|
|
118
118
|
return (React.createElement(react_core_1.Stack, { hasGutter: true },
|
|
119
119
|
React.createElement(react_core_1.StackItem, null,
|
|
120
|
-
React.createElement(CheckboxField_1.default, { label: t('Use different update schedules for downloading and installing updates'), name: "updatePolicy.downloadAndInstallDiffer" })),
|
|
120
|
+
React.createElement(CheckboxField_1.default, { label: t('Use different update schedules for downloading and installing updates'), name: "updatePolicy.downloadAndInstallDiffer", isDisabled: isReadOnly })),
|
|
121
121
|
React.createElement(react_core_1.StackItem, null,
|
|
122
|
-
React.createElement(ScheduleBlock, { blockType: ScheduleBlockType.Download, updatePolicy: updatePolicy, weekDayError: (_a = errors.updatePolicy) === null || _a === void 0 ? void 0 : _a.downloadWeekDays, onScheduleModeSwitch: onSwitchToWeeklyMode })),
|
|
122
|
+
React.createElement(ScheduleBlock, { blockType: ScheduleBlockType.Download, updatePolicy: updatePolicy, weekDayError: (_a = errors.updatePolicy) === null || _a === void 0 ? void 0 : _a.downloadWeekDays, onScheduleModeSwitch: onSwitchToWeeklyMode, isReadOnly: isReadOnly })),
|
|
123
123
|
updatePolicy.downloadAndInstallDiffer && (React.createElement(react_core_1.StackItem, null,
|
|
124
|
-
React.createElement(ScheduleBlock, { blockType: ScheduleBlockType.Install, updatePolicy: updatePolicy, weekDayError: (_b = errors.updatePolicy) === null || _b === void 0 ? void 0 : _b.installWeekDays, onScheduleModeSwitch: onSwitchToWeeklyMode })))));
|
|
124
|
+
React.createElement(ScheduleBlock, { blockType: ScheduleBlockType.Install, updatePolicy: updatePolicy, weekDayError: (_b = errors.updatePolicy) === null || _b === void 0 ? void 0 : _b.installWeekDays, onScheduleModeSwitch: onSwitchToWeeklyMode, isReadOnly: isReadOnly })))));
|
|
125
125
|
};
|
|
126
126
|
exports.default = UpdateStepUpdatePolicy;
|
|
127
127
|
//# sourceMappingURL=UpdateStepUpdatePolicy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateStepUpdatePolicy.js","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uDAAwG;AACxG,mCAAgE;AAEhE,qEAAkE;AAClE,0FAA0D;AAC1D,0EAAoD;AAEpD,mEAAyE;AACzE,qFAA0F;AAC1F,oGAAoE;AACpE,kFAAkD;AAClD,4FAA4D;AAE5D,wCAAsC;AAEtC,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;AACrB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;
|
|
1
|
+
{"version":3,"file":"UpdateStepUpdatePolicy.js","sourceRoot":"","sources":["../../../../../../src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uDAAwG;AACxG,mCAAgE;AAEhE,qEAAkE;AAClE,0FAA0D;AAC1D,0EAAoD;AAEpD,mEAAyE;AACzE,qFAA0F;AAC1F,oGAAoE;AACpE,kFAAkD;AAClD,4FAA4D;AAE5D,wCAAsC;AAEtC,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;AACrB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAUD,MAAM,gBAAgB,GAAG,CAAC,EAAE,SAAS,EAAE,UAAU,EAA0D,EAAE,EAAE;IAC7G,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,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AY,CAAC,eAAe,CAAC;QAE1G,MAAM,iBAAiB,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,iBAAiB,EAAE,CAAC;YACtB,aAAa,CAAC,gBAAgB,SAAS,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QACxG,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,kBAAK,IAAC,SAAS;QACd,oBAAC,sBAAS;YACR,oBAAC,uBAAa,IACZ,KAAK,EAAE,CAAC,CAAC,uEAAuE,CAAC,EACjF,IAAI,EAAC,uCAAuC,EAC5C,UAAU,EAAE,UAAU,GACtB,CACQ;QAEZ,oBAAC,sBAAS;YACR,oBAAC,aAAa,IACZ,SAAS,EAAE,iBAAiB,CAAC,QAAQ,EACrC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,MAAA,MAAM,CAAC,YAAY,0CAAE,gBAAgB,EACnD,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,UAAU,GACtB,CACQ;QAEX,YAAY,CAAC,wBAAwB,IAAI,CACxC,oBAAC,sBAAS;YACR,oBAAC,aAAa,IACZ,SAAS,EAAE,iBAAiB,CAAC,OAAO,EACpC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,MAAA,MAAM,CAAC,YAAY,0CAAE,eAAe,EAClD,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,UAAU,GACtB,CACQ,CACb,CACK,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Fleet, PatchRequest } from '@flightctl/types';
|
|
|
2
2
|
import { TFunction } from 'i18next';
|
|
3
3
|
import * as Yup from 'yup';
|
|
4
4
|
import { FleetFormValues } from '../../../types/deviceSpec';
|
|
5
|
-
export declare const getValidationSchema: (t: TFunction) => Yup.
|
|
5
|
+
export declare const getValidationSchema: (t: TFunction) => Yup.Lazy<{}, Yup.AnyObject, any>;
|
|
6
6
|
export declare const getFleetPatches: (currentFleet: Fleet, updatedFleet: FleetFormValues) => PatchRequest;
|
|
7
7
|
export declare const getFleetResource: (values: FleetFormValues) => Fleet;
|
|
8
8
|
export declare const getInitialValues: (fleet?: Fleet) => FleetFormValues;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/CreateFleet/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAoC3B,OAAO,EAAE,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AAE9E,eAAO,MAAM,mBAAmB,MAAO,SAAS,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/CreateFleet/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAoC3B,OAAO,EAAE,eAAe,EAAoB,MAAM,2BAA2B,CAAC;AAE9E,eAAO,MAAM,mBAAmB,MAAO,SAAS,qCAsB/C,CAAC;AAEF,eAAO,MAAM,eAAe,iBAAkB,KAAK,gBAAgB,eAAe,iBAuGjF,CAAC;AAEF,eAAO,MAAM,gBAAgB,WAAY,eAAe,KAAG,KAgD1D,CAAC;AAEF,eAAO,MAAM,gBAAgB,WAAY,KAAK,KAAG,eA6ChD,CAAC"}
|
|
@@ -10,17 +10,24 @@ const patch_1 = require("../../../utils/patch");
|
|
|
10
10
|
const deviceSpecUtils_1 = require("../../Device/EditDeviceWizard/deviceSpecUtils");
|
|
11
11
|
const fleetSpecUtils_1 = require("./fleetSpecUtils");
|
|
12
12
|
const getValidationSchema = (t) => {
|
|
13
|
-
return Yup.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
return Yup.lazy((values) => {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
return Yup.object({
|
|
16
|
+
name: (0, validations_1.validKubernetesDnsSubdomain)(t, { isRequired: true }),
|
|
17
|
+
osImage: (0, validations_1.validOsImage)(t, { isFleet: true }),
|
|
18
|
+
fleetLabels: (0, validations_1.validLabelsSchema)(t),
|
|
19
|
+
labels: (0, validations_1.validLabelsSchema)(t),
|
|
20
|
+
configTemplates: (0, validations_1.validConfigTemplatesSchema)(t),
|
|
21
|
+
applications: (0, validations_1.validApplicationsSchema)(t),
|
|
22
|
+
systemdUnits: (0, validations_1.systemdUnitListValidationSchema)(t),
|
|
23
|
+
rolloutPolicy: !values.useBasicUpdateConfig && ((_a = values.rolloutPolicy) === null || _a === void 0 ? void 0 : _a.isAdvanced)
|
|
24
|
+
? (0, validations_1.validFleetRolloutPolicySchema)(t)
|
|
25
|
+
: Yup.object(),
|
|
26
|
+
disruptionBudget: !values.useBasicUpdateConfig && ((_b = values.disruptionBudget) === null || _b === void 0 ? void 0 : _b.isAdvanced)
|
|
27
|
+
? (0, validations_1.validFleetDisruptionBudgetSchema)(t)
|
|
28
|
+
: Yup.object(),
|
|
29
|
+
updatePolicy: !values.useBasicUpdateConfig && ((_c = values.updatePolicy) === null || _c === void 0 ? void 0 : _c.isAdvanced) ? (0, validations_1.validUpdatePolicySchema)(t) : Yup.object(),
|
|
30
|
+
});
|
|
24
31
|
});
|
|
25
32
|
};
|
|
26
33
|
exports.getValidationSchema = getValidationSchema;
|
|
@@ -99,7 +106,7 @@ const getFleetPatches = (currentFleet, updatedFleet) => {
|
|
|
99
106
|
const rolloutPolicyPatches = (0, patch_1.getRolloutPolicyPatches)(currentFleet.spec.rolloutPolicy, updatedFleet);
|
|
100
107
|
allPatches = allPatches.concat(rolloutPolicyPatches);
|
|
101
108
|
// Update policies
|
|
102
|
-
const updatePolicyPatches = (0, patch_1.getUpdatePolicyPatches)('/spec/template/spec/updatePolicy', currentFleet.spec.template.spec.updatePolicy, updatedFleet.updatePolicy);
|
|
109
|
+
const updatePolicyPatches = (0, patch_1.getUpdatePolicyPatches)('/spec/template/spec/updatePolicy', currentFleet.spec.template.spec.updatePolicy, Object.assign(Object.assign({}, updatedFleet.updatePolicy), { isAdvanced: !updatedFleet.useBasicUpdateConfig && updatedFleet.updatePolicy.isAdvanced }));
|
|
103
110
|
allPatches = allPatches.concat(updatePolicyPatches);
|
|
104
111
|
return allPatches;
|
|
105
112
|
};
|
|
@@ -137,11 +144,13 @@ const getFleetResource = (values) => {
|
|
|
137
144
|
if (values.registerMicroShift) {
|
|
138
145
|
(_a = fleet.spec.template.spec.config) === null || _a === void 0 ? void 0 : _a.push(deviceSpecUtils_1.ACMCrdConfig, deviceSpecUtils_1.ACMImportConfig, deviceSpecUtils_1.MicroshiftRegistrationHook);
|
|
139
146
|
}
|
|
140
|
-
if (values.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
if (!values.useBasicUpdateConfig) {
|
|
148
|
+
if (values.rolloutPolicy.isAdvanced || values.disruptionBudget.isAdvanced) {
|
|
149
|
+
fleet.spec.rolloutPolicy = (0, patch_1.getRolloutPolicyData)(values);
|
|
150
|
+
}
|
|
151
|
+
if (values.updatePolicy.isAdvanced) {
|
|
152
|
+
fleet.spec.template.spec.updatePolicy = (0, patch_1.updatePolicyFormToApi)(values.updatePolicy);
|
|
153
|
+
}
|
|
145
154
|
}
|
|
146
155
|
return fleet;
|
|
147
156
|
};
|
|
@@ -150,9 +159,12 @@ const getInitialValues = (fleet) => {
|
|
|
150
159
|
var _a, _b, _c, _d, _e;
|
|
151
160
|
if (fleet) {
|
|
152
161
|
const registerMicroShift = (0, deviceSpecUtils_1.hasMicroshiftRegistrationConfig)(fleet.spec.template.spec);
|
|
162
|
+
const rolloutPolicy = (0, fleetSpecUtils_1.getRolloutPolicyValues)(fleet.spec);
|
|
163
|
+
const disruptionBudget = (0, fleetSpecUtils_1.getDisruptionBudgetValues)(fleet.spec);
|
|
164
|
+
const updatePolicy = (0, fleetSpecUtils_1.getUpdatePolicyValues)((_b = (_a = fleet.spec.template) === null || _a === void 0 ? void 0 : _a.spec) === null || _b === void 0 ? void 0 : _b.updatePolicy);
|
|
153
165
|
return {
|
|
154
166
|
name: fleet.metadata.name || '',
|
|
155
|
-
labels: Object.keys(((
|
|
167
|
+
labels: Object.keys(((_c = fleet.spec.selector) === null || _c === void 0 ? void 0 : _c.matchLabels) || {}).map((key) => {
|
|
156
168
|
var _a, _b;
|
|
157
169
|
return ({
|
|
158
170
|
key,
|
|
@@ -166,17 +178,18 @@ const getInitialValues = (fleet) => {
|
|
|
166
178
|
value: (_a = fleet.metadata.labels) === null || _a === void 0 ? void 0 : _a[key],
|
|
167
179
|
});
|
|
168
180
|
}),
|
|
169
|
-
osImage: ((
|
|
181
|
+
osImage: ((_d = fleet.spec.template.spec.os) === null || _d === void 0 ? void 0 : _d.image) || '',
|
|
170
182
|
configTemplates: (0, deviceSpecUtils_1.getConfigTemplatesValues)(fleet.spec.template.spec, registerMicroShift),
|
|
171
183
|
applications: (0, deviceSpecUtils_1.getApplicationValues)(fleet.spec.template.spec),
|
|
172
|
-
systemdUnits: (((
|
|
184
|
+
systemdUnits: (((_e = fleet.spec.template.spec.systemd) === null || _e === void 0 ? void 0 : _e.matchPatterns) || []).map((p) => ({
|
|
173
185
|
pattern: p,
|
|
174
186
|
exists: true,
|
|
175
187
|
})),
|
|
176
188
|
registerMicroShift,
|
|
177
|
-
rolloutPolicy
|
|
178
|
-
disruptionBudget
|
|
179
|
-
updatePolicy
|
|
189
|
+
rolloutPolicy,
|
|
190
|
+
disruptionBudget,
|
|
191
|
+
updatePolicy,
|
|
192
|
+
useBasicUpdateConfig: !rolloutPolicy.isAdvanced && !disruptionBudget.isAdvanced && !updatePolicy.isAdvanced,
|
|
180
193
|
};
|
|
181
194
|
}
|
|
182
195
|
return {
|
|
@@ -191,6 +204,7 @@ const getInitialValues = (fleet) => {
|
|
|
191
204
|
rolloutPolicy: (0, fleetSpecUtils_1.getRolloutPolicyValues)(undefined),
|
|
192
205
|
disruptionBudget: (0, fleetSpecUtils_1.getDisruptionBudgetValues)(undefined),
|
|
193
206
|
updatePolicy: (0, fleetSpecUtils_1.getUpdatePolicyValues)(undefined),
|
|
207
|
+
useBasicUpdateConfig: true,
|
|
194
208
|
};
|
|
195
209
|
};
|
|
196
210
|
exports.getInitialValues = getInitialValues;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/components/Fleet/CreateFleet/utils.ts"],"names":[],"mappings":";;;;AAEA,iDAA2B;AAC3B,kDAAiD;AACjD,kDAAmD;AACnD,wDAUgC;AAChC,gDAQ8B;AAC9B,mFAWuD;AACvD,qDAA4G;AAGrG,MAAM,mBAAmB,GAAG,CAAC,CAAY,EAAE,EAAE;IAClD,OAAO,GAAG,CAAC,MAAM,CAAkB;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/components/Fleet/CreateFleet/utils.ts"],"names":[],"mappings":";;;;AAEA,iDAA2B;AAC3B,kDAAiD;AACjD,kDAAmD;AACnD,wDAUgC;AAChC,gDAQ8B;AAC9B,mFAWuD;AACvD,qDAA4G;AAGrG,MAAM,mBAAmB,GAAG,CAAC,CAAY,EAAE,EAAE;IAClD,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,MAAuB,EAAE,EAAE;;QAC1C,OAAA,GAAG,CAAC,MAAM,CAAkB;YAC1B,IAAI,EAAE,IAAA,yCAA2B,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ChB,YAAY,EAAE,EAAE;QAChB,kBAAkB,EAAE,KAAK;QACzB,aAAa,EAAE,IAAA,uCAAsB,EAAC,SAAS,CAAC;QAChD,gBAAgB,EAAE,IAAA,0CAAyB,EAAC,SAAS,CAAC;QACtD,YAAY,EAAE,IAAA,sCAAqB,EAAC,SAAS,CAAC;QAC9C,oBAAoB,EAAE,IAAI;KAC3B,CAAC;AACJ,CAAC,CAAC;AA7CW,QAAA,gBAAgB,oBA6C3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteFleetModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DeleteFleetModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,QAAA,MAAM,gBAAgB;aAAqC,MAAM;2BAAyB,OAAO,KAAK,IAAI;uBA6EzG,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
6
5
|
const react_i18next_1 = require("react-i18next");
|
|
6
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
7
|
+
const next_1 = require("@patternfly/react-core/next");
|
|
7
8
|
const useTranslation_1 = require("../../../hooks/useTranslation");
|
|
8
9
|
const useFetch_1 = require("../../../hooks/useFetch");
|
|
9
10
|
const error_1 = require("../../../utils/error");
|
|
@@ -20,9 +21,24 @@ const DeleteFleetModal = ({ fleetId, onClose }) => {
|
|
|
20
21
|
setError({ text: t('Deletion of fleet {{fleetId}} failed.'), details: (0, error_1.getErrorMessage)(fleetErr) });
|
|
21
22
|
}
|
|
22
23
|
});
|
|
23
|
-
return (React.createElement(
|
|
24
|
+
return (React.createElement(next_1.Modal, { isOpen: true, onClose: () => {
|
|
24
25
|
onClose();
|
|
25
|
-
}, variant: "small"
|
|
26
|
+
}, variant: "small" },
|
|
27
|
+
React.createElement(next_1.ModalHeader, { title: t('Delete fleet?'), titleIconVariant: "warning" }),
|
|
28
|
+
React.createElement(next_1.ModalBody, null,
|
|
29
|
+
React.createElement(react_core_1.Stack, { hasGutter: true },
|
|
30
|
+
React.createElement(react_core_1.StackItem, null,
|
|
31
|
+
React.createElement(react_i18next_1.Trans, { t: t },
|
|
32
|
+
React.createElement("strong", null, fleetId),
|
|
33
|
+
" will be deleted permanently. If the device selector of a remaining fleet matches a device in ",
|
|
34
|
+
React.createElement("strong", null, fleetId),
|
|
35
|
+
", the device will be moved to the new fleet. If there's no matching fleet for a device, it will be unlinked from any fleet.")),
|
|
36
|
+
React.createElement(react_core_1.StackItem, null, t('Are you sure you want to delete?')),
|
|
37
|
+
error && (React.createElement(react_core_1.StackItem, null,
|
|
38
|
+
React.createElement(react_core_1.Alert, { isInline: true, variant: "danger", title: t('An error occurred') },
|
|
39
|
+
React.createElement("div", null, error.text),
|
|
40
|
+
error.details && React.createElement("div", null, t('Details: {{errorDetails}}', { errorDetails: error.details }))))))),
|
|
41
|
+
React.createElement(next_1.ModalFooter, null,
|
|
26
42
|
React.createElement(react_core_1.Button, { key: "confirm", variant: "danger", isDisabled: isDeleting || !!error, isLoading: isDeleting, onClick: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
27
43
|
setError(undefined);
|
|
28
44
|
try {
|
|
@@ -37,19 +53,7 @@ const DeleteFleetModal = ({ fleetId, onClose }) => {
|
|
|
37
53
|
}) }, t('Delete fleet')),
|
|
38
54
|
React.createElement(react_core_1.Button, { key: "cancel", variant: "link", onClick: () => {
|
|
39
55
|
onClose();
|
|
40
|
-
}, isDisabled: isDeleting }, t('Cancel'))
|
|
41
|
-
] },
|
|
42
|
-
React.createElement(react_core_1.Stack, { hasGutter: true },
|
|
43
|
-
React.createElement(react_core_1.StackItem, null,
|
|
44
|
-
React.createElement(react_i18next_1.Trans, { t: t },
|
|
45
|
-
"Are you sure you want to delete fleet ",
|
|
46
|
-
React.createElement("strong", null, fleetId),
|
|
47
|
-
"?")),
|
|
48
|
-
React.createElement(react_core_1.StackItem, null, t('Devices bound to this fleet may join another fleet matching their labels, otherwise they will remain unlinked from any fleet.')),
|
|
49
|
-
error && (React.createElement(react_core_1.StackItem, null,
|
|
50
|
-
React.createElement(react_core_1.Alert, { isInline: true, variant: "danger", title: t('An error occurred') },
|
|
51
|
-
React.createElement("div", null, error.text),
|
|
52
|
-
error.details && React.createElement("div", null, t('Details: {{errorDetails}}', { errorDetails: error.details }))))))));
|
|
56
|
+
}, isDisabled: isDeleting }, t('Cancel')))));
|
|
53
57
|
};
|
|
54
58
|
exports.default = DeleteFleetModal;
|
|
55
59
|
//# sourceMappingURL=DeleteFleetModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteFleetModal.js","sourceRoot":"","sources":["../../../../../src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"DeleteFleetModal.js","sourceRoot":"","sources":["../../../../../src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,iDAAsC;AACtC,uDAAyE;AACzE,sDAAyF;AAEzF,kEAA+D;AAC/D,sDAAmD;AACnD,gDAAuD;AAEvD,MAAM,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAgE,EAAE,EAAE;IAC9G,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,G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AE,YAAY,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAO,CACxF,CACE,CACb,CACK,CACE;QACZ,oBAAC,kBAAW;YACV,oBAAC,mBAAM,IACL,GAAG,EAAC,SAAS,EACb,OAAO,EAAC,QAAQ,EAChB,UAAU,EAAE,UAAU,IAAI,CAAC,CAAC,KAAK,EACjC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,GAAS,EAAE;oBAClB,QAAQ,CAAC,SAAS,CAAC,CAAC;oBACpB,IAAI,CAAC;wBACH,aAAa,CAAC,IAAI,CAAC,CAAC;wBACpB,MAAM,QAAQ,EAAE,CAAC;wBACjB,aAAa,CAAC,KAAK,CAAC,CAAC;wBACrB,OAAO,CAAC,IAAI,CAAC,CAAC;oBAChB,CAAC;oBAAC,WAAM,CAAC;wBACP,aAAa,CAAC,KAAK,CAAC,CAAC;oBACvB,CAAC;gBACH,CAAC,CAAA,IAEA,CAAC,CAAC,cAAc,CAAC,CACX;YACT,oBAAC,mBAAM,IACL,GAAG,EAAC,QAAQ,EACZ,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,EAAE,CAAC;gBACZ,CAAC,EACD,UAAU,EAAE,UAAU,IAErB,CAAC,CAAC,QAAQ,CAAC,CACL,CACG,CACR,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FleetDetailsContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/FleetDetails/FleetDetailsContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"FleetDetailsContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Fleet/FleetDetails/FleetDetailsContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,KAAK,EAAgB,MAAM,kBAAkB,CAAC;AAavD,QAAA,MAAM,mBAAmB;WAAwB,KAAK;uBAwErD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
5
|
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const types_1 = require("@flightctl/types");
|
|
6
7
|
const FlightCtlDescriptionList_1 = tslib_1.__importDefault(require("../../common/FlightCtlDescriptionList"));
|
|
7
8
|
const LabelsView_1 = tslib_1.__importDefault(require("../../common/LabelsView"));
|
|
8
9
|
const dates_1 = require("../../../utils/dates");
|
|
@@ -13,6 +14,7 @@ const FleetOwnerLink_1 = tslib_1.__importDefault(require("./FleetOwnerLink"));
|
|
|
13
14
|
const FleetDevicesCharts_1 = tslib_1.__importDefault(require("./FleetDevicesCharts"));
|
|
14
15
|
const FleetStatus_1 = tslib_1.__importDefault(require("../FleetStatus"));
|
|
15
16
|
const FleetDevicesCount_1 = tslib_1.__importDefault(require("./FleetDevicesCount"));
|
|
17
|
+
const EventsCard_1 = tslib_1.__importDefault(require("../../Events/EventsCard"));
|
|
16
18
|
const FleetDetailsContent = ({ fleet }) => {
|
|
17
19
|
var _a, _b, _c, _d;
|
|
18
20
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
@@ -20,7 +22,7 @@ const FleetDetailsContent = ({ fleet }) => {
|
|
|
20
22
|
const devicesSummary = (_a = fleet.status) === null || _a === void 0 ? void 0 : _a.devicesSummary;
|
|
21
23
|
const rolloutError = (0, fleet_1.getFleetRolloutStatusWarning)(fleet, t);
|
|
22
24
|
return (React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
23
|
-
React.createElement(react_core_1.GridItem, { md:
|
|
25
|
+
React.createElement(react_core_1.GridItem, { md: 9 },
|
|
24
26
|
React.createElement(react_core_1.Card, null,
|
|
25
27
|
React.createElement(react_core_1.CardTitle, null, t('Details')),
|
|
26
28
|
React.createElement(react_core_1.CardBody, null,
|
|
@@ -50,12 +52,13 @@ const FleetDetailsContent = ({ fleet }) => {
|
|
|
50
52
|
React.createElement(react_core_1.DescriptionListGroup, null,
|
|
51
53
|
React.createElement(react_core_1.DescriptionListTerm, null, t('Sources ({{size}})', { size: ((_d = fleet.spec.template.spec.config) === null || _d === void 0 ? void 0 : _d.length) || 0 })),
|
|
52
54
|
React.createElement(react_core_1.DescriptionListDescription, null,
|
|
53
|
-
React.createElement(RepositorySourceList_1.default, { configs: fleet.spec.template.spec.config || [] }))))))
|
|
54
|
-
|
|
55
|
-
React.createElement(react_core_1.Card, null,
|
|
55
|
+
React.createElement(RepositorySourceList_1.default, { configs: fleet.spec.template.spec.config || [] })))))),
|
|
56
|
+
devicesSummary && (React.createElement(react_core_1.Card, { className: "pf-v5-u-mt-md" },
|
|
56
57
|
React.createElement(react_core_1.CardTitle, null, t('Fleet devices')),
|
|
57
58
|
React.createElement(react_core_1.CardBody, null,
|
|
58
|
-
React.createElement(FleetDevicesCharts_1.default, { fleetId: fleetId, devicesSummary: devicesSummary })))))
|
|
59
|
+
React.createElement(FleetDevicesCharts_1.default, { fleetId: fleetId, devicesSummary: devicesSummary }))))),
|
|
60
|
+
React.createElement(react_core_1.GridItem, { md: 3 },
|
|
61
|
+
React.createElement(EventsCard_1.default, { kind: types_1.ResourceKind.FLEET, objId: fleetId }))));
|
|
59
62
|
};
|
|
60
63
|
exports.default = FleetDetailsContent;
|
|
61
64
|
//# sourceMappingURL=FleetDetailsContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FleetDetailsContent.js","sourceRoot":"","sources":["../../../../../src/components/Fleet/FleetDetails/FleetDetailsContent.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,uDASgC;
|
|
1
|
+
{"version":3,"file":"FleetDetailsContent.js","sourceRoot":"","sources":["../../../../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