Add Current endpoint
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
016cda5beb
commit
f78cd5e614
5
main.go
5
main.go
|
@ -52,7 +52,8 @@ func runHttpServer() {
|
||||||
w.Write([]byte("Doing "+lastEvent.Name+" since "+lastEvent.EventTimestamp.Format(time.RFC3339)+"<br>"))
|
w.Write([]byte("Doing "+lastEvent.Name+" since "+lastEvent.EventTimestamp.Format(time.RFC3339)+"<br>"))
|
||||||
w.Write([]byte("<h3>Today</h3>"))
|
w.Write([]byte("<h3>Today</h3>"))
|
||||||
for tag, _ := range currentState {
|
for tag, _ := range currentState {
|
||||||
i := currentState[tag][time.Now().Format("02.01.06")]
|
i := currentState[tag][time.Now().Format("02.01.06")
|
||||||
|
i = i / 60
|
||||||
s := strconv.FormatInt(i, 10)
|
s := strconv.FormatInt(i, 10)
|
||||||
line := tag+": "+s+"<br>"
|
line := tag+": "+s+"<br>"
|
||||||
w.Write([]byte(line))
|
w.Write([]byte(line))
|
||||||
|
@ -66,7 +67,7 @@ func runHttpServer() {
|
||||||
secounds := currentState[tag][t.Format("02.01.06")]
|
secounds := currentState[tag][t.Format("02.01.06")]
|
||||||
gi = gi + secounds
|
gi = gi + secounds
|
||||||
}
|
}
|
||||||
|
gi = gi / 60
|
||||||
s := strconv.FormatInt(gi, 10)
|
s := strconv.FormatInt(gi, 10)
|
||||||
line := tag+": "+s+"<br>"
|
line := tag+": "+s+"<br>"
|
||||||
w.Write([]byte(line))
|
w.Write([]byte(line))
|
||||||
|
|
Loading…
Reference in New Issue