Skip to content

Commit 2fcc09e

Browse files
committed
Controller changes to support generic Git URLs
1 parent 75174c5 commit 2fcc09e

File tree

2 files changed

+182
-89
lines changed

2 files changed

+182
-89
lines changed

src/main/java/org/commonwl/view/workflow/Workflow.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,20 @@ public void setGitRepoPath(String gitRepoPath) {
211211
// Include links to related resources
212212

213213
public String getVisualisationXdot() {
214-
return "/graph/xdot/" + retrievedFrom.getUrl().replace("https://", "");
214+
return retrievedFrom.getInternalUrl().replaceFirst("/workflows", "/graph/xdot");
215215
}
216216

217217
public String getVisualisationPng() {
218-
return "/graph/png/" + retrievedFrom.getUrl().replace("https://", "");
218+
return retrievedFrom.getInternalUrl().replaceFirst("/workflows", "/graph/png");
219219
}
220220

221221
public String getVisualisationSvg() {
222-
return "/graph/svg/" + retrievedFrom.getUrl().replace("https://", "");
222+
return retrievedFrom.getInternalUrl().replaceFirst("/workflows", "/graph/svg");
223223
}
224224

225225
public String getROBundle() {
226226
if (roBundlePath != null) {
227-
return "/robundle/" + retrievedFrom.getUrl().replace("https://", "");
227+
return retrievedFrom.getInternalUrl().replaceFirst("/workflows", "/robundle");
228228
} else {
229229
return null;
230230
}

0 commit comments

Comments
 (0)