bbovenzi commented on a change in pull request #22272:
URL: https://github.com/apache/airflow/pull/22272#discussion_r829268833
##########
File path: airflow/www/static/js/dag.js
##########
@@ -135,12 +135,18 @@ export function callModal(t, d, extraLinks, tryNumbers,
sd, drID, mi) {
mapIndex = mi;
$('#dag_run_id').text(drID);
$('#task_id').text(t);
- $('#map_index').text(mapIndex);
$('#execution_date').text(formatDateTime(d));
$('#taskInstanceModal').modal({});
$('#taskInstanceModal').css('margin-top', '0');
$('#extra_links').prev('hr').hide();
$('#extra_links').empty().hide();
+ if (mi >= 0) {
+ $('#modal_map_index').show();
+ $('#map_index, #modal_map_index .value').text(mi);
Review comment:
Where is `#map_index`? I don't see that id anywhere
##########
File path: airflow/www/static/js/dag.js
##########
@@ -135,12 +135,18 @@ export function callModal(t, d, extraLinks, tryNumbers,
sd, drID, mi) {
mapIndex = mi;
$('#dag_run_id').text(drID);
$('#task_id').text(t);
- $('#map_index').text(mapIndex);
$('#execution_date').text(formatDateTime(d));
$('#taskInstanceModal').modal({});
$('#taskInstanceModal').css('margin-top', '0');
$('#extra_links').prev('hr').hide();
$('#extra_links').empty().hide();
+ if (mi >= 0) {
+ $('#modal_map_index').show();
+ $('#map_index, #modal_map_index .value').text(mi);
Review comment:
Oh yes, that is how everything else is working. My bad.
##########
File path: airflow/www/templates/airflow/task_instance.html
##########
@@ -27,23 +27,33 @@
<h4>
<span class="text-muted">Task Instance:</span> <span>{{ task_id }}</span>
<span class="text-muted">at</span> <time datetime="{{ execution_date
}}">{{ execution_date }}</time>
+ {% if map_index and map_index != -1 %}
Review comment:
I think we need to make sure that `map_index` is updating.
In Gantt:
- view mapped instance -> click details -> see map Index
- view a normal instance's details first - > repeat the flow above -> no map
index
##########
File path: airflow/www/templates/airflow/task_instance.html
##########
@@ -27,23 +27,33 @@
<h4>
<span class="text-muted">Task Instance:</span> <span>{{ task_id }}</span>
<span class="text-muted">at</span> <time datetime="{{ execution_date
}}">{{ execution_date }}</time>
+ {% if map_index and map_index != -1 %}
Review comment:
Fixed with `is defined`
--
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]