Add hour when the value was taken on index page
This commit is contained in:
parent
049734f8a3
commit
bd957fd394
|
|
@ -13,6 +13,7 @@ type SensorPrint struct {
|
|||
Name string
|
||||
Value string
|
||||
Unit string
|
||||
Horodate string
|
||||
}
|
||||
|
||||
type MainController struct {
|
||||
|
|
@ -40,6 +41,8 @@ func getLastTemps() ([]SensorPrint) {
|
|||
sens.Value = strconv.FormatInt(t.Value, 10)
|
||||
sens.Unit = "°C"
|
||||
|
||||
sens.Horodate = t.HorodateGMT.Format("04h05")
|
||||
|
||||
values = append(values, *sens)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<p>{{$val.Value}} {{$val.Unit}}</p>
|
||||
<p><strong>{{$val.Horodate}} :</strong> {{$val.Value}} {{$val.Unit}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue