From de41b740944eff892418b4c52f1ec5b1f9c6366a Mon Sep 17 00:00:00 2001
From: Antoine Detailleur <detailleur@fortiss.org>
Date: Mon, 7 Dec 2020 10:28:00 +0100
Subject: [PATCH] [NRRPLT-8003] indentation corrected

---
 src/app/scripts/common/filters/time-filter.js | 50 ++++++------
 .../experiment-list-element.js                | 81 ++++++++++---------
 .../experiment-list/experiment-list.js        | 14 ++--
 3 files changed, 74 insertions(+), 71 deletions(-)

diff --git a/src/app/scripts/common/filters/time-filter.js b/src/app/scripts/common/filters/time-filter.js
index bc76400..251205f 100644
--- a/src/app/scripts/common/filters/time-filter.js
+++ b/src/app/scripts/common/filters/time-filter.js
@@ -22,37 +22,37 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  * ---LICENSE-END**/
 
- // This file contains filters to display times and dates
+// This file contains filters to display times and dates
 
 export default function timeDDHHMMSS(input) {
 
-    if (typeof input !== 'number') {
-        return '--\u00A0--:--:--';
-    }
-    var timeValue = '';
-    var timeSec = input;
-    var timeDay = Math.floor(timeSec / 86400);
-    timeSec -= timeDay * 86400;
-    var timeHour = Math.floor(timeSec / 3600);
-    timeSec -= timeHour * 3600;
-    var timeMin = Math.floor(timeSec / 60);
-    timeSec = Math.floor(timeSec) - timeMin * 60;
-    if (timeDay < 10) {
+  if (typeof input !== 'number') {
+    return '--\u00A0--:--:--';
+  }
+  var timeValue = '';
+  var timeSec = input;
+  var timeDay = Math.floor(timeSec / 86400);
+  timeSec -= timeDay * 86400;
+  var timeHour = Math.floor(timeSec / 3600);
+  timeSec -= timeHour * 3600;
+  var timeMin = Math.floor(timeSec / 60);
+  timeSec = Math.floor(timeSec) - timeMin * 60;
+  if (timeDay < 10) {
     timeValue += '0';
-    }
-    timeValue += timeDay.toFixed(0) + '\u00A0';
-    if (timeHour < 10) {
+  }
+  timeValue += timeDay.toFixed(0) + '\u00A0';
+  if (timeHour < 10) {
     timeValue += '0';
-    }
-    timeValue += timeHour.toFixed(0) + ':';
-    if (timeMin < 10) {
+  }
+  timeValue += timeHour.toFixed(0) + ':';
+  if (timeMin < 10) {
     timeValue += '0';
-    }
-    timeValue += timeMin.toFixed(0) + ':';
-    if (timeSec < 10) {
+  }
+  timeValue += timeMin.toFixed(0) + ':';
+  if (timeSec < 10) {
     timeValue += '0';
-    }
-    timeValue += timeSec.toFixed(0);
+  }
+  timeValue += timeSec.toFixed(0);
 
-    return timeValue;
+  return timeValue;
 }
