Added nodata_problem_seconds to datapoint view
This commit is contained in:
parent
aa9376ac13
commit
a94559ab6c
4 changed files with 12 additions and 7 deletions
13
datapoint.go
13
datapoint.go
|
|
@ -161,6 +161,7 @@ func DatapointsRetrieve() (dps []Datapoint, err error) { // {{{
|
|||
dp.datatype,
|
||||
dp.last_value,
|
||||
dp.group,
|
||||
dp.nodata_problem_seconds,
|
||||
|
||||
dpv.id AS v_id,
|
||||
dpv.ts,
|
||||
|
|
@ -185,11 +186,12 @@ func DatapointsRetrieve() (dps []Datapoint, err error) { // {{{
|
|||
defer rows.Close()
|
||||
|
||||
type DbRes struct {
|
||||
ID int
|
||||
Group string
|
||||
Name string
|
||||
Datatype DatapointType
|
||||
LastValue time.Time `db:"last_value"`
|
||||
ID int
|
||||
Group string
|
||||
Name string
|
||||
Datatype DatapointType
|
||||
LastValue time.Time `db:"last_value"`
|
||||
NodataProblemSeconds int `db:"nodata_problem_seconds"`
|
||||
|
||||
VID sql.NullInt64 `db:"v_id"`
|
||||
Ts sql.NullTime
|
||||
|
|
@ -214,6 +216,7 @@ func DatapointsRetrieve() (dps []Datapoint, err error) { // {{{
|
|||
dp.Datatype = res.Datatype
|
||||
dp.LastValue = res.LastValue
|
||||
dp.Found = true
|
||||
dp.NodataProblemSeconds = res.NodataProblemSeconds
|
||||
|
||||
if res.VID.Valid {
|
||||
dpv.ID = int(res.VID.Int64)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue