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
|
@()
@led(condition: String) = @{
"images/leds/" + (condition match {
case "error" => "red-on.svg"
case "warn" => "yellow-on.svg"
case "good" => "green-on.svg"
case "unknown" => "none.svg"
case _ => "a"
})
}
@instrument(name: String, condition: String, status: String) = {
<tr>
<td>@name</td>
<td>
<img src="@routes.Assets.at(led(condition))" alt="@condition" width="15px">
</td>
<td>
<span class="status @condition">
@status
</span>
</td>
</tr>
}
<!-- <table class="control-table">
@instrument("engine1", "unknown", "0 rpm")
@instrument("engine2", "unknown", "1000 rpm")
@instrument("engine3", "unknown", "2080 rpm")
@instrument("engine4", "unknown", "1000 rpm")
@instrument("battery", "unknown", "3000Wh")
@instrument("power", "unknown", "2000W")
</table -->
|