From 9f4bfdffd5e931ab5679bfa6c6f12c8972724111 Mon Sep 17 00:00:00 2001
From: Sandro Weber <webers@in.tum.de>
Date: Mon, 19 Sep 2022 11:59:44 +0200
Subject: [PATCH] WIP

---
 .../experiment-tools-service.js                    | 14 +++++++-------
 .../leave-workbench-dialog.css                     |  2 +-
 .../simulation-view/simulation-tools-service.js    | 14 +++++++-------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/components/experiment-workbench/experiment-tools-service.js b/src/components/experiment-workbench/experiment-tools-service.js
index 1d16e53..1f0f9b5 100644
--- a/src/components/experiment-workbench/experiment-tools-service.js
+++ b/src/components/experiment-workbench/experiment-tools-service.js
@@ -7,22 +7,22 @@ const SINGLETON_ENFORCER = Symbol();
 /**
  * Service handling server resources for simulating experiments.
  */
-class SimulationToolsService {
+class ExperimentToolsService {
   constructor(enforcer) {
     if (enforcer !== SINGLETON_ENFORCER) {
       throw new Error('Use ' + this.constructor.name + '.instance');
     }
 
     this.tools = new Map();
-    for (const toolEntry in SimulationToolsService.TOOLS) {
-      this.registerToolConfig(SimulationToolsService.TOOLS[toolEntry]);
+    for (const toolEntry in ExperimentToolsService.TOOLS) {
+      this.registerToolConfig(ExperimentToolsService.TOOLS[toolEntry]);
     }
     this.registerToolConfig(NrpCoreDashboard.CONSTANTS.TOOL_CONFIG);
   }
 
   static get instance() {
     if (_instance == null) {
-      _instance = new SimulationToolsService(SINGLETON_ENFORCER);
+      _instance = new ExperimentToolsService(SINGLETON_ENFORCER);
     }
 
     return _instance;
@@ -62,7 +62,7 @@ class SimulationToolsService {
   }
 }
 
-SimulationToolsService.TOOLS = Object.freeze({
+ExperimentToolsService.TOOLS = Object.freeze({
   NEST_DESKTOP: {
     singleton: true,
     flexlayoutNode: {
@@ -99,11 +99,11 @@ SimulationToolsService.TOOLS = Object.freeze({
   }
 });
 
-SimulationToolsService.CONSTANTS = Object.freeze({
+ExperimentToolsService.CONSTANTS = Object.freeze({
   CATEGORY: {
     EXTERNAL_IFRAME: 'EXTERNAL_IFRAME',
     REACT_COMPONENT: 'REACT_COMPONENT'
   }
 });
 
-export default SimulationToolsService;
+export default ExperimentToolsService;
diff --git a/src/components/experiment-workbench/leave-workbench-dialog.css b/src/components/experiment-workbench/leave-workbench-dialog.css
index 17673ce..d77aa47 100644
--- a/src/components/experiment-workbench/leave-workbench-dialog.css
+++ b/src/components/experiment-workbench/leave-workbench-dialog.css
@@ -1,4 +1,4 @@
-.leave-simulation-dialog-header {
+.leave-workbench-dialog-header {
   color: black;
   background-color: white;
 }
\ No newline at end of file
diff --git a/src/components/simulation-view/simulation-tools-service.js b/src/components/simulation-view/simulation-tools-service.js
index 1f0f9b5..1d16e53 100644
--- a/src/components/simulation-view/simulation-tools-service.js
+++ b/src/components/simulation-view/simulation-tools-service.js
@@ -7,22 +7,22 @@ const SINGLETON_ENFORCER = Symbol();
 /**
  * Service handling server resources for simulating experiments.
  */
-class ExperimentToolsService {
+class SimulationToolsService {
   constructor(enforcer) {
     if (enforcer !== SINGLETON_ENFORCER) {
       throw new Error('Use ' + this.constructor.name + '.instance');
     }
 
     this.tools = new Map();
-    for (const toolEntry in ExperimentToolsService.TOOLS) {
-      this.registerToolConfig(ExperimentToolsService.TOOLS[toolEntry]);
+    for (const toolEntry in SimulationToolsService.TOOLS) {
+      this.registerToolConfig(SimulationToolsService.TOOLS[toolEntry]);
     }
     this.registerToolConfig(NrpCoreDashboard.CONSTANTS.TOOL_CONFIG);
   }
 
   static get instance() {
     if (_instance == null) {
-      _instance = new ExperimentToolsService(SINGLETON_ENFORCER);
+      _instance = new SimulationToolsService(SINGLETON_ENFORCER);
     }
 
     return _instance;
@@ -62,7 +62,7 @@ class ExperimentToolsService {
   }
 }
 
-ExperimentToolsService.TOOLS = Object.freeze({
+SimulationToolsService.TOOLS = Object.freeze({
   NEST_DESKTOP: {
     singleton: true,
     flexlayoutNode: {
@@ -99,11 +99,11 @@ ExperimentToolsService.TOOLS = Object.freeze({
   }
 });
 
-ExperimentToolsService.CONSTANTS = Object.freeze({
+SimulationToolsService.CONSTANTS = Object.freeze({
   CATEGORY: {
     EXTERNAL_IFRAME: 'EXTERNAL_IFRAME',
     REACT_COMPONENT: 'REACT_COMPONENT'
   }
 });
 
-export default ExperimentToolsService;
+export default SimulationToolsService;
-- 
GitLab