diff options
Diffstat (limited to 'cmd/monfront/main.go')
-rw-r--r-- | cmd/monfront/main.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go index e128ed6..b20688e 100644 --- a/cmd/monfront/main.go +++ b/cmd/monfront/main.go @@ -43,7 +43,6 @@ type ( CheckID int64 MappingId int State int - Notify bool Enabled bool Notice sql.NullString NextTime time.Time @@ -175,7 +174,7 @@ func showChecks(w http.ResponseWriter, r *http.Request) { checks := []check{} for rows.Next() { c := check{} - err := rows.Scan(&c.CheckID, &c.NodeName, &c.CommandName, &c.MappingId, &c.State, &c.Notify, &c.Enabled, &c.Notice, &c.NextTime, &c.Msg) + err := rows.Scan(&c.CheckID, &c.NodeName, &c.CommandName, &c.MappingId, &c.State, &c.Enabled, &c.Notice, &c.NextTime, &c.Msg) if err != nil { w.WriteHeader(http.StatusInternalServerError) w.Write([]byte("problems with the database")) @@ -291,14 +290,14 @@ func loadMappings(c *Context) error { var ( SQLShowMappings = `select mapping_id, target, title, color from mapping_level` - SQLShowChecks = `select c.id, n.name, co.name, ac.mapping_id, ac.states[1] as state, ac.notify, + SQLShowChecks = `select c.id, n.name, co.name, ac.mapping_id, ac.states[1] as state, ac.enabled, ac.notice, ac.next_time, ac.msg from active_checks ac join checks c on ac.check_id = c.id join nodes n on c.node_id = n.id join commands co on c.command_id = co.id order by n.name, co.name;` - SQLShowUnhandledChecks = `select c.id, n.name, co.name, ac.mapping_id, ac.states[1] as state, ac.notify, + SQLShowUnhandledChecks = `select c.id, n.name, co.name, ac.mapping_id, ac.states[1] as state, ac.enabled, ac.notice, ac.next_time, ac.msg from active_checks ac join checks c on ac.check_id = c.id |