aboutsummaryrefslogtreecommitdiff
path: root/mavigator-server
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-02-04 00:36:03 -0800
committerJakob Odersky <jakob@odersky.com>2016-02-04 00:36:03 -0800
commitc8c6a1081c3412a7cda4046ef4b88471b446ebf6 (patch)
treedba23d0b2e8fb880e198b00f9a9b72535c71e380 /mavigator-server
parent3acbe7f93b89c87373d222b20de218d60e328d24 (diff)
downloadmavigator-c8c6a1081c3412a7cda4046ef4b88471b446ebf6.tar.gz
mavigator-c8c6a1081c3412a7cda4046ef4b88471b446ebf6.tar.bz2
mavigator-c8c6a1081c3412a7cda4046ef4b88471b446ebf6.zip
Support multiple ScalaJs apps
Diffstat (limited to 'mavigator-server')
-rw-r--r--mavigator-server/src/main/scala/mavigator/Router.scala1
-rw-r--r--mavigator-server/src/main/twirl/mavigator/views/app.scala.html4
-rw-r--r--mavigator-server/src/main/twirl/mavigator/views/dashboard.scala.html2
3 files changed, 3 insertions, 4 deletions
diff --git a/mavigator-server/src/main/scala/mavigator/Router.scala b/mavigator-server/src/main/scala/mavigator/Router.scala
index 561b096..1d2107a 100644
--- a/mavigator-server/src/main/scala/mavigator/Router.scala
+++ b/mavigator-server/src/main/scala/mavigator/Router.scala
@@ -25,7 +25,6 @@ object Router {
def twirlMarshaller[A <: AnyRef: Manifest](contentType: MediaType): ToEntityMarshaller[A] =
Marshaller.StringMarshaller.wrap(contentType)(_.toString)
-
import Directives._
def route(implicit system: ActorSystem): Route = (
diff --git a/mavigator-server/src/main/twirl/mavigator/views/app.scala.html b/mavigator-server/src/main/twirl/mavigator/views/app.scala.html
index 7b935b3..6985e01 100644
--- a/mavigator-server/src/main/twirl/mavigator/views/app.scala.html
+++ b/mavigator-server/src/main/twirl/mavigator/views/app.scala.html
@@ -28,7 +28,7 @@
root0.removeChild(root0.firstChild);
}
- Main().start({
+ @{appId}().start({
root: root0,
assetsBase: "/assets",
args: args0
@@ -43,5 +43,5 @@
});
</script>
-<script type="text/javascript" src="/assets/js/@{appId}-opt.js"></script>
+<script type="text/javascript" src="/assets/js/mavigator-dashboard-opt.js"></script>
diff --git a/mavigator-server/src/main/twirl/mavigator/views/dashboard.scala.html b/mavigator-server/src/main/twirl/mavigator/views/dashboard.scala.html
index addd4d5..2b08797 100644
--- a/mavigator-server/src/main/twirl/mavigator/views/dashboard.scala.html
+++ b/mavigator-server/src/main/twirl/mavigator/views/dashboard.scala.html
@@ -1,7 +1,7 @@
@(socket: String, remoteSystemId: Byte, systemId: Byte, componentId: Byte)
@main("Main"){
- @app("mavigator-dashboard")(
+ @app("mavigator_dashboard_Main")(
"socketUrl" -> socket,
"remoteSystemId" -> remoteSystemId.toString,
"systemId" -> systemId.toString,