ashb commented on code in PR #55857:
URL: https://github.com/apache/airflow/pull/55857#discussion_r2362300818
##########
airflow-core/src/airflow/ui/src/components/PoolBar.tsx:
##########
@@ -42,13 +42,28 @@ export const PoolBar = ({
const slotValue = pool[key];
const flexValue = slotValue / totalSlots || 0;
+ // Hide empty segments
if (flexValue === 0) {
return undefined;
}
+ // NEW: If this segment represents "deferred_slots" and the current
pool
+ // is configured NOT to include deferred in occupied slots, hide this
chip.
+ // (We only have the flag on real pools; aggregated "Slots" objects
don't carry it)
+ const isDeferredKey = key === "deferred_slots";
+
+ if (
+ isDeferredKey &&
+ "include_deferred" in pool && // type guard: only PoolResponse has
this
+ !pool.include_deferred
Review Comment:
```suggestion
pool.include_deferred?
```
##########
airflow-core/src/airflow/ui/src/components/PoolBar.tsx:
##########
@@ -42,13 +42,28 @@ export const PoolBar = ({
const slotValue = pool[key];
const flexValue = slotValue / totalSlots || 0;
+ // Hide empty segments
if (flexValue === 0) {
return undefined;
}
+ // NEW: If this segment represents "deferred_slots" and the current
pool
+ // is configured NOT to include deferred in occupied slots, hide this
chip.
+ // (We only have the flag on real pools; aggregated "Slots" objects
don't carry it)
+ const isDeferredKey = key === "deferred_slots";
+
+ if (
+ isDeferredKey &&
+ "include_deferred" in pool && // type guard: only PoolResponse has
this
+ !pool.include_deferred
Review Comment:
(I think)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]