@flightctl/ui-components 0.7.1 → 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,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { Alert, Button, Modal, Spinner, Stack, StackItem, Text, TextContent } from '@patternfly/react-core';
|
|
4
2
|
import { Trans } from 'react-i18next';
|
|
3
|
+
import { Alert, Button, Spinner, Stack, StackItem, Text, TextContent } from '@patternfly/react-core';
|
|
4
|
+
import { Modal, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core/next';
|
|
5
5
|
|
|
6
6
|
import { ResourceSyncList } from '@flightctl/types';
|
|
7
7
|
|
|
@@ -63,7 +63,7 @@ const DeleteRepositoryModal = ({ repositoryId, onClose, onDeleteSuccess }: Delet
|
|
|
63
63
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
64
|
}, [get, repositoryId]);
|
|
65
65
|
|
|
66
|
-
useEffect(() => {
|
|
66
|
+
React.useEffect(() => {
|
|
67
67
|
void loadRS();
|
|
68
68
|
}, [loadRS]);
|
|
69
69
|
|
|
@@ -83,14 +83,54 @@ const DeleteRepositoryModal = ({ repositoryId, onClose, onDeleteSuccess }: Delet
|
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
return (
|
|
86
|
-
<Modal
|
|
87
|
-
title={t('Delete repository ?')}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
<Modal isOpen onClose={onClose} variant={hasResourceSyncs ? 'medium' : 'small'}>
|
|
87
|
+
<ModalHeader title={t('Delete repository ?')} titleIconVariant="warning" />
|
|
88
|
+
<ModalBody>
|
|
89
|
+
<Stack hasGutter>
|
|
90
|
+
{hasResourceSyncs && (
|
|
91
|
+
<StackItem>
|
|
92
|
+
<TextContent>
|
|
93
|
+
<Text>
|
|
94
|
+
{t(
|
|
95
|
+
'This repository defines resource syncs. By deleting the repository, its resource syncs will also be deleted.',
|
|
96
|
+
)}
|
|
97
|
+
</Text>
|
|
98
|
+
<Text>
|
|
99
|
+
{t(
|
|
100
|
+
`Any fleet that is being managed by this repository's resource syncs, will stop being managed by the service.`,
|
|
101
|
+
)}
|
|
102
|
+
</Text>
|
|
103
|
+
</TextContent>
|
|
104
|
+
</StackItem>
|
|
105
|
+
)}
|
|
106
|
+
{rsError ? (
|
|
107
|
+
<Alert isInline variant="warning" title={t('Cannot delete repository')}>
|
|
108
|
+
{rsError}
|
|
109
|
+
</Alert>
|
|
110
|
+
) : (
|
|
111
|
+
<StackItem>
|
|
112
|
+
<Trans t={t}>
|
|
113
|
+
Are you sure you want to delete the repository <b>{repositoryId}</b>?
|
|
114
|
+
</Trans>
|
|
115
|
+
</StackItem>
|
|
116
|
+
)}
|
|
117
|
+
{(isDeleting && message) ||
|
|
118
|
+
(isLoadingRSs && (
|
|
119
|
+
<StackItem>
|
|
120
|
+
<Spinner size="sm" /> {isLoadingRSs ? t('Checking if the repository has resource syncs') : message}
|
|
121
|
+
</StackItem>
|
|
122
|
+
))}
|
|
123
|
+
{error && (
|
|
124
|
+
<StackItem>
|
|
125
|
+
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
126
|
+
{error}
|
|
127
|
+
</Alert>
|
|
128
|
+
</StackItem>
|
|
129
|
+
)}
|
|
130
|
+
</Stack>
|
|
131
|
+
</ModalBody>
|
|
132
|
+
<ModalFooter>
|
|
133
|
+
{rsError ? (
|
|
94
134
|
<Button variant="primary" onClick={loadRS}>
|
|
95
135
|
{t('Reload resource syncs')}
|
|
96
136
|
</Button>
|
|
@@ -105,52 +145,11 @@ const DeleteRepositoryModal = ({ repositoryId, onClose, onDeleteSuccess }: Delet
|
|
|
105
145
|
>
|
|
106
146
|
{t('Delete repository')}
|
|
107
147
|
</Button>
|
|
108
|
-
)
|
|
148
|
+
)}
|
|
109
149
|
<Button key="cancel" variant="link" onClick={onClose} isDisabled={isDeleting}>
|
|
110
150
|
{t('Cancel')}
|
|
111
|
-
</Button
|
|
112
|
-
|
|
113
|
-
>
|
|
114
|
-
<Stack hasGutter>
|
|
115
|
-
{hasResourceSyncs && (
|
|
116
|
-
<StackItem>
|
|
117
|
-
<TextContent>
|
|
118
|
-
<Text>
|
|
119
|
-
{t(
|
|
120
|
-
'This repository defines resource syncs. By deleting the repository, its resource syncs will also be deleted.',
|
|
121
|
-
)}
|
|
122
|
-
{t(
|
|
123
|
-
`Any fleet that is being managed by this repository's resource syncs, will stop being managed by the service.`,
|
|
124
|
-
)}
|
|
125
|
-
</Text>
|
|
126
|
-
</TextContent>
|
|
127
|
-
</StackItem>
|
|
128
|
-
)}
|
|
129
|
-
{rsError ? (
|
|
130
|
-
<Alert isInline variant="warning" title={t('Cannot delete repository')}>
|
|
131
|
-
{rsError}
|
|
132
|
-
</Alert>
|
|
133
|
-
) : (
|
|
134
|
-
<StackItem>
|
|
135
|
-
<Trans t={t}>
|
|
136
|
-
Are you sure you want to delete the repository <b>{repositoryId}</b>?
|
|
137
|
-
</Trans>
|
|
138
|
-
</StackItem>
|
|
139
|
-
)}
|
|
140
|
-
{(isDeleting && message) ||
|
|
141
|
-
(isLoadingRSs && (
|
|
142
|
-
<StackItem>
|
|
143
|
-
<Spinner size="sm" /> {isLoadingRSs ? t('Checking if the repository has resource syncs') : message}
|
|
144
|
-
</StackItem>
|
|
145
|
-
))}
|
|
146
|
-
{error && (
|
|
147
|
-
<StackItem>
|
|
148
|
-
<Alert isInline variant="danger" title={t('An error occurred')}>
|
|
149
|
-
{error}
|
|
150
|
-
</Alert>
|
|
151
|
-
</StackItem>
|
|
152
|
-
)}
|
|
153
|
-
</Stack>
|
|
151
|
+
</Button>
|
|
152
|
+
</ModalFooter>
|
|
154
153
|
</Modal>
|
|
155
154
|
);
|
|
156
155
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DropdownItem, DropdownList, Grid, GridItem } from '@patternfly/react-core';
|
|
2
|
+
import { Card, CardBody, DropdownItem, DropdownList, Grid, GridItem, Nav, NavList } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
4
|
import { useFetchPeriodically } from '../../../hooks/useFetchPeriodically';
|
|
5
|
-
import { RepoSpecType, Repository } from '@flightctl/types';
|
|
5
|
+
import { RepoSpecType, Repository, ResourceKind } from '@flightctl/types';
|
|
6
6
|
|
|
7
7
|
import DetailsPage from '../../DetailsPage/DetailsPage';
|
|
8
8
|
import DetailsPageActions from '../../DetailsPage/DetailsPageActions';
|
|
@@ -15,14 +15,17 @@ import { useAppContext } from '../../../hooks/useAppContext';
|
|
|
15
15
|
import { useAccessReview } from '../../../hooks/useAccessReview';
|
|
16
16
|
import { RESOURCE, VERB } from '../../../types/rbac';
|
|
17
17
|
import PageWithPermissions from '../../common/PageWithPermissions';
|
|
18
|
+
import YamlEditor from '../../common/CodeEditor/YamlEditor';
|
|
19
|
+
import EventsCard from '../../Events/EventsCard';
|
|
20
|
+
import NavItem from '../../NavItem/NavItem';
|
|
18
21
|
|
|
19
22
|
const RepositoryDetails = () => {
|
|
20
23
|
const { t } = useTranslation();
|
|
21
24
|
const {
|
|
22
|
-
router: { useParams },
|
|
25
|
+
router: { useParams, Routes, Route, Navigate },
|
|
23
26
|
} = useAppContext();
|
|
24
27
|
const { repositoryId } = useParams() as { repositoryId: string };
|
|
25
|
-
const [repoDetails, isLoading, error] = useFetchPeriodically<Required<Repository>>({
|
|
28
|
+
const [repoDetails, isLoading, error, refetch] = useFetchPeriodically<Required<Repository>>({
|
|
26
29
|
endpoint: `repositories/${repositoryId}`,
|
|
27
30
|
});
|
|
28
31
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = React.useState<boolean>(false);
|
|
@@ -62,19 +65,49 @@ const RepositoryDetails = () => {
|
|
|
62
65
|
</DetailsPageActions>
|
|
63
66
|
)
|
|
64
67
|
}
|
|
68
|
+
nav={
|
|
69
|
+
<Nav variant="tertiary">
|
|
70
|
+
<NavList>
|
|
71
|
+
<NavItem to="details">{t('Details')}</NavItem>
|
|
72
|
+
<NavItem to="yaml">{t('YAML')}</NavItem>
|
|
73
|
+
</NavList>
|
|
74
|
+
</Nav>
|
|
75
|
+
}
|
|
65
76
|
>
|
|
66
77
|
{repoDetails && (
|
|
67
78
|
<>
|
|
68
|
-
<
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
<Routes>
|
|
80
|
+
<Route index element={<Navigate to="details" replace />} />
|
|
81
|
+
|
|
82
|
+
<Route
|
|
83
|
+
path="details"
|
|
84
|
+
element={
|
|
85
|
+
<Grid hasGutter>
|
|
86
|
+
<GridItem md={9}>
|
|
87
|
+
<Card>
|
|
88
|
+
<CardBody>
|
|
89
|
+
<RepositoryGeneralDetailsCard repoDetails={repoDetails} />
|
|
90
|
+
</CardBody>
|
|
91
|
+
</Card>
|
|
92
|
+
{canListRS && repoDetails.spec.type !== RepoSpecType.HTTP && (
|
|
93
|
+
<Card>
|
|
94
|
+
<CardBody>
|
|
95
|
+
<RepositoryResourceSyncsCard repositoryId={repositoryId} />
|
|
96
|
+
</CardBody>
|
|
97
|
+
</Card>
|
|
98
|
+
)}
|
|
99
|
+
</GridItem>
|
|
100
|
+
<GridItem md={3}>
|
|
101
|
+
<EventsCard kind={ResourceKind.REPOSITORY} objId={repositoryId} />
|
|
102
|
+
</GridItem>
|
|
103
|
+
</Grid>
|
|
104
|
+
}
|
|
105
|
+
/>
|
|
106
|
+
<Route
|
|
107
|
+
path="yaml"
|
|
108
|
+
element={<YamlEditor filename={repositoryId} apiObj={repoDetails} refetch={refetch} />}
|
|
109
|
+
/>
|
|
110
|
+
</Routes>
|
|
78
111
|
{isDeleteModalOpen && (
|
|
79
112
|
<DeleteRepositoryModal
|
|
80
113
|
onClose={() => setIsDeleteModalOpen(false)}
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
EmptyStateActions,
|
|
7
7
|
EmptyStateBody,
|
|
8
8
|
EmptyStateFooter,
|
|
9
|
-
Modal,
|
|
10
9
|
Toolbar,
|
|
11
10
|
ToolbarContent,
|
|
12
11
|
ToolbarGroup,
|
|
13
12
|
ToolbarItem,
|
|
14
13
|
} from '@patternfly/react-core';
|
|
14
|
+
import { Modal, ModalBody, ModalHeader } from '@patternfly/react-core/next';
|
|
15
15
|
import { TFunction } from 'i18next';
|
|
16
16
|
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
17
17
|
import { CodeBranchIcon } from '@patternfly/react-icons/dist/js/icons/code-branch-icon';
|
|
@@ -136,30 +136,33 @@ const CreateResourceSyncModal = ({
|
|
|
136
136
|
const [submitError, setSubmitError] = React.useState<string | undefined>();
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
|
-
<Modal variant="medium"
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
139
|
+
<Modal variant="medium" onClose={() => onClose()} isOpen>
|
|
140
|
+
<ModalHeader title={t('Add a resource sync')} />
|
|
141
|
+
<ModalBody>
|
|
142
|
+
<Formik<SingleResourceSyncValues>
|
|
143
|
+
initialValues={{ resourceSyncs: [{ name: '', targetRevision: '', path: '' }] }}
|
|
144
|
+
validationSchema={singleResourceSyncSchema(t, storedRSs)}
|
|
145
|
+
onSubmit={async (values: SingleResourceSyncValues) => {
|
|
146
|
+
const rsToAdd = getResourceSync(repositoryId, values.resourceSyncs[0]);
|
|
147
|
+
try {
|
|
148
|
+
await post<ResourceSync>('resourcesyncs', rsToAdd);
|
|
149
|
+
setSubmitError(undefined);
|
|
150
|
+
onClose(true);
|
|
151
|
+
} catch (e) {
|
|
152
|
+
setSubmitError(getErrorMessage(e));
|
|
153
|
+
}
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
<>
|
|
157
|
+
<CreateResourceSyncModalForm onClose={onClose} />
|
|
158
|
+
{submitError && (
|
|
159
|
+
<Alert variant="danger" title={t('Unexpected error occurred')} isInline>
|
|
160
|
+
{submitError}
|
|
161
|
+
</Alert>
|
|
162
|
+
)}
|
|
163
|
+
</>
|
|
164
|
+
</Formik>
|
|
165
|
+
</ModalBody>
|
|
163
166
|
</Modal>
|
|
164
167
|
);
|
|
165
168
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as monacoEditor from 'monaco-editor';
|
|
2
|
+
|
|
3
|
+
type Monaco = typeof monacoEditor;
|
|
4
|
+
|
|
5
|
+
// TODO import from PF6 react-tokens. These are not available in PF5
|
|
6
|
+
const t_color_green_70 = '#204d00';
|
|
7
|
+
const t_color_white = '#ffffff';
|
|
8
|
+
const t_color_black = '#000000';
|
|
9
|
+
const t_color_gray_60 = '#4d4d4d';
|
|
10
|
+
const t_color_yellow_70 = '#73480b';
|
|
11
|
+
const t_color_yellow_30 = '#ffcc17';
|
|
12
|
+
const t_color_green_30 = '#afdc8f';
|
|
13
|
+
const t_color_blue_30 = '#92c5f9';
|
|
14
|
+
const t_color_blue_70 = '#003366';
|
|
15
|
+
const t_color_purple_70 = '#21134d';
|
|
16
|
+
const t_color_purple_30 = '#b6a6e9';
|
|
17
|
+
const t_color_gray_90 = '#1f1f1f';
|
|
18
|
+
const t_color_gray_20 = '#e0e0e0';
|
|
19
|
+
|
|
20
|
+
// Defines the same color scheme as in the OCP console
|
|
21
|
+
export const defineConsoleThemes = (monaco: Monaco) => {
|
|
22
|
+
monaco.editor.defineTheme('console-light', {
|
|
23
|
+
base: 'vs',
|
|
24
|
+
inherit: true,
|
|
25
|
+
colors: {
|
|
26
|
+
'editor.background': t_color_white,
|
|
27
|
+
'editorLineNumber.activeForeground': t_color_black,
|
|
28
|
+
'editorLineNumber.foreground': t_color_gray_60,
|
|
29
|
+
},
|
|
30
|
+
rules: [
|
|
31
|
+
{ token: 'number', foreground: t_color_green_70 },
|
|
32
|
+
{ token: 'type', foreground: t_color_yellow_70 },
|
|
33
|
+
{ token: 'string', foreground: t_color_blue_70 },
|
|
34
|
+
{ token: 'keyword', foreground: t_color_purple_70 },
|
|
35
|
+
],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
monaco.editor.defineTheme('console-dark', {
|
|
39
|
+
base: 'vs-dark',
|
|
40
|
+
inherit: true,
|
|
41
|
+
colors: {
|
|
42
|
+
'editor.background': t_color_gray_90,
|
|
43
|
+
'editorLineNumber.activeForeground': t_color_white,
|
|
44
|
+
'editorLineNumber.foreground': t_color_gray_20,
|
|
45
|
+
},
|
|
46
|
+
rules: [
|
|
47
|
+
{ token: 'number', foreground: t_color_green_30 },
|
|
48
|
+
{ token: 'type', foreground: t_color_blue_30 },
|
|
49
|
+
{ token: 'string', foreground: t_color_yellow_30 },
|
|
50
|
+
{ token: 'keyword', foreground: t_color_purple_30 },
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.fctl-shortcut__cell {
|
|
2
|
+
padding-bottom: var(--pf-v5-global--spacer--md);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fctl-shortcut__cell:first-child {
|
|
6
|
+
padding-right: var(--pf-v5-global--spacer--md);
|
|
7
|
+
text-align: right;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
vertical-align: top;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.fctl-shortcut__command:not(:last-child):after {
|
|
13
|
+
content: ' + ';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.fctl-shortcut__command-key {
|
|
17
|
+
border: var(--pf-v5-global--BorderWidth--sm) solid var(--pf-v5-global--BorderColor--100);
|
|
18
|
+
border-radius: 3px;
|
|
19
|
+
color: var(--pf-v5-global--Color--200);
|
|
20
|
+
font-size: var(--pf-v5-global--FontSize--sm);
|
|
21
|
+
padding: 1px 3px;
|
|
22
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MouseIcon } from '@patternfly/react-icons/dist/js/icons/mouse-icon';
|
|
3
|
+
import upperFirst from 'lodash/upperFirst';
|
|
4
|
+
|
|
5
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
6
|
+
|
|
7
|
+
import './Shortcut.css';
|
|
8
|
+
|
|
9
|
+
interface ShortcutProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
alt?: boolean;
|
|
12
|
+
click?: boolean;
|
|
13
|
+
ctrl?: boolean;
|
|
14
|
+
ctrlCmd?: boolean;
|
|
15
|
+
drag?: boolean;
|
|
16
|
+
hover?: boolean;
|
|
17
|
+
keyName?: string;
|
|
18
|
+
rightClick?: boolean;
|
|
19
|
+
shift?: boolean;
|
|
20
|
+
dragNdrop?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ShortcutCommand = ({ children }: React.PropsWithChildren) => (
|
|
24
|
+
<span className="fctl-shortcut__command">
|
|
25
|
+
<kbd className="fctl-shortcut__command-key">{children}</kbd>
|
|
26
|
+
</span>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const isMac = window.navigator.platform.includes('Mac');
|
|
30
|
+
|
|
31
|
+
const Shortcut = ({
|
|
32
|
+
children,
|
|
33
|
+
alt,
|
|
34
|
+
click,
|
|
35
|
+
ctrl,
|
|
36
|
+
ctrlCmd,
|
|
37
|
+
drag,
|
|
38
|
+
hover,
|
|
39
|
+
keyName,
|
|
40
|
+
rightClick,
|
|
41
|
+
shift,
|
|
42
|
+
dragNdrop,
|
|
43
|
+
}: ShortcutProps) => {
|
|
44
|
+
const { t } = useTranslation();
|
|
45
|
+
return (
|
|
46
|
+
<tr role="row">
|
|
47
|
+
<td className="fctl-shortcut__cell" role="cell">
|
|
48
|
+
{(ctrl || (!isMac && ctrlCmd)) && <ShortcutCommand>Ctrl</ShortcutCommand>}
|
|
49
|
+
{alt && <ShortcutCommand>{isMac ? '⌥ Opt' : 'Alt'}</ShortcutCommand>}
|
|
50
|
+
{shift && <ShortcutCommand>Shift</ShortcutCommand>}
|
|
51
|
+
{isMac && ctrlCmd && <ShortcutCommand>⌘ Cmd</ShortcutCommand>}
|
|
52
|
+
{hover && (
|
|
53
|
+
<ShortcutCommand>
|
|
54
|
+
<MouseIcon /> {t('Hover')}
|
|
55
|
+
</ShortcutCommand>
|
|
56
|
+
)}
|
|
57
|
+
{keyName && (
|
|
58
|
+
<ShortcutCommand>
|
|
59
|
+
{keyName.length === 1 ? keyName.toUpperCase() : upperFirst(keyName.toLowerCase())}
|
|
60
|
+
</ShortcutCommand>
|
|
61
|
+
)}
|
|
62
|
+
{drag && (
|
|
63
|
+
<ShortcutCommand>
|
|
64
|
+
<MouseIcon /> {t('Drag')}
|
|
65
|
+
</ShortcutCommand>
|
|
66
|
+
)}
|
|
67
|
+
{click && (
|
|
68
|
+
<ShortcutCommand>
|
|
69
|
+
<MouseIcon /> {t('Click')}
|
|
70
|
+
</ShortcutCommand>
|
|
71
|
+
)}
|
|
72
|
+
{rightClick && (
|
|
73
|
+
<ShortcutCommand>
|
|
74
|
+
<MouseIcon /> {t('Right click')}
|
|
75
|
+
</ShortcutCommand>
|
|
76
|
+
)}
|
|
77
|
+
{dragNdrop && (
|
|
78
|
+
<ShortcutCommand>
|
|
79
|
+
<MouseIcon /> {t('Drag + Drop')}
|
|
80
|
+
</ShortcutCommand>
|
|
81
|
+
)}
|
|
82
|
+
</td>
|
|
83
|
+
<td className="fctl-shortcut__cell" role="cell">
|
|
84
|
+
{children}
|
|
85
|
+
</td>
|
|
86
|
+
</tr>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export default Shortcut;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.fctl-yaml-editor .monaco-editor {
|
|
2
|
+
min-height: 70vh;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* Style of the bar with the line numbers for light and dark themes */
|
|
6
|
+
.fctl-yaml-editor .monaco-editor .margin {
|
|
7
|
+
--vscode-editorGutter-background: #f5f5f5;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.pf-v5-theme-dark .fctl-yaml-editor .monaco-editor .margin {
|
|
11
|
+
--vscode-editorGutter-background: #292e34;
|
|
12
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Alert } from '@patternfly/react-core';
|
|
3
|
+
import { CodeEditorProps as PfCodeEditorProps } from '@patternfly/react-code-editor';
|
|
4
|
+
import { dump } from 'js-yaml';
|
|
5
|
+
|
|
6
|
+
import { Device, Fleet, Repository } from '@flightctl/types';
|
|
7
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
8
|
+
import { useAppContext } from '../../../hooks/useAppContext';
|
|
9
|
+
import YamlEditorBase from './YamlEditorBase';
|
|
10
|
+
|
|
11
|
+
import './YamlEditor.css';
|
|
12
|
+
|
|
13
|
+
type FlightCtlYamlResource = Fleet | Device | Repository;
|
|
14
|
+
|
|
15
|
+
type YamlEditorProps<R extends FlightCtlYamlResource> = Partial<Omit<PfCodeEditorProps, 'ref' | 'code'>> & {
|
|
16
|
+
/** FlightCtl resource to display in the editor. */
|
|
17
|
+
apiObj: R;
|
|
18
|
+
/** Filename to use when YAML is downloaded */
|
|
19
|
+
filename: string;
|
|
20
|
+
/** Function to reload the resource */
|
|
21
|
+
refetch: VoidFunction;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const convertObjToYAMLString = (obj: FlightCtlYamlResource) => {
|
|
25
|
+
let yaml = '';
|
|
26
|
+
if (obj) {
|
|
27
|
+
try {
|
|
28
|
+
yaml = dump(obj, { lineWidth: -1 });
|
|
29
|
+
} catch (e) {
|
|
30
|
+
yaml = `# Error converting object to YAML\n# ${e instanceof Error ? e.message : String(e)}`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return yaml;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const YamlEditor = <R extends FlightCtlYamlResource>({ filename, apiObj, refetch }: YamlEditorProps<R>) => {
|
|
37
|
+
const [yaml, setYaml] = React.useState<string>(convertObjToYAMLString(apiObj));
|
|
38
|
+
const [resourceVersion, setResourceVersion] = React.useState<string>(apiObj.metadata.resourceVersion || '0');
|
|
39
|
+
const [doUpdate, setDoUpdate] = React.useState<boolean>(false);
|
|
40
|
+
|
|
41
|
+
const {
|
|
42
|
+
router: { useNavigate },
|
|
43
|
+
} = useAppContext();
|
|
44
|
+
const navigate = useNavigate();
|
|
45
|
+
|
|
46
|
+
const hasChanged = resourceVersion !== apiObj.metadata.resourceVersion;
|
|
47
|
+
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
if (doUpdate) {
|
|
50
|
+
setYaml(convertObjToYAMLString(apiObj));
|
|
51
|
+
setResourceVersion(apiObj.metadata.resourceVersion || '0');
|
|
52
|
+
setDoUpdate(false);
|
|
53
|
+
}
|
|
54
|
+
}, [doUpdate, apiObj]);
|
|
55
|
+
|
|
56
|
+
const { t } = useTranslation();
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div className="fctl-yaml-editor">
|
|
60
|
+
<YamlEditorBase
|
|
61
|
+
filename={filename}
|
|
62
|
+
code={yaml}
|
|
63
|
+
onCancel={() => {
|
|
64
|
+
navigate('../.');
|
|
65
|
+
}}
|
|
66
|
+
onReload={() => {
|
|
67
|
+
void refetch();
|
|
68
|
+
setDoUpdate(true);
|
|
69
|
+
}}
|
|
70
|
+
/>
|
|
71
|
+
|
|
72
|
+
{hasChanged && (
|
|
73
|
+
<Alert isInline variant="info" title={t('This object has been updated.')}>
|
|
74
|
+
{t('Click reload to see the new version.')}
|
|
75
|
+
</Alert>
|
|
76
|
+
)}
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default YamlEditor;
|