From 274cf69896dd74384918fac54fbbf2114d8a8fb6 Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:16:32 -0500 Subject: [PATCH 1/3] post closure fix --- apps/port/import.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/port/import.js b/apps/port/import.js index 9242a793..58172ee4 100644 --- a/apps/port/import.js +++ b/apps/port/import.js @@ -15,8 +15,9 @@ function prepareAnnot() { function saveAnnot() { try { let doc = JSON.parse(document.getElementById('output').value); + store.addMark(doc).then((x)=>alert('done!')).catch((e)=>alert(e)); } catch (e) { alert(e); } - store.addMark(doc).then((x)=>alert('done!')).catch((e)=>alert(e)); + } From f4c28b8cfef5c15e7e313fc81e58eb796a0b514a Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:18:38 -0500 Subject: [PATCH 2/3] populate more fields correctly --- apps/port/import.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/port/import.js b/apps/port/import.js index 58172ee4..83c437d6 100644 --- a/apps/port/import.js +++ b/apps/port/import.js @@ -6,6 +6,9 @@ function prepareAnnot() { output['provenance']['image']['slide'] = document.getElementById('slide_id').value; output['provenance']['analysis']['execution'] = document.getElementById('annot_name').value; output['properties']['annotations']['name'] = document.getElementById('annot_name').value; + output['provenance']['analysis']['name'] = document.getElementById('annot_name').value; + output['provenance']['analysis']['execution_id'] = document.getElementById('annot_name').value; + } catch (e) { alert(e); } From e08555974c3a70d0e315a1403da521622297e0a3 Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 15 Jan 2025 14:20:27 -0500 Subject: [PATCH 3/3] lint fix --- apps/port/import.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/port/import.js b/apps/port/import.js index 83c437d6..8c19a550 100644 --- a/apps/port/import.js +++ b/apps/port/import.js @@ -8,7 +8,6 @@ function prepareAnnot() { output['properties']['annotations']['name'] = document.getElementById('annot_name').value; output['provenance']['analysis']['name'] = document.getElementById('annot_name').value; output['provenance']['analysis']['execution_id'] = document.getElementById('annot_name').value; - } catch (e) { alert(e); } @@ -22,5 +21,4 @@ function saveAnnot() { } catch (e) { alert(e); } - }