aboutsummaryrefslogtreecommitdiff
path: root/vfd-backend/app/views/uav.scala.html
blob: 0ce7927467ca4e4e571190e353eb364e1efec547 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@(socket: String, remoteSystemId: Byte, systemId: Byte, componentId: Byte)

@main("Main", "Remote System " + remoteSystemId){

	<div id="scalajsError" class="alert alert-danger" style="display: none;">
		<p><strong><i class="fa fa-bug"></i> Error! </strong> An uncaught exception occurred in the browser application,
		any information displayed on this website may be corrupt. This is NOT an error that should occur under normal
		operation, it is an indication of a bug in the software.</p>
		<p>The error was: "<span id="scalajsErrorMessage"></span>"
		</p>
	</div>

	<div
		id="app"
		data-socketUrl="@socket"
		data-remoteSystemId="@remoteSystemId.toString"
		data-systemId="@systemId.toString"
		data-componentId="@componentId.toString">
		<div class="loader">
			<i class="fa fa-spinner fa-spin"></i>
		</div>
	</div>

	<script type="text/javascript">
		window.onload = function () {
			try {
				var launcher = new Launcher('app', '@routes.Assets.at("")');
				launcher.main();
			} catch(err) {
				document.getElementById("scalajsError").style.display = "block";
				document.getElementById("scalajsErrorMessage").innerHTML = err;
				console.error(err)
			}
		}
	</script>
}