diff --git a/src/electron/frontend/core/components/Table.js b/src/electron/frontend/core/components/Table.js index 3882fea2a..7199c7f90 100644 --- a/src/electron/frontend/core/components/Table.js +++ b/src/electron/frontend/core/components/Table.js @@ -670,11 +670,11 @@ export class Table extends LitElement { let message = ""; let theme = ""; if (warnings.length) { - (theme = "warning"), (message = warnings.map((error) => error.message).join("\n")); + ((theme = "warning"), (message = warnings.map((error) => error.message).join("\n"))); } else cell.removeAttribute("warning"); if (errors.length) { - (theme = "error"), (message = errors.map((error) => error.message).join("\n")); // Class switching handled automatically + ((theme = "error"), (message = errors.map((error) => error.message).join("\n"))); // Class switching handled automatically } else cell.removeAttribute("error"); if (theme) cell.setAttribute(theme, ""); diff --git a/src/supported_interfaces.json b/src/supported_interfaces.json index db1023f39..5f8ee2e13 100644 --- a/src/supported_interfaces.json +++ b/src/supported_interfaces.json @@ -44,5 +44,6 @@ "BrukerTiffSinglePlaneConverter", "BrukerTiffMultiPlaneConverter", "MiniscopeConverter", - "CellExplorerRecordingInterface" + "CellExplorerRecordingInterface", + "Plexon2RecordingInterface" ] diff --git a/stories/inputs/interface_schemas/Plexon2RecordingInterface.json b/stories/inputs/interface_schemas/Plexon2RecordingInterface.json new file mode 100644 index 000000000..19ae4fb0c --- /dev/null +++ b/stories/inputs/interface_schemas/Plexon2RecordingInterface.json @@ -0,0 +1,34 @@ +{ + "required": [], + "properties": { + "Plexon2RecordingInterface": { + "properties": { + "file_path": { + "format": "file-path", + "type": "string", + "description": "Path to the .pl2 file." + }, + "verbose": { + "default": true, + "type": "boolean" + }, + "es_key": { + "default": "ElectricalSeries", + "type": "string" + } + }, + "required": [ + "file_path" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "source.schema.json", + "title": "Source data schema", + "description": "Schema for the source data, files and directories", + "version": "0.1.0" +} diff --git a/stories/pages/SourceData.stories.js b/stories/pages/SourceData.stories.js index 841007cf2..8b43dafe0 100644 --- a/stories/pages/SourceData.stories.js +++ b/stories/pages/SourceData.stories.js @@ -44,6 +44,7 @@ import BrukerTiffSinglePlaneConverterSchema from "../inputs/interface_schemas/Br import BrukerTiffMultiPlaneConverterSchema from "../inputs/interface_schemas/BrukerTiffMultiPlaneConverter.json"; import MiniscopeConverterSchema from "../inputs/interface_schemas/MiniscopeConverter.json"; import CellExplorerRecordingInterfaceSchema from "../inputs/interface_schemas/CellExplorerRecordingInterface.json"; +import Plexon2RecordingInterfaceSchema from "../inputs/interface_schemas/Plexon2RecordingInterface.json"; export default { title: "Pages/Guided Mode/Source Data", @@ -142,6 +143,8 @@ globalStateCopy.schema.source_data.properties.MiniscopeConverter = MiniscopeConverterSchema.properties.MiniscopeConverter; globalStateCopy.schema.source_data.properties.CellExplorerRecordingInterface = CellExplorerRecordingInterfaceSchema.properties.CellExplorerRecordingInterface; +globalStateCopy.schema.source_data.properties.Plexon2RecordingInterface = + Plexon2RecordingInterfaceSchema.properties.Plexon2RecordingInterface; const results = globalStateCopy.results; for (let sub in results) { @@ -424,3 +427,9 @@ const CellExplorerRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globa CellExplorerRecordingInterfaceGlobalCopy.interfaces.interface = CellExplorerRecordingInterface; CellExplorerRecordingInterfaceGlobalCopy.schema.source_data = CellExplorerRecordingInterfaceSchema; CellExplorerRecordingInterface.args = { activePage, globalState: CellExplorerRecordingInterfaceGlobalCopy }; + +export const Plexon2RecordingInterface = PageTemplate.bind({}); +const Plexon2RecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +Plexon2RecordingInterfaceGlobalCopy.interfaces.interface = Plexon2RecordingInterface; +Plexon2RecordingInterfaceGlobalCopy.schema.source_data = Plexon2RecordingInterfaceSchema; +Plexon2RecordingInterface.args = { activePage, globalState: Plexon2RecordingInterfaceGlobalCopy };