Serve PolyGerrit static paths
PolyGerrit is a purely static web app. This means all UI-related endpoints just serve static content. In the developer case, the mapping looks like: / => polygerrit-ui/app/index.html /bower_components/* => polygerrit-ui/bower_components/* /* => polygerrit-ui/app/* In addition, PolyGerrit uses the HTML5 history API, which among other things replaces fragments used by GWT (#/c/1234) with actual paths (/c/1234). This means all paths formerly dispatched in Dispatcher.java have to be served as app/index.html, except for a few that are currently overlapping with the REST API (/projects and /groups/). We are still using PolyGerrit's native build system, which means the build steps in README.md need to be run on setup and any time dependencies change. This is the step that is responsible for setting up polygerrit-ui/bower_components/. In the compiled WAR case, lots of minification and inlining happens, so we just need to serve static content out of /polygerrit_ui/* in the WAR file. Note that WAR file integration is not implemented yet, since a) we need to tweak the buck build to allow this, and b) we need to do license auditing before inlining a bunch of code into the UI. Change-Id: I9d000f6fa1ae75e966593c174f43c9f366f7dcff
This commit is contained in:
@@ -322,7 +322,8 @@ public class WebAppInitializer extends GuiceServletContextListener
|
||||
modules.add(new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(GerritOptions.class).toInstance(new GerritOptions(false, false));
|
||||
bind(GerritOptions.class)
|
||||
.toInstance(new GerritOptions(config, false, false));
|
||||
}
|
||||
});
|
||||
modules.add(new GarbageCollectionModule());
|
||||
|
Reference in New Issue
Block a user