From 195d274fd909c520b94b7090205fbc08b5cbf793 Mon Sep 17 00:00:00 2001 From: Tristan Kuehn Date: Tue, 6 Sep 2022 16:46:00 -0400 Subject: [PATCH 1/2] Show logs in task tables --- autobidsportal/templates/answer_info.html | 118 ++++++++++++++-------- 1 file changed, 74 insertions(+), 44 deletions(-) diff --git a/autobidsportal/templates/answer_info.html b/autobidsportal/templates/answer_info.html index 27df1e8..c7c074e 100644 --- a/autobidsportal/templates/answer_info.html +++ b/autobidsportal/templates/answer_info.html @@ -192,11 +192,18 @@

{% for t in cfmm2tar_tasks %} - {% if t.start_time != None %} - {{ t.start_time.strftime("%Y-%m-%d %H:%M") }} - {% else %} - {{ t.start_time }} - {% endif %} + {% if t.end_time != None %} @@ -217,6 +224,13 @@

{% endif %} + + +
+{{ t.log if t.log != None else "No log" }}
+                  
+ + {% endfor %} @@ -234,48 +248,64 @@

Tar2bids Runs

- - - - - - - {% for t in tar2bids_tasks %} +
+
- Start Date and Time - - End Date and Time - - Completion Status -
- - - + + + + {% for t in tar2bids_tasks %} + + + - - {% endfor %} -
- {% if t.start_time != None %} - {{ t.start_time.strftime("%Y-%m-%d %H:%M") }} - {% else %} - {{ t.start_time }} - {% endif %} - - {% if t.end_time != None %} - {{ t.end_time.strftime("%Y-%m-%d %H:%M") }} - {% else %} - {{ t.end_time }} - {% endif %} - - {% if t.complete == True %} - {% if t.success == True %} - Completed Successfully + + Start Date and Time + + End Date and Time + + Completion Status +
+ + + {% if t.end_time != None %} + {{ t.end_time.strftime("%Y-%m-%d %H:%M") }} {% else %} - Failed + {{ t.end_time }} {% endif %} - {% else %} - In Progress - {% endif %} -
+ + + {% if t.complete == True %} + {% if t.success == True %} + Completed Successfully + {% else %} + Failed + {% endif %} + {% else %} + In Progress + {% endif %} + + + + +
+{{ t.log if t.log != None else "No log" }}
+                  
+ + + {% endfor %} + +

From 18f346117eb11e78d7b3cf49dda8f29920614999 Mon Sep 17 00:00:00 2001 From: Tristan Kuehn Date: Thu, 8 Sep 2022 11:08:59 -0400 Subject: [PATCH 2/2] Show logs in a modal with React --- .../static/lib/autobids-react/dist/index.js | 4 +- .../autobids-react/src/TaskList/TaskList.js | 30 ++++ .../src/TaskList/TaskListItem.js | 48 ++++++ .../src/TaskList/TaskLogModal.js | 31 ++++ .../lib/autobids-react/src/TaskList/index.js | 3 + .../static/lib/autobids-react/src/index.js | 7 + autobidsportal/templates/answer_info.html | 155 +++++------------- autobidsportal/templates/base.html | 2 +- 8 files changed, 163 insertions(+), 117 deletions(-) create mode 100644 autobidsportal/static/lib/autobids-react/src/TaskList/TaskList.js create mode 100644 autobidsportal/static/lib/autobids-react/src/TaskList/TaskListItem.js create mode 100644 autobidsportal/static/lib/autobids-react/src/TaskList/TaskLogModal.js create mode 100644 autobidsportal/static/lib/autobids-react/src/TaskList/index.js diff --git a/autobidsportal/static/lib/autobids-react/dist/index.js b/autobidsportal/static/lib/autobids-react/dist/index.js index 8e20fc7..08106e5 100644 --- a/autobidsportal/static/lib/autobids-react/dist/index.js +++ b/autobidsportal/static/lib/autobids-react/dist/index.js @@ -4,10 +4,10 @@ object-assign (c) Sindre Sorhus @license MIT */ -"use strict";var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o,i,u=a(e),s=1;s