monfront - remove notify flag
This will be replaced with a different system in the long term.
This commit is contained in:
parent
affbe8c420
commit
e151f056ad
@ -43,7 +43,6 @@ type (
|
|||||||
CheckID int64
|
CheckID int64
|
||||||
MappingId int
|
MappingId int
|
||||||
State int
|
State int
|
||||||
Notify bool
|
|
||||||
Enabled bool
|
Enabled bool
|
||||||
Notice sql.NullString
|
Notice sql.NullString
|
||||||
NextTime time.Time
|
NextTime time.Time
|
||||||
@ -175,7 +174,7 @@ func showChecks(w http.ResponseWriter, r *http.Request) {
|
|||||||
checks := []check{}
|
checks := []check{}
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
c := check{}
|
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 {
|
if err != nil {
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
w.Write([]byte("problems with the database"))
|
w.Write([]byte("problems with the database"))
|
||||||
@ -291,14 +290,14 @@ func loadMappings(c *Context) error {
|
|||||||
var (
|
var (
|
||||||
SQLShowMappings = `select mapping_id, target, title, color
|
SQLShowMappings = `select mapping_id, target, title, color
|
||||||
from mapping_level`
|
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
|
ac.enabled, ac.notice, ac.next_time, ac.msg
|
||||||
from active_checks ac
|
from active_checks ac
|
||||||
join checks c on ac.check_id = c.id
|
join checks c on ac.check_id = c.id
|
||||||
join nodes n on c.node_id = n.id
|
join nodes n on c.node_id = n.id
|
||||||
join commands co on c.command_id = co.id
|
join commands co on c.command_id = co.id
|
||||||
order by n.name, co.name;`
|
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
|
ac.enabled, ac.notice, ac.next_time, ac.msg
|
||||||
from active_checks ac
|
from active_checks ac
|
||||||
join checks c on ac.check_id = c.id
|
join checks c on ac.check_id = c.id
|
||||||
|
Loading…
Reference in New Issue
Block a user