From 4c9d028a35dab930c8a9c59da70b8e4c8448a666 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Tue, 8 Mar 2022 13:04:35 -0500 Subject: [PATCH] Disable checkbox while job is running in project and inventory source lists (#11841) --- .../Inventory/InventorySources/InventorySourceListItem.js | 2 ++ awx/ui/src/screens/Project/ProjectList/ProjectListItem.js | 1 + 2 files changed, 3 insertions(+) diff --git a/awx/ui/src/screens/Inventory/InventorySources/InventorySourceListItem.js b/awx/ui/src/screens/Inventory/InventorySources/InventorySourceListItem.js index d958f82a9e..1c435095b3 100644 --- a/awx/ui/src/screens/Inventory/InventorySources/InventorySourceListItem.js +++ b/awx/ui/src/screens/Inventory/InventorySources/InventorySourceListItem.js @@ -13,6 +13,7 @@ import { ActionsTd, ActionItem, TdBreakWord } from 'components/PaginatedTable'; import StatusLabel from 'components/StatusLabel'; import JobCancelButton from 'components/JobCancelButton'; import { formatDateString } from 'util/dates'; +import { isJobRunning } from 'util/jobs'; import InventorySourceSyncButton from '../shared/InventorySourceSyncButton'; const ExclamationTriangleIcon = styled(PFExclamationTriangleIcon)` @@ -64,6 +65,7 @@ function InventorySourceListItem({ rowIndex, isSelected, onSelect, + disable: isJobRunning(source.status), }} /> diff --git a/awx/ui/src/screens/Project/ProjectList/ProjectListItem.js b/awx/ui/src/screens/Project/ProjectList/ProjectListItem.js index fb213f15a1..80b547f955 100644 --- a/awx/ui/src/screens/Project/ProjectList/ProjectListItem.js +++ b/awx/ui/src/screens/Project/ProjectList/ProjectListItem.js @@ -172,6 +172,7 @@ function ProjectListItem({ rowIndex, isSelected, onSelect, + disable: isJobRunning(job?.status), }} dataLabel={t`Selected`} />