Skip to content

Commit e933d6c

Browse files
author
Mark Robinson
committed
Disable transparency on png
1 parent fe1942b commit e933d6c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/main/java/org/commonwl/viewer/services/DotWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void writeGraph(Workflow workflow) throws IOException {
5757

5858
// Overall graph style
5959
writeLine(" graph [");
60-
writeLine(" bgcolor = \"transparent\"");
60+
writeLine(" bgcolor = \"#eeeeee\"");
6161
writeLine(" color = \"black\"");
6262
writeLine(" fontsize = \"10\"");
6363
writeLine(" labeljust = \"left\"");

src/main/java/org/commonwl/viewer/services/WorkflowRepository.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public interface WorkflowRepository extends PagingAndSortingRepository<Workflow,
3333
// Finds a workflow model in the database based on where it was retrieved from
3434
Workflow findByRetrievedFrom(GithubDetails retrievedFrom);
3535

36-
// Get the first 10 workflows
3736
Page<Workflow> findAllByOrderByRetrievedOnDesc(Pageable pageable);
3837

3938
}

src/main/java/org/commonwl/viewer/web/WorkflowController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ public ModelAndView newWorkflowFromGithubURL(@Valid WorkflowForm workflowForm, B
137137
* @return The workflow view with the workflow as a model
138138
*/
139139
@RequestMapping(value="/workflows/github.com/{owner}/{repoName}/tree/{branch}/**")
140-
public ModelAndView getWorkflowByGithubDetails(@PathVariable("owner") String owner,
140+
public ModelAndView getWorkflowByGithubDetails(@Value("${applicationURL}") String applicationURL,
141+
@PathVariable("owner") String owner,
141142
@PathVariable("repoName") String repoName,
142143
@PathVariable("branch") String branch,
143144
HttpServletRequest request) {
@@ -181,7 +182,7 @@ public ModelAndView getWorkflowByGithubDetails(@PathVariable("owner") String own
181182
}
182183

183184
// Display this model along with the view
184-
return new ModelAndView("workflow", "workflow", workflowModel);
185+
return new ModelAndView("workflow", "workflow", workflowModel).addObject("appURL", applicationURL);
185186

186187
}
187188

@@ -239,7 +240,8 @@ public FileSystemResource getGraphAsSvg(@Value("${graphvizStorage}") String grap
239240
gv.decreaseDpi();
240241
gv.decreaseDpi();
241242
gv.decreaseDpi();
242-
gv.writeGraphToFile(gv.getGraph(workflowModel.getDotGraph(), "svg", "dot"), out.getAbsolutePath());
243+
gv.writeGraphToFile(gv.getGraph(workflowModel.getDotGraph()
244+
.replace("bgcolor = \"#eeeeee\"", "bgcolor = \"transparent\""), "svg", "dot"), out.getAbsolutePath());
243245
}
244246

245247
// Output the graph image

0 commit comments

Comments
 (0)