diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-12 14:06:16 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-12 14:06:16 +0100 |
commit | e151f056ad5980d259cdc0c034176135e20c346e (patch) | |
tree | 6f8dda96e0cc589f3c1ff40daa6c6f27229cf39a /cmd | |
parent | affbe8c4206437b265e322aafaa74d39f0278d57 (diff) |
monfront - remove notify flag
This will be replaced with a different system in the long term.
Diffstat (limited to 'cmd')
-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 |