diff --git a/docker/README.md b/docker/README.md index 8693aad09f765b12de66b77c37f700563fa4eec7..36a3e1245c7b0ffce433854dc7b7678f8644bd3f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -24,7 +24,7 @@ To use this image, you need a running instance of PostgreSQL and to configure th ### EXTERNAL SERVICES ### -* MIPENGINE_URL: URL to MIPENGINE server. Default is "http://localhost:5000" . +* MIPENGINE_URL: URL to MIPENGINE server. Default is "http://192.168.124.129:5000" . * EXAREME_URL: URL to Exareme server. Default is "http://localhost:9090" . diff --git a/docker/config/application.tmpl b/docker/config/application.tmpl index 0913c99e7108fbc75da217f04e62d2e2e28bb246..6059a902be06193d8a57c3c72f5c820d66e1b7ff 100644 --- a/docker/config/application.tmpl +++ b/docker/config/application.tmpl @@ -35,7 +35,7 @@ spring: ### EXTERNAL SERVICES ### services: mipengine: - algorithmsUrl: {{ default .Env.MIPENGINE_URL "http://localhost:5000" }}/algorithms + algorithmsUrl: {{ default .Env.MIPENGINE_URL "http://192.168.124.129:5000" }}/algorithms exareme: queryExaremeUrl: {{ default .Env.EXAREME_URL "http://localhost:9090" }}/mining/query diff --git a/src/main/java/eu/hbp/mip/controllers/AlgorithmsAPI.java b/src/main/java/eu/hbp/mip/controllers/AlgorithmsAPI.java index 1ca68f13be10b5814b5f9d0860be79295f0023e1..68eb313401323f94d237374bf5aacbbfb4971a8f 100644 --- a/src/main/java/eu/hbp/mip/controllers/AlgorithmsAPI.java +++ b/src/main/java/eu/hbp/mip/controllers/AlgorithmsAPI.java @@ -68,7 +68,7 @@ public class AlgorithmsAPI { public ResponseEntity<List<AlgorithmDTO>> getAlgorithms() { Logger logger = new Logger(activeUserService.getActiveUser().getUsername(), "(GET) /algorithms"); -// logger.LogUserAction("Executing..."); + logger.LogUserAction("Executing..."); LinkedList<AlgorithmDTO> mipengineAlgorithms = getMIPEngineAlgorithms(logger); logger.LogUserAction("Loaded " + mipengineAlgorithms.size() + " mipengine algorithms"); LinkedList<AlgorithmDTO> exaremeAlgorithms = getExaremeAlgorithms(logger); @@ -78,7 +78,7 @@ public class AlgorithmsAPI { LinkedList<AlgorithmDTO> algorithms = new LinkedList<>(); if (exaremeAlgorithms != null) { -// algorithms.addAll(exaremeAlgorithms); + algorithms.addAll(exaremeAlgorithms); } else { logger.LogUserAction("Getting exareme algorithms failed and returned null"); } @@ -242,4 +242,4 @@ public class AlgorithmsAPI { }.getType() ); } -} +} \ No newline at end of file diff --git a/src/main/java/eu/hbp/mip/models/DTOs/MIPEngineAlgorithmDTO.java b/src/main/java/eu/hbp/mip/models/DTOs/MIPEngineAlgorithmDTO.java index 4400ff9e7fbf6124b9667646dd33b831eb467077..f253bab6d76e156a34a59947108bb0d8866b8662 100644 --- a/src/main/java/eu/hbp/mip/models/DTOs/MIPEngineAlgorithmDTO.java +++ b/src/main/java/eu/hbp/mip/models/DTOs/MIPEngineAlgorithmDTO.java @@ -5,6 +5,7 @@ import lombok.Getter; import lombok.Setter; import java.util.ArrayList; +import java.util.Arrays; import java.util.Hashtable; import java.util.List; @@ -62,10 +63,16 @@ public class MIPEngineAlgorithmDTO { AlgorithmDTO.AlgorithmParamDTO algorithmParamDTO = new AlgorithmDTO.AlgorithmParamDTO(); algorithmParamDTO.setName(name); algorithmParamDTO.setDesc(this.desc); - algorithmParamDTO.setLabel(this.label); - if(name.equals("datasets") || name.equals("filter") || name.equals("pathology")){ - algorithmParamDTO.setType(name.equals("datasets")? "dataset":name); + if(name.equals("datasets") || name.equals("filters") || name.equals("pathology")){ algorithmParamDTO.setValueType(this.types.get(0)); + if(name.equals("filters")){ + algorithmParamDTO.setName("filter"); + algorithmParamDTO.setType("filter"); + } + if(name.equals("datasets")){ + algorithmParamDTO.setName("dataset"); + algorithmParamDTO.setType("dataset"); + } } else{ algorithmParamDTO.setType("column"); @@ -75,6 +82,9 @@ public class MIPEngineAlgorithmDTO { algorithmParamDTO.setValue(""); algorithmParamDTO.setValueNotBlank(this.notblank); algorithmParamDTO.setValueMultiple(this.multiple); + String[] hidden = {"x","y","dataset", "filter","pathology","centers","formula"}; + algorithmParamDTO.setLabel(Arrays.asList(hidden).contains(algorithmParamDTO.getName()) ? algorithmParamDTO.getName():this.label); + return algorithmParamDTO; } private String getColumnValuesIsCategorical(List<String> stattypes) throws Exception { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 66067110814b5f2646393bdf82096f49a629aa10..8aadac388979fa2c7af445fa88c1f697fb8fed22 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,7 +11,7 @@ logging: ### AUTHENTICATION ### authentication: - enabled: true + enabled: false ### DATABASE CONFIGURATION ### @@ -35,7 +35,7 @@ spring: ### EXTERNAL SERVICES ### services: mipengine: - algorithmsUrl: "http://127.0.0.1:5000/algorithms" + algorithmsUrl: "http://192.168.124.129:5000/algorithms" exareme: queryExaremeUrl: "http://127.0.0.1:9090/mining/query" algorithmsUrl: "http://127.0.0.1:9090/mining/algorithms.json"