Skip to content
Snippets Groups Projects
Commit 9606ee4d authored by kfilippopolitis's avatar kfilippopolitis
Browse files

Proper url for mip engine

parent e4ee5ade
No related branches found
No related tags found
1 merge request!23Dev/mip 62/mip engine integration with the mip portalbackend
......@@ -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" .
......
......@@ -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
......
......@@ -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
......@@ -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 {
......
......@@ -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"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment