@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
|
@@ -3,24 +3,38 @@ import * as React from 'react';
|
|
|
3
3
|
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
4
4
|
import TextField from '../../../form/TextField';
|
|
5
5
|
import LearnMoreLink from '../../../common/LearnMoreLink';
|
|
6
|
-
import { CREATING_APPLICATIONS_LINK } from '../../../../links';
|
|
7
6
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
7
|
+
import { useAppLinks } from '../../../../hooks/useAppLinks';
|
|
8
8
|
import { ImageAppForm } from '../../../../types/deviceSpec';
|
|
9
9
|
|
|
10
|
-
const ApplicationImageForm = ({
|
|
10
|
+
const ApplicationImageForm = ({
|
|
11
|
+
app,
|
|
12
|
+
index,
|
|
13
|
+
isReadOnly,
|
|
14
|
+
}: {
|
|
15
|
+
app: ImageAppForm;
|
|
16
|
+
index: number;
|
|
17
|
+
isReadOnly?: boolean;
|
|
18
|
+
}) => {
|
|
11
19
|
const { t } = useTranslation();
|
|
20
|
+
const createAppLink = useAppLinks('createApp');
|
|
21
|
+
|
|
12
22
|
return (
|
|
13
23
|
<FormGroupWithHelperText
|
|
14
24
|
label={t('Image')}
|
|
15
25
|
content={
|
|
16
26
|
<span>
|
|
17
|
-
{t('The application image. Learn how to create one')}{'
|
|
18
|
-
<LearnMoreLink text={t('here')} link={CREATING_APPLICATIONS_LINK} />
|
|
27
|
+
{t('The application image. Learn how to create one')} <LearnMoreLink text={t('here')} link={createAppLink} />
|
|
19
28
|
</span>
|
|
20
29
|
}
|
|
21
30
|
isRequired
|
|
22
31
|
>
|
|
23
|
-
<TextField
|
|
32
|
+
<TextField
|
|
33
|
+
aria-label={t('Image')}
|
|
34
|
+
name={`applications.${index}.image`}
|
|
35
|
+
value={app.image || ''}
|
|
36
|
+
isDisabled={isReadOnly}
|
|
37
|
+
/>
|
|
24
38
|
</FormGroupWithHelperText>
|
|
25
39
|
);
|
|
26
40
|
};
|
|
@@ -17,9 +17,10 @@ type InlineApplicationFileFormProps = {
|
|
|
17
17
|
file: InlineAppForm['files'][0];
|
|
18
18
|
fileFieldName: string;
|
|
19
19
|
fileIndex: number;
|
|
20
|
+
isReadOnly?: boolean;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
const InlineApplicationFileForm = ({ file, fileIndex, fileFieldName }: InlineApplicationFileFormProps) => {
|
|
23
|
+
const InlineApplicationFileForm = ({ file, fileIndex, fileFieldName, isReadOnly }: InlineApplicationFileFormProps) => {
|
|
23
24
|
const { t } = useTranslation();
|
|
24
25
|
return (
|
|
25
26
|
<ExpandableFormSection
|
|
@@ -29,21 +30,42 @@ const InlineApplicationFileForm = ({ file, fileIndex, fileFieldName }: InlineApp
|
|
|
29
30
|
>
|
|
30
31
|
<Grid hasGutter>
|
|
31
32
|
<FormGroup label={t('File path on the device (relative)')} isRequired>
|
|
32
|
-
<TextField name={`${fileFieldName}.path`} />
|
|
33
|
+
<TextField name={`${fileFieldName}.path`} isDisabled={isReadOnly} />
|
|
33
34
|
</FormGroup>
|
|
34
|
-
<UploadField
|
|
35
|
+
<UploadField
|
|
36
|
+
label={t('Content')}
|
|
37
|
+
name={`${fileFieldName}.content`}
|
|
38
|
+
maxFileBytes={MAX_INLINE_FILE_SIZE_BYTES}
|
|
39
|
+
isDisabled={isReadOnly}
|
|
40
|
+
/>
|
|
35
41
|
|
|
36
42
|
<FormGroup>
|
|
37
|
-
<CheckboxField
|
|
43
|
+
<CheckboxField
|
|
44
|
+
name={`${fileFieldName}.base64`}
|
|
45
|
+
label={t('Content is base64 encoded')}
|
|
46
|
+
isDisabled={isReadOnly}
|
|
47
|
+
/>
|
|
38
48
|
</FormGroup>
|
|
39
49
|
</Grid>
|
|
40
50
|
</ExpandableFormSection>
|
|
41
51
|
);
|
|
42
52
|
};
|
|
43
53
|
|
|
44
|
-
const ApplicationInlineForm = ({
|
|
54
|
+
const ApplicationInlineForm = ({
|
|
55
|
+
app,
|
|
56
|
+
index,
|
|
57
|
+
isReadOnly,
|
|
58
|
+
}: {
|
|
59
|
+
app: InlineAppForm;
|
|
60
|
+
index: number;
|
|
61
|
+
isReadOnly?: boolean;
|
|
62
|
+
}) => {
|
|
45
63
|
const { t } = useTranslation();
|
|
46
64
|
|
|
65
|
+
if (isReadOnly && !app.files?.length) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
|
|
47
69
|
return (
|
|
48
70
|
<FieldArray name={`applications.${index}.files`}>
|
|
49
71
|
{({ push, remove }) => (
|
|
@@ -53,9 +75,14 @@ const ApplicationInlineForm = ({ app, index }: { app: InlineAppForm; index: numb
|
|
|
53
75
|
return (
|
|
54
76
|
<Split key={fileIndex} hasGutter>
|
|
55
77
|
<SplitItem isFilled>
|
|
56
|
-
<InlineApplicationFileForm
|
|
78
|
+
<InlineApplicationFileForm
|
|
79
|
+
file={file}
|
|
80
|
+
fileIndex={fileIndex}
|
|
81
|
+
fileFieldName={fieldName}
|
|
82
|
+
isReadOnly={isReadOnly}
|
|
83
|
+
/>
|
|
57
84
|
</SplitItem>
|
|
58
|
-
{app.files.length > 1 && (
|
|
85
|
+
{!isReadOnly && app.files.length > 1 && (
|
|
59
86
|
<SplitItem>
|
|
60
87
|
<Button
|
|
61
88
|
aria-label={t('Delete file')}
|
|
@@ -69,22 +96,25 @@ const ApplicationInlineForm = ({ app, index }: { app: InlineAppForm; index: numb
|
|
|
69
96
|
</Split>
|
|
70
97
|
);
|
|
71
98
|
})}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
|
|
100
|
+
{!isReadOnly && (
|
|
101
|
+
<FormGroup>
|
|
102
|
+
<Button
|
|
103
|
+
variant="link"
|
|
104
|
+
icon={<PlusCircleIcon />}
|
|
105
|
+
iconPosition="start"
|
|
106
|
+
onClick={() => {
|
|
107
|
+
push({
|
|
108
|
+
path: '',
|
|
109
|
+
content: '',
|
|
110
|
+
base64: false,
|
|
111
|
+
});
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
{t('Add file')}
|
|
115
|
+
</Button>
|
|
116
|
+
</FormGroup>
|
|
117
|
+
)}
|
|
88
118
|
</>
|
|
89
119
|
)}
|
|
90
120
|
</FieldArray>
|
|
@@ -23,7 +23,7 @@ import ApplicationInlineForm from './ApplicationInlineForm';
|
|
|
23
23
|
|
|
24
24
|
import './ApplicationsForm.css';
|
|
25
25
|
|
|
26
|
-
const ApplicationSection = ({ index }: { index: number }) => {
|
|
26
|
+
const ApplicationSection = ({ index, isReadOnly }: { index: number; isReadOnly?: boolean }) => {
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const appFieldName = `applications[${index}]`;
|
|
29
29
|
const [{ value: app }, { error }, { setValue }] = useField<AppForm>(appFieldName);
|
|
@@ -76,6 +76,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
76
76
|
items={appTypes}
|
|
77
77
|
name={`${appFieldName}.specType`}
|
|
78
78
|
placeholderText={t('Select an application type')}
|
|
79
|
+
isDisabled={isReadOnly}
|
|
79
80
|
/>
|
|
80
81
|
</FormGroup>
|
|
81
82
|
|
|
@@ -88,11 +89,11 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
88
89
|
}
|
|
89
90
|
isRequired={app.specType === AppSpecType.INLINE}
|
|
90
91
|
>
|
|
91
|
-
<TextField aria-label={t('Application name')} name={`${appFieldName}.name`} />
|
|
92
|
+
<TextField aria-label={t('Application name')} name={`${appFieldName}.name`} isDisabled={isReadOnly} />
|
|
92
93
|
</FormGroupWithHelperText>
|
|
93
94
|
|
|
94
|
-
{isImageAppForm(app) && <ApplicationImageForm app={app} index={index} />}
|
|
95
|
-
{isInlineAppForm(app) && <ApplicationInlineForm app={app} index={index} />}
|
|
95
|
+
{isImageAppForm(app) && <ApplicationImageForm app={app} index={index} isReadOnly={isReadOnly} />}
|
|
96
|
+
{isInlineAppForm(app) && <ApplicationInlineForm app={app} index={index} isReadOnly={isReadOnly} />}
|
|
96
97
|
|
|
97
98
|
<FieldArray name={`${appFieldName}.variables`}>
|
|
98
99
|
{({ push, remove }) => (
|
|
@@ -108,6 +109,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
108
109
|
aria-label={t('Name')}
|
|
109
110
|
name={`${appFieldName}.variables.${varIndex}.name`}
|
|
110
111
|
value={variable.name}
|
|
112
|
+
isDisabled={isReadOnly}
|
|
111
113
|
/>
|
|
112
114
|
</FormGroup>
|
|
113
115
|
</SplitItem>
|
|
@@ -117,33 +119,38 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
117
119
|
aria-label={t('Value')}
|
|
118
120
|
name={`${appFieldName}.variables.${varIndex}.value`}
|
|
119
121
|
value={variable.value}
|
|
122
|
+
isDisabled={isReadOnly}
|
|
120
123
|
/>
|
|
121
124
|
</FormGroup>
|
|
122
125
|
</SplitItem>
|
|
123
|
-
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
{!isReadOnly && (
|
|
127
|
+
<SplitItem>
|
|
128
|
+
<Button
|
|
129
|
+
aria-label={t('Delete variable')}
|
|
130
|
+
variant="link"
|
|
131
|
+
icon={<MinusCircleIcon />}
|
|
132
|
+
iconPosition="end"
|
|
133
|
+
onClick={() => remove(varIndex)}
|
|
134
|
+
/>
|
|
135
|
+
</SplitItem>
|
|
136
|
+
)}
|
|
132
137
|
</Split>
|
|
133
138
|
))}
|
|
134
139
|
<ErrorHelperText error={appVarsError} />
|
|
135
|
-
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
{!isReadOnly && (
|
|
141
|
+
<FormGroup>
|
|
142
|
+
<Button
|
|
143
|
+
variant="link"
|
|
144
|
+
icon={<PlusCircleIcon />}
|
|
145
|
+
iconPosition="start"
|
|
146
|
+
onClick={() => {
|
|
147
|
+
push({ name: '', value: '' });
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
{t('Add an application variable')}
|
|
151
|
+
</Button>
|
|
152
|
+
</FormGroup>
|
|
153
|
+
)}
|
|
147
154
|
</>
|
|
148
155
|
)}
|
|
149
156
|
</FieldArray>
|
|
@@ -152,9 +159,12 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
152
159
|
);
|
|
153
160
|
};
|
|
154
161
|
|
|
155
|
-
const ApplicationTemplates = () => {
|
|
162
|
+
const ApplicationTemplates = ({ isReadOnly }: { isReadOnly?: boolean }) => {
|
|
156
163
|
const { t } = useTranslation();
|
|
157
164
|
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
165
|
+
if (isReadOnly && values.applications.length === 0) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
158
168
|
|
|
159
169
|
return (
|
|
160
170
|
<FormGroupWithHelperText
|
|
@@ -168,37 +178,42 @@ const ApplicationTemplates = () => {
|
|
|
168
178
|
<FormSection key={index}>
|
|
169
179
|
<Split hasGutter>
|
|
170
180
|
<SplitItem isFilled>
|
|
171
|
-
<ApplicationSection index={index} />
|
|
172
|
-
</SplitItem>
|
|
173
|
-
<SplitItem>
|
|
174
|
-
<Button
|
|
175
|
-
aria-label={t('Delete application')}
|
|
176
|
-
variant="link"
|
|
177
|
-
icon={<MinusCircleIcon />}
|
|
178
|
-
iconPosition="start"
|
|
179
|
-
onClick={() => remove(index)}
|
|
180
|
-
/>
|
|
181
|
+
<ApplicationSection index={index} isReadOnly={isReadOnly} />
|
|
181
182
|
</SplitItem>
|
|
183
|
+
{!isReadOnly && (
|
|
184
|
+
<SplitItem>
|
|
185
|
+
<Button
|
|
186
|
+
aria-label={t('Delete application')}
|
|
187
|
+
variant="link"
|
|
188
|
+
icon={<MinusCircleIcon />}
|
|
189
|
+
iconPosition="start"
|
|
190
|
+
onClick={() => remove(index)}
|
|
191
|
+
/>
|
|
192
|
+
</SplitItem>
|
|
193
|
+
)}
|
|
182
194
|
</Split>
|
|
183
195
|
</FormSection>
|
|
184
196
|
))}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
|
|
198
|
+
{!isReadOnly && (
|
|
199
|
+
<FormSection>
|
|
200
|
+
<FormGroup>
|
|
201
|
+
<Button
|
|
202
|
+
variant="link"
|
|
203
|
+
icon={<PlusCircleIcon />}
|
|
204
|
+
iconPosition="start"
|
|
205
|
+
onClick={() => {
|
|
206
|
+
push({
|
|
207
|
+
name: '',
|
|
208
|
+
variables: [],
|
|
209
|
+
});
|
|
210
|
+
}}
|
|
211
|
+
>
|
|
212
|
+
{t('Add application')}
|
|
213
|
+
</Button>
|
|
214
|
+
</FormGroup>
|
|
215
|
+
</FormSection>
|
|
216
|
+
)}
|
|
202
217
|
</>
|
|
203
218
|
)}
|
|
204
219
|
</FieldArray>
|
|
@@ -15,7 +15,7 @@ import { formatFileMode } from '../deviceSpecUtils';
|
|
|
15
15
|
|
|
16
16
|
const MAX_INLINE_FILE_SIZE_BYTES = 1024 * 1024;
|
|
17
17
|
|
|
18
|
-
const FileForm = ({ fieldName, index }: { fieldName: string; index: number }) => {
|
|
18
|
+
const FileForm = ({ fieldName, index, isReadOnly }: { fieldName: string; index: number; isReadOnly?: boolean }) => {
|
|
19
19
|
const { t } = useTranslation();
|
|
20
20
|
const [{ value: file }] = useField<InlineConfigTemplate['files'][0]>(fieldName);
|
|
21
21
|
|
|
@@ -46,11 +46,16 @@ const FileForm = ({ fieldName, index }: { fieldName: string; index: number }) =>
|
|
|
46
46
|
>
|
|
47
47
|
<Grid hasGutter>
|
|
48
48
|
<FormGroup label={t('File path on the device')} isRequired>
|
|
49
|
-
<TextField name={`${fieldName}.path`} />
|
|
49
|
+
<TextField name={`${fieldName}.path`} isDisabled={isReadOnly} />
|
|
50
50
|
</FormGroup>
|
|
51
|
-
<UploadField
|
|
51
|
+
<UploadField
|
|
52
|
+
label={t('Content')}
|
|
53
|
+
name={`${fieldName}.content`}
|
|
54
|
+
maxFileBytes={MAX_INLINE_FILE_SIZE_BYTES}
|
|
55
|
+
isDisabled={isReadOnly}
|
|
56
|
+
/>
|
|
52
57
|
<FormGroup>
|
|
53
|
-
<CheckboxField name={`${fieldName}.base64`} label={t('Content is base64 encoded')} />
|
|
58
|
+
<CheckboxField name={`${fieldName}.base64`} label={t('Content is base64 encoded')} isDisabled={isReadOnly} />
|
|
54
59
|
</FormGroup>
|
|
55
60
|
<FormGroup label={t('Permissions')}>
|
|
56
61
|
<FormSelectTypeahead
|
|
@@ -71,13 +76,14 @@ const FileForm = ({ fieldName, index }: { fieldName: string; index: number }) =>
|
|
|
71
76
|
return false;
|
|
72
77
|
}}
|
|
73
78
|
transformTypedItem={formatFileMode}
|
|
79
|
+
isDisabled={isReadOnly}
|
|
74
80
|
/>
|
|
75
81
|
</FormGroup>
|
|
76
82
|
<FormGroup label={t('User')}>
|
|
77
|
-
<TextField name={`${fieldName}.user`} placeholder="root" />
|
|
83
|
+
<TextField name={`${fieldName}.user`} placeholder="root" isDisabled={isReadOnly} />
|
|
78
84
|
</FormGroup>
|
|
79
85
|
<FormGroup label={t('Group')}>
|
|
80
|
-
<TextField name={`${fieldName}.group`} placeholder="root" />
|
|
86
|
+
<TextField name={`${fieldName}.group`} placeholder="root" isDisabled={isReadOnly} />
|
|
81
87
|
</FormGroup>
|
|
82
88
|
</Grid>
|
|
83
89
|
</ExpandableFormSection>
|
|
@@ -86,14 +92,17 @@ const FileForm = ({ fieldName, index }: { fieldName: string; index: number }) =>
|
|
|
86
92
|
|
|
87
93
|
type ConfigInlineTemplateFormProps = {
|
|
88
94
|
index: number;
|
|
95
|
+
isReadOnly?: boolean;
|
|
89
96
|
};
|
|
90
97
|
|
|
91
|
-
const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
98
|
+
const ConfigInlineTemplateForm = ({ index, isReadOnly }: ConfigInlineTemplateFormProps) => {
|
|
92
99
|
const { t } = useTranslation();
|
|
93
100
|
const { values, setFieldValue } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
94
101
|
const inlineConfig = values.configTemplates[index] as InlineConfigTemplate;
|
|
102
|
+
const configCount = inlineConfig.files?.length || 0;
|
|
103
|
+
|
|
95
104
|
React.useEffect(() => {
|
|
96
|
-
if (
|
|
105
|
+
if (configCount === 0) {
|
|
97
106
|
setFieldValue(`configTemplates.${index}.files`, [
|
|
98
107
|
{
|
|
99
108
|
path: '',
|
|
@@ -104,6 +113,10 @@ const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
|
104
113
|
// eslint-disable-next-line
|
|
105
114
|
}, []);
|
|
106
115
|
|
|
116
|
+
if (isReadOnly && configCount === 0) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
|
|
107
120
|
return (
|
|
108
121
|
<FieldArray name={`configTemplates.${index}.files`}>
|
|
109
122
|
{({ push, remove }) => (
|
|
@@ -113,9 +126,9 @@ const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
|
113
126
|
return (
|
|
114
127
|
<Split key={fileIndex} hasGutter>
|
|
115
128
|
<SplitItem isFilled>
|
|
116
|
-
<FileForm index={fileIndex} fieldName={fieldName} />
|
|
129
|
+
<FileForm index={fileIndex} fieldName={fieldName} isReadOnly={isReadOnly} />
|
|
117
130
|
</SplitItem>
|
|
118
|
-
{
|
|
131
|
+
{!isReadOnly && configCount > 1 && (
|
|
119
132
|
<SplitItem>
|
|
120
133
|
<Button
|
|
121
134
|
aria-label={t('Delete file')}
|
|
@@ -129,21 +142,23 @@ const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
|
129
142
|
</Split>
|
|
130
143
|
);
|
|
131
144
|
})}
|
|
132
|
-
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
{!isReadOnly && (
|
|
146
|
+
<FormGroup>
|
|
147
|
+
<Button
|
|
148
|
+
variant="link"
|
|
149
|
+
icon={<PlusCircleIcon />}
|
|
150
|
+
iconPosition="start"
|
|
151
|
+
onClick={() => {
|
|
152
|
+
push({
|
|
153
|
+
path: '',
|
|
154
|
+
content: '',
|
|
155
|
+
});
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
{t('Add file')}
|
|
159
|
+
</Button>
|
|
160
|
+
</FormGroup>
|
|
161
|
+
)}
|
|
147
162
|
</>
|
|
148
163
|
)}
|
|
149
164
|
</FieldArray>
|
|
@@ -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,6 +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')}
|
|
88
|
+
isDisabled={isReadOnly}
|
|
78
89
|
/>
|
|
79
90
|
</FormGroupWithHelperText>
|
|
80
91
|
<FormGroupWithHelperText
|
|
@@ -87,6 +98,7 @@ const GitConfigForm = ({ template, index }: { template: GitConfigTemplate; index
|
|
|
87
98
|
name={`configTemplates[${index}].mountPath`}
|
|
88
99
|
value={template.mountPath}
|
|
89
100
|
placeholder={t('/absolute/path')}
|
|
101
|
+
isDisabled={isReadOnly}
|
|
90
102
|
/>
|
|
91
103
|
</FormGroupWithHelperText>
|
|
92
104
|
</>
|
|
@@ -97,10 +109,12 @@ const HttpConfigForm = ({
|
|
|
97
109
|
template,
|
|
98
110
|
baseURL,
|
|
99
111
|
index,
|
|
112
|
+
isReadOnly,
|
|
100
113
|
}: {
|
|
101
114
|
template: HttpConfigTemplate;
|
|
102
115
|
index: number;
|
|
103
116
|
baseURL?: string;
|
|
117
|
+
isReadOnly?: boolean;
|
|
104
118
|
}) => {
|
|
105
119
|
const { t } = useTranslation();
|
|
106
120
|
|
|
@@ -129,6 +143,7 @@ const HttpConfigForm = ({
|
|
|
129
143
|
name={`configTemplates[${index}].suffix`}
|
|
130
144
|
value={template.suffix || ''}
|
|
131
145
|
helperText={suffixHelperText}
|
|
146
|
+
isDisabled={isReadOnly}
|
|
132
147
|
/>
|
|
133
148
|
</FormGroupWithHelperText>
|
|
134
149
|
<FormGroupWithHelperText
|
|
@@ -141,6 +156,7 @@ const HttpConfigForm = ({
|
|
|
141
156
|
name={`configTemplates[${index}].filePath`}
|
|
142
157
|
value={template.filePath || ''}
|
|
143
158
|
placeholder={t('/absolute/path')}
|
|
159
|
+
isDisabled={isReadOnly}
|
|
144
160
|
/>
|
|
145
161
|
</FormGroupWithHelperText>
|
|
146
162
|
</>
|
|
@@ -152,6 +168,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
152
168
|
index,
|
|
153
169
|
repositories,
|
|
154
170
|
repoRefetch,
|
|
171
|
+
isReadOnly,
|
|
155
172
|
canCreateRepo,
|
|
156
173
|
}: ConfigWithRepositoryTemplateFormProps) => {
|
|
157
174
|
const { t } = useTranslation();
|
|
@@ -159,9 +176,17 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
159
176
|
const [createRepoModalOpen, setCreateRepoModalOpen] = React.useState(false);
|
|
160
177
|
|
|
161
178
|
const ct = values.configTemplates[index] as HttpConfigTemplate | GitConfigTemplate;
|
|
162
|
-
const selectedRepoName = ct
|
|
179
|
+
const selectedRepoName = ct.repository;
|
|
180
|
+
|
|
181
|
+
const repositoryItems = isReadOnly
|
|
182
|
+
? {
|
|
183
|
+
[selectedRepoName]: {
|
|
184
|
+
label: selectedRepoName,
|
|
185
|
+
description: '',
|
|
186
|
+
},
|
|
187
|
+
}
|
|
188
|
+
: getRepositoryItems(t, repositories, repoType, selectedRepoName);
|
|
163
189
|
|
|
164
|
-
const repositoryItems = getRepositoryItems(t, repositories, repoType, selectedRepoName);
|
|
165
190
|
const selectedRepo = repositories.find((repo) => repo.metadata.name === selectedRepoName);
|
|
166
191
|
return (
|
|
167
192
|
<>
|
|
@@ -171,6 +196,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
171
196
|
items={repositoryItems}
|
|
172
197
|
withStatusIcon
|
|
173
198
|
placeholderText={t('Select a repository')}
|
|
199
|
+
isDisabled={isReadOnly}
|
|
174
200
|
>
|
|
175
201
|
{canCreateRepo && (
|
|
176
202
|
<MenuFooter>
|
|
@@ -181,6 +207,7 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
181
207
|
onClick={() => {
|
|
182
208
|
setCreateRepoModalOpen(true);
|
|
183
209
|
}}
|
|
210
|
+
isDisabled={isReadOnly}
|
|
184
211
|
>
|
|
185
212
|
{t('Create repository')}
|
|
186
213
|
</Button>
|
|
@@ -188,9 +215,16 @@ const ConfigWithRepositoryTemplateForm = ({
|
|
|
188
215
|
)}
|
|
189
216
|
</FormSelect>
|
|
190
217
|
</FormGroup>
|
|
191
|
-
{repoType === RepoSpecType.GIT &&
|
|
218
|
+
{repoType === RepoSpecType.GIT && (
|
|
219
|
+
<GitConfigForm template={ct as GitConfigTemplate} index={index} isReadOnly={isReadOnly} />
|
|
220
|
+
)}
|
|
192
221
|
{repoType === RepoSpecType.HTTP && (
|
|
193
|
-
<HttpConfigForm
|
|
222
|
+
<HttpConfigForm
|
|
223
|
+
template={ct as HttpConfigTemplate}
|
|
224
|
+
index={index}
|
|
225
|
+
baseURL={selectedRepo?.spec.url}
|
|
226
|
+
isReadOnly={isReadOnly}
|
|
227
|
+
/>
|
|
194
228
|
)}
|
|
195
229
|
{createRepoModalOpen && (
|
|
196
230
|
<CreateRepositoryModal
|