@flightctl/ui-components 1.1.0-rc1 → 1.1.0-rc3
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/Repository/CreateRepository/CreateRepositoryForm.css +5 -1
- package/dist/types/imagebuilder/index.d.ts +2 -0
- package/dist/types/imagebuilder/index.d.ts.map +1 -1
- package/dist/types/imagebuilder/index.js +3 -1
- package/dist/types/imagebuilder/index.js.map +1 -1
- package/dist/types/imagebuilder/models/ApiVersion.d.ts +8 -0
- package/dist/types/imagebuilder/models/ApiVersion.d.ts.map +1 -0
- package/dist/types/imagebuilder/models/ApiVersion.js +16 -0
- package/dist/types/imagebuilder/models/ApiVersion.js.map +1 -0
- package/dist/types/imagebuilder/models/ImageBuild.d.ts +2 -4
- package/dist/types/imagebuilder/models/ImageBuild.d.ts.map +1 -1
- package/dist/types/imagebuilder/models/ImageBuildList.d.ts +2 -4
- package/dist/types/imagebuilder/models/ImageBuildList.d.ts.map +1 -1
- package/dist/types/imagebuilder/models/ImageExport.d.ts +2 -4
- package/dist/types/imagebuilder/models/ImageExport.d.ts.map +1 -1
- package/dist/types/imagebuilder/models/ImageExportList.d.ts +2 -4
- package/dist/types/imagebuilder/models/ImageExportList.d.ts.map +1 -1
- package/dist/types/imagebuilder/models/Status.d.ts +28 -0
- package/dist/types/imagebuilder/models/Status.d.ts.map +1 -0
- package/dist/types/imagebuilder/models/Status.js +3 -0
- package/dist/types/imagebuilder/models/Status.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/models/ApiVersion.d.ts +9 -0
- package/dist/types/models/ApiVersion.d.ts.map +1 -0
- package/dist/types/models/ApiVersion.js +17 -0
- package/dist/types/models/ApiVersion.js.map +1 -0
- package/dist/types/models/ApplicationProviderBase.d.ts +12 -0
- package/dist/types/models/ApplicationProviderBase.d.ts.map +1 -0
- package/dist/types/models/ApplicationProviderBase.js +3 -0
- package/dist/types/models/ApplicationProviderBase.js.map +1 -0
- package/dist/types/models/ApplicationProviderSpec.d.ts +5 -15
- package/dist/types/models/ApplicationProviderSpec.d.ts.map +1 -1
- package/dist/types/models/ApplicationUser.d.ts +7 -0
- package/dist/types/models/ApplicationUser.d.ts.map +1 -0
- package/dist/types/models/ApplicationUser.js +3 -0
- package/dist/types/models/ApplicationUser.js.map +1 -0
- package/dist/types/models/AuthConfig.d.ts +2 -4
- package/dist/types/models/AuthConfig.d.ts.map +1 -1
- package/dist/types/models/AuthProvider.d.ts +2 -4
- package/dist/types/models/AuthProvider.d.ts.map +1 -1
- package/dist/types/models/AuthProviderList.d.ts +2 -4
- package/dist/types/models/AuthProviderList.d.ts.map +1 -1
- package/dist/types/models/CertificateSigningRequest.d.ts +2 -4
- package/dist/types/models/CertificateSigningRequest.d.ts.map +1 -1
- package/dist/types/models/CertificateSigningRequestList.d.ts +2 -4
- package/dist/types/models/CertificateSigningRequestList.d.ts.map +1 -1
- package/dist/types/models/ComposeApplication.d.ts +7 -0
- package/dist/types/models/ComposeApplication.d.ts.map +1 -0
- package/dist/types/models/ComposeApplication.js +3 -0
- package/dist/types/models/ComposeApplication.js.map +1 -0
- package/dist/types/models/ContainerApplication.d.ts +18 -0
- package/dist/types/models/ContainerApplication.d.ts.map +1 -0
- package/dist/types/models/ContainerApplication.js +3 -0
- package/dist/types/models/ContainerApplication.js.map +1 -0
- package/dist/types/models/ContainerApplicationProperties.d.ts +13 -0
- package/dist/types/models/ContainerApplicationProperties.d.ts.map +1 -0
- package/dist/types/models/ContainerApplicationProperties.js +3 -0
- package/dist/types/models/ContainerApplicationProperties.js.map +1 -0
- package/dist/types/models/Device.d.ts +2 -4
- package/dist/types/models/Device.d.ts.map +1 -1
- package/dist/types/models/DeviceList.d.ts +2 -4
- package/dist/types/models/DeviceList.d.ts.map +1 -1
- package/dist/types/models/EnrollmentRequest.d.ts +2 -4
- package/dist/types/models/EnrollmentRequest.d.ts.map +1 -1
- package/dist/types/models/EnrollmentRequestList.d.ts +2 -4
- package/dist/types/models/EnrollmentRequestList.d.ts.map +1 -1
- package/dist/types/models/Event.d.ts +2 -4
- package/dist/types/models/Event.d.ts.map +1 -1
- package/dist/types/models/Event.js.map +1 -1
- package/dist/types/models/EventList.d.ts +2 -4
- package/dist/types/models/EventList.d.ts.map +1 -1
- package/dist/types/models/Fleet.d.ts +2 -4
- package/dist/types/models/Fleet.d.ts.map +1 -1
- package/dist/types/models/FleetList.d.ts +2 -4
- package/dist/types/models/FleetList.d.ts.map +1 -1
- package/dist/types/models/HelmApplication.d.ts +20 -0
- package/dist/types/models/HelmApplication.d.ts.map +1 -0
- package/dist/types/models/HelmApplication.js +3 -0
- package/dist/types/models/HelmApplication.js.map +1 -0
- package/dist/types/models/ImageApplicationProviderSpec.d.ts +2 -22
- package/dist/types/models/ImageApplicationProviderSpec.d.ts.map +1 -1
- package/dist/types/models/InlineApplicationProviderSpec.d.ts +2 -3
- package/dist/types/models/InlineApplicationProviderSpec.d.ts.map +1 -1
- package/dist/types/models/Organization.d.ts +2 -4
- package/dist/types/models/Organization.d.ts.map +1 -1
- package/dist/types/models/OrganizationList.d.ts +2 -4
- package/dist/types/models/OrganizationList.d.ts.map +1 -1
- package/dist/types/models/QuadletApplication.d.ts +8 -0
- package/dist/types/models/QuadletApplication.d.ts.map +1 -0
- package/dist/types/models/QuadletApplication.js +3 -0
- package/dist/types/models/QuadletApplication.js.map +1 -0
- package/dist/types/models/Repository.d.ts +2 -4
- package/dist/types/models/Repository.d.ts.map +1 -1
- package/dist/types/models/RepositoryList.d.ts +2 -4
- package/dist/types/models/RepositoryList.d.ts.map +1 -1
- package/dist/types/models/ResourceSync.d.ts +2 -4
- package/dist/types/models/ResourceSync.d.ts.map +1 -1
- package/dist/types/models/ResourceSyncList.d.ts +2 -4
- package/dist/types/models/ResourceSyncList.d.ts.map +1 -1
- package/dist/types/models/Status.d.ts +2 -4
- package/dist/types/models/Status.d.ts.map +1 -1
- package/dist/types/models/TemplateVersion.d.ts +2 -4
- package/dist/types/models/TemplateVersion.d.ts.map +1 -1
- package/dist/types/models/TemplateVersionList.d.ts +2 -4
- package/dist/types/models/TemplateVersionList.d.ts.map +1 -1
- package/dist/ui-components/src/components/AuthProvider/CreateAuthProvider/utils.d.ts.map +1 -1
- package/dist/ui-components/src/components/AuthProvider/CreateAuthProvider/utils.js +51 -51
- package/dist/ui-components/src/components/AuthProvider/CreateAuthProvider/utils.js.map +1 -1
- package/dist/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.js +1 -1
- package/dist/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/ui-components/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/DeviceDetails/DeviceDetailsPage.js +5 -4
- package/dist/ui-components/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/ui-components/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/DeviceDetails/TerminalTab.js +5 -1
- package/dist/ui-components/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +3 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +310 -363
- package/dist/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.d.ts +1 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.js +18 -19
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationHelmForm.d.ts +1 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationHelmForm.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationHelmForm.js +5 -4
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationHelmForm.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +1 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js +2 -2
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +3 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js +20 -23
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationIntegritySettings.js +3 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationIntegritySettings.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +25 -45
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVariablesForm.d.ts +8 -0
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVariablesForm.d.ts.map +1 -0
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVariablesForm.js +37 -0
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVariablesForm.js.map +1 -0
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.d.ts +1 -3
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.d.ts.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.js +5 -8
- package/dist/ui-components/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.js.map +1 -1
- package/dist/ui-components/src/components/Device/EditDeviceWizard/utils.d.ts +18 -18
- package/dist/ui-components/src/components/ErrorAlert/ErrorAlert.d.ts +4 -2
- package/dist/ui-components/src/components/ErrorAlert/ErrorAlert.d.ts.map +1 -1
- package/dist/ui-components/src/components/ErrorAlert/ErrorAlert.js +2 -2
- package/dist/ui-components/src/components/ErrorAlert/ErrorAlert.js.map +1 -1
- package/dist/ui-components/src/components/Fleet/CreateFleet/utils.d.ts +1 -1
- package/dist/ui-components/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
- package/dist/ui-components/src/components/Fleet/CreateFleet/utils.js +3 -3
- package/dist/ui-components/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/ui-components/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -1
- package/dist/ui-components/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +3 -1
- package/dist/ui-components/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CancelImageBuildModal/CancelImageBuildModal.d.ts +7 -0
- package/dist/ui-components/src/components/ImageBuilds/CancelImageBuildModal/CancelImageBuildModal.d.ts.map +1 -0
- package/dist/ui-components/src/components/ImageBuilds/CancelImageBuildModal/CancelImageBuildModal.js +40 -0
- package/dist/ui-components/src/components/ImageBuilds/CancelImageBuildModal/CancelImageBuildModal.js.map +1 -0
- package/dist/ui-components/src/components/ImageBuilds/ConfirmImageExportModal/ConfirmImageExportModal.d.ts +8 -0
- package/dist/ui-components/src/components/ImageBuilds/ConfirmImageExportModal/ConfirmImageExportModal.d.ts.map +1 -0
- package/dist/ui-components/src/components/ImageBuilds/ConfirmImageExportModal/ConfirmImageExportModal.js +37 -0
- package/dist/ui-components/src/components/ImageBuilds/ConfirmImageExportModal/ConfirmImageExportModal.js.map +1 -0
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/CreateImageBuildWizard.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/CreateImageBuildWizard.js +4 -3
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/CreateImageBuildWizard.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.js +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/RegistrationStep.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/RegistrationStep.js +13 -10
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/RegistrationStep.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.js +4 -2
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.js +7 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/types.d.ts +3 -5
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/types.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/utils.d.ts +3 -2
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/utils.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/utils.js +139 -34
- package/dist/ui-components/src/components/ImageBuilds/CreateImageBuildWizard/utils.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsPage.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsPage.js +23 -12
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsPage.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildExportsGallery.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildExportsGallery.js +115 -39
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildExportsGallery.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.d.ts +1 -0
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.js +17 -18
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildRow.d.ts +5 -2
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildRow.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildRow.js +22 -12
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildRow.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildsPage.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildsPage.js +17 -8
- package/dist/ui-components/src/components/ImageBuilds/ImageBuildsPage.js.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageExportCards.d.ts +10 -9
- package/dist/ui-components/src/components/ImageBuilds/ImageExportCards.d.ts.map +1 -1
- package/dist/ui-components/src/components/ImageBuilds/ImageExportCards.js +122 -26
- package/dist/ui-components/src/components/ImageBuilds/ImageExportCards.js.map +1 -1
- package/dist/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts +2 -1
- package/dist/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
- package/dist/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.js +10 -4
- package/dist/ui-components/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/ui-components/src/components/Repository/CreateRepository/utils.d.ts.map +1 -1
- package/dist/ui-components/src/components/Repository/CreateRepository/utils.js +3 -4
- package/dist/ui-components/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/ui-components/src/components/form/RepositorySelect.d.ts.map +1 -1
- package/dist/ui-components/src/components/form/RepositorySelect.js +1 -1
- package/dist/ui-components/src/components/form/RepositorySelect.js.map +1 -1
- package/dist/ui-components/src/components/form/UploadField.d.ts.map +1 -1
- package/dist/ui-components/src/components/form/UploadField.js +25 -16
- package/dist/ui-components/src/components/form/UploadField.js.map +1 -1
- package/dist/ui-components/src/components/form/validations.d.ts +25 -18
- package/dist/ui-components/src/components/form/validations.d.ts.map +1 -1
- package/dist/ui-components/src/components/form/validations.js +79 -33
- package/dist/ui-components/src/components/form/validations.js.map +1 -1
- package/dist/ui-components/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts +2 -1
- package/dist/ui-components/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts.map +1 -1
- package/dist/ui-components/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.js +2 -2
- package/dist/ui-components/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.js.map +1 -1
- package/dist/ui-components/src/constants.d.ts +5 -6
- package/dist/ui-components/src/constants.d.ts.map +1 -1
- package/dist/ui-components/src/constants.js +19 -11
- package/dist/ui-components/src/constants.js.map +1 -1
- package/dist/ui-components/src/hooks/useWebSocket.d.ts.map +1 -1
- package/dist/ui-components/src/hooks/useWebSocket.js +25 -4
- package/dist/ui-components/src/hooks/useWebSocket.js.map +1 -1
- package/dist/ui-components/src/types/deviceSpec.d.ts +44 -76
- package/dist/ui-components/src/types/deviceSpec.d.ts.map +1 -1
- package/dist/ui-components/src/types/deviceSpec.js +13 -26
- package/dist/ui-components/src/types/deviceSpec.js.map +1 -1
- package/dist/ui-components/src/types/extraTypes.d.ts +1 -7
- package/dist/ui-components/src/types/extraTypes.d.ts.map +1 -1
- package/dist/ui-components/src/types/extraTypes.js.map +1 -1
- package/dist/ui-components/src/types/rbac.d.ts +7 -1
- package/dist/ui-components/src/types/rbac.d.ts.map +1 -1
- package/dist/ui-components/src/types/rbac.js +6 -0
- package/dist/ui-components/src/types/rbac.js.map +1 -1
- package/dist/ui-components/src/utils/imageBuilds.d.ts +1 -0
- package/dist/ui-components/src/utils/imageBuilds.d.ts.map +1 -1
- package/dist/ui-components/src/utils/imageBuilds.js +20 -29
- package/dist/ui-components/src/utils/imageBuilds.js.map +1 -1
- package/dist/ui-components/src/utils/search.d.ts +2 -1
- package/dist/ui-components/src/utils/search.d.ts.map +1 -1
- package/dist/ui-components/src/utils/search.js +2 -2
- package/dist/ui-components/src/utils/search.js.map +1 -1
- package/package.json +2 -2
- package/src/components/AuthProvider/CreateAuthProvider/utils.ts +2 -2
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +2 -2
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +10 -4
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +9 -1
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +361 -425
- package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.tsx +19 -29
- package/src/components/Device/EditDeviceWizard/steps/ApplicationHelmForm.tsx +5 -13
- package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +2 -16
- package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +8 -7
- package/src/components/Device/EditDeviceWizard/steps/ApplicationIntegritySettings.tsx +5 -5
- package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +29 -101
- package/src/components/Device/EditDeviceWizard/steps/ApplicationVariablesForm.tsx +87 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.tsx +5 -10
- package/src/components/ErrorAlert/ErrorAlert.tsx +13 -3
- package/src/components/Fleet/CreateFleet/utils.ts +4 -5
- package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +11 -8
- package/src/components/ImageBuilds/CancelImageBuildModal/CancelImageBuildModal.tsx +81 -0
- package/src/components/ImageBuilds/ConfirmImageExportModal/ConfirmImageExportModal.tsx +61 -0
- package/src/components/ImageBuilds/CreateImageBuildWizard/CreateImageBuildWizard.tsx +8 -3
- package/src/components/ImageBuilds/CreateImageBuildWizard/steps/OutputImageStep.tsx +1 -1
- package/src/components/ImageBuilds/CreateImageBuildWizard/steps/RegistrationStep.tsx +18 -10
- package/src/components/ImageBuilds/CreateImageBuildWizard/steps/ReviewStep.tsx +5 -1
- package/src/components/ImageBuilds/CreateImageBuildWizard/steps/SourceImageStep.tsx +13 -1
- package/src/components/ImageBuilds/CreateImageBuildWizard/types.ts +3 -6
- package/src/components/ImageBuilds/CreateImageBuildWizard/utils.ts +161 -37
- package/src/components/ImageBuilds/ImageBuildDetails/ImageBuildDetailsPage.tsx +36 -17
- package/src/components/ImageBuilds/ImageBuildDetails/ImageBuildExportsGallery.tsx +131 -44
- package/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.tsx +22 -26
- package/src/components/ImageBuilds/ImageBuildRow.tsx +41 -20
- package/src/components/ImageBuilds/ImageBuildsPage.tsx +34 -15
- package/src/components/ImageBuilds/ImageExportCards.tsx +198 -80
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.css +5 -1
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +14 -4
- package/src/components/Repository/CreateRepository/utils.ts +4 -4
- package/src/components/form/RepositorySelect.tsx +1 -0
- package/src/components/form/UploadField.tsx +29 -30
- package/src/components/form/validations.ts +156 -106
- package/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsx +3 -1
- package/src/constants.ts +19 -6
- package/src/hooks/useWebSocket.ts +25 -3
- package/src/types/deviceSpec.ts +68 -108
- package/src/types/extraTypes.ts +2 -12
- package/src/types/rbac.ts +6 -0
- package/src/utils/imageBuilds.ts +22 -32
- package/src/utils/search.ts +2 -2
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Alert } from '@patternfly/react-core';
|
|
2
|
+
import { Alert, AlertActionLink } from '@patternfly/react-core';
|
|
3
3
|
import { useTranslation } from '../../hooks/useTranslation';
|
|
4
4
|
import { getErrorMessage } from '../../utils/error';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type ErrorAlertProps = {
|
|
7
|
+
error: unknown;
|
|
8
|
+
onRetry?: VoidFunction;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const ErrorAlert = ({ error, onRetry }: ErrorAlertProps) => {
|
|
7
12
|
const { t } = useTranslation();
|
|
8
13
|
return (
|
|
9
|
-
<Alert
|
|
14
|
+
<Alert
|
|
15
|
+
isInline
|
|
16
|
+
variant="danger"
|
|
17
|
+
title={t('Unexpected error occurred')}
|
|
18
|
+
actionLinks={onRetry ? <AlertActionLink onClick={onRetry}>{t('Try again')}</AlertActionLink> : undefined}
|
|
19
|
+
>
|
|
10
20
|
{getErrorMessage(error)}
|
|
11
21
|
</Alert>
|
|
12
22
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Fleet, PatchRequest } from '@flightctl/types';
|
|
2
1
|
import { TFunction } from 'i18next';
|
|
3
2
|
import * as Yup from 'yup';
|
|
4
|
-
import {
|
|
3
|
+
import { ApiVersion, Fleet, PatchRequest } from '@flightctl/types';
|
|
5
4
|
import { toAPILabel } from '../../../utils/labels';
|
|
6
5
|
import {
|
|
7
6
|
systemdUnitListValidationSchema,
|
|
@@ -34,7 +33,7 @@ import {
|
|
|
34
33
|
getDeviceSpecConfigPatches,
|
|
35
34
|
getSystemdUnitsValues,
|
|
36
35
|
hasMicroshiftRegistrationConfig,
|
|
37
|
-
|
|
36
|
+
toApiApplication,
|
|
38
37
|
} from '../../Device/EditDeviceWizard/deviceSpecUtils';
|
|
39
38
|
import { getDisruptionBudgetValues, getRolloutPolicyValues, getUpdatePolicyValues } from './fleetSpecUtils';
|
|
40
39
|
import { FleetFormValues, UpdatePolicyForm } from '../../../types/deviceSpec';
|
|
@@ -178,7 +177,7 @@ export const getFleetResource = (values: FleetFormValues): Fleet => {
|
|
|
178
177
|
},
|
|
179
178
|
};
|
|
180
179
|
const fleet: Fleet = {
|
|
181
|
-
apiVersion:
|
|
180
|
+
apiVersion: ApiVersion.ApiVersionV1beta1,
|
|
182
181
|
kind: 'Fleet',
|
|
183
182
|
metadata: {
|
|
184
183
|
name: values.name,
|
|
@@ -197,7 +196,7 @@ export const getFleetResource = (values: FleetFormValues): Fleet => {
|
|
|
197
196
|
spec: {
|
|
198
197
|
os: values.osImage ? { image: values.osImage || '' } : undefined,
|
|
199
198
|
config: values.configTemplates.map(getApiConfig),
|
|
200
|
-
applications: values.applications.map(
|
|
199
|
+
applications: values.applications.map(toApiApplication),
|
|
201
200
|
...systemdPatterns,
|
|
202
201
|
},
|
|
203
202
|
},
|
|
@@ -14,6 +14,7 @@ import FormSelect from '../../../form/FormSelect';
|
|
|
14
14
|
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
15
15
|
import { usePermissionsContext } from '../../../common/PermissionsContext';
|
|
16
16
|
import { RESOURCE, VERB } from '../../../../types/rbac';
|
|
17
|
+
import WithTooltip from '../../../common/WithTooltip';
|
|
17
18
|
|
|
18
19
|
export const repositoryStepId = 'repository';
|
|
19
20
|
|
|
@@ -93,14 +94,16 @@ const RepositoryStep = ({ repositories, hasLoaded }: { repositories: Repository[
|
|
|
93
94
|
{canCreateRepo && (
|
|
94
95
|
<FormSection>
|
|
95
96
|
<FormGroup isInline>
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
<WithTooltip showTooltip={noRepositoriesExist} content={t('No Git repositories found')}>
|
|
98
|
+
<Radio
|
|
99
|
+
isChecked={values.useExistingRepo}
|
|
100
|
+
onChange={() => setFieldValue('useExistingRepo', true, true)}
|
|
101
|
+
id="existing-repo"
|
|
102
|
+
name="repo"
|
|
103
|
+
label={t('Use an existing Git repository')}
|
|
104
|
+
isDisabled={noRepositoriesExist}
|
|
105
|
+
/>
|
|
106
|
+
</WithTooltip>
|
|
104
107
|
<Radio
|
|
105
108
|
isChecked={!values.useExistingRepo}
|
|
106
109
|
onChange={() => setFieldValue('useExistingRepo', false, true)}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Alert,
|
|
4
|
+
Button,
|
|
5
|
+
Content,
|
|
6
|
+
Modal,
|
|
7
|
+
ModalBody,
|
|
8
|
+
ModalFooter,
|
|
9
|
+
ModalHeader,
|
|
10
|
+
Stack,
|
|
11
|
+
StackItem,
|
|
12
|
+
} from '@patternfly/react-core';
|
|
13
|
+
|
|
14
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
15
|
+
import { useFetch } from '../../../hooks/useFetch';
|
|
16
|
+
import { getErrorMessage } from '../../../utils/error';
|
|
17
|
+
|
|
18
|
+
const CancelImageBuildModal = ({
|
|
19
|
+
imageBuildId,
|
|
20
|
+
onClose,
|
|
21
|
+
}: {
|
|
22
|
+
imageBuildId: string;
|
|
23
|
+
onClose: (confirmed?: boolean) => void;
|
|
24
|
+
}) => {
|
|
25
|
+
const { t } = useTranslation();
|
|
26
|
+
const { post } = useFetch();
|
|
27
|
+
|
|
28
|
+
const [error, setError] = React.useState<string>();
|
|
29
|
+
const [isCancelling, setIsCancelling] = React.useState<boolean>(false);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Modal isOpen onClose={() => onClose()} variant="small">
|
|
33
|
+
<ModalHeader title={t('Cancel and discard build?')} titleIconVariant="warning" />
|
|
34
|
+
<ModalBody>
|
|
35
|
+
<Stack hasGutter>
|
|
36
|
+
<StackItem>
|
|
37
|
+
<Content>
|
|
38
|
+
{t(
|
|
39
|
+
'This will immediately stop the current process. All progress will be lost, and the associated data will be permanently deleted.',
|
|
40
|
+
)}
|
|
41
|
+
</Content>
|
|
42
|
+
</StackItem>
|
|
43
|
+
{error && (
|
|
44
|
+
<StackItem>
|
|
45
|
+
<Alert isInline variant="danger" title={t('Failed to cancel image build')}>
|
|
46
|
+
{error}
|
|
47
|
+
</Alert>
|
|
48
|
+
</StackItem>
|
|
49
|
+
)}
|
|
50
|
+
</Stack>
|
|
51
|
+
</ModalBody>
|
|
52
|
+
<ModalFooter>
|
|
53
|
+
<Button
|
|
54
|
+
key="confirm"
|
|
55
|
+
variant="danger"
|
|
56
|
+
isDisabled={isCancelling}
|
|
57
|
+
isLoading={isCancelling}
|
|
58
|
+
onClick={async () => {
|
|
59
|
+
setError(undefined);
|
|
60
|
+
try {
|
|
61
|
+
setIsCancelling(true);
|
|
62
|
+
await post(`imagebuilds/${imageBuildId}/cancel`, {});
|
|
63
|
+
onClose(true);
|
|
64
|
+
} catch (err) {
|
|
65
|
+
setError(getErrorMessage(err));
|
|
66
|
+
} finally {
|
|
67
|
+
setIsCancelling(false);
|
|
68
|
+
}
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
{t('Cancel image build')}
|
|
72
|
+
</Button>
|
|
73
|
+
<Button key="dismiss" variant="link" onClick={() => onClose()} isDisabled={isCancelling}>
|
|
74
|
+
{t('Close')}
|
|
75
|
+
</Button>
|
|
76
|
+
</ModalFooter>
|
|
77
|
+
</Modal>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default CancelImageBuildModal;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
import { useTranslation } from '../../../hooks/useTranslation';
|
|
5
|
+
|
|
6
|
+
export type ConfirmImageExportAction = 'cancel' | 'delete' | 'rebuild';
|
|
7
|
+
|
|
8
|
+
const ConfirmImageExportActionModal = ({
|
|
9
|
+
action,
|
|
10
|
+
onClose,
|
|
11
|
+
}: {
|
|
12
|
+
action: ConfirmImageExportAction;
|
|
13
|
+
onClose: (isConfirmed: boolean) => void;
|
|
14
|
+
}) => {
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
|
|
17
|
+
let title = '';
|
|
18
|
+
let message = '';
|
|
19
|
+
let confirmButtonTitle = '';
|
|
20
|
+
|
|
21
|
+
switch (action) {
|
|
22
|
+
case 'cancel':
|
|
23
|
+
title = t('Cancel image export?');
|
|
24
|
+
message = t(
|
|
25
|
+
'This will immediately stop the current process. As a result, the image will not be exported in this format.',
|
|
26
|
+
);
|
|
27
|
+
confirmButtonTitle = t('Cancel image export');
|
|
28
|
+
break;
|
|
29
|
+
case 'delete':
|
|
30
|
+
title = t('Delete image export?');
|
|
31
|
+
message = t(
|
|
32
|
+
'This image export will be permanently removed. The actual image files in your storage will not be deleted.',
|
|
33
|
+
);
|
|
34
|
+
confirmButtonTitle = t('Delete');
|
|
35
|
+
break;
|
|
36
|
+
case 'rebuild':
|
|
37
|
+
title = t('Rebuild image export?');
|
|
38
|
+
message = t(
|
|
39
|
+
'Rebuilding updates the image currently displayed in the console. Previous versions remain accessible via the flightctl CLI.',
|
|
40
|
+
);
|
|
41
|
+
confirmButtonTitle = t('Rebuild');
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Modal variant="small" isOpen onClose={() => onClose(false)}>
|
|
47
|
+
<ModalHeader title={title} />
|
|
48
|
+
<ModalBody>{message}</ModalBody>
|
|
49
|
+
<ModalFooter>
|
|
50
|
+
<Button key="confirm" variant={action === 'rebuild' ? 'primary' : 'danger'} onClick={() => onClose(true)}>
|
|
51
|
+
{confirmButtonTitle}
|
|
52
|
+
</Button>
|
|
53
|
+
<Button key="cancel" variant="link" onClick={() => onClose(false)}>
|
|
54
|
+
{action === 'cancel' ? t('Close') : t('Cancel')}
|
|
55
|
+
</Button>
|
|
56
|
+
</ModalFooter>
|
|
57
|
+
</Modal>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default ConfirmImageExportActionModal;
|
|
@@ -70,11 +70,16 @@ const CreateImageBuildWizard = () => {
|
|
|
70
70
|
const [error, setError] = React.useState<ImageBuildWizardError>();
|
|
71
71
|
const [currentStep, setCurrentStep] = React.useState<WizardStepType>();
|
|
72
72
|
const [imageBuildId, imageBuild, imageBuildLoading, editError] = useEditImageBuild();
|
|
73
|
-
const { isLoading: registriesLoading, error: registriesError } = useOciRegistriesContext();
|
|
73
|
+
const { ociRegistries, isLoading: registriesLoading, error: registriesError } = useOciRegistriesContext();
|
|
74
74
|
|
|
75
75
|
const isEdit = !!imageBuildId;
|
|
76
76
|
const buildReason = imageBuild ? getImageBuildStatusReason(imageBuild) : undefined;
|
|
77
77
|
|
|
78
|
+
const availableRepositoryIds = React.useMemo(
|
|
79
|
+
() => new Set(ociRegistries.map((r) => r.metadata?.name as string)),
|
|
80
|
+
[ociRegistries],
|
|
81
|
+
);
|
|
82
|
+
|
|
78
83
|
let title: string;
|
|
79
84
|
if (isEdit) {
|
|
80
85
|
title =
|
|
@@ -117,7 +122,7 @@ const CreateImageBuildWizard = () => {
|
|
|
117
122
|
</Alert>
|
|
118
123
|
) : (
|
|
119
124
|
<Formik<ImageBuildFormValues>
|
|
120
|
-
initialValues={getInitialValues(imageBuild)}
|
|
125
|
+
initialValues={getInitialValues(imageBuild, availableRepositoryIds)}
|
|
121
126
|
validationSchema={getValidationSchema(t)}
|
|
122
127
|
validateOnMount
|
|
123
128
|
onSubmit={async (values) => {
|
|
@@ -184,7 +189,7 @@ const CreateImageBuildWizard = () => {
|
|
|
184
189
|
setCurrentStep(step);
|
|
185
190
|
}}
|
|
186
191
|
>
|
|
187
|
-
<WizardStep name={t('
|
|
192
|
+
<WizardStep name={t('Base image')} id={sourceImageStepId}>
|
|
188
193
|
{(!currentStep || currentStep?.id === sourceImageStepId) && <SourceImageStep />}
|
|
189
194
|
</WizardStep>
|
|
190
195
|
<WizardStep
|
|
@@ -37,7 +37,7 @@ const OutputImageStep = () => {
|
|
|
37
37
|
const writableRepoValidation = React.useCallback(
|
|
38
38
|
(repo: Repository) => {
|
|
39
39
|
if (isOciRepoSpec(repo.spec) && repo.spec.accessMode === OciRepoSpec.accessMode.READ) {
|
|
40
|
-
return t('
|
|
40
|
+
return t('Repositories used for output images must be writable.');
|
|
41
41
|
}
|
|
42
42
|
return undefined;
|
|
43
43
|
},
|
|
@@ -22,6 +22,7 @@ import { FormikErrors, useFormikContext } from 'formik';
|
|
|
22
22
|
|
|
23
23
|
import { BindingType } from '@flightctl/types/imagebuilder';
|
|
24
24
|
import { ImageBuildFormValues } from '../types';
|
|
25
|
+
import { PUBLIC_KEY_MAX_LENGTH } from '../utils';
|
|
25
26
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
26
27
|
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
27
28
|
import TextField from '../../../form/TextField';
|
|
@@ -31,7 +32,14 @@ import { CERTIFICATE_VALIDITY_IN_YEARS } from '../../../../constants';
|
|
|
31
32
|
|
|
32
33
|
export const registrationStepId = 'registration';
|
|
33
34
|
|
|
34
|
-
export const isRegistrationStepValid = (errors: FormikErrors<ImageBuildFormValues>) =>
|
|
35
|
+
export const isRegistrationStepValid = (errors: FormikErrors<ImageBuildFormValues>) => {
|
|
36
|
+
const { userConfiguration } = errors;
|
|
37
|
+
if (!userConfiguration) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return !userConfiguration.username && !userConfiguration.publickey;
|
|
42
|
+
};
|
|
35
43
|
|
|
36
44
|
const RegistrationStep = () => {
|
|
37
45
|
const { t } = useTranslation();
|
|
@@ -52,11 +60,7 @@ const RegistrationStep = () => {
|
|
|
52
60
|
};
|
|
53
61
|
|
|
54
62
|
const handleRemoteAccessToggle = (enabled: boolean) => {
|
|
55
|
-
|
|
56
|
-
setFieldValue('userConfiguration', { username: '', publickey: '', enabled: true });
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
setFieldValue('userConfiguration.enabled', enabled);
|
|
63
|
+
setFieldValue('remoteAccessEnabled', enabled);
|
|
60
64
|
};
|
|
61
65
|
|
|
62
66
|
return (
|
|
@@ -158,19 +162,23 @@ const RegistrationStep = () => {
|
|
|
158
162
|
<Grid lg={5} span={8}>
|
|
159
163
|
<FormSection title={t('Remote access')}>
|
|
160
164
|
<CheckboxField
|
|
161
|
-
name="
|
|
165
|
+
name="remoteAccessEnabled"
|
|
162
166
|
label={t('Provide an SSH public key to enable passwordless login once your image is deployed.')}
|
|
163
167
|
onChangeCustom={handleRemoteAccessToggle}
|
|
164
168
|
>
|
|
165
|
-
<FormGroup label={t('Username')} fieldId="user-config-username">
|
|
169
|
+
<FormGroup label={t('Username')} fieldId="user-config-username" isRequired>
|
|
166
170
|
<TextField
|
|
167
171
|
name="userConfiguration.username"
|
|
168
172
|
aria-label={t('Username')}
|
|
169
173
|
helperText={t('The username for the user account')}
|
|
170
174
|
/>
|
|
171
175
|
</FormGroup>
|
|
172
|
-
<FormGroup label={t('SSH public key')} fieldId="user-config-publickey">
|
|
173
|
-
<UploadField
|
|
176
|
+
<FormGroup label={t('SSH public key')} fieldId="user-config-publickey" isRequired>
|
|
177
|
+
<UploadField
|
|
178
|
+
name="userConfiguration.publickey"
|
|
179
|
+
ariaLabel={t('SSH public key')}
|
|
180
|
+
maxFileBytes={PUBLIC_KEY_MAX_LENGTH}
|
|
181
|
+
/>
|
|
174
182
|
</FormGroup>
|
|
175
183
|
</CheckboxField>
|
|
176
184
|
<Content component="small">
|
|
@@ -54,7 +54,7 @@ const ReviewStep = ({ error }: ReviewStepProps) => {
|
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
const isEarlyBinding = values.bindingType === BindingType.BindingTypeEarly;
|
|
57
|
-
const remoteAccessUsername = values.
|
|
57
|
+
const remoteAccessUsername = values.remoteAccessEnabled ? values.userConfiguration.username || '' : '';
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
60
|
<Stack hasGutter>
|
|
@@ -63,6 +63,10 @@ const ReviewStep = ({ error }: ReviewStepProps) => {
|
|
|
63
63
|
<CardTitle>{t('Base image')}</CardTitle>
|
|
64
64
|
<CardBody>
|
|
65
65
|
<FlightCtlDescriptionList isHorizontal isCompact>
|
|
66
|
+
<DescriptionListGroup>
|
|
67
|
+
<DescriptionListTerm>{t('Build name')}</DescriptionListTerm>
|
|
68
|
+
<DescriptionListDescription>{values.buildName}</DescriptionListDescription>
|
|
69
|
+
</DescriptionListGroup>
|
|
66
70
|
<DescriptionListGroup>
|
|
67
71
|
<DescriptionListTerm>{t('Source repository')}</DescriptionListTerm>
|
|
68
72
|
<DescriptionListDescription>{values.source.repository}</DescriptionListDescription>
|
|
@@ -6,6 +6,7 @@ import { RepoSpecType } from '@flightctl/types';
|
|
|
6
6
|
import { ImageBuildFormValues } from '../types';
|
|
7
7
|
import { useTranslation } from '../../../../hooks/useTranslation';
|
|
8
8
|
import FlightCtlForm from '../../../form/FlightCtlForm';
|
|
9
|
+
import NameField from '../../../form/NameField';
|
|
9
10
|
import TextField from '../../../form/TextField';
|
|
10
11
|
import RepositorySelect from '../../../form/RepositorySelect';
|
|
11
12
|
import { usePermissionsContext } from '../../../common/PermissionsContext';
|
|
@@ -13,11 +14,15 @@ import { RESOURCE, VERB } from '../../../../types/rbac';
|
|
|
13
14
|
import { getImageReference } from '../../../../utils/imageBuilds';
|
|
14
15
|
import ImageUrlCard from '../../ImageUrlCard';
|
|
15
16
|
import { useOciRegistriesContext } from '../../OciRegistriesContext';
|
|
17
|
+
import { getBuildNameValidations } from '../../../form/validations';
|
|
16
18
|
|
|
17
19
|
export const sourceImageStepId = 'source-image';
|
|
18
20
|
|
|
19
21
|
export const isSourceImageStepValid = (errors: FormikErrors<ImageBuildFormValues>) => {
|
|
20
|
-
const { source } = errors;
|
|
22
|
+
const { buildName, source } = errors;
|
|
23
|
+
if (buildName) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
21
26
|
if (!source) {
|
|
22
27
|
return true;
|
|
23
28
|
}
|
|
@@ -39,6 +44,13 @@ const SourceImageStep = () => {
|
|
|
39
44
|
<FlightCtlForm>
|
|
40
45
|
<Grid lg={5} span={8}>
|
|
41
46
|
<FormSection>
|
|
47
|
+
<NameField
|
|
48
|
+
name="buildName"
|
|
49
|
+
aria-label={t('Build name')}
|
|
50
|
+
isRequired
|
|
51
|
+
resourceType="imagebuilds"
|
|
52
|
+
validations={getBuildNameValidations(t)}
|
|
53
|
+
/>
|
|
42
54
|
<RepositorySelect
|
|
43
55
|
name="source.repository"
|
|
44
56
|
label={t('Source repository')}
|
|
@@ -6,17 +6,14 @@ import {
|
|
|
6
6
|
} from '@flightctl/types/imagebuilder';
|
|
7
7
|
import { ExportFormatType } from '@flightctl/types/imagebuilder';
|
|
8
8
|
|
|
9
|
-
type ImageBuildUserConfigurationForm = ImageBuildUserConfiguration & {
|
|
10
|
-
enabled?: boolean;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
9
|
export type ImageBuildFormValues = {
|
|
14
|
-
|
|
10
|
+
buildName: string;
|
|
15
11
|
source: ImageBuildSource;
|
|
16
12
|
destination: ImageBuildDestination;
|
|
17
13
|
bindingType: BindingType;
|
|
18
14
|
exportFormats: ExportFormatType[];
|
|
19
|
-
|
|
15
|
+
remoteAccessEnabled: boolean;
|
|
16
|
+
userConfiguration: ImageBuildUserConfiguration;
|
|
20
17
|
};
|
|
21
18
|
|
|
22
19
|
export type ImageBuildWizardError =
|