From f75a610c7f3bee8f6dc17cb75dd339336811ed00 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 10:56:01 -0400 Subject: [PATCH 1/5] Changed project version to 1.3.4. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48a54d2f..728af279 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.pitt.dbmi causal-web - 1.3.3 + 1.3.4 jar causal-web From 943a883a21ed624b1347aebae751230d0d726363 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 11:11:49 -0400 Subject: [PATCH 2/5] Changed version property. --- src/main/resources/ccd.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/ccd.properties b/src/main/resources/ccd.properties index 306100d6..79f81bb5 100644 --- a/src/main/resources/ccd.properties +++ b/src/main/resources/ccd.properties @@ -44,7 +44,7 @@ ccd.email.admin.sendto=${spring.mail.username} ccd.acct.reg.activ.required=false # LABELS -ccd.app.title=Causal Web v1.3.3 +ccd.app.title=Causal Web v1.3.4 ccd.app.copyright=University of Pittsburgh and Carnegie Mellon University ccd.app.agreement=TERMS AND CONDITIONS \ From af34c993640e3ca26ee561400049c6e6f4cd9c9c Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 11:14:03 -0400 Subject: [PATCH 3/5] Changed version in banner. --- src/main/resources/banner.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt index 05113a83..c51b08e1 100644 --- a/src/main/resources/banner.txt +++ b/src/main/resources/banner.txt @@ -1,7 +1,7 @@ - ██████╗ █████╗ ██╗ ██╗███████╗ █████╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██████╗ ██████╗ -██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗ ███║ ╚════██╗ ╚════██╗ -██║ ███████║██║ ██║███████╗███████║██║ ██║ █╗ ██║█████╗ ██████╔╝ ╚██║ █████╔╝ █████╔╝ -██║ ██╔══██║██║ ██║╚════██║██╔══██║██║ ██║███╗██║██╔══╝ ██╔══██╗ ██║ ╚═══██╗ ██╔═══╝ -╚██████╗██║ ██║╚██████╔╝███████║██║ ██║███████╗ ╚███╔███╔╝███████╗██████╔╝ ██║██╗██████╔╝██╗███████╗ - ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝╚═╝╚═════╝ ╚═╝╚══════╝ + ██████╗ █████╗ ██╗ ██╗███████╗ █████╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██████╗ ██╗ ██╗ +██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗ ███║ ╚════██╗██║ ██║ +██║ ███████║██║ ██║███████╗███████║██║ ██║ █╗ ██║█████╗ ██████╔╝ ╚██║ █████╔╝███████║ +██║ ██╔══██║██║ ██║╚════██║██╔══██║██║ ██║███╗██║██╔══╝ ██╔══██╗ ██║ ╚═══██╗╚════██║ +╚██████╗██║ ██║╚██████╔╝███████║██║ ██║███████╗ ╚███╔███╔╝███████╗██████╔╝ ██║██╗██████╔╝██╗ ██║ + ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝╚═╝╚═════╝ ╚═╝ ╚═╝ From 689e7bac7cab9fee1962d38367cbccf59b63c19c Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 12:33:21 -0400 Subject: [PATCH 4/5] Added logic to show PAG edge descriptions only when the result is GFCI. --- .../ctrl/algo/AlgorithmResultController.java | 1 + .../service/algo/AlgorithmResultService.java | 18 ++++++++++++++++++ .../resources/templates/algorithm/plot.html | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java b/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java index 047b2603..f4f352c5 100644 --- a/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java +++ b/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java @@ -101,6 +101,7 @@ public String showPlot( String username = appUser.getUsername(); List categoryNames = Arrays.asList("Runtime Parameters", "Dataset", "Filters", "FGS Parameters", "Run Options", "Algorithm Parameters", "Data Validations"); model.addAttribute("categories", algorithmResultService.extractDataCategories(fileName, username, categoryNames)); + model.addAttribute("isPag", algorithmResultService.isPagResult(fileName, username)); return PLOT_VIEW; } diff --git a/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java b/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java index 426cbc35..fa225f3e 100644 --- a/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java +++ b/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java @@ -35,6 +35,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Scanner; import java.util.Set; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -172,6 +173,23 @@ public List listResultFileInfo(final String username) { return Arrays.asList(array); } + public boolean isPagResult(final String fileName, final String username) { + boolean isPag = false; + + Path file = Paths.get(workspace, username, resultFolder, algorithmResultFolder, fileName); + try (Scanner scanner = new Scanner(Files.newBufferedReader(file))) { + scanner.nextLine(); // skip the first line + String line = scanner.nextLine(); + if (line != null) { + isPag = line.trim().contains("GFCI"); + } + } catch (IOException exception) { + LOGGER.error(String.format("Unable to read file '%s'.", fileName), exception); + } + + return isPag; + } + public Map> extractDataCategories(final String fileName, final String username, final List categoryNames) { Map> info = new LinkedHashMap<>(); categoryNames.forEach(key -> { diff --git a/src/main/resources/templates/algorithm/plot.html b/src/main/resources/templates/algorithm/plot.html index 5da586f1..b4ee082c 100644 --- a/src/main/resources/templates/algorithm/plot.html +++ b/src/main/resources/templates/algorithm/plot.html @@ -41,7 +41,7 @@