Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Display Task tooltip when a DAG has yet to run (no TI) #13162

Merged
merged 1 commit into from
Dec 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions airflow/www/static/js/task-instances.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,17 @@ export default function tiTooltip(ti, { includeTryNumber = false } = {}) {
return tt;
}

export function taskNoInstanceTooltip(taskId, task) {
let tt = '';
if (taskId) {
tt += `Task_id: ${escapeHtml(taskId)}<br>`;
}
if (task.task_type !== undefined) {
tt += `Operator: ${escapeHtml(task.task_type)}<br>`;
}
tt += '<br><em>DAG has yet to run.</em>';
return tt;
}

window.tiTooltip = tiTooltip;
window.taskNoInstanceTooltip = taskNoInstanceTooltip;
3 changes: 3 additions & 0 deletions airflow/www/templates/airflow/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,9 @@
} else if(task_group_tips.has(task_id)) {
const tt = group_tooltip(task_id, tis)
taskTip.show(tt, evt.target);
} else if (task_id in tasks) {
const tt = taskNoInstanceTooltip(task_id, tasks[task_id]);
taskTip.show(tt, evt.target)
}
};
elem.onmouseout = taskTip.hide;
Expand Down