@flightctl/ui-components 0.5.1 → 0.6.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/DetailsPage.d.ts +3 -2
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/DetailsPage.js +2 -2
- package/dist/src/components/DetailsPage/DetailsPage.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +5 -3
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -1
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js +4 -5
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.js +110 -0
- package/dist/src/components/Device/DeviceDetails/DeviceAliasEdit.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +7 -1
- package/dist/src/components/Device/DeviceDetails/DeviceApplications.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +9 -6
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js +3 -3
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.js +3 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js +34 -3
- package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +1 -1
- package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +35 -30
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/DevicesPage.js +11 -2
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts.map +1 -1
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +14 -11
- package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +9 -2
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js +21 -6
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js +11 -4
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +6 -5
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +123 -10
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js +19 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js +49 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +52 -19
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +13 -16
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js +5 -5
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +16 -16
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js +58 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts +2 -2
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +17 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts +2 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +29 -3
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/utils.js +8 -7
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.d.ts.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.js.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts +1 -4
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.d.ts.map +1 -1
- package/dist/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +5 -5
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts +2 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +19 -11
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +5 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts +2 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.d.ts.map +1 -1
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js +8 -4
- package/dist/src/components/EnrollmentRequest/useEnrollmentRequests.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +2 -2
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js +8 -1
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts +19 -2
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js +53 -18
- package/dist/src/components/Fleet/CreateFleet/fleetSpecUtils.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js +1 -2
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js +22 -9
- package/dist/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js +4 -4
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js +5 -5
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.css +3 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js +127 -0
- package/dist/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.js.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/utils.js +13 -4
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -1
- package/dist/src/components/Fleet/FleetsPage.js +8 -12
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.js.map +1 -1
- package/dist/src/components/ListPage/ListPage.d.ts +1 -0
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -1
- package/dist/src/components/ListPage/ListPage.js +3 -3
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts +4 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.d.ts.map +1 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.js +90 -0
- package/dist/src/components/Masthead/CommandLineToolsPage.js.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesModal.d.ts.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesModal.js.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesProvider.d.ts.map +1 -0
- package/dist/src/components/Masthead/UserPreferencesProvider.js.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +3 -3
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/{ToDo/ToDoCard.js → Tasks/TasksCard.js} +4 -4
- package/dist/src/components/OverviewPage/Cards/Tasks/TasksCard.js.map +1 -0
- package/dist/src/components/OverviewPage/Overview.js +2 -2
- package/dist/src/components/OverviewPage/Overview.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +6 -5
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +3 -3
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -1
- package/dist/src/components/Repository/CreateRepository/utils.js +4 -1
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -1
- package/dist/src/components/Repository/RepositoryList.js +3 -11
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +3 -6
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/Status/DeviceResourceStatus.js +3 -3
- package/dist/src/components/Status/utils.d.ts.map +1 -1
- package/dist/src/components/Status/utils.js +3 -3
- package/dist/src/components/Status/utils.js.map +1 -1
- package/dist/src/components/Table/Table.d.ts +2 -1
- package/dist/src/components/Table/Table.d.ts.map +1 -1
- package/dist/src/components/Table/Table.js +9 -5
- package/dist/src/components/Table/Table.js.map +1 -1
- package/dist/src/components/Table/TablePagination.d.ts.map +1 -1
- package/dist/src/components/Table/TablePagination.js +1 -1
- package/dist/src/components/Table/TablePagination.js.map +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -1
- package/dist/src/components/Terminal/Terminal.js +10 -3
- package/dist/src/components/Terminal/Terminal.js.map +1 -1
- package/dist/src/components/charts/DonutChart.js +1 -1
- package/dist/src/components/charts/DonutChart.js.map +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js +1 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/WithHelperText.d.ts +10 -5
- package/dist/src/components/common/WithHelperText.d.ts.map +1 -1
- package/dist/src/components/common/WithHelperText.js +13 -8
- package/dist/src/components/common/WithHelperText.js.map +1 -1
- package/dist/src/components/form/CheckboxField.d.ts +6 -3
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -1
- package/dist/src/components/form/CheckboxField.js +20 -1
- package/dist/src/components/form/CheckboxField.js.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.d.ts +3 -3
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -1
- package/dist/src/components/form/FormSelectTypeahead.js +43 -53
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts +1 -1
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -1
- package/dist/src/components/form/RichValidationTextField.js +8 -4
- package/dist/src/components/form/RichValidationTextField.js.map +1 -1
- package/dist/src/components/form/validations.d.ts +44 -4
- package/dist/src/components/form/validations.d.ts.map +1 -1
- package/dist/src/components/form/validations.js +148 -25
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js +5 -3
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +3 -2
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -1
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +7 -12
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js +4 -4
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js +2 -2
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.js.map +1 -1
- package/dist/src/hooks/timeZones.d.ts +3 -0
- package/dist/src/hooks/timeZones.d.ts.map +1 -0
- package/dist/src/hooks/timeZones.js +607 -0
- package/dist/src/hooks/timeZones.js.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +14 -8
- package/dist/src/hooks/useAppContext.d.ts.map +1 -1
- package/dist/src/hooks/useAppContext.js +13 -6
- package/dist/src/hooks/useAppContext.js.map +1 -1
- package/dist/src/hooks/useFetch.d.ts +3 -5
- package/dist/src/hooks/useFetch.d.ts.map +1 -1
- package/dist/src/hooks/useFetch.js +3 -2
- package/dist/src/hooks/useFetch.js.map +1 -1
- package/dist/src/hooks/useNavigate.d.ts +2 -1
- package/dist/src/hooks/useNavigate.d.ts.map +1 -1
- package/dist/src/hooks/useNavigate.js +1 -0
- package/dist/src/hooks/useNavigate.js.map +1 -1
- package/dist/src/hooks/useTimeZones.d.ts +4 -0
- package/dist/src/hooks/useTimeZones.d.ts.map +1 -0
- package/dist/src/hooks/useTimeZones.js +22 -0
- package/dist/src/hooks/useTimeZones.js.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +6 -2
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/src/hooks/useWebSocket.js +22 -7
- package/dist/src/hooks/useWebSocket.js.map +1 -1
- package/dist/src/links.d.ts +3 -0
- package/dist/src/links.d.ts.map +1 -1
- package/dist/src/links.js +10 -3
- package/dist/src/links.js.map +1 -1
- package/dist/src/types/deviceSpec.d.ts +93 -5
- package/dist/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/src/types/deviceSpec.js +28 -2
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +19 -1
- package/dist/src/types/extraTypes.d.ts.map +1 -1
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/utils/labels.d.ts +1 -0
- package/dist/src/utils/labels.d.ts.map +1 -1
- package/dist/src/utils/labels.js +9 -2
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/patch.d.ts +13 -5
- package/dist/src/utils/patch.d.ts.map +1 -1
- package/dist/src/utils/patch.js +115 -71
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/query.d.ts +1 -0
- package/dist/src/utils/query.d.ts.map +1 -1
- package/dist/src/utils/query.js +10 -3
- package/dist/src/utils/query.js.map +1 -1
- package/dist/src/utils/search.d.ts +6 -0
- package/dist/src/utils/search.d.ts.map +1 -1
- package/dist/src/utils/search.js +9 -1
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/time.d.ts +31 -0
- package/dist/src/utils/time.d.ts.map +1 -0
- package/dist/src/utils/time.js +134 -0
- package/dist/src/utils/time.js.map +1 -0
- package/package.json +1 -4
- package/src/components/DetailsPage/DetailsPage.tsx +6 -4
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +6 -3
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +4 -13
- package/src/components/Device/DeviceDetails/DeviceAliasEdit.tsx +180 -0
- package/src/components/Device/DeviceDetails/DeviceApplications.tsx +8 -1
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +21 -5
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +3 -4
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/StatusContent.tsx +7 -10
- package/src/components/Device/DeviceDetails/DeviceDetailsTabContent/SystemResourcesContent.tsx +3 -3
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +43 -5
- package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +2 -1
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +66 -38
- package/src/components/Device/DevicesPage/DevicesPage.tsx +11 -2
- package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +16 -11
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +11 -2
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.tsx +22 -6
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +15 -2
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +147 -14
- package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +28 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +94 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +81 -50
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +23 -28
- package/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx +1 -2
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +18 -39
- package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +8 -14
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +26 -39
- package/src/components/Device/EditDeviceWizard/steps/DeviceUpdateStep.tsx +88 -0
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +18 -19
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +3 -3
- package/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx +2 -2
- package/src/components/Device/EditDeviceWizard/steps/ReviewUpdatePolicy.tsx +2 -1
- package/src/components/Device/EditDeviceWizard/steps/SystemdUnitsForm.tsx +1 -1
- package/src/components/Device/EditDeviceWizard/utils.ts +16 -9
- package/src/components/Device/SystemdUnitsModal/SystemdUnitsModal.tsx +7 -6
- package/src/components/Device/SystemdUnitsModal/TrackSystemdUnitsForm.tsx +1 -5
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +7 -9
- package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +30 -17
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +5 -1
- package/src/components/EnrollmentRequest/useEnrollmentRequests.ts +12 -4
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +4 -3
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +9 -2
- package/src/components/Fleet/CreateFleet/fleetSpecUtils.ts +51 -17
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +1 -1
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +2 -13
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +3 -3
- package/src/components/Fleet/CreateFleet/steps/UpdateConfirmChangesModal.tsx +10 -1
- package/src/components/Fleet/CreateFleet/steps/UpdatePolicyStep.tsx +49 -16
- package/src/components/Fleet/CreateFleet/steps/UpdateStepDisruptionBudget.tsx +18 -33
- package/src/components/Fleet/CreateFleet/steps/UpdateStepRolloutPolicy.tsx +14 -24
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.css +3 -0
- package/src/components/Fleet/CreateFleet/steps/UpdateStepUpdatePolicy.tsx +246 -0
- package/src/components/Fleet/CreateFleet/utils.ts +23 -7
- package/src/components/Fleet/FleetsPage.tsx +15 -17
- package/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.tsx +1 -1
- package/src/components/ListPage/ListPage.tsx +7 -4
- package/src/components/Masthead/CommandLineToolsPage.tsx +179 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +6 -6
- package/src/components/OverviewPage/Cards/{ToDo/ToDoCard.tsx → Tasks/TasksCard.tsx} +3 -3
- package/src/components/OverviewPage/Overview.tsx +2 -2
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +11 -26
- package/src/components/Repository/CreateRepository/CreateResourceSyncsForm.tsx +8 -17
- package/src/components/Repository/CreateRepository/utils.ts +4 -1
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +3 -4
- package/src/components/Repository/RepositoryList.tsx +9 -16
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +7 -11
- package/src/components/Status/DeviceResourceStatus.tsx +4 -4
- package/src/components/Status/utils.ts +3 -5
- package/src/components/Table/Table.tsx +32 -9
- package/src/components/Table/TablePagination.tsx +0 -1
- package/src/components/Terminal/Terminal.tsx +10 -4
- package/src/components/charts/DonutChart.tsx +2 -2
- package/src/components/common/LeaveFormConfirmation.tsx +2 -2
- package/src/components/common/WithHelperText.tsx +53 -21
- package/src/components/form/CheckboxField.tsx +28 -3
- package/src/components/form/FormSelectTypeahead.tsx +53 -80
- package/src/components/form/RichValidationTextField.tsx +73 -62
- package/src/components/form/validations.ts +207 -28
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx +5 -5
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +3 -2
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +9 -20
- package/src/components/modals/massModals/MassDecommissionDeviceModal/MassDecommissionDeviceModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +2 -2
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +2 -2
- package/src/hooks/timeZones.ts +606 -0
- package/src/hooks/useAppContext.tsx +20 -10
- package/src/hooks/useFetch.ts +3 -2
- package/src/hooks/useNavigate.tsx +1 -0
- package/src/hooks/useTimeZones.ts +26 -0
- package/src/hooks/useWebSocket.ts +29 -7
- package/src/links.ts +13 -4
- package/src/types/deviceSpec.ts +118 -2
- package/src/types/extraTypes.ts +33 -1
- package/src/utils/labels.ts +7 -1
- package/src/utils/patch.ts +126 -72
- package/src/utils/query.ts +13 -4
- package/src/utils/search.ts +8 -0
- package/src/utils/time.ts +147 -0
- package/dist/jest.config.d.ts +0 -12
- package/dist/jest.config.d.ts.map +0 -1
- package/dist/jest.config.js +0 -24
- package/dist/jest.config.js.map +0 -1
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts +0 -2
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts.map +0 -1
- package/dist/src/components/DetailsPage/DetailsPage.spec.js +0 -81
- package/dist/src/components/DetailsPage/DetailsPage.spec.js.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +0 -23
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +0 -1
- package/dist/src/components/Device/EditDeviceWizard/types.js +0 -3
- package/dist/src/components/Device/EditDeviceWizard/types.js.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +0 -29
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +0 -1
- package/dist/src/components/Fleet/CreateFleet/types.js +0 -9
- package/dist/src/components/Fleet/CreateFleet/types.js.map +0 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts +0 -4
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +0 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesModal.js.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts.map +0 -1
- package/dist/src/components/UserPreferences/UserPreferencesProvider.js.map +0 -1
- package/dist/src/setupTests.d.ts +0 -2
- package/dist/src/setupTests.d.ts.map +0 -1
- package/dist/src/setupTests.js +0 -24
- package/dist/src/setupTests.js.map +0 -1
- package/dist/src/tests/test-utils.d.ts +0 -7
- package/dist/src/tests/test-utils.d.ts.map +0 -1
- package/dist/src/tests/test-utils.js +0 -21
- package/dist/src/tests/test-utils.js.map +0 -1
- package/src/components/DetailsPage/DetailsPage.spec.tsx +0 -128
- package/src/components/Device/EditDeviceWizard/types.ts +0 -22
- package/src/components/Fleet/CreateFleet/types.ts +0 -33
- package/src/setupTests.ts +0 -21
- package/src/tests/test-utils.tsx +0 -21
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesModal.d.ts +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesModal.js +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.d.ts +0 -0
- /package/dist/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.js +0 -0
- /package/src/components/{UserPreferences → Masthead}/UserPreferencesModal.tsx +0 -0
- /package/src/components/{UserPreferences → Masthead}/UserPreferencesProvider.tsx +0 -0
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AppType,
|
|
3
|
+
// eslint-disable-next-line no-restricted-imports
|
|
4
|
+
ApplicationProviderSpec,
|
|
2
5
|
ConfigProviderSpec,
|
|
3
6
|
DeviceSpec,
|
|
7
|
+
EncodingType,
|
|
4
8
|
FileSpec,
|
|
5
9
|
GitConfigProviderSpec,
|
|
6
10
|
HttpConfigProviderSpec,
|
|
11
|
+
InlineApplicationProviderSpec,
|
|
7
12
|
InlineConfigProviderSpec,
|
|
8
13
|
KubernetesSecretProviderSpec,
|
|
9
14
|
PatchRequest,
|
|
10
15
|
} from '@flightctl/types';
|
|
11
16
|
import {
|
|
17
|
+
AppForm,
|
|
18
|
+
AppSpecType,
|
|
12
19
|
ConfigSourceProvider,
|
|
13
20
|
ConfigType,
|
|
14
21
|
GitConfigTemplate,
|
|
15
22
|
HttpConfigTemplate,
|
|
23
|
+
ImageAppForm,
|
|
24
|
+
InlineAppForm,
|
|
16
25
|
InlineConfigTemplate,
|
|
17
26
|
KubeSecretTemplate,
|
|
18
27
|
SpecConfigTemplate,
|
|
@@ -20,11 +29,13 @@ import {
|
|
|
20
29
|
isGitProviderSpec,
|
|
21
30
|
isHttpConfigTemplate,
|
|
22
31
|
isHttpProviderSpec,
|
|
32
|
+
isImageAppForm,
|
|
33
|
+
isImageAppProvider,
|
|
23
34
|
isInlineProviderSpec,
|
|
24
35
|
isKubeProviderSpec,
|
|
25
36
|
isKubeSecretTemplate,
|
|
26
37
|
} from '../../../types/deviceSpec';
|
|
27
|
-
import {
|
|
38
|
+
import { ApplicationProviderSpecFixed, InlineApplicationFileFixed } from '../../../types/extraTypes';
|
|
28
39
|
|
|
29
40
|
const DEFAULT_INLINE_FILE_MODE = 420; // In Octal: 0644
|
|
30
41
|
const DEFAULT_INLINE_FILE_USER = 'root';
|
|
@@ -116,11 +127,7 @@ const isSameInlineConf = (a: InlineConfigProviderSpec, b: InlineConfigProviderSp
|
|
|
116
127
|
isSameInlineConfigValue<string>(aInline.user, bInline.user, DEFAULT_INLINE_FILE_USER) &&
|
|
117
128
|
isSameInlineConfigValue<string>(aInline.group, bInline.group, DEFAULT_INLINE_FILE_GROUP) &&
|
|
118
129
|
isSameInlineConfigValue<number>(aInline.mode, bInline.mode, DEFAULT_INLINE_FILE_MODE) &&
|
|
119
|
-
isSameInlineConfigValue<string>(
|
|
120
|
-
aInline.contentEncoding,
|
|
121
|
-
bInline.contentEncoding,
|
|
122
|
-
FileSpec.contentEncoding.PLAIN,
|
|
123
|
-
) &&
|
|
130
|
+
isSameInlineConfigValue<string>(aInline.contentEncoding, bInline.contentEncoding, EncodingType.EncodingPlain) &&
|
|
124
131
|
aInline.content === bInline.content
|
|
125
132
|
);
|
|
126
133
|
})
|
|
@@ -188,7 +195,117 @@ export const getDeviceSpecConfigPatches = (
|
|
|
188
195
|
return allPatches;
|
|
189
196
|
};
|
|
190
197
|
|
|
191
|
-
export const
|
|
198
|
+
export const toAPIApplication = (app: AppForm): ApplicationProviderSpec => {
|
|
199
|
+
const envVars = app.variables.reduce((acc, variable) => {
|
|
200
|
+
acc[variable.name] = variable.value;
|
|
201
|
+
return acc;
|
|
202
|
+
}, {});
|
|
203
|
+
|
|
204
|
+
if (isImageAppForm(app)) {
|
|
205
|
+
const data = {
|
|
206
|
+
image: app.image,
|
|
207
|
+
envVars,
|
|
208
|
+
};
|
|
209
|
+
return app.name ? { ...data, name: app.name } : data;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return {
|
|
213
|
+
name: app.name,
|
|
214
|
+
appType: AppType.AppTypeCompose,
|
|
215
|
+
inline: app.files.map(
|
|
216
|
+
(file): InlineApplicationFileFixed => ({
|
|
217
|
+
path: file.path,
|
|
218
|
+
content: file.content || '',
|
|
219
|
+
contentEncoding: file.base64 ? EncodingType.EncodingBase64 : EncodingType.EncodingPlain,
|
|
220
|
+
}),
|
|
221
|
+
),
|
|
222
|
+
envVars,
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const hasInlineApplicationChanged = (currentApp: InlineApplicationProviderSpec, updatedApp: InlineAppForm) => {
|
|
227
|
+
if (currentApp.inline.length != updatedApp.files.length) {
|
|
228
|
+
return true;
|
|
229
|
+
}
|
|
230
|
+
return currentApp.inline.some((file, index) => {
|
|
231
|
+
const updatedFile = updatedApp.files[index];
|
|
232
|
+
const isCurrentBase64 = file.contentEncoding === EncodingType.EncodingBase64;
|
|
233
|
+
return (
|
|
234
|
+
(updatedFile.base64 || false) !== isCurrentBase64 ||
|
|
235
|
+
updatedFile.path !== file.path ||
|
|
236
|
+
updatedFile.content !== file.content
|
|
237
|
+
);
|
|
238
|
+
});
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export const getApplicationPatches = (
|
|
242
|
+
basePath: string,
|
|
243
|
+
currentApps: ApplicationProviderSpec[],
|
|
244
|
+
updatedApps: AppForm[],
|
|
245
|
+
) => {
|
|
246
|
+
const patches: PatchRequest = [];
|
|
247
|
+
|
|
248
|
+
const currentLen = currentApps.length;
|
|
249
|
+
const newLen = updatedApps.length;
|
|
250
|
+
if (currentLen === 0 && newLen > 0) {
|
|
251
|
+
// First apps(s) have been added
|
|
252
|
+
patches.push({
|
|
253
|
+
path: `${basePath}/applications`,
|
|
254
|
+
op: 'add',
|
|
255
|
+
value: updatedApps.map(toAPIApplication),
|
|
256
|
+
});
|
|
257
|
+
} else if (currentLen > 0 && newLen === 0) {
|
|
258
|
+
// Last app(s) have been removed
|
|
259
|
+
patches.push({
|
|
260
|
+
path: `${basePath}/applications`,
|
|
261
|
+
op: 'remove',
|
|
262
|
+
});
|
|
263
|
+
} else if (currentLen !== newLen) {
|
|
264
|
+
patches.push({
|
|
265
|
+
path: `${basePath}/applications`,
|
|
266
|
+
op: 'replace',
|
|
267
|
+
value: updatedApps.map(toAPIApplication),
|
|
268
|
+
});
|
|
269
|
+
} else {
|
|
270
|
+
const needsPatch = currentApps.some((currentApp, index) => {
|
|
271
|
+
const updatedApp = updatedApps[index];
|
|
272
|
+
const isCurrentImageApp = isImageAppProvider(currentApp);
|
|
273
|
+
const currentAppSpecType = isCurrentImageApp ? AppSpecType.OCI_IMAGE : AppSpecType.INLINE;
|
|
274
|
+
if (currentAppSpecType !== updatedApp.specType || updatedApp.name !== currentApp.name) {
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
const currentVars = Object.entries(currentApp.envVars || {});
|
|
278
|
+
if (currentVars.length !== updatedApp.variables.length) {
|
|
279
|
+
return true;
|
|
280
|
+
} else {
|
|
281
|
+
const hasChangedVars = updatedApp.variables.some((variable) => {
|
|
282
|
+
const currentValue = currentApp.envVars ? currentApp.envVars[variable.name] : undefined;
|
|
283
|
+
return !currentValue || currentValue !== variable.value;
|
|
284
|
+
});
|
|
285
|
+
if (hasChangedVars) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (isCurrentImageApp) {
|
|
291
|
+
return (updatedApp as ImageAppForm).image !== currentApp.image;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return hasInlineApplicationChanged(currentApp, updatedApp as InlineAppForm);
|
|
295
|
+
});
|
|
296
|
+
if (needsPatch) {
|
|
297
|
+
patches.push({
|
|
298
|
+
path: `${basePath}/applications`,
|
|
299
|
+
op: 'replace',
|
|
300
|
+
value: updatedApps.map(toAPIApplication),
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return patches;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export const getApiConfig = (ct: SpecConfigTemplate): ConfigSourceProvider => {
|
|
192
309
|
if (isGitConfigTemplate(ct)) {
|
|
193
310
|
return {
|
|
194
311
|
name: ct.name,
|
|
@@ -227,7 +344,7 @@ export const getAPIConfig = (ct: SpecConfigTemplate): ConfigSourceProvider => {
|
|
|
227
344
|
path: file.path,
|
|
228
345
|
content: file.content,
|
|
229
346
|
mode: file.permissions ? parseInt(file.permissions, 8) : undefined,
|
|
230
|
-
contentEncoding: file.base64 ?
|
|
347
|
+
contentEncoding: file.base64 ? EncodingType.EncodingBase64 : undefined,
|
|
231
348
|
};
|
|
232
349
|
// user / group fields cannot be sent as empty in PATCH operations
|
|
233
350
|
if (file.user) {
|
|
@@ -241,13 +358,29 @@ export const getAPIConfig = (ct: SpecConfigTemplate): ConfigSourceProvider => {
|
|
|
241
358
|
};
|
|
242
359
|
};
|
|
243
360
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
361
|
+
const getAppFormVariables = (app: ApplicationProviderSpecFixed) =>
|
|
362
|
+
Object.entries(app.envVars || {}).map(([varName, varValue]) => ({ name: varName, value: varValue }));
|
|
363
|
+
|
|
364
|
+
export const getApplicationValues = (deviceSpec?: DeviceSpec): AppForm[] => {
|
|
365
|
+
const apps = deviceSpec?.applications || [];
|
|
366
|
+
return apps.map((app) => {
|
|
367
|
+
if (isImageAppProvider(app)) {
|
|
368
|
+
return {
|
|
369
|
+
specType: AppSpecType.OCI_IMAGE,
|
|
370
|
+
name: app.name || '',
|
|
371
|
+
image: app.image,
|
|
372
|
+
variables: getAppFormVariables(app),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
247
375
|
return {
|
|
376
|
+
specType: AppSpecType.INLINE,
|
|
248
377
|
name: app.name || '',
|
|
249
|
-
|
|
250
|
-
|
|
378
|
+
files: app.inline.map((file) => ({
|
|
379
|
+
path: file.path || '',
|
|
380
|
+
content: file.content,
|
|
381
|
+
base64: file.contentEncoding === EncodingType.EncodingBase64,
|
|
382
|
+
})),
|
|
383
|
+
variables: getAppFormVariables(app),
|
|
251
384
|
};
|
|
252
385
|
});
|
|
253
386
|
};
|
|
@@ -297,7 +430,7 @@ export const getConfigTemplatesValues = (deviceSpec?: DeviceSpec, registerMicroS
|
|
|
297
430
|
path: inline.path,
|
|
298
431
|
permissions: inline.mode !== undefined ? formatFileMode(inline.mode) : undefined,
|
|
299
432
|
content: inline.content,
|
|
300
|
-
base64: inline.contentEncoding ===
|
|
433
|
+
base64: inline.contentEncoding === EncodingType.EncodingBase64,
|
|
301
434
|
} as InlineConfigTemplate['files'][0];
|
|
302
435
|
}),
|
|
303
436
|
} as InlineConfigTemplate;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
4
|
+
import TextField from '../../../form/TextField';
|
|
5
|
+
import LearnMoreLink from '../../../common/LearnMoreLink';
|
|
6
|
+
import { CREATING_APPLICATIONS_LINK } from '../../../../links';
|
|
7
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
8
|
+
import { ImageAppForm } from '../../../../types/deviceSpec';
|
|
9
|
+
|
|
10
|
+
const ApplicationImageForm = ({ app, index }: { app: ImageAppForm; index: number }) => {
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
return (
|
|
13
|
+
<FormGroupWithHelperText
|
|
14
|
+
label={t('Image')}
|
|
15
|
+
content={
|
|
16
|
+
<span>
|
|
17
|
+
{t('The application image. Learn how to create one')}{' '}
|
|
18
|
+
<LearnMoreLink text={t('here')} link={CREATING_APPLICATIONS_LINK} />
|
|
19
|
+
</span>
|
|
20
|
+
}
|
|
21
|
+
isRequired
|
|
22
|
+
>
|
|
23
|
+
<TextField aria-label={t('Image')} name={`applications.${index}.image`} value={app.image || ''} />
|
|
24
|
+
</FormGroupWithHelperText>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default ApplicationImageForm;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FieldArray } from 'formik';
|
|
3
|
+
import { Button, FormGroup, Grid, Split, SplitItem } from '@patternfly/react-core';
|
|
4
|
+
import MinusCircleIcon from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
|
|
5
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
6
|
+
|
|
7
|
+
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
8
|
+
import CheckboxField from '../../../form/CheckboxField';
|
|
9
|
+
import UploadField from '../../../form/UploadField';
|
|
10
|
+
import TextField from '../../../form/TextField';
|
|
11
|
+
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
12
|
+
import { InlineAppForm } from '../../../../types/deviceSpec';
|
|
13
|
+
|
|
14
|
+
const MAX_INLINE_FILE_SIZE_BYTES = 1024 * 1024;
|
|
15
|
+
|
|
16
|
+
type InlineApplicationFileFormProps = {
|
|
17
|
+
file: InlineAppForm['files'][0];
|
|
18
|
+
fileFieldName: string;
|
|
19
|
+
fileIndex: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const InlineApplicationFileForm = ({ file, fileIndex, fileFieldName }: InlineApplicationFileFormProps) => {
|
|
23
|
+
const { t } = useTranslation();
|
|
24
|
+
return (
|
|
25
|
+
<ExpandableFormSection
|
|
26
|
+
title={t('File {{ fileNum }}', { fileNum: fileIndex + 1 })}
|
|
27
|
+
fieldName={fileFieldName}
|
|
28
|
+
description={file.path}
|
|
29
|
+
>
|
|
30
|
+
<Grid hasGutter>
|
|
31
|
+
<FormGroup label={t('File path on the device (relative)')} isRequired>
|
|
32
|
+
<TextField name={`${fileFieldName}.path`} />
|
|
33
|
+
</FormGroup>
|
|
34
|
+
<UploadField label={t('Content')} name={`${fileFieldName}.content`} maxFileBytes={MAX_INLINE_FILE_SIZE_BYTES} />
|
|
35
|
+
|
|
36
|
+
<FormGroup>
|
|
37
|
+
<CheckboxField name={`${fileFieldName}.base64`} label={t('Content is base64 encoded')} />
|
|
38
|
+
</FormGroup>
|
|
39
|
+
</Grid>
|
|
40
|
+
</ExpandableFormSection>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const ApplicationInlineForm = ({ app, index }: { app: InlineAppForm; index: number }) => {
|
|
45
|
+
const { t } = useTranslation();
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<FieldArray name={`applications.${index}.files`}>
|
|
49
|
+
{({ push, remove }) => (
|
|
50
|
+
<>
|
|
51
|
+
{app.files?.map((file, fileIndex) => {
|
|
52
|
+
const fieldName = `applications[${index}].files[${fileIndex}]`;
|
|
53
|
+
return (
|
|
54
|
+
<Split key={fileIndex} hasGutter>
|
|
55
|
+
<SplitItem isFilled>
|
|
56
|
+
<InlineApplicationFileForm file={file} fileIndex={fileIndex} fileFieldName={fieldName} />
|
|
57
|
+
</SplitItem>
|
|
58
|
+
{app.files.length > 1 && (
|
|
59
|
+
<SplitItem>
|
|
60
|
+
<Button
|
|
61
|
+
aria-label={t('Delete file')}
|
|
62
|
+
variant="link"
|
|
63
|
+
icon={<MinusCircleIcon />}
|
|
64
|
+
iconPosition="start"
|
|
65
|
+
onClick={() => remove(fileIndex)}
|
|
66
|
+
/>
|
|
67
|
+
</SplitItem>
|
|
68
|
+
)}
|
|
69
|
+
</Split>
|
|
70
|
+
);
|
|
71
|
+
})}
|
|
72
|
+
<FormGroup>
|
|
73
|
+
<Button
|
|
74
|
+
variant="link"
|
|
75
|
+
icon={<PlusCircleIcon />}
|
|
76
|
+
iconPosition="start"
|
|
77
|
+
onClick={() => {
|
|
78
|
+
push({
|
|
79
|
+
path: '',
|
|
80
|
+
content: '',
|
|
81
|
+
base64: false,
|
|
82
|
+
});
|
|
83
|
+
}}
|
|
84
|
+
>
|
|
85
|
+
{t('Add file')}
|
|
86
|
+
</Button>
|
|
87
|
+
</FormGroup>
|
|
88
|
+
</>
|
|
89
|
+
)}
|
|
90
|
+
</FieldArray>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default ApplicationInlineForm;
|
|
@@ -5,60 +5,96 @@ import { FieldArray, useField, useFormikContext } from 'formik';
|
|
|
5
5
|
import { MinusCircleIcon } from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
|
|
6
6
|
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import {
|
|
9
|
+
AppForm,
|
|
10
|
+
AppSpecType,
|
|
11
|
+
DeviceSpecConfigFormValues,
|
|
12
|
+
isImageAppForm,
|
|
13
|
+
isInlineAppForm,
|
|
14
|
+
} from '../../../../types/deviceSpec';
|
|
10
15
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
11
16
|
import TextField from '../../../form/TextField';
|
|
17
|
+
import FormSelect from '../../../form/FormSelect';
|
|
18
|
+
import ErrorHelperText from '../../../form/FieldHelperText';
|
|
12
19
|
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
20
|
+
import { FormGroupWithHelperText } from '../../../common/WithHelperText';
|
|
21
|
+
import ApplicationImageForm from './ApplicationImageForm';
|
|
22
|
+
import ApplicationInlineForm from './ApplicationInlineForm';
|
|
16
23
|
|
|
17
24
|
import './ApplicationsForm.css';
|
|
18
25
|
|
|
19
26
|
const ApplicationSection = ({ index }: { index: number }) => {
|
|
20
27
|
const { t } = useTranslation();
|
|
21
|
-
const
|
|
22
|
-
const [{ value: app }] = useField<
|
|
28
|
+
const appFieldName = `applications[${index}]`;
|
|
29
|
+
const [{ value: app }, { error }, { setValue }] = useField<AppForm>(appFieldName);
|
|
30
|
+
const isInlineIncomplete = app.specType === AppSpecType.INLINE && !('files' in app);
|
|
31
|
+
const isImageIncomplete = app.specType === AppSpecType.OCI_IMAGE && !('image' in app);
|
|
32
|
+
// @ts-expect-error Formik error object includes "variables"
|
|
33
|
+
const appVarsError = typeof error?.variables === 'string' ? (error.variables as string) : undefined; // eslint-disable @typescript-eslint/no-unsafe-assignment
|
|
34
|
+
|
|
35
|
+
const appTypes = React.useMemo(() => {
|
|
36
|
+
return {
|
|
37
|
+
[AppSpecType.INLINE]: t('Inline application'),
|
|
38
|
+
[AppSpecType.OCI_IMAGE]: t('Image based application'),
|
|
39
|
+
};
|
|
40
|
+
}, [t]);
|
|
41
|
+
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
// When switching types, setting the new required fields and clearing those from the old type
|
|
44
|
+
if (isInlineIncomplete) {
|
|
45
|
+
setValue(
|
|
46
|
+
{
|
|
47
|
+
specType: AppSpecType.INLINE,
|
|
48
|
+
name: app.name || '',
|
|
49
|
+
files: [{ path: '', content: '' }],
|
|
50
|
+
variables: [],
|
|
51
|
+
},
|
|
52
|
+
false,
|
|
53
|
+
);
|
|
54
|
+
} else if (isImageIncomplete) {
|
|
55
|
+
setValue(
|
|
56
|
+
{
|
|
57
|
+
specType: AppSpecType.OCI_IMAGE,
|
|
58
|
+
name: app.name || '',
|
|
59
|
+
image: '',
|
|
60
|
+
variables: [],
|
|
61
|
+
},
|
|
62
|
+
false,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}, [isImageIncomplete, isInlineIncomplete, app.name, setValue]);
|
|
23
66
|
|
|
24
67
|
return (
|
|
25
68
|
<ExpandableFormSection
|
|
26
69
|
title={t('Application {{ appNum }}', { appNum: index + 1 })}
|
|
27
|
-
fieldName={
|
|
28
|
-
description={app.name
|
|
70
|
+
fieldName={appFieldName}
|
|
71
|
+
description={app.name}
|
|
29
72
|
>
|
|
30
73
|
<Grid hasGutter>
|
|
31
|
-
<FormGroup
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{t('The application image. Learn how to create one')}{' '}
|
|
38
|
-
<LearnMoreLink text={t('here')} link={CREATING_APPLICATIONS_LINK} />
|
|
39
|
-
</span>
|
|
40
|
-
}
|
|
41
|
-
showLabel
|
|
42
|
-
/>
|
|
43
|
-
}
|
|
44
|
-
isRequired
|
|
45
|
-
>
|
|
46
|
-
<TextField aria-label={t('Image')} name={`applications.${index}.image`} value={app.image} />
|
|
74
|
+
<FormGroup label={t('Application type')} isRequired>
|
|
75
|
+
<FormSelect
|
|
76
|
+
items={appTypes}
|
|
77
|
+
name={`${appFieldName}.specType`}
|
|
78
|
+
placeholderText={t('Select an application type')}
|
|
79
|
+
/>
|
|
47
80
|
</FormGroup>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)
|
|
55
|
-
showLabel
|
|
56
|
-
/>
|
|
81
|
+
|
|
82
|
+
<FormGroupWithHelperText
|
|
83
|
+
label={t('Application name')}
|
|
84
|
+
content={
|
|
85
|
+
app.specType === AppSpecType.INLINE
|
|
86
|
+
? t('The unique identifier for this application.')
|
|
87
|
+
: t('If not specified, the image name will be used. Application name must be unique.')
|
|
57
88
|
}
|
|
89
|
+
isRequired={app.specType === AppSpecType.INLINE}
|
|
58
90
|
>
|
|
59
|
-
<TextField aria-label={t('Application name')} name={
|
|
60
|
-
</
|
|
61
|
-
|
|
91
|
+
<TextField aria-label={t('Application name')} name={`${appFieldName}.name`} />
|
|
92
|
+
</FormGroupWithHelperText>
|
|
93
|
+
|
|
94
|
+
{isImageAppForm(app) && <ApplicationImageForm app={app} index={index} />}
|
|
95
|
+
{isInlineAppForm(app) && <ApplicationInlineForm app={app} index={index} />}
|
|
96
|
+
|
|
97
|
+
<FieldArray name={`${appFieldName}.variables`}>
|
|
62
98
|
{({ push, remove }) => (
|
|
63
99
|
<>
|
|
64
100
|
{app.variables.map((variable, varIndex) => (
|
|
@@ -70,7 +106,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
70
106
|
<FormGroup label={t('Name')} isRequired>
|
|
71
107
|
<TextField
|
|
72
108
|
aria-label={t('Name')}
|
|
73
|
-
name={
|
|
109
|
+
name={`${appFieldName}.variables.${varIndex}.name`}
|
|
74
110
|
value={variable.name}
|
|
75
111
|
/>
|
|
76
112
|
</FormGroup>
|
|
@@ -79,7 +115,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
79
115
|
<FormGroup label={t('Value')} isRequired>
|
|
80
116
|
<TextField
|
|
81
117
|
aria-label={t('Value')}
|
|
82
|
-
name={
|
|
118
|
+
name={`${appFieldName}.variables.${varIndex}.value`}
|
|
83
119
|
value={variable.value}
|
|
84
120
|
/>
|
|
85
121
|
</FormGroup>
|
|
@@ -95,6 +131,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
95
131
|
</SplitItem>
|
|
96
132
|
</Split>
|
|
97
133
|
))}
|
|
134
|
+
<ErrorHelperText error={appVarsError} />
|
|
98
135
|
<FormGroup>
|
|
99
136
|
<Button
|
|
100
137
|
variant="link"
|
|
@@ -104,7 +141,7 @@ const ApplicationSection = ({ index }: { index: number }) => {
|
|
|
104
141
|
push({ name: '', value: '' });
|
|
105
142
|
}}
|
|
106
143
|
>
|
|
107
|
-
{t('Add
|
|
144
|
+
{t('Add an application variable')}
|
|
108
145
|
</Button>
|
|
109
146
|
</FormGroup>
|
|
110
147
|
</>
|
|
@@ -120,14 +157,9 @@ const ApplicationTemplates = () => {
|
|
|
120
157
|
const { values } = useFormikContext<DeviceSpecConfigFormValues>();
|
|
121
158
|
|
|
122
159
|
return (
|
|
123
|
-
<
|
|
124
|
-
label={
|
|
125
|
-
|
|
126
|
-
ariaLabel={t('Application workloads')}
|
|
127
|
-
content={t('Define the application workloads that shall run on the device.')}
|
|
128
|
-
showLabel
|
|
129
|
-
/>
|
|
130
|
-
}
|
|
160
|
+
<FormGroupWithHelperText
|
|
161
|
+
label={t('Application workloads')}
|
|
162
|
+
content={t('Define the application workloads that shall run on the device.')}
|
|
131
163
|
>
|
|
132
164
|
<FieldArray name="applications">
|
|
133
165
|
{({ push, remove }) => (
|
|
@@ -159,7 +191,6 @@ const ApplicationTemplates = () => {
|
|
|
159
191
|
onClick={() => {
|
|
160
192
|
push({
|
|
161
193
|
name: '',
|
|
162
|
-
image: '',
|
|
163
194
|
variables: [],
|
|
164
195
|
});
|
|
165
196
|
}}
|
|
@@ -171,7 +202,7 @@ const ApplicationTemplates = () => {
|
|
|
171
202
|
</>
|
|
172
203
|
)}
|
|
173
204
|
</FieldArray>
|
|
174
|
-
</
|
|
205
|
+
</FormGroupWithHelperText>
|
|
175
206
|
);
|
|
176
207
|
};
|
|
177
208
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button, FormGroup,
|
|
2
|
+
import { Button, FormGroup, Grid, Split, SplitItem } from '@patternfly/react-core';
|
|
3
3
|
import { PlusCircleIcon } from '@patternfly/react-icons/dist/js/icons/plus-circle-icon';
|
|
4
4
|
import { MinusCircleIcon } from '@patternfly/react-icons/dist/js/icons/minus-circle-icon';
|
|
5
5
|
import { FieldArray, useField, useFormikContext } from 'formik';
|
|
@@ -10,8 +10,7 @@ import TextField from '../../../form/TextField';
|
|
|
10
10
|
import UploadField from '../../../form/UploadField';
|
|
11
11
|
import CheckboxField from '../../../form/CheckboxField';
|
|
12
12
|
import ExpandableFormSection from '../../../form/ExpandableFormSection';
|
|
13
|
-
import { DeviceSpecConfigFormValues } from '
|
|
14
|
-
import { InlineConfigTemplate } from '../../../../types/deviceSpec';
|
|
13
|
+
import { DeviceSpecConfigFormValues, InlineConfigTemplate } from '../../../../types/deviceSpec';
|
|
15
14
|
import { formatFileMode } from '../deviceSpecUtils';
|
|
16
15
|
|
|
17
16
|
const MAX_INLINE_FILE_SIZE_BYTES = 1024 * 1024;
|
|
@@ -60,20 +59,18 @@ const FileForm = ({ fieldName, index }: { fieldName: string; index: number }) =>
|
|
|
60
59
|
helperText={t('Select from the list or type in the permission code in octal notation')}
|
|
61
60
|
defaultId="0644"
|
|
62
61
|
items={permissions}
|
|
63
|
-
|
|
62
|
+
isValidTypedItem={(value) => {
|
|
64
63
|
try {
|
|
65
|
-
if (value !== '' && value.length
|
|
64
|
+
if (value !== '' && value.length === 4) {
|
|
66
65
|
const valNum = Number(`0o${value}`);
|
|
67
|
-
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
66
|
+
return Number.isFinite(valNum) && valNum >= 0 && valNum <= 0o7777;
|
|
70
67
|
}
|
|
71
68
|
} catch {
|
|
72
|
-
return
|
|
69
|
+
return false;
|
|
73
70
|
}
|
|
74
|
-
return
|
|
71
|
+
return false;
|
|
75
72
|
}}
|
|
76
|
-
|
|
73
|
+
transformTypedItem={formatFileMode}
|
|
77
74
|
/>
|
|
78
75
|
</FormGroup>
|
|
79
76
|
<FormGroup label={t('User')}>
|
|
@@ -132,23 +129,21 @@ const ConfigInlineTemplateForm = ({ index }: ConfigInlineTemplateFormProps) => {
|
|
|
132
129
|
</Split>
|
|
133
130
|
);
|
|
134
131
|
})}
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
</FormGroup>
|
|
151
|
-
</FormSection>
|
|
132
|
+
<FormGroup>
|
|
133
|
+
<Button
|
|
134
|
+
variant="link"
|
|
135
|
+
icon={<PlusCircleIcon />}
|
|
136
|
+
iconPosition="start"
|
|
137
|
+
onClick={() => {
|
|
138
|
+
push({
|
|
139
|
+
path: '',
|
|
140
|
+
content: '',
|
|
141
|
+
});
|
|
142
|
+
}}
|
|
143
|
+
>
|
|
144
|
+
{t('Add file')}
|
|
145
|
+
</Button>
|
|
146
|
+
</FormGroup>
|
|
152
147
|
</>
|
|
153
148
|
)}
|
|
154
149
|
</FieldArray>
|
|
@@ -5,8 +5,7 @@ import { FormGroup } from '@patternfly/react-core';
|
|
|
5
5
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
6
6
|
|
|
7
7
|
import TextField from '../../../form/TextField';
|
|
8
|
-
import { DeviceSpecConfigFormValues } from '
|
|
9
|
-
import { KubeSecretTemplate } from '../../../../types/deviceSpec';
|
|
8
|
+
import { DeviceSpecConfigFormValues, KubeSecretTemplate } from '../../../../types/deviceSpec';
|
|
10
9
|
|
|
11
10
|
type ConfigK8sSecretTemplateFormProps = {
|
|
12
11
|
index: number;
|