This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 413d76a0db Add deferred tasks to the cluster_activity view Pools Slots
(#34275)
413d76a0db is described below
commit 413d76a0dbcca2225859a4902af3b1176b92cc21
Author: Pavel Yermalovich <[email protected]>
AuthorDate: Tue Sep 12 07:44:33 2023 +0200
Add deferred tasks to the cluster_activity view Pools Slots (#34275)
---
airflow/www/static/js/cluster-activity/index.test.tsx | 1 +
.../www/static/js/cluster-activity/live-metrics/Pools.tsx | 15 ++++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/airflow/www/static/js/cluster-activity/index.test.tsx
b/airflow/www/static/js/cluster-activity/index.test.tsx
index 5689c69293..3381a5be87 100644
--- a/airflow/www/static/js/cluster-activity/index.test.tsx
+++ b/airflow/www/static/js/cluster-activity/index.test.tsx
@@ -87,6 +87,7 @@ const mockPoolsData = {
queued_slots: 0,
running_slots: 0,
scheduled_slots: 0,
+ deferred_slots: 0,
slots: 128,
},
],
diff --git a/airflow/www/static/js/cluster-activity/live-metrics/Pools.tsx
b/airflow/www/static/js/cluster-activity/live-metrics/Pools.tsx
index 36434eb079..037f5cce6d 100644
--- a/airflow/www/static/js/cluster-activity/live-metrics/Pools.tsx
+++ b/airflow/www/static/js/cluster-activity/live-metrics/Pools.tsx
@@ -34,13 +34,14 @@ import LoadingWrapper from "src/components/LoadingWrapper";
const formatData = (
data?: API.PoolCollection
-): Array<[string, number, number, number, number]> =>
+): Array<[string, number, number, number, number, number]> =>
data?.pools?.map((pool) => [
pool.name || "",
pool.openSlots || 0,
pool.queuedSlots || 0,
pool.runningSlots || 0,
pool.scheduledSlots || 0,
+ pool.deferredSlots || 0,
]) || [];
const Pools = (props: BoxProps) => {
@@ -49,7 +50,7 @@ const Pools = (props: BoxProps) => {
const option: ReactEChartsProps["option"] = {
dataset: {
source: [
- ["pool", "open", "queued", "running", "scheduled"],
+ ["pool", "open", "queued", "running", "scheduled", "deferred"],
...formatData(data),
],
},
@@ -60,7 +61,7 @@ const Pools = (props: BoxProps) => {
},
},
legend: {
- data: ["open", "queued", "running", "scheduled"],
+ data: ["open", "queued", "running", "scheduled", "deferred"],
},
grid: {
left: "0%",
@@ -108,6 +109,14 @@ const Pools = (props: BoxProps) => {
color: stateColors.scheduled,
},
},
+ {
+ type: "bar",
+ stack: "total",
+ barMaxWidth: 10,
+ itemStyle: {
+ color: stateColors.deferred,
+ },
+ },
],
};