Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/electron/frontend/core/components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down
3 changes: 2 additions & 1 deletion src/supported_interfaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@
"BrukerTiffSinglePlaneConverter",
"BrukerTiffMultiPlaneConverter",
"MiniscopeConverter",
"CellExplorerRecordingInterface"
"CellExplorerRecordingInterface",
"Plexon2RecordingInterface"
]
34 changes: 34 additions & 0 deletions stories/inputs/interface_schemas/Plexon2RecordingInterface.json
Original file line number Diff line number Diff line change
@@ -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"
}
9 changes: 9 additions & 0 deletions stories/pages/SourceData.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 };
Loading