GUAC-587: Serve JavaScript and CSS through app.js and app.css respectively.

This commit is contained in:
Michael Jumper
2015-05-09 23:58:36 -07:00
parent a92d51f166
commit 9419356433
2 changed files with 8 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ import com.google.inject.matcher.Matchers;
import com.google.inject.servlet.ServletModule;
import com.sun.jersey.guice.spi.container.servlet.GuiceContainer;
import org.codehaus.jackson.jaxrs.JacksonJsonProvider;
import org.glyptodon.guacamole.net.basic.resource.ResourceServlet;
import org.glyptodon.guacamole.net.basic.resource.WebApplicationResource;
import org.glyptodon.guacamole.net.basic.rest.auth.TokenRESTService;
import org.glyptodon.guacamole.net.basic.rest.clipboard.ClipboardRESTService;
import org.glyptodon.guacamole.net.basic.rest.connection.ConnectionRESTService;
@@ -71,6 +73,10 @@ public class RESTServletModule extends ServletModule {
bind(JacksonJsonProvider.class).in(Scopes.SINGLETON);
serve("/api/*").with(GuiceContainer.class);
// TODO: Pull these from extensions, dynamically concatenated
serve("/app.js").with(new ResourceServlet(new WebApplicationResource(getServletContext(), "/guacamole.min.js")));
serve("/app.css").with(new ResourceServlet(new WebApplicationResource(getServletContext(), "/guacamole.min.css")));
}
}

View File

@@ -8,7 +8,7 @@
<link rel="icon" type="image/png" href="images/guacamole-logo-64.png"/>
<link rel="icon" type="image/png" sizes="144x144" href="images/guacamole-logo-144.png"/>
<link rel="apple-touch-icon" type="image/png" href="images/guacamole-logo-144.png"/>
<link rel="stylesheet" type="text/css" href="guacamole.min.css">
<link rel="stylesheet" type="text/css" href="app.css">
<title ng-bind="page.title | translate"></title>
</head>
<!--
@@ -52,6 +52,6 @@
<!-- Login screen for logged-out users -->
<guac-login ng-show="expectedCredentials" form="expectedCredentials"></guac-login>
<script type="text/javascript" src="guacamole.min.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>
</html>