[GitHub] pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support download logs by attempts from UI

2019-01-03 Thread GitBox
pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support 
download logs by attempts from UI
URL: https://github.com/apache/incubator-airflow/pull/4425#discussion_r245176465
 
 

 ##
 File path: airflow/www/templates/airflow/dag.html
 ##
 @@ -320,6 +326,29 @@ 
 $("#div_btn_subdag").show();
 subdag_id = "{{ dag.dag_id }}."+t;
 }
+
+  $("#try_index > li").remove()
 
 Review comment:
    


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support download logs by attempts from UI

2019-01-03 Thread GitBox
pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support 
download logs by attempts from UI
URL: https://github.com/apache/incubator-airflow/pull/4425#discussion_r245176678
 
 

 ##
 File path: airflow/www_rbac/templates/airflow/dag.html
 ##
 @@ -314,12 +320,35 @@ 
   $('#execution_date').html(d);
   $('#myModal').modal({});
   $("#myModal").css("margin-top","0px")
-if (subdag_id===undefined)
-$("#div_btn_subdag").hide();
-else {
-$("#div_btn_subdag").show();
-subdag_id = "{{ dag.dag_id }}."+t;
+  if (subdag_id===undefined)
+  $("#div_btn_subdag").hide();
+  else {
+  $("#div_btn_subdag").show();
+  subdag_id = "{{ dag.dag_id }}."+t;
+  }
+
+  $("#try_index > li").remove()
 
 Review comment:
   :+1


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support download logs by attempts from UI

2019-01-03 Thread GitBox
pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support 
download logs by attempts from UI
URL: https://github.com/apache/incubator-airflow/pull/4425#discussion_r245176609
 
 

 ##
 File path: airflow/www/templates/airflow/dag.html
 ##
 @@ -320,6 +326,29 @@ 
 $("#div_btn_subdag").show();
 subdag_id = "{{ dag.dag_id }}."+t;
 }
+
+  $("#try_index > li").remove()
+  var startIndex = (try_numbers > 2 ? 0 : 1)
+  for (var index = startIndex; index <  try_numbers; index++) {
+var url = "{{ url_for('airflow.get_logs_with_metadata') }}" +
+  "?dag_id=" + encodeURIComponent(dag_id) +
+  "_id=" + encodeURIComponent(task_id) +
+  "_date=" + encodeURIComponent(execution_date) +
+  "=null" +
+  "=file"
 
 Review comment:
    


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support download logs by attempts from UI

2019-01-03 Thread GitBox
pingzh commented on a change in pull request #4425: [AIRFLOW-3623] Support 
download logs by attempts from UI
URL: https://github.com/apache/incubator-airflow/pull/4425#discussion_r245176403
 
 

 ##
 File path: airflow/utils/helpers.py
 ##
 @@ -297,3 +297,16 @@ def parse_template_string(template_string):
 return None, Template(template_string)
 else:
 return template_string, None
+
+
+def render_log_filename(ti, try_number, filename_template):
 
 Review comment:
    


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services