\ No newline at end of file
diff --git a/src/components/experiment-list/experiment-list-element.js b/src/components/experiment-list/experiment-list-element.js
index 4f4c897..54f8cda 100644
--- a/src/components/experiment-list/experiment-list-element.js
+++ b/src/components/experiment-list/experiment-list-element.js
@@ -30,7 +30,7 @@ export default class ExperimentListElement extends React.Component {
               Timeout:
               {timeDDHHMMSS(exp.configuration.timeout)}
               ({(exp.configuration.timeoutType==='simulation' ? 'simulation' : 'real')} time)
-            </i> 
+            </i>
             <br />
             <i>
               Brain processes: {exp.configuration.brainProcesses}
@@ -41,100 +41,101 @@ export default class ExperimentListElement extends React.Component {
               <i className={{serverIcon: 1}} title='Restricted.'></i>
             </div>
           </div>
-          <div  className='list-entry-buttons list-entry-container center' onClick={()=>{return exp.id === pageState.selected}}>
+          <div  className='list-entry-buttons list-entry-container center' onClick={()=>{
+            return exp.id === pageState.selected
+          }}>
             <div className='btn-group' role='group' >
               {config.canLaunchExperiments && exp.joinableServers.length > 0 &&
               exp.configuration.experimentFile && exp.configuration.bibiConfSr
-              
-              ? <button analytics-on analytics-event='Launch' analytics-category='Experiment' 
-                  onClick={()=>{return pageState.startingExperiment === exp.id }}
+                ? <button analytics-on analytics-event='Launch' analytics-category='Experiment'
+                  onClick={()=>{
+                    return pageState.startingExperiment === exp.id
+                  }}
                   disabled = {pageState.startingExperiment === exp.id || pageState.deletingExperiment}
                   className='btn btn-default' >
-                  <i className='fa fa-plus'></i> Launch 
-              </button>
-              :null}
+                  <i className='fa fa-plus'></i> Launch
+                </button>
+                :null}
 
               {config.canLaunchExperiments && exp.joinableServers.length === 0
-              ?<button className='btn btn-default disabled enable-tooltip'
+                ?<button className='btn btn-default disabled enable-tooltip'
                   title='Sorry, no available servers.'>
                   <i className='fa fa-plus'></i> Launch
-              </button>
-              : null}
+                </button>
+                : null}
 
               {config.canLaunchExperiments && config.brainProcesses > 1 && exp.joinableServers.length > 0 &&
               exp.configuration.experimentFile && exp.configuration.bibiConfSrc
 
-              ? <button className='btn btn-default'>
+                ? <button className='btn btn-default'>
                   <i className='fa fa-plus'></i> Launch in Single Process Mode
-              </button>
-              : null}
+                </button>
+                : null}
 
               {config.canLaunchExperiments && exp.joinableServers.length > 1 &&
                   exp.configuration.experimentFile && exp.configuration.bibiConfSrc
 
-              ? <button analytics-on analytics-event='Launch Multiple Instances'
+                ? <button analytics-on analytics-event='Launch Multiple Instances'
                   className='btn btn-default' >
                   <i className='fa fa-layer-group'></i> Launch Multiple
-              </button>
-              : null}
+                </button>
+                : null}
 
               {/* isPrivateExperiment */}
               {config.canLaunchExperiments
-              ? <button analytics-on analytics-event='Delete' analytics-category='Experiment' 
+                ? <button analytics-on analytics-event='Delete' analytics-category='Experiment'
                   className='btn btn-default'>
                   <i className='fa fa-times'></i> Delete
-              </button>
-              : null}
+                </button>
+                : null}
 
               {/* Records button */}
               {config.canLaunchExperiments
-              ? <button analytics-on analytics-event='ShowRecords' analytics-category='Experiment' canLaunchExp={config.canLaunchExperiments}
+                ? <button analytics-on analytics-event='ShowRecords' analytics-category='Experiment' canLaunchExp={config.canLaunchExperiments}
                   className='btn btn-default'>
                   <i className='fa fa-sign-in'></i> Recordings »
-              </button>
-              : null}
+                </button>
+                : null}
 
               {/* Export button */}
               {config.canLaunchExperiments
-              ?
-              <button analytics-on analytics-event='ExportZip' analytics-category='Experiment' canLaunchExp={config.canLaunchExperiments}
+                ? <button analytics-on analytics-event='ExportZip' analytics-category='Experiment' canLaunchExp={config.canLaunchExperiments}
                   className='btn btn-default'>
                   <i className='fa fa-file-export'></i> Export
-              </button>
-              : null}
+                </button>
+                : null}
 
               {/* Join button */}
               {config.canLaunchExperiments && exp.joinableServers.length > 0
-              ? <button analytics-on analytics-event='Join' analytics-category='Experiment' canLaunchExp={config.canLaunchExperiments} jServerLength={exp.joinableServers.length}
+                ? <button analytics-on analytics-event='Join' analytics-category='Experiment' canLaunchExp={config.canLaunchExperiments} jServerLength={exp.joinableServers.length}
                   className='btn btn-default' >
                   <i className='fa fa-sign-in'></i> Simulations »
-              </button>
-              : null}
+                </button>
+                : null}
 
               {/* Clone button */}
               {config.canCloneExperiments && (!exp.configuration.privateStorage || (exp.configuration.experimentFile && exp.configuration.bibiConfSrc))
-              ? <button analytics-on analytics-event='Clone' analytics-label='Collab'
+                ? <button analytics-on analytics-event='Clone' analytics-label='Collab'
                   analytics-value={exp.id} className='btn btn-default'>
                   <i className='fa fa-pencil-alt'></i> Clone
-              </button>
-              : null
-              }
+                </button>
+                : null}
 
               {/* Files button */}
               {config.canLaunchExperiments
-              ? <button canLaunchExp={config.canLaunchExperiments} analytics-on analytics-event='Explorer'
+                ? <button canLaunchExp={config.canLaunchExperiments} analytics-on analytics-event='Explorer'
                   analytics-label='Collab' expId={exp.id} className='btn btn-default' >
 
                   <i className='fa fa-list-alt'></i> Files
-              </button>
-              : null}
+                </button>
+                : null}
 
               {/* Shared button */}
               {config.canLaunchExperiments
-              ? <button canLaunchExp={config.canLaunchExperiments} expId={exp.id} analytics-on analytics-event='Explorer' className='btn btn-default' analytics-label='Collab'>
+                ? <button canLaunchExp={config.canLaunchExperiments} expId={exp.id} analytics-on analytics-event='Explorer' className='btn btn-default' analytics-label='Collab'>
                   <i className='fas fa-share-alt'></i> Share
-              </button>
-              : null}
+                </button>
+                : null}
             </div>
           </div>
         </div>
diff --git a/src/components/experiment-list/experiment-list.js b/src/components/experiment-list/experiment-list.js
index 2318bc3..36f701e 100644
--- a/src/components/experiment-list/experiment-list.js
+++ b/src/components/experiment-list/experiment-list.js
@@ -13,7 +13,7 @@ export default class ExperimentList extends React.Component {
     super(props);
     this.state = {
       experiments: [],
-      pageState: {},
+      pageState: {}
     };
   }
 
@@ -22,9 +22,10 @@ export default class ExperimentList extends React.Component {
     try {
       const experiments = await ExperimentsService.instance.getExperiments();
       this.setState({
-        experiments: experiments,
+        experiments: experiments
       });
-    } catch (error) {
+    }
+    catch (error) {
       console.error(`Failed to fetch the list of experiments. Error: ${error}`);
     }
   }
@@ -57,12 +58,13 @@ export default class ExperimentList extends React.Component {
         </div>
         <div className='experiment-page-experiments'>
           <ol>
-            {this.state.experiments.map(experiment => 
-              {return (
+            {this.state.experiments.map(experiment => {
+              return (
                 <li key={experiment.id} class='nostyle'>
                   <ExperimentListElement experiment={experiment} pageState={this.state.pageState} />
                 </li>
-              );}
+              );
+            }
             )}
           </ol>
         </div>
-- 
GitLab