diff --git a/SQL/0000-00-01-Modules.sql b/SQL/0000-00-01-Modules.sql
index f5fcc807b2d..82d25fa4c16 100644
--- a/SQL/0000-00-01-Modules.sql
+++ b/SQL/0000-00-01-Modules.sql
@@ -51,5 +51,6 @@ INSERT INTO modules (Name, Active) VALUES ('timepoint_list', 'Y');
INSERT INTO modules (Name, Active) VALUES ('user_accounts', 'Y');
INSERT INTO modules (Name, Active) VALUES ('electrophysiology_browser', 'Y');
INSERT INTO modules (Name, Active) VALUES ('dqt', 'Y');
+INSERT INTO modules (Name, Active) VALUES ('electrophysiology_uploader', 'Y');
ALTER TABLE issues ADD CONSTRAINT `fk_issues_7` FOREIGN KEY (`module`) REFERENCES `modules` (`ID`);
diff --git a/SQL/0000-00-03-ConfigTables.sql b/SQL/0000-00-03-ConfigTables.sql
index b09e2289a59..726eb552320 100644
--- a/SQL/0000-00-03-ConfigTables.sql
+++ b/SQL/0000-00-03-ConfigTables.sql
@@ -77,6 +77,8 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MINCToolsPath', 'Path to the MINC tools', 1, 0, 'web_path', ID, 'Path to the MINC tools', 12 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'documentRepositoryPath', 'Path to uploaded document repository files', 1, 0, 'web_path', ID, 'Document Repository Upload Path', 13 FROM ConfigSettings WHERE Name="paths";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'dataReleasePath', 'Path to uploaded data release files', 1, 0, 'web_path', ID, 'Data release Upload Path', 14 FROM ConfigSettings WHERE Name="paths";
+INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'EEGUploadIncomingPath', 'Path to the upload directory for incoming EEG studies', 1, 0, 'text', ID, 'EEG Incoming Directory', 7 FROM ConfigSettings WHERE Name="paths";
+
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('gui', 'Settings related to the overall display of LORIS', 1, 0, 'GUI', 3);
@@ -284,4 +286,4 @@ INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Na
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_dataset_authors';
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_acknowledgments_text';
INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_readme_text';
-INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_validator_options_to_ignore';
+INSERT INTO Config (ConfigID, Value) SELECT ID, '' FROM ConfigSettings WHERE Name='bids_validator_options_to_ignore';
\ No newline at end of file
diff --git a/SQL/0000-00-05-ElectrophysiologyTables.sql b/SQL/0000-00-05-ElectrophysiologyTables.sql
index f15eba80e8a..f1923caf9b0 100644
--- a/SQL/0000-00-05-ElectrophysiologyTables.sql
+++ b/SQL/0000-00-05-ElectrophysiologyTables.sql
@@ -380,6 +380,21 @@ CREATE TABLE `physiological_annotation_rel` (
REFERENCES `physiological_annotation_file` (`AnnotationFileID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+-- Create EEG upload table
+CREATE TABLE `electrophysiology_uploader` (
+ `UploadID` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `UploadedBy` varchar(255) NOT NULL DEFAULT '',
+ `UploadDate` DateTime DEFAULT NULL,
+ `UploadLocation` varchar(255) NOT NULL DEFAULT '',
+ `Status` enum('Not Started', 'In Progress', 'Complete', 'Failed') DEFAULT 'Not Started',
+ `SessionID` int(10) unsigned NOT NULL default '0',
+ `MetaData` TEXT default NULL,
+ PRIMARY KEY (`UploadID`),
+ KEY (`SessionID`),
+ CONSTRAINT `FK_eegupload_SessionID`
+ FOREIGN KEY (`SessionID`) REFERENCES `session` (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
-- Insert into physiological_output_type
INSERT INTO physiological_output_type
(`OutputTypeName`, `OutputTypeDescription`)
diff --git a/SQL/New_patches/2023-02-24-electrophysiology_uploader.sql b/SQL/New_patches/2023-02-24-electrophysiology_uploader.sql
new file mode 100644
index 00000000000..363482be29f
--- /dev/null
+++ b/SQL/New_patches/2023-02-24-electrophysiology_uploader.sql
@@ -0,0 +1,21 @@
+-- Create EEG upload table
+CREATE TABLE `electrophysiology_uploader` (
+ `UploadID` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `UploadedBy` varchar(255) NOT NULL DEFAULT '',
+ `UploadDate` DateTime DEFAULT NULL,
+ `UploadLocation` varchar(255) NOT NULL DEFAULT '',
+ `Status` enum('Not Started', 'In Progress', 'Complete', 'Failed') DEFAULT 'Not Started',
+ `SessionID` int(10) unsigned NOT NULL default '0',
+ `MetaData` TEXT default NULL,
+ PRIMARY KEY (`UploadID`),
+ KEY (`SessionID`),
+ CONSTRAINT `FK_eegupload_SessionID`
+ FOREIGN KEY (`SessionID`) REFERENCES `session` (`ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- Add to module table
+INSERT INTO modules (Name, Active) VALUES ('electrophysiology_uploader', 'Y');
+
+-- Add new configurations for eeg uploader
+INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'EEGUploadIncomingPath', 'Path to the upload directory for incoming EEG studies', 1, 0, 'text', ID, 'EEG Incoming Directory', 7 FROM ConfigSettings WHERE Name="paths";
+
diff --git a/modules/electrophysiology_uploader/json/ConversionFlags.json b/modules/electrophysiology_uploader/json/ConversionFlags.json
new file mode 100644
index 00000000000..4e125d13cea
--- /dev/null
+++ b/modules/electrophysiology_uploader/json/ConversionFlags.json
@@ -0,0 +1,359 @@
+{
+ "FACE_present": {
+ "pass": "There are face stimuli flags",
+ "warning": "No face flags! There might be connection issue between E-prime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the stm+ and fix+ flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "FACE Flags Are Present",
+ "reason": false
+ },
+ "FACE_num": {
+ "pass": "The number if face stimuli flags is correct.",
+ "warning": "Missing Face Flag! This might mean the task was quit early. Please explain what happened:",
+ "flagCondition": 0,
+ "label": "Correct Number Of Face Flags",
+ "reason": true
+ },
+ "face_present": {
+ "pass": "There are face stimuli flags",
+ "warning": "No face flags! There might be connection issue between E-prime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the stm+ and fix+ flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "FACE Flags Are Present",
+ "reason": false
+ },
+ "face_num": {
+ "pass": "The number if face stimuli flags is correct.",
+ "warning": "Missing Face Flag! This might mean the task was quit early. Please explain what happened:",
+ "flagCondition": 0,
+ "label": "Correct Number Of Face Flags",
+ "reason": true
+ },
+ "VEP_present": {
+ "pass": "There are VEP stimuli flags",
+ "warning": "Noe VEP flags! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE Eprime and check that the ch1+ and ch2+ flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "VEP Flags Are Present",
+ "reason": false
+ },
+ "VEP_num": {
+ "pass": "The number of VEP flags is correct",
+ "warning": "Missing VEP Flag! This might mean the task was quit early. Please explain what happened:",
+ "flagCondition": 0,
+ "label": "Correct Number Of VEP Flags",
+ "reason": true
+ },
+ "MMN_present": {
+ "pass": "There are MMN stimuli flags",
+ "warning": "No MMN flags! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE Eprime, and check that the ch1+ and ch2+ flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "MMN Flags Are Present",
+ "reason": false
+ },
+ "MMN_num": {
+ "pass": "The number of MMN flags is correct (equal to either exactly 1 or exactly 2 blocks)",
+ "warning": "Missing MMN Flag! This might mean the task was quit early. Please explain what happened:",
+ "flagCondition": 0,
+ "label": "Correct Number Of MMN Flags",
+ "reason": true
+ },
+ "RS_present": {
+ "pass": "There is a Resting Sqtate stimuli flag",
+ "warning": "No Resting State flags! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the bas+ flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "RS Flags Are Present",
+ "reason": false
+ },
+ "trsp_RS_present": {
+ "pass": "There is at least one TRSP flag in RS task",
+ "warning": "No TRSP flags in RS! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the TRSP flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "TRSP Flags Are Present for RS",
+ "reason": false
+ },
+ "trsp_RS_num": {
+ "pass": "The number of TRSP flags is correct in RS",
+ "warning": "Missing TRSP Flag in RS! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of TRSP Flags for RS",
+ "reason": false
+ },
+ "bgin_RS_present": {
+ "pass": "There is at least one bgin flag in RS",
+ "warning": "No bgin flags in RS! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE Eprime, and check that the bgin flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "bgin Flags Are Present for RS",
+ "reason": false
+ },
+ "bgin_RS_num": {
+ "pass": "The number of bgin flags is correct in RS",
+ "warning": "Missing bgin Flag in RS! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of bgin Flags for RS",
+ "reason": false
+ },
+ "delay_RS": {
+ "pass": "There is a flag delay in RS",
+ "warning": "Possible flag delay in RS! Make sure Netstation is running before opening E-prime and check that the SESS and CELL flags appear in netstation right as the recording is started. If the problem persists, restart both computers.",
+ "flagCondition": 1,
+ "label": "Delayed Flags for RS",
+ "reason": false
+ },
+ "IBEG_RS": {
+ "pass": "Impedances were opened during the task in RS.",
+ "warning": "The impedances were opened during the RS. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Left Open for RS",
+ "reason": false
+ },
+ "IEND_RS": {
+ "pass": "Impedances were closed during the RS task.",
+ "warning": "The impedances were closed during RS. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Closed During RS",
+ "reason": false
+ },
+ "SESS_RS_present": {
+ "pass": "The SESS flag exists in RS",
+ "warning": "Missing SESS flag in RS! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "SESS Flags Are Present for RS",
+ "reason": false
+ },
+ "CELL_RS_present": {
+ "pass": "The CELL flag exists in RS",
+ "warning": "Missing CELL flag in RS! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "CELL Flags Are Present for RS",
+ "reason": false
+ },
+ "RS_exists": {
+ "pass": "RS task exists.",
+ "warning": "RS is missing!",
+ "flagCondition": 0,
+ "label": "RS Was Uploaded",
+ "reason": false
+ },
+ "trsp_MMN_present": {
+ "pass": "There is at least one TRSP flag in MMN",
+ "warning": "No TRSP flags in MMN! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the TRSP flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "TRSP Flags Are Present for MMN",
+ "reason": false
+ },
+ "trsp_MMN_num": {
+ "pass": "The number of TRSP flags is correct",
+ "warning": "Missing TRSP Flag in *TASK*! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of TRSP Flags for MMN",
+ "reason": false
+ },
+ "bgin_MMN_present": {
+ "pass": "There is at least one bgin flag in MMN",
+ "warning": "No bgin flags in MMN! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE Eprime, and check that the bgin flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "bgin Flags Are Present for MMN",
+ "reason": false
+ },
+ "bgin_MMN_num": {
+ "pass": "The number of bgin flags is correct in MMN",
+ "warning": "Missing bgin Flag in MMN! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of bgin Flags for MMN",
+ "reason": false
+ },
+ "delay_MMN": {
+ "pass": "There is a flag delay in MMN",
+ "warning": "Possible flag delay in MMN! Make sure Netstation is running before opening E-prime and check that the SESS and CELL flags appear in netstation right as the recording is started. If the problem persists, restart both computers.",
+ "flagCondition": 1,
+ "label": "Delayed Flags for MMN",
+ "reason": false
+ },
+ "IBEG_MMN": {
+ "pass": "Impedances were opened during the MMN.",
+ "warning": "The impedances were opened during the MMN. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Left Open for MMN",
+ "reason": false
+ },
+ "IEND_MMN": {
+ "pass": "Impedances were closed during the MMN.",
+ "warning": "The impedances were closed during MMN. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Closed During MMN",
+ "reason": false
+ },
+ "SESS_MMN_present": {
+ "pass": "The SESS flag exists in MMN",
+ "warning": "Missing SESS flag in MMN! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "SESS Flags Are Present for MMN",
+ "reason": false
+ },
+ "CELL_MMN_present": {
+ "pass": "The CELL flag exists in MMN",
+ "warning": "Missing CELL flag in MMN! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "CELL Flags Are Present for MMN",
+ "reason": false
+ },
+ "MMN_exists": {
+ "pass": "This task exists.",
+ "warning": "MMN is missing!",
+ "flagCondition": 0,
+ "label": "MMN Was Uploaded",
+ "reason": false
+ },
+ "trsp_FACE_present": {
+ "pass": "There is at least one TRSP flag in FACE",
+ "warning": "No TRSP flags in FACE! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the TRSP flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "TRSP Flags Are Present for FACE",
+ "reason": false
+ },
+ "trsp_FACE_num": {
+ "pass": "The number of TRSP flags is correct in FACE",
+ "warning": "Missing TRSP Flag in FACE! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of TRSP Flags for FACE",
+ "reason": false
+ },
+ "bgin_FACE_present": {
+ "pass": "There is at least one bgin flag in FACE",
+ "warning": "No bgin flags in FACE! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE Eprime, and check that the bgin flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "bgin Flags Are Present for FACE",
+ "reason": false
+ },
+ "bgin_FACE_num": {
+ "pass": "The number of bgin flags is correct in FACE",
+ "warning": "Missing bgin Flag in FACE! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of bgin Flags for FACE",
+ "reason": false
+ },
+ "delay_FACE": {
+ "pass": "There is a flag delay in FACE",
+ "warning": "Possible flag delay in FACE! Make sure Netstation is running before opening E-prime and check that the SESS and CELL flags appear in netstation right as the recording is started. If the problem persists, restart both computers.",
+ "flagCondition": 1,
+ "label": "Delayed Flags for FACE",
+ "reason": false
+ },
+ "IBEG_FACE": {
+ "pass": "Impedances were opened during the FACE.",
+ "warning": "The impedances were opened during the FACE. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Left Open for FACE",
+ "reason": false
+ },
+ "IEND_FACE": {
+ "pass": "Impedances were closed during the FACE.",
+ "warning": "The impedances were closed during FACE. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Closed During FACE",
+ "reason": false
+ },
+ "SESS_FACE_present": {
+ "pass": "The SESS flag exists in FACE",
+ "warning": "Missing SESS flag in FACE! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "SESS Flags Are Present for FACE",
+ "reason": false
+ },
+ "CELL_FACE_present": {
+ "pass": "The CELL flag exists in FACE",
+ "warning": "Missing CELL flag in FACE! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "CELL Flags Are Present for FACE",
+ "reason": false
+ },
+ "FACE_exists": {
+ "pass": "FACE task exists.",
+ "warning": "FACE is missing!",
+ "flagCondition": 0,
+ "label": "FACE Was Uploaded",
+ "reason": false
+ },
+ "trsp_VEP_present": {
+ "pass": "There is at least one TRSP flag in VEP",
+ "warning": "No TRSP flags in VEP! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE E-prime, and check that the TRSP flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "TRSP Flags Are Present for VEP",
+ "reason": false
+ },
+ "trsp_VEP_num": {
+ "pass": "The number of TRSP flags is correct in VEP",
+ "warning": "Missing TRSP Flag in VEP! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of TRSP Flags for VEP",
+ "reason": false
+ },
+ "bgin_VEP_present": {
+ "pass": "There is at least one bgin flag in VEP",
+ "warning": "No bgin flags in VEP! There might be a connection issue between the Eprime and Netstation computers. Be sure to open netstation BEFORE Eprime, and check that the bgin flags are showing up in Netstation while the task is running.",
+ "flagCondition": 0,
+ "label": "bgin Flags Are Present for VEP",
+ "reason": false
+ },
+ "bgin_VEP_num": {
+ "pass": "The number of bgin flags is correct in VEP",
+ "warning": "Missing bgin Flag in VEP! This might mean the task was quit early.",
+ "flagCondition": 0,
+ "label": "Correct Number Of bgin Flags for VEP",
+ "reason": false
+ },
+ "delay_VEP": {
+ "pass": "There is a flag delay in VEP",
+ "warning": "Possible flag delay in VEP! Make sure Netstation is running before opening E-prime and check that the SESS and CELL flags appear in netstation right as the recording is started. If the problem persists, restart both computers.",
+ "flagCondition": 1,
+ "label": "Delayed Flags for VEP",
+ "reason": false
+ },
+ "IBEG_VEP": {
+ "pass": "Impedances were opened during the VEP.",
+ "warning": "The impedances were opened during the VEP. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Left Open for VEP",
+ "reason": false
+ },
+ "IEND_VEP": {
+ "pass": "Impedances were closed during the VEP.",
+ "warning": "The impedances were closed during VEP. Make sure you close the impedance window before beginning a task.",
+ "flagCondition": 1,
+ "label": "Impedances Closed During VEP",
+ "reason": false
+ },
+ "SESS_VEP_present": {
+ "pass": "The SESS flag exists in VEP",
+ "warning": "Missing SESS flag in VEP! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "SESS Flags Are Present for VEP",
+ "reason": false
+ },
+ "CELL_VEP_present": {
+ "pass": "The CELL flag exists in VEP",
+ "warning": "Missing CELL flag in VEP! This probably isn’t an issue, but make sure Netstation is turned on before Eprime.",
+ "flagCondition": 0,
+ "label": "CELL Flags Are Present for VEP",
+ "reason": false
+ },
+ "VEP_exists": {
+ "pass": "VEP task exists.",
+ "warning": "VEP is missing!",
+ "flagCondition": 0,
+ "label": "VEP Was Uploaded",
+ "reason": false
+ },
+ "duplicate_file": {
+ "pass": "There aren\"t multiple files for the same task.",
+ "warning": "There are multiple files of the same task. Please explain why:",
+ "flagCondition": 1,
+ "label": "Multiple Runs of the Same Task",
+ "reason": true
+ },
+ "high_impedance": {
+ "pass": "No electrodes had high impedances.",
+ "warning": "One or more electrodes had high impedances! Impedances can be improved by making sure all electrodes (especially ref and com) have good contact with the scalp, and the sponges are wet. If the same electrode is persistently bad, it might need to be replaced.",
+ "flagCondition": 1,
+ "label": "High Impedances",
+ "reason": false
+ }
+}
diff --git a/modules/electrophysiology_uploader/jsx/ElectrophysiologyUploader.js b/modules/electrophysiology_uploader/jsx/ElectrophysiologyUploader.js
new file mode 100644
index 00000000000..4a5a94321ec
--- /dev/null
+++ b/modules/electrophysiology_uploader/jsx/ElectrophysiologyUploader.js
@@ -0,0 +1,97 @@
+import {Component} from 'react';
+import Loader from '../../../../jsx/Loader';
+import {TabPane, Tabs} from '../../../../jsx/Tabs';
+import UploadForm from './UploadForm';
+import UploadViewer from './UploadViewer';
+
+class ElectrophysiologyUploader extends Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ isLoaded: false,
+ filter: {},
+ fieldOptions: {},
+ };
+
+ this.fetchData = this.fetchData.bind(this);
+ }
+
+ /**
+ * Called by React when the component has been rendered on the page.
+ */
+ componentDidMount() {
+ this.fetchData();
+ }
+
+ /**
+ * Retrive data from the provided URL and save it in state
+ * Additionaly add hiddenHeaders to global loris vairable
+ * for easy access by columnFormatter.
+ */
+ fetchData() {
+ fetch(`${this.props.DataURL}/?format=json`, {
+ method: 'GET',
+ }).then((response) => {
+ if (!response.ok) {
+ console.error(response.status + ': ' + response.statusText);
+ return;
+ }
+
+ response.json().then((data) => {
+ this.setState({
+ data: data,
+ isLoaded: true,
+ });
+ });
+ }).catch((error) => {
+ console.error(error);
+ });
+ }
+
+ render() {
+ if (!this.state.isLoaded) {
+ return