monfront - remove notify flag

This will be replaced with a different system in the long term.
This commit is contained in:
Gibheer 2018-12-12 14:06:16 +01:00
parent affbe8c420
commit e151f056ad

View File

@ -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