graylog-labs / graylog2-web-interface

[DEPRECATED]
https://www.graylog.org/
611 stars 174 forks source link

Alarm callback string values that are removed are stored as null #1677

Closed lennartkoopmann closed 9 years ago

lennartkoopmann commented 9 years ago

When you remove the configuration of an optional alarm callback string configuration field, the value is stored as "null" (as type String) in MongoDB:

{
    "_id" : ObjectId("563d73f0d4c62e7a1ccec0e4"),
    "stream_id" : "559440eebee85af7d00dd1bc",
    "type" : "org.graylog2.alarmcallbacks.slack.SlackAlarmCallback",
    "configuration" : {
        "icon_url" : "null",
        "graylog2_url" : "null",
        "notify_channel" : false,
        "link_names" : true,
        "add_attachment" : true,
        "webhook_url" : "[removed]"
        "icon_emoji" : "ghost",
        "user_name" : "Graylog9001",
        "channel" : "slacktest2"
    },
    "created_at" : ISODate("2015-11-07T03:45:52.103Z"),
    "creator_user_id" : "lennart"
}
joschi commented 9 years ago

Fixed by merging Graylog2/graylog2-server#1543.

lennartkoopmann commented 9 years ago

Thanks! :)