@flightctl/ui-components 0.0.3 → 0.0.5
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/__mocks__/fileMock.d.ts +3 -0
- package/dist/__mocks__/fileMock.d.ts.map +1 -0
- package/dist/__mocks__/styleMock.d.ts +2 -0
- package/dist/__mocks__/styleMock.d.ts.map +1 -0
- package/dist/jest.config.d.ts +12 -0
- package/dist/jest.config.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.d.ts +8 -0
- package/dist/src/components/DetailsPage/DetailsNotFound.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts +18 -0
- package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts +2 -0
- package/dist/src/components/DetailsPage/DetailsPage.spec.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts +17 -0
- package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.d.ts +7 -0
- package/dist/src/components/DetailsPage/DetailsPageCard.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +2 -3
- package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.d.ts +9 -0
- package/dist/src/components/DetailsPage/Tables/ConditionsTable.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts +8 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.d.ts.map +1 -0
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js +2 -1
- package/dist/src/components/DetailsPage/Tables/IntegrityDetails.js.map +1 -1
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts +12 -0
- package/dist/src/components/DetailsPage/Tables/SystemdDetailsTable.d.ts.map +1 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts +6 -0
- package/dist/src/components/Device/AddDeviceModal/AddDeviceModal.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts +4 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +10 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts +12 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +24 -22
- package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.d.ts +8 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js +3 -3
- package/dist/src/components/Device/DeviceDetails/DeviceFleet.js.map +1 -1
- package/dist/src/components/Device/DeviceDetails/DeviceOs.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.js +24 -0
- package/dist/src/components/Device/DeviceDetails/DeviceOs.js.map +1 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts +9 -0
- package/dist/src/components/Device/DeviceDetails/DeviceStatusDebugModal.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts +10 -0
- package/dist/src/components/Device/DeviceDetails/SystemdTable.d.ts.map +1 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts +7 -0
- package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts +17 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js +61 -0
- package/dist/src/components/Device/DevicesPage/DeviceFilterSelect.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts +14 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/DeviceTableRow.js +1 -1
- package/dist/src/components/Device/DevicesPage/DeviceTableRow.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts +21 -0
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/DeviceTableToolbar.js +5 -6
- package/dist/src/components/Device/DevicesPage/DeviceTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.css +16 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts +18 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js +127 -0
- package/dist/src/components/Device/DevicesPage/DeviceToolbarFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts +22 -0
- package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList/DeviceList.js → DevicesPage/DevicesPage.js} +20 -47
- package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts +13 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js +104 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestList.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts +11 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js +18 -0
- package/dist/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/types.d.ts +18 -0
- package/dist/src/components/Device/DevicesPage/types.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/types.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts +12 -0
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceBackendFilters.js +1 -1
- package/dist/src/components/Device/DevicesPage/useDeviceBackendFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts +8 -0
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.d.ts.map +1 -0
- package/dist/src/components/Device/{DeviceList → DevicesPage}/useDeviceFilters.js +3 -3
- package/dist/src/components/Device/DevicesPage/useDeviceFilters.js.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts +21 -0
- package/dist/src/components/Device/DevicesPage/useDevices.d.ts.map +1 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js +83 -0
- package/dist/src/components/Device/DevicesPage/useDevices.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +87 -21
- package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.css +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts +5 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js +61 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js +88 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js +3 -3
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts +4 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js +26 -31
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts +11 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts +10 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +14 -12
- package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts +8 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +26 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts +7 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js +9 -4
- package/dist/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.js.map +1 -1
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts +20 -0
- package/dist/src/components/Device/EditDeviceWizard/types.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.d.ts +3 -0
- package/dist/src/components/Device/EditDeviceWizard/useEditDevice.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +44 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -0
- package/dist/src/components/Device/EditDeviceWizard/utils.js +6 -4
- package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts +11 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsForm.d.ts.map +1 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts +17 -0
- package/dist/src/components/Device/MatchPatternsModal/MatchPatternsModal.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts +5 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +2 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts +15 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.d.ts.map +1 -0
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js +9 -13
- package/dist/src/components/EnrollmentRequest/EnrollmentRequestTableRow.js.map +1 -1
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts +6 -0
- package/dist/src/components/ErrorAlert/ErrorAlert.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts +5 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts +7 -0
- package/dist/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts +4 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js +4 -5
- package/dist/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts +10 -0
- package/dist/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts +7 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js +11 -6
- package/dist/src/components/Fleet/CreateFleet/steps/ReviewStep.js.map +1 -1
- package/dist/src/components/Fleet/CreateFleet/types.d.ts +8 -0
- package/dist/src/components/Fleet/CreateFleet/types.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.d.ts +3 -0
- package/dist/src/components/Fleet/CreateFleet/useEditFleet.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts +9 -0
- package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -0
- package/dist/src/components/Fleet/CreateFleet/utils.js +8 -3
- package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts +7 -0
- package/dist/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts +4 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetails.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts +7 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js +10 -20
- package/dist/src/components/Fleet/FleetDetails/FleetDetailsContent.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts +9 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js +18 -12
- package/dist/src/components/Fleet/FleetDetails/FleetDevices.js.map +1 -1
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts +7 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetDevicesLink.js.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.d.ts +13 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js +1 -0
- package/dist/src/components/Fleet/FleetDetails/FleetOwnerLink.js.map +1 -1
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts +7 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js +115 -0
- package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -0
- package/dist/src/components/Fleet/FleetRow.d.ts +13 -0
- package/dist/src/components/Fleet/FleetRow.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetRow.js +5 -5
- package/dist/src/components/Fleet/FleetRow.js.map +1 -1
- package/dist/src/components/Fleet/FleetStatus.d.ts +7 -0
- package/dist/src/components/Fleet/FleetStatus.d.ts.map +1 -0
- package/dist/src/components/Fleet/FleetsPage.d.ts +4 -0
- package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -0
- package/dist/src/components/Fleet/{FleetList.js → FleetsPage.js} +28 -42
- package/dist/src/components/Fleet/FleetsPage.js.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts +5 -0
- package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts +12 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.d.ts +8 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.d.ts +7 -0
- package/dist/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.d.ts.map +1 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.d.ts +6 -0
- package/dist/src/components/Fleet/ImportFleetWizard/types.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPage.d.ts +10 -0
- package/dist/src/components/ListPage/ListPage.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPage.js +2 -2
- package/dist/src/components/ListPage/ListPage.js.map +1 -1
- package/dist/src/components/ListPage/ListPageActions.d.ts +17 -0
- package/dist/src/components/ListPage/ListPageActions.d.ts.map +1 -0
- package/dist/src/components/ListPage/ListPageActions.js +13 -2
- package/dist/src/components/ListPage/ListPageActions.js.map +1 -1
- package/dist/src/components/ListPage/ListPageBody.d.ts +9 -0
- package/dist/src/components/ListPage/ListPageBody.d.ts.map +1 -0
- package/dist/src/components/ListPage/types.d.ts +16 -0
- package/dist/src/components/ListPage/types.d.ts.map +1 -0
- package/dist/src/components/NavItem/NavItem.d.ts +8 -0
- package/dist/src/components/NavItem/NavItem.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js +5 -17
- package/dist/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js +7 -20
- package/dist/src/components/OverviewPage/Cards/Status/DeviceStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js +11 -10
- package/dist/src/components/OverviewPage/Cards/Status/StatusCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts +14 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js +22 -51
- package/dist/src/components/OverviewPage/Cards/Status/StatusCardFilters.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.d.ts +9 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js +5 -17
- package/dist/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/Status/utils.d.ts +15 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/Status/utils.js +9 -26
- package/dist/src/components/OverviewPage/Cards/Status/utils.js.map +1 -1
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts +4 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js +2 -3
- package/dist/src/components/OverviewPage/Cards/ToDo/ToDoCard.js.map +1 -1
- package/dist/src/components/OverviewPage/Overview.d.ts +4 -0
- package/dist/src/components/OverviewPage/Overview.d.ts.map +1 -0
- package/dist/src/components/OverviewPage/OverviewPage.d.ts +4 -0
- package/dist/src/components/OverviewPage/OverviewPage.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts +4 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts +21 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +8 -1
- package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts +9 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js +18 -11
- package/dist/src/components/Repository/CreateRepository/CreateResourceSyncsForm.js.map +1 -1
- package/dist/src/components/Repository/CreateRepository/types.d.ts +42 -0
- package/dist/src/components/Repository/CreateRepository/types.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.d.ts +75 -0
- package/dist/src/components/Repository/CreateRepository/utils.d.ts.map +1 -0
- package/dist/src/components/Repository/CreateRepository/utils.js +40 -7
- package/dist/src/components/Repository/CreateRepository/utils.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts +9 -0
- package/dist/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts +4 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +3 -2
- package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.d.ts +7 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js +14 -13
- package/dist/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts +6 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.d.ts +22 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js +43 -11
- package/dist/src/components/Repository/RepositoryDetails/RepositorySource.js.map +1 -1
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.d.ts +7 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js +30 -33
- package/dist/src/components/Repository/RepositoryDetails/RepositorySourceList.js.map +1 -1
- package/dist/src/components/Repository/RepositoryList.d.ts +5 -0
- package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -0
- package/dist/src/components/Repository/RepositoryList.js +3 -3
- package/dist/src/components/Repository/RepositoryList.js.map +1 -1
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.css +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts +7 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -0
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +72 -25
- package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
- package/dist/src/components/ResourceSync/ResourceSyncStatus.d.ts +9 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.d.ts.map +1 -0
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js +9 -18
- package/dist/src/components/ResourceSync/ResourceSyncStatus.js.map +1 -1
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.d.ts +4 -0
- package/dist/src/components/ResourceSync/ResourceSyncToRepository.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationStatus.d.ts +13 -0
- package/dist/src/components/Status/ApplicationStatus.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.d.ts +13 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.d.ts.map +1 -0
- package/dist/src/components/Status/ApplicationSummaryStatus.js.map +1 -1
- package/dist/src/components/Status/DeviceResourceStatus.d.ts +9 -0
- package/dist/src/components/Status/DeviceResourceStatus.d.ts.map +1 -0
- package/dist/src/components/Status/DeviceStatus.d.ts +7 -0
- package/dist/src/components/Status/DeviceStatus.d.ts.map +1 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.d.ts +7 -0
- package/dist/src/components/Status/EnrollmentRequestStatus.d.ts.map +1 -0
- package/dist/src/components/Status/IntegrityStatus.d.ts +7 -0
- package/dist/src/components/Status/IntegrityStatus.d.ts.map +1 -0
- package/dist/src/components/Status/RepositoryStatus.d.ts +10 -0
- package/dist/src/components/Status/RepositoryStatus.d.ts.map +1 -0
- package/dist/src/components/Status/StatusDisplay.css +3 -0
- package/dist/src/components/Status/StatusDisplay.d.ts +23 -0
- package/dist/src/components/Status/StatusDisplay.d.ts.map +1 -0
- package/dist/src/components/Status/SystemUpdateStatus.d.ts +7 -0
- package/dist/src/components/Status/SystemUpdateStatus.d.ts.map +1 -0
- package/dist/src/components/Status/SystemdStatus.d.ts +6 -0
- package/dist/src/components/Status/SystemdStatus.d.ts.map +1 -0
- package/dist/src/components/Status/utils.d.ts +5 -0
- package/dist/src/components/Status/utils.d.ts.map +1 -0
- package/dist/src/components/Table/Table.d.ts +25 -0
- package/dist/src/components/Table/Table.d.ts.map +1 -0
- package/dist/src/components/Table/TableActions.d.ts +7 -0
- package/dist/src/components/Table/TableActions.d.ts.map +1 -0
- package/dist/src/components/Table/TableActions.js +3 -3
- package/dist/src/components/Table/TableActions.js.map +1 -1
- package/dist/src/components/Table/TableTextSearch.d.ts +9 -0
- package/dist/src/components/Table/TableTextSearch.d.ts.map +1 -0
- package/dist/src/components/Table/TableTextSearch.js +2 -4
- package/dist/src/components/Table/TableTextSearch.js.map +1 -1
- package/dist/src/components/Terminal/Terminal.d.ts +15 -0
- package/dist/src/components/Terminal/Terminal.d.ts.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts +7 -0
- package/dist/src/components/UserPreferences/UserPreferencesModal.d.ts.map +1 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts +11 -0
- package/dist/src/components/UserPreferences/UserPreferencesProvider.d.ts.map +1 -0
- package/dist/src/components/charts/DonutChart.d.ts +17 -0
- package/dist/src/components/charts/DonutChart.d.ts.map +1 -0
- package/dist/src/components/charts/utils.d.ts +15 -0
- package/dist/src/components/charts/utils.d.ts.map +1 -0
- package/dist/src/components/charts/utils.js +30 -0
- package/dist/src/components/charts/utils.js.map +1 -0
- package/dist/src/components/common/CopyButton.d.ts +10 -0
- package/dist/src/components/common/CopyButton.d.ts.map +1 -0
- package/dist/src/components/common/CopyButton.js +3 -3
- package/dist/src/components/common/CopyButton.js.map +1 -1
- package/dist/src/components/common/EditableLabelControl.d.ts +10 -0
- package/dist/src/components/common/EditableLabelControl.d.ts.map +1 -0
- package/dist/src/components/common/ErrorBoundary.d.ts +9 -0
- package/dist/src/components/common/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/common/FlightCtlDescriptionList.d.ts +5 -0
- package/dist/src/components/common/FlightCtlDescriptionList.d.ts.map +1 -0
- package/dist/src/components/common/FlightCtlDescriptionList.js +13 -0
- package/dist/src/components/common/FlightCtlDescriptionList.js.map +1 -0
- package/dist/src/components/common/HelperTextItems.d.ts +3 -0
- package/dist/src/components/common/HelperTextItems.d.ts.map +1 -0
- package/dist/src/components/common/HelperTextItems.js +1 -9
- package/dist/src/components/common/HelperTextItems.js.map +1 -1
- package/dist/src/components/common/LabelsView.d.ts +10 -0
- package/dist/src/components/common/LabelsView.d.ts.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.d.ts +4 -0
- package/dist/src/components/common/LeaveFormConfirmation.d.ts.map +1 -0
- package/dist/src/components/common/LeaveFormConfirmation.js +4 -1
- package/dist/src/components/common/LeaveFormConfirmation.js.map +1 -1
- package/dist/src/components/common/ResourceLink.d.ts +13 -0
- package/dist/src/components/common/ResourceLink.d.ts.map +1 -0
- package/dist/src/components/common/ResourceListEmptyState.d.ts +8 -0
- package/dist/src/components/common/ResourceListEmptyState.d.ts.map +1 -0
- package/dist/src/components/common/WithHelperText.d.ts +11 -0
- package/dist/src/components/common/WithHelperText.d.ts.map +1 -0
- package/dist/src/components/common/WithTooltip.d.ts +10 -0
- package/dist/src/components/common/WithTooltip.d.ts.map +1 -0
- package/dist/src/components/form/CheckboxField.d.ts +10 -0
- package/dist/src/components/form/CheckboxField.d.ts.map +1 -0
- package/dist/src/components/{Device/EditDeviceWizard/steps/ConfigTemplateForm.css → form/ExpandableFormSection.css} +2 -2
- package/dist/src/components/form/ExpandableFormSection.d.ts +11 -0
- package/dist/src/components/form/ExpandableFormSection.d.ts.map +1 -0
- package/dist/src/components/form/ExpandableFormSection.js +30 -0
- package/dist/src/components/form/ExpandableFormSection.js.map +1 -0
- package/dist/src/components/form/FieldHelperText.d.ts +14 -0
- package/dist/src/components/form/FieldHelperText.d.ts.map +1 -0
- package/dist/src/components/form/FilterSelect.css +11 -1
- package/dist/src/components/form/FilterSelect.d.ts +16 -0
- package/dist/src/components/form/FilterSelect.d.ts.map +1 -0
- package/dist/src/components/form/FilterSelect.js +14 -9
- package/dist/src/components/form/FilterSelect.js.map +1 -1
- package/dist/src/components/form/FlightCtlActionGroup.d.ts +5 -0
- package/dist/src/components/form/FlightCtlActionGroup.d.ts.map +1 -0
- package/dist/src/components/form/FlightCtlForm.d.ts +6 -0
- package/dist/src/components/form/FlightCtlForm.d.ts.map +1 -0
- package/dist/src/components/form/FormSelect.css +8 -0
- package/dist/src/components/form/FormSelect.d.ts +16 -0
- package/dist/src/components/form/FormSelect.d.ts.map +1 -0
- package/dist/src/components/form/FormSelectTypeahead.d.ts +19 -0
- package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -0
- package/dist/src/components/form/FormSelectTypeahead.js +116 -0
- package/dist/src/components/form/FormSelectTypeahead.js.map +1 -0
- package/dist/src/components/form/LabelsField.d.ts +12 -0
- package/dist/src/components/form/LabelsField.d.ts.map +1 -0
- package/dist/src/components/form/NameField.d.ts +10 -0
- package/dist/src/components/form/NameField.d.ts.map +1 -0
- package/dist/src/components/form/RadioField.d.ts +12 -0
- package/dist/src/components/form/RadioField.d.ts.map +1 -0
- package/dist/src/components/form/RichValidationTextField.d.ts +13 -0
- package/dist/src/components/form/RichValidationTextField.d.ts.map +1 -0
- package/dist/src/components/form/SwitchField.d.ts +9 -0
- package/dist/src/components/form/SwitchField.d.ts.map +1 -0
- package/dist/src/components/form/SwitchField.js +24 -0
- package/dist/src/components/form/SwitchField.js.map +1 -0
- package/dist/src/components/form/TextAreaField.d.ts +11 -0
- package/dist/src/components/form/TextAreaField.d.ts.map +1 -0
- package/dist/src/components/form/TextField.d.ts +10 -0
- package/dist/src/components/form/TextField.d.ts.map +1 -0
- package/dist/src/components/form/UploadField.d.ts +13 -0
- package/dist/src/components/form/UploadField.d.ts.map +1 -0
- package/dist/src/components/form/UploadField.js +74 -0
- package/dist/src/components/form/UploadField.js.map +1 -0
- package/dist/src/components/form/validations.d.ts +82 -0
- package/dist/src/components/form/validations.d.ts.map +1 -0
- package/dist/src/components/form/validations.js +54 -19
- package/dist/src/components/form/validations.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.d.ts +16 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.d.ts.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts +6 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.d.ts +8 -0
- package/dist/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.d.ts.map +1 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts +11 -0
- package/dist/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts +10 -0
- package/dist/src/components/modals/DeleteModal/DeleteModal.d.ts.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts +9 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.d.ts.map +1 -0
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js +1 -2
- package/dist/src/components/modals/EditLabelsModal/EditLabelsForm.js.map +1 -1
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts +11 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js +3 -41
- package/dist/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.d.ts.map +1 -0
- 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.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js +22 -21
- package/dist/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.js.map +1 -1
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.d.ts.map +1 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts +10 -0
- package/dist/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.d.ts.map +1 -0
- package/dist/src/constants.d.ts +4 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/hooks/useAppContext.d.ts +70 -0
- package/dist/src/hooks/useAppContext.d.ts.map +1 -0
- package/dist/src/hooks/useDeviceLabelMatch.d.ts +9 -0
- package/dist/src/hooks/useDeviceLabelMatch.d.ts.map +1 -0
- package/dist/src/hooks/useDocumentTitle.d.ts +2 -0
- package/dist/src/hooks/useDocumentTitle.d.ts.map +1 -0
- package/dist/src/hooks/useFetch.d.ts +12 -0
- package/dist/src/hooks/useFetch.d.ts.map +1 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts +3 -0
- package/dist/src/hooks/useFetchPeriodically.d.ts.map +1 -0
- package/dist/src/hooks/useNavigate.d.ts +38 -0
- package/dist/src/hooks/useNavigate.d.ts.map +1 -0
- package/dist/src/hooks/useTableSelect.d.ts +13 -0
- package/dist/src/hooks/useTableSelect.d.ts.map +1 -0
- package/dist/src/hooks/useTableSort.d.ts +7 -0
- package/dist/src/hooks/useTableSort.d.ts.map +1 -0
- package/dist/src/hooks/useTableTextSearch.d.ts +6 -0
- package/dist/src/hooks/useTableTextSearch.d.ts.map +1 -0
- package/dist/src/hooks/useTemplateVersion.d.ts +3 -0
- package/dist/src/hooks/useTemplateVersion.d.ts.map +1 -0
- package/dist/src/hooks/useThemePreferences.d.ts +8 -0
- package/dist/src/hooks/useThemePreferences.d.ts.map +1 -0
- package/dist/src/hooks/useTranslation.d.ts +2 -0
- package/dist/src/hooks/useTranslation.d.ts.map +1 -0
- package/dist/src/hooks/useUserPreferences.d.ts +2 -0
- package/dist/src/hooks/useUserPreferences.d.ts.map +1 -0
- package/dist/src/hooks/useWebSocket.d.ts +8 -0
- package/dist/src/hooks/useWebSocket.d.ts.map +1 -0
- package/dist/src/setupTests.d.ts +2 -0
- package/dist/src/setupTests.d.ts.map +1 -0
- package/dist/src/tests/test-utils.d.ts +7 -0
- package/dist/src/tests/test-utils.d.ts.map +1 -0
- package/dist/src/types/deviceSpec.d.ts +57 -0
- package/dist/src/types/deviceSpec.d.ts.map +1 -0
- package/dist/src/types/deviceSpec.js +41 -9
- package/dist/src/types/deviceSpec.js.map +1 -1
- package/dist/src/types/extraTypes.d.ts +36 -0
- package/dist/src/types/extraTypes.d.ts.map +1 -0
- package/dist/src/types/extraTypes.js +1 -3
- package/dist/src/types/extraTypes.js.map +1 -1
- package/dist/src/types/typeUtils.d.ts +3 -0
- package/dist/src/types/typeUtils.d.ts.map +1 -0
- package/dist/src/utils/api.d.ts +24 -0
- package/dist/src/utils/api.d.ts.map +1 -0
- package/dist/src/utils/dates.d.ts +5 -0
- package/dist/src/utils/dates.d.ts.map +1 -0
- package/dist/src/utils/devices.d.ts +4 -0
- package/dist/src/utils/devices.d.ts.map +1 -0
- package/dist/src/utils/devices.js +1 -27
- package/dist/src/utils/devices.js.map +1 -1
- package/dist/src/utils/error.d.ts +4 -0
- package/dist/src/utils/error.d.ts.map +1 -0
- package/dist/src/utils/labels.d.ts +11 -0
- package/dist/src/utils/labels.d.ts.map +1 -0
- package/dist/src/utils/labels.js +4 -14
- package/dist/src/utils/labels.js.map +1 -1
- package/dist/src/utils/metrics.d.ts +9 -0
- package/dist/src/utils/metrics.d.ts.map +1 -0
- package/dist/src/utils/patch.d.ts +15 -0
- package/dist/src/utils/patch.d.ts.map +1 -0
- package/dist/src/utils/patch.js +71 -1
- package/dist/src/utils/patch.js.map +1 -1
- package/dist/src/utils/resource.d.ts +6 -0
- package/dist/src/utils/resource.d.ts.map +1 -0
- package/dist/src/utils/search.d.ts +3 -0
- package/dist/src/utils/search.d.ts.map +1 -0
- package/dist/src/utils/search.js +15 -1
- package/dist/src/utils/search.js.map +1 -1
- package/dist/src/utils/sort/device.d.ts +4 -0
- package/dist/src/utils/sort/device.d.ts.map +1 -0
- package/dist/src/utils/sort/device.js +3 -43
- package/dist/src/utils/sort/device.js.map +1 -1
- package/dist/src/utils/sort/fleet.d.ts +4 -0
- package/dist/src/utils/sort/fleet.d.ts.map +1 -0
- package/dist/src/utils/sort/fleet.js +6 -8
- package/dist/src/utils/sort/fleet.js.map +1 -1
- package/dist/src/utils/sort/generic.d.ts +8 -0
- package/dist/src/utils/sort/generic.d.ts.map +1 -0
- package/dist/src/utils/sort/generic.js +14 -11
- package/dist/src/utils/sort/generic.js.map +1 -1
- package/dist/src/utils/sort/repository.d.ts +6 -0
- package/dist/src/utils/sort/repository.d.ts.map +1 -0
- package/dist/src/utils/sort/repository.js +2 -2
- package/dist/src/utils/sort/repository.js.map +1 -1
- package/dist/src/utils/sort/resourceSync.d.ts +6 -0
- package/dist/src/utils/sort/resourceSync.d.ts.map +1 -0
- package/dist/src/utils/status/applications.d.ts +7 -0
- package/dist/src/utils/status/applications.d.ts.map +1 -0
- package/dist/src/utils/status/applications.js +19 -21
- package/dist/src/utils/status/applications.js.map +1 -1
- package/dist/src/utils/status/common.d.ts +12 -0
- package/dist/src/utils/status/common.d.ts.map +1 -0
- package/dist/src/utils/status/devices.d.ts +17 -0
- package/dist/src/utils/status/devices.d.ts.map +1 -0
- package/dist/src/utils/status/devices.js +9 -19
- package/dist/src/utils/status/devices.js.map +1 -1
- package/dist/src/utils/status/enrollmentRequest.d.ts +12 -0
- package/dist/src/utils/status/enrollmentRequest.d.ts.map +1 -0
- package/dist/src/utils/status/fleet.d.ts +15 -0
- package/dist/src/utils/status/fleet.d.ts.map +1 -0
- package/dist/src/utils/status/integrity.d.ts +5 -0
- package/dist/src/utils/status/integrity.d.ts.map +1 -0
- package/dist/src/utils/status/repository.d.ts +24 -0
- package/dist/src/utils/status/repository.d.ts.map +1 -0
- package/dist/src/utils/status/repository.js +9 -5
- package/dist/src/utils/status/repository.js.map +1 -1
- package/dist/src/utils/status/system.d.ts +6 -0
- package/dist/src/utils/status/system.d.ts.map +1 -0
- package/dist/src/utils/status/system.js +5 -5
- package/dist/src/utils/status/system.js.map +1 -1
- package/package.json +11 -3
- package/src/components/DetailsPage/DetailsNotFound.tsx +114 -0
- package/src/components/DetailsPage/DetailsPage.css +3 -0
- package/src/components/DetailsPage/DetailsPage.spec.tsx +128 -0
- package/src/components/DetailsPage/DetailsPage.tsx +99 -0
- package/src/components/DetailsPage/DetailsPageActions.tsx +73 -0
- package/src/components/DetailsPage/DetailsPageCard.css +8 -0
- package/src/components/DetailsPage/DetailsPageCard.tsx +12 -0
- package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +44 -0
- package/src/components/DetailsPage/Tables/ConditionsTable.tsx +40 -0
- package/src/components/DetailsPage/Tables/IntegrityDetails.tsx +44 -0
- package/src/components/DetailsPage/Tables/SystemdDetailsTable.tsx +63 -0
- package/src/components/Device/AddDeviceModal/AddDeviceModal.tsx +146 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +117 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.css +4 -0
- package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +216 -0
- package/src/components/Device/DeviceDetails/DeviceFleet.css +3 -0
- package/src/components/Device/DeviceDetails/DeviceFleet.tsx +76 -0
- package/src/components/Device/DeviceDetails/DeviceOs.tsx +43 -0
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.css +3 -0
- package/src/components/Device/DeviceDetails/DeviceStatusDebugModal.tsx +60 -0
- package/src/components/Device/DeviceDetails/SystemdTable.tsx +65 -0
- package/src/components/Device/DeviceDetails/TerminalTab.tsx +53 -0
- package/src/components/Device/DevicesPage/DeviceFilterSelect.tsx +111 -0
- package/src/components/Device/DevicesPage/DeviceTableRow.tsx +95 -0
- package/src/components/Device/DevicesPage/DeviceTableToolbar.tsx +195 -0
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.css +16 -0
- package/src/components/Device/DevicesPage/DeviceToolbarFilters.tsx +305 -0
- package/src/components/Device/DevicesPage/DevicesPage.tsx +265 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestList.tsx +183 -0
- package/src/components/Device/DevicesPage/EnrollmentRequestTableToolbar.tsx +35 -0
- package/src/components/Device/DevicesPage/types.ts +22 -0
- package/src/components/Device/DevicesPage/useDeviceBackendFilters.ts +119 -0
- package/src/components/Device/DevicesPage/useDeviceFilters.ts +15 -0
- package/src/components/Device/DevicesPage/useDevices.ts +112 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.css +4 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +150 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardFooter.tsx +52 -0
- package/src/components/Device/EditDeviceWizard/EditDeviceWizardNav.tsx +66 -0
- package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +278 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.css +4 -0
- package/src/components/Device/EditDeviceWizard/steps/ApplicationsForm.tsx +140 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx +161 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx +50 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.tsx +174 -0
- package/src/components/Device/EditDeviceWizard/steps/ConfigWithRepositoryTemplateForm.tsx +229 -0
- package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +75 -0
- package/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsx +61 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +35 -0
- package/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx +83 -0
- package/src/components/Device/EditDeviceWizard/types.ts +19 -0
- package/src/components/Device/EditDeviceWizard/useEditDevice.ts +36 -0
- package/src/components/Device/EditDeviceWizard/utils.ts +79 -0
- package/src/components/Device/MatchPatternsModal/MatchPatternsForm.tsx +92 -0
- package/src/components/Device/MatchPatternsModal/MatchPatternsModal.tsx +62 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.css +3 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +226 -0
- package/src/components/EnrollmentRequest/EnrollmentRequestTableRow.tsx +69 -0
- package/src/components/ErrorAlert/ErrorAlert.tsx +15 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.css +3 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +152 -0
- package/src/components/Fleet/CreateFleet/CreateFleetWizardFooter.tsx +56 -0
- package/src/components/Fleet/CreateFleet/steps/DeviceLabelSelector.tsx +114 -0
- package/src/components/Fleet/CreateFleet/steps/GeneralInfoStep.tsx +55 -0
- package/src/components/Fleet/CreateFleet/steps/ReviewStep.tsx +83 -0
- package/src/components/Fleet/CreateFleet/types.ts +8 -0
- package/src/components/Fleet/CreateFleet/useEditFleet.ts +35 -0
- package/src/components/Fleet/CreateFleet/utils.ts +160 -0
- package/src/components/Fleet/DeleteFleetModal/DeleteFleetModal.tsx +89 -0
- package/src/components/Fleet/FleetDetails/FleetDetails.tsx +97 -0
- package/src/components/Fleet/FleetDetails/FleetDetailsContent.tsx +97 -0
- package/src/components/Fleet/FleetDetails/FleetDevices.tsx +115 -0
- package/src/components/Fleet/FleetDetails/FleetDevicesLink.tsx +16 -0
- package/src/components/Fleet/FleetDetails/FleetOwnerLink.tsx +51 -0
- package/src/components/Fleet/FleetResourceSyncs.tsx +161 -0
- package/src/components/Fleet/FleetRow.tsx +86 -0
- package/src/components/Fleet/FleetStatus.tsx +37 -0
- package/src/components/Fleet/FleetsPage.tsx +204 -0
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.css +3 -0
- package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.tsx +216 -0
- package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +115 -0
- package/src/components/Fleet/ImportFleetWizard/steps/ResourceSyncStep.tsx +42 -0
- package/src/components/Fleet/ImportFleetWizard/steps/ReviewStep.tsx +70 -0
- package/src/components/Fleet/ImportFleetWizard/types.ts +6 -0
- package/src/components/ListPage/ListPage.tsx +22 -0
- package/src/components/ListPage/ListPageActions.tsx +68 -0
- package/src/components/ListPage/ListPageBody.tsx +34 -0
- package/src/components/ListPage/types.ts +13 -0
- package/src/components/NavItem/NavItem.tsx +42 -0
- package/src/components/OverviewPage/Cards/Status/ApplicationStatusChart.tsx +39 -0
- package/src/components/OverviewPage/Cards/Status/DeviceStatusChart.tsx +38 -0
- package/src/components/OverviewPage/Cards/Status/StatusCard.tsx +115 -0
- package/src/components/OverviewPage/Cards/Status/StatusCardFilters.tsx +111 -0
- package/src/components/OverviewPage/Cards/Status/SystemUpdateStatusChart.tsx +39 -0
- package/src/components/OverviewPage/Cards/Status/utils.ts +19 -0
- package/src/components/OverviewPage/Cards/ToDo/ToDoCard.tsx +72 -0
- package/src/components/OverviewPage/Overview.tsx +19 -0
- package/src/components/OverviewPage/OverviewPage.tsx +22 -0
- package/src/components/Repository/CreateRepository/CreateRepository.tsx +144 -0
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.css +7 -0
- package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +440 -0
- package/src/components/Repository/CreateRepository/CreateResourceSyncsForm.tsx +98 -0
- package/src/components/Repository/CreateRepository/types.ts +43 -0
- package/src/components/Repository/CreateRepository/utils.ts +539 -0
- package/src/components/Repository/RepositoryDetails/DeleteRepositoryModal.tsx +156 -0
- package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +78 -0
- package/src/components/Repository/RepositoryDetails/RepositoryGeneralDetailsCard.tsx +102 -0
- package/src/components/Repository/RepositoryDetails/RepositoryResourceSyncsCard.tsx +28 -0
- package/src/components/Repository/RepositoryDetails/RepositorySource.tsx +96 -0
- package/src/components/Repository/RepositoryDetails/RepositorySourceList.tsx +79 -0
- package/src/components/Repository/RepositoryList.tsx +216 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.css +14 -0
- package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +322 -0
- package/src/components/ResourceSync/ResourceSyncStatus.tsx +77 -0
- package/src/components/ResourceSync/ResourceSyncToRepository.tsx +73 -0
- package/src/components/Status/ApplicationStatus.tsx +25 -0
- package/src/components/Status/ApplicationSummaryStatus.tsx +24 -0
- package/src/components/Status/DeviceResourceStatus.tsx +112 -0
- package/src/components/Status/DeviceStatus.tsx +20 -0
- package/src/components/Status/EnrollmentRequestStatus.tsx +24 -0
- package/src/components/Status/IntegrityStatus.tsx +19 -0
- package/src/components/Status/RepositoryStatus.tsx +50 -0
- package/src/components/Status/StatusDisplay.css +12 -0
- package/src/components/Status/StatusDisplay.tsx +83 -0
- package/src/components/Status/SystemUpdateStatus.tsx +34 -0
- package/src/components/Status/SystemdStatus.tsx +22 -0
- package/src/components/Status/utils.ts +8 -0
- package/src/components/Table/Table.tsx +78 -0
- package/src/components/Table/TableActions.tsx +33 -0
- package/src/components/Table/TableTextSearch.tsx +23 -0
- package/src/components/Terminal/Terminal.css +1 -0
- package/src/components/Terminal/Terminal.tsx +100 -0
- package/src/components/UserPreferences/UserPreferencesModal.tsx +85 -0
- package/src/components/UserPreferences/UserPreferencesProvider.tsx +29 -0
- package/src/components/charts/DonutChart.css +10 -0
- package/src/components/charts/DonutChart.tsx +115 -0
- package/src/components/charts/utils.ts +38 -0
- package/src/components/common/CopyButton.tsx +36 -0
- package/src/components/common/EditableLabelControl.tsx +69 -0
- package/src/components/common/ErrorBoundary.tsx +53 -0
- package/src/components/common/FlightCtlDescriptionList.tsx +13 -0
- package/src/components/common/HelperTextItems.tsx +25 -0
- package/src/components/common/LabelsView.css +9 -0
- package/src/components/common/LabelsView.tsx +38 -0
- package/src/components/common/LeaveFormConfirmation.tsx +96 -0
- package/src/components/common/ResourceLink.css +29 -0
- package/src/components/common/ResourceLink.tsx +42 -0
- package/src/components/common/ResourceListEmptyState.tsx +19 -0
- package/src/components/common/WithHelperText.css +3 -0
- package/src/components/common/WithHelperText.tsx +34 -0
- package/src/components/common/WithTooltip.tsx +14 -0
- package/src/components/form/CheckboxField.tsx +39 -0
- package/src/components/form/ExpandableFormSection.css +3 -0
- package/src/components/form/ExpandableFormSection.tsx +59 -0
- package/src/components/form/FieldHelperText.tsx +45 -0
- package/src/components/form/FilterSelect.css +18 -0
- package/src/components/form/FilterSelect.tsx +92 -0
- package/src/components/form/FlightCtlActionGroup.css +9 -0
- package/src/components/form/FlightCtlActionGroup.tsx +11 -0
- package/src/components/form/FlightCtlForm.tsx +18 -0
- package/src/components/form/FormSelect.css +16 -0
- package/src/components/form/FormSelect.tsx +96 -0
- package/src/components/form/FormSelectTypeahead.tsx +212 -0
- package/src/components/form/LabelsField.tsx +116 -0
- package/src/components/form/NameField.tsx +73 -0
- package/src/components/form/RadioField.tsx +57 -0
- package/src/components/form/RichValidationTextField.tsx +142 -0
- package/src/components/form/SwitchField.tsx +32 -0
- package/src/components/form/TextAreaField.tsx +46 -0
- package/src/components/form/TextField.tsx +49 -0
- package/src/components/form/UploadField.tsx +133 -0
- package/src/components/form/validations.ts +386 -0
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsx +74 -0
- package/src/components/modals/ApproveDeviceModal/ApproveDeviceModal.tsx +65 -0
- package/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.css +24 -0
- package/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.tsx +101 -0
- package/src/components/modals/CreateRepositoryModal/CreateRepositoryModal.tsx +25 -0
- package/src/components/modals/DeleteModal/DeleteModal.tsx +68 -0
- package/src/components/modals/EditLabelsModal/EditLabelsForm.tsx +101 -0
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.css +4 -0
- package/src/components/modals/massModals/MassApproveDeviceModal/MassApproveDeviceModal.tsx +192 -0
- package/src/components/modals/massModals/MassDeleteDeviceModal/MassDeleteDeviceModal.tsx +117 -0
- package/src/components/modals/massModals/MassDeleteFleetModal/MassDeleteFleetModal.tsx +193 -0
- package/src/components/modals/massModals/MassDeleteRepositoryModal/MassDeleteRepositoryModal.tsx +172 -0
- package/src/components/modals/massModals/MassDeleteResourceSyncModal/MassDeleteResourceSyncModal.tsx +116 -0
- package/src/constants.ts +4 -0
- package/src/hooks/useAppContext.tsx +108 -0
- package/src/hooks/useDeviceLabelMatch.ts +101 -0
- package/src/hooks/useDocumentTitle.ts +12 -0
- package/src/hooks/useFetch.ts +10 -0
- package/src/hooks/useFetchPeriodically.ts +82 -0
- package/src/hooks/useNavigate.tsx +92 -0
- package/src/hooks/useTableSelect.ts +48 -0
- package/src/hooks/useTableSort.ts +42 -0
- package/src/hooks/useTableTextSearch.ts +23 -0
- package/src/hooks/useTemplateVersion.ts +23 -0
- package/src/hooks/useThemePreferences.ts +64 -0
- package/src/hooks/useTranslation.ts +8 -0
- package/src/hooks/useUserPreferences.ts +16 -0
- package/src/hooks/useWebSocket.ts +74 -0
- package/src/setupTests.ts +21 -0
- package/src/tests/test-utils.tsx +21 -0
- package/src/types/deviceSpec.ts +110 -0
- package/src/types/extraTypes.ts +52 -0
- package/src/types/typeUtils.ts +7 -0
- package/src/typings.d.ts +12 -0
- package/src/utils/api.ts +87 -0
- package/src/utils/dates.ts +60 -0
- package/src/utils/devices.ts +10 -0
- package/src/utils/error.ts +24 -0
- package/src/utils/labels.ts +40 -0
- package/src/utils/metrics.ts +49 -0
- package/src/utils/patch.ts +202 -0
- package/src/utils/resource.ts +4 -0
- package/src/utils/search.ts +25 -0
- package/src/utils/sort/device.ts +60 -0
- package/src/utils/sort/fleet.ts +16 -0
- package/src/utils/sort/generic.ts +37 -0
- package/src/utils/sort/repository.ts +28 -0
- package/src/utils/sort/resourceSync.ts +30 -0
- package/src/utils/status/applications.ts +58 -0
- package/src/utils/status/common.ts +71 -0
- package/src/utils/status/devices.ts +74 -0
- package/src/utils/status/enrollmentRequest.ts +49 -0
- package/src/utils/status/fleet.ts +47 -0
- package/src/utils/status/integrity.ts +26 -0
- package/src/utils/status/repository.ts +117 -0
- package/src/utils/status/system.ts +28 -0
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js +0 -87
- package/dist/src/components/Device/DeviceList/DeviceFilterSelect.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceList.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceTableRow.js.map +0 -1
- package/dist/src/components/Device/DeviceList/DeviceTableToolbar.js.map +0 -1
- package/dist/src/components/Device/DeviceList/types.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceBackendFilters.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceFilters.js.map +0 -1
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js +0 -98
- package/dist/src/components/Device/DeviceList/useDeviceLikeResources.js.map +0 -1
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js +0 -29
- package/dist/src/components/Fleet/FleetDetails/chartUtils.js.map +0 -1
- package/dist/src/components/Fleet/FleetList.js.map +0 -1
- package/dist/src/components/Fleet/ResourceSyncRow.js +0 -36
- package/dist/src/components/Fleet/ResourceSyncRow.js.map +0 -1
- /package/dist/src/components/Device/{DeviceList → DevicesPage}/types.js +0 -0
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConfigTemplatesValues = exports.getAPIConfig = exports.getDeviceSpecConfigPatches = void 0;
|
|
4
|
-
const
|
|
5
|
-
const yaml = tslib_1.__importStar(require("js-yaml"));
|
|
6
|
-
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
3
|
+
exports.formatFileMode = exports.getConfigTemplatesValues = exports.getApplicationValues = exports.getAPIConfig = exports.getDeviceSpecConfigPatches = exports.getConfigType = void 0;
|
|
4
|
+
const types_1 = require("@flightctl/types");
|
|
7
5
|
const deviceSpec_1 = require("../../../types/deviceSpec");
|
|
6
|
+
const DEFAULT_INLINE_FILE_MODE = 420; // In Octal: 0644
|
|
7
|
+
const DEFAULT_INLINE_FILE_USER = 'root';
|
|
8
|
+
const DEFAULT_INLINE_FILE_GROUP = 'root';
|
|
9
|
+
const getConfigType = (config) => {
|
|
10
|
+
if ((0, deviceSpec_1.isGitProviderSpec)(config)) {
|
|
11
|
+
return deviceSpec_1.ConfigType.GIT;
|
|
12
|
+
}
|
|
13
|
+
else if ((0, deviceSpec_1.isInlineProviderSpec)(config)) {
|
|
14
|
+
return deviceSpec_1.ConfigType.INLINE;
|
|
15
|
+
}
|
|
16
|
+
else if ((0, deviceSpec_1.isHttpProviderSpec)(config)) {
|
|
17
|
+
return deviceSpec_1.ConfigType.HTTP;
|
|
18
|
+
}
|
|
19
|
+
else if ((0, deviceSpec_1.isKubeProviderSpec)(config)) {
|
|
20
|
+
return deviceSpec_1.ConfigType.K8S_SECRET;
|
|
21
|
+
}
|
|
22
|
+
// Fallback in case a new configType is added to the Backend which the UI doesn't support yet
|
|
23
|
+
return undefined;
|
|
24
|
+
};
|
|
25
|
+
exports.getConfigType = getConfigType;
|
|
8
26
|
const isSameGitConf = (a, b) => {
|
|
9
27
|
const aRef = a.gitRef;
|
|
10
28
|
const bRef = b.gitRef;
|
|
@@ -30,8 +48,23 @@ const isSameSecretConf = (a, b) => {
|
|
|
30
48
|
aRef.namespace === bRef.namespace &&
|
|
31
49
|
aRef.mountPath === bRef.mountPath);
|
|
32
50
|
};
|
|
51
|
+
const isSameInlineConfigValue = (a, b, defaultValue) => {
|
|
52
|
+
const aValue = a === undefined ? defaultValue : a;
|
|
53
|
+
const bValue = b === undefined ? defaultValue : b;
|
|
54
|
+
return aValue === bValue;
|
|
55
|
+
};
|
|
33
56
|
const isSameInlineConf = (a, b) => {
|
|
34
|
-
return a.name === b.name &&
|
|
57
|
+
return (a.name === b.name &&
|
|
58
|
+
a.inline.length === b.inline.length &&
|
|
59
|
+
a.inline.every((aInline, index) => {
|
|
60
|
+
const bInline = b.inline[index];
|
|
61
|
+
return (aInline.path === bInline.path &&
|
|
62
|
+
isSameInlineConfigValue(aInline.user, bInline.user, DEFAULT_INLINE_FILE_USER) &&
|
|
63
|
+
isSameInlineConfigValue(aInline.group, bInline.group, DEFAULT_INLINE_FILE_GROUP) &&
|
|
64
|
+
isSameInlineConfigValue(aInline.mode, bInline.mode, DEFAULT_INLINE_FILE_MODE) &&
|
|
65
|
+
isSameInlineConfigValue(aInline.contentEncoding, bInline.contentEncoding, types_1.FileSpec.contentEncoding.PLAIN) &&
|
|
66
|
+
aInline.content === bInline.content);
|
|
67
|
+
}));
|
|
35
68
|
};
|
|
36
69
|
const getDeviceSpecConfigPatches = (currentConfigs, newConfigs, configPath) => {
|
|
37
70
|
const allPatches = [];
|
|
@@ -59,17 +92,19 @@ const getDeviceSpecConfigPatches = (currentConfigs, newConfigs, configPath) => {
|
|
|
59
92
|
const hasConfigChanges = newConfigs.some((newConfig) => {
|
|
60
93
|
// Attempts to find a new config which has been changed from "currentConfigs"
|
|
61
94
|
const isUnchanged = currentConfigs.some((conf) => {
|
|
62
|
-
|
|
95
|
+
const currentType = (0, exports.getConfigType)(conf);
|
|
96
|
+
const newType = (0, exports.getConfigType)(newConfig);
|
|
97
|
+
if (currentType !== newType) {
|
|
63
98
|
return false;
|
|
64
99
|
}
|
|
65
|
-
switch (
|
|
66
|
-
case
|
|
100
|
+
switch (newType) {
|
|
101
|
+
case deviceSpec_1.ConfigType.GIT:
|
|
67
102
|
return isSameGitConf(newConfig, conf);
|
|
68
|
-
case
|
|
103
|
+
case deviceSpec_1.ConfigType.HTTP:
|
|
69
104
|
return isSameHttpConf(newConfig, conf);
|
|
70
|
-
case
|
|
105
|
+
case deviceSpec_1.ConfigType.K8S_SECRET:
|
|
71
106
|
return isSameSecretConf(newConfig, conf);
|
|
72
|
-
case
|
|
107
|
+
case deviceSpec_1.ConfigType.INLINE:
|
|
73
108
|
return isSameInlineConf(newConfig, conf);
|
|
74
109
|
}
|
|
75
110
|
return false;
|
|
@@ -90,7 +125,6 @@ exports.getDeviceSpecConfigPatches = getDeviceSpecConfigPatches;
|
|
|
90
125
|
const getAPIConfig = (ct) => {
|
|
91
126
|
if ((0, deviceSpec_1.isGitConfigTemplate)(ct)) {
|
|
92
127
|
return {
|
|
93
|
-
configType: 'GitConfigProviderSpec',
|
|
94
128
|
name: ct.name,
|
|
95
129
|
gitRef: {
|
|
96
130
|
path: ct.path,
|
|
@@ -102,7 +136,6 @@ const getAPIConfig = (ct) => {
|
|
|
102
136
|
}
|
|
103
137
|
if ((0, deviceSpec_1.isKubeSecretTemplate)(ct)) {
|
|
104
138
|
return {
|
|
105
|
-
configType: 'KubernetesSecretProviderSpec',
|
|
106
139
|
name: ct.name,
|
|
107
140
|
secretRef: {
|
|
108
141
|
mountPath: ct.mountPath,
|
|
@@ -113,7 +146,6 @@ const getAPIConfig = (ct) => {
|
|
|
113
146
|
}
|
|
114
147
|
if ((0, deviceSpec_1.isHttpConfigTemplate)(ct)) {
|
|
115
148
|
return {
|
|
116
|
-
configType: 'HttpConfigProviderSpec',
|
|
117
149
|
name: ct.name,
|
|
118
150
|
httpRef: {
|
|
119
151
|
repository: ct.repository,
|
|
@@ -123,18 +155,37 @@ const getAPIConfig = (ct) => {
|
|
|
123
155
|
};
|
|
124
156
|
}
|
|
125
157
|
return {
|
|
126
|
-
configType: 'InlineConfigProviderSpec',
|
|
127
|
-
inline: yaml.load(ct.inline),
|
|
128
158
|
name: ct.name,
|
|
159
|
+
inline: ct.files.map((file) => {
|
|
160
|
+
return {
|
|
161
|
+
path: file.path,
|
|
162
|
+
content: file.content,
|
|
163
|
+
group: file.group,
|
|
164
|
+
user: file.user,
|
|
165
|
+
mode: file.permissions ? parseInt(file.permissions, 8) : undefined,
|
|
166
|
+
contentEncoding: file.base64 ? types_1.FileSpec.contentEncoding.BASE64 : undefined,
|
|
167
|
+
};
|
|
168
|
+
}),
|
|
129
169
|
};
|
|
130
170
|
};
|
|
131
171
|
exports.getAPIConfig = getAPIConfig;
|
|
172
|
+
const getApplicationValues = (deviceSpec) => {
|
|
173
|
+
const map = (deviceSpec === null || deviceSpec === void 0 ? void 0 : deviceSpec.applications) || [];
|
|
174
|
+
return map.map((app) => {
|
|
175
|
+
return {
|
|
176
|
+
name: app.name || '',
|
|
177
|
+
image: app.image,
|
|
178
|
+
variables: Object.entries(app.envVars || {}).map(([varName, varValue]) => ({ name: varName, value: varValue })),
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
exports.getApplicationValues = getApplicationValues;
|
|
132
183
|
const getConfigTemplatesValues = (deviceSpec) => {
|
|
133
184
|
var _a;
|
|
134
185
|
return ((_a = deviceSpec === null || deviceSpec === void 0 ? void 0 : deviceSpec.config) === null || _a === void 0 ? void 0 : _a.map((c) => {
|
|
135
186
|
if ((0, deviceSpec_1.isGitProviderSpec)(c)) {
|
|
136
187
|
return {
|
|
137
|
-
type:
|
|
188
|
+
type: deviceSpec_1.ConfigType.GIT,
|
|
138
189
|
name: c.name,
|
|
139
190
|
path: c.gitRef.path,
|
|
140
191
|
mountPath: c.gitRef.mountPath,
|
|
@@ -144,7 +195,7 @@ const getConfigTemplatesValues = (deviceSpec) => {
|
|
|
144
195
|
}
|
|
145
196
|
if ((0, deviceSpec_1.isKubeProviderSpec)(c)) {
|
|
146
197
|
return {
|
|
147
|
-
type:
|
|
198
|
+
type: deviceSpec_1.ConfigType.K8S_SECRET,
|
|
148
199
|
name: c.name,
|
|
149
200
|
mountPath: c.secretRef.mountPath,
|
|
150
201
|
secretName: c.secretRef.name,
|
|
@@ -153,7 +204,7 @@ const getConfigTemplatesValues = (deviceSpec) => {
|
|
|
153
204
|
}
|
|
154
205
|
if ((0, deviceSpec_1.isHttpProviderSpec)(c)) {
|
|
155
206
|
return {
|
|
156
|
-
type:
|
|
207
|
+
type: deviceSpec_1.ConfigType.HTTP,
|
|
157
208
|
name: c.name,
|
|
158
209
|
repository: c.httpRef.repository,
|
|
159
210
|
suffix: c.httpRef.suffix,
|
|
@@ -161,11 +212,26 @@ const getConfigTemplatesValues = (deviceSpec) => {
|
|
|
161
212
|
};
|
|
162
213
|
}
|
|
163
214
|
return {
|
|
164
|
-
type:
|
|
215
|
+
type: deviceSpec_1.ConfigType.INLINE,
|
|
165
216
|
name: c.name,
|
|
166
|
-
|
|
217
|
+
files: c.inline.map((inline) => {
|
|
218
|
+
return {
|
|
219
|
+
user: inline.user,
|
|
220
|
+
group: inline.group,
|
|
221
|
+
path: inline.path,
|
|
222
|
+
permissions: inline.mode !== undefined ? (0, exports.formatFileMode)(inline.mode) : undefined,
|
|
223
|
+
content: inline.content,
|
|
224
|
+
base64: inline.contentEncoding === types_1.FileSpec.contentEncoding.BASE64,
|
|
225
|
+
};
|
|
226
|
+
}),
|
|
167
227
|
};
|
|
168
228
|
})) || [];
|
|
169
229
|
};
|
|
170
230
|
exports.getConfigTemplatesValues = getConfigTemplatesValues;
|
|
231
|
+
const formatFileMode = (mode) => {
|
|
232
|
+
const modeStr = typeof mode === 'number' ? mode.toString(8) : mode;
|
|
233
|
+
const prefixSize = 4 - modeStr.length;
|
|
234
|
+
return prefixSize > 0 ? `${'0'.repeat(prefixSize)}${modeStr}` : modeStr;
|
|
235
|
+
};
|
|
236
|
+
exports.formatFileMode = formatFileMode;
|
|
171
237
|
//# sourceMappingURL=deviceSpecUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceSpecUtils.js","sourceRoot":"","sources":["../../../../../src/components/Device/EditDeviceWizard/deviceSpecUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deviceSpecUtils.js","sour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
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const formik_1 = require("formik");
|
|
7
|
+
const minus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/minus-circle-icon");
|
|
8
|
+
const plus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/plus-circle-icon");
|
|
9
|
+
const useTranslation_1 = require("../../../../hooks/useTranslation");
|
|
10
|
+
const TextField_1 = tslib_1.__importDefault(require("../../../form/TextField"));
|
|
11
|
+
const ExpandableFormSection_1 = tslib_1.__importDefault(require("../../../form/ExpandableFormSection"));
|
|
12
|
+
require("./ApplicationsForm.css");
|
|
13
|
+
const ApplicationSection = ({ index }) => {
|
|
14
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
15
|
+
const fieldName = `applications[${index}]`;
|
|
16
|
+
const [{ value: app }] = (0, formik_1.useField)(fieldName);
|
|
17
|
+
return (React.createElement(ExpandableFormSection_1.default, { title: t('Application'), fieldName: fieldName, description: app.name || app.image },
|
|
18
|
+
React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
19
|
+
React.createElement(react_core_1.FormGroup, { label: t('Image'), isRequired: true },
|
|
20
|
+
React.createElement(TextField_1.default, { "aria-label": t('Image'), name: `applications.${index}.image`, value: app.image })),
|
|
21
|
+
React.createElement(react_core_1.FormGroup, { label: t('Application name') },
|
|
22
|
+
React.createElement(TextField_1.default, { "aria-label": t('Application name'), name: `applications.${index}.name`, value: app.name, helperText: t('The image name will be used if no name is specified') })),
|
|
23
|
+
React.createElement(formik_1.FieldArray, { name: `applications.${index}.variables` }, ({ push, remove }) => (React.createElement(react_core_1.FormSection, null,
|
|
24
|
+
app.variables.map((variable, varIndex) => (React.createElement(react_core_1.Split, { hasGutter: true, key: varIndex },
|
|
25
|
+
React.createElement(react_core_1.SplitItem, { className: "fctl-application-template__variable-name" },
|
|
26
|
+
React.createElement(react_core_1.FormGroup, { label: t('Variable {{ number }}', { number: varIndex + 1 }) })),
|
|
27
|
+
React.createElement(react_core_1.SplitItem, null,
|
|
28
|
+
React.createElement(react_core_1.FormGroup, { label: t('Name'), isRequired: true },
|
|
29
|
+
React.createElement(TextField_1.default, { "aria-label": t('Name'), name: `applications.${index}.variables.${varIndex}.name`, value: variable.name }))),
|
|
30
|
+
React.createElement(react_core_1.SplitItem, { isFilled: true },
|
|
31
|
+
React.createElement(react_core_1.FormGroup, { label: t('Value'), isRequired: true },
|
|
32
|
+
React.createElement(TextField_1.default, { "aria-label": t('Value'), name: `applications.${index}.variables.${varIndex}.value`, value: variable.value }))),
|
|
33
|
+
React.createElement(react_core_1.SplitItem, null,
|
|
34
|
+
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(minus_circle_icon_1.MinusCircleIcon, null), iconPosition: "end", onClick: () => remove(varIndex) }))))),
|
|
35
|
+
React.createElement(react_core_1.FormGroup, null,
|
|
36
|
+
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(plus_circle_icon_1.PlusCircleIcon, null), iconPosition: "start", onClick: () => {
|
|
37
|
+
push({ name: '', value: '' });
|
|
38
|
+
} }, t('Add a variable')))))))));
|
|
39
|
+
};
|
|
40
|
+
const ApplicationsForm = () => {
|
|
41
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
42
|
+
const { values } = (0, formik_1.useFormikContext)();
|
|
43
|
+
return (React.createElement(formik_1.FieldArray, { name: "applications" }, ({ push, remove }) => (React.createElement(React.Fragment, null,
|
|
44
|
+
values.applications.map((_app, index) => (React.createElement(react_core_1.FormSection, { key: index },
|
|
45
|
+
React.createElement(react_core_1.Split, { hasGutter: true },
|
|
46
|
+
React.createElement(react_core_1.SplitItem, { isFilled: true },
|
|
47
|
+
React.createElement(ApplicationSection, { index: index })),
|
|
48
|
+
React.createElement(react_core_1.SplitItem, null,
|
|
49
|
+
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(minus_circle_icon_1.MinusCircleIcon, null), iconPosition: "start", onClick: () => remove(index) })))))),
|
|
50
|
+
React.createElement(react_core_1.FormSection, null,
|
|
51
|
+
React.createElement(react_core_1.FormGroup, null,
|
|
52
|
+
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(plus_circle_icon_1.PlusCircleIcon, null), iconPosition: "start", onClick: () => {
|
|
53
|
+
push({
|
|
54
|
+
name: '',
|
|
55
|
+
image: '',
|
|
56
|
+
variables: [],
|
|
57
|
+
});
|
|
58
|
+
} }, t('Add application'))))))));
|
|
59
|
+
};
|
|
60
|
+
exports.default = ApplicationsForm;
|
|
61
|
+
//# sourceMappingURL=ApplicationsForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationsForm.js","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ApplicationsForm.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAE/B,uDAAgG;AAChG,mCAAgE;AAChE,+FAA0F;AAC1F,6FAAwF;AAIxF,qEAAkE;AAClE,gFAAgD;AAChD,wGAAwE;AAExE,kCAAgC;AAEhC,MAAM,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAqB,EAAE,EAAE;IAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,SAAS,GAAG,gBAAgB,KAAK,GAAG,CAAC;IAC3C,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,IAAA,iBAAQ,EAAsB,SAAS,CAAC,CAAC;IAElE,OAAO,CACL,oBAAC,+BAAqB,IAAC,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,KAAK;QACtG,oBAAC,iBAAI,IAAC,SAAS;YACb,oBAAC,sBAA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AS,IAAC,QAAQ;oBACjB,oBAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,CAC1B;gBACZ,oBAAC,sBAAS;oBACR,oBAAC,mBAAM,IACL,OAAO,EAAC,MAAM,EACd,IAAI,EAAE,oBAAC,mCAAe,OAAG,EACzB,YAAY,EAAC,OAAO,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAC5B,CACQ,CACN,CACI,CACf,CAAC;QACF,oBAAC,wBAAW;YACV,oBAAC,sBAAS;gBACR,oBAAC,mBAAM,IACL,OAAO,EAAC,MAAM,EACd,IAAI,EAAE,oBAAC,iCAAc,OAAG,EACxB,YAAY,EAAC,OAAO,EACpB,OAAO,EAAE,GAAG,EAAE;wBACZ,IAAI,CAAC;4BACH,IAAI,EAAE,EAAE;4BACR,KAAK,EAAE,EAAE;4BACT,SAAS,EAAE,EAAE;yBACd,CAAC,CAAC;oBACL,CAAC,IAEA,CAAC,CAAC,iBAAiB,CAAC,CACd,CACC,CACA,CACb,CACJ,CACU,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ConfigInlineTemplateFormProps = {
|
|
3
|
+
index: number;
|
|
4
|
+
};
|
|
5
|
+
declare const ConfigInlineTemplateForm: ({ index }: ConfigInlineTemplateFormProps) => React.JSX.Element;
|
|
6
|
+
export default ConfigInlineTemplateForm;
|
|
7
|
+
//# sourceMappingURL=ConfigInlineTemplateForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigInlineTemplateForm.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2F/B,KAAK,6BAA6B,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,wBAAwB,cAAe,6BAA6B,sBA+DzE,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -3,13 +3,97 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
5
|
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const plus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/plus-circle-icon");
|
|
7
|
+
const minus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/minus-circle-icon");
|
|
8
|
+
const formik_1 = require("formik");
|
|
6
9
|
const useTranslation_1 = require("../../../../hooks/useTranslation");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
10
|
+
const FormSelectTypeahead_1 = tslib_1.__importDefault(require("../../../form/FormSelectTypeahead"));
|
|
11
|
+
const ExpandableFormSection_1 = tslib_1.__importDefault(require("../../../form/ExpandableFormSection"));
|
|
12
|
+
const TextField_1 = tslib_1.__importDefault(require("../../../form/TextField"));
|
|
13
|
+
const UploadField_1 = tslib_1.__importDefault(require("../../../form/UploadField"));
|
|
14
|
+
const CheckboxField_1 = tslib_1.__importDefault(require("../../../form/CheckboxField"));
|
|
15
|
+
const deviceSpecUtils_1 = require("../deviceSpecUtils");
|
|
16
|
+
const MAX_INLINE_FILE_SIZE_BYTES = 1024 * 1024;
|
|
17
|
+
const FileForm = ({ fieldName }) => {
|
|
18
|
+
const { t } = (0, useTranslation_1.useTranslation)();
|
|
19
|
+
const [{ value: file }] = (0, formik_1.useField)(fieldName);
|
|
20
|
+
const permissions = React.useMemo(() => ({
|
|
21
|
+
'0777': t('(0777) Read, write, and execute permissions for all users.'),
|
|
22
|
+
'0755': t("(0755) Read and execute permission for all users. The file's owner also has write permission."),
|
|
23
|
+
'0750': t("(0750) Read and execute permission for the owner and group. The file's owner also has write permission."),
|
|
24
|
+
'0700': t("(0700) Read, write, and execute permissions for the file's owner only."),
|
|
25
|
+
'0666': t('(0666) Read and write permissions for all users. No execute permissions for others.'),
|
|
26
|
+
'0664': t('(0664) Read and write permissions for the owner and group. Read-only permission for all others.'),
|
|
27
|
+
'0660': t('(0660) Read and write permissions for the owner and group.'),
|
|
28
|
+
'0644': t('(0644) Read and write permissions for the owner. Read-only permission for all others.'),
|
|
29
|
+
'0640': t('(0640) Read and write permissions for the owner, and read-only permission for the group.'),
|
|
30
|
+
'0600': t('(0600) Read and write permissions for the owner.'),
|
|
31
|
+
'0400': t('(0400) Read permission for the owner.'),
|
|
32
|
+
}), [t]);
|
|
33
|
+
return (React.createElement(ExpandableFormSection_1.default, { title: t('File'), fieldName: fieldName, description: file.path },
|
|
34
|
+
React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
35
|
+
React.createElement(react_core_1.FormGroup, { label: t('File path on the device'), isRequired: true },
|
|
36
|
+
React.createElement(TextField_1.default, { name: `${fieldName}.path` })),
|
|
37
|
+
React.createElement(UploadField_1.default, { label: t('Content'), name: `${fieldName}.content`, maxFileBytes: MAX_INLINE_FILE_SIZE_BYTES, isRequired: true }),
|
|
38
|
+
React.createElement(react_core_1.FormGroup, null,
|
|
39
|
+
React.createElement(CheckboxField_1.default, { name: `${fieldName}.base64`, label: t('Content is base64 encoded') })),
|
|
40
|
+
React.createElement(react_core_1.FormGroup, { label: t('Permissions') },
|
|
41
|
+
React.createElement(FormSelectTypeahead_1.default, { name: `${fieldName}.permissions`, placeholderText: t('Select permissions'), helperText: t('Select from the list or type in the permission code in octal notation'), defaultId: "0644", items: permissions, validateNewItem: (value) => {
|
|
42
|
+
try {
|
|
43
|
+
if (value !== '' && value.length <= 4) {
|
|
44
|
+
const valNum = Number(`0o${value}`);
|
|
45
|
+
if (isFinite(valNum) && valNum >= 0 && valNum <= 0o7777) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (_a) {
|
|
51
|
+
return t('Invalid permissions');
|
|
52
|
+
}
|
|
53
|
+
return t('Invalid permissions');
|
|
54
|
+
}, transformNewItem: deviceSpecUtils_1.formatFileMode })),
|
|
55
|
+
React.createElement(react_core_1.FormGroup, { label: t('User') },
|
|
56
|
+
React.createElement(TextField_1.default, { name: `${fieldName}.user`, placeholder: "root" })),
|
|
57
|
+
React.createElement(react_core_1.FormGroup, { label: t('Group') },
|
|
58
|
+
React.createElement(TextField_1.default, { name: `${fieldName}.group`, placeholder: "root" })))));
|
|
59
|
+
};
|
|
9
60
|
const ConfigInlineTemplateForm = ({ index }) => {
|
|
10
61
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
11
|
-
|
|
12
|
-
|
|
62
|
+
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
63
|
+
const inlineConfig = values.configTemplates[index];
|
|
64
|
+
React.useEffect(() => {
|
|
65
|
+
var _a;
|
|
66
|
+
if (!((_a = inlineConfig.files) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
67
|
+
setFieldValue(`configTemplates.${index}.files`, [
|
|
68
|
+
{
|
|
69
|
+
path: '',
|
|
70
|
+
content: '',
|
|
71
|
+
},
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
// eslint-disable-next-line
|
|
75
|
+
}, []);
|
|
76
|
+
return (React.createElement(formik_1.FieldArray, { name: `configTemplates.${index}.files` }, ({ push, remove }) => {
|
|
77
|
+
var _a;
|
|
78
|
+
return (React.createElement(React.Fragment, null, (_a = inlineConfig.files) === null || _a === void 0 ? void 0 :
|
|
79
|
+
_a.map((_, fileIndex) => {
|
|
80
|
+
const fieldName = `configTemplates[${index}].files[${fileIndex}]`;
|
|
81
|
+
return (React.createElement(react_core_1.FormSection, { key: fileIndex },
|
|
82
|
+
React.createElement(react_core_1.Split, { hasGutter: true },
|
|
83
|
+
React.createElement(react_core_1.SplitItem, { isFilled: true },
|
|
84
|
+
React.createElement(FileForm, { fieldName: fieldName })),
|
|
85
|
+
inlineConfig.files.length > 1 && (React.createElement(react_core_1.SplitItem, null,
|
|
86
|
+
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(minus_circle_icon_1.MinusCircleIcon, null), iconPosition: "start", onClick: () => remove(fileIndex) }))))));
|
|
87
|
+
}),
|
|
88
|
+
React.createElement(react_core_1.FormSection, null,
|
|
89
|
+
React.createElement(react_core_1.FormGroup, null,
|
|
90
|
+
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(plus_circle_icon_1.PlusCircleIcon, null), iconPosition: "start", onClick: () => {
|
|
91
|
+
push({
|
|
92
|
+
path: '',
|
|
93
|
+
content: '',
|
|
94
|
+
});
|
|
95
|
+
} }, t('Add file'))))));
|
|
96
|
+
}));
|
|
13
97
|
};
|
|
14
98
|
exports.default = ConfigInlineTemplateForm;
|
|
15
99
|
//# sourceMappingURL=ConfigInlineTemplateForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigInlineTemplateForm.js","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"ConfigInlineTemplateForm.js","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigInlineTemplateForm.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAAgG;AAChG,6FAAwF;AACxF,+FAA0F;AAC1F,mCAAgE;AAEhE,qEAAkE;AAClE,oGAAoE;AACpE,wGAAwE;AACxE,gFAAgD;AAChD,oFAAoD;AACpD,wFAAwD;AAIxD,wDAAoD;AAEpD,MAAM,0BAA0B,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/C,MAAM,QAAQ,GAAG,CAAC,EAAE,SAAS,EAAyB,EAAE,EAAE;IACxD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,KAAK,EAAE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AAM,CAAC,SAAS,CAAC,GAChC,CACQ,CACb,CACK,CACI,CACf,CAAC;YACJ,CAAC,CAAC;YACF,oBAAC,wBAAW;gBACV,oBAAC,sBAAS;oBACR,oBAAC,mBAAM,IACL,OAAO,EAAC,MAAM,EACd,IAAI,EAAE,oBAAC,iCAAc,OAAG,EACxB,YAAY,EAAC,OAAO,EACpB,OAAO,EAAE,GAAG,EAAE;4BACZ,IAAI,CAAC;gCACH,IAAI,EAAE,EAAE;gCACR,OAAO,EAAE,EAAE;6BACZ,CAAC,CAAC;wBACL,CAAC,IAEA,CAAC,CAAC,UAAU,CAAC,CACP,CACC,CACA,CACb,CACJ,CAAA;KAAA,CACU,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ConfigK8sSecretTemplateFormProps = {
|
|
3
|
+
index: number;
|
|
4
|
+
};
|
|
5
|
+
declare const ConfigK8sSecretTemplateForm: ({ index }: ConfigK8sSecretTemplateFormProps) => React.JSX.Element;
|
|
6
|
+
export default ConfigK8sSecretTemplateForm;
|
|
7
|
+
//# sourceMappingURL=ConfigK8sSecretTemplateForm.d.ts.map
|
package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigK8sSecretTemplateForm.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,KAAK,gCAAgC,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,2BAA2B,cAAe,gCAAgC,sBAiC/E,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -12,11 +12,11 @@ const ConfigK8sSecretTemplateForm = ({ index }) => {
|
|
|
12
12
|
const template = values.configTemplates[index];
|
|
13
13
|
return (React.createElement(React.Fragment, null,
|
|
14
14
|
React.createElement(react_core_1.FormGroup, { label: t('Secret name'), isRequired: true },
|
|
15
|
-
React.createElement(TextField_1.default, { "aria-label": t('Secret name'), value: template.secretName, name: `configTemplates.${index}.secretName
|
|
15
|
+
React.createElement(TextField_1.default, { "aria-label": t('Secret name'), value: template.secretName, name: `configTemplates.${index}.secretName`, isDisabled: true })),
|
|
16
16
|
React.createElement(react_core_1.FormGroup, { label: t('Secret namespace'), isRequired: true },
|
|
17
|
-
React.createElement(TextField_1.default, { "aria-label": t('Secret namespace'), name: `configTemplates.${index}.secretNs`, value: template.secretNs })),
|
|
17
|
+
React.createElement(TextField_1.default, { "aria-label": t('Secret namespace'), name: `configTemplates.${index}.secretNs`, value: template.secretNs, isDisabled: true })),
|
|
18
18
|
React.createElement(react_core_1.FormGroup, { label: t('Mount path'), isRequired: true },
|
|
19
|
-
React.createElement(TextField_1.default, { "aria-label": t('Mount path'), name: `configTemplates.${index}.mountPath`, value: template.mountPath, placeholder: t('/absolute/path') }))));
|
|
19
|
+
React.createElement(TextField_1.default, { "aria-label": t('Mount path'), name: `configTemplates.${index}.mountPath`, value: template.mountPath, placeholder: t('/absolute/path'), isDisabled: true }))));
|
|
20
20
|
};
|
|
21
21
|
exports.default = ConfigK8sSecretTemplateForm;
|
|
22
22
|
//# sourceMappingURL=ConfigK8sSecretTemplateForm.js.map
|
package/dist/src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigK8sSecretTemplateForm.js","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAA0C;AAC1C,uDAAmD;AAEnD,qEAAkE;AAElE,gFAAgD;AAQhD,MAAM,2BAA2B,GAAG,CAAC,EAAE,KAAK,EAAoC,EAAE,EAAE;IAClF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,yBAAgB,GAA8B,CAAC;IAClE,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,KAAK,CAAuB,CAAC;IACrE,OAAO,CACL;QACE,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,UAAU;YAC5C,oBAAC,mBAAS,kBACI,CAAC,CAAC,aAAa,CAAC,EAC5B,KAAK,EAAE,QAAQ,CAAC,UAAU,EAC1B,IAAI,EAAE,mBAAmB,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"ConfigK8sSecretTemplateForm.js","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigK8sSecretTemplateForm.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAA0C;AAC1C,uDAAmD;AAEnD,qEAAkE;AAElE,gFAAgD;AAQhD,MAAM,2BAA2B,GAAG,CAAC,EAAE,KAAK,EAAoC,EAAE,EAAE;IAClF,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,yBAAgB,GAA8B,CAAC;IAClE,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,KAAK,CAAuB,CAAC;IACrE,OAAO,CACL;QACE,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,UAAU;YAC5C,oBAAC,mBAAS,kBACI,CAAC,CAAC,aAAa,CAAC,EAC5B,KAAK,EAAE,QAAQ,CAAC,UAAU,EAC1B,IAAI,EAAE,mBAAmB,KAAK,aAAa,EAC3C,UAAU,SACV,CACQ;QACZ,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAAE,UAAU;YACjD,oBAAC,mBAAS,kBACI,CAAC,CAAC,kBAAkB,CAAC,EACjC,IAAI,EAAE,mBAAmB,KAAK,WAAW,EACzC,KAAK,EAAE,QAAQ,CAAC,QAAQ,EACxB,UAAU,SACV,CACQ;QACZ,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,UAAU;YAC3C,oBAAC,mBAAS,kBACI,CAAC,CAAC,YAAY,CAAC,EAC3B,IAAI,EAAE,mBAAmB,KAAK,YAAY,EAC1C,KAAK,EAAE,QAAQ,CAAC,SAAS,EACzB,WAAW,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAChC,UAAU,SACV,CACQ,CACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigTemplateForm.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Device/EditDeviceWizard/steps/ConfigTemplateForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuG/B,QAAA,MAAM,kBAAkB,yBAoEvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -6,12 +6,12 @@ const react_core_1 = require("@patternfly/react-core");
|
|
|
6
6
|
const formik_1 = require("formik");
|
|
7
7
|
const minus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/minus-circle-icon");
|
|
8
8
|
const plus_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/plus-circle-icon");
|
|
9
|
-
const
|
|
9
|
+
const types_1 = require("@flightctl/types");
|
|
10
|
+
const deviceSpec_1 = require("../../../../types/deviceSpec");
|
|
10
11
|
const useTranslation_1 = require("../../../../hooks/useTranslation");
|
|
11
12
|
const useFetchPeriodically_1 = require("../../../../hooks/useFetchPeriodically");
|
|
12
13
|
const error_1 = require("../../../../utils/error");
|
|
13
14
|
const generic_1 = require("../../../../utils/sort/generic");
|
|
14
|
-
const WithTooltip_1 = tslib_1.__importDefault(require("../../../common/WithTooltip"));
|
|
15
15
|
const validations_1 = require("../../../form/validations");
|
|
16
16
|
const FieldHelperText_1 = tslib_1.__importDefault(require("../../../form/FieldHelperText"));
|
|
17
17
|
const FormSelect_1 = tslib_1.__importDefault(require("../../../form/FormSelect"));
|
|
@@ -19,7 +19,7 @@ const RichValidationTextField_1 = tslib_1.__importDefault(require("../../../form
|
|
|
19
19
|
const ConfigWithRepositoryTemplateForm_1 = tslib_1.__importDefault(require("./ConfigWithRepositoryTemplateForm"));
|
|
20
20
|
const ConfigK8sSecretTemplateForm_1 = tslib_1.__importDefault(require("./ConfigK8sSecretTemplateForm"));
|
|
21
21
|
const ConfigInlineTemplateForm_1 = tslib_1.__importDefault(require("./ConfigInlineTemplateForm"));
|
|
22
|
-
require("
|
|
22
|
+
const ExpandableFormSection_1 = tslib_1.__importDefault(require("../../../form/ExpandableFormSection"));
|
|
23
23
|
const useValidateOnMount = () => {
|
|
24
24
|
const { validateForm } = (0, formik_1.useFormikContext)();
|
|
25
25
|
// validate new config section on mount
|
|
@@ -28,37 +28,32 @@ const useValidateOnMount = () => {
|
|
|
28
28
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
29
29
|
}, []);
|
|
30
30
|
};
|
|
31
|
-
const ConfigSection = ({
|
|
31
|
+
const ConfigSection = ({ index, repositories, repoRefetch }) => {
|
|
32
32
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
33
|
-
const [isExpanded, setIsExpanded] = React.useState(true);
|
|
34
33
|
const fieldName = `configTemplates[${index}]`;
|
|
35
|
-
const {
|
|
36
|
-
const [{ value: template }, { error }, { setTouched }] = (0, formik_1.useField)(fieldName);
|
|
34
|
+
const [{ value: { name, type }, },] = (0, formik_1.useField)(fieldName);
|
|
37
35
|
useValidateOnMount();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
const items = React.useMemo(() => {
|
|
37
|
+
const options = {
|
|
38
|
+
[deviceSpec_1.ConfigType.GIT]: { label: t('Git configuration') },
|
|
39
|
+
[deviceSpec_1.ConfigType.HTTP]: { label: t('Http configuration') },
|
|
40
|
+
[deviceSpec_1.ConfigType.INLINE]: { label: t('Inline configuration') },
|
|
41
|
+
};
|
|
42
|
+
if (type === deviceSpec_1.ConfigType.K8S_SECRET) {
|
|
43
|
+
options[deviceSpec_1.ConfigType.K8S_SECRET] = { label: t('Kubernetes secret provider') };
|
|
44
|
+
}
|
|
45
|
+
return options;
|
|
46
|
+
// The k8s secret option must remain active for this config even when the users switch the configType to a different one
|
|
47
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
|
+
}, [t]);
|
|
49
|
+
return (React.createElement(ExpandableFormSection_1.default, { title: t('Configurations'), fieldName: fieldName, description: name },
|
|
50
50
|
React.createElement(react_core_1.Grid, { hasGutter: true },
|
|
51
51
|
React.createElement(RichValidationTextField_1.default, { fieldName: `${fieldName}.name`, "aria-label": t('Source name'), validations: (0, validations_1.getDnsSubdomainValidations)(t), isRequired: true }),
|
|
52
52
|
React.createElement(react_core_1.FormGroup, { label: t('Source type'), isRequired: true },
|
|
53
|
-
React.createElement(FormSelect_1.default, { items: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
inline: t('Inline config provider'),
|
|
58
|
-
}, name: `${fieldName}.type`, placeholderText: t('Select a source type') })),
|
|
59
|
-
ct.type === 'secret' && React.createElement(ConfigK8sSecretTemplateForm_1.default, { index: index }),
|
|
60
|
-
ct.type === 'inline' && React.createElement(ConfigInlineTemplateForm_1.default, { index: index }),
|
|
61
|
-
(ct.type === 'http' || ct.type === 'git') && (React.createElement(ConfigWithRepositoryTemplateForm_1.default, { repoType: ct.type, index: index, repositories: repositories, repoRefetch: repoRefetch })))));
|
|
53
|
+
React.createElement(FormSelect_1.default, { items: items, name: `${fieldName}.type`, placeholderText: t('Select a source type') })),
|
|
54
|
+
type === deviceSpec_1.ConfigType.K8S_SECRET && React.createElement(ConfigK8sSecretTemplateForm_1.default, { index: index }),
|
|
55
|
+
type === deviceSpec_1.ConfigType.INLINE && React.createElement(ConfigInlineTemplateForm_1.default, { index: index }),
|
|
56
|
+
(type === deviceSpec_1.ConfigType.GIT || type === deviceSpec_1.ConfigType.HTTP) && (React.createElement(ConfigWithRepositoryTemplateForm_1.default, { repoType: type === deviceSpec_1.ConfigType.HTTP ? types_1.RepoSpecType.HTTP : types_1.RepoSpecType.GIT, index: index, repositories: repositories, repoRefetch: repoRefetch })))));
|
|
62
57
|
};
|
|
63
58
|
const ConfigTemplateForm = () => {
|
|
64
59
|
const { t } = (0, useTranslation_1.useTranslation)();
|
|
@@ -76,10 +71,10 @@ const ConfigTemplateForm = () => {
|
|
|
76
71
|
React.createElement(react_core_1.Spinner, null)));
|
|
77
72
|
}
|
|
78
73
|
return (React.createElement(formik_1.FieldArray, { name: "configTemplates" }, ({ push, remove }) => (React.createElement(React.Fragment, null,
|
|
79
|
-
values.configTemplates.map((
|
|
74
|
+
values.configTemplates.map((_, index) => (React.createElement(react_core_1.FormSection, { key: index },
|
|
80
75
|
React.createElement(react_core_1.Split, { hasGutter: true },
|
|
81
76
|
React.createElement(react_core_1.SplitItem, { isFilled: true },
|
|
82
|
-
React.createElement(ConfigSection, {
|
|
77
|
+
React.createElement(ConfigSection, { index: index, repositories: repositories, repoRefetch: refetch })),
|
|
83
78
|
React.createElement(react_core_1.SplitItem, null,
|
|
84
79
|
React.createElement(react_core_1.Button, { variant: "link", icon: React.createElement(minus_circle_icon_1.MinusCircleIcon, null), iconPosition: "start", onClick: () => remove(index) })))))),
|
|
85
80
|
React.createElement(react_core_1.FormSection, null,
|
|
@@ -89,7 +84,7 @@ const ConfigTemplateForm = () => {
|
|
|
89
84
|
name: '',
|
|
90
85
|
type: '',
|
|
91
86
|
});
|
|
92
|
-
} }, t('Add
|
|
87
|
+
} }, t('Add configuration')))),
|
|
93
88
|
React.createElement(FieldHelperText_1.default, { error: generalError })))));
|
|
94
89
|
};
|
|
95
90
|
exports.default = ConfigTemplateForm;
|