Skip to content

Commit 994f846

Browse files
uklinealeinodb
andauthored
10584 fix tutorials (cBioPortal#10614)
* rebase master * tutorials route is handled by frontend now * remove unused var * go back to old routes, add tutorial redirect * Add oql route Co-authored-by: Ino de Bruijn <ino@ino.bio> --------- Co-authored-by: Ino de Bruijn <ino@ino.bio>
1 parent 1ca2687 commit 994f846

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

src/main/java/org/cbioportal/WebAppConfig.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.cbioportal;
22

3+
import java.util.List;
4+
35
import org.cbioportal.web.util.InvolvedCancerStudyExtractorInterceptor;
46
import org.springframework.beans.factory.annotation.Value;
57
import org.springframework.context.annotation.Bean;
@@ -33,9 +35,32 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
3335
public void addViewControllers(ViewControllerRegistry registry) {
3436
registry.addRedirectViewController("/api", swaggerRedirectUrl);
3537
registry.addRedirectViewController("/installations", "https://installationmap.netlify.app/");
38+
registry.addRedirectViewController("/tutorials", "https://docs.cbioportal.org/user-guide/overview/#tutorial-slides");
39+
registry.addRedirectViewController("/oql", "https://docs.cbioportal.org/user-guide/oql/");
40+
41+
List<String> endpoints = List.of(
42+
"/results/*",
43+
"/results**",
44+
"/patient/*",
45+
"/patient**",
46+
"/study/*",
47+
"/study",
48+
"/mutation_mapper/*",
49+
"/mutation_mapper",
50+
"/index.do/*",
51+
"/case.do/*",
52+
"/loading/*",
53+
"/comparison",
54+
"/comparison/*",
55+
"/restore",
56+
"/index.do**",
57+
"/oncoprinter**",
58+
"/encodedRedirect",
59+
"/datasets**",
60+
"/ln**"
61+
);
3662

37-
// Redirects anything that doesn't start with /api or /proxy to the Javascript frontend
38-
registry.addViewController("/{path:^(?!api|proxy$).*$}").setViewName(SINGLE_PAGE_APP_ROOT);
63+
endpoints.forEach( route -> registry.addViewController(route).setViewName(SINGLE_PAGE_APP_ROOT));
3964
}
4065

4166
@Bean

0 commit comments

Comments
 (0)