diff --git a/pyflask/manageNeuroconv/manage_neuroconv.py b/pyflask/manageNeuroconv/manage_neuroconv.py index ca7ebce9a..8dadce731 100644 --- a/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/pyflask/manageNeuroconv/manage_neuroconv.py @@ -617,9 +617,9 @@ def upload_multiple_filesystem_objects_to_dandi(**kwargs): innerKwargs = {**kwargs} del innerKwargs["filesystem_paths"] innerKwargs["nwb_folder_path"] = tmp_folder_path - result = upload_folder_to_dandi(**innerKwargs) + results = upload_folder_to_dandi(**innerKwargs) rmtree(tmp_folder_path) - return result + return results def upload_folder_to_dandi( diff --git a/src/renderer/src/stories/DandiResults.js b/src/renderer/src/stories/DandiResults.js index bf5c67312..bfc9aed66 100644 --- a/src/renderer/src/stories/DandiResults.js +++ b/src/renderer/src/stories/DandiResults.js @@ -91,12 +91,15 @@ export class DandiResults extends LitElement {
    ${this.files - ? html`

    Files Uploaded

    + ? html`

    Updated DANDI Assets

      ${Object.values(this.files) .map((item) => Object.values(item)) .flat() - .map(({ file }) => html`
    1. ${file}
    2. `)} + .map(({ file }) => { + const truncated = file.split(this.id)[1].slice(1); + return html`
    3. ${truncated}
    4. `; + })}
    ` : ""}
    diff --git a/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js b/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js index 34c0a949d..7991f9991 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js +++ b/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js @@ -122,6 +122,8 @@ export class GuidedUploadPage extends Page { project: globalState.project.name, }); + this.unsavedUpdates = true; + return this.to(1); }, }; diff --git a/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js b/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js index ea4ea4771..62ab74f6d 100644 --- a/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js +++ b/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js @@ -20,9 +20,19 @@ export class GuidedResultsPage extends Page { if (!conversion) return html`

    Your conversion failed. Please try again.

    `; - const { dandiset } = this.info.globalState.upload?.info ?? {}; - - return html`
    ${new DandiResults({ id: dandiset, files: conversion })}
    `; + const { info = {}, results } = this.info.globalState.upload ?? {}; + const { dandiset } = info; + + return html`
    + ${new DandiResults({ + id: dandiset, + files: { + subject: results.map((file) => { + return { file }; + }), + }, + })} +
    `; } } diff --git a/src/renderer/src/stories/pages/uploads/UploadsPage.js b/src/renderer/src/stories/pages/uploads/UploadsPage.js index 102d9a5de..51130dbb3 100644 --- a/src/renderer/src/stories/pages/uploads/UploadsPage.js +++ b/src/renderer/src/stories/pages/uploads/UploadsPage.js @@ -158,8 +158,6 @@ async function getAPIKey(staging = false) { const isInvalid = !errors || errors.length; - console.log("GETTING API KEY", DANDI, api_key, staging, isInvalid, errors); - if (isInvalid) { const modal = new Modal({ header: `${api_key ? "Update" : "Provide"} your ${header(whichAPIKey)}`, @@ -335,8 +333,7 @@ export class UploadsPage extends Page { onClick: async () => { await this.form.validate(); // Will throw an error in the callback - const files = this.form.resolved.filesystem_paths; - await uploadToDandi.call(this, { ...global.data.uploads }); + const results = await uploadToDandi.call(this, { ...global.data.uploads }); global.data.uploads = {}; global.save(); @@ -345,7 +342,7 @@ export class UploadsPage extends Page { const summary = new DandiResults({ id: globalState.dandiset, files: { - subject: files.map((file) => { + subject: results.map((file) => { return { file }; }), }, @@ -366,6 +363,7 @@ export class UploadsPage extends Page { return (this.form = new JSONSchemaForm({ results: globalState, schema: dandiSchema, + validateEmptyValues: false, controls: { dandiset: [ new Button({