Skip to content

Commit

Permalink
10584 fix tutorials (#10614)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

---------

Co-authored-by: Ino de Bruijn <[email protected]>
  • Loading branch information
uklineale and inodb authored Feb 9, 2024
1 parent 1ca2687 commit 994f846
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions src/main/java/org/cbioportal/WebAppConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.cbioportal;

import java.util.List;

import org.cbioportal.web.util.InvolvedCancerStudyExtractorInterceptor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -33,9 +35,32 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/api", swaggerRedirectUrl);
registry.addRedirectViewController("/installations", "https://installationmap.netlify.app/");
registry.addRedirectViewController("/tutorials", "https://docs.cbioportal.org/user-guide/overview/#tutorial-slides");
registry.addRedirectViewController("/oql", "https://docs.cbioportal.org/user-guide/oql/");

List<String> endpoints = List.of(
"/results/*",
"/results**",
"/patient/*",
"/patient**",
"/study/*",
"/study",
"/mutation_mapper/*",
"/mutation_mapper",
"/index.do/*",
"/case.do/*",
"/loading/*",
"/comparison",
"/comparison/*",
"/restore",
"/index.do**",
"/oncoprinter**",
"/encodedRedirect",
"/datasets**",
"/ln**"
);

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

@Bean
Expand Down

0 comments on commit 994f846

Please sign in to comment.