value shall be string
This commit is contained in:
parent
64dba890dd
commit
553648e10d
@ -3,6 +3,7 @@ package tsmq
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
"strconv"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"tsm/config"
|
"tsm/config"
|
||||||
@ -14,7 +15,7 @@ import (
|
|||||||
type variable_t struct {
|
type variable_t struct {
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
Variable string `json:"variable"`
|
Variable string `json:"variable"`
|
||||||
Value float64 `json:"value"`
|
Value string `json:"value"`
|
||||||
Unit string `json:"unit"`
|
Unit string `json:"unit"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
}
|
}
|
||||||
@ -51,7 +52,7 @@ func Start() {
|
|||||||
v := variable_t {
|
v := variable_t {
|
||||||
Label: label,
|
Label: label,
|
||||||
Variable: "",
|
Variable: "",
|
||||||
Value: value,
|
Value: strconv.FormatFloat(value, 'f', 4, 64)
|
||||||
Unit: "ms",
|
Unit: "ms",
|
||||||
Status: status,
|
Status: status,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